From 83aab5b9d7ae48b0ba0466a9923287e3b782d611 Mon Sep 17 00:00:00 2001 From: jolov Date: Mon, 23 Sep 2024 14:36:15 -0700 Subject: [PATCH 01/54] Updates to work with new generator --- .dotnet/Configuration.json | 8 + .../src/Custom/Assistants/AssistantClient.cs | 10 +- .../InternalAssistantMessageClient.cs | 6 +- .../Internal/InternalAssistantRunClient.cs | 6 +- .../Internal/InternalAssistantThreadClient.cs | 6 +- .dotnet/src/Custom/Audio/AudioClient.cs | 10 +- .dotnet/src/Custom/Batch/BatchClient.cs | 10 +- .dotnet/src/Custom/Chat/ChatClient.cs | 22 +- .../Chat/ChatOutputTokenUsageDetails.cs | 3 +- .dotnet/src/Custom/Chat/ChatTool.cs | 2 +- .../src/Custom/Embeddings/EmbeddingClient.cs | 10 +- .dotnet/src/Custom/Files/FileClient.cs | 10 +- .../Files/Internal/InternalUploadsClient.cs | 6 +- .../src/Custom/FineTuning/FineTuningClient.cs | 10 +- .dotnet/src/Custom/Images/ImageClient.cs | 10 +- .../Internal/LegacyCompletionClient.cs | 10 +- .dotnet/src/Custom/Models/ModelClient.cs | 10 +- .../Custom/Moderations/ModerationClient.cs | 10 +- .dotnet/src/Custom/OpenAIClient.cs | 10 +- .../Custom/VectorStores/VectorStoreClient.cs | 10 +- .../Generated/AssistantClient.RestClient.cs | 147 + .dotnet/src/Generated/AssistantClient.cs | 168 +- .../src/Generated/AudioClient.RestClient.cs | 100 + .dotnet/src/Generated/AudioClient.cs | 61 +- .../src/Generated/BatchClient.RestClient.cs | 122 + .dotnet/src/Generated/BatchClient.cs | 133 +- .../src/Generated/ChatClient.RestClient.cs | 66 + .dotnet/src/Generated/ChatClient.cs | 27 +- .../Generated/EmbeddingClient.RestClient.cs | 66 + .dotnet/src/Generated/EmbeddingClient.cs | 27 +- .../src/Generated/FileClient.RestClient.cs | 134 + .dotnet/src/Generated/FileClient.cs | 94 +- .../Generated/FineTuningClient.RestClient.cs | 172 + .dotnet/src/Generated/FineTuningClient.cs | 185 +- .../src/Generated/ImageClient.RestClient.cs | 100 + .dotnet/src/Generated/ImageClient.cs | 61 +- .dotnet/src/Generated/Internal/Argument.cs | 10 +- .../Generated/Internal/BinaryContentHelper.cs | 17 +- .../Internal/ChangeTrackingDictionary.cs | 3 +- .../Generated/Internal/ChangeTrackingList.cs | 2 +- .../Internal/ClientPipelineExtensions.cs | 26 + .../Generated/Internal/ClientUriBuilder.cs | 128 +- .dotnet/src/Generated/Internal/ErrorResult.cs | 2 +- .../Internal/ModelSerializationExtensions.cs | 162 +- .../MultiPartFormDataBinaryContent.cs | 195 + .dotnet/src/Generated/Internal/Optional.cs | 12 +- .../PipelineRequestHeadersExtensions.cs | 25 + .../src/Generated/Internal/TypeFormatters.cs | 150 + .../Internal/Utf8JsonBinaryContent.cs | 2 +- ...ternalAssistantMessageClient.RestClient.cs | 157 + .../InternalAssistantMessageClient.cs | 196 +- .../InternalAssistantRunClient.RestClient.cs | 251 + .../Generated/InternalAssistantRunClient.cs | 360 +- ...nternalAssistantThreadClient.RestClient.cs | 116 + .../InternalAssistantThreadClient.cs | 121 +- .../InternalUploadsClient.RestClient.cs | 121 + .../src/Generated/InternalUploadsClient.cs | 212 +- .../LegacyCompletionClient.RestClient.cs | 66 + .../src/Generated/LegacyCompletionClient.cs | 61 +- .../src/Generated/ModelClient.RestClient.cs | 95 + .dotnet/src/Generated/ModelClient.cs | 62 +- .../Models/Assistant.Serialization.cs | 296 +- .dotnet/src/Generated/Models/Assistant.cs | 45 +- .../AssistantChatMessage.Serialization.cs | 183 +- .../Generated/Models/AssistantChatMessage.cs | 7 +- .../Models/AssistantCollectionOrder.cs | 14 +- .../AssistantCreationOptions.Serialization.cs | 208 +- .../Models/AssistantCreationOptions.cs | 13 +- .../AssistantDeletionResult.Serialization.cs | 111 +- .../Models/AssistantDeletionResult.cs | 20 +- ...istantModificationOptions.Serialization.cs | 208 +- .../Models/AssistantModificationOptions.cs | 19 +- .../AssistantResponseFormat.Serialization.cs | 118 +- .../Models/AssistantResponseFormat.cs | 12 +- .../Models/AssistantThread.Serialization.cs | 175 +- .../src/Generated/Models/AssistantThread.cs | 20 +- .../AudioTranscription.Serialization.cs | 144 +- .../Generated/Models/AudioTranscription.cs | 26 +- .../AudioTranscriptionFormat.Serialization.cs | 39 +- ...AudioTranscriptionOptions.Serialization.cs | 235 +- .../Models/AudioTranscriptionOptions.cs | 14 +- .../Models/AudioTranslation.Serialization.cs | 134 +- .../src/Generated/Models/AudioTranslation.cs | 23 +- .../AudioTranslationFormat.Serialization.cs | 39 +- .../AudioTranslationOptions.Serialization.cs | 176 +- .../Models/AudioTranslationOptions.cs | 13 +- .../Models/ChatCompletion.Serialization.cs | 175 +- .../src/Generated/Models/ChatCompletion.cs | 33 +- .../ChatCompletionOptions.Serialization.cs | 395 +- .../Generated/Models/ChatCompletionOptions.cs | 35 +- .../Models/ChatFinishReason.Serialization.cs | 39 +- .../Models/ChatFunction.Serialization.cs | 122 +- .dotnet/src/Generated/Models/ChatFunction.cs | 16 +- .../Models/ChatFunctionCall.Serialization.cs | 100 +- .../src/Generated/Models/ChatFunctionCall.cs | 14 +- .../ChatFunctionChoice.Serialization.cs | 82 +- .../Generated/Models/ChatFunctionChoice.cs | 2 +- .../Generated/Models/ChatImageDetailLevel.cs | 20 +- .../Models/ChatMessage.Serialization.cs | 93 +- .dotnet/src/Generated/Models/ChatMessage.cs | 12 +- .../ChatMessageContentPart.Serialization.cs | 82 +- .../Models/ChatMessageContentPart.cs | 2 +- .../Models/ChatMessageRole.Serialization.cs | 39 +- ...atOutputTokenUsageDetails.Serialization.cs | 87 +- .../Models/ChatOutputTokenUsageDetails.cs | 9 +- .../ChatResponseFormat.Serialization.cs | 89 +- .../Generated/Models/ChatResponseFormat.cs | 12 +- ...okenLogProbabilityDetails.Serialization.cs | 159 +- .../Models/ChatTokenLogProbabilityDetails.cs | 30 +- ...nTopLogProbabilityDetails.Serialization.cs | 140 +- .../ChatTokenTopLogProbabilityDetails.cs | 26 +- .../Models/ChatTokenUsage.Serialization.cs | 122 +- .../src/Generated/Models/ChatTokenUsage.cs | 25 +- .../Models/ChatTool.Serialization.cs | 102 +- .dotnet/src/Generated/Models/ChatTool.cs | 13 +- .../Models/ChatToolCall.Serialization.cs | 113 +- .dotnet/src/Generated/Models/ChatToolCall.cs | 12 +- .../src/Generated/Models/ChatToolCallKind.cs | 14 +- .../Models/ChatToolChoice.Serialization.cs | 82 +- .../src/Generated/Models/ChatToolChoice.cs | 2 +- .dotnet/src/Generated/Models/ChatToolKind.cs | 14 +- ...InterpreterToolDefinition.Serialization.cs | 75 +- .../Models/CodeInterpreterToolDefinition.cs | 5 +- ...eInterpreterToolResources.Serialization.cs | 96 +- .../Models/CodeInterpreterToolResources.cs | 6 +- .../Models/Embedding.Serialization.cs | 117 +- .dotnet/src/Generated/Models/Embedding.cs | 8 +- .../EmbeddingCollection.Serialization.cs | 124 +- .../Generated/Models/EmbeddingCollection.cs | 20 +- ...mbeddingGenerationOptions.Serialization.cs | 133 +- .../Models/EmbeddingGenerationOptions.cs | 9 +- .../EmbeddingTokenUsage.Serialization.cs | 100 +- .../Generated/Models/EmbeddingTokenUsage.cs | 18 +- .../FileChunkingStrategy.Serialization.cs | 85 +- .../Generated/Models/FileChunkingStrategy.cs | 12 +- .../FileDeletionResult.Serialization.cs | 111 +- .../Generated/Models/FileDeletionResult.cs | 21 +- ...ileFromStoreRemovalResult.Serialization.cs | 111 +- .../Models/FileFromStoreRemovalResult.cs | 23 +- .../src/Generated/Models/FileSearchRanker.cs | 17 +- .../FileSearchRankingOptions.Serialization.cs | 94 +- .../Models/FileSearchRankingOptions.cs | 9 +- .../FileSearchToolDefinition.Serialization.cs | 87 +- .../Models/FileSearchToolDefinition.cs | 6 +- .../FileSearchToolResources.Serialization.cs | 111 +- .../Models/FileSearchToolResources.cs | 8 +- .../src/Generated/Models/FileUploadPurpose.cs | 23 +- .../FineTuningIntegration.Serialization.cs | 123 - .../Generated/Models/FineTuningIntegration.cs | 12 +- ...ningIntegrationWandbWandb.Serialization.cs | 133 +- .../Models/FineTuningIntegrationWandbWandb.cs | 23 +- .../Models/FineTuningJob.Serialization.cs | 333 +- .dotnet/src/Generated/Models/FineTuningJob.cs | 70 +- .../FineTuningJobError.Serialization.cs | 123 +- .../Generated/Models/FineTuningJobError.cs | 26 +- .../FineTuningJobEvent.Serialization.cs | 135 +- .../Generated/Models/FineTuningJobEvent.cs | 28 +- .../FineTuningJobEventLevel.Serialization.cs | 25 +- ...eTuningJobHyperparameters.Serialization.cs | 161 +- .../Models/FineTuningJobHyperparameters.cs | 14 +- ...ngJobHyperparametersBatchSizeChoiceEnum.cs | 14 +- ...ametersLearningRateMultiplierChoiceEnum.cs | 14 +- ...ningJobHyperparametersNEpochsChoiceEnum.cs | 14 +- .../Generated/Models/FineTuningJobStatus.cs | 25 +- .../Models/FineTuningOptions.Serialization.cs | 149 +- .../src/Generated/Models/FineTuningOptions.cs | 20 +- .../FunctionChatMessage.Serialization.cs | 105 +- .../Generated/Models/FunctionChatMessage.cs | 9 +- .../FunctionToolDefinition.Serialization.cs | 81 +- .../Models/FunctionToolDefinition.cs | 7 + .../Models/GeneratedImage.Serialization.cs | 107 +- .../src/Generated/Models/GeneratedImage.cs | 14 +- .../GeneratedImageCollection.Serialization.cs | 108 +- .../Models/GeneratedImageCollection.cs | 12 +- .../GeneratedImageFormat.Serialization.cs | 18 +- .../GeneratedImageQuality.Serialization.cs | 18 +- .../Generated/Models/GeneratedImageSize.cs | 28 +- .../GeneratedImageStyle.Serialization.cs | 18 +- .../Generated/Models/GeneratedSpeechFormat.cs | 25 +- .../Generated/Models/GeneratedSpeechVoice.cs | 25 +- .../Models/HyperparameterBatchSize.cs | 14 +- .../Models/HyperparameterCycleCount.cs | 14 +- .../Models/HyperparameterLearningRate.cs | 14 +- .../HyperparameterOptions.Serialization.cs | 107 +- .../Generated/Models/HyperparameterOptions.cs | 9 +- .../Models/ImageEditOptions.Serialization.cs | 244 +- .../src/Generated/Models/ImageEditOptions.cs | 8 +- .../ImageGenerationOptions.Serialization.cs | 165 +- .../Models/ImageGenerationOptions.cs | 18 +- .../ImageVariationOptions.Serialization.cs | 210 +- .../Generated/Models/ImageVariationOptions.cs | 8 +- ...ernalAddUploadPartRequest.Serialization.cs | 123 +- .../Models/InternalAddUploadPartRequest.cs | 17 +- .../Models/InternalAssistantObjectObject.cs | 14 +- ...tResponseFormatJsonObject.Serialization.cs | 96 +- ...ternalAssistantResponseFormatJsonObject.cs | 5 +- ...tResponseFormatJsonSchema.Serialization.cs | 111 +- ...ternalAssistantResponseFormatJsonSchema.cs | 12 +- ...sistantResponseFormatText.Serialization.cs | 96 +- .../InternalAssistantResponseFormatText.cs | 5 +- ...ToolsFileSearchFileSearch.Serialization.cs | 94 +- ...ernalAssistantToolsFileSearchFileSearch.cs | 10 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 87 +- ...nternalAssistantToolsFileSearchTypeOnly.cs | 11 +- ...nalAssistantToolsFileSearchTypeOnlyType.cs | 14 +- ...tsNamedToolChoiceFunction.Serialization.cs | 89 +- ...ternalAssistantsNamedToolChoiceFunction.cs | 12 +- .../InternalAssistantsNamedToolChoiceType.cs | 20 +- ...ernalAutoChunkingStrategy.Serialization.cs | 95 +- .../Models/InternalAutoChunkingStrategy.cs | 5 +- ...nkingStrategyRequestParam.Serialization.cs | 95 +- ...nternalAutoChunkingStrategyRequestParam.cs | 5 +- .../InternalBatchCompletionTimeframe.cs | 14 +- .../InternalBatchError.Serialization.cs | 120 +- .../Generated/Models/InternalBatchError.cs | 20 +- .../InternalBatchErrors.Serialization.cs | 93 +- .../Generated/Models/InternalBatchErrors.cs | 13 +- .../Models/InternalBatchErrorsObject.cs | 14 +- .../Models/InternalBatchJob.Serialization.cs | 293 +- .../src/Generated/Models/InternalBatchJob.cs | 75 +- .../Generated/Models/InternalBatchObject.cs | 14 +- ...nternalBatchRequestCounts.Serialization.cs | 111 +- .../Models/InternalBatchRequestCounts.cs | 17 +- ...InternalBatchRequestInput.Serialization.cs | 105 +- .../Models/InternalBatchRequestInput.cs | 11 +- .../Models/InternalBatchRequestInputMethod.cs | 14 +- ...nternalBatchRequestOutput.Serialization.cs | 116 +- .../Models/InternalBatchRequestOutput.cs | 18 +- ...alBatchRequestOutputError.Serialization.cs | 96 +- .../Models/InternalBatchRequestOutputError.cs | 12 +- ...atchRequestOutputResponse.Serialization.cs | 112 +- .../InternalBatchRequestOutputResponse.cs | 16 +- .../Generated/Models/InternalBatchStatus.cs | 27 +- ...pletionFunctionCallOption.Serialization.cs | 89 +- ...nternalChatCompletionFunctionCallOption.cs | 14 +- ...sageToolCallChunkFunction.Serialization.cs | 96 +- ...tCompletionMessageToolCallChunkFunction.cs | 12 +- ...lChatCompletionMessageToolCallChunkType.cs | 14 +- ...onMessageToolCallFunction.Serialization.cs | 100 +- ...alChatCompletionMessageToolCallFunction.cs | 13 +- ...CompletionNamedToolChoice.Serialization.cs | 102 +- .../InternalChatCompletionNamedToolChoice.cs | 18 +- ...onNamedToolChoiceFunction.Serialization.cs | 89 +- ...alChatCompletionNamedToolChoiceFunction.cs | 14 +- ...ternalChatCompletionNamedToolChoiceType.cs | 14 +- ...stMessageContentPartImage.Serialization.cs | 102 +- ...ompletionRequestMessageContentPartImage.cs | 18 +- ...eContentPartImageImageUrl.Serialization.cs | 100 +- ...nRequestMessageContentPartImageImageUrl.cs | 8 +- ...etionRequestMessageContentPartImageType.cs | 14 +- ...MessageContentPartRefusal.Serialization.cs | 102 +- ...pletionRequestMessageContentPartRefusal.cs | 18 +- ...ionRequestMessageContentPartRefusalType.cs | 14 +- ...estMessageContentPartText.Serialization.cs | 102 +- ...CompletionRequestMessageContentPartText.cs | 18 +- ...letionRequestMessageContentPartTextType.cs | 14 +- ...CompletionResponseMessage.Serialization.cs | 181 +- .../InternalChatCompletionResponseMessage.cs | 21 +- ...sponseMessageFunctionCall.Serialization.cs | 100 +- ...atCompletionResponseMessageFunctionCall.cs | 17 +- ...ternalChatCompletionResponseMessageRole.cs | 14 +- ...atCompletionStreamOptions.Serialization.cs | 83 +- .../InternalChatCompletionStreamOptions.cs | 7 +- ...letionStreamResponseDelta.Serialization.cs | 191 +- ...ternalChatCompletionStreamResponseDelta.cs | 15 +- ...alChatCompletionStreamResponseDeltaRole.cs | 23 +- ...tResponseFormatJsonObject.Serialization.cs | 75 +- .../InternalChatResponseFormatJsonObject.cs | 5 +- ...tResponseFormatJsonSchema.Serialization.cs | 85 +- .../InternalChatResponseFormatJsonSchema.cs | 12 +- ...nalChatResponseFormatText.Serialization.cs | 75 +- .../Models/InternalChatResponseFormatText.cs | 5 +- ...rnalCompleteUploadRequest.Serialization.cs | 116 +- .../Models/InternalCompleteUploadRequest.cs | 13 +- .../InternalCreateAssistantRequestModel.cs | 42 +- ...stantRequestToolResources.Serialization.cs | 92 +- ...rnalCreateAssistantRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 96 +- ...tantRequestToolResourcesCodeInterpreter.cs | 8 +- ...nternalCreateBatchRequest.Serialization.cs | 137 +- .../Models/InternalCreateBatchRequest.cs | 22 +- .../InternalCreateBatchRequestEndpoint.cs | 17 +- ...ompletionFunctionResponse.Serialization.cs | 161 +- ...nalCreateChatCompletionFunctionResponse.cs | 32 +- ...ionFunctionResponseChoice.Serialization.cs | 111 +- ...ateChatCompletionFunctionResponseChoice.cs | 19 +- ...etionFunctionResponseChoiceFinishReason.cs | 23 +- ...ateChatCompletionFunctionResponseObject.cs | 14 +- ...nternalCreateChatCompletionRequestModel.cs | 48 +- ...lCreateChatCompletionRequestServiceTier.cs | 17 +- ...alCreateChatCompletionRequestToolChoice.cs | 20 +- ...tCompletionResponseChoice.Serialization.cs | 132 +- ...ernalCreateChatCompletionResponseChoice.cs | 24 +- ...ionResponseChoiceLogprobs.Serialization.cs | 140 +- ...ateChatCompletionResponseChoiceLogprobs.cs | 14 +- ...ernalCreateChatCompletionResponseObject.cs | 14 +- ...CreateChatCompletionResponseServiceTier.cs | 17 +- ...etionStreamResponseChoice.Serialization.cs | 145 +- ...reateChatCompletionStreamResponseChoice.cs | 21 +- ...pletionStreamResponseChoiceFinishReason.cs | 24 +- ...eamResponseChoiceLogprobs.Serialization.cs | 140 +- ...tCompletionStreamResponseChoiceLogprobs.cs | 14 +- ...reateChatCompletionStreamResponseObject.cs | 14 +- ...ChatCompletionStreamResponseServiceTier.cs | 17 +- ...letionStreamResponseUsage.Serialization.cs | 111 +- ...CreateChatCompletionStreamResponseUsage.cs | 17 +- ...alCreateCompletionRequest.Serialization.cs | 283 +- .../Models/InternalCreateCompletionRequest.cs | 31 +- .../InternalCreateCompletionRequestModel.cs | 20 +- ...lCreateCompletionResponse.Serialization.cs | 161 +- .../InternalCreateCompletionResponse.cs | 32 +- ...eCompletionResponseChoice.Serialization.cs | 130 +- .../InternalCreateCompletionResponseChoice.cs | 22 +- ...ateCompletionResponseChoiceFinishReason.cs | 20 +- ...ionResponseChoiceLogprobs.Serialization.cs | 132 +- ...lCreateCompletionResponseChoiceLogprobs.cs | 19 +- .../InternalCreateCompletionResponseObject.cs | 14 +- ...nalCreateEmbeddingRequestEncodingFormat.cs | 17 +- .../InternalCreateEmbeddingRequestModel.cs | 20 +- .../InternalCreateEmbeddingResponseObject.cs | 14 +- ...InternalCreateFineTuningJobRequestModel.cs | 23 +- ...uestWandbIntegrationWandb.Serialization.cs | 131 +- ...neTuningJobRequestWandbIntegrationWandb.cs | 13 +- .../InternalCreateImageEditRequestModel.cs | 14 +- ...nalCreateImageEditRequestResponseFormat.cs | 17 +- .../InternalCreateImageEditRequestSize.cs | 20 +- .../Models/InternalCreateImageRequestModel.cs | 17 +- ...nternalCreateImageVariationRequestModel.cs | 14 +- ...eateImageVariationRequestResponseFormat.cs | 17 +- ...InternalCreateImageVariationRequestSize.cs | 20 +- .../InternalCreateModerationRequestModel.cs | 17 +- .../Models/InternalCreateRunRequestModel.cs | 42 +- .../InternalCreateSpeechRequestModel.cs | 17 +- ...CreateThreadAndRunRequest.Serialization.cs | 281 +- .../InternalCreateThreadAndRunRequest.cs | 23 +- .../InternalCreateThreadAndRunRequestModel.cs | 42 +- ...rnalCreateThreadAndRunRequestToolChoice.cs | 20 +- ...ndRunRequestToolResources.Serialization.cs | 92 +- ...lCreateThreadAndRunRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 96 +- ...dRunRequestToolResourcesCodeInterpreter.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 92 +- ...nternalCreateThreadRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 96 +- ...readRequestToolResourcesCodeInterpreter.cs | 8 +- ...olResourcesFileSearchBase.Serialization.cs | 74 +- ...hreadRequestToolResourcesFileSearchBase.cs | 7 +- ...InternalCreateTranscriptionRequestModel.cs | 14 +- ...ranscriptionRequestTimestampGranularity.cs | 17 +- ...TranscriptionResponseJson.Serialization.cs | 89 +- ...InternalCreateTranscriptionResponseJson.cs | 15 +- ...ateTranscriptionResponseVerboseJsonTask.cs | 14 +- .../InternalCreateTranslationRequestModel.cs | 14 +- ...teTranslationResponseJson.Serialization.cs | 89 +- .../InternalCreateTranslationResponseJson.cs | 15 +- ...reateTranslationResponseVerboseJsonTask.cs | 14 +- ...ternalCreateUploadRequest.Serialization.cs | 122 +- .../Models/InternalCreateUploadRequest.cs | 21 +- .../InternalCreateUploadRequestPurpose.cs | 23 +- ...ctorStoreFileBatchRequest.Serialization.cs | 116 +- ...ternalCreateVectorStoreFileBatchRequest.cs | 13 +- ...ateVectorStoreFileRequest.Serialization.cs | 109 +- .../InternalCreateVectorStoreFileRequest.cs | 14 +- .../InternalDeleteAssistantResponseObject.cs | 14 +- .../InternalDeleteFileResponseObject.cs | 14 +- .../InternalDeleteMessageResponseObject.cs | 14 +- .../InternalDeleteModelResponseObject.cs | 14 +- .../InternalDeleteThreadResponseObject.cs | 14 +- ...rnalDeleteVectorStoreFileResponseObject.cs | 14 +- ...InternalDeleteVectorStoreResponseObject.cs | 14 +- .../Models/InternalEmbeddingObject.cs | 14 +- ...nkingStrategyRequestParam.Serialization.cs | 82 +- ...nternalFileChunkingStrategyRequestParam.cs | 12 +- ...InternalFileUploadOptions.Serialization.cs | 131 +- .../Models/InternalFileUploadOptions.cs | 18 +- ...onRequestAssistantMessage.Serialization.cs | 182 +- ...neChatCompletionRequestAssistantMessage.cs | 7 +- ...rnalFineTuningIntegration.Serialization.cs | 79 +- .../Models/InternalFineTuningIntegration.cs | 12 +- ...ineTuningIntegrationWandb.Serialization.cs | 110 +- .../InternalFineTuningIntegrationWandb.cs | 13 +- ...alFineTuningJobCheckpoint.Serialization.cs | 155 +- .../Models/InternalFineTuningJobCheckpoint.cs | 34 +- ...uningJobCheckpointMetrics.Serialization.cs | 137 +- .../InternalFineTuningJobCheckpointMetrics.cs | 27 +- .../InternalFineTuningJobCheckpointObject.cs | 14 +- .../InternalFineTuningJobEventObject.cs | 14 +- .../Models/InternalFineTuningJobObject.cs | 14 +- ...lFinetuneChatRequestInput.Serialization.cs | 109 +- .../InternalFinetuneChatRequestInput.cs | 11 +- ...uneCompletionRequestInput.Serialization.cs | 96 +- .../InternalFinetuneCompletionRequestInput.cs | 8 +- ...nternalFunctionDefinition.Serialization.cs | 130 +- .../Models/InternalFunctionDefinition.cs | 16 +- ...nternalFunctionParameters.Serialization.cs | 61 +- .../Models/InternalFunctionParameters.cs | 9 +- ...nalListAssistantsResponse.Serialization.cs | 141 +- .../Models/InternalListAssistantsResponse.cs | 26 +- .../InternalListAssistantsResponseObject.cs | 14 +- ...ternalListBatchesResponse.Serialization.cs | 141 +- .../Models/InternalListBatchesResponse.cs | 25 +- .../InternalListBatchesResponseObject.cs | 14 +- ...ListFilesInVectorStoreBatchRequestOrder.cs | 17 +- .../Models/InternalListFilesResponseObject.cs | 14 +- ...ingJobCheckpointsResponse.Serialization.cs | 139 +- ...nalListFineTuningJobCheckpointsResponse.cs | 24 +- ...tFineTuningJobCheckpointsResponseObject.cs | 14 +- ...neTuningJobEventsResponse.Serialization.cs | 119 +- ...InternalListFineTuningJobEventsResponse.cs | 19 +- ...alListFineTuningJobEventsResponseObject.cs | 14 +- ...ernalListMessagesResponse.Serialization.cs | 141 +- .../Models/InternalListMessagesResponse.cs | 26 +- .../InternalListMessagesResponseObject.cs | 14 +- .../InternalListModelsResponseObject.cs | 14 +- ...tedFineTuningJobsResponse.Serialization.cs | 119 +- ...rnalListPaginatedFineTuningJobsResponse.cs | 19 +- ...stPaginatedFineTuningJobsResponseObject.cs | 14 +- ...ernalListRunStepsResponse.Serialization.cs | 141 +- .../Models/InternalListRunStepsResponse.cs | 26 +- .../InternalListRunStepsResponseObject.cs | 14 +- .../InternalListRunsResponse.Serialization.cs | 141 +- .../Models/InternalListRunsResponse.cs | 26 +- .../Models/InternalListRunsResponseObject.cs | 14 +- ...ternalListThreadsResponse.Serialization.cs | 141 +- .../Models/InternalListThreadsResponse.cs | 26 +- .../InternalListThreadsResponseObject.cs | 14 +- ...tVectorStoreFilesResponse.Serialization.cs | 141 +- .../InternalListVectorStoreFilesResponse.cs | 26 +- ...ernalListVectorStoreFilesResponseObject.cs | 14 +- ...lListVectorStoresResponse.Serialization.cs | 141 +- .../InternalListVectorStoresResponse.cs | 26 +- .../InternalListVectorStoresResponseObject.cs | 14 +- ...geContentImageFileObjectImageFileDetail.cs | 20 +- ...ternalMessageContentImageFileObjectType.cs | 14 +- ...entImageUrlObjectImageUrl.Serialization.cs | 104 +- ...nalMessageContentImageUrlObjectImageUrl.cs | 12 +- ...sageContentImageUrlObjectImageUrlDetail.cs | 20 +- ...nternalMessageContentImageUrlObjectType.cs | 14 +- ...ntItemFileObjectImageFile.Serialization.cs | 104 +- ...alMessageContentItemFileObjectImageFile.cs | 12 +- ...InternalMessageContentRefusalObjectType.cs | 14 +- ...tationsFileCitationObject.Serialization.cs | 147 +- ...ontentTextAnnotationsFileCitationObject.cs | 13 +- ...itationObjectFileCitation.Serialization.cs | 89 +- ...notationsFileCitationObjectFileCitation.cs | 12 +- ...AnnotationsFilePathObject.Serialization.cs | 147 +- ...ageContentTextAnnotationsFilePathObject.cs | 13 +- ...onsFilePathObjectFilePath.Serialization.cs | 89 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 12 +- ...ntentTextObjectAnnotation.Serialization.cs | 82 +- ...ernalMessageContentTextObjectAnnotation.cs | 12 +- ...sageContentTextObjectText.Serialization.cs | 106 +- .../InternalMessageContentTextObjectText.cs | 13 +- .../InternalMessageContentTextObjectType.cs | 14 +- ...ternalMessageDeltaContent.Serialization.cs | 88 +- .../Models/InternalMessageDeltaContent.cs | 12 +- ...ltaContentImageFileObject.Serialization.cs | 119 +- ...ernalMessageDeltaContentImageFileObject.cs | 12 +- ...tImageFileObjectImageFile.Serialization.cs | 100 +- ...ageDeltaContentImageFileObjectImageFile.cs | 9 +- ...taContentImageFileObjectImageFileDetail.cs | 20 +- ...eltaContentImageUrlObject.Serialization.cs | 119 +- ...ternalMessageDeltaContentImageUrlObject.cs | 12 +- ...entImageUrlObjectImageUrl.Serialization.cs | 98 +- ...ssageDeltaContentImageUrlObjectImageUrl.cs | 9 +- ...eltaContentImageUrlObjectImageUrlDetail.cs | 20 +- ...DeltaContentRefusalObject.Serialization.cs | 121 +- ...nternalMessageDeltaContentRefusalObject.cs | 12 +- ...tationsFileCitationObject.Serialization.cs | 152 +- ...ontentTextAnnotationsFileCitationObject.cs | 21 +- ...itationObjectFileCitation.Serialization.cs | 96 +- ...notationsFileCitationObjectFileCitation.cs | 12 +- ...AnnotationsFilePathObject.Serialization.cs | 152 +- ...ltaContentTextAnnotationsFilePathObject.cs | 21 +- ...onsFilePathObjectFilePath.Serialization.cs | 85 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 9 +- ...ageDeltaContentTextObject.Serialization.cs | 119 +- .../InternalMessageDeltaContentTextObject.cs | 12 +- ...eltaContentTextObjectText.Serialization.cs | 95 +- ...ternalMessageDeltaContentTextObjectText.cs | 13 +- ...nternalMessageDeltaObject.Serialization.cs | 111 +- .../Models/InternalMessageDeltaObject.cs | 19 +- ...alMessageDeltaObjectDelta.Serialization.cs | 97 +- .../Models/InternalMessageDeltaObjectDelta.cs | 11 +- .../InternalMessageDeltaObjectDeltaRole.cs | 17 +- .../InternalMessageDeltaObjectObject.cs | 14 +- ...eltaTextContentAnnotation.Serialization.cs | 82 +- ...ternalMessageDeltaTextContentAnnotation.cs | 12 +- ...alMessageImageFileContent.Serialization.cs | 87 +- .../Models/InternalMessageImageFileContent.cs | 12 +- ...nalMessageImageUrlContent.Serialization.cs | 87 +- .../Models/InternalMessageImageUrlContent.cs | 12 +- ...alMessageObjectAttachment.Serialization.cs | 97 +- .../Models/InternalMessageObjectAttachment.cs | 13 +- .../Models/InternalMessageObjectObject.cs | 14 +- .../Models/InternalMessageObjectRole.cs | 17 +- ...rnalMessageRefusalContent.Serialization.cs | 87 +- .../Models/InternalMessageRefusalContent.cs | 17 +- ...rnalMessageRequestContentTextObjectType.cs | 14 +- .../Generated/Models/InternalModelObject.cs | 14 +- ...stantRequestToolResources.Serialization.cs | 92 +- ...rnalModifyAssistantRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 96 +- ...tantRequestToolResourcesCodeInterpreter.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 92 +- ...nternalModifyThreadRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 96 +- ...readRequestToolResourcesCodeInterpreter.cs | 8 +- ...alOmniTypedResponseFormat.Serialization.cs | 85 +- .../Models/InternalOmniTypedResponseFormat.cs | 12 +- .../Models/InternalOpenAIFileObject.cs | 14 +- ...RequestMessageTextContent.Serialization.cs | 87 +- .../InternalRequestMessageTextContent.cs | 19 +- ...lRequiredFunctionToolCall.Serialization.cs | 113 +- .../InternalRequiredFunctionToolCall.cs | 26 +- ...lResponseFormatJsonObject.Serialization.cs | 95 +- .../InternalResponseFormatJsonObject.cs | 5 +- ...lResponseFormatJsonSchema.Serialization.cs | 110 +- .../InternalResponseFormatJsonSchema.cs | 10 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 130 +- ...ernalResponseFormatJsonSchemaJsonSchema.cs | 14 +- ...nseFormatJsonSchemaSchema.Serialization.cs | 61 +- .../InternalResponseFormatJsonSchemaSchema.cs | 9 +- ...nternalResponseFormatText.Serialization.cs | 95 +- .../Models/InternalResponseFormatText.cs | 5 +- ...esponseMessageTextContent.Serialization.cs | 87 +- .../InternalResponseMessageTextContent.cs | 12 +- .../Models/InternalRunObjectObject.cs | 14 +- ...edActionSubmitToolOutputs.Serialization.cs | 97 +- ...unObjectRequiredActionSubmitToolOutputs.cs | 15 +- .../InternalRunObjectRequiredActionType.cs | 14 +- ...InternalRunRequiredAction.Serialization.cs | 102 +- .../Models/InternalRunRequiredAction.cs | 17 +- ...pCodeInterpreterLogOutput.Serialization.cs | 110 +- ...InternalRunStepCodeInterpreterLogOutput.cs | 15 +- ...nterpreterToolCallDetails.Serialization.cs | 121 +- ...alRunStepCodeInterpreterToolCallDetails.cs | 18 +- .../InternalRunStepDelta.Serialization.cs | 113 +- .../Generated/Models/InternalRunStepDelta.cs | 18 +- ...alRunStepDeltaObjectDelta.Serialization.cs | 83 +- .../Models/InternalRunStepDeltaObjectDelta.cs | 9 +- .../InternalRunStepDeltaObjectObject.cs | 14 +- ...alRunStepDeltaStepDetails.Serialization.cs | 82 +- .../Models/InternalRunStepDeltaStepDetails.cs | 12 +- ...ailsMessageCreationObject.Serialization.cs | 104 +- ...epDeltaStepDetailsMessageCreationObject.cs | 7 +- ...tionObjectMessageCreation.Serialization.cs | 85 +- ...ilsMessageCreationObjectMessageCreation.cs | 9 +- ...etailsToolCallsCodeObject.Serialization.cs | 130 +- ...StepDeltaStepDetailsToolCallsCodeObject.cs | 15 +- ...CodeObjectCodeInterpreter.Serialization.cs | 95 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 13 +- ...allsCodeOutputImageObject.Serialization.cs | 119 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 12 +- ...odeOutputImageObjectImage.Serialization.cs | 85 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 9 +- ...CallsCodeOutputLogsObject.Serialization.cs | 123 +- ...tepDetailsToolCallsCodeOutputLogsObject.cs | 13 +- ...ToolCallsFileSearchObject.Serialization.cs | 160 +- ...ltaStepDetailsToolCallsFileSearchObject.cs | 17 +- ...lsToolCallsFunctionObject.Serialization.cs | 130 +- ...DeltaStepDetailsToolCallsFunctionObject.cs | 15 +- ...llsFunctionObjectFunction.Serialization.cs | 106 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 15 +- ...tepDetailsToolCallsObject.Serialization.cs | 105 +- ...lRunStepDeltaStepDetailsToolCallsObject.cs | 8 +- ...allsObjectToolCallsObject.Serialization.cs | 85 +- ...epDetailsToolCallsObjectToolCallsObject.cs | 12 +- ...ailsMessageCreationObject.Serialization.cs | 110 +- ...rnalRunStepDetailsMessageCreationObject.cs | 15 +- ...tionObjectMessageCreation.Serialization.cs | 89 +- ...ilsMessageCreationObjectMessageCreation.cs | 15 +- ...CodeObjectCodeInterpreter.Serialization.cs | 108 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 17 +- ...allsCodeOutputImageObject.Serialization.cs | 110 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 15 +- ...odeOutputImageObjectImage.Serialization.cs | 89 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 15 +- ...ileSearchObjectFileSearch.Serialization.cs | 97 +- ...ailsToolCallsFileSearchObjectFileSearch.cs | 11 +- ...earchRankingOptionsObject.Serialization.cs | 100 +- ...ToolCallsFileSearchRankingOptionsObject.cs | 15 +- ...llsFileSearchRankingOptionsObjectRanker.cs | 14 +- ...SearchResultObjectContent.Serialization.cs | 96 +- ...sToolCallsFileSearchResultObjectContent.cs | 14 +- ...lCallsFileSearchResultObjectContentType.cs | 14 +- ...llsFunctionObjectFunction.Serialization.cs | 119 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 20 +- ...tepDetailsToolCallsObject.Serialization.cs | 118 +- .../InternalRunStepDetailsToolCallsObject.cs | 15 +- ...FileSearchToolCallDetails.Serialization.cs | 121 +- ...nternalRunStepFileSearchToolCallDetails.cs | 15 +- ...epFunctionToolCallDetails.Serialization.cs | 121 +- .../InternalRunStepFunctionToolCallDetails.cs | 18 +- .../Models/InternalRunStepObjectObject.cs | 14 +- ...RunToolCallObjectFunction.Serialization.cs | 100 +- .../InternalRunToolCallObjectFunction.cs | 17 +- .../Models/InternalRunToolCallObjectType.cs | 14 +- ...icChunkingStrategyDetails.Serialization.cs | 100 +- .../InternalStaticChunkingStrategyDetails.cs | 12 +- ...nkingStrategyRequestParam.Serialization.cs | 110 +- ...ernalStaticChunkingStrategyRequestParam.cs | 12 +- ...bmitToolOutputsRunRequest.Serialization.cs | 105 +- .../InternalSubmitToolOutputsRunRequest.cs | 13 +- .../Models/InternalThreadObjectObject.cs | 14 +- ...ThreadObjectToolResources.Serialization.cs | 92 +- .../InternalThreadObjectToolResources.cs | 12 +- ...lResourcesCodeInterpreter.Serialization.cs | 98 +- ...hreadObjectToolResourcesCodeInterpreter.cs | 10 +- ...ctToolResourcesFileSearch.Serialization.cs | 98 +- ...rnalThreadObjectToolResourcesFileSearch.cs | 10 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 96 +- .../InternalToolResourcesFileSearchIdsOnly.cs | 8 +- .../Models/InternalTruncationObjectType.cs | 17 +- ...wnAssistantResponseFormat.Serialization.cs | 89 +- .../InternalUnknownAssistantResponseFormat.cs | 6 +- ...nternalUnknownChatMessage.Serialization.cs | 86 +- .../Models/InternalUnknownChatMessage.cs | 6 +- ...UnknownChatResponseFormat.Serialization.cs | 80 +- .../InternalUnknownChatResponseFormat.cs | 6 +- ...alUnknownChunkingStrategy.Serialization.cs | 95 +- .../Models/InternalUnknownChunkingStrategy.cs | 5 +- ...StrategyRequestParamProxy.Serialization.cs | 100 +- ...wnFileChunkingStrategyRequestParamProxy.cs | 6 +- ...trategyResponseParamProxy.Serialization.cs | 100 +- ...nFileChunkingStrategyResponseParamProxy.cs | 6 +- ...wnOmniTypedResponseFormat.Serialization.cs | 100 +- .../InternalUnknownOmniTypedResponseFormat.cs | 6 +- .../Models/InternalUpload.Serialization.cs | 180 +- .../src/Generated/Models/InternalUpload.cs | 41 +- .../Generated/Models/InternalUploadObject.cs | 14 +- .../InternalUploadPart.Serialization.cs | 122 +- .../Generated/Models/InternalUploadPart.cs | 23 +- .../Models/InternalUploadPartObject.cs | 14 +- .../Generated/Models/InternalUploadStatus.cs | 23 +- ...FileBatchObjectFileCounts.Serialization.cs | 133 +- ...nalVectorStoreFileBatchObjectFileCounts.cs | 23 +- ...nternalVectorStoreFileBatchObjectObject.cs | 14 +- .../InternalVectorStoreFileObjectObject.cs | 14 +- .../Models/InternalVectorStoreObjectObject.cs | 14 +- .../Models/MessageCollectionOrder.cs | 14 +- .../Models/MessageContent.Serialization.cs | 82 +- .../src/Generated/Models/MessageContent.cs | 8 +- ...MessageCreationAttachment.Serialization.cs | 127 +- .../Models/MessageCreationAttachment.cs | 16 +- .../MessageCreationOptions.Serialization.cs | 133 +- .../Models/MessageCreationOptions.cs | 9 +- .../MessageDeletionResult.Serialization.cs | 111 +- .../Generated/Models/MessageDeletionResult.cs | 20 +- .../MessageFailureDetails.Serialization.cs | 89 +- .../Generated/Models/MessageFailureDetails.cs | 13 +- .../Generated/Models/MessageFailureReason.cs | 24 +- ...essageModificationOptions.Serialization.cs | 98 +- .../Models/MessageModificationOptions.cs | 8 +- .../Models/MessageRole.Serialization.cs | 18 +- .dotnet/src/Generated/Models/MessageStatus.cs | 20 +- .../ModelDeletionResult.Serialization.cs | 111 +- .../Generated/Models/ModelDeletionResult.cs | 20 +- .../ModerationCategories.Serialization.cs | 201 +- .../Generated/Models/ModerationCategories.cs | 41 +- .../ModerationCategoryScores.Serialization.cs | 201 +- .../Models/ModerationCategoryScores.cs | 41 +- .../ModerationCollection.Serialization.cs | 116 +- .../Generated/Models/ModerationCollection.cs | 20 +- .../Models/ModerationOptions.Serialization.cs | 102 +- .../src/Generated/Models/ModerationOptions.cs | 6 +- .../Models/ModerationResult.Serialization.cs | 111 +- .../src/Generated/Models/ModerationResult.cs | 20 +- .../Models/OpenAIError.Serialization.cs | 144 +- .dotnet/src/Generated/Models/OpenAIError.cs | 33 +- .../OpenAIErrorResponse.Serialization.cs | 89 +- .../Generated/Models/OpenAIErrorResponse.cs | 15 +- .../Models/OpenAIFileInfo.Serialization.cs | 174 +- .../src/Generated/Models/OpenAIFileInfo.cs | 28 +- .../OpenAIFileInfoCollection.Serialization.cs | 108 +- .../Models/OpenAIFileInfoCollection.cs | 13 +- .../src/Generated/Models/OpenAIFilePurpose.cs | 26 +- .../src/Generated/Models/OpenAIFileStatus.cs | 20 +- .../Models/OpenAIModelInfo.Serialization.cs | 122 +- .../src/Generated/Models/OpenAIModelInfo.cs | 24 +- ...OpenAIModelInfoCollection.Serialization.cs | 108 +- .../Models/OpenAIModelInfoCollection.cs | 13 +- .../Generated/Models/RunCollectionOrder.cs | 14 +- .../RunCreationOptions.Serialization.cs | 296 +- .../Generated/Models/RunCreationOptions.cs | 20 +- .../Models/RunError.Serialization.cs | 100 +- .dotnet/src/Generated/Models/RunError.cs | 16 +- .dotnet/src/Generated/Models/RunErrorCode.cs | 20 +- .../RunIncompleteDetails.Serialization.cs | 83 +- .../Generated/Models/RunIncompleteDetails.cs | 9 +- .../Generated/Models/RunIncompleteReason.cs | 17 +- .../RunModificationOptions.Serialization.cs | 98 +- .../Models/RunModificationOptions.cs | 8 +- .dotnet/src/Generated/Models/RunStatus.cs | 28 +- .../Generated/Models/RunStep.Serialization.cs | 338 +- .dotnet/src/Generated/Models/RunStep.cs | 67 +- ...StepCodeInterpreterOutput.Serialization.cs | 82 +- .../Models/RunStepCodeInterpreterOutput.cs | 12 +- .../Models/RunStepCollectionOrder.cs | 14 +- .../Models/RunStepDetails.Serialization.cs | 82 +- .../src/Generated/Models/RunStepDetails.cs | 12 +- .../Models/RunStepError.Serialization.cs | 100 +- .dotnet/src/Generated/Models/RunStepError.cs | 16 +- .../src/Generated/Models/RunStepErrorCode.cs | 17 +- .../RunStepFileSearchResult.Serialization.cs | 121 +- .../Models/RunStepFileSearchResult.cs | 21 +- .dotnet/src/Generated/Models/RunStepStatus.cs | 24 +- .../Models/RunStepTokenUsage.Serialization.cs | 111 +- .../src/Generated/Models/RunStepTokenUsage.cs | 17 +- .../Models/RunStepToolCall.Serialization.cs | 85 +- .../src/Generated/Models/RunStepToolCall.cs | 12 +- .dotnet/src/Generated/Models/RunStepType.cs | 17 +- ...dateCodeInterpreterOutput.Serialization.cs | 82 +- .../RunStepUpdateCodeInterpreterOutput.cs | 12 +- .../Models/RunTokenUsage.Serialization.cs | 111 +- .dotnet/src/Generated/Models/RunTokenUsage.cs | 17 +- .../RunTruncationStrategy.Serialization.cs | 101 +- .../Generated/Models/RunTruncationStrategy.cs | 12 +- .../SpeechGenerationOptions.Serialization.cs | 127 +- .../Models/SpeechGenerationOptions.cs | 9 +- ...taticFileChunkingStrategy.Serialization.cs | 110 +- .../Models/StaticFileChunkingStrategy.cs | 8 +- ...amingChatCompletionUpdate.Serialization.cs | 175 +- .../Models/StreamingChatCompletionUpdate.cs | 27 +- ...ingChatFunctionCallUpdate.Serialization.cs | 100 +- .../Models/StreamingChatFunctionCallUpdate.cs | 11 +- ...reamingChatToolCallUpdate.Serialization.cs | 122 +- .../Models/StreamingChatToolCallUpdate.cs | 15 +- .../Models/SystemChatMessage.Serialization.cs | 108 +- .../src/Generated/Models/SystemChatMessage.cs | 13 +- .../ThreadCreationOptions.Serialization.cs | 122 +- .../Generated/Models/ThreadCreationOptions.cs | 13 +- .../ThreadDeletionResult.Serialization.cs | 111 +- .../Generated/Models/ThreadDeletionResult.cs | 20 +- .../Models/ThreadMessage.Serialization.cs | 336 +- .dotnet/src/Generated/Models/ThreadMessage.cs | 48 +- ...ThreadModificationOptions.Serialization.cs | 112 +- .../Models/ThreadModificationOptions.cs | 9 +- .../Models/ThreadRun.Serialization.cs | 561 +- .dotnet/src/Generated/Models/ThreadRun.cs | 109 +- .../Models/ToolChatMessage.Serialization.cs | 100 +- .../src/Generated/Models/ToolChatMessage.cs | 15 +- .../Models/ToolConstraint.Serialization.cs | 133 +- .../src/Generated/Models/ToolConstraint.cs | 15 +- .../Models/ToolDefinition.Serialization.cs | 89 +- .../src/Generated/Models/ToolDefinition.cs | 11 +- .../Models/ToolOutput.Serialization.cs | 96 +- .dotnet/src/Generated/Models/ToolOutput.cs | 8 +- .../Models/ToolResources.Serialization.cs | 96 +- .dotnet/src/Generated/Models/ToolResources.cs | 6 +- .../TranscribedSegment.Serialization.cs | 228 +- .../Generated/Models/TranscribedSegment.cs | 48 +- .../Models/TranscribedWord.Serialization.cs | 137 +- .../src/Generated/Models/TranscribedWord.cs | 24 +- ...wnAssistantToolDefinition.Serialization.cs | 80 +- .../Models/UnknownAssistantToolDefinition.cs | 6 +- ...ningJobRequestIntegration.Serialization.cs | 104 +- ...wnCreateFineTuningJobRequestIntegration.cs | 6 +- ...nownFineTuningIntegration.Serialization.cs | 100 +- .../Models/UnknownFineTuningIntegration.cs | 6 +- ...ntentTextObjectAnnotation.Serialization.cs | 100 +- ...knownMessageContentTextObjectAnnotation.cs | 6 +- ...nknownMessageDeltaContent.Serialization.cs | 100 +- .../Models/UnknownMessageDeltaContent.cs | 6 +- ...eltaTextContentAnnotation.Serialization.cs | 100 +- ...nknownMessageDeltaTextContentAnnotation.cs | 6 +- ...wnRunStepDeltaStepDetails.Serialization.cs | 100 +- .../Models/UnknownRunStepDeltaStepDetails.cs | 6 +- ...eInterpreterOutputsObject.Serialization.cs | 100 +- ...sCodeObjectCodeInterpreterOutputsObject.cs | 6 +- ...allsObjectToolCallsObject.Serialization.cs | 100 +- ...epDetailsToolCallsObjectToolCallsObject.cs | 6 +- ...eInterpreterOutputsObject.Serialization.cs | 100 +- ...sCodeObjectCodeInterpreterOutputsObject.cs | 6 +- ...allsObjectToolCallsObject.Serialization.cs | 100 +- ...epDetailsToolCallsObjectToolCallsObject.cs | 6 +- ...nRunStepObjectStepDetails.Serialization.cs | 100 +- .../Models/UnknownRunStepObjectStepDetails.cs | 6 +- .../Models/UserChatMessage.Serialization.cs | 108 +- .../src/Generated/Models/UserChatMessage.cs | 13 +- .../Models/VectorStore.Serialization.cs | 244 +- .dotnet/src/Generated/Models/VectorStore.cs | 42 +- .../VectorStoreBatchFileJob.Serialization.cs | 148 +- .../Models/VectorStoreBatchFileJob.cs | 29 +- .../Models/VectorStoreBatchFileJobStatus.cs | 23 +- .../Models/VectorStoreCollectionOrder.cs | 14 +- ...VectorStoreCreationHelper.Serialization.cs | 139 +- .../Models/VectorStoreCreationHelper.cs | 10 +- ...ectorStoreCreationOptions.Serialization.cs | 162 +- .../Models/VectorStoreCreationOptions.cs | 12 +- ...VectorStoreDeletionResult.Serialization.cs | 111 +- .../Models/VectorStoreDeletionResult.cs | 20 +- ...ctorStoreExpirationAnchor.Serialization.cs | 11 +- ...ctorStoreExpirationPolicy.Serialization.cs | 98 +- .../Models/VectorStoreExpirationPolicy.cs | 1 + ...ectorStoreFileAssociation.Serialization.cs | 183 +- .../Models/VectorStoreFileAssociation.cs | 34 +- ...ctorStoreFileAssociationCollectionOrder.cs | 14 +- ...StoreFileAssociationError.Serialization.cs | 100 +- .../Models/VectorStoreFileAssociationError.cs | 16 +- .../VectorStoreFileAssociationErrorCode.cs | 20 +- ...toreFileAssociationStatus.Serialization.cs | 32 +- .../VectorStoreFileCounts.Serialization.cs | 133 +- .../Generated/Models/VectorStoreFileCounts.cs | 23 +- .../Models/VectorStoreFileStatusFilter.cs | 23 +- ...rStoreModificationOptions.Serialization.cs | 122 +- .../Models/VectorStoreModificationOptions.cs | 11 +- .../Models/VectorStoreStatus.Serialization.cs | 25 +- ...ightsAndBiasesIntegration.Serialization.cs | 110 +- .../Models/WeightsAndBiasesIntegration.cs | 12 +- .../Generated/ModerationClient.RestClient.cs | 66 + .dotnet/src/Generated/ModerationClient.cs | 27 +- .../src/Generated/OpenAIClient.RestClient.cs | 47 + .dotnet/src/Generated/OpenAIClient.cs | 104 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 928 +- .../Generated/VectorStoreClient.RestClient.cs | 334 + .dotnet/src/Generated/VectorStoreClient.cs | 375 +- .dotnet/tspCodeModel.json | 42049 ++++++++++++++++ .openapi3/openapi3-openai.yaml | 7 - .typespec/audio/models.tsp | 2 - .typespec/audio/operations.tsp | 2 +- .typespec/files/models.tsp | 1 - .typespec/images/models.tsp | 2 - .typespec/tspconfig.yaml | 7 +- package-lock.json | 111 +- package.json | 6 +- 826 files changed, 69275 insertions(+), 22973 deletions(-) create mode 100644 .dotnet/Configuration.json create mode 100644 .dotnet/src/Generated/AssistantClient.RestClient.cs create mode 100644 .dotnet/src/Generated/AudioClient.RestClient.cs create mode 100644 .dotnet/src/Generated/BatchClient.RestClient.cs create mode 100644 .dotnet/src/Generated/ChatClient.RestClient.cs create mode 100644 .dotnet/src/Generated/EmbeddingClient.RestClient.cs create mode 100644 .dotnet/src/Generated/FileClient.RestClient.cs create mode 100644 .dotnet/src/Generated/FineTuningClient.RestClient.cs create mode 100644 .dotnet/src/Generated/ImageClient.RestClient.cs create mode 100644 .dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs create mode 100644 .dotnet/src/Generated/Internal/PipelineRequestHeadersExtensions.cs create mode 100644 .dotnet/src/Generated/Internal/TypeFormatters.cs create mode 100644 .dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs create mode 100644 .dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs create mode 100644 .dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs create mode 100644 .dotnet/src/Generated/InternalUploadsClient.RestClient.cs create mode 100644 .dotnet/src/Generated/LegacyCompletionClient.RestClient.cs create mode 100644 .dotnet/src/Generated/ModelClient.RestClient.cs delete mode 100644 .dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs create mode 100644 .dotnet/src/Generated/ModerationClient.RestClient.cs create mode 100644 .dotnet/src/Generated/OpenAIClient.RestClient.cs create mode 100644 .dotnet/src/Generated/VectorStoreClient.RestClient.cs create mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json new file mode 100644 index 000000000..85fab5a06 --- /dev/null +++ b/.dotnet/Configuration.json @@ -0,0 +1,8 @@ +{ + "output-folder": ".", + "namespace": "OpenAI", + "library-name": "OpenAI", + "unreferenced-types-handling": "keepAll", + "use-model-reader-writer": true, + "disable-xml-docs": true +} diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 34416b968..a7a116662 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -31,7 +31,7 @@ public partial class AssistantClient private readonly InternalAssistantThreadClient _threadSubClient; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public AssistantClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -39,7 +39,7 @@ public partial class AssistantClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -50,7 +50,7 @@ public AssistantClient(string apiKey, OpenAIClientOptions options) : this(new Ap // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public AssistantClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -60,7 +60,7 @@ public AssistantClient(string apiKey, OpenAIClientOptions options) : this(new Ap // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -80,7 +80,7 @@ public AssistantClient(ApiKeyCredential credential, OpenAIClientOptions options) // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 800de4483..bc79485e5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -21,7 +21,7 @@ internal partial class InternalAssistantMessageClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public InternalAssistantMessageClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -31,7 +31,7 @@ internal partial class InternalAssistantMessageClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -48,7 +48,7 @@ public InternalAssistantMessageClient(ApiKeyCredential credential, OpenAIClientO // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index a1237b54f..920023da0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -29,7 +29,7 @@ internal partial class InternalAssistantRunClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public InternalAssistantRunClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -39,7 +39,7 @@ internal partial class InternalAssistantRunClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -56,7 +56,7 @@ public InternalAssistantRunClient(ApiKeyCredential credential, OpenAIClientOptio // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index 295a8a492..cf21b52f0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -19,7 +19,7 @@ internal partial class InternalAssistantThreadClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public InternalAssistantThreadClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -29,7 +29,7 @@ internal partial class InternalAssistantThreadClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -46,7 +46,7 @@ public InternalAssistantThreadClient(ApiKeyCredential credential, OpenAIClientOp // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Audio/AudioClient.cs b/.dotnet/src/Custom/Audio/AudioClient.cs index a0801cf24..73e6e91eb 100644 --- a/.dotnet/src/Custom/Audio/AudioClient.cs +++ b/.dotnet/src/Custom/Audio/AudioClient.cs @@ -25,7 +25,7 @@ public partial class AudioClient private readonly string _model; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -35,7 +35,7 @@ public partial class AudioClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -49,7 +49,7 @@ public partial class AudioClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -62,7 +62,7 @@ public partial class AudioClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -84,7 +84,7 @@ public AudioClient(string model, ApiKeyCredential credential, OpenAIClientOption // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index 72225c58f..a36e28474 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -25,7 +25,7 @@ namespace OpenAI.Batch; public partial class BatchClient { // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public BatchClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -33,7 +33,7 @@ public partial class BatchClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -44,7 +44,7 @@ public BatchClient(string apiKey, OpenAIClientOptions options) : this(new ApiKey // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public BatchClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -54,7 +54,7 @@ public BatchClient(string apiKey, OpenAIClientOptions options) : this(new ApiKey // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -71,7 +71,7 @@ public BatchClient(ApiKeyCredential credential, OpenAIClientOptions options) // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Chat/ChatClient.cs b/.dotnet/src/Custom/Chat/ChatClient.cs index 6d250eeea..45608fa68 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.cs @@ -24,7 +24,7 @@ public partial class ChatClient private readonly OpenTelemetrySource _telemetry; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -34,7 +34,7 @@ public partial class ChatClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -48,7 +48,7 @@ public partial class ChatClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -62,7 +62,7 @@ public partial class ChatClient // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Added telemetry support. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -75,7 +75,7 @@ public ChatClient(string model, ApiKeyCredential credential, OpenAIClientOptions options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); _telemetry = new OpenTelemetrySource(model, _endpoint); } @@ -86,7 +86,7 @@ public ChatClient(string model, ApiKeyCredential credential, OpenAIClientOptions // - Demoted the endpoint parameter to be a property in the options class. // - Added telemetry support. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. @@ -99,7 +99,7 @@ protected internal ChatClient(ClientPipeline pipeline, string model, OpenAIClien options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); _telemetry = new OpenTelemetrySource(model, _endpoint); } @@ -120,7 +120,7 @@ public virtual async Task> CompleteChatAsync(IEnume try { - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await CompleteChatAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); ChatCompletion chatCompletion = ChatCompletion.FromResponse(result.GetRawResponse()); @@ -150,7 +150,7 @@ public virtual ClientResult CompleteChat(IEnumerable CompleteChat options ??= new(); CreateChatCompletionOptions(messages, ref options, stream: true); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; async Task sendRequestAsync() => await CompleteChatAsync(content, cancellationToken.ToRequestOptions(streaming: true)).ConfigureAwait(false); @@ -225,7 +225,7 @@ public virtual CollectionResult CompleteChatStrea options ??= new(); CreateChatCompletionOptions(messages, ref options, stream: true); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult sendRequest() => CompleteChat(content, cancellationToken.ToRequestOptions(streaming: true)); return new InternalStreamingChatCompletionUpdateCollection(sendRequest, cancellationToken); } diff --git a/.dotnet/src/Custom/Chat/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Custom/Chat/ChatOutputTokenUsageDetails.cs index 1875a5a42..1ca28feac 100644 --- a/.dotnet/src/Custom/Chat/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Custom/Chat/ChatOutputTokenUsageDetails.cs @@ -9,7 +9,7 @@ public partial class ChatOutputTokenUsageDetails // CUSTOM: Renamed. /// /// The number of internally-consumed output tokens used for integrated reasoning with a supported model. - /// + /// /// /// /// This is currently only applicable to o1 models. @@ -18,6 +18,7 @@ public partial class ChatOutputTokenUsageDetails /// is part of the total and will /// thus always be less than or equal to this parent number. /// + /// /// [CodeGenMember("ReasoningTokens")] public int ReasoningTokenCount { get; } diff --git a/.dotnet/src/Custom/Chat/ChatTool.cs b/.dotnet/src/Custom/Chat/ChatTool.cs index 5811edc17..e0630f395 100644 --- a/.dotnet/src/Custom/Chat/ChatTool.cs +++ b/.dotnet/src/Custom/Chat/ChatTool.cs @@ -59,7 +59,7 @@ internal ChatTool(InternalFunctionDefinition function) /// /// /// Whether to enable strict schema adherence when generating the function call. If set to true, the - /// model will follow the exact schema defined in + /// model will follow the exact schema defined in /// /// /// Only a subset of the JSON schema specification is supported when this is set to true. Learn more diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs index d10c4a56c..821ccf0f4 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs @@ -22,7 +22,7 @@ public partial class EmbeddingClient private readonly string _model; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -32,7 +32,7 @@ public partial class EmbeddingClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -46,7 +46,7 @@ public partial class EmbeddingClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -59,7 +59,7 @@ public partial class EmbeddingClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -81,7 +81,7 @@ public EmbeddingClient(string model, ApiKeyCredential credential, OpenAIClientOp // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. diff --git a/.dotnet/src/Custom/Files/FileClient.cs b/.dotnet/src/Custom/Files/FileClient.cs index 473305f4a..eb892d563 100644 --- a/.dotnet/src/Custom/Files/FileClient.cs +++ b/.dotnet/src/Custom/Files/FileClient.cs @@ -28,7 +28,7 @@ public partial class FileClient private InternalUploadsClient _internalUploadsClient; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -38,7 +38,7 @@ public partial class FileClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -51,7 +51,7 @@ public FileClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyC // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public FileClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -61,7 +61,7 @@ public FileClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyC // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -79,7 +79,7 @@ public FileClient(ApiKeyCredential credential, OpenAIClientOptions options) // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs b/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs index 0e9b3915b..624b18065 100644 --- a/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs +++ b/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs @@ -11,7 +11,7 @@ internal partial class InternalUploadsClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. internal InternalUploadsClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -21,7 +21,7 @@ internal partial class InternalUploadsClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -38,7 +38,7 @@ internal InternalUploadsClient(ApiKeyCredential credential, OpenAIClientOptions // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index d324d185e..3a8d41448 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -28,7 +28,7 @@ namespace OpenAI.FineTuning; public partial class FineTuningClient { // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public FineTuningClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -36,7 +36,7 @@ public partial class FineTuningClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -47,7 +47,7 @@ public FineTuningClient(string apiKey, OpenAIClientOptions options) : this(new A // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public FineTuningClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -57,7 +57,7 @@ public FineTuningClient(string apiKey, OpenAIClientOptions options) : this(new A // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -74,7 +74,7 @@ public FineTuningClient(ApiKeyCredential credential, OpenAIClientOptions options // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Images/ImageClient.cs b/.dotnet/src/Custom/Images/ImageClient.cs index 29fb381b9..4fc6c549d 100644 --- a/.dotnet/src/Custom/Images/ImageClient.cs +++ b/.dotnet/src/Custom/Images/ImageClient.cs @@ -26,7 +26,7 @@ public partial class ImageClient private readonly string _model; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -36,7 +36,7 @@ public partial class ImageClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -50,7 +50,7 @@ public partial class ImageClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -63,7 +63,7 @@ public partial class ImageClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -85,7 +85,7 @@ public ImageClient(string model, ApiKeyCredential credential, OpenAIClientOption // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. diff --git a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs index b75677d66..5e6f1f8d9 100644 --- a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs +++ b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs @@ -16,7 +16,7 @@ internal partial class LegacyCompletionClient private readonly string _model; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -26,7 +26,7 @@ internal partial class LegacyCompletionClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -40,7 +40,7 @@ internal partial class LegacyCompletionClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -53,7 +53,7 @@ internal partial class LegacyCompletionClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -75,7 +75,7 @@ public LegacyCompletionClient(string model, ApiKeyCredential credential, OpenAIC // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. diff --git a/.dotnet/src/Custom/Models/ModelClient.cs b/.dotnet/src/Custom/Models/ModelClient.cs index 9b050a087..7a979778b 100644 --- a/.dotnet/src/Custom/Models/ModelClient.cs +++ b/.dotnet/src/Custom/Models/ModelClient.cs @@ -23,7 +23,7 @@ namespace OpenAI.Models; public partial class ModelClient { // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public ModelClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -31,7 +31,7 @@ public partial class ModelClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -42,7 +42,7 @@ public ModelClient(string apiKey, OpenAIClientOptions options) : this(new ApiKey // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public ModelClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -52,7 +52,7 @@ public ModelClient(string apiKey, OpenAIClientOptions options) : this(new ApiKey // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -69,7 +69,7 @@ public ModelClient(ApiKeyCredential credential, OpenAIClientOptions options) // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/Moderations/ModerationClient.cs b/.dotnet/src/Custom/Moderations/ModerationClient.cs index 38d5ba6c8..e0badf408 100644 --- a/.dotnet/src/Custom/Moderations/ModerationClient.cs +++ b/.dotnet/src/Custom/Moderations/ModerationClient.cs @@ -22,7 +22,7 @@ public partial class ModerationClient private readonly string _model; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -32,7 +32,7 @@ public partial class ModerationClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -46,7 +46,7 @@ public partial class ModerationClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// or is null. @@ -59,7 +59,7 @@ public partial class ModerationClient // - Added `model` parameter. // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. /// The options to configure the client. @@ -81,7 +81,7 @@ public ModerationClient(string model, ApiKeyCredential credential, OpenAIClientO // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The options to configure the client. diff --git a/.dotnet/src/Custom/OpenAIClient.cs b/.dotnet/src/Custom/OpenAIClient.cs index fe2a18ff9..6e2b80916 100644 --- a/.dotnet/src/Custom/OpenAIClient.cs +++ b/.dotnet/src/Custom/OpenAIClient.cs @@ -75,7 +75,7 @@ private static class KnownHeaderNames private readonly OpenAIClientOptions _options; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public OpenAIClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -83,7 +83,7 @@ private static class KnownHeaderNames } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -94,7 +94,7 @@ public OpenAIClient(string apiKey, OpenAIClientOptions options) : this(new ApiKe // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public OpenAIClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -104,7 +104,7 @@ public OpenAIClient(string apiKey, OpenAIClientOptions options) : this(new ApiKe // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -119,7 +119,7 @@ public OpenAIClient(ApiKeyCredential credential, OpenAIClientOptions options) } // CUSTOM: Added protected internal constructor that takes a ClientPipeline. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index 4b01f3aa7..7778c84d1 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -44,7 +44,7 @@ namespace OpenAI.VectorStores; public partial class VectorStoreClient { // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public VectorStoreClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -52,7 +52,7 @@ public partial class VectorStoreClient } // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -63,7 +63,7 @@ public VectorStoreClient(string apiKey, OpenAIClientOptions options) : this(new // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public VectorStoreClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -73,7 +73,7 @@ public VectorStoreClient(string apiKey, OpenAIClientOptions options) : this(new // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -90,7 +90,7 @@ public VectorStoreClient(ApiKeyCredential credential, OpenAIClientOptions option // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Generated/AssistantClient.RestClient.cs b/.dotnet/src/Generated/AssistantClient.RestClient.cs new file mode 100644 index 000000000..ad8a4aec9 --- /dev/null +++ b/.dotnet/src/Generated/AssistantClient.RestClient.cs @@ -0,0 +1,147 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Assistants +{ + public partial class AssistantClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.AssistantClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.AssistantClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.AssistantClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateAssistantRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assistants", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListAssistantsRequest(int? limit, string order, string after, string before, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assistants", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetAssistantRequest(string assistant_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assistants/", false); + uri.AppendPath(assistant_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateModifyAssistantRequest(string assistant_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assistants/", false); + uri.AppendPath(assistant_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteAssistantRequest(string assistant_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assistants/", false); + uri.AppendPath(assistant_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index 14c304e84..73d04ec25 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -6,123 +6,111 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. public partial class AssistantClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected AssistantClient() { } - internal PipelineMessage CreateCreateAssistantRequest(BinaryContent content, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult CreateAssistant(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateAssistantRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateAssistantAsync(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateAssistantRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListAssistants(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListAssistants(int? limit, AssistantCollectionOrder? order, string after, string before) + { + ClientResult result = ListAssistants(limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListAssistantsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListAssistantsAsync(int? limit, AssistantCollectionOrder? order, string after, string before) + { + ClientResult result = await ListAssistantsAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListAssistantsResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult GetAssistant(string assistant_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/assistants", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + + using PipelineMessage message = CreateGetAssistantRequest(assistant_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetAssistantsRequest(int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task GetAssistantAsync(string assistant_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/assistants", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + + using PipelineMessage message = CreateGetAssistantRequest(assistant_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetAssistantRequest(string assistantId, RequestOptions options) + public virtual ClientResult ModifyAssistant(string assistant_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyAssistantRequest(assistant_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateModifyAssistantRequest(string assistantId, BinaryContent content, RequestOptions options) + public virtual async Task ModifyAssistantAsync(string assistant_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyAssistantRequest(assistant_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteAssistantRequest(string assistantId, RequestOptions options) + public virtual ClientResult DeleteAssistant(string assistant_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + + using PipelineMessage message = CreateDeleteAssistantRequest(assistant_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task DeleteAssistantAsync(string assistant_id, RequestOptions options) + { + Argument.AssertNotNull(assistant_id, nameof(assistant_id)); + + using PipelineMessage message = CreateDeleteAssistantRequest(assistant_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } } } diff --git a/.dotnet/src/Generated/AudioClient.RestClient.cs b/.dotnet/src/Generated/AudioClient.RestClient.cs new file mode 100644 index 000000000..d04908c68 --- /dev/null +++ b/.dotnet/src/Generated/AudioClient.RestClient.cs @@ -0,0 +1,100 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Audio +{ + public partial class AudioClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.AudioClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.AudioClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.AudioClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateSpeechRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/audio/speech", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/octet-stream"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateTranscriptionRequest(BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/audio/transcriptions", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateTranslationRequest(BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/audio/translations", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/AudioClient.cs b/.dotnet/src/Generated/AudioClient.cs index 8b5a4f1db..1815a1756 100644 --- a/.dotnet/src/Generated/AudioClient.cs +++ b/.dotnet/src/Generated/AudioClient.cs @@ -5,77 +5,20 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Audio { - // Data plane generated sub-client. public partial class AudioClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected AudioClient() { } - internal PipelineMessage CreateCreateSpeechRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/audio/speech", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/octet-stream"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateTranscriptionRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/audio/transcriptions", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateTranslationRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/audio/translations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/BatchClient.RestClient.cs b/.dotnet/src/Generated/BatchClient.RestClient.cs new file mode 100644 index 000000000..943199e65 --- /dev/null +++ b/.dotnet/src/Generated/BatchClient.RestClient.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Batch +{ + public partial class BatchClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.BatchClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.BatchClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.BatchClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateBatchRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/batches", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListBatchesRequest(string after, int? limit, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/batches", false); + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateRetrieveBatchRequest(string batch_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/batches/", false); + uri.AppendPath(batch_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelBatchRequest(string batch_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/batches/", false); + uri.AppendPath(batch_id, true); + uri.AppendPath("/cancel", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index 3ccd2f901..baf053b4b 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -7,98 +7,95 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Batch { - // Data plane generated sub-client. public partial class BatchClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected BatchClient() { } - internal PipelineMessage CreateCreateBatchRequest(BinaryContent content, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult CreateBatch(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateBatchRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateBatchAsync(BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateBatchRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetBatchesRequest(string after, int? limit, RequestOptions options) + public virtual ClientResult CreateBatch(string input_file_id, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completion_window, IDictionary metadata = default) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(input_file_id, nameof(input_file_id)); + + InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); + ClientResult result = CreateBatch(spreadModel, null); + return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); + } + + public virtual async Task> CreateBatchAsync(string input_file_id, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completion_window, IDictionary metadata = default) + { + Argument.AssertNotNull(input_file_id, nameof(input_file_id)); + + InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); + ClientResult result = await CreateBatchAsync(spreadModel, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); } - internal PipelineMessage CreateRetrieveBatchRequest(string batchId, RequestOptions options) + public virtual ClientResult ListBatches(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches/", false); - uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListBatchesRequest(after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions options) + public virtual async Task ListBatchesAsync(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListBatchesRequest(after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual ClientResult ListBatches(string after, int? limit) + { + ClientResult result = ListBatches(after, limit, null); + return ClientResult.FromValue((InternalListBatchesResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListBatchesAsync(string after, int? limit) + { + ClientResult result = await ListBatchesAsync(after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListBatchesResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult CancelBatch(string batch_id, RequestOptions options) + { + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + using PipelineMessage message = CreateCancelBatchRequest(batch_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CancelBatchAsync(string batch_id, RequestOptions options) + { + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + using PipelineMessage message = CreateCancelBatchRequest(batch_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } } } diff --git a/.dotnet/src/Generated/ChatClient.RestClient.cs b/.dotnet/src/Generated/ChatClient.RestClient.cs new file mode 100644 index 000000000..aa5a49818 --- /dev/null +++ b/.dotnet/src/Generated/ChatClient.RestClient.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Chat +{ + public partial class ChatClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.ChatClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.ChatClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ChatClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/chat/completions", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/ChatClient.cs b/.dotnet/src/Generated/ChatClient.cs index 6db94d5ea..1812c542a 100644 --- a/.dotnet/src/Generated/ChatClient.cs +++ b/.dotnet/src/Generated/ChatClient.cs @@ -5,43 +5,20 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Chat { - // Data plane generated sub-client. public partial class ChatClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected ChatClient() { } - internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/chat/completions", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/EmbeddingClient.RestClient.cs b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs new file mode 100644 index 000000000..6a5ff202a --- /dev/null +++ b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Embeddings +{ + public partial class EmbeddingClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.EmbeddingClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.EmbeddingClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.EmbeddingClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateEmbeddingRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/embeddings", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/EmbeddingClient.cs b/.dotnet/src/Generated/EmbeddingClient.cs index e93cade41..2e81fb221 100644 --- a/.dotnet/src/Generated/EmbeddingClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.cs @@ -5,43 +5,20 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Embeddings { - // Data plane generated sub-client. public partial class EmbeddingClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected EmbeddingClient() { } - internal PipelineMessage CreateCreateEmbeddingRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/embeddings", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/FileClient.RestClient.cs b/.dotnet/src/Generated/FileClient.RestClient.cs new file mode 100644 index 000000000..1c8b50180 --- /dev/null +++ b/.dotnet/src/Generated/FileClient.RestClient.cs @@ -0,0 +1,134 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Files +{ + public partial class FileClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.FileClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.FileClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.FileClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/files", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListFilesRequest(string purpose, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/files", false); + if (purpose != null) + { + uri.AppendQuery("purpose", purpose, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateRetrieveFileRequest(string file_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/files/", false); + uri.AppendPath(file_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteFileRequest(string file_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/files/", false); + uri.AppendPath(file_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDownloadFileRequest(string file_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/files/", false); + uri.AppendPath(file_id, true); + uri.AppendPath("/content", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/FileClient.cs b/.dotnet/src/Generated/FileClient.cs index 131f6ba5d..307a3ab7b 100644 --- a/.dotnet/src/Generated/FileClient.cs +++ b/.dotnet/src/Generated/FileClient.cs @@ -9,107 +9,41 @@ namespace OpenAI.Files { - // Data plane generated sub-client. public partial class FileClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected FileClient() { } - internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } + public ClientPipeline Pipeline { get; } - internal PipelineMessage CreateGetFilesRequest(string purpose, RequestOptions options) + public virtual ClientResult ListFiles(string purpose, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files", false); - if (purpose != null) - { - uri.AppendQuery("purpose", purpose, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListFilesRequest(purpose, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateRetrieveFileRequest(string fileId, RequestOptions options) + public virtual async Task ListFilesAsync(string purpose, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListFilesRequest(purpose, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteFileRequest(string fileId, RequestOptions options) + public virtual ClientResult ListFiles(string purpose) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListFiles(purpose, null); + return ClientResult.FromValue((OpenAIFileInfoCollection)result, result.GetRawResponse()); } - internal PipelineMessage CreateDownloadFileRequest(string fileId, RequestOptions options) + public virtual async Task> ListFilesAsync(string purpose) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendPath("/content", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await ListFilesAsync(purpose, null).ConfigureAwait(false); + return ClientResult.FromValue((OpenAIFileInfoCollection)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/FineTuningClient.RestClient.cs b/.dotnet/src/Generated/FineTuningClient.RestClient.cs new file mode 100644 index 000000000..af37ceff2 --- /dev/null +++ b/.dotnet/src/Generated/FineTuningClient.RestClient.cs @@ -0,0 +1,172 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.FineTuning +{ + public partial class FineTuningClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.FineTuningClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.FineTuningClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.FineTuningClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs", false); + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fine_tuning_job_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs/", false); + uri.AppendPath(fine_tuning_job_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelFineTuningJobRequest(string fine_tuning_job_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs/", false); + uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath("/cancel", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListFineTuningJobCheckpointsRequest(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs/", false); + uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath("/checkpoints", false); + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListFineTuningEventsRequest(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/fine_tuning/jobs/", false); + uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath("/events", false); + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index c4446699d..e8dff71b5 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -6,148 +6,109 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.FineTuning { - // Data plane generated sub-client. public partial class FineTuningClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected FineTuningClient() { } - internal PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) + public virtual async Task ListPaginatedFineTuningJobsAsync(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJobId, RequestOptions options) + public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListPaginatedFineTuningJobs(after, limit, null); + return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId, RequestOptions options) + public virtual async Task> ListPaginatedFineTuningJobsAsync(string after, int? limit) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await ListPaginatedFineTuningJobsAsync(after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) + public virtual ClientResult ListFineTuningJobCheckpoints(string fine_tuning_job_id, string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/checkpoints", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fine_tuning_job_id, after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) + public virtual async Task ListFineTuningJobCheckpointsAsync(string fine_tuning_job_id, string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/events", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fine_tuning_job_id, after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual ClientResult ListFineTuningJobCheckpoints(string fine_tuning_job_id, string after, int? limit) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + ClientResult result = ListFineTuningJobCheckpoints(fine_tuning_job_id, after, limit, null); + return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListFineTuningJobCheckpointsAsync(string fine_tuning_job_id, string after, int? limit) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + ClientResult result = await ListFineTuningJobCheckpointsAsync(fine_tuning_job_id, after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult ListFineTuningEvents(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + using PipelineMessage message = CreateListFineTuningEventsRequest(fine_tuning_job_id, after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListFineTuningEventsAsync(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + using PipelineMessage message = CreateListFineTuningEventsRequest(fine_tuning_job_id, after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListFineTuningEvents(string fine_tuning_job_id, string after, int? limit) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + ClientResult result = ListFineTuningEvents(fine_tuning_job_id, after, limit, null); + return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListFineTuningEventsAsync(string fine_tuning_job_id, string after, int? limit) + { + Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + + ClientResult result = await ListFineTuningEventsAsync(fine_tuning_job_id, after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/ImageClient.RestClient.cs b/.dotnet/src/Generated/ImageClient.RestClient.cs new file mode 100644 index 000000000..8343f15bb --- /dev/null +++ b/.dotnet/src/Generated/ImageClient.RestClient.cs @@ -0,0 +1,100 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Images +{ + public partial class ImageClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.ImageClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.ImageClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ImageClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateImageRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/images/generations", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateImageEditRequest(BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/images/edits", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateImageVariationRequest(BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/images/variations", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/ImageClient.cs b/.dotnet/src/Generated/ImageClient.cs index 6e0558f0a..baaaa6c0e 100644 --- a/.dotnet/src/Generated/ImageClient.cs +++ b/.dotnet/src/Generated/ImageClient.cs @@ -5,77 +5,20 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Images { - // Data plane generated sub-client. public partial class ImageClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected ImageClient() { } - internal PipelineMessage CreateCreateImageRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/generations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateImageEditRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/edits", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateImageVariationRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/variations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/Internal/Argument.cs b/.dotnet/src/Generated/Internal/Argument.cs index 29cb5ac18..6e8945dda 100644 --- a/.dotnet/src/Generated/Internal/Argument.cs +++ b/.dotnet/src/Generated/Internal/Argument.cs @@ -8,7 +8,7 @@ namespace OpenAI { - internal static class Argument + internal static partial class Argument { public static void AssertNotNull(T value, string name) { @@ -19,7 +19,7 @@ public static void AssertNotNull(T value, string name) } public static void AssertNotNull(T? value, string name) - where T : struct + where T : struct { if (!value.HasValue) { @@ -73,7 +73,7 @@ public static void AssertNotNullOrWhiteSpace(string value, string name) } public static void AssertNotDefault(ref T value, string name) - where T : struct, IEquatable + where T : struct, IEquatable { if (value.Equals(default)) { @@ -82,7 +82,7 @@ public static void AssertNotDefault(ref T value, string name) } public static void AssertInRange(T value, T minimum, T maximum, string name) - where T : notnull, IComparable + where T : notnull, IComparable { if (minimum.CompareTo(value) > 0) { @@ -103,7 +103,7 @@ public static void AssertEnumDefined(Type enumType, object value, string name) } public static T CheckNotNull(T value, string name) - where T : class + where T : class { AssertNotNull(value, name); return value; diff --git a/.dotnet/src/Generated/Internal/BinaryContentHelper.cs b/.dotnet/src/Generated/Internal/BinaryContentHelper.cs index 52bcdbdf3..a3f8eae20 100644 --- a/.dotnet/src/Generated/Internal/BinaryContentHelper.cs +++ b/.dotnet/src/Generated/Internal/BinaryContentHelper.cs @@ -9,10 +9,10 @@ namespace OpenAI { - internal static class BinaryContentHelper + internal static partial class BinaryContentHelper { public static BinaryContent FromEnumerable(IEnumerable enumerable) - where T : notnull + where T : notnull { Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartArray(); @@ -38,7 +38,7 @@ public static BinaryContent FromEnumerable(IEnumerable enumerable) else { #if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item); + content.JsonWriter.WriteRawValue(item); #else using (JsonDocument document = JsonDocument.Parse(item)) { @@ -53,11 +53,12 @@ public static BinaryContent FromEnumerable(IEnumerable enumerable) } public static BinaryContent FromEnumerable(ReadOnlySpan span) - where T : notnull + where T : notnull { Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartArray(); - for (int i = 0; i < span.Length; i++) + int i = 0; + for (; i < span.Length; i++) { content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); } @@ -67,7 +68,7 @@ public static BinaryContent FromEnumerable(ReadOnlySpan span) } public static BinaryContent FromDictionary(IDictionary dictionary) - where TValue : notnull + where TValue : notnull { Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); content.JsonWriter.WriteStartObject(); @@ -95,7 +96,7 @@ public static BinaryContent FromDictionary(IDictionary dicti else { #if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item.Value); + content.JsonWriter.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -120,7 +121,7 @@ public static BinaryContent FromObject(BinaryData value) { Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); #if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(value); + content.JsonWriter.WriteRawValue(value); #else using (JsonDocument document = JsonDocument.Parse(value)) { diff --git a/.dotnet/src/Generated/Internal/ChangeTrackingDictionary.cs b/.dotnet/src/Generated/Internal/ChangeTrackingDictionary.cs index 2eb05d04a..5502b8660 100644 --- a/.dotnet/src/Generated/Internal/ChangeTrackingDictionary.cs +++ b/.dotnet/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -8,7 +8,8 @@ namespace OpenAI { - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary + where TKey : notnull { private IDictionary _innerDictionary; diff --git a/.dotnet/src/Generated/Internal/ChangeTrackingList.cs b/.dotnet/src/Generated/Internal/ChangeTrackingList.cs index c64afc504..641f91d99 100644 --- a/.dotnet/src/Generated/Internal/ChangeTrackingList.cs +++ b/.dotnet/src/Generated/Internal/ChangeTrackingList.cs @@ -9,7 +9,7 @@ namespace OpenAI { - internal class ChangeTrackingList : IList, IReadOnlyList + internal partial class ChangeTrackingList : IList, IReadOnlyList { private IList _innerList; diff --git a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs index c51dd675b..e40808d3a 100644 --- a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs +++ b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs @@ -10,6 +10,32 @@ namespace OpenAI { internal static partial class ClientPipelineExtensions { + public static async ValueTask ProcessMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + { + await pipeline.SendAsync(message).ConfigureAwait(false); + + if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) + { + throw await ClientResultException.CreateAsync(message.Response).ConfigureAwait(false); + } + + PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); + return response; + } + + public static PipelineResponse ProcessMessage(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + { + pipeline.Send(message); + + if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) + { + throw new ClientResultException(message.Response); + } + + PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); + return response; + } + public static async ValueTask> ProcessHeadAsBoolMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) { PipelineResponse response = await pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); diff --git a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs index 9406854da..eca3c63c1 100644 --- a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs +++ b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs @@ -9,7 +9,7 @@ namespace OpenAI { - internal class ClientUriBuilder + internal partial class ClientUriBuilder { private UriBuilder _uriBuilder; private StringBuilder _pathBuilder; @@ -19,11 +19,11 @@ public ClientUriBuilder() { } - private UriBuilder UriBuilder => _uriBuilder ??= new UriBuilder(); + private UriBuilder UriBuilder => _uriBuilder ??= new UriBuilder(); - private StringBuilder PathBuilder => _pathBuilder ??= new StringBuilder(UriBuilder.Path); + private StringBuilder PathBuilder => _pathBuilder ??= new StringBuilder(UriBuilder.Path); - private StringBuilder QueryBuilder => _queryBuilder ??= new StringBuilder(UriBuilder.Query); + private StringBuilder QueryBuilder => _queryBuilder ??= new StringBuilder(UriBuilder.Query); public void Reset(Uri uri) { @@ -34,156 +34,84 @@ public void Reset(Uri uri) public void AppendPath(string value, bool escape) { - Argument.AssertNotNullOrWhiteSpace(value, nameof(value)); - if (escape) { value = Uri.EscapeDataString(value); } - if (PathBuilder.Length > 0 && PathBuilder[PathBuilder.Length - 1] == '/' && value[0] == '/') { PathBuilder.Remove(PathBuilder.Length - 1, 1); } - PathBuilder.Append(value); UriBuilder.Path = PathBuilder.ToString(); } - public void AppendPath(bool value, bool escape = false) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(bool value, bool escape = false) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(float value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(float value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(double value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(double value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(int value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(int value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(byte[] value, string format, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendPath(byte[] value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - public void AppendPath(IEnumerable value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(IEnumerable value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(DateTimeOffset value, string format, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendPath(DateTimeOffset value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - public void AppendPath(TimeSpan value, string format, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendPath(TimeSpan value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - public void AppendPath(Guid value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(Guid value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(long value, bool escape = true) - { - AppendPath(ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendPath(long value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); public void AppendQuery(string name, string value, bool escape) { - Argument.AssertNotNullOrWhiteSpace(name, nameof(name)); - Argument.AssertNotNullOrWhiteSpace(value, nameof(value)); - if (QueryBuilder.Length > 0) { QueryBuilder.Append('&'); } - if (escape) { value = Uri.EscapeDataString(value); } - QueryBuilder.Append(name); QueryBuilder.Append('='); QueryBuilder.Append(value); } - public void AppendQuery(string name, bool value, bool escape = false) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, bool value, bool escape = false) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, float value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, float value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, DateTimeOffset value, string format, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendQuery(string name, DateTimeOffset value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - public void AppendQuery(string name, TimeSpan value, string format, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendQuery(string name, TimeSpan value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - public void AppendQuery(string name, double value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, double value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, decimal value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, decimal value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, int value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, int value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, long value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, long value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, TimeSpan value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, TimeSpan value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQuery(string name, byte[] value, string format, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value, format), escape); - } + public void AppendQuery(string name, byte[] value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - public void AppendQuery(string name, Guid value, bool escape = true) - { - AppendQuery(name, ModelSerializationExtensions.TypeFormatters.ConvertToString(value), escape); - } + public void AppendQuery(string name, Guid value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, bool escape = true) { - var stringValues = value.Select(v => ModelSerializationExtensions.TypeFormatters.ConvertToString(v)); + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); AppendQuery(name, string.Join(delimiter, stringValues), escape); } public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, string format, bool escape = true) { - var stringValues = value.Select(v => ModelSerializationExtensions.TypeFormatters.ConvertToString(v, format)); + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); AppendQuery(name, string.Join(delimiter, stringValues), escape); } @@ -193,12 +121,10 @@ public Uri ToUri() { UriBuilder.Path = _pathBuilder.ToString(); } - if (_queryBuilder != null) { UriBuilder.Query = _queryBuilder.ToString(); } - return UriBuilder.Uri; } } diff --git a/.dotnet/src/Generated/Internal/ErrorResult.cs b/.dotnet/src/Generated/Internal/ErrorResult.cs index 42938626f..745190d34 100644 --- a/.dotnet/src/Generated/Internal/ErrorResult.cs +++ b/.dotnet/src/Generated/Internal/ErrorResult.cs @@ -7,7 +7,7 @@ namespace OpenAI { - internal class ErrorResult : ClientResult + internal partial class ErrorResult : ClientResult { private readonly PipelineResponse _response; private readonly ClientResultException _exception; diff --git a/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs b/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs index d1334d37b..bbaae9692 100644 --- a/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs @@ -8,14 +8,12 @@ using System.Diagnostics; using System.Globalization; using System.Text.Json; -using System.Xml; namespace OpenAI { - internal static class ModelSerializationExtensions + internal static partial class ModelSerializationExtensions { internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); - internal static readonly BinaryData SentinelValue = BinaryData.FromObjectAsJson("__EMPTY__"); public static object GetObject(this JsonElement element) { @@ -41,14 +39,14 @@ public static object GetObject(this JsonElement element) case JsonValueKind.Null: return null; case JsonValueKind.Object: - var dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var jsonProperty in element.EnumerateObject()) { dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); } return dictionary; case JsonValueKind.Array: - var list = new List(); + List list = new List(); foreach (var item in element.EnumerateArray()) { list.Add(item.GetObject()); @@ -86,7 +84,7 @@ public static char GetChar(this JsonElement element) { if (element.ValueKind == JsonValueKind.String) { - var text = element.GetString(); + string text = element.GetString(); if (text == null || text.Length != 1) { throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); @@ -100,14 +98,14 @@ public static char GetChar(this JsonElement element) } [Conditional("DEBUG")] - public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + public static void ThrowNonNullablePropertyIsNull(this JsonProperty @property) { - throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + throw new JsonException($"A property '{@property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); } public static string GetRequiredString(this JsonElement element) { - var value = element.GetString(); + string value = element.GetString(); if (value == null) { throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); @@ -249,151 +247,5 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, Mo { writer.WriteObjectValue(value, options); } - - internal static bool IsSentinelValue(BinaryData value) - { - ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; - ReadOnlySpan valueSpan = value.ToMemory().Span; - return sentinelSpan.SequenceEqual(valueSpan); - } - - internal static class TypeFormatters - { - private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - public const string DefaultNumberFormat = "G"; - - public static string ToString(bool value) => value ? "true" : "false"; - - public static string ToString(DateTime value, string format) => value.Kind switch - { - DateTimeKind.Utc => ToString((DateTimeOffset)value, format), - _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Generated clients require it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") - }; - - public static string ToString(DateTimeOffset value, string format) => format switch - { - "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), - "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), - "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "R" => value.ToString("r", CultureInfo.InvariantCulture), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(TimeSpan value, string format) => format switch - { - "P" => XmlConvert.ToString(value), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(byte[] value, string format) => format switch - { - "U" => ToBase64UrlString(value), - "D" => Convert.ToBase64String(value), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - - public static string ToBase64UrlString(byte[] value) - { - int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; - int size = checked(numWholeOrPartialInputBlocks * 4); - char[] output = new char[size]; - - int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); - - int i = 0; - for (; i < numBase64Chars; i++) - { - char ch = output[i]; - if (ch == '+') - { - output[i] = '-'; - } - else - { - if (ch == '/') - { - output[i] = '_'; - } - else - { - if (ch == '=') - { - break; - } - } - } - } - - return new string(output, 0, i); - } - - public static byte[] FromBase64UrlString(string value) - { - int paddingCharsToAdd = (value.Length % 4) switch - { - 0 => 0, - 2 => 2, - 3 => 1, - _ => throw new InvalidOperationException("Malformed input") - }; - char[] output = new char[(value.Length + paddingCharsToAdd)]; - int i = 0; - for (; i < value.Length; i++) - { - char ch = value[i]; - if (ch == '-') - { - output[i] = '+'; - } - else - { - if (ch == '_') - { - output[i] = '/'; - } - else - { - output[i] = ch; - } - } - } - - for (; i < output.Length; i++) - { - output[i] = '='; - } - - return Convert.FromBase64CharArray(output, 0, output.Length); - } - - public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch - { - "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), - _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) - }; - - public static TimeSpan ParseTimeSpan(string value, string format) => format switch - { - "P" => XmlConvert.ToTimeSpan(value), - _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) - }; - - public static string ConvertToString(object value, string format = null) => value switch - { - null => "null", - string s => s, - bool b => ToString(b), - int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), - byte[] b0 when format != null => ToString(b0, format), - IEnumerable s0 => string.Join(",", s0), - DateTimeOffset dateTime when format != null => ToString(dateTime, format), - TimeSpan timeSpan when format != null => ToString(timeSpan, format), - TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), - Guid guid => guid.ToString(), - BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), - _ => value.ToString() - }; - } } } diff --git a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs new file mode 100644 index 000000000..945fc05aa --- /dev/null +++ b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs @@ -0,0 +1,195 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.Globalization; +using System.IO; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenAI +{ + internal partial class MultiPartFormDataBinaryContent : BinaryContent + { + private readonly MultipartFormDataContent _multipartContent; + private static readonly Random _random = new Random(); + private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); + + public MultiPartFormDataBinaryContent() + { + _multipartContent = new MultipartFormDataContent(CreateBoundary()); + } + + public string ContentType + { + get + { + return _multipartContent.Headers.ContentType.ToString(); + } + } + + internal HttpContent HttpContent => _multipartContent; + + private static string CreateBoundary() + { + Span chars = new char[70]; + byte[] random = new byte[70]; + _random.NextBytes(random); + int mask = 255 >> 2; + int i = 0; + for (; i < 70; i++) + { + chars[i] = _boundaryValues[random[i] & mask]; + } + return chars.ToString(); + } + + public void Add(string content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StringContent(content), name, filename, contentType); + } + + public void Add(int content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(long content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(float content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(double content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(decimal content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(bool content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content ? "true" : "false"; + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(Stream content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StreamContent(content), name, filename, contentType); + } + + public void Add(byte[] content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content), name, filename, contentType); + } + + public void Add(BinaryData content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); + } + + private void Add(HttpContent content, string name, string filename, string contentType) + { + if (contentType != null) + { + Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); + AddContentTypeHeader(content, contentType); + } + if (filename != null) + { + Argument.AssertNotNullOrEmpty(filename, nameof(filename)); + _multipartContent.Add(content, name, filename); + } + else + { + _multipartContent.Add(content, name); + } + } + + public static void AddContentTypeHeader(HttpContent content, string contentType) + { + MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); + content.Headers.ContentType = header; + } + + public override bool TryComputeLength(out long length) + { + if (_multipartContent.Headers.ContentLength is long contentLength) + { + length = contentLength; + return true; + } + length = 0; + return false; + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + _multipartContent.CopyTo(stream, default, cancellationToken); +#else + _multipartContent.CopyToAsync(stream).GetAwaiter().GetResult(); +#endif + } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); +#else + await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); +#endif + } + + public override void Dispose() + { + _multipartContent.Dispose(); + } + } +} diff --git a/.dotnet/src/Generated/Internal/Optional.cs b/.dotnet/src/Generated/Internal/Optional.cs index 7b3fe4806..e4ae0dc30 100644 --- a/.dotnet/src/Generated/Internal/Optional.cs +++ b/.dotnet/src/Generated/Internal/Optional.cs @@ -7,7 +7,7 @@ namespace OpenAI { - internal static class Optional + internal static partial class Optional { public static bool IsCollectionDefined(IEnumerable collection) { @@ -25,7 +25,7 @@ public static bool IsCollectionDefined(IReadOnlyDictionary(T? value) - where T : struct + where T : struct { return value.HasValue; } @@ -35,14 +35,14 @@ public static bool IsDefined(object value) return value != null; } - public static bool IsDefined(JsonElement value) + public static bool IsDefined(string value) { - return value.ValueKind != JsonValueKind.Undefined; + return value != null; } - public static bool IsDefined(string value) + public static bool IsDefined(JsonElement value) { - return value != null; + return value.ValueKind != JsonValueKind.Undefined; } } } diff --git a/.dotnet/src/Generated/Internal/PipelineRequestHeadersExtensions.cs b/.dotnet/src/Generated/Internal/PipelineRequestHeadersExtensions.cs new file mode 100644 index 000000000..e1849facc --- /dev/null +++ b/.dotnet/src/Generated/Internal/PipelineRequestHeadersExtensions.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; + +namespace OpenAI +{ + internal static partial class PipelineRequestHeadersExtensions + { + public static void SetDelimited(this PipelineRequestHeaders headers, string name, IEnumerable value, string delimiter) + { + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); + headers.Set(name, string.Join(delimiter, stringValues)); + } + + public static void SetDelimited(this PipelineRequestHeaders headers, string name, IEnumerable value, string delimiter, string format) + { + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + headers.Set(name, string.Join(delimiter, stringValues)); + } + } +} diff --git a/.dotnet/src/Generated/Internal/TypeFormatters.cs b/.dotnet/src/Generated/Internal/TypeFormatters.cs new file mode 100644 index 000000000..e21a80fff --- /dev/null +++ b/.dotnet/src/Generated/Internal/TypeFormatters.cs @@ -0,0 +1,150 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Xml; + +namespace OpenAI +{ + internal static partial class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Generated clients require it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => System.Xml.XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked (value.Length + 2) / 3; + int size = checked (numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => System.Xml.XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => System.Xml.XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } +} diff --git a/.dotnet/src/Generated/Internal/Utf8JsonBinaryContent.cs b/.dotnet/src/Generated/Internal/Utf8JsonBinaryContent.cs index 1f7d30685..bcf766a67 100644 --- a/.dotnet/src/Generated/Internal/Utf8JsonBinaryContent.cs +++ b/.dotnet/src/Generated/Internal/Utf8JsonBinaryContent.cs @@ -10,7 +10,7 @@ namespace OpenAI { - internal class Utf8JsonBinaryContent : BinaryContent + internal partial class Utf8JsonBinaryContent : BinaryContent { private readonly MemoryStream _stream; private readonly BinaryContent _content; diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs new file mode 100644 index 000000000..bff4ad6f2 --- /dev/null +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -0,0 +1,157 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Assistants +{ + public partial class InternalAssistantMessageClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateMessageRequest(string thread_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/messages", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListMessagesRequest(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/messages", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetMessageRequest(string thread_id, string message_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/messages/", false); + uri.AppendPath(message_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateModifyMessageRequest(string thread_id, string message_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/messages/", false); + uri.AppendPath(message_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteMessageRequest(string thread_id, string message_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/messages/", false); + uri.AppendPath(message_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index 5ad0ce023..34f6a4631 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -6,149 +6,127 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantMessageClient + public partial class InternalAssistantMessageClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected InternalAssistantMessageClient() { } - public virtual async Task GetMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult CreateMessage(string thread_id, BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateMessageRequest(thread_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateMessageAsync(string thread_id, BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateMessageRequest(thread_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListMessages(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateListMessagesRequest(thread_id, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListMessagesAsync(string thread_id, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); - using PipelineMessage message = CreateGetMessagesRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateListMessagesRequest(thread_id, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult GetMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListMessages(string thread_id, int? limit, MessageCollectionOrder? order, string after, string before) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); - using PipelineMessage message = CreateGetMessagesRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + ClientResult result = ListMessages(thread_id, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCreateMessageRequest(string threadId, BinaryContent content, RequestOptions options) + public virtual async Task> ListMessagesAsync(string thread_id, int? limit, MessageCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + ClientResult result = await ListMessagesAsync(thread_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult GetMessage(string thread_id, string message_id, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + + using PipelineMessage message = CreateGetMessageRequest(thread_id, message_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task GetMessageAsync(string thread_id, string message_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + + using PipelineMessage message = CreateGetMessageRequest(thread_id, message_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetMessageRequest(string threadId, string messageId, RequestOptions options) + public virtual ClientResult ModifyMessage(string thread_id, string message_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyMessageRequest(thread_id, message_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateModifyMessageRequest(string threadId, string messageId, BinaryContent content, RequestOptions options) + public virtual async Task ModifyMessageAsync(string thread_id, string message_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyMessageRequest(thread_id, message_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteMessageRequest(string threadId, string messageId, RequestOptions options) + public virtual ClientResult DeleteMessage(string thread_id, string message_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + + using PipelineMessage message = CreateDeleteMessageRequest(thread_id, message_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task DeleteMessageAsync(string thread_id, string message_id, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(message_id, nameof(message_id)); + + using PipelineMessage message = CreateDeleteMessageRequest(thread_id, message_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } } } diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs new file mode 100644 index 000000000..49a64fa98 --- /dev/null +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -0,0 +1,251 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Assistants +{ + public partial class InternalAssistantRunClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/runs", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateRunRequest(string thread_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListRunsRequest(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRunRequest(string thread_id, string run_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateModifyRunRequest(string thread_id, string run_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelRunRequest(string thread_id, string run_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + uri.AppendPath("/cancel", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string thread_id, string run_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + uri.AppendPath("/submit_tool_outputs", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListRunStepsRequest(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + uri.AppendPath("/steps", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRunStepRequest(string thread_id, string run_id, string step_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(run_id, true); + uri.AppendPath("/steps/", false); + uri.AppendPath(step_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index b079a8a5e..4f3eab202 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -6,261 +6,219 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantRunClient + public partial class InternalAssistantRunClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected InternalAssistantRunClient() { } - public virtual async Task GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult CreateThreadAndRun(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateThreadAndRunRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateThreadAndRunAsync(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateThreadAndRunRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult CreateRun(string thread_id, BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateRunRequest(thread_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateRunAsync(string thread_id, BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateRunRequest(thread_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListRuns(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateListRunsRequest(thread_id, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListRunsAsync(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateListRunsRequest(thread_id, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListRuns(string thread_id, int? limit, RunCollectionOrder? order, string after, string before) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + ClientResult result = ListRuns(thread_id, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListRunsAsync(string thread_id, int? limit, RunCollectionOrder? order, string after, string before) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + ClientResult result = await ListRunsAsync(thread_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult GetRun(string thread_id, string run_id, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); - using PipelineMessage message = CreateGetRunsRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateGetRunRequest(thread_id, run_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task GetRunAsync(string thread_id, string run_id, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); - using PipelineMessage message = CreateGetRunsRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateGetRunRequest(thread_id, run_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ModifyRun(string thread_id, string run_id, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateGetRunStepsRequest(threadId, runId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateModifyRunRequest(thread_id, run_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ModifyRunAsync(string thread_id, string run_id, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateGetRunStepsRequest(threadId, runId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateModifyRunRequest(thread_id, run_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, RequestOptions options) + public virtual ClientResult CancelRun(string thread_id, string run_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/runs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + using PipelineMessage message = CreateCancelRunRequest(thread_id, run_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateCreateRunRequest(string threadId, BinaryContent content, RequestOptions options) + public virtual async Task CancelRunAsync(string thread_id, string run_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + using PipelineMessage message = CreateCancelRunRequest(thread_id, run_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetRunsRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult SubmitToolOutputsToRun(string thread_id, string run_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateSubmitToolOutputsToRunRequest(thread_id, run_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetRunRequest(string threadId, string runId, RequestOptions options) + public virtual async Task SubmitToolOutputsToRunAsync(string thread_id, string run_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateSubmitToolOutputsToRunRequest(thread_id, run_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateModifyRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) + public virtual ClientResult ListRunSteps(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + using PipelineMessage message = CreateListRunStepsRequest(thread_id, run_id, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateCancelRunRequest(string threadId, string runId, RequestOptions options) + public virtual async Task ListRunStepsAsync(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + using PipelineMessage message = CreateListRunStepsRequest(thread_id, run_id, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) + public virtual ClientResult ListRunSteps(string thread_id, string run_id, int? limit, RunStepCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/submit_tool_outputs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + ClientResult result = ListRunSteps(thread_id, run_id, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateGetRunStepsRequest(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task> ListRunStepsAsync(string thread_id, string run_id, int? limit, RunStepCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + + ClientResult result = await ListRunStepsAsync(thread_id, run_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateGetRunStepRequest(string threadId, string runId, string stepId, RequestOptions options) + public virtual ClientResult GetRunStep(string thread_id, string run_id, string step_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps/", false); - uri.AppendPath(stepId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(step_id, nameof(step_id)); + + using PipelineMessage message = CreateGetRunStepRequest(thread_id, run_id, step_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task GetRunStepAsync(string thread_id, string run_id, string step_id, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(step_id, nameof(step_id)); + + using PipelineMessage message = CreateGetRunStepRequest(thread_id, run_id, step_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } } } diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs new file mode 100644 index 000000000..d0da72842 --- /dev/null +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -0,0 +1,116 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Assistants +{ + public partial class InternalAssistantThreadClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetThreadRequest(string thread_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateModifyThreadRequest(string thread_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteThreadRequest(string thread_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/threads/", false); + uri.AppendPath(thread_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.cs index 347ef4bdd..9e2be75f9 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.cs @@ -6,92 +6,87 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantThreadClient + public partial class InternalAssistantThreadClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected InternalAssistantThreadClient() { } - internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult CreateThread(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateThreadRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateThreadAsync(BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateThreadRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetThreadRequest(string threadId, RequestOptions options) + public virtual ClientResult GetThread(string thread_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateGetThreadRequest(thread_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateModifyThreadRequest(string threadId, BinaryContent content, RequestOptions options) + public virtual async Task GetThreadAsync(string thread_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateGetThreadRequest(thread_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteThreadRequest(string threadId, RequestOptions options) + public virtual ClientResult ModifyThread(string thread_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyThreadRequest(thread_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task ModifyThreadAsync(string thread_id, BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyThreadRequest(thread_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult DeleteThread(string thread_id, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateDeleteThreadRequest(thread_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task DeleteThreadAsync(string thread_id, RequestOptions options) + { + Argument.AssertNotNull(thread_id, nameof(thread_id)); + + using PipelineMessage message = CreateDeleteThreadRequest(thread_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } } } diff --git a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs new file mode 100644 index 000000000..185cf6fa3 --- /dev/null +++ b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs @@ -0,0 +1,121 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Files +{ + public partial class InternalUploadsClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.InternalUploadsClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.InternalUploadsClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalUploadsClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/uploads", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateAddUploadPartRequest(string upload_id, BinaryContent content, string contentType, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/uploads/", false); + uri.AppendPath(upload_id, true); + uri.AppendPath("/parts", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", contentType); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCompleteUploadRequest(string upload_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/uploads/", false); + uri.AppendPath(upload_id, true); + uri.AppendPath("/complete", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelUploadRequest(string upload_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/uploads/", false); + uri.AppendPath(upload_id, true); + uri.AppendPath("/cancel", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index 4c6d033aa..be55fd772 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -6,239 +6,139 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Files { - // Data plane generated sub-client. - internal partial class InternalUploadsClient + public partial class InternalUploadsClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected InternalUploadsClient() { } - public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CreateUploadAsync(content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } + public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateUpload(InternalCreateUploadRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CreateUpload(content, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options = null) + public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateUploadRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateUploadRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task> AddUploadPartAsync(string uploadId, InternalAddUploadPartRequest requestBody) + public virtual ClientResult CreateUpload(InternalCreateUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - using MultipartFormDataBinaryContent content = requestBody.ToMultipartBinaryBody(); - ClientResult result = await AddUploadPartAsync(uploadId, content, content.ContentType, (RequestOptions)null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUploadPart.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = CreateUpload(requestBody, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult AddUploadPart(string uploadId, InternalAddUploadPartRequest requestBody) + public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - using MultipartFormDataBinaryContent content = requestBody.ToMultipartBinaryBody(); - ClientResult result = AddUploadPart(uploadId, content, content.ContentType, (RequestOptions)null); - return ClientResult.FromValue(InternalUploadPart.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = await CreateUploadAsync(requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) + public virtual ClientResult AddUploadPart(string upload_id, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateAddUploadPartRequest(upload_id, content, contentType, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) + public virtual async Task AddUploadPartAsync(string upload_id, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateAddUploadPartRequest(upload_id, content, contentType, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody) + public virtual ClientResult CompleteUpload(string upload_id, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CompleteUploadAsync(uploadId, content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual ClientResult CompleteUpload(string uploadId, InternalCompleteUploadRequest requestBody) - { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CompleteUpload(uploadId, content, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options = null) - { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateCompleteUploadRequest(upload_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options = null) + public virtual async Task CompleteUploadAsync(string upload_id, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateCompleteUploadRequest(upload_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task> CancelUploadAsync(string uploadId) + public virtual ClientResult CompleteUpload(string upload_id, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CancelUploadAsync(uploadId, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = CompleteUpload(upload_id, requestBody, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult CancelUpload(string uploadId) + public virtual async Task> CompleteUploadAsync(string upload_id, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CancelUpload(uploadId, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = await CompleteUploadAsync(upload_id, requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task CancelUploadAsync(string uploadId, RequestOptions options) + public virtual ClientResult CancelUpload(string upload_id, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); - using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateCancelUploadRequest(upload_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CancelUpload(string uploadId, RequestOptions options) + public virtual async Task CancelUploadAsync(string upload_id, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(upload_id, nameof(upload_id)); - using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateCancelUploadRequest(upload_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, RequestOptions options) + public virtual ClientResult CancelUpload(string upload_id) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(upload_id, nameof(upload_id)); - internal PipelineMessage CreateAddUploadPartRequest(string uploadId, BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/parts", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; + ClientResult result = CancelUpload(upload_id, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - internal PipelineMessage CreateCompleteUploadRequest(string uploadId, BinaryContent content, RequestOptions options) + public virtual async Task> CancelUploadAsync(string upload_id) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/complete", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(upload_id, nameof(upload_id)); - internal PipelineMessage CreateCancelUploadRequest(string uploadId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await CancelUploadAsync(upload_id, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs new file mode 100644 index 000000000..fc9c63ca9 --- /dev/null +++ b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.LegacyCompletions +{ + public partial class LegacyCompletionClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateCompletionRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/completions", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index efb44faac..7ba559047 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -6,76 +6,53 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.LegacyCompletions { - // Data plane generated sub-client. - internal partial class LegacyCompletionClient + public partial class LegacyCompletionClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected LegacyCompletionClient() { } - public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CreateCompletionAsync(content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalCreateCompletionResponse.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } + public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateCompletion(InternalCreateCompletionRequest requestBody) + public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options) { - Argument.AssertNotNull(requestBody, nameof(requestBody)); + Argument.AssertNotNull(content, nameof(content)); - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CreateCompletion(content, null); - return ClientResult.FromValue(InternalCreateCompletionResponse.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + using PipelineMessage message = CreateCreateCompletionRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateCompletionRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options = null) + public virtual ClientResult CreateCompletion(InternalCreateCompletionRequest requestBody) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - using PipelineMessage message = CreateCreateCompletionRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + ClientResult result = CreateCompletion(requestBody, null); + return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCreateCompletionRequest(BinaryContent content, RequestOptions options) + public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/completions", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(requestBody, nameof(requestBody)); - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + ClientResult result = await CreateCompletionAsync(requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/ModelClient.RestClient.cs b/.dotnet/src/Generated/ModelClient.RestClient.cs new file mode 100644 index 000000000..7d2de8105 --- /dev/null +++ b/.dotnet/src/Generated/ModelClient.RestClient.cs @@ -0,0 +1,95 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Models +{ + public partial class ModelClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.ModelClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.ModelClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ModelClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateListModelsRequest(RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/models", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateRetrieveModelRequest(string model, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/models/", false); + uri.AppendPath(model, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteModelRequest(string model, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/models/", false); + uri.AppendPath(model, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/ModelClient.cs b/.dotnet/src/Generated/ModelClient.cs index 9771fb0d9..707af24ad 100644 --- a/.dotnet/src/Generated/ModelClient.cs +++ b/.dotnet/src/Generated/ModelClient.cs @@ -9,69 +9,41 @@ namespace OpenAI.Models { - // Data plane generated sub-client. public partial class ModelClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected ModelClient() { } - internal PipelineMessage CreateGetModelsRequest(RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult ListModels(RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateRetrieveModelRequest(string model, RequestOptions options) + public virtual async Task ListModelsAsync(RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models/", false); - uri.AppendPath(model, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteModelRequest(string model, RequestOptions options) + public virtual ClientResult ListModels() { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models/", false); - uri.AppendPath(model, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListModels(null); + return ClientResult.FromValue((OpenAIModelInfoCollection)result, result.GetRawResponse()); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task> ListModelsAsync() + { + ClientResult result = await ListModelsAsync(null).ConfigureAwait(false); + return ClientResult.FromValue((OpenAIModelInfoCollection)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index 22f1b7a73..4cd55867e 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -7,87 +7,73 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class Assistant : IJsonModel { + internal Assistant() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(Assistant)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (Name != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("name"u8); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + if (Description != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) + else { - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } + writer.WriteNull("description"u8); } - if (SerializedAdditionalRawData?.ContainsKey("description") != true) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Instructions != null) { - if (Description != null) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + else { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteNull("instructions"u8); } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true) + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (var item in Tools) { - if (Instructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - else - { - writer.WriteNull("instructions"); - } + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + writer.WriteEndArray(); + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { @@ -96,28 +82,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + else + { + writer.WriteNull("metadata"u8); + } + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -126,44 +114,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(TopP)) { - if (NucleusSamplingFactor != null) + if (TopP != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -172,25 +163,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - Assistant IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + Assistant IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual Assistant JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(Assistant)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistant(document.RootElement, options); } - internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderWriterOptions options = null) + internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -202,138 +191,142 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW string description = default; string model = default; string instructions = default; - IReadOnlyList tools = default; + IList tools = default; ToolResources toolResources = default; - IReadOnlyDictionary metadata = default; + IDictionary metadata = default; float? temperature = default; float? topP = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalAssistantObjectObject(property.Value.GetString()); + @object = new InternalAssistantObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { description = null; continue; } - description = property.Value.GetString(); + description = prop.Value.GetString(); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { instructions = null; continue; } - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new Assistant( id, @object, @@ -348,13 +341,14 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW temperature, topP, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -364,15 +358,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - Assistant IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + Assistant IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual Assistant PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistant(document.RootElement, options); } default: @@ -382,15 +377,16 @@ Assistant IPersistableModel.Create(BinaryData data, ModelReaderWriter string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static Assistant FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(Assistant assistant) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistant(document.RootElement); + return BinaryContent.Create(assistant, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator Assistant(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistant(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index db507e169..cf8b97ab3 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -10,13 +10,10 @@ namespace OpenAI.Assistants { public partial class Assistant { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(model, nameof(model)); - Argument.AssertNotNull(tools, nameof(tools)); + private protected IDictionary _additionalBinaryDataProperties; + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) + { Id = id; CreatedAt = createdAt; Name = name; @@ -27,7 +24,7 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Metadata = metadata; } - internal Assistant(string id, InternalAssistantObjectObject @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, IReadOnlyDictionary metadata, float? temperature, float? nucleusSamplingFactor, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal Assistant(string id, InternalAssistantObjectObject @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -40,25 +37,29 @@ internal Assistant(string id, InternalAssistantObjectObject @object, DateTimeOff ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; + TopP = topP; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal Assistant() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string Name { get; set; } + + public string Description { get; set; } + + public string Model { get; set; } + + public string Instructions { get; set; } + + public IList Tools { get; } + + public ToolResources ToolResources { get; set; } - public string Id { get; } + public IDictionary Metadata { get; set; } - public DateTimeOffset CreatedAt { get; } - public string Name { get; } - public string Description { get; } - public string Model { get; } - public string Instructions { get; } - public IReadOnlyList Tools { get; } - public ToolResources ToolResources { get; } - public IReadOnlyDictionary Metadata { get; } - public float? Temperature { get; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 89a7d76f5..faef5f50b 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -7,111 +7,194 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class AssistantChatMessage : IJsonModel { - AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Content)) + { + if (Content != null) + { + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + else + { + writer.WriteNull("content"u8); + } + } + if (Optional.IsDefined(Refusal)) + { + if (Refusal != null) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + } + else + { + writer.WriteNull("refusal"u8); + } + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(ToolCalls)) + { + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(FunctionCall)) + { + if (FunctionCall != null) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionCall, options); + } + else + { + writer.WriteNull("functionCall"u8); + } } + } + + AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AssistantChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantChatMessage(document.RootElement, options); } - internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string refusal = default; string name = default; IList toolCalls = default; ChatFunctionCall functionCall = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "assistant"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("refusal"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = null; continue; } - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("function_call"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { functionCall = null; continue; } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(property.Value, options); - continue; - } - if (property.NameEquals("role"u8)) - { - role = property.Value.GetString().ToChatMessageRole(); + functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AssistantChatMessage( - role, - content ?? new ChangeTrackingList(), - serializedAdditionalRawData, + content, refusal, name, toolCalls ?? new ChangeTrackingList(), - functionCall); + functionCall, + role, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -121,15 +204,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - AssistantChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (AssistantChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantChatMessage(document.RootElement, options); } default: @@ -139,15 +223,16 @@ AssistantChatMessage IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new AssistantChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantChatMessage assistantChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantChatMessage(document.RootElement); + return BinaryContent.Create(assistantChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator AssistantChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index 35522b2c7..6c21e666b 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -9,14 +9,17 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, serializedAdditionalRawData) + internal AssistantChatMessage(BinaryData content, string refusal, string name, IList toolCalls, ChatFunctionCall functionCall, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; Refusal = refusal; - ParticipantName = participantName; + Name = name; ToolCalls = toolCalls; FunctionCall = functionCall; } + public BinaryData Content { get; set; } + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs b/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs index 2b25b8450..68d29ef01 100644 --- a/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct AssistantCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public AssistantCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right) => left.Equals(right); + public static bool operator !=(AssistantCollectionOrder left, AssistantCollectionOrder right) => !left.Equals(right); + public static implicit operator AssistantCollectionOrder(string value) => new AssistantCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AssistantCollectionOrder other && Equals(other); + public bool Equals(AssistantCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index 31be626be..a06ca5dfe 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,21 @@ public partial class AssistantCreationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Optional.IsDefined(Name)) { if (Name != null) { @@ -35,10 +38,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("name"); + writer.WriteNull("name"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(Description)) + if (Optional.IsDefined(Description)) { if (Description != null) { @@ -47,10 +50,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("description"); + writer.WriteNull("description"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions)) { if (Instructions != null) { @@ -59,10 +62,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("instructions"); + writer.WriteNull("instructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -72,19 +75,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -93,16 +96,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -111,44 +119,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(TopP)) { - if (NucleusSamplingFactor != null) + if (TopP != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -157,153 +168,155 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } - AssistantCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssistantCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AssistantCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantCreationOptions(document.RootElement, options); } - internal static AssistantCreationOptions DeserializeAssistantCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantCreationOptions DeserializeAssistantCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string model = default; + InternalCreateAssistantRequestModel model = default; string name = default; string description = default; string instructions = default; IList tools = default; - ToolResources toolResources = default; + InternalCreateAssistantRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; float? topP = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = new InternalCreateAssistantRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { description = null; continue; } - description = property.Value.GetString(); + description = prop.Value.GetString(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { instructions = null; continue; } - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalCreateAssistantRequestToolResources.DeserializeInternalCreateAssistantRequestToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AssistantCreationOptions( model, name, @@ -315,13 +328,14 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso temperature, topP, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -331,15 +345,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - AssistantCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AssistantCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantCreationOptions(document.RootElement, options); } default: @@ -349,15 +364,16 @@ AssistantCreationOptions IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AssistantCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantCreationOptions assistantCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantCreationOptions(document.RootElement); + return BinaryContent.Create(assistantCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AssistantCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs index 9e0ed5afc..107648c45 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs @@ -9,9 +9,9 @@ namespace OpenAI.Assistants { public partial class AssistantCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal AssistantCreationOptions(string model, string name, string description, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal AssistantCreationOptions(InternalCreateAssistantRequestModel model, string name, string description, string instructions, IList tools, InternalCreateAssistantRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { Model = model; Name = name; @@ -21,14 +21,19 @@ internal AssistantCreationOptions(string model, string name, string description, ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; + TopP = topP; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string Name { get; set; } + public string Description { get; set; } + public string Instructions { get; set; } + public IDictionary Metadata { get; set; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index 85b760cd0..b5b2519e6 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class AssistantDeletionResult : IJsonModel { + internal AssistantDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(AssistantId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - AssistantDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssistantDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AssistantDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantDeletionResult(document.RootElement, options); } - internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE string id = default; bool deleted = default; InternalDeleteAssistantResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteAssistantResponseObject(property.Value.GetString()); + @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AssistantDeletionResult(id, deleted, @object, serializedAdditionalRawData); + return new AssistantDeletionResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - AssistantDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AssistantDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ AssistantDeletionResult IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AssistantDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantDeletionResult assistantDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantDeletionResult(document.RootElement); + return BinaryContent.Create(assistantDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AssistantDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index 7736dd664..baf7eebd7 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -9,26 +9,22 @@ namespace OpenAI.Assistants { public partial class AssistantDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal AssistantDeletionResult(string assistantId, bool deleted) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); + private protected IDictionary _additionalBinaryDataProperties; - AssistantId = assistantId; + internal AssistantDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal AssistantDeletionResult(string assistantId, bool deleted, InternalDeleteAssistantResponseObject @object, IDictionary serializedAdditionalRawData) + internal AssistantDeletionResult(string id, bool deleted, InternalDeleteAssistantResponseObject @object, IDictionary additionalBinaryDataProperties) { - AssistantId = assistantId; + Id = id; Deleted = deleted; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal AssistantDeletionResult() - { - } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index 185f0d9bc..b388b2b01 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ public partial class AssistantModificationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantModificationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) + if (Optional.IsDefined(Model)) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { if (Name != null) { @@ -35,10 +41,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("name"); + writer.WriteNull("name"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(Description)) + if (Optional.IsDefined(Description)) { if (Description != null) { @@ -47,10 +53,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("description"); + writer.WriteNull("description"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions)) { if (Instructions != null) { @@ -59,32 +65,32 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("instructions"); + writer.WriteNull("instructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(DefaultTools)) + if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in DefaultTools) + foreach (var item in Tools) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -93,16 +99,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -111,44 +122,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(TopP)) { - if (NucleusSamplingFactor != null) + if (TopP != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -157,25 +171,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - AssistantModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssistantModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AssistantModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantModificationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantModificationOptions(document.RootElement, options); } - internal static AssistantModificationOptions DeserializeAssistantModificationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantModificationOptions DeserializeAssistantModificationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -185,125 +197,134 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt string description = default; string instructions = default; IList tools = default; - ToolResources toolResources = default; + InternalModifyAssistantRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; float? topP = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { description = null; continue; } - description = property.Value.GetString(); + description = prop.Value.GetString(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { instructions = null; continue; } - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalModifyAssistantRequestToolResources.DeserializeInternalModifyAssistantRequestToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AssistantModificationOptions( model, name, @@ -315,13 +336,14 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt temperature, topP, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -331,15 +353,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - AssistantModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AssistantModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantModificationOptions(document.RootElement, options); } default: @@ -349,15 +372,16 @@ AssistantModificationOptions IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AssistantModificationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantModificationOptions assistantModificationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantModificationOptions(document.RootElement); + return BinaryContent.Create(assistantModificationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AssistantModificationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantModificationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs index baa7fed1a..654e6df69 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs @@ -4,36 +4,43 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class AssistantModificationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public AssistantModificationOptions() { - DefaultTools = new ChangeTrackingList(); + Tools = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } - internal AssistantModificationOptions(string model, string name, string description, string instructions, IList defaultTools, ToolResources toolResources, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal AssistantModificationOptions(string model, string name, string description, string instructions, IList tools, InternalModifyAssistantRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { Model = model; Name = name; Description = description; Instructions = instructions; - DefaultTools = defaultTools; + Tools = tools; ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; + TopP = topP; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string Name { get; set; } + public string Description { get; set; } + public string Instructions { get; set; } + public IDictionary Metadata { get; set; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index f2fa4d9f9..8e1e1a07f 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -6,11 +6,127 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(InternalUnknownAssistantResponseFormat))] - public partial class AssistantResponseFormat : IJsonModel + public abstract partial class AssistantResponseFormat : IJsonModel { + internal AssistantResponseFormat() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssistantResponseFormat(document.RootElement, options); + } + + internal static AssistantResponseFormat DeserializeAssistantResponseFormat(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "text": + return InternalAssistantResponseFormatText.DeserializeInternalAssistantResponseFormatText(element, options); + case "json_object": + return InternalAssistantResponseFormatJsonObject.DeserializeInternalAssistantResponseFormatJsonObject(element, options); + case "json_schema": + return InternalAssistantResponseFormatJsonSchema.DeserializeInternalAssistantResponseFormatJsonSchema(element, options); + } + } + return InternalUnknownAssistantResponseFormat.DeserializeInternalUnknownAssistantResponseFormat(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support writing '{options.Format}' format."); + } + } + + AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeAssistantResponseFormat(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(AssistantResponseFormat assistantResponseFormat) + { + return BinaryContent.Create(assistantResponseFormat, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator AssistantResponseFormat(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantResponseFormat(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs index 3490f8a5a..72bbcb667 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { public abstract partial class AssistantResponseFormat { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected AssistantResponseFormat() + private protected IDictionary _additionalBinaryDataProperties; + + private protected AssistantResponseFormat(string @type) { + Type = @type; } - internal AssistantResponseFormat(string type, IDictionary serializedAdditionalRawData) + internal AssistantResponseFormat(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 45e72b9bf..36d83fec1 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -7,76 +7,72 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class AssistantThread : IJsonModel { + internal AssistantThread() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantThread)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (ToolResources != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true) + else { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } + writer.WriteNull("toolResources"u8); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); } - if (SerializedAdditionalRawData != null) + else { - foreach (var item in SerializedAdditionalRawData) + writer.WriteNull("metadata"u8); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -85,25 +81,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } - AssistantThread IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssistantThread IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AssistantThread JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantThread)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantThread(document.RootElement, options); } - internal static AssistantThread DeserializeAssistantThread(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantThread DeserializeAssistantThread(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -111,72 +105,77 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, string id = default; InternalThreadObjectObject @object = default; DateTimeOffset createdAt = default; - ToolResources toolResources = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalThreadObjectToolResources toolResources = default; + IDictionary metadata = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalThreadObjectObject(property.Value.GetString()); + @object = new InternalThreadObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalThreadObjectToolResources.DeserializeInternalThreadObjectToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AssistantThread( id, @object, createdAt, toolResources, metadata, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -186,15 +185,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - AssistantThread IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantThread IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AssistantThread PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantThread(document.RootElement, options); } default: @@ -204,15 +204,16 @@ AssistantThread IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AssistantThread FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantThread assistantThread) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantThread(document.RootElement); + return BinaryContent.Create(assistantThread, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AssistantThread(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantThread(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index 6cec49e4b..a26a1116f 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -9,34 +9,30 @@ namespace OpenAI.Assistants { public partial class AssistantThread { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal AssistantThread(string id, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); + private protected IDictionary _additionalBinaryDataProperties; + internal AssistantThread(string id, DateTimeOffset createdAt, InternalThreadObjectToolResources toolResources, IDictionary metadata) + { Id = id; CreatedAt = createdAt; ToolResources = toolResources; Metadata = metadata; } - internal AssistantThread(string id, InternalThreadObjectObject @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal AssistantThread(string id, InternalThreadObjectObject @object, DateTimeOffset createdAt, InternalThreadObjectToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; CreatedAt = createdAt; ToolResources = toolResources; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal AssistantThread() - { - } + public string Id { get; set; } - public string Id { get; } + public DateTimeOffset CreatedAt { get; set; } - public DateTimeOffset CreatedAt { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index d08be5d13..53e722ed7 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -7,41 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { public partial class AudioTranscription : IJsonModel { + internal AudioTranscription() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscription)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("task") != true) - { - writer.WritePropertyName("task"u8); - writer.WriteStringValue(Task.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("language") != true) - { - writer.WritePropertyName("language"u8); - writer.WriteStringValue(Language); - } - if (SerializedAdditionalRawData?.ContainsKey("duration") != true) - { - writer.WritePropertyName("duration"u8); - writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("words") != true && Optional.IsCollectionDefined(Words)) + writer.WritePropertyName("task"u8); + writer.WriteStringValue(Task.ToString()); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.ToString("s\\.FFF"))); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsCollectionDefined(Words)) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); @@ -51,7 +49,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("segments") != true && Optional.IsCollectionDefined(Segments)) + if (Optional.IsCollectionDefined(Segments)) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -61,17 +59,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -80,94 +74,89 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - AudioTranscription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranscription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranscription JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscription)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranscription(document.RootElement, options); } - internal static AudioTranscription DeserializeAudioTranscription(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranscription DeserializeAudioTranscription(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateTranscriptionResponseVerboseJsonTask task = default; string language = default; - TimeSpan? duration = default; + TimeSpan duration = default; string text = default; - IReadOnlyList words = default; - IReadOnlyList segments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList words = default; + IList segments = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("task"u8)) + if (prop.NameEquals("task"u8)) { - task = new InternalCreateTranscriptionResponseVerboseJsonTask(property.Value.GetString()); + task = new InternalCreateTranscriptionResponseVerboseJsonTask(prop.Value.GetString()); continue; } - if (property.NameEquals("language"u8)) + if (prop.NameEquals("language"u8)) { - language = property.Value.GetString(); + language = prop.Value.GetString(); continue; } - if (property.NameEquals("duration"u8)) + if (prop.NameEquals("duration"u8)) { - duration = TimeSpan.FromSeconds(property.Value.GetDouble()); + duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("words"u8)) + if (prop.NameEquals("words"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(TranscribedWord.DeserializeTranscribedWord(item, options)); } words = array; continue; } - if (property.NameEquals("segments"u8)) + if (prop.NameEquals("segments"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(TranscribedSegment.DeserializeTranscribedSegment(item, options)); } segments = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AudioTranscription( task, language, @@ -175,13 +164,14 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele text, words ?? new ChangeTrackingList(), segments ?? new ChangeTrackingList(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -191,15 +181,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - AudioTranscription IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranscription IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranscription PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranscription(document.RootElement, options); } default: @@ -209,9 +200,16 @@ AudioTranscription IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal virtual BinaryContent ToBinaryContent() + public static implicit operator BinaryContent(AudioTranscription audioTranscription) + { + return BinaryContent.Create(audioTranscription, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator AudioTranscription(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranscription(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index ce9824521..6d6609582 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -4,17 +4,16 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Audio { public partial class AudioTranscription { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal AudioTranscription(string language, TimeSpan? duration, string text) - { - Argument.AssertNotNull(language, nameof(language)); - Argument.AssertNotNull(text, nameof(text)); + private protected IDictionary _additionalBinaryDataProperties; + internal AudioTranscription(string language, TimeSpan duration, string text) + { Language = language; Duration = duration; Text = text; @@ -22,7 +21,7 @@ internal AudioTranscription(string language, TimeSpan? duration, string text) Segments = new ChangeTrackingList(); } - internal AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask task, string language, TimeSpan? duration, string text, IReadOnlyList words, IReadOnlyList segments, IDictionary serializedAdditionalRawData) + internal AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask task, string language, TimeSpan duration, string text, IList words, IList segments, IDictionary additionalBinaryDataProperties) { Task = task; Language = language; @@ -30,16 +29,15 @@ internal AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask t Text = text; Words = words; Segments = segments; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal AudioTranscription() - { - } + public string Language { get; set; } + + public string Text { get; set; } + + public IList Words { get; } - public string Language { get; } - public string Text { get; } - public IReadOnlyList Words { get; } - public IReadOnlyList Segments { get; } + public IList Segments { get; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.Serialization.cs index 699760d2a..3642d01cb 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.Serialization.cs @@ -8,23 +8,38 @@ namespace OpenAI.Audio { internal static partial class AudioTranscriptionFormatExtensions { - public static string ToSerialString(this AudioTranscriptionFormat value) => value switch + public static string ToSerialString(this Audio.AudioTranscriptionFormat value) => value switch { - AudioTranscriptionFormat.Simple => "json", - AudioTranscriptionFormat.Text => "text", - AudioTranscriptionFormat.Srt => "srt", - AudioTranscriptionFormat.Verbose => "verbose_json", - AudioTranscriptionFormat.Vtt => "vtt", + Audio.AudioTranscriptionFormat.Simple => "json", + Audio.AudioTranscriptionFormat.Text => "text", + Audio.AudioTranscriptionFormat.Srt => "srt", + Audio.AudioTranscriptionFormat.Verbose => "verbose_json", + Audio.AudioTranscriptionFormat.Vtt => "vtt", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AudioTranscriptionFormat value.") }; - public static AudioTranscriptionFormat ToAudioTranscriptionFormat(this string value) + public static Audio.AudioTranscriptionFormat ToAudioTranscriptionFormat(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) return AudioTranscriptionFormat.Simple; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) return AudioTranscriptionFormat.Text; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) return AudioTranscriptionFormat.Srt; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) return AudioTranscriptionFormat.Verbose; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) return AudioTranscriptionFormat.Vtt; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) + { + return Audio.AudioTranscriptionFormat.Simple; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) + { + return Audio.AudioTranscriptionFormat.Text; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) + { + return Audio.AudioTranscriptionFormat.Srt; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) + { + return Audio.AudioTranscriptionFormat.Verbose; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) + { + return Audio.AudioTranscriptionFormat.Vtt; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AudioTranscriptionFormat value."); } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index cebd9176f..cb00dc804 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { @@ -15,83 +15,59 @@ public partial class AudioTranscriptionOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file") != true) - { - writer.WritePropertyName("file"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(File); -#else - using (JsonDocument document = JsonDocument.Parse(File)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("language") != true && Optional.IsDefined(Language)) + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Optional.IsDefined(Language)) { writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true && Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (SerializedAdditionalRawData?.ContainsKey("timestamp_granularities") != true && Optional.IsCollectionDefined(TimestampGranularities)) + if (Optional.IsCollectionDefined(TimestampGranularities)) { writer.WritePropertyName("timestamp_granularities"u8); writer.WriteStartArray(); foreach (var item in TimestampGranularities) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -100,187 +76,141 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - AudioTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranscriptionOptions(document.RootElement, options); } - internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData file = default; + BinaryData @file = default; InternalCreateTranscriptionRequestModel model = default; string language = default; string prompt = default; - AudioTranscriptionFormat? responseFormat = default; + Audio.AudioTranscriptionFormat? responseFormat = default; float? temperature = default; - IList timestampGranularities = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList timestampGranularities = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file"u8)) + if (prop.NameEquals("file"u8)) { - file = BinaryData.FromString(property.Value.GetRawText()); + @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateTranscriptionRequestModel(property.Value.GetString()); + model = new InternalCreateTranscriptionRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("language"u8)) + if (prop.NameEquals("language"u8)) { - language = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + language = null; + continue; + } + language = prop.Value.GetString(); continue; } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prompt = null; + continue; + } + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = property.Value.GetString().ToAudioTranscriptionFormat(); + responseFormat = prop.Value.GetString().ToAudioTranscriptionFormat(); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("timestamp_granularities"u8)) + if (prop.NameEquals("timestamp_granularities"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } + array.Add(new InternalCreateTranscriptionRequestTimestampGranularity(item.GetString())); } timestampGranularities = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AudioTranscriptionOptions( - file, + @file, model, language, prompt, responseFormat, temperature, - timestampGranularities ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } + timestampGranularities ?? new ChangeTrackingList(), + additionalBinaryDataProperties); } - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file"); - content.Add(Model.ToString(), "model"); - if (Optional.IsDefined(Language)) - { - content.Add(Language, "language"); - } - if (Optional.IsDefined(Prompt)) - { - content.Add(Prompt, "prompt"); - } - if (Optional.IsDefined(ResponseFormat)) - { - content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); - } - if (Optional.IsDefined(Temperature)) - { - content.Add(Temperature.Value, "temperature"); - } - if (Optional.IsCollectionDefined(TimestampGranularities)) - { - foreach (BinaryData item in TimestampGranularities) - { - content.Add(item, "timestamp_granularities", "timestamp_granularities"); - } - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{options.Format}' format."); } } - AudioTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranscriptionOptions(document.RootElement, options); } default: @@ -288,17 +218,18 @@ AudioTranscriptionOptions IPersistableModel.Create(Bi } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AudioTranscriptionOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AudioTranscriptionOptions audioTranscriptionOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranscriptionOptions(document.RootElement); + return BinaryContent.Create(audioTranscriptionOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AudioTranscriptionOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranscriptionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index 3640e680a..2b6d79bc7 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -9,22 +9,26 @@ namespace OpenAI.Audio { public partial class AudioTranscriptionOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscriptionOptions(BinaryData file, InternalCreateTranscriptionRequestModel model, string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, IList timestampGranularities, IDictionary serializedAdditionalRawData) + internal AudioTranscriptionOptions(BinaryData @file, InternalCreateTranscriptionRequestModel model, string language, string prompt, Audio.AudioTranscriptionFormat? responseFormat, float? temperature, IList timestampGranularities, IDictionary additionalBinaryDataProperties) { - File = file; + File = @file; Model = model; Language = language; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; TimestampGranularities = timestampGranularities; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string Language { get; set; } + public string Prompt { get; set; } - public AudioTranscriptionFormat? ResponseFormat { get; set; } + + public Audio.AudioTranscriptionFormat? ResponseFormat { get; set; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index ff7da0c0b..7b293d8bc 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -7,41 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { public partial class AudioTranslation : IJsonModel { + internal AudioTranslation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("task") != true) - { - writer.WritePropertyName("task"u8); - writer.WriteStringValue(Task.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("language") != true) - { - writer.WritePropertyName("language"u8); - writer.WriteStringValue(Language); - } - if (SerializedAdditionalRawData?.ContainsKey("duration") != true) - { - writer.WritePropertyName("duration"u8); - writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("segments") != true && Optional.IsCollectionDefined(Segments)) + writer.WritePropertyName("task"u8); + writer.WriteStringValue(Task.ToString()); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.ToString("s\\.FFF"))); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsCollectionDefined(Segments)) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -51,17 +49,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,92 +64,88 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - AudioTranslation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranslation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranslation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranslation(document.RootElement, options); } - internal static AudioTranslation DeserializeAudioTranslation(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranslation DeserializeAudioTranslation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateTranslationResponseVerboseJsonTask task = default; string language = default; - TimeSpan? duration = default; + TimeSpan duration = default; string text = default; - IReadOnlyList segments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList segments = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("task"u8)) + if (prop.NameEquals("task"u8)) { - task = new InternalCreateTranslationResponseVerboseJsonTask(property.Value.GetString()); + task = new InternalCreateTranslationResponseVerboseJsonTask(prop.Value.GetString()); continue; } - if (property.NameEquals("language"u8)) + if (prop.NameEquals("language"u8)) { - language = property.Value.GetString(); + language = prop.Value.GetString(); continue; } - if (property.NameEquals("duration"u8)) + if (prop.NameEquals("duration"u8)) { - duration = TimeSpan.FromSeconds(property.Value.GetDouble()); + duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("segments"u8)) + if (prop.NameEquals("segments"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(TranscribedSegment.DeserializeTranscribedSegment(item, options)); } segments = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AudioTranslation( task, language, duration, text, segments ?? new ChangeTrackingList(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -165,15 +155,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - AudioTranslation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranslation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranslation(document.RootElement, options); } default: @@ -183,9 +174,16 @@ AudioTranslation IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal virtual BinaryContent ToBinaryContent() + public static implicit operator BinaryContent(AudioTranslation audioTranslation) + { + return BinaryContent.Create(audioTranslation, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator AudioTranslation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranslation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index 6dfb907ca..1189cdf8a 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -4,39 +4,36 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Audio { public partial class AudioTranslation { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal AudioTranslation(string language, TimeSpan? duration, string text) - { - Argument.AssertNotNull(language, nameof(language)); - Argument.AssertNotNull(text, nameof(text)); + private protected IDictionary _additionalBinaryDataProperties; + internal AudioTranslation(string language, TimeSpan duration, string text) + { Language = language; Duration = duration; Text = text; Segments = new ChangeTrackingList(); } - internal AudioTranslation(InternalCreateTranslationResponseVerboseJsonTask task, string language, TimeSpan? duration, string text, IReadOnlyList segments, IDictionary serializedAdditionalRawData) + internal AudioTranslation(InternalCreateTranslationResponseVerboseJsonTask task, string language, TimeSpan duration, string text, IList segments, IDictionary additionalBinaryDataProperties) { Task = task; Language = language; Duration = duration; Text = text; Segments = segments; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal AudioTranslation() - { - } + public string Language { get; set; } + + public string Text { get; set; } - public string Language { get; } - public string Text { get; } - public IReadOnlyList Segments { get; } + public IList Segments { get; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationFormat.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationFormat.Serialization.cs index 6c55e965d..25e70711b 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationFormat.Serialization.cs @@ -8,23 +8,38 @@ namespace OpenAI.Audio { internal static partial class AudioTranslationFormatExtensions { - public static string ToSerialString(this AudioTranslationFormat value) => value switch + public static string ToSerialString(this Audio.AudioTranslationFormat value) => value switch { - AudioTranslationFormat.Simple => "json", - AudioTranslationFormat.Text => "text", - AudioTranslationFormat.Srt => "srt", - AudioTranslationFormat.Verbose => "verbose_json", - AudioTranslationFormat.Vtt => "vtt", + Audio.AudioTranslationFormat.Simple => "json", + Audio.AudioTranslationFormat.Text => "text", + Audio.AudioTranslationFormat.Srt => "srt", + Audio.AudioTranslationFormat.Verbose => "verbose_json", + Audio.AudioTranslationFormat.Vtt => "vtt", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AudioTranslationFormat value.") }; - public static AudioTranslationFormat ToAudioTranslationFormat(this string value) + public static Audio.AudioTranslationFormat ToAudioTranslationFormat(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) return AudioTranslationFormat.Simple; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) return AudioTranslationFormat.Text; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) return AudioTranslationFormat.Srt; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) return AudioTranslationFormat.Verbose; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) return AudioTranslationFormat.Vtt; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) + { + return Audio.AudioTranslationFormat.Simple; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) + { + return Audio.AudioTranslationFormat.Text; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) + { + return Audio.AudioTranslationFormat.Srt; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) + { + return Audio.AudioTranslationFormat.Verbose; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) + { + return Audio.AudioTranslationFormat.Vtt; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AudioTranslationFormat value."); } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index 5881d9a41..a78a8af02 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { @@ -15,56 +15,44 @@ public partial class AudioTranslationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file") != true) - { - writer.WritePropertyName("file"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(File); -#else - using (JsonDocument document = JsonDocument.Parse(File)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true && Optional.IsDefined(Prompt)) + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -73,146 +61,113 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - AudioTranslationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranslationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranslationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranslationOptions(document.RootElement, options); } - internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData file = default; + BinaryData @file = default; InternalCreateTranslationRequestModel model = default; string prompt = default; - AudioTranslationFormat? responseFormat = default; + Audio.AudioTranslationFormat? responseFormat = default; float? temperature = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file"u8)) + if (prop.NameEquals("file"u8)) { - file = BinaryData.FromString(property.Value.GetRawText()); + @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateTranslationRequestModel(property.Value.GetString()); + model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prompt = null; + continue; + } + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = property.Value.GetString().ToAudioTranslationFormat(); + responseFormat = prop.Value.GetString().ToAudioTranslationFormat(); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AudioTranslationOptions( - file, + @file, model, prompt, responseFormat, temperature, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file"); - content.Add(Model.ToString(), "model"); - if (Optional.IsDefined(Prompt)) - { - content.Add(Prompt, "prompt"); - } - if (Optional.IsDefined(ResponseFormat)) - { - content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); - } - if (Optional.IsDefined(Temperature)) - { - content.Add(Temperature.Value, "temperature"); - } - return content; - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{options.Format}' format."); } } - AudioTranslationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranslationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranslationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranslationOptions(document.RootElement, options); } default: @@ -220,17 +175,18 @@ AudioTranslationOptions IPersistableModel.Create(Binary } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AudioTranslationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AudioTranslationOptions audioTranslationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranslationOptions(document.RootElement); + return BinaryContent.Create(audioTranslationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AudioTranslationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranslationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index a19d2f1fa..16dd90f8e 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -9,19 +9,22 @@ namespace OpenAI.Audio { public partial class AudioTranslationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslationOptions(BinaryData file, InternalCreateTranslationRequestModel model, string prompt, AudioTranslationFormat? responseFormat, float? temperature, IDictionary serializedAdditionalRawData) + internal AudioTranslationOptions(BinaryData @file, InternalCreateTranslationRequestModel model, string prompt, Audio.AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) { - File = file; + File = @file; Model = model; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string Prompt { get; set; } - public AudioTranslationFormat? ResponseFormat { get; set; } + + public Audio.AudioTranslationFormat? ResponseFormat { get; set; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 87d34ee83..571f6d545 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -7,83 +7,74 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatCompletion : IJsonModel { + internal ChatCompletion() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletion)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) - { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (var item in Choices) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(_serviceTier)) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(ServiceTier)) { - if (_serviceTier != null) + if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(_serviceTier.Value.ToString()); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { - writer.WriteNull("service_tier"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint)) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,102 +83,103 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - ChatCompletion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatCompletion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatCompletion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletion)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatCompletion(document.RootElement, options); } - internal static ChatCompletion DeserializeChatCompletion(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatCompletion DeserializeChatCompletion(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - IReadOnlyList choices = default; + IList choices = default; DateTimeOffset created = default; string model = default; InternalCreateChatCompletionResponseServiceTier? serviceTier = default; string systemFingerprint = default; InternalCreateChatCompletionResponseObject @object = default; ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("choices"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalCreateChatCompletionResponseChoice.DeserializeInternalCreateChatCompletionResponseChoice(item, options)); } choices = array; continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("created"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { serviceTier = null; continue; } - serviceTier = new InternalCreateChatCompletionResponseServiceTier(property.Value.GetString()); + serviceTier = new InternalCreateChatCompletionResponseServiceTier(prop.Value.GetString()); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { - systemFingerprint = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + systemFingerprint = null; + continue; + } + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalCreateChatCompletionResponseObject(property.Value.GetString()); + @object = new InternalCreateChatCompletionResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + usage = null; continue; } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ChatCompletion( id, choices, @@ -197,13 +189,14 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo systemFingerprint, @object, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -213,15 +206,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ChatCompletion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatCompletion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatCompletion(document.RootElement, options); } default: @@ -231,15 +225,16 @@ ChatCompletion IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatCompletion FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatCompletion chatCompletion) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatCompletion(document.RootElement); + return BinaryContent.Create(chatCompletion, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatCompletion(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatCompletion(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 74549a43e..10171010b 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -10,40 +10,37 @@ namespace OpenAI.Chat { public partial class ChatCompletion { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ChatCompletion(string id, IEnumerable choices, DateTimeOffset createdAt, string model) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); + private protected IDictionary _additionalBinaryDataProperties; + internal ChatCompletion(string id, IEnumerable choices, DateTimeOffset created, string model) + { Id = id; Choices = choices.ToList(); - CreatedAt = createdAt; + Created = created; Model = model; } - internal ChatCompletion(string id, IReadOnlyList choices, DateTimeOffset createdAt, string model, InternalCreateChatCompletionResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal ChatCompletion(string id, IList choices, DateTimeOffset created, string model, InternalCreateChatCompletionResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionResponseObject @object, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) { Id = id; Choices = choices; - CreatedAt = createdAt; + Created = created; Model = model; - _serviceTier = serviceTier; + ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; Object = @object; Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ChatCompletion() - { - } + public string Id { get; set; } + + public string Model { get; set; } + + public InternalCreateChatCompletionResponseServiceTier? ServiceTier { get; set; } - public string Id { get; } - public string Model { get; } - public string SystemFingerprint { get; } + public string SystemFingerprint { get; set; } - public ChatTokenUsage Usage { get; } + public ChatTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 018cb9006..d892fca30 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,24 +15,28 @@ public partial class ChatCompletionOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("messages") != true) + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (var item in Messages) { - writer.WritePropertyName("messages"u8); - SerializeMessagesValue(writer, options); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("frequency_penalty") != true && Optional.IsDefined(FrequencyPenalty)) + writer.WriteEndArray(); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Optional.IsDefined(FrequencyPenalty)) { if (FrequencyPenalty != null) { @@ -40,70 +45,76 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("frequency_penalty"); + writer.WriteNull("frequencyPenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("logit_bias") != true && Optional.IsCollectionDefined(LogitBiases)) + if (Optional.IsCollectionDefined(LogitBias)) { - if (LogitBiases != null) + if (LogitBias != null) { writer.WritePropertyName("logit_bias"u8); - SerializeLogitBiasesValue(writer, options); + writer.WriteStartObject(); + foreach (var item in LogitBias) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("logit_bias"); + writer.WriteNull("logitBias"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("logprobs") != true && Optional.IsDefined(IncludeLogProbabilities)) + if (Optional.IsDefined(Logprobs)) { - if (IncludeLogProbabilities != null) + if (Logprobs != null) { writer.WritePropertyName("logprobs"u8); - writer.WriteBooleanValue(IncludeLogProbabilities.Value); + writer.WriteBooleanValue(Logprobs.Value); } else { - writer.WriteNull("logprobs"); + writer.WriteNull("logprobs"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_logprobs") != true && Optional.IsDefined(TopLogProbabilityCount)) + if (Optional.IsDefined(TopLogprobs)) { - if (TopLogProbabilityCount != null) + if (TopLogprobs != null) { writer.WritePropertyName("top_logprobs"u8); - writer.WriteNumberValue(TopLogProbabilityCount.Value); + writer.WriteNumberValue(TopLogprobs.Value); } else { - writer.WriteNull("top_logprobs"); + writer.WriteNull("topLogprobs"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_tokens") != true && Optional.IsDefined(_deprecatedMaxTokens)) + if (Optional.IsDefined(MaxTokens)) { - if (_deprecatedMaxTokens != null) + if (MaxTokens != null) { writer.WritePropertyName("max_tokens"u8); - writer.WriteNumberValue(_deprecatedMaxTokens.Value); + writer.WriteNumberValue(MaxTokens.Value); } else { - writer.WriteNull("max_tokens"); + writer.WriteNull("maxTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true && Optional.IsDefined(MaxOutputTokenCount)) + if (Optional.IsDefined(MaxCompletionTokens)) { - if (MaxOutputTokenCount != null) + if (MaxCompletionTokens != null) { writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxOutputTokenCount.Value); + writer.WriteNumberValue(MaxCompletionTokens.Value); } else { - writer.WriteNull("max_completion_tokens"); + writer.WriteNull("maxCompletionTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(N)) { if (N != null) { @@ -112,10 +123,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("n"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("presence_penalty") != true && Optional.IsDefined(PresencePenalty)) + if (Optional.IsDefined(PresencePenalty)) { if (PresencePenalty != null) { @@ -124,15 +135,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("presence_penalty"); + writer.WriteNull("presencePenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteObjectValue(ResponseFormat, options); } - if (SerializedAdditionalRawData?.ContainsKey("seed") != true && Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed)) { if (Seed != null) { @@ -141,34 +152,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("seed"); + writer.WriteNull("seed"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(_serviceTier)) + if (Optional.IsDefined(ServiceTier)) { - if (_serviceTier != null) + if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(_serviceTier.Value.ToString()); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { - writer.WriteNull("service_tier"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stop") != true && Optional.IsCollectionDefined(StopSequences)) + if (Optional.IsDefined(Stop)) { - if (StopSequences != null) + if (Stop != null) { writer.WritePropertyName("stop"u8); - SerializeStopSequencesValue(writer, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Stop); +#else + using (JsonDocument document = JsonDocument.Parse(Stop)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("stop"); + writer.WriteNull("stop"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream)) { if (Stream != null) { @@ -177,10 +195,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("stream"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream_options") != true && Optional.IsDefined(StreamOptions)) + if (Optional.IsDefined(StreamOptions)) { if (StreamOptions != null) { @@ -189,10 +207,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("stream_options"); + writer.WriteNull("streamOptions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -201,10 +219,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP)) { if (TopP != null) { @@ -213,10 +231,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -226,27 +244,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice)) { writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolChoice, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(ParallelToolCallsEnabled)) + if (Optional.IsDefined(ParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); + writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(EndUserId); + writer.WriteStringValue(User); } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionChoice)) + if (Optional.IsDefined(FunctionCall)) { writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionChoice, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(FunctionCall); +#else + using (JsonDocument document = JsonDocument.Parse(FunctionCall)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("functions") != true && Optional.IsCollectionDefined(Functions)) + if (Optional.IsCollectionDefined(Functions)) { writer.WritePropertyName("functions"u8); writer.WriteStartArray(); @@ -256,17 +288,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -275,25 +303,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - ChatCompletionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatCompletionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatCompletionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatCompletionOptions(document.RootElement, options); } - internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -301,7 +327,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme IList messages = default; InternalCreateChatCompletionRequestModel model = default; float? frequencyPenalty = default; - IDictionary logitBias = default; + IDictionary logitBias = default; bool? logprobs = default; int? topLogprobs = default; int? maxTokens = default; @@ -311,257 +337,277 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme ChatResponseFormat responseFormat = default; long? seed = default; InternalCreateChatCompletionRequestServiceTier? serviceTier = default; - IList stop = default; + BinaryData stop = default; bool? stream = default; InternalChatCompletionStreamOptions streamOptions = default; float? temperature = default; float? topP = default; IList tools = default; - ChatToolChoice toolChoice = default; + BinaryData toolChoice = default; bool? parallelToolCalls = default; string user = default; - ChatFunctionChoice functionCall = default; + BinaryData functionCall = default; IList functions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("messages"u8)) + if (prop.NameEquals("messages"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatMessage.DeserializeChatMessage(item, options)); } messages = array; continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateChatCompletionRequestModel(property.Value.GetString()); + model = new InternalCreateChatCompletionRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("frequency_penalty"u8)) + if (prop.NameEquals("frequency_penalty"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { frequencyPenalty = null; continue; } - frequencyPenalty = property.Value.GetSingle(); + frequencyPenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("logit_bias"u8)) + if (prop.NameEquals("logit_bias"u8)) { - DeserializeLogitBiasesValue(property, ref logitBias); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, prop0.Value.GetInt32()); + } + logitBias = dictionary; continue; } - if (property.NameEquals("logprobs"u8)) + if (prop.NameEquals("logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { logprobs = null; continue; } - logprobs = property.Value.GetBoolean(); + logprobs = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("top_logprobs"u8)) + if (prop.NameEquals("top_logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topLogprobs = null; continue; } - topLogprobs = property.Value.GetInt32(); + topLogprobs = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_tokens"u8)) + if (prop.NameEquals("max_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxTokens = null; continue; } - maxTokens = property.Value.GetInt32(); + maxTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxCompletionTokens = null; continue; } - maxCompletionTokens = property.Value.GetInt32(); + maxCompletionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { n = null; continue; } - n = property.Value.GetInt32(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("presence_penalty"u8)) + if (prop.NameEquals("presence_penalty"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { presencePenalty = null; continue; } - presencePenalty = property.Value.GetSingle(); + presencePenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(property.Value, options); + responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); continue; } - if (property.NameEquals("seed"u8)) + if (prop.NameEquals("seed"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { seed = null; continue; } - seed = property.Value.GetInt64(); + seed = prop.Value.GetInt64(); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { serviceTier = null; continue; } - serviceTier = new InternalCreateChatCompletionRequestServiceTier(property.Value.GetString()); + serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (property.NameEquals("stop"u8)) + if (prop.NameEquals("stop"u8)) { - DeserializeStopSequencesValue(property, ref stop); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + stop = null; + continue; + } + stop = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stream = null; continue; } - stream = property.Value.GetBoolean(); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("stream_options"u8)) + if (prop.NameEquals("stream_options"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { streamOptions = null; continue; } - streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(property.Value, options); + streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(prop.Value, options); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTool.DeserializeChatTool(item, options)); } tools = array; continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + toolChoice = null; continue; } - toolChoice = ChatToolChoice.DeserializeChatToolChoice(property.Value, options); + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parallelToolCalls = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("function_call"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + functionCall = null; continue; } - functionCall = ChatFunctionChoice.DeserializeChatFunctionChoice(property.Value, options); + functionCall = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("functions"u8)) + if (prop.NameEquals("functions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatFunction.DeserializeChatFunction(item, options)); } functions = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ChatCompletionOptions( messages, model, frequencyPenalty, - logitBias ?? new ChangeTrackingDictionary(), + logitBias ?? new ChangeTrackingDictionary(), logprobs, topLogprobs, maxTokens, @@ -571,7 +617,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme responseFormat, seed, serviceTier, - stop ?? new ChangeTrackingList(), + stop, stream, streamOptions, temperature, @@ -582,13 +628,14 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme user, functionCall, functions ?? new ChangeTrackingList(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -598,15 +645,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - ChatCompletionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatCompletionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatCompletionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatCompletionOptions(document.RootElement, options); } default: @@ -616,15 +664,16 @@ ChatCompletionOptions IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatCompletionOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatCompletionOptions chatCompletionOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatCompletionOptions(document.RootElement); + return BinaryContent.Create(chatCompletionOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatCompletionOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatCompletionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index 4e3e063b6..a5fa430d4 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -4,47 +4,54 @@ using System; using System.Collections.Generic; -using System.Linq; namespace OpenAI.Chat { public partial class ChatCompletionOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(IList messages, InternalCreateChatCompletionRequestModel model, float? frequencyPenalty, IDictionary logitBiases, bool? includeLogProbabilities, int? topLogProbabilityCount, int? deprecatedMaxTokens, int? maxOutputTokenCount, int? n, float? presencePenalty, ChatResponseFormat responseFormat, long? seed, InternalCreateChatCompletionRequestServiceTier? serviceTier, IList stopSequences, bool? stream, InternalChatCompletionStreamOptions streamOptions, float? temperature, float? topP, IList tools, ChatToolChoice toolChoice, bool? parallelToolCallsEnabled, string endUserId, ChatFunctionChoice functionChoice, IList functions, IDictionary serializedAdditionalRawData) + internal ChatCompletionOptions(IList messages, InternalCreateChatCompletionRequestModel model, float? frequencyPenalty, IDictionary logitBias, bool? logprobs, int? topLogprobs, int? maxTokens, int? maxCompletionTokens, int? n, float? presencePenalty, ChatResponseFormat responseFormat, long? seed, InternalCreateChatCompletionRequestServiceTier? serviceTier, BinaryData stop, bool? stream, InternalChatCompletionStreamOptions streamOptions, float? temperature, float? topP, IList tools, BinaryData toolChoice, bool? parallelToolCalls, string user, BinaryData functionCall, IList functions, IDictionary additionalBinaryDataProperties) { Messages = messages; Model = model; FrequencyPenalty = frequencyPenalty; - LogitBiases = logitBiases; - IncludeLogProbabilities = includeLogProbabilities; - TopLogProbabilityCount = topLogProbabilityCount; - _deprecatedMaxTokens = deprecatedMaxTokens; - MaxOutputTokenCount = maxOutputTokenCount; + LogitBias = logitBias; + Logprobs = logprobs; + TopLogprobs = topLogprobs; + MaxTokens = maxTokens; + MaxCompletionTokens = maxCompletionTokens; N = n; PresencePenalty = presencePenalty; ResponseFormat = responseFormat; Seed = seed; - _serviceTier = serviceTier; - StopSequences = stopSequences; + ServiceTier = serviceTier; + Stop = stop; Stream = stream; StreamOptions = streamOptions; Temperature = temperature; TopP = topP; Tools = tools; ToolChoice = toolChoice; - ParallelToolCallsEnabled = parallelToolCallsEnabled; - EndUserId = endUserId; - FunctionChoice = functionChoice; + ParallelToolCalls = parallelToolCalls; + User = user; + FunctionCall = functionCall; Functions = functions; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public float? FrequencyPenalty { get; set; } + public float? PresencePenalty { get; set; } + public ChatResponseFormat ResponseFormat { get; set; } + + public InternalCreateChatCompletionRequestServiceTier? ServiceTier { get; set; } + public float? Temperature { get; set; } + public float? TopP { get; set; } + public IList Tools { get; } } } diff --git a/.dotnet/src/Generated/Models/ChatFinishReason.Serialization.cs b/.dotnet/src/Generated/Models/ChatFinishReason.Serialization.cs index 3bfd77465..63be95cef 100644 --- a/.dotnet/src/Generated/Models/ChatFinishReason.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFinishReason.Serialization.cs @@ -8,23 +8,38 @@ namespace OpenAI.Chat { internal static partial class ChatFinishReasonExtensions { - public static string ToSerialString(this ChatFinishReason value) => value switch + public static string ToSerialString(this Chat.ChatFinishReason value) => value switch { - ChatFinishReason.Stop => "stop", - ChatFinishReason.Length => "length", - ChatFinishReason.ToolCalls => "tool_calls", - ChatFinishReason.ContentFilter => "content_filter", - ChatFinishReason.FunctionCall => "function_call", + Chat.ChatFinishReason.Stop => "stop", + Chat.ChatFinishReason.Length => "length", + Chat.ChatFinishReason.ToolCalls => "tool_calls", + Chat.ChatFinishReason.ContentFilter => "content_filter", + Chat.ChatFinishReason.FunctionCall => "function_call", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatFinishReason value.") }; - public static ChatFinishReason ToChatFinishReason(this string value) + public static Chat.ChatFinishReason ToChatFinishReason(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "stop")) return ChatFinishReason.Stop; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "length")) return ChatFinishReason.Length; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "tool_calls")) return ChatFinishReason.ToolCalls; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "content_filter")) return ChatFinishReason.ContentFilter; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "function_call")) return ChatFinishReason.FunctionCall; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "stop")) + { + return Chat.ChatFinishReason.Stop; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "length")) + { + return Chat.ChatFinishReason.Length; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "tool_calls")) + { + return Chat.ChatFinishReason.ToolCalls; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "content_filter")) + { + return Chat.ChatFinishReason.ContentFilter; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function_call")) + { + return Chat.ChatFinishReason.FunctionCall; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatFinishReason value."); } } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index 8974ea692..20c5a896e 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -7,53 +7,49 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatFunction : IJsonModel { + internal ChatFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(FunctionDescription)) + if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteStringValue(FunctionDescription); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(FunctionName); + writer.WriteStringValue(Description); } - if (SerializedAdditionalRawData?.ContainsKey("parameters") != true && Optional.IsDefined(FunctionParameters)) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("parameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(FunctionParameters); -#else - using (JsonDocument document = JsonDocument.Parse(FunctionParameters)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(Parameters, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,69 +58,71 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } - ChatFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatFunction(document.RootElement, options); } - internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string description = default; string name = default; - BinaryData parameters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalFunctionParameters parameters = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - description = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("parameters"u8)) + if (prop.NameEquals("parameters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parameters = null; continue; } - parameters = BinaryData.FromString(property.Value.GetRawText()); + parameters = InternalFunctionParameters.DeserializeInternalFunctionParameters(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatFunction(description, name, parameters, serializedAdditionalRawData); + return new ChatFunction(description, name, parameters, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +132,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions option } } - ChatFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatFunction(document.RootElement, options); } default: @@ -152,15 +151,16 @@ ChatFunction IPersistableModel.Create(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatFunction chatFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatFunction(document.RootElement); + return BinaryContent.Create(chatFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatFunction.cs b/.dotnet/src/Generated/Models/ChatFunction.cs index e3abf7d89..bc7cc08d9 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.cs @@ -9,18 +9,14 @@ namespace OpenAI.Chat { public partial class ChatFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatFunction(string functionDescription, string functionName, BinaryData functionParameters, IDictionary serializedAdditionalRawData) - { - FunctionDescription = functionDescription; - FunctionName = functionName; - FunctionParameters = functionParameters; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ChatFunction() + internal ChatFunction(string description, string name, InternalFunctionParameters parameters, IDictionary additionalBinaryDataProperties) { + Description = description; + Name = name; + Parameters = parameters; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index f5f498a8f..cf0c99b37 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatFunctionCall : IJsonModel { + internal ChatFunctionCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(FunctionArguments); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(FunctionName); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - ChatFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatFunctionCall(document.RootElement, options); } - internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string arguments = default; string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatFunctionCall(arguments, name, serializedAdditionalRawData); + return new ChatFunctionCall(arguments, name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - ChatFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatFunctionCall(document.RootElement, options); } default: @@ -130,15 +127,16 @@ ChatFunctionCall IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatFunctionCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatFunctionCall chatFunctionCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatFunctionCall(document.RootElement); + return BinaryContent.Create(chatFunctionCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatFunctionCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatFunctionCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.cs index d10f638aa..511289fe0 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.cs @@ -9,17 +9,13 @@ namespace OpenAI.Chat { public partial class ChatFunctionCall { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatFunctionCall(string functionArguments, string functionName, IDictionary serializedAdditionalRawData) - { - FunctionArguments = functionArguments; - FunctionName = functionName; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ChatFunctionCall() + internal ChatFunctionCall(string arguments, string name, IDictionary additionalBinaryDataProperties) { + Arguments = arguments; + Name = name; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index eb482e954..24fc11423 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -5,28 +5,80 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatFunctionChoice : IJsonModel { - ChatFunctionChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ChatFunctionChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatFunctionChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatFunctionChoice(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static ChatFunctionChoice DeserializeChatFunctionChoice(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ChatFunctionChoice(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +88,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - ChatFunctionChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatFunctionChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatFunctionChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatFunctionChoice(document.RootElement, options); } default: @@ -54,15 +107,16 @@ ChatFunctionChoice IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatFunctionChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatFunctionChoice chatFunctionChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatFunctionChoice(document.RootElement); + return BinaryContent.Create(chatFunctionChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatFunctionChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatFunctionChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs index a103d4f41..703d58331 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatFunctionChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs b/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs index 28d44ae56..c363a5495 100644 --- a/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs +++ b/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { public readonly partial struct ChatImageDetailLevel : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LowValue = "low"; + private const string HighValue = "high"; public ChatImageDetailLevel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; + _value = value; + } public static ChatImageDetailLevel Auto { get; } = new ChatImageDetailLevel(AutoValue); + public static ChatImageDetailLevel Low { get; } = new ChatImageDetailLevel(LowValue); + public static ChatImageDetailLevel High { get; } = new ChatImageDetailLevel(HighValue); + public static bool operator ==(ChatImageDetailLevel left, ChatImageDetailLevel right) => left.Equals(right); + public static bool operator !=(ChatImageDetailLevel left, ChatImageDetailLevel right) => !left.Equals(right); + public static implicit operator ChatImageDetailLevel(string value) => new ChatImageDetailLevel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ChatImageDetailLevel other && Equals(other); + public bool Equals(ChatImageDetailLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 971105a95..985972ece 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -6,52 +6,89 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; -using OpenAI.FineTuning; +using OpenAI; namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatMessage))] - public partial class ChatMessage : IJsonModel + public abstract partial class ChatMessage : IJsonModel { - ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatMessage(document.RootElement, options); } - internal static ChatMessage DeserializeChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatMessage DeserializeChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("role", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case null: return InternalFineTuneChatCompletionRequestAssistantMessage.DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(element, options); - case "assistant": return AssistantChatMessage.DeserializeAssistantChatMessage(element, options); - case "function": return FunctionChatMessage.DeserializeFunctionChatMessage(element, options); - case "system": return SystemChatMessage.DeserializeSystemChatMessage(element, options); - case "tool": return ToolChatMessage.DeserializeToolChatMessage(element, options); - case "user": return UserChatMessage.DeserializeUserChatMessage(element, options); + case "system": + return SystemChatMessage.DeserializeSystemChatMessage(element, options); + case "user": + return UserChatMessage.DeserializeUserChatMessage(element, options); + case "assistant": + return AssistantChatMessage.DeserializeAssistantChatMessage(element, options); + case "tool": + return ToolChatMessage.DeserializeToolChatMessage(element, options); + case "function": + return FunctionChatMessage.DeserializeFunctionChatMessage(element, options); } } return InternalUnknownChatMessage.DeserializeInternalUnknownChatMessage(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -61,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatMessage(document.RootElement, options); } default: @@ -79,15 +117,16 @@ ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWr string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatMessage chatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatMessage(document.RootElement); + return BinaryContent.Create(chatMessage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 06a9f1adb..5f65ad64b 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -9,13 +9,17 @@ namespace OpenAI.Chat { public abstract partial class ChatMessage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData) + private protected ChatMessage(string role) { Role = role; - Content = content; - SerializedAdditionalRawData = serializedAdditionalRawData; + } + + internal ChatMessage(string role, IDictionary additionalBinaryDataProperties) + { + Role = role; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index aa068ae4d..de1bedc0b 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -5,28 +5,80 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatMessageContentPart : IJsonModel { - ChatMessageContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ChatMessageContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatMessageContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatMessageContentPart(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static ChatMessageContentPart DeserializeChatMessageContentPart(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ChatMessageContentPart(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +88,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - ChatMessageContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatMessageContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatMessageContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatMessageContentPart(document.RootElement, options); } default: @@ -54,15 +107,16 @@ ChatMessageContentPart IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatMessageContentPart FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatMessageContentPart chatMessageContentPart) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatMessageContentPart(document.RootElement); + return BinaryContent.Create(chatMessageContentPart, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatMessageContentPart(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatMessageContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs index ac4ef86e6..a667cb99e 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatMessageContentPart { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatMessageRole.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageRole.Serialization.cs index 4380b11e4..55d2b2eaf 100644 --- a/.dotnet/src/Generated/Models/ChatMessageRole.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageRole.Serialization.cs @@ -8,23 +8,38 @@ namespace OpenAI.Chat { internal static partial class ChatMessageRoleExtensions { - public static string ToSerialString(this ChatMessageRole value) => value switch + public static string ToSerialString(this Chat.ChatMessageRole value) => value switch { - ChatMessageRole.System => "system", - ChatMessageRole.User => "user", - ChatMessageRole.Assistant => "assistant", - ChatMessageRole.Tool => "tool", - ChatMessageRole.Function => "function", + Chat.ChatMessageRole.System => "system", + Chat.ChatMessageRole.User => "user", + Chat.ChatMessageRole.Assistant => "assistant", + Chat.ChatMessageRole.Tool => "tool", + Chat.ChatMessageRole.Function => "function", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatMessageRole value.") }; - public static ChatMessageRole ToChatMessageRole(this string value) + public static Chat.ChatMessageRole ToChatMessageRole(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "system")) return ChatMessageRole.System; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) return ChatMessageRole.User; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) return ChatMessageRole.Assistant; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "tool")) return ChatMessageRole.Tool; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) return ChatMessageRole.Function; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "system")) + { + return Chat.ChatMessageRole.System; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) + { + return Chat.ChatMessageRole.User; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) + { + return Chat.ChatMessageRole.Assistant; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "tool")) + { + return Chat.ChatMessageRole.Tool; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) + { + return Chat.ChatMessageRole.Function; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatMessageRole value."); } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 3ef3edc7a..0cd89f94f 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,29 +15,30 @@ public partial class ChatOutputTokenUsageDetails : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatOutputTokenUsageDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reasoning_tokens") != true) + if (Optional.IsDefined(ReasoningTokens)) { writer.WritePropertyName("reasoning_tokens"u8); - writer.WriteNumberValue(ReasoningTokenCount); + writer.WriteNumberValue(ReasoningTokens.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,57 +47,54 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - ChatOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatOutputTokenUsageDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatOutputTokenUsageDetails(document.RootElement, options); } - internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - int reasoningTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int? reasoningTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("reasoning_tokens"u8)) + if (prop.NameEquals("reasoning_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + reasoningTokens = null; continue; } - reasoningTokens = property.Value.GetInt32(); + reasoningTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatOutputTokenUsageDetails(reasoningTokens, serializedAdditionalRawData); + return new ChatOutputTokenUsageDetails(reasoningTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +104,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - ChatOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatOutputTokenUsageDetails(document.RootElement, options); } default: @@ -123,15 +123,16 @@ ChatOutputTokenUsageDetails IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatOutputTokenUsageDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatOutputTokenUsageDetails chatOutputTokenUsageDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatOutputTokenUsageDetails(document.RootElement); + return BinaryContent.Create(chatOutputTokenUsageDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatOutputTokenUsageDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatOutputTokenUsageDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs index 88bc8370c..ccb4c5f40 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs @@ -9,15 +9,16 @@ namespace OpenAI.Chat { public partial class ChatOutputTokenUsageDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal ChatOutputTokenUsageDetails() { } - internal ChatOutputTokenUsageDetails(int reasoningTokenCount, IDictionary serializedAdditionalRawData) + internal ChatOutputTokenUsageDetails(int? reasoningTokens, IDictionary additionalBinaryDataProperties) { - ReasoningTokenCount = reasoningTokenCount; - SerializedAdditionalRawData = serializedAdditionalRawData; + ReasoningTokens = reasoningTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 26c297851..941ff0e8d 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -6,48 +6,89 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatResponseFormat))] - public partial class ChatResponseFormat : IJsonModel + public abstract partial class ChatResponseFormat : IJsonModel { - ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal ChatResponseFormat() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + + ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + protected virtual ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatResponseFormat(document.RootElement, options); } - internal static ChatResponseFormat DeserializeChatResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatResponseFormat DeserializeChatResponseFormat(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "json_object": return InternalChatResponseFormatJsonObject.DeserializeInternalChatResponseFormatJsonObject(element, options); - case "json_schema": return InternalChatResponseFormatJsonSchema.DeserializeInternalChatResponseFormatJsonSchema(element, options); - case "text": return InternalChatResponseFormatText.DeserializeInternalChatResponseFormatText(element, options); + case "text": + return InternalChatResponseFormatText.DeserializeInternalChatResponseFormatText(element, options); + case "json_object": + return InternalChatResponseFormatJsonObject.DeserializeInternalChatResponseFormatJsonObject(element, options); + case "json_schema": + return InternalChatResponseFormatJsonSchema.DeserializeInternalChatResponseFormatJsonSchema(element, options); } } return InternalUnknownChatResponseFormat.DeserializeInternalUnknownChatResponseFormat(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -57,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatResponseFormat(document.RootElement, options); } default: @@ -75,15 +117,16 @@ ChatResponseFormat IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatResponseFormat FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatResponseFormat chatResponseFormat) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatResponseFormat(document.RootElement); + return BinaryContent.Create(chatResponseFormat, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatResponseFormat(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatResponseFormat(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index 54eb0a8bd..622c8284d 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -9,15 +9,17 @@ namespace OpenAI.Chat { public abstract partial class ChatResponseFormat { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ChatResponseFormat() + private protected IDictionary _additionalBinaryDataProperties; + + private protected ChatResponseFormat(string @type) { + Type = @type; } - internal ChatResponseFormat(string type, IDictionary serializedAdditionalRawData) + internal ChatResponseFormat(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index eea644f3a..1c411b863 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -7,68 +7,62 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTokenLogProbabilityDetails : IJsonModel { + internal ChatTokenLogProbabilityDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenLogProbabilityDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("token") != true) + writer.WritePropertyName("token"u8); + writer.WriteStringValue(Token); + writer.WritePropertyName("logprob"u8); + writer.WriteNumberValue(Logprob); + if (Bytes != null && Optional.IsCollectionDefined(Bytes)) { - writer.WritePropertyName("token"u8); - writer.WriteStringValue(Token); - } - if (SerializedAdditionalRawData?.ContainsKey("logprob") != true) - { - writer.WritePropertyName("logprob"u8); - writer.WriteNumberValue(LogProbability); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - if (Utf8Bytes != null) - { - writer.WritePropertyName("bytes"u8); - writer.WriteStartArray(); - foreach (var item in Utf8Bytes.Value.Span) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("bytes"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("top_logprobs") != true) - { - writer.WritePropertyName("top_logprobs"u8); + writer.WritePropertyName("bytes"u8); writer.WriteStartArray(); - foreach (var item in TopLogProbabilities) + foreach (var item in Bytes) { - writer.WriteObjectValue(item, options); + writer.WriteNumberValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + else + { + writer.WriteNull("bytes"u8); + } + writer.WritePropertyName("top_logprobs"u8); + writer.WriteStartArray(); + foreach (var item in TopLogprobs) { - foreach (var item in SerializedAdditionalRawData) + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -77,87 +71,82 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } - ChatTokenLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatTokenLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatTokenLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenLogProbabilityDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatTokenLogProbabilityDetails(document.RootElement, options); } - internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilityDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilityDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string token = default; float logprob = default; - ReadOnlyMemory? bytes = default; - IReadOnlyList topLogprobs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList bytes = default; + IList topLogprobs = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("token"u8)) + if (prop.NameEquals("token"u8)) { - token = property.Value.GetString(); + token = prop.Value.GetString(); continue; } - if (property.NameEquals("logprob"u8)) + if (prop.NameEquals("logprob"u8)) { - logprob = property.Value.GetSingle(); + logprob = prop.Value.GetSingle(); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + bytes = new ChangeTrackingList(); continue; } - int index = 0; - byte[] array = new byte[property.Value.GetArrayLength()]; - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - array[index] = item.GetByte(); - index++; + array.Add(item.GetInt32()); } - bytes = new ReadOnlyMemory?(array); + bytes = array; continue; } - if (property.NameEquals("top_logprobs"u8)) + if (prop.NameEquals("top_logprobs"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTokenTopLogProbabilityDetails.DeserializeChatTokenTopLogProbabilityDetails(item, options)); } topLogprobs = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatTokenLogProbabilityDetails(token, logprob, bytes, topLogprobs, serializedAdditionalRawData); + return new ChatTokenLogProbabilityDetails(token, logprob, bytes, topLogprobs, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -167,15 +156,16 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - ChatTokenLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatTokenLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatTokenLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatTokenLogProbabilityDetails(document.RootElement, options); } default: @@ -185,15 +175,16 @@ ChatTokenLogProbabilityDetails IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatTokenLogProbabilityDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatTokenLogProbabilityDetails chatTokenLogProbabilityDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatTokenLogProbabilityDetails(document.RootElement); + return BinaryContent.Create(chatTokenLogProbabilityDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatTokenLogProbabilityDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatTokenLogProbabilityDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs index 4443ad92e..c54c3538e 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs @@ -10,31 +10,25 @@ namespace OpenAI.Chat { public partial class ChatTokenLogProbabilityDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IEnumerable topLogProbabilities) - { - Argument.AssertNotNull(token, nameof(token)); - Argument.AssertNotNull(topLogProbabilities, nameof(topLogProbabilities)); + private protected IDictionary _additionalBinaryDataProperties; - Token = token; - LogProbability = logProbability; - Utf8Bytes = utf8Bytes; - TopLogProbabilities = topLogProbabilities.ToList(); - } - - internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IReadOnlyList topLogProbabilities, IDictionary serializedAdditionalRawData) + internal ChatTokenLogProbabilityDetails(string token, float logprob, IEnumerable bytes, IEnumerable topLogprobs) { Token = token; - LogProbability = logProbability; - Utf8Bytes = utf8Bytes; - TopLogProbabilities = topLogProbabilities; - SerializedAdditionalRawData = serializedAdditionalRawData; + Logprob = logprob; + Bytes = bytes?.ToList(); + TopLogprobs = topLogprobs.ToList(); } - internal ChatTokenLogProbabilityDetails() + internal ChatTokenLogProbabilityDetails(string token, float logprob, IList bytes, IList topLogprobs, IDictionary additionalBinaryDataProperties) { + Token = token; + Logprob = logprob; + Bytes = bytes; + TopLogprobs = topLogprobs; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Token { get; } + public string Token { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 6f72f1a45..8154ecc04 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -7,58 +7,55 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTokenTopLogProbabilityDetails : IJsonModel { + internal ChatTokenTopLogProbabilityDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenTopLogProbabilityDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("token") != true) - { - writer.WritePropertyName("token"u8); - writer.WriteStringValue(Token); - } - if (SerializedAdditionalRawData?.ContainsKey("logprob") != true) + writer.WritePropertyName("token"u8); + writer.WriteStringValue(Token); + writer.WritePropertyName("logprob"u8); + writer.WriteNumberValue(Logprob); + if (Bytes != null && Optional.IsCollectionDefined(Bytes)) { - writer.WritePropertyName("logprob"u8); - writer.WriteNumberValue(LogProbability); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - if (Utf8Bytes != null) + writer.WritePropertyName("bytes"u8); + writer.WriteStartArray(); + foreach (var item in Bytes) { - writer.WritePropertyName("bytes"u8); - writer.WriteStartArray(); - foreach (var item in Utf8Bytes.Value.Span) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("bytes"); + writer.WriteNumberValue(item); } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("bytes"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -67,76 +64,71 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - ChatTokenTopLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatTokenTopLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatTokenTopLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenTopLogProbabilityDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatTokenTopLogProbabilityDetails(document.RootElement, options); } - internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProbabilityDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProbabilityDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string token = default; float logprob = default; - ReadOnlyMemory? bytes = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList bytes = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("token"u8)) + if (prop.NameEquals("token"u8)) { - token = property.Value.GetString(); + token = prop.Value.GetString(); continue; } - if (property.NameEquals("logprob"u8)) + if (prop.NameEquals("logprob"u8)) { - logprob = property.Value.GetSingle(); + logprob = prop.Value.GetSingle(); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + bytes = new ChangeTrackingList(); continue; } - int index = 0; - byte[] array = new byte[property.Value.GetArrayLength()]; - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - array[index] = item.GetByte(); - index++; + array.Add(item.GetInt32()); } - bytes = new ReadOnlyMemory?(array); + bytes = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatTokenTopLogProbabilityDetails(token, logprob, bytes, serializedAdditionalRawData); + return new ChatTokenTopLogProbabilityDetails(token, logprob, bytes, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -146,15 +138,16 @@ BinaryData IPersistableModel.Write(ModelReade } } - ChatTokenTopLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatTokenTopLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatTokenTopLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatTokenTopLogProbabilityDetails(document.RootElement, options); } default: @@ -164,15 +157,16 @@ ChatTokenTopLogProbabilityDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatTokenTopLogProbabilityDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatTokenTopLogProbabilityDetails chatTokenTopLogProbabilityDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatTokenTopLogProbabilityDetails(document.RootElement); + return BinaryContent.Create(chatTokenTopLogProbabilityDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatTokenTopLogProbabilityDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatTokenTopLogProbabilityDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs index c02aa387b..5fe132edf 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs @@ -4,33 +4,29 @@ using System; using System.Collections.Generic; +using System.Linq; namespace OpenAI.Chat { public partial class ChatTokenTopLogProbabilityDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes) - { - Argument.AssertNotNull(token, nameof(token)); + private protected IDictionary _additionalBinaryDataProperties; - Token = token; - LogProbability = logProbability; - Utf8Bytes = utf8Bytes; - } - - internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IDictionary serializedAdditionalRawData) + internal ChatTokenTopLogProbabilityDetails(string token, float logprob, IEnumerable bytes) { Token = token; - LogProbability = logProbability; - Utf8Bytes = utf8Bytes; - SerializedAdditionalRawData = serializedAdditionalRawData; + Logprob = logprob; + Bytes = bytes?.ToList(); } - internal ChatTokenTopLogProbabilityDetails() + internal ChatTokenTopLogProbabilityDetails(string token, float logprob, IList bytes, IDictionary additionalBinaryDataProperties) { + Token = token; + Logprob = logprob; + Bytes = bytes; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Token { get; } + public string Token { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index 8a2854fb9..c7843a6ec 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -7,51 +7,48 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTokenUsage : IJsonModel { + internal ChatTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(OutputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(InputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens_details") != true && Optional.IsDefined(OutputTokenDetails)) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (Optional.IsDefined(CompletionTokensDetails)) { writer.WritePropertyName("completion_tokens_details"u8); - writer.WriteObjectValue(OutputTokenDetails, options); + writer.WriteObjectValue(CompletionTokensDetails, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,25 +57,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - ChatTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatTokenUsage(document.RootElement, options); } - internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -87,48 +82,47 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo int promptTokens = default; int totalTokens = default; ChatOutputTokenUsageDetails completionTokensDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + completionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + promptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("completion_tokens_details"u8)) + if (prop.NameEquals("completion_tokens_details"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + completionTokensDetails = null; continue; } - completionTokensDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(property.Value, options); + completionTokensDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatTokenUsage(completionTokens, promptTokens, totalTokens, completionTokensDetails, serializedAdditionalRawData); + return new ChatTokenUsage(completionTokens, promptTokens, totalTokens, completionTokensDetails, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -138,15 +132,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ChatTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatTokenUsage(document.RootElement, options); } default: @@ -156,15 +151,16 @@ ChatTokenUsage IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatTokenUsage chatTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatTokenUsage(document.RootElement); + return BinaryContent.Create(chatTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.cs index 098738c93..45798fd0c 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.cs @@ -9,25 +9,22 @@ namespace OpenAI.Chat { public partial class ChatTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) - { - OutputTokenCount = outputTokenCount; - InputTokenCount = inputTokenCount; - TotalTokenCount = totalTokenCount; - } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails, IDictionary serializedAdditionalRawData) + internal ChatTokenUsage(int completionTokens, int promptTokens, int totalTokens) { - OutputTokenCount = outputTokenCount; - InputTokenCount = inputTokenCount; - TotalTokenCount = totalTokenCount; - OutputTokenDetails = outputTokenDetails; - SerializedAdditionalRawData = serializedAdditionalRawData; + CompletionTokens = completionTokens; + PromptTokens = promptTokens; + TotalTokens = totalTokens; } - internal ChatTokenUsage() + internal ChatTokenUsage(int completionTokens, int promptTokens, int totalTokens, ChatOutputTokenUsageDetails completionTokensDetails, IDictionary additionalBinaryDataProperties) { + CompletionTokens = completionTokens; + PromptTokens = promptTokens; + TotalTokens = totalTokens; + CompletionTokensDetails = completionTokensDetails; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 78fbf981a..c934886bc 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTool : IJsonModel { + internal ChatTool() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTool)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - ChatTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTool)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatTool(document.RootElement, options); } - internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatToolKind type = default; + ChatToolKind @type = default; InternalFunctionDefinition function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new ChatToolKind(property.Value.GetString()); + @type = new ChatToolKind(prop.Value.GetString()); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(property.Value, options); + function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatTool(type, function, serializedAdditionalRawData); + return new ChatTool(@type, function, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatTool(document.RootElement, options); } default: @@ -130,15 +127,16 @@ ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOp string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatTool FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatTool chatTool) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatTool(document.RootElement); + return BinaryContent.Create(chatTool, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatTool(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatTool(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index d10b8bc5f..59e47d93c 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -4,22 +4,19 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTool { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatTool(ChatToolKind kind, InternalFunctionDefinition function, IDictionary serializedAdditionalRawData) + internal ChatTool(ChatToolKind @type, InternalFunctionDefinition function, IDictionary additionalBinaryDataProperties) { - Kind = kind; + Type = @type; Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ChatTool() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 0b17701a4..5c28fa4a1 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatToolCall : IJsonModel { + internal ChatToolCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatToolCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } - ChatToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatToolCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatToolCall(document.RootElement, options); } - internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - ChatToolCallKind type = default; + ChatToolCallKind @type = default; InternalChatCompletionMessageToolCallFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new ChatToolCallKind(property.Value.GetString()); + @type = new ChatToolCallKind(prop.Value.GetString()); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(property.Value, options); + function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatToolCall(id, type, function, serializedAdditionalRawData); + return new ChatToolCall(id, @type, function, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions option } } - ChatToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatToolCall(document.RootElement, options); } default: @@ -141,15 +135,16 @@ ChatToolCall IPersistableModel.Create(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatToolCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatToolCall chatToolCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatToolCall(document.RootElement); + return BinaryContent.Create(chatToolCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatToolCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatToolCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index 0d909e905..b768ace4e 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -9,18 +9,14 @@ namespace OpenAI.Chat { public partial class ChatToolCall { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatToolCall(string id, ChatToolCallKind kind, InternalChatCompletionMessageToolCallFunction function, IDictionary serializedAdditionalRawData) + internal ChatToolCall(string id, ChatToolCallKind @type, InternalChatCompletionMessageToolCallFunction function, IDictionary additionalBinaryDataProperties) { Id = id; - Kind = kind; + Type = @type; Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ChatToolCall() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Id { get; set; } diff --git a/.dotnet/src/Generated/Models/ChatToolCallKind.cs b/.dotnet/src/Generated/Models/ChatToolCallKind.cs index c75e67ca1..508688da4 100644 --- a/.dotnet/src/Generated/Models/ChatToolCallKind.cs +++ b/.dotnet/src/Generated/Models/ChatToolCallKind.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { public readonly partial struct ChatToolCallKind : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; public ChatToolCallKind(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; + _value = value; + } public static ChatToolCallKind Function { get; } = new ChatToolCallKind(FunctionValue); + public static bool operator ==(ChatToolCallKind left, ChatToolCallKind right) => left.Equals(right); + public static bool operator !=(ChatToolCallKind left, ChatToolCallKind right) => !left.Equals(right); + public static implicit operator ChatToolCallKind(string value) => new ChatToolCallKind(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ChatToolCallKind other && Equals(other); + public bool Equals(ChatToolCallKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index 9fd540965..7e7e75895 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -5,28 +5,80 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatToolChoice : IJsonModel { - ChatToolChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatToolChoice)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatToolChoice)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ChatToolChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatToolChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatToolChoice)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatToolChoice(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static ChatToolChoice DeserializeChatToolChoice(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ChatToolChoice(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +88,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ChatToolChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatToolChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatToolChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatToolChoice(document.RootElement, options); } default: @@ -54,15 +107,16 @@ ChatToolChoice IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatToolChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatToolChoice chatToolChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatToolChoice(document.RootElement); + return BinaryContent.Create(chatToolChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatToolChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatToolChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.cs b/.dotnet/src/Generated/Models/ChatToolChoice.cs index 5650611aa..79750a4a4 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatToolChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatToolKind.cs b/.dotnet/src/Generated/Models/ChatToolKind.cs index 793f2f7a0..43c1449ca 100644 --- a/.dotnet/src/Generated/Models/ChatToolKind.cs +++ b/.dotnet/src/Generated/Models/ChatToolKind.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { public readonly partial struct ChatToolKind : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; public ChatToolKind(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; + _value = value; + } public static ChatToolKind Function { get; } = new ChatToolKind(FunctionValue); + public static bool operator ==(ChatToolKind left, ChatToolKind right) => left.Equals(right); + public static bool operator !=(ChatToolKind left, ChatToolKind right) => !left.Equals(right); + public static implicit operator ChatToolKind(string value) => new ChatToolKind(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ChatToolKind other && Equals(other); + public bool Equals(ChatToolKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs index c1f2296db..c66be97ed 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs @@ -7,55 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class CodeInterpreterToolDefinition : IJsonModel { - CodeInterpreterToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + CodeInterpreterToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (CodeInterpreterToolDefinition)JsonModelCreateCore(ref reader, options); + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeCodeInterpreterToolDefinition(document.RootElement, options); } - internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "code_interpreter"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new CodeInterpreterToolDefinition(type, serializedAdditionalRawData); + return new CodeInterpreterToolDefinition(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -65,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - CodeInterpreterToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + CodeInterpreterToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (CodeInterpreterToolDefinition)PersistableModelCreateCore(data, options); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeCodeInterpreterToolDefinition(document.RootElement, options); } default: @@ -83,15 +99,16 @@ CodeInterpreterToolDefinition IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new CodeInterpreterToolDefinition FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(CodeInterpreterToolDefinition codeInterpreterToolDefinition) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCodeInterpreterToolDefinition(document.RootElement); + return BinaryContent.Create(codeInterpreterToolDefinition, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator CodeInterpreterToolDefinition(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeCodeInterpreterToolDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.cs index 1b330ab0d..05f625b85 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.cs @@ -9,12 +9,11 @@ namespace OpenAI.Assistants { public partial class CodeInterpreterToolDefinition : ToolDefinition { - public CodeInterpreterToolDefinition() + public CodeInterpreterToolDefinition() : base("code_interpreter") { - Type = "code_interpreter"; } - internal CodeInterpreterToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal CodeInterpreterToolDefinition(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 467dad787..43ccab118 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ public partial class CodeInterpreterToolResources : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(CodeInterpreterToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - CodeInterpreterToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CodeInterpreterToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual CodeInterpreterToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(CodeInterpreterToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeCodeInterpreterToolResources(document.RootElement, options); } - internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new CodeInterpreterToolResources(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new CodeInterpreterToolResources(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - CodeInterpreterToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + CodeInterpreterToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual CodeInterpreterToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeCodeInterpreterToolResources(document.RootElement, options); } default: @@ -133,15 +144,16 @@ CodeInterpreterToolResources IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static CodeInterpreterToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(CodeInterpreterToolResources codeInterpreterToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCodeInterpreterToolResources(document.RootElement); + return BinaryContent.Create(codeInterpreterToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator CodeInterpreterToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeCodeInterpreterToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs index 1735ff0f9..4c5e382c9 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs @@ -9,12 +9,12 @@ namespace OpenAI.Assistants { public partial class CodeInterpreterToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal CodeInterpreterToolResources(IList fileIds, IDictionary serializedAdditionalRawData) + internal CodeInterpreterToolResources(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/Embedding.Serialization.cs b/.dotnet/src/Generated/Models/Embedding.Serialization.cs index 93a723fe5..a85c31e86 100644 --- a/.dotnet/src/Generated/Models/Embedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/Embedding.Serialization.cs @@ -7,53 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class Embedding : IJsonModel { + internal Embedding() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(Embedding)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("embedding") != true) - { - writer.WritePropertyName("embedding"u8); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + writer.WritePropertyName("embedding"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(EmbeddingProperty); + writer.WriteRawValue(Embedding); #else - using (JsonDocument document = JsonDocument.Parse(EmbeddingProperty)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + using (JsonDocument document = JsonDocument.Parse(Embedding)) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + JsonSerializer.Serialize(writer, document.RootElement); } - if (SerializedAdditionalRawData != null) +#endif + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,25 +59,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - Embedding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + Embedding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual Embedding JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(Embedding)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeEmbedding(document.RootElement, options); } - internal static Embedding DeserializeEmbedding(JsonElement element, ModelReaderWriterOptions options = null) + internal static Embedding DeserializeEmbedding(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -88,39 +83,37 @@ internal static Embedding DeserializeEmbedding(JsonElement element, ModelReaderW int index = default; BinaryData embedding = default; InternalEmbeddingObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("embedding"u8)) + if (prop.NameEquals("embedding"u8)) { - embedding = BinaryData.FromString(property.Value.GetRawText()); + embedding = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalEmbeddingObject(property.Value.GetString()); + @object = new InternalEmbeddingObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new Embedding(index, embedding, @object, serializedAdditionalRawData); + return new Embedding(index, embedding, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +123,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - Embedding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + Embedding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual Embedding PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeEmbedding(document.RootElement, options); } default: @@ -148,15 +142,16 @@ Embedding IPersistableModel.Create(BinaryData data, ModelReaderWriter string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static Embedding FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(Embedding embedding) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEmbedding(document.RootElement); + return BinaryContent.Create(embedding, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator Embedding(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeEmbedding(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/Embedding.cs b/.dotnet/src/Generated/Models/Embedding.cs index b8eb10978..7225eee4c 100644 --- a/.dotnet/src/Generated/Models/Embedding.cs +++ b/.dotnet/src/Generated/Models/Embedding.cs @@ -9,12 +9,8 @@ namespace OpenAI.Embeddings { public partial class Embedding { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal Embedding() - { - } - - public int Index { get; } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs index d569d5592..8aefb6a4e 100644 --- a/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs @@ -5,28 +5,122 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class EmbeddingCollection : IJsonModel { - EmbeddingCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + EmbeddingCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual EmbeddingCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeEmbeddingCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static EmbeddingCollection DeserializeEmbeddingCollection(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList data = default; + string model = default; + InternalCreateEmbeddingResponseObject @object = default; + EmbeddingTokenUsage usage = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(Embedding.DeserializeEmbedding(item, options)); + } + data = array; + continue; + } + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = new InternalCreateEmbeddingResponseObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("usage"u8)) + { + usage = EmbeddingTokenUsage.DeserializeEmbeddingTokenUsage(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EmbeddingCollection(data, model, @object, usage, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +130,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - EmbeddingCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + EmbeddingCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual EmbeddingCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeEmbeddingCollection(document.RootElement, options); } default: @@ -54,15 +149,16 @@ EmbeddingCollection IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static EmbeddingCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(EmbeddingCollection embeddingCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEmbeddingCollection(document.RootElement); + return BinaryContent.Create(embeddingCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator EmbeddingCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingCollection.cs b/.dotnet/src/Generated/Models/EmbeddingCollection.cs index 6afd1cf94..12888211a 100644 --- a/.dotnet/src/Generated/Models/EmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/EmbeddingCollection.cs @@ -2,16 +2,26 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Embeddings { - public partial class EmbeddingCollection : ReadOnlyCollection + public partial class EmbeddingCollection { - public string Model { get; } + private protected IDictionary _additionalBinaryDataProperties; - public EmbeddingTokenUsage Usage { get; } + internal EmbeddingCollection(IList data, string model, InternalCreateEmbeddingResponseObject @object, EmbeddingTokenUsage usage, IDictionary additionalBinaryDataProperties) + { + Data = data; + Model = model; + Object = @object; + Usage = usage; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Model { get; set; } + + public EmbeddingTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 5a2ee5c11..6a1a641cb 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { @@ -14,56 +15,51 @@ public partial class EmbeddingGenerationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingGenerationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("input") != true) - { - writer.WritePropertyName("input"u8); + writer.WritePropertyName("input"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Input); + writer.WriteRawValue(Input); #else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + using (JsonDocument document = JsonDocument.Parse(Input)) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); + JsonSerializer.Serialize(writer, document.RootElement); } - if (SerializedAdditionalRawData?.ContainsKey("encoding_format") != true && Optional.IsDefined(EncodingFormat)) +#endif + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Optional.IsDefined(EncodingFormat)) { writer.WritePropertyName("encoding_format"u8); writer.WriteStringValue(EncodingFormat.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("dimensions") != true && Optional.IsDefined(Dimensions)) + if (Optional.IsDefined(Dimensions)) { writer.WritePropertyName("dimensions"u8); writer.WriteNumberValue(Dimensions.Value); } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(EndUserId); + writer.WriteStringValue(User); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -72,25 +68,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - EmbeddingGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EmbeddingGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual EmbeddingGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingGenerationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeEmbeddingGenerationOptions(document.RootElement, options); } - internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -100,63 +94,68 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default; int? dimensions = default; string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("input"u8)) + if (prop.NameEquals("input"u8)) { - input = BinaryData.FromString(property.Value.GetRawText()); + input = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateEmbeddingRequestModel(property.Value.GetString()); + model = new InternalCreateEmbeddingRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("encoding_format"u8)) + if (prop.NameEquals("encoding_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + encodingFormat = null; continue; } - encodingFormat = new InternalCreateEmbeddingRequestEncodingFormat(property.Value.GetString()); + encodingFormat = new InternalCreateEmbeddingRequestEncodingFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("dimensions"u8)) + if (prop.NameEquals("dimensions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + dimensions = null; continue; } - dimensions = property.Value.GetInt32(); + dimensions = prop.Value.GetInt32(); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new EmbeddingGenerationOptions( input, model, encodingFormat, dimensions, user, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -166,15 +165,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - EmbeddingGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + EmbeddingGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual EmbeddingGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeEmbeddingGenerationOptions(document.RootElement, options); } default: @@ -184,15 +184,16 @@ EmbeddingGenerationOptions IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static EmbeddingGenerationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(EmbeddingGenerationOptions embeddingGenerationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEmbeddingGenerationOptions(document.RootElement); + return BinaryContent.Create(embeddingGenerationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator EmbeddingGenerationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingGenerationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index 92ffbca28..f8117cb9c 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -9,17 +9,18 @@ namespace OpenAI.Embeddings { public partial class EmbeddingGenerationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingGenerationOptions(BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, int? dimensions, string endUserId, IDictionary serializedAdditionalRawData) + internal EmbeddingGenerationOptions(BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, int? dimensions, string user, IDictionary additionalBinaryDataProperties) { Input = input; Model = model; EncodingFormat = encodingFormat; Dimensions = dimensions; - EndUserId = endUserId; - SerializedAdditionalRawData = serializedAdditionalRawData; + User = user; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public int? Dimensions { get; set; } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index 520379899..bbba1628f 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage : IJsonModel { + internal EmbeddingTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(InputTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } - EmbeddingTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EmbeddingTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual EmbeddingTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeEmbeddingTokenUsage(document.RootElement, options); } - internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int promptTokens = default; int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + promptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new EmbeddingTokenUsage(promptTokens, totalTokens, serializedAdditionalRawData); + return new EmbeddingTokenUsage(promptTokens, totalTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - EmbeddingTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + EmbeddingTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual EmbeddingTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeEmbeddingTokenUsage(document.RootElement, options); } default: @@ -130,15 +127,16 @@ EmbeddingTokenUsage IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static EmbeddingTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(EmbeddingTokenUsage embeddingTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEmbeddingTokenUsage(document.RootElement); + return BinaryContent.Create(embeddingTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator EmbeddingTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs index 5234ccde5..403e9b087 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs @@ -9,23 +9,21 @@ namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal EmbeddingTokenUsage(int inputTokens, int totalTokens) + private protected IDictionary _additionalBinaryDataProperties; + + internal EmbeddingTokenUsage(int promptTokens, int totalTokens) { - InputTokens = inputTokens; + PromptTokens = promptTokens; TotalTokens = totalTokens; } - internal EmbeddingTokenUsage(int inputTokens, int totalTokens, IDictionary serializedAdditionalRawData) + internal EmbeddingTokenUsage(int promptTokens, int totalTokens, IDictionary additionalBinaryDataProperties) { - InputTokens = inputTokens; + PromptTokens = promptTokens; TotalTokens = totalTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal EmbeddingTokenUsage() - { - } - public int TotalTokens { get; } + public int TotalTokens { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index c56c5329a..410018e06 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { [PersistableModelProxy(typeof(InternalUnknownFileChunkingStrategyResponseParamProxy))] - public partial class FileChunkingStrategy : IJsonModel + public abstract partial class FileChunkingStrategy : IJsonModel { + internal FileChunkingStrategy() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileChunkingStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,45 +48,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } - FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileChunkingStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileChunkingStrategy(document.RootElement, options); } - internal static FileChunkingStrategy DeserializeFileChunkingStrategy(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileChunkingStrategy DeserializeFileChunkingStrategy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "auto": return InternalAutoChunkingStrategy.DeserializeInternalAutoChunkingStrategy(element, options); - case "other": return InternalUnknownChunkingStrategy.DeserializeInternalUnknownChunkingStrategy(element, options); - case "static": return StaticFileChunkingStrategy.DeserializeStaticFileChunkingStrategy(element, options); + case "static": + return StaticFileChunkingStrategy.DeserializeStaticFileChunkingStrategy(element, options); + case "other": + return InternalUnknownChunkingStrategy.DeserializeInternalUnknownChunkingStrategy(element, options); + case "auto": + return InternalAutoChunkingStrategy.DeserializeInternalAutoChunkingStrategy(element, options); } } return InternalUnknownFileChunkingStrategyResponseParamProxy.DeserializeInternalUnknownFileChunkingStrategyResponseParamProxy(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -93,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileChunkingStrategy(document.RootElement, options); } default: @@ -111,15 +117,16 @@ FileChunkingStrategy IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FileChunkingStrategy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileChunkingStrategy fileChunkingStrategy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileChunkingStrategy(document.RootElement); + return BinaryContent.Create(fileChunkingStrategy, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FileChunkingStrategy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileChunkingStrategy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs index b93a33e99..37ed8a109 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs @@ -9,15 +9,17 @@ namespace OpenAI.VectorStores { public abstract partial class FileChunkingStrategy { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected FileChunkingStrategy() + private protected IDictionary _additionalBinaryDataProperties; + + private protected FileChunkingStrategy(string @type) { + Type = @type; } - internal FileChunkingStrategy(string type, IDictionary serializedAdditionalRawData) + internal FileChunkingStrategy(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index 6a51e8406..7efd2ffaf 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { public partial class FileDeletionResult : IJsonModel { + internal FileDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - FileDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FileDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileDeletionResult(document.RootElement, options); } - internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele string id = default; InternalDeleteFileResponseObject @object = default; bool deleted = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteFileResponseObject(property.Value.GetString()); + @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FileDeletionResult(id, @object, deleted, serializedAdditionalRawData); + return new FileDeletionResult(id, @object, deleted, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - FileDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FileDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ FileDeletionResult IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FileDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileDeletionResult fileDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileDeletionResult(document.RootElement); + return BinaryContent.Create(fileDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FileDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index 55bab610c..0194d13f2 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -9,27 +9,22 @@ namespace OpenAI.Files { public partial class FileDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal FileDeletionResult(string fileId, bool deleted) - { - Argument.AssertNotNull(fileId, nameof(fileId)); + private protected IDictionary _additionalBinaryDataProperties; - FileId = fileId; + internal FileDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal FileDeletionResult(string fileId, InternalDeleteFileResponseObject @object, bool deleted, IDictionary serializedAdditionalRawData) + internal FileDeletionResult(string id, InternalDeleteFileResponseObject @object, bool deleted, IDictionary additionalBinaryDataProperties) { - FileId = fileId; + Id = id; Object = @object; Deleted = deleted; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal FileDeletionResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index a9d34f8fc..642e7cfae 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class FileFromStoreRemovalResult : IJsonModel { + internal FileFromStoreRemovalResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileFromStoreRemovalResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Removed); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - FileFromStoreRemovalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileFromStoreRemovalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FileFromStoreRemovalResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileFromStoreRemovalResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileFromStoreRemovalResult(document.RootElement, options); } - internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult string id = default; bool deleted = default; InternalDeleteVectorStoreFileResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteVectorStoreFileResponseObject(property.Value.GetString()); + @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FileFromStoreRemovalResult(id, deleted, @object, serializedAdditionalRawData); + return new FileFromStoreRemovalResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - FileFromStoreRemovalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileFromStoreRemovalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FileFromStoreRemovalResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileFromStoreRemovalResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ FileFromStoreRemovalResult IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FileFromStoreRemovalResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileFromStoreRemovalResult fileFromStoreRemovalResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileFromStoreRemovalResult(document.RootElement); + return BinaryContent.Create(fileFromStoreRemovalResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FileFromStoreRemovalResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileFromStoreRemovalResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index 501e1057c..dd8ecd84f 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -9,25 +9,20 @@ namespace OpenAI.VectorStores { public partial class FileFromStoreRemovalResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal FileFromStoreRemovalResult(string fileId, bool removed) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - - FileId = fileId; - Removed = removed; - } + private protected IDictionary _additionalBinaryDataProperties; - internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object, IDictionary serializedAdditionalRawData) + internal FileFromStoreRemovalResult(string id, bool deleted) { - FileId = fileId; - Removed = removed; - Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + Id = id; + Deleted = deleted; } - internal FileFromStoreRemovalResult() + internal FileFromStoreRemovalResult(string id, bool deleted, InternalDeleteVectorStoreFileResponseObject @object, IDictionary additionalBinaryDataProperties) { + Id = id; + Deleted = deleted; + Object = @object; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/FileSearchRanker.cs b/.dotnet/src/Generated/Models/FileSearchRanker.cs index a1d8262c4..9f4a93788 100644 --- a/.dotnet/src/Generated/Models/FileSearchRanker.cs +++ b/.dotnet/src/Generated/Models/FileSearchRanker.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct FileSearchRanker : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string Default20240821Value = "default_2024_08_21"; public FileSearchRanker(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string Default20240821Value = "default_2024_08_21"; + _value = value; + } public static FileSearchRanker Auto { get; } = new FileSearchRanker(AutoValue); + public static FileSearchRanker Default20240821 { get; } = new FileSearchRanker(Default20240821Value); + public static bool operator ==(FileSearchRanker left, FileSearchRanker right) => left.Equals(right); + public static bool operator !=(FileSearchRanker left, FileSearchRanker right) => !left.Equals(right); + public static implicit operator FileSearchRanker(string value) => new FileSearchRanker(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FileSearchRanker other && Equals(other); + public bool Equals(FileSearchRanker other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 82356b1f2..30135303e 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,32 @@ public partial class FileSearchRankingOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileSearchRankingOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("ranker") != true && Optional.IsDefined(Ranker)) + if (Optional.IsDefined(Ranker)) { writer.WritePropertyName("ranker"u8); writer.WriteStringValue(Ranker.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("score_threshold") != true) + writer.WritePropertyName("score_threshold"u8); + writer.WriteNumberValue(ScoreThreshold); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("score_threshold"u8); - writer.WriteNumberValue(_scoreThreshold); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,63 +49,60 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } - FileSearchRankingOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileSearchRankingOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FileSearchRankingOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileSearchRankingOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileSearchRankingOptions(document.RootElement, options); } - internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } FileSearchRanker? ranker = default; float scoreThreshold = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("ranker"u8)) + if (prop.NameEquals("ranker"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + ranker = null; continue; } - ranker = new FileSearchRanker(property.Value.GetString()); + ranker = new FileSearchRanker(prop.Value.GetString()); continue; } - if (property.NameEquals("score_threshold"u8)) + if (prop.NameEquals("score_threshold"u8)) { - scoreThreshold = property.Value.GetSingle(); + scoreThreshold = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchRankingOptions(ranker, scoreThreshold, serializedAdditionalRawData); + return new FileSearchRankingOptions(ranker, scoreThreshold, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +112,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - FileSearchRankingOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileSearchRankingOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FileSearchRankingOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileSearchRankingOptions(document.RootElement, options); } default: @@ -134,15 +131,16 @@ FileSearchRankingOptions IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FileSearchRankingOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileSearchRankingOptions fileSearchRankingOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileSearchRankingOptions(document.RootElement); + return BinaryContent.Create(fileSearchRankingOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FileSearchRankingOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileSearchRankingOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs index 0a498f2f9..3730d36f9 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs @@ -9,7 +9,14 @@ namespace OpenAI.Assistants { public partial class FileSearchRankingOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + + internal FileSearchRankingOptions(FileSearchRanker? ranker, float scoreThreshold, IDictionary additionalBinaryDataProperties) + { + Ranker = ranker; + ScoreThreshold = scoreThreshold; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } public FileSearchRanker? Ranker { get; set; } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 23868744b..308a9c003 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -7,65 +7,86 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class FileSearchToolDefinition : IJsonModel { - FileSearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(FileSearch)) + { + writer.WritePropertyName("file_search"u8); + writer.WriteObjectValue(FileSearch, options); + } + } + FileSearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FileSearchToolDefinition)JsonModelCreateCore(ref reader, options); + + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileSearchToolDefinition(document.RootElement, options); } - internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalAssistantToolsFileSearchFileSearch fileSearch = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_search"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = InternalAssistantToolsFileSearchFileSearch.DeserializeInternalAssistantToolsFileSearchFileSearch(property.Value, options); + fileSearch = InternalAssistantToolsFileSearchFileSearch.DeserializeInternalAssistantToolsFileSearchFileSearch(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchToolDefinition(type, serializedAdditionalRawData, fileSearch); + return new FileSearchToolDefinition(fileSearch, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -75,15 +96,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - FileSearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileSearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FileSearchToolDefinition)PersistableModelCreateCore(data, options); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileSearchToolDefinition(document.RootElement, options); } default: @@ -93,15 +115,16 @@ FileSearchToolDefinition IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new FileSearchToolDefinition FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileSearchToolDefinition fileSearchToolDefinition) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileSearchToolDefinition(document.RootElement); + return BinaryContent.Create(fileSearchToolDefinition, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator FileSearchToolDefinition(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileSearchToolDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs index a91be72a4..c14e09ca5 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs @@ -9,9 +9,11 @@ namespace OpenAI.Assistants { public partial class FileSearchToolDefinition : ToolDefinition { - internal FileSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalAssistantToolsFileSearchFileSearch fileSearch) : base(type, serializedAdditionalRawData) + internal FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - _fileSearch = fileSearch; + FileSearch = fileSearch; } + + public InternalAssistantToolsFileSearchFileSearch FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index 15df3db90..b3409b905 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,39 +15,50 @@ public partial class FileSearchToolResources : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileSearchToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("vector_store_ids") != true && Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds)) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); foreach (var item in VectorStoreIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("vector_stores") != true && Optional.IsCollectionDefined(NewVectorStores)) + if (Optional.IsCollectionDefined(VectorStores)) { writer.WritePropertyName("vector_stores"u8); - SerializeNewVectorStores(writer, options); + writer.WriteStartArray(); + foreach (var item in VectorStores) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,77 +67,80 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - FileSearchToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileSearchToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FileSearchToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileSearchToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileSearchToolResources(document.RootElement, options); } - internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList vectorStoreIds = default; IList vectorStores = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("vector_store_ids"u8)) + if (prop.NameEquals("vector_store_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } vectorStoreIds = array; continue; } - if (property.NameEquals("vector_stores"u8)) + if (prop.NameEquals("vector_stores"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(VectorStoreCreationHelper.DeserializeVectorStoreCreationHelper(item, options)); } vectorStores = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchToolResources(vectorStoreIds ?? new ChangeTrackingList(), vectorStores ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FileSearchToolResources(vectorStoreIds ?? new ChangeTrackingList(), vectorStores ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -135,15 +150,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - FileSearchToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileSearchToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FileSearchToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileSearchToolResources(document.RootElement, options); } default: @@ -153,15 +169,16 @@ FileSearchToolResources IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FileSearchToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FileSearchToolResources fileSearchToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFileSearchToolResources(document.RootElement); + return BinaryContent.Create(fileSearchToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FileSearchToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFileSearchToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.cs index 21ddbd788..88318ee26 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.cs @@ -9,13 +9,13 @@ namespace OpenAI.Assistants { public partial class FileSearchToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal FileSearchToolResources(IList vectorStoreIds, IList newVectorStores, IDictionary serializedAdditionalRawData) + internal FileSearchToolResources(IList vectorStoreIds, IList vectorStores, IDictionary additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; - NewVectorStores = newVectorStores; - SerializedAdditionalRawData = serializedAdditionalRawData; + VectorStores = vectorStores; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/FileUploadPurpose.cs b/.dotnet/src/Generated/Models/FileUploadPurpose.cs index 9c08633af..55dc0f55e 100644 --- a/.dotnet/src/Generated/Models/FileUploadPurpose.cs +++ b/.dotnet/src/Generated/Models/FileUploadPurpose.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { public readonly partial struct FileUploadPurpose : IEquatable { private readonly string _value; - - public FileUploadPurpose(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string AssistantsValue = "assistants"; private const string BatchValue = "batch"; private const string FineTuneValue = "fine-tune"; private const string VisionValue = "vision"; + public FileUploadPurpose(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static FileUploadPurpose Assistants { get; } = new FileUploadPurpose(AssistantsValue); + public static FileUploadPurpose Batch { get; } = new FileUploadPurpose(BatchValue); + public static FileUploadPurpose FineTune { get; } = new FileUploadPurpose(FineTuneValue); + public static FileUploadPurpose Vision { get; } = new FileUploadPurpose(VisionValue); + public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right) => left.Equals(right); + public static bool operator !=(FileUploadPurpose left, FileUploadPurpose right) => !left.Equals(right); + public static implicit operator FileUploadPurpose(string value) => new FileUploadPurpose(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FileUploadPurpose other && Equals(other); + public bool Equals(FileUploadPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs deleted file mode 100644 index c2f16095d..000000000 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.FineTuning -{ - [PersistableModelProxy(typeof(UnknownCreateFineTuningJobRequestIntegration))] - internal partial class FineTuningIntegration : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFineTuningIntegration(document.RootElement, options); - } - - internal static FineTuningIntegration DeserializeFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "wandb": return WeightsAndBiasesIntegration.DeserializeWeightsAndBiasesIntegration(element, options); - } - } - return UnknownCreateFineTuningJobRequestIntegration.DeserializeUnknownCreateFineTuningJobRequestIntegration(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{options.Format}' format."); - } - } - - FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFineTuningIntegration(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static FineTuningIntegration FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningIntegration(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.cs index 53daa38c0..48a4e69cb 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.cs @@ -9,15 +9,17 @@ namespace OpenAI.FineTuning { internal abstract partial class FineTuningIntegration { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected FineTuningIntegration() + private protected IDictionary _additionalBinaryDataProperties; + + private protected FineTuningIntegration(string @type) { + Type = @type; } - internal FineTuningIntegration(string type, IDictionary serializedAdditionalRawData) + internal FineTuningIntegration(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index dea000f02..aa604bc57 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -7,26 +7,33 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningIntegrationWandbWandb : IJsonModel { + internal FineTuningIntegrationWandbWandb() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningIntegrationWandbWandb)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("project") != true) - { - writer.WritePropertyName("project"u8); - writer.WriteStringValue(Project); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + writer.WritePropertyName("project"u8); + writer.WriteStringValue(Project); + if (Optional.IsDefined(Name)) { if (Name != null) { @@ -35,10 +42,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("name"); + writer.WriteNull("name"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("entity") != true && Optional.IsDefined(Entity)) + if (Optional.IsDefined(Entity)) { if (Entity != null) { @@ -47,30 +54,31 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("entity"); + writer.WriteNull("entity"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tags") != true && Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); foreach (var item in Tags) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -79,25 +87,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - FineTuningIntegrationWandbWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningIntegrationWandbWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningIntegrationWandbWandb JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningIntegrationWandbWandb)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningIntegrationWandbWandb(document.RootElement, options); } - internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegrationWandbWandb(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegrationWandbWandb(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -105,64 +111,69 @@ internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegration string project = default; string name = default; string entity = default; - IReadOnlyList tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList tags = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("project"u8)) + if (prop.NameEquals("project"u8)) { - project = property.Value.GetString(); + project = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("entity"u8)) + if (prop.NameEquals("entity"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { entity = null; continue; } - entity = property.Value.GetString(); + entity = prop.Value.GetString(); continue; } - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } tags = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FineTuningIntegrationWandbWandb(project, name, entity, tags ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FineTuningIntegrationWandbWandb(project, name, entity, tags ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -172,15 +183,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - FineTuningIntegrationWandbWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningIntegrationWandbWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningIntegrationWandbWandb PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningIntegrationWandbWandb(document.RootElement, options); } default: @@ -190,15 +202,16 @@ FineTuningIntegrationWandbWandb IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FineTuningIntegrationWandbWandb FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningIntegrationWandbWandb fineTuningIntegrationWandbWandb) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningIntegrationWandbWandb(document.RootElement); + return BinaryContent.Create(fineTuningIntegrationWandbWandb, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FineTuningIntegrationWandbWandb(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningIntegrationWandbWandb(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs index 6be0538b4..91b4826b2 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs @@ -4,36 +4,35 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningIntegrationWandbWandb { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal FineTuningIntegrationWandbWandb(string project) { - Argument.AssertNotNull(project, nameof(project)); - Project = project; Tags = new ChangeTrackingList(); } - internal FineTuningIntegrationWandbWandb(string project, string name, string entity, IReadOnlyList tags, IDictionary serializedAdditionalRawData) + internal FineTuningIntegrationWandbWandb(string project, string name, string entity, IList tags, IDictionary additionalBinaryDataProperties) { Project = project; Name = name; Entity = entity; Tags = tags; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal FineTuningIntegrationWandbWandb() - { - } + public string Project { get; set; } + + public string Name { get; set; } + + public string Entity { get; set; } - public string Project { get; } - public string Name { get; } - public string Entity { get; } - public IReadOnlyList Tags { get; } + public IList Tags { get; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index 4a6339768..c8e7b83f7 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -7,21 +7,31 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningJob : IJsonModel { + internal FineTuningJob() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJob)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("user_provided_suffix") != true && Optional.IsDefined(UserProvidedSuffix)) + if (Optional.IsDefined(UserProvidedSuffix)) { if (UserProvidedSuffix != null) { @@ -30,120 +40,83 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } else { - writer.WriteNull("user_provided_suffix"); + writer.WriteNull("userProvidedSuffix"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (Error != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + else { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("error") != true) - { - if (Error != null) - { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); - } - else - { - writer.WriteNull("error"); - } + writer.WriteNull("error"u8); } - if (SerializedAdditionalRawData?.ContainsKey("fine_tuned_model") != true) + if (FineTunedModel != null) { - if (FineTunedModel != null) - { - writer.WritePropertyName("fine_tuned_model"u8); - writer.WriteStringValue(FineTunedModel); - } - else - { - writer.WriteNull("fine_tuned_model"); - } + writer.WritePropertyName("fine_tuned_model"u8); + writer.WriteStringValue(FineTunedModel); } - if (SerializedAdditionalRawData?.ContainsKey("finished_at") != true) + else { - if (FinishedAt != null) - { - writer.WritePropertyName("finished_at"u8); - writer.WriteNumberValue(FinishedAt.Value, "U"); - } - else - { - writer.WriteNull("finished_at"); - } + writer.WriteNull("fineTunedModel"u8); } - if (SerializedAdditionalRawData?.ContainsKey("hyperparameters") != true) + if (FinishedAt != null) { - writer.WritePropertyName("hyperparameters"u8); - writer.WriteObjectValue(Hyperparameters, options); + writer.WritePropertyName("finished_at"u8); + writer.WriteNumberValue(FinishedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + else { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteNull("finishedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("hyperparameters"u8); + writer.WriteObjectValue(Hyperparameters, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("organization_id"u8); + writer.WriteStringValue(OrganizationId); + writer.WritePropertyName("result_files"u8); + writer.WriteStartArray(); + foreach (var item in ResultFiles) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("organization_id") != true) - { - writer.WritePropertyName("organization_id"u8); - writer.WriteStringValue(OrganizationId); - } - if (SerializedAdditionalRawData?.ContainsKey("result_files") != true) - { - writer.WritePropertyName("result_files"u8); - writer.WriteStartArray(); - foreach (var item in ResultFiles) + if (item == null) { - writer.WriteStringValue(item); + writer.WriteNullValue(); + continue; } - writer.WriteEndArray(); + writer.WriteStringValue(item); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + writer.WriteEndArray(); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (TrainedTokens != null) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("trained_tokens"u8); + writer.WriteNumberValue(TrainedTokens.Value); } - if (SerializedAdditionalRawData?.ContainsKey("trained_tokens") != true) + else { - if (TrainedTokens != null) - { - writer.WritePropertyName("trained_tokens"u8); - writer.WriteNumberValue(TrainedTokens.Value); - } - else - { - writer.WriteNull("trained_tokens"); - } + writer.WriteNull("trainedTokens"u8); } - if (SerializedAdditionalRawData?.ContainsKey("training_file") != true) + writer.WritePropertyName("training_file"u8); + writer.WriteStringValue(TrainingFile); + if (ValidationFile != null) { - writer.WritePropertyName("training_file"u8); - writer.WriteStringValue(TrainingFile); + writer.WritePropertyName("validation_file"u8); + writer.WriteStringValue(ValidationFile); } - if (SerializedAdditionalRawData?.ContainsKey("validation_file") != true) + else { - if (ValidationFile != null) - { - writer.WritePropertyName("validation_file"u8); - writer.WriteStringValue(ValidationFile); - } - else - { - writer.WriteNull("validation_file"); - } + writer.WriteNull("validationFile"u8); } - if (SerializedAdditionalRawData?.ContainsKey("integrations") != true && Optional.IsCollectionDefined(Integrations)) + if (Optional.IsCollectionDefined(Integrations)) { if (Integrations != null) { @@ -157,15 +130,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } else { - writer.WriteNull("integrations"); + writer.WriteNull("integrations"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("seed") != true) - { - writer.WritePropertyName("seed"u8); - writer.WriteNumberValue(Seed); - } - if (SerializedAdditionalRawData?.ContainsKey("estimated_finish") != true && Optional.IsDefined(EstimatedFinish)) + writer.WritePropertyName("seed"u8); + writer.WriteNumberValue(Seed); + if (Optional.IsDefined(EstimatedFinish)) { if (EstimatedFinish != null) { @@ -174,20 +144,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } else { - writer.WriteNull("estimated_finish"); + writer.WriteNull("estimatedFinish"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -196,25 +162,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } - FineTuningJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJob)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningJob(document.RootElement, options); } - internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -229,164 +193,168 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode string model = default; InternalFineTuningJobObject @object = default; string organizationId = default; - IReadOnlyList resultFiles = default; + IList resultFiles = default; FineTuningJobStatus status = default; int? trainedTokens = default; string trainingFile = default; string validationFile = default; - IReadOnlyList integrations = default; + IList integrations = default; int seed = default; DateTimeOffset? estimatedFinish = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("user_provided_suffix"u8)) + if (prop.NameEquals("user_provided_suffix"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { userProvidedSuffix = null; continue; } - userProvidedSuffix = property.Value.GetString(); + userProvidedSuffix = prop.Value.GetString(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("error"u8)) + if (prop.NameEquals("error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { error = null; continue; } - error = FineTuningJobError.DeserializeFineTuningJobError(property.Value, options); + error = FineTuningJobError.DeserializeFineTuningJobError(prop.Value, options); continue; } - if (property.NameEquals("fine_tuned_model"u8)) + if (prop.NameEquals("fine_tuned_model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { fineTunedModel = null; continue; } - fineTunedModel = property.Value.GetString(); + fineTunedModel = prop.Value.GetString(); continue; } - if (property.NameEquals("finished_at"u8)) + if (prop.NameEquals("finished_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { finishedAt = null; continue; } - finishedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + finishedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("hyperparameters"u8)) + if (prop.NameEquals("hyperparameters"u8)) { - hyperparameters = FineTuningJobHyperparameters.DeserializeFineTuningJobHyperparameters(property.Value, options); + hyperparameters = FineTuningJobHyperparameters.DeserializeFineTuningJobHyperparameters(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalFineTuningJobObject(property.Value.GetString()); + @object = new InternalFineTuningJobObject(prop.Value.GetString()); continue; } - if (property.NameEquals("organization_id"u8)) + if (prop.NameEquals("organization_id"u8)) { - organizationId = property.Value.GetString(); + organizationId = prop.Value.GetString(); continue; } - if (property.NameEquals("result_files"u8)) + if (prop.NameEquals("result_files"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } resultFiles = array; continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new FineTuningJobStatus(property.Value.GetString()); + status = new FineTuningJobStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("trained_tokens"u8)) + if (prop.NameEquals("trained_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { trainedTokens = null; continue; } - trainedTokens = property.Value.GetInt32(); + trainedTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("training_file"u8)) + if (prop.NameEquals("training_file"u8)) { - trainingFile = property.Value.GetString(); + trainingFile = prop.Value.GetString(); continue; } - if (property.NameEquals("validation_file"u8)) + if (prop.NameEquals("validation_file"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { validationFile = null; continue; } - validationFile = property.Value.GetString(); + validationFile = prop.Value.GetString(); continue; } - if (property.NameEquals("integrations"u8)) + if (prop.NameEquals("integrations"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalFineTuningIntegration.DeserializeInternalFineTuningIntegration(item, options)); } integrations = array; continue; } - if (property.NameEquals("seed"u8)) + if (prop.NameEquals("seed"u8)) { - seed = property.Value.GetInt32(); + seed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("estimated_finish"u8)) + if (prop.NameEquals("estimated_finish"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { estimatedFinish = null; continue; } - estimatedFinish = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + estimatedFinish = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new FineTuningJob( userProvidedSuffix, id, @@ -406,13 +374,14 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode integrations ?? new ChangeTrackingList(), seed, estimatedFinish, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -422,15 +391,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio } } - FineTuningJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningJob(document.RootElement, options); } default: @@ -440,15 +410,16 @@ FineTuningJob IPersistableModel.Create(BinaryData data, ModelRead string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FineTuningJob FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningJob fineTuningJob) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningJob(document.RootElement); + return BinaryContent.Create(fineTuningJob, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FineTuningJob(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningJob(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.cs b/.dotnet/src/Generated/Models/FineTuningJob.cs index fc955ef7f..b61781d20 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.cs @@ -5,20 +5,16 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningJob { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal FineTuningJob(string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, string organizationId, IEnumerable resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, int seed) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(model, nameof(model)); - Argument.AssertNotNull(organizationId, nameof(organizationId)); - Argument.AssertNotNull(resultFiles, nameof(resultFiles)); - Argument.AssertNotNull(trainingFile, nameof(trainingFile)); - Id = id; CreatedAt = createdAt; Error = error; @@ -36,7 +32,7 @@ internal FineTuningJob(string id, DateTimeOffset createdAt, FineTuningJobError e Seed = seed; } - internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, InternalFineTuningJobObject @object, string organizationId, IReadOnlyList resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, IReadOnlyList integrations, int seed, DateTimeOffset? estimatedFinish, IDictionary serializedAdditionalRawData) + internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, InternalFineTuningJobObject @object, string organizationId, IList resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, IList integrations, int seed, DateTimeOffset? estimatedFinish, IDictionary additionalBinaryDataProperties) { UserProvidedSuffix = userProvidedSuffix; Id = id; @@ -56,31 +52,43 @@ internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset crea Integrations = integrations; Seed = seed; EstimatedFinish = estimatedFinish; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal FineTuningJob() - { - } + public string UserProvidedSuffix { get; set; } + + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public FineTuningJobError Error { get; set; } + + public string FineTunedModel { get; set; } + + public DateTimeOffset? FinishedAt { get; set; } + + public FineTuningJobHyperparameters Hyperparameters { get; set; } + + public string Model { get; set; } + + public InternalFineTuningJobObject Object { get; } = "fine_tuning.job"; + + public string OrganizationId { get; set; } + + public IList ResultFiles { get; } + + public FineTuningJobStatus Status { get; set; } + + public int? TrainedTokens { get; set; } + + public string TrainingFile { get; set; } + + public string ValidationFile { get; set; } + + public IList Integrations { get; set; } + + public int Seed { get; set; } - public string UserProvidedSuffix { get; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public FineTuningJobError Error { get; } - public string FineTunedModel { get; } - public DateTimeOffset? FinishedAt { get; } - public FineTuningJobHyperparameters Hyperparameters { get; } - public string Model { get; } - public InternalFineTuningJobObject Object { get; } = InternalFineTuningJobObject.FineTuningJob; - - public string OrganizationId { get; } - public IReadOnlyList ResultFiles { get; } - public FineTuningJobStatus Status { get; } - public int? TrainedTokens { get; } - public string TrainingFile { get; } - public string ValidationFile { get; } - public IReadOnlyList Integrations { get; } - public int Seed { get; } - public DateTimeOffset? EstimatedFinish { get; } + public DateTimeOffset? EstimatedFinish { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index 67b618563..ff92fb4c2 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -7,53 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningJobError : IJsonModel { + internal FineTuningJobError() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true) + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Param != null) { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + else { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); + writer.WriteNull("param"u8); } - if (SerializedAdditionalRawData?.ContainsKey("param") != true) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - if (Param != null) + foreach (var item in _additionalBinaryDataProperties) { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); - } - else - { - writer.WriteNull("param"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,70 +59,66 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - FineTuningJobError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningJobError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningJobError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningJobError(document.RootElement, options); } - internal static FineTuningJobError DeserializeFineTuningJobError(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningJobError DeserializeFineTuningJobError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string code = default; string message = default; - string param = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @param = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = property.Value.GetString(); + code = prop.Value.GetString(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (property.NameEquals("param"u8)) + if (prop.NameEquals("param"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - param = null; + @param = null; continue; } - param = property.Value.GetString(); + @param = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FineTuningJobError(code, message, param, serializedAdditionalRawData); + return new FineTuningJobError(code, message, @param, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -135,15 +128,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - FineTuningJobError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningJobError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningJobError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningJobError(document.RootElement, options); } default: @@ -153,15 +147,16 @@ FineTuningJobError IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FineTuningJobError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningJobError fineTuningJobError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningJobError(document.RootElement); + return BinaryContent.Create(fineTuningJobError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FineTuningJobError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningJobError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.cs b/.dotnet/src/Generated/Models/FineTuningJobError.cs index dbd6f4103..706dc1b29 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.cs @@ -9,31 +9,27 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobError { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal FineTuningJobError(string code, string message, string param) - { - Argument.AssertNotNull(code, nameof(code)); - Argument.AssertNotNull(message, nameof(message)); + private protected IDictionary _additionalBinaryDataProperties; + internal FineTuningJobError(string code, string message, string @param) + { Code = code; Message = message; - Param = param; + Param = @param; } - internal FineTuningJobError(string code, string message, string param, IDictionary serializedAdditionalRawData) + internal FineTuningJobError(string code, string message, string @param, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - Param = param; - SerializedAdditionalRawData = serializedAdditionalRawData; + Param = @param; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal FineTuningJobError() - { - } + public string Code { get; set; } + + public string Message { get; set; } - public string Code { get; } - public string Message { get; } - public string Param { get; } + public string Param { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index d03b6f085..55bdcc8af 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -7,56 +7,47 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningJobEvent : IJsonModel { + internal FineTuningJobEvent() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobEvent)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("level") != true) - { - writer.WritePropertyName("level"u8); - writer.WriteStringValue(Level.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.ToSerialString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -65,83 +56,79 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - FineTuningJobEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningJobEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningJobEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobEvent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningJobEvent(document.RootElement, options); } - internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; DateTimeOffset createdAt = default; - FineTuningJobEventLevel level = default; + FineTuning.FineTuningJobEventLevel level = default; string message = default; InternalFineTuningJobEventObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("level"u8)) + if (prop.NameEquals("level"u8)) { - level = property.Value.GetString().ToFineTuningJobEventLevel(); + level = prop.Value.GetString().ToFineTuningJobEventLevel(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalFineTuningJobEventObject(property.Value.GetString()); + @object = new InternalFineTuningJobEventObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new FineTuningJobEvent( id, createdAt, level, message, @object, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -151,15 +138,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - FineTuningJobEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningJobEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningJobEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningJobEvent(document.RootElement, options); } default: @@ -169,15 +157,16 @@ FineTuningJobEvent IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FineTuningJobEvent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningJobEvent fineTuningJobEvent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningJobEvent(document.RootElement); + return BinaryContent.Create(fineTuningJobEvent, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FineTuningJobEvent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningJobEvent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs index 5b169027b..6f204d6ff 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs @@ -9,36 +9,34 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobEvent { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuningJobEventLevel level, string message) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(message, nameof(message)); + private protected IDictionary _additionalBinaryDataProperties; + internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.FineTuningJobEventLevel level, string message) + { Id = id; CreatedAt = createdAt; Level = level; Message = message; } - internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuningJobEventLevel level, string message, InternalFineTuningJobEventObject @object, IDictionary serializedAdditionalRawData) + internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.FineTuningJobEventLevel level, string message, InternalFineTuningJobEventObject @object, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; Level = level; Message = message; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal FineTuningJobEvent() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public FineTuning.FineTuningJobEventLevel Level { get; set; } + + public string Message { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public FineTuningJobEventLevel Level { get; } - public string Message { get; } - public InternalFineTuningJobEventObject Object { get; } = InternalFineTuningJobEventObject.FineTuningJobEvent; + public InternalFineTuningJobEventObject Object { get; } = "fine_tuning.job.event"; } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs index e827bcb6d..18ef3bc2a 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs @@ -8,19 +8,28 @@ namespace OpenAI.FineTuning { internal static partial class FineTuningJobEventLevelExtensions { - public static string ToSerialString(this FineTuningJobEventLevel value) => value switch + public static string ToSerialString(this FineTuning.FineTuningJobEventLevel value) => value switch { - FineTuningJobEventLevel.Info => "info", - FineTuningJobEventLevel.Warn => "warn", - FineTuningJobEventLevel.Error => "error", + FineTuning.FineTuningJobEventLevel.Info => "info", + FineTuning.FineTuningJobEventLevel.Warn => "warn", + FineTuning.FineTuningJobEventLevel.Error => "error", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobEventLevel value.") }; - public static FineTuningJobEventLevel ToFineTuningJobEventLevel(this string value) + public static FineTuning.FineTuningJobEventLevel ToFineTuningJobEventLevel(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "info")) return FineTuningJobEventLevel.Info; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "warn")) return FineTuningJobEventLevel.Warn; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) return FineTuningJobEventLevel.Error; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "info")) + { + return FineTuning.FineTuningJobEventLevel.Info; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "warn")) + { + return FineTuning.FineTuningJobEventLevel.Warn; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) + { + return FineTuning.FineTuningJobEventLevel.Error; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobEventLevel value."); } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index b264c7309..ed6755886 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -7,67 +7,64 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { - internal partial struct FineTuningJobHyperparameters : IJsonModel, IJsonModel + internal readonly partial struct FineTuningJobHyperparameters : IJsonModel, IJsonModel { + public FineTuningJobHyperparameters() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobHyperparameters)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("n_epochs") != true) - { - writer.WritePropertyName("n_epochs"u8); + writer.WritePropertyName("n_epochs"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(NEpochs); + writer.WriteRawValue(NEpochs); #else - using (JsonDocument document = JsonDocument.Parse(NEpochs)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("batch_size") != true) + using (JsonDocument document = JsonDocument.Parse(NEpochs)) { - writer.WritePropertyName("batch_size"u8); + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("batch_size"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(BatchSize); + writer.WriteRawValue(BatchSize); #else - using (JsonDocument document = JsonDocument.Parse(BatchSize)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("learning_rate_multiplier") != true) + using (JsonDocument document = JsonDocument.Parse(BatchSize)) { - writer.WritePropertyName("learning_rate_multiplier"u8); + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("learning_rate_multiplier"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(LearningRateMultiplier); + writer.WriteRawValue(LearningRateMultiplier); #else - using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) + { + JsonSerializer.Serialize(writer, document.RootElement); } - if (SerializedAdditionalRawData != null) +#endif + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -76,65 +73,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - FineTuningJobHyperparameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningJobHyperparameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningJobHyperparameters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningJobHyperparameters)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningJobHyperparameters(document.RootElement, options); } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); - - object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); - - internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparameters(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparameters(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } BinaryData nEpochs = default; BinaryData batchSize = default; BinaryData learningRateMultiplier = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("n_epochs"u8)) + if (prop.NameEquals("n_epochs"u8)) { - nEpochs = BinaryData.FromString(property.Value.GetRawText()); + nEpochs = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("batch_size"u8)) + if (prop.NameEquals("batch_size"u8)) { - batchSize = BinaryData.FromString(property.Value.GetRawText()); + batchSize = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("learning_rate_multiplier"u8)) + if (prop.NameEquals("learning_rate_multiplier"u8)) { - learningRateMultiplier = BinaryData.FromString(property.Value.GetRawText()); + learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FineTuningJobHyperparameters(nEpochs, batchSize, learningRateMultiplier, serializedAdditionalRawData); + return new FineTuningJobHyperparameters(nEpochs, batchSize, learningRateMultiplier, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -144,15 +137,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - FineTuningJobHyperparameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningJobHyperparameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningJobHyperparameters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningJobHyperparameters(document.RootElement, options); } default: @@ -162,21 +156,26 @@ FineTuningJobHyperparameters IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); - - object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); - - internal static FineTuningJobHyperparameters FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningJobHyperparameters fineTuningJobHyperparameters) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningJobHyperparameters(document.RootElement); + return BinaryContent.Create(fineTuningJobHyperparameters, ModelSerializationExtensions.WireOptions); } - internal BinaryContent ToBinaryContent() + public static explicit operator FineTuningJobHyperparameters(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningJobHyperparameters(document.RootElement, ModelSerializationExtensions.WireOptions); } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); + + object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); + + object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 747e99476..913a36676 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -9,27 +9,21 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters { + private protected IDictionary _additionalBinaryDataProperties; + internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) { - Argument.AssertNotNull(nEpochs, nameof(nEpochs)); - Argument.AssertNotNull(batchSize, nameof(batchSize)); - Argument.AssertNotNull(learningRateMultiplier, nameof(learningRateMultiplier)); - NEpochs = nEpochs; BatchSize = batchSize; LearningRateMultiplier = learningRateMultiplier; } - internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary serializedAdditionalRawData) + internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary additionalBinaryDataProperties) { NEpochs = nEpochs; BatchSize = batchSize; LearningRateMultiplier = learningRateMultiplier; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - public FineTuningJobHyperparameters() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs index 1349f4677..28b43a83b 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparametersBatchSizeChoiceEnum : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public FineTuningJobHyperparametersBatchSizeChoiceEnum(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static FineTuningJobHyperparametersBatchSizeChoiceEnum Auto { get; } = new FineTuningJobHyperparametersBatchSizeChoiceEnum(AutoValue); + public static bool operator ==(FineTuningJobHyperparametersBatchSizeChoiceEnum left, FineTuningJobHyperparametersBatchSizeChoiceEnum right) => left.Equals(right); + public static bool operator !=(FineTuningJobHyperparametersBatchSizeChoiceEnum left, FineTuningJobHyperparametersBatchSizeChoiceEnum right) => !left.Equals(right); + public static implicit operator FineTuningJobHyperparametersBatchSizeChoiceEnum(string value) => new FineTuningJobHyperparametersBatchSizeChoiceEnum(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FineTuningJobHyperparametersBatchSizeChoiceEnum other && Equals(other); + public bool Equals(FineTuningJobHyperparametersBatchSizeChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs index 7aa3f46ca..725ea9349 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum Auto { get; } = new FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum(AutoValue); + public static bool operator ==(FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum left, FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum right) => left.Equals(right); + public static bool operator !=(FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum left, FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum right) => !left.Equals(right); + public static implicit operator FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum(string value) => new FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum other && Equals(other); + public bool Equals(FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs index 7ba8e753d..8832b6f7b 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparametersNEpochsChoiceEnum : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public FineTuningJobHyperparametersNEpochsChoiceEnum(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static FineTuningJobHyperparametersNEpochsChoiceEnum Auto { get; } = new FineTuningJobHyperparametersNEpochsChoiceEnum(AutoValue); + public static bool operator ==(FineTuningJobHyperparametersNEpochsChoiceEnum left, FineTuningJobHyperparametersNEpochsChoiceEnum right) => left.Equals(right); + public static bool operator !=(FineTuningJobHyperparametersNEpochsChoiceEnum left, FineTuningJobHyperparametersNEpochsChoiceEnum right) => !left.Equals(right); + public static implicit operator FineTuningJobHyperparametersNEpochsChoiceEnum(string value) => new FineTuningJobHyperparametersNEpochsChoiceEnum(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FineTuningJobHyperparametersNEpochsChoiceEnum other && Equals(other); + public bool Equals(FineTuningJobHyperparametersNEpochsChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobStatus.cs b/.dotnet/src/Generated/Models/FineTuningJobStatus.cs index 0c9e12360..905b1c7ee 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobStatus.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobStatus.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobStatus : IEquatable { private readonly string _value; - - public FineTuningJobStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string ValidatingFilesValue = "validating_files"; private const string QueuedValue = "queued"; private const string RunningValue = "running"; @@ -23,22 +18,38 @@ public FineTuningJobStatus(string value) private const string FailedValue = "failed"; private const string CancelledValue = "cancelled"; + public FineTuningJobStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static FineTuningJobStatus ValidatingFiles { get; } = new FineTuningJobStatus(ValidatingFilesValue); + public static FineTuningJobStatus Queued { get; } = new FineTuningJobStatus(QueuedValue); + public static FineTuningJobStatus Running { get; } = new FineTuningJobStatus(RunningValue); + public static FineTuningJobStatus Succeeded { get; } = new FineTuningJobStatus(SucceededValue); + public static FineTuningJobStatus Failed { get; } = new FineTuningJobStatus(FailedValue); + public static FineTuningJobStatus Cancelled { get; } = new FineTuningJobStatus(CancelledValue); + public static bool operator ==(FineTuningJobStatus left, FineTuningJobStatus right) => left.Equals(right); + public static bool operator !=(FineTuningJobStatus left, FineTuningJobStatus right) => !left.Equals(right); + public static implicit operator FineTuningJobStatus(string value) => new FineTuningJobStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is FineTuningJobStatus other && Equals(other); + public bool Equals(FineTuningJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index 76726dc27..c42d5d5d8 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -7,36 +7,40 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningOptions : IJsonModel { + internal FineTuningOptions() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("training_file") != true) - { - writer.WritePropertyName("training_file"u8); - writer.WriteStringValue(TrainingFile); - } - if (SerializedAdditionalRawData?.ContainsKey("hyperparameters") != true && Optional.IsDefined(Hyperparameters)) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + writer.WritePropertyName("training_file"u8); + writer.WriteStringValue(TrainingFile); + if (Optional.IsDefined(Hyperparameters)) { writer.WritePropertyName("hyperparameters"u8); writer.WriteObjectValue(Hyperparameters, options); } - if (SerializedAdditionalRawData?.ContainsKey("suffix") != true && Optional.IsDefined(Suffix)) + if (Optional.IsDefined(Suffix)) { if (Suffix != null) { @@ -45,10 +49,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } else { - writer.WriteNull("suffix"); + writer.WriteNull("suffix"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("validation_file") != true && Optional.IsDefined(ValidationFile)) + if (Optional.IsDefined(ValidationFile)) { if (ValidationFile != null) { @@ -57,10 +61,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } else { - writer.WriteNull("validation_file"); + writer.WriteNull("validationFile"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("integrations") != true && Optional.IsCollectionDefined(Integrations)) + if (Optional.IsCollectionDefined(Integrations)) { if (Integrations != null) { @@ -74,10 +78,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } else { - writer.WriteNull("integrations"); + writer.WriteNull("integrations"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("seed") != true && Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed)) { if (Seed != null) { @@ -86,20 +90,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } else { - writer.WriteNull("seed"); + writer.WriteNull("seed"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -108,25 +108,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } - FineTuningOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFineTuningOptions(document.RootElement, options); } - internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -138,80 +136,78 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme string validationFile = default; IList integrations = default; int? seed = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateFineTuningJobRequestModel(property.Value.GetString()); + model = new InternalCreateFineTuningJobRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("training_file"u8)) + if (prop.NameEquals("training_file"u8)) { - trainingFile = property.Value.GetString(); + trainingFile = prop.Value.GetString(); continue; } - if (property.NameEquals("hyperparameters"u8)) + if (prop.NameEquals("hyperparameters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + hyperparameters = null; continue; } - hyperparameters = HyperparameterOptions.DeserializeHyperparameterOptions(property.Value, options); + hyperparameters = HyperparameterOptions.DeserializeHyperparameterOptions(prop.Value, options); continue; } - if (property.NameEquals("suffix"u8)) + if (prop.NameEquals("suffix"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { suffix = null; continue; } - suffix = property.Value.GetString(); + suffix = prop.Value.GetString(); continue; } - if (property.NameEquals("validation_file"u8)) + if (prop.NameEquals("validation_file"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { validationFile = null; continue; } - validationFile = property.Value.GetString(); + validationFile = prop.Value.GetString(); continue; } - if (property.NameEquals("integrations"u8)) + if (prop.NameEquals("integrations"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(FineTuningIntegration.DeserializeFineTuningIntegration(item, options)); } integrations = array; continue; } - if (property.NameEquals("seed"u8)) + if (prop.NameEquals("seed"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { seed = null; continue; } - seed = property.Value.GetInt32(); + seed = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new FineTuningOptions( model, trainingFile, @@ -220,13 +216,14 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme validationFile, integrations ?? new ChangeTrackingList(), seed, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -236,15 +233,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - FineTuningOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual FineTuningOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFineTuningOptions(document.RootElement, options); } default: @@ -254,15 +252,16 @@ FineTuningOptions IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static FineTuningOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FineTuningOptions fineTuningOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFineTuningOptions(document.RootElement); + return BinaryContent.Create(fineTuningOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator FineTuningOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.cs b/.dotnet/src/Generated/Models/FineTuningOptions.cs index 0cbb53b8d..11d595eff 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.FineTuning { internal partial class FineTuningOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string trainingFile) { Argument.AssertNotNull(trainingFile, nameof(trainingFile)); @@ -19,7 +21,7 @@ public FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string t Integrations = new ChangeTrackingList(); } - internal FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string trainingFile, HyperparameterOptions hyperparameters, string suffix, string validationFile, IList integrations, int? seed, IDictionary serializedAdditionalRawData) + internal FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string trainingFile, HyperparameterOptions hyperparameters, string suffix, string validationFile, IList integrations, int? seed, IDictionary additionalBinaryDataProperties) { Model = model; TrainingFile = trainingFile; @@ -28,19 +30,21 @@ internal FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string ValidationFile = validationFile; Integrations = integrations; Seed = seed; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal FineTuningOptions() - { - } + public InternalCreateFineTuningJobRequestModel Model { get; set; } + + public string TrainingFile { get; set; } - public InternalCreateFineTuningJobRequestModel Model { get; } - public string TrainingFile { get; } public HyperparameterOptions Hyperparameters { get; set; } + public string Suffix { get; set; } + public string ValidationFile { get; set; } + public IList Integrations { get; set; } + public int? Seed { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 398f7d5cc..ca80e05d4 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -7,67 +7,102 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class FunctionChatMessage : IJsonModel { - FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal FunctionChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + else + { + writer.WriteNull("content"u8); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + + FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFunctionChatMessage(document.RootElement, options); } - internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + string content = default; string name = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "function"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = prop.Value.GetString(); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FunctionChatMessage(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData, name); + return new FunctionChatMessage(content, name, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -77,15 +112,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - FunctionChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FunctionChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FunctionChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFunctionChatMessage(document.RootElement, options); } default: @@ -95,15 +131,16 @@ FunctionChatMessage IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new FunctionChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FunctionChatMessage functionChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFunctionChatMessage(document.RootElement); + return BinaryContent.Create(functionChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator FunctionChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFunctionChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index 5dcbdf226..6407c6b04 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -9,13 +9,12 @@ namespace OpenAI.Chat { public partial class FunctionChatMessage : ChatMessage { - internal FunctionChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string functionName) : base(role, content, serializedAdditionalRawData) + internal FunctionChatMessage(string content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { - FunctionName = functionName; + Content = content; + Name = name; } - internal FunctionChatMessage() - { - } + public string Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index e17ea82e9..f2652b948 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -7,61 +7,78 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class FunctionToolDefinition : IJsonModel { - FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FunctionToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(FunctionToolDefinition)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + } + + FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionToolDefinition)JsonModelCreateCore(ref reader, options); + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionToolDefinition)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFunctionToolDefinition(document.RootElement, options); } - internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalFunctionDefinition function = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "function"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(property.Value, options); + function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new FunctionToolDefinition(type, serializedAdditionalRawData, function); + return new FunctionToolDefinition(function, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +88,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - FunctionToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FunctionToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FunctionToolDefinition)PersistableModelCreateCore(data, options); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFunctionToolDefinition(document.RootElement, options); } default: @@ -89,15 +107,16 @@ FunctionToolDefinition IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new FunctionToolDefinition FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FunctionToolDefinition functionToolDefinition) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFunctionToolDefinition(document.RootElement); + return BinaryContent.Create(functionToolDefinition, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator FunctionToolDefinition(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFunctionToolDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs index a1ed5ea67..b43ca2092 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs @@ -4,10 +4,17 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class FunctionToolDefinition : ToolDefinition { + internal FunctionToolDefinition(InternalFunctionDefinition function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Function = function; + } + + public InternalFunctionDefinition Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index cdcba781c..59504a5d1 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -14,39 +15,40 @@ public partial class GeneratedImage : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GeneratedImage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("b64_json") != true && Optional.IsDefined(ImageBytes)) + if (Optional.IsDefined(B64Json)) { writer.WritePropertyName("b64_json"u8); - writer.WriteBase64StringValue(ImageBytes.ToArray(), "D"); + writer.WriteBase64StringValue(B64Json.ToArray(), "D"); } - if (SerializedAdditionalRawData?.ContainsKey("url") != true && Optional.IsDefined(ImageUri)) + if (Optional.IsDefined(Url)) { writer.WritePropertyName("url"u8); - writer.WriteStringValue(ImageUri.AbsoluteUri); + writer.WriteStringValue(Url.AbsoluteUri); } - if (SerializedAdditionalRawData?.ContainsKey("revised_prompt") != true && Optional.IsDefined(RevisedPrompt)) + if (Optional.IsDefined(RevisedPrompt)) { writer.WritePropertyName("revised_prompt"u8); writer.WriteStringValue(RevisedPrompt); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +57,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - GeneratedImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + GeneratedImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual GeneratedImage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GeneratedImage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeGeneratedImage(document.RootElement, options); } - internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, ModelReaderWriterOptions options = null) + internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,47 +81,52 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo BinaryData b64Json = default; Uri url = default; string revisedPrompt = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("b64_json"u8)) + if (prop.NameEquals("b64_json"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + b64Json = null; continue; } - b64Json = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); + b64Json = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("url"u8)) + if (prop.NameEquals("url"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + url = null; continue; } - url = new Uri(property.Value.GetString()); + url = new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("revised_prompt"u8)) + if (prop.NameEquals("revised_prompt"u8)) { - revisedPrompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + revisedPrompt = null; + continue; + } + revisedPrompt = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new GeneratedImage(b64Json, url, revisedPrompt, serializedAdditionalRawData); + return new GeneratedImage(b64Json, url, revisedPrompt, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -131,15 +136,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - GeneratedImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + GeneratedImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual GeneratedImage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeGeneratedImage(document.RootElement, options); } default: @@ -149,15 +155,16 @@ GeneratedImage IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static GeneratedImage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(GeneratedImage generatedImage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeGeneratedImage(document.RootElement); + return BinaryContent.Create(generatedImage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator GeneratedImage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeGeneratedImage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.cs b/.dotnet/src/Generated/Models/GeneratedImage.cs index 9177bfc96..71687f810 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.cs @@ -9,18 +9,20 @@ namespace OpenAI.Images { public partial class GeneratedImage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal GeneratedImage() { } - internal GeneratedImage(BinaryData imageBytes, Uri imageUri, string revisedPrompt, IDictionary serializedAdditionalRawData) + internal GeneratedImage(BinaryData b64Json, Uri url, string revisedPrompt, IDictionary additionalBinaryDataProperties) { - ImageBytes = imageBytes; - ImageUri = imageUri; + B64Json = b64Json; + Url = url; RevisedPrompt = revisedPrompt; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string RevisedPrompt { get; } + + public string RevisedPrompt { get; set; } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 46bcc4d4e..527e767eb 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -5,28 +5,106 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { public partial class GeneratedImageCollection : IJsonModel { - GeneratedImageCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + GeneratedImageCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual GeneratedImageCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeGeneratedImageCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static GeneratedImageCollection DeserializeGeneratedImageCollection(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset created = default; + IList data = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("created"u8)) + { + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(GeneratedImage.DeserializeGeneratedImage(item, options)); + } + data = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new GeneratedImageCollection(created, data, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +114,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - GeneratedImageCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + GeneratedImageCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual GeneratedImageCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeGeneratedImageCollection(document.RootElement, options); } default: @@ -54,15 +133,16 @@ GeneratedImageCollection IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static GeneratedImageCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(GeneratedImageCollection generatedImageCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeGeneratedImageCollection(document.RootElement); + return BinaryContent.Create(generatedImageCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator GeneratedImageCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeGeneratedImageCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index 992b8ad42..55c74445a 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -4,12 +4,18 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Images { - public partial class GeneratedImageCollection : ReadOnlyCollection + public partial class GeneratedImageCollection { + private protected IDictionary _additionalBinaryDataProperties; + + internal GeneratedImageCollection(DateTimeOffset created, IList data, IDictionary additionalBinaryDataProperties) + { + Created = created; + Data = data; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageFormat.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageFormat.Serialization.cs index 6cbd234d9..3af6da0c2 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageFormat.Serialization.cs @@ -8,17 +8,23 @@ namespace OpenAI.Images { internal static partial class GeneratedImageFormatExtensions { - public static string ToSerialString(this GeneratedImageFormat value) => value switch + public static string ToSerialString(this Images.GeneratedImageFormat value) => value switch { - GeneratedImageFormat.Uri => "url", - GeneratedImageFormat.Bytes => "b64_json", + Images.GeneratedImageFormat.Uri => "url", + Images.GeneratedImageFormat.Bytes => "b64_json", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageFormat value.") }; - public static GeneratedImageFormat ToGeneratedImageFormat(this string value) + public static Images.GeneratedImageFormat ToGeneratedImageFormat(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "url")) return GeneratedImageFormat.Uri; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "b64_json")) return GeneratedImageFormat.Bytes; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "url")) + { + return Images.GeneratedImageFormat.Uri; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "b64_json")) + { + return Images.GeneratedImageFormat.Bytes; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageFormat value."); } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageQuality.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageQuality.Serialization.cs index 96d00a50c..270eaf51c 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageQuality.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageQuality.Serialization.cs @@ -8,17 +8,23 @@ namespace OpenAI.Images { internal static partial class GeneratedImageQualityExtensions { - public static string ToSerialString(this GeneratedImageQuality value) => value switch + public static string ToSerialString(this Images.GeneratedImageQuality value) => value switch { - GeneratedImageQuality.Standard => "standard", - GeneratedImageQuality.High => "hd", + Images.GeneratedImageQuality.Standard => "standard", + Images.GeneratedImageQuality.High => "hd", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageQuality value.") }; - public static GeneratedImageQuality ToGeneratedImageQuality(this string value) + public static Images.GeneratedImageQuality ToGeneratedImageQuality(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard")) return GeneratedImageQuality.Standard; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "hd")) return GeneratedImageQuality.High; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard")) + { + return Images.GeneratedImageQuality.Standard; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "hd")) + { + return Images.GeneratedImageQuality.High; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageQuality value."); } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageSize.cs b/.dotnet/src/Generated/Models/GeneratedImageSize.cs index 8a16802ab..3335b46ac 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageSize.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageSize.cs @@ -9,20 +9,36 @@ namespace OpenAI.Images { public readonly partial struct GeneratedImageSize : IEquatable { - private const string W256xH256Value = "256x256"; - private const string W512xH512Value = "512x512"; - private const string W1024xH1024Value = "1024x1024"; - private const string W1024xH1792Value = "1792x1024"; - private const string W1792xH1024Value = "1024x1792"; + private readonly string _value; + private const string _256x256Value = "256x256"; + private const string _512x512Value = "512x512"; + private const string _1024x1024Value = "1024x1024"; + private const string _1792x1024Value = "1792x1024"; + private const string _1024x1792Value = "1024x1792"; + + public static GeneratedImageSize _256x256 { get; } = new GeneratedImageSize(_256x256Value); + + public static GeneratedImageSize _512x512 { get; } = new GeneratedImageSize(_512x512Value); + + public static GeneratedImageSize _1024x1024 { get; } = new GeneratedImageSize(_1024x1024Value); + + public static GeneratedImageSize _1792x1024 { get; } = new GeneratedImageSize(_1792x1024Value); + + public static GeneratedImageSize _1024x1792 { get; } = new GeneratedImageSize(_1024x1792Value); + public static bool operator ==(GeneratedImageSize left, GeneratedImageSize right) => left.Equals(right); + public static bool operator !=(GeneratedImageSize left, GeneratedImageSize right) => !left.Equals(right); + public static implicit operator GeneratedImageSize(string value) => new GeneratedImageSize(value); + [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedImageSize other && Equals(other); + public bool Equals(GeneratedImageSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageStyle.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageStyle.Serialization.cs index ebb7cbd7f..813ec1fb1 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageStyle.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageStyle.Serialization.cs @@ -8,17 +8,23 @@ namespace OpenAI.Images { internal static partial class GeneratedImageStyleExtensions { - public static string ToSerialString(this GeneratedImageStyle value) => value switch + public static string ToSerialString(this Images.GeneratedImageStyle value) => value switch { - GeneratedImageStyle.Vivid => "vivid", - GeneratedImageStyle.Natural => "natural", + Images.GeneratedImageStyle.Vivid => "vivid", + Images.GeneratedImageStyle.Natural => "natural", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageStyle value.") }; - public static GeneratedImageStyle ToGeneratedImageStyle(this string value) + public static Images.GeneratedImageStyle ToGeneratedImageStyle(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "vivid")) return GeneratedImageStyle.Vivid; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "natural")) return GeneratedImageStyle.Natural; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vivid")) + { + return Images.GeneratedImageStyle.Vivid; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "natural")) + { + return Images.GeneratedImageStyle.Natural; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageStyle value."); } } diff --git a/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs b/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs index e8c256e31..7303500c8 100644 --- a/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs +++ b/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { public readonly partial struct GeneratedSpeechFormat : IEquatable { private readonly string _value; - - public GeneratedSpeechFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string Mp3Value = "mp3"; private const string OpusValue = "opus"; private const string AacValue = "aac"; @@ -23,22 +18,38 @@ public GeneratedSpeechFormat(string value) private const string WavValue = "wav"; private const string PcmValue = "pcm"; + public GeneratedSpeechFormat(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static GeneratedSpeechFormat Mp3 { get; } = new GeneratedSpeechFormat(Mp3Value); + public static GeneratedSpeechFormat Opus { get; } = new GeneratedSpeechFormat(OpusValue); + public static GeneratedSpeechFormat Aac { get; } = new GeneratedSpeechFormat(AacValue); + public static GeneratedSpeechFormat Flac { get; } = new GeneratedSpeechFormat(FlacValue); + public static GeneratedSpeechFormat Wav { get; } = new GeneratedSpeechFormat(WavValue); + public static GeneratedSpeechFormat Pcm { get; } = new GeneratedSpeechFormat(PcmValue); + public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right) => left.Equals(right); + public static bool operator !=(GeneratedSpeechFormat left, GeneratedSpeechFormat right) => !left.Equals(right); + public static implicit operator GeneratedSpeechFormat(string value) => new GeneratedSpeechFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedSpeechFormat other && Equals(other); + public bool Equals(GeneratedSpeechFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs b/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs index 14fad7425..7f70dee59 100644 --- a/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs +++ b/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { public readonly partial struct GeneratedSpeechVoice : IEquatable { private readonly string _value; - - public GeneratedSpeechVoice(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string AlloyValue = "alloy"; private const string EchoValue = "echo"; private const string FableValue = "fable"; @@ -23,22 +18,38 @@ public GeneratedSpeechVoice(string value) private const string NovaValue = "nova"; private const string ShimmerValue = "shimmer"; + public GeneratedSpeechVoice(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static GeneratedSpeechVoice Alloy { get; } = new GeneratedSpeechVoice(AlloyValue); + public static GeneratedSpeechVoice Echo { get; } = new GeneratedSpeechVoice(EchoValue); + public static GeneratedSpeechVoice Fable { get; } = new GeneratedSpeechVoice(FableValue); + public static GeneratedSpeechVoice Onyx { get; } = new GeneratedSpeechVoice(OnyxValue); + public static GeneratedSpeechVoice Nova { get; } = new GeneratedSpeechVoice(NovaValue); + public static GeneratedSpeechVoice Shimmer { get; } = new GeneratedSpeechVoice(ShimmerValue); + public static bool operator ==(GeneratedSpeechVoice left, GeneratedSpeechVoice right) => left.Equals(right); + public static bool operator !=(GeneratedSpeechVoice left, GeneratedSpeechVoice right) => !left.Equals(right); + public static implicit operator GeneratedSpeechVoice(string value) => new GeneratedSpeechVoice(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedSpeechVoice other && Equals(other); + public bool Equals(GeneratedSpeechVoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs b/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs index c0fc1a7ec..20bfeb5b4 100644 --- a/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs +++ b/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct HyperparameterBatchSize : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public HyperparameterBatchSize(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static HyperparameterBatchSize Auto { get; } = new HyperparameterBatchSize(AutoValue); + public static bool operator ==(HyperparameterBatchSize left, HyperparameterBatchSize right) => left.Equals(right); + public static bool operator !=(HyperparameterBatchSize left, HyperparameterBatchSize right) => !left.Equals(right); + public static implicit operator HyperparameterBatchSize(string value) => new HyperparameterBatchSize(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is HyperparameterBatchSize other && Equals(other); + public bool Equals(HyperparameterBatchSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs b/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs index 3f55bc831..c1ad7707b 100644 --- a/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs +++ b/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct HyperparameterCycleCount : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public HyperparameterCycleCount(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static HyperparameterCycleCount Auto { get; } = new HyperparameterCycleCount(AutoValue); + public static bool operator ==(HyperparameterCycleCount left, HyperparameterCycleCount right) => left.Equals(right); + public static bool operator !=(HyperparameterCycleCount left, HyperparameterCycleCount right) => !left.Equals(right); + public static implicit operator HyperparameterCycleCount(string value) => new HyperparameterCycleCount(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is HyperparameterCycleCount other && Equals(other); + public bool Equals(HyperparameterCycleCount other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs b/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs index a40fbb8d6..bdb78bb6e 100644 --- a/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs +++ b/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct HyperparameterLearningRate : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; public HyperparameterLearningRate(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; + _value = value; + } public static HyperparameterLearningRate Auto { get; } = new HyperparameterLearningRate(AutoValue); + public static bool operator ==(HyperparameterLearningRate left, HyperparameterLearningRate right) => left.Equals(right); + public static bool operator !=(HyperparameterLearningRate left, HyperparameterLearningRate right) => !left.Equals(right); + public static implicit operator HyperparameterLearningRate(string value) => new HyperparameterLearningRate(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is HyperparameterLearningRate other && Equals(other); + public bool Equals(HyperparameterLearningRate other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs index 6ccb44926..6e5ee3efd 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { @@ -14,18 +15,23 @@ internal partial class HyperparameterOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(HyperparameterOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("n_epochs") != true && Optional.IsDefined(NEpochs)) + if (Optional.IsDefined(NEpochs)) { writer.WritePropertyName("n_epochs"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(NEpochs); + writer.WriteRawValue(NEpochs); #else using (JsonDocument document = JsonDocument.Parse(NEpochs)) { @@ -33,11 +39,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - if (SerializedAdditionalRawData?.ContainsKey("batch_size") != true && Optional.IsDefined(BatchSize)) + if (Optional.IsDefined(BatchSize)) { writer.WritePropertyName("batch_size"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(BatchSize); + writer.WriteRawValue(BatchSize); #else using (JsonDocument document = JsonDocument.Parse(BatchSize)) { @@ -45,11 +51,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - if (SerializedAdditionalRawData?.ContainsKey("learning_rate_multiplier") != true && Optional.IsDefined(LearningRateMultiplier)) + if (Optional.IsDefined(LearningRateMultiplier)) { writer.WritePropertyName("learning_rate_multiplier"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(LearningRateMultiplier); + writer.WriteRawValue(LearningRateMultiplier); #else using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) { @@ -57,17 +63,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -76,25 +78,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - HyperparameterOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + HyperparameterOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual HyperparameterOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(HyperparameterOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeHyperparameterOptions(document.RootElement, options); } - internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -102,51 +102,52 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme BinaryData nEpochs = default; BinaryData batchSize = default; BinaryData learningRateMultiplier = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("n_epochs"u8)) + if (prop.NameEquals("n_epochs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + nEpochs = null; continue; } - nEpochs = BinaryData.FromString(property.Value.GetRawText()); + nEpochs = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("batch_size"u8)) + if (prop.NameEquals("batch_size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + batchSize = null; continue; } - batchSize = BinaryData.FromString(property.Value.GetRawText()); + batchSize = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("learning_rate_multiplier"u8)) + if (prop.NameEquals("learning_rate_multiplier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + learningRateMultiplier = null; continue; } - learningRateMultiplier = BinaryData.FromString(property.Value.GetRawText()); + learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new HyperparameterOptions(nEpochs, batchSize, learningRateMultiplier, serializedAdditionalRawData); + return new HyperparameterOptions(nEpochs, batchSize, learningRateMultiplier, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -156,15 +157,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - HyperparameterOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + HyperparameterOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual HyperparameterOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeHyperparameterOptions(document.RootElement, options); } default: @@ -174,15 +176,16 @@ HyperparameterOptions IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static HyperparameterOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(HyperparameterOptions hyperparameterOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHyperparameterOptions(document.RootElement); + return BinaryContent.Create(hyperparameterOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator HyperparameterOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeHyperparameterOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.cs index 06e35aa06..d6b715e2a 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.cs @@ -9,21 +9,24 @@ namespace OpenAI.FineTuning { internal partial class HyperparameterOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public HyperparameterOptions() { } - internal HyperparameterOptions(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary serializedAdditionalRawData) + internal HyperparameterOptions(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary additionalBinaryDataProperties) { NEpochs = nEpochs; BatchSize = batchSize; LearningRateMultiplier = learningRateMultiplier; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public BinaryData NEpochs { get; set; } + public BinaryData BatchSize { get; set; } + public BinaryData LearningRateMultiplier { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index 45e614018..d1e2b40fe 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -15,43 +15,28 @@ public partial class ImageEditOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("image") != true) - { - writer.WritePropertyName("image"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Image); -#else - using (JsonDocument document = JsonDocument.Parse(Image)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true) - { - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - } - if (SerializedAdditionalRawData?.ContainsKey("mask") != true && Optional.IsDefined(Mask)) + writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + if (Optional.IsDefined(Mask)) { writer.WritePropertyName("mask"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Mask); -#else - using (JsonDocument document = JsonDocument.Parse(Mask)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteBase64StringValue(Mask.ToArray(), "D"); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) + if (Optional.IsDefined(Model)) { if (Model != null) { @@ -60,10 +45,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(N)) { if (N != null) { @@ -72,10 +57,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } else { - writer.WriteNull("n"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) + if (Optional.IsDefined(Size)) { if (Size != null) { @@ -84,37 +69,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } else { - writer.WriteNull("size"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); + writer.WriteStringValue(ResponseFormat.Value.ToString()); } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(EndUserId); + writer.WriteStringValue(User); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -123,25 +104,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - ImageEditOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageEditOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageEditOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageEditOptions(document.RootElement, options); } - internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -150,85 +129,88 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element string prompt = default; BinaryData mask = default; InternalCreateImageEditRequestModel? model = default; - long? n = default; - GeneratedImageSize? size = default; - GeneratedImageFormat? responseFormat = default; + int? n = default; + InternalCreateImageEditRequestSize? size = default; + InternalCreateImageEditRequestResponseFormat? responseFormat = default; string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("image"u8)) + if (prop.NameEquals("image"u8)) { - image = BinaryData.FromString(property.Value.GetRawText()); + image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("mask"u8)) + if (prop.NameEquals("mask"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + mask = null; continue; } - mask = BinaryData.FromString(property.Value.GetRawText()); + mask = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { model = null; continue; } - model = new InternalCreateImageEditRequestModel(property.Value.GetString()); + model = new InternalCreateImageEditRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { n = null; continue; } - n = property.Value.GetInt64(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { size = null; continue; } - size = new GeneratedImageSize(property.Value.GetString()); + size = new InternalCreateImageEditRequestSize(prop.Value.GetString()); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = property.Value.GetString().ToGeneratedImageFormat(); + responseFormat = new InternalCreateImageEditRequestResponseFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ImageEditOptions( image, prompt, @@ -238,92 +220,33 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element size, responseFormat, user, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(Image, "image", "image"); - content.Add(Prompt, "prompt"); - if (Optional.IsDefined(Mask)) - { - content.Add(Mask, "mask", "mask"); - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - content.Add(Model.Value.ToString(), "model"); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - content.Add(N.Value, "n"); - } - } - if (Optional.IsDefined(Size)) - { - if (Size != null) - { - content.Add(Size.Value.ToString(), "size"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); - } - } - if (Optional.IsDefined(EndUserId)) - { - content.Add(EndUserId, "user"); - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{options.Format}' format."); } } - ImageEditOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageEditOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageEditOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageEditOptions(document.RootElement, options); } default: @@ -331,17 +254,18 @@ ImageEditOptions IPersistableModel.Create(BinaryData data, Mod } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageEditOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageEditOptions imageEditOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageEditOptions(document.RootElement); + return BinaryContent.Create(imageEditOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageEditOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageEditOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index c46d7879c..2b87b6500 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -9,9 +9,9 @@ namespace OpenAI.Images { public partial class ImageEditOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ImageEditOptions(BinaryData image, string prompt, BinaryData mask, InternalCreateImageEditRequestModel? model, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary serializedAdditionalRawData) + internal ImageEditOptions(BinaryData image, string prompt, BinaryData mask, InternalCreateImageEditRequestModel? model, int? n, InternalCreateImageEditRequestSize? size, InternalCreateImageEditRequestResponseFormat? responseFormat, string user, IDictionary additionalBinaryDataProperties) { Image = image; Prompt = prompt; @@ -20,8 +20,8 @@ internal ImageEditOptions(BinaryData image, string prompt, BinaryData mask, Inte N = n; Size = size; ResponseFormat = responseFormat; - EndUserId = endUserId; - SerializedAdditionalRawData = serializedAdditionalRawData; + User = user; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index a007fd04a..adddd2580 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -14,19 +15,21 @@ public partial class ImageGenerationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true) - { - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + if (Optional.IsDefined(Model)) { if (Model != null) { @@ -35,10 +38,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(N)) { if (N != null) { @@ -47,15 +50,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("n"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("quality") != true && Optional.IsDefined(Quality)) + if (Optional.IsDefined(Quality)) { writer.WritePropertyName("quality"u8); writer.WriteStringValue(Quality.Value.ToSerialString()); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { @@ -64,10 +67,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) + if (Optional.IsDefined(Size)) { if (Size != null) { @@ -76,10 +79,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("size"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("style") != true && Optional.IsDefined(Style)) + if (Optional.IsDefined(Style)) { if (Style != null) { @@ -88,25 +91,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("style"); + writer.WriteNull("style"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(EndUserId); + writer.WriteStringValue(User); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -115,117 +114,118 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } - ImageGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageGenerationOptions(document.RootElement, options); } - internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string prompt = default; InternalCreateImageRequestModel? model = default; - long? n = default; - GeneratedImageQuality? quality = default; - GeneratedImageFormat? responseFormat = default; + int? n = default; + Images.GeneratedImageQuality? quality = default; + Images.GeneratedImageFormat? responseFormat = default; GeneratedImageSize? size = default; - GeneratedImageStyle? style = default; + Images.GeneratedImageStyle? style = default; string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { model = null; continue; } - model = new InternalCreateImageRequestModel(property.Value.GetString()); + model = new InternalCreateImageRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { n = null; continue; } - n = property.Value.GetInt64(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("quality"u8)) + if (prop.NameEquals("quality"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + quality = null; continue; } - quality = property.Value.GetString().ToGeneratedImageQuality(); + quality = prop.Value.GetString().ToGeneratedImageQuality(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = property.Value.GetString().ToGeneratedImageFormat(); + responseFormat = prop.Value.GetString().ToGeneratedImageFormat(); continue; } - if (property.NameEquals("size"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { size = null; continue; } - size = new GeneratedImageSize(property.Value.GetString()); + size = new GeneratedImageSize(prop.Value.GetString()); continue; } - if (property.NameEquals("style"u8)) + if (prop.NameEquals("style"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { style = null; continue; } - style = property.Value.GetString().ToGeneratedImageStyle(); + style = prop.Value.GetString().ToGeneratedImageStyle(); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ImageGenerationOptions( prompt, model, @@ -235,13 +235,14 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle size, style, user, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -251,15 +252,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - ImageGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageGenerationOptions(document.RootElement, options); } default: @@ -269,15 +271,16 @@ ImageGenerationOptions IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageGenerationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageGenerationOptions imageGenerationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageGenerationOptions(document.RootElement); + return BinaryContent.Create(imageGenerationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageGenerationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageGenerationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index e7d9311dc..4802454a1 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -9,9 +9,9 @@ namespace OpenAI.Images { public partial class ImageGenerationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ImageGenerationOptions(string prompt, InternalCreateImageRequestModel? model, long? n, GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, string endUserId, IDictionary serializedAdditionalRawData) + internal ImageGenerationOptions(string prompt, InternalCreateImageRequestModel? model, int? n, Images.GeneratedImageQuality? quality, Images.GeneratedImageFormat? responseFormat, GeneratedImageSize? size, Images.GeneratedImageStyle? style, string user, IDictionary additionalBinaryDataProperties) { Prompt = prompt; Model = model; @@ -20,12 +20,16 @@ internal ImageGenerationOptions(string prompt, InternalCreateImageRequestModel? ResponseFormat = responseFormat; Size = size; Style = style; - EndUserId = endUserId; - SerializedAdditionalRawData = serializedAdditionalRawData; + User = user; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public GeneratedImageQuality? Quality { get; set; } - public GeneratedImageFormat? ResponseFormat { get; set; } + + public Images.GeneratedImageQuality? Quality { get; set; } + + public Images.GeneratedImageFormat? ResponseFormat { get; set; } + public GeneratedImageSize? Size { get; set; } - public GeneratedImageStyle? Style { get; set; } + + public Images.GeneratedImageStyle? Style { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index aea32c3d6..d71bff04c 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -15,26 +15,21 @@ public partial class ImageVariationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("image") != true) - { - writer.WritePropertyName("image"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Image); -#else - using (JsonDocument document = JsonDocument.Parse(Image)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) + writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); + if (Optional.IsDefined(Model)) { if (Model != null) { @@ -43,10 +38,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(N)) { if (N != null) { @@ -55,22 +50,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("n"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); + writer.WriteStringValue(ResponseFormat.Value.ToString()); } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) + if (Optional.IsDefined(Size)) { if (Size != null) { @@ -79,25 +74,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("size"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(EndUserId); + writer.WriteStringValue(User); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -106,96 +97,96 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - ImageVariationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageVariationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageVariationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageVariationOptions(document.RootElement, options); } - internal static ImageVariationOptions DeserializeImageVariationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageVariationOptions DeserializeImageVariationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } BinaryData image = default; InternalCreateImageVariationRequestModel? model = default; - long? n = default; - GeneratedImageFormat? responseFormat = default; - GeneratedImageSize? size = default; + int? n = default; + InternalCreateImageVariationRequestResponseFormat? responseFormat = default; + InternalCreateImageVariationRequestSize? size = default; string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("image"u8)) + if (prop.NameEquals("image"u8)) { - image = BinaryData.FromString(property.Value.GetRawText()); + image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { model = null; continue; } - model = new InternalCreateImageVariationRequestModel(property.Value.GetString()); + model = new InternalCreateImageVariationRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { n = null; continue; } - n = property.Value.GetInt64(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = property.Value.GetString().ToGeneratedImageFormat(); + responseFormat = new InternalCreateImageVariationRequestResponseFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("size"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { size = null; continue; } - size = new GeneratedImageSize(property.Value.GetString()); + size = new InternalCreateImageVariationRequestSize(prop.Value.GetString()); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ImageVariationOptions( image, model, @@ -203,87 +194,33 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme responseFormat, size, user, - serializedAdditionalRawData); - } - - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } + additionalBinaryDataProperties); } - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(Image, "image", "image"); - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - content.Add(Model.Value.ToString(), "model"); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - content.Add(N.Value, "n"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); - } - } - if (Optional.IsDefined(Size)) - { - if (Size != null) - { - content.Add(Size.Value.ToString(), "size"); - } - } - if (Optional.IsDefined(EndUserId)) - { - content.Add(EndUserId, "user"); - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{options.Format}' format."); } } - ImageVariationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageVariationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageVariationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageVariationOptions(document.RootElement, options); } default: @@ -291,17 +228,18 @@ ImageVariationOptions IPersistableModel.Create(BinaryData } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageVariationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageVariationOptions imageVariationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageVariationOptions(document.RootElement); + return BinaryContent.Create(imageVariationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageVariationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageVariationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 6fac2f976..928143eb3 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -9,17 +9,17 @@ namespace OpenAI.Images { public partial class ImageVariationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ImageVariationOptions(BinaryData image, InternalCreateImageVariationRequestModel? model, long? n, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, string endUserId, IDictionary serializedAdditionalRawData) + internal ImageVariationOptions(BinaryData image, InternalCreateImageVariationRequestModel? model, int? n, InternalCreateImageVariationRequestResponseFormat? responseFormat, InternalCreateImageVariationRequestSize? size, string user, IDictionary additionalBinaryDataProperties) { Image = image; Model = model; N = n; ResponseFormat = responseFormat; Size = size; - EndUserId = endUserId; - SerializedAdditionalRawData = serializedAdditionalRawData; + User = user; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index f76b44afb..4b7e14b50 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -6,45 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalAddUploadPartRequest : IJsonModel { + internal InternalAddUploadPartRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAddUploadPartRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(global::System.BinaryData.FromStream(Data)); -#else - using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(Data))) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("data"u8); + writer.WriteBase64StringValue(Data.ToArray(), "D"); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -53,95 +48,68 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - InternalAddUploadPartRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAddUploadPartRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalAddUploadPartRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAddUploadPartRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAddUploadPartRequest(document.RootElement, options); } - internal static InternalAddUploadPartRequest DeserializeInternalAddUploadPartRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAddUploadPartRequest DeserializeInternalAddUploadPartRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - Stream data = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData data = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { - data = BinaryData.FromString(property.Value.GetRawText()).ToStream(); + data = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAddUploadPartRequest(data, serializedAdditionalRawData); + return new InternalAddUploadPartRequest(data, additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(Data, "data", "data", "application/octet-stream"); - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(InternalAddUploadPartRequest)} does not support writing '{options.Format}' format."); } } - InternalAddUploadPartRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAddUploadPartRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalAddUploadPartRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAddUploadPartRequest(document.RootElement, options); } default: @@ -149,17 +117,18 @@ InternalAddUploadPartRequest IPersistableModel.Cre } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalAddUploadPartRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAddUploadPartRequest internalAddUploadPartRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAddUploadPartRequest(document.RootElement); + return BinaryContent.Create(internalAddUploadPartRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalAddUploadPartRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAddUploadPartRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs index f6035f34b..5742d56fb 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs @@ -4,30 +4,27 @@ using System; using System.Collections.Generic; -using System.IO; +using OpenAI; namespace OpenAI.Files { internal partial class InternalAddUploadPartRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } - public InternalAddUploadPartRequest(Stream data) + private protected IDictionary _additionalBinaryDataProperties; + + public InternalAddUploadPartRequest(BinaryData data) { Argument.AssertNotNull(data, nameof(data)); Data = data; } - internal InternalAddUploadPartRequest(Stream data, IDictionary serializedAdditionalRawData) + internal InternalAddUploadPartRequest(BinaryData data, IDictionary additionalBinaryDataProperties) { Data = data; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalAddUploadPartRequest() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public Stream Data { get; } + public BinaryData Data { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs b/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs index bb627c2bc..e6fb3f5d3 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalAssistantObjectObject : IEquatable { private readonly string _value; + private const string AssistantValue = "assistant"; public InternalAssistantObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AssistantValue = "assistant"; + _value = value; + } public static InternalAssistantObjectObject Assistant { get; } = new InternalAssistantObjectObject(AssistantValue); + public static bool operator ==(InternalAssistantObjectObject left, InternalAssistantObjectObject right) => left.Equals(right); + public static bool operator !=(InternalAssistantObjectObject left, InternalAssistantObjectObject right) => !left.Equals(right); + public static implicit operator InternalAssistantObjectObject(string value) => new InternalAssistantObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalAssistantObjectObject other && Equals(other); + public bool Equals(InternalAssistantObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs index 80afbf5f6..73e5f782f 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,84 +15,62 @@ internal partial class InternalAssistantResponseFormatJsonObject : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatJsonObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalAssistantResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatJsonObject)JsonModelCreateCore(ref reader, options); + + protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatJsonObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantResponseFormatJsonObject(document.RootElement, options); } - internal static InternalAssistantResponseFormatJsonObject DeserializeInternalAssistantResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantResponseFormatJsonObject DeserializeInternalAssistantResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_object"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantResponseFormatJsonObject(type, serializedAdditionalRawData); + return new InternalAssistantResponseFormatJsonObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalAssistantResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatJsonObject)PersistableModelCreateCore(data, options); + protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantResponseFormatJsonObject(document.RootElement, options); } default: @@ -118,5 +98,17 @@ InternalAssistantResponseFormatJsonObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalAssistantResponseFormatJsonObject internalAssistantResponseFormatJsonObject) + { + return BinaryContent.Create(internalAssistantResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalAssistantResponseFormatJsonObject(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantResponseFormatJsonObject(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.cs index 96c7e52ef..48b864882 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.cs @@ -9,12 +9,11 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantResponseFormatJsonObject : AssistantResponseFormat { - public InternalAssistantResponseFormatJsonObject() + public InternalAssistantResponseFormatJsonObject() : base("json_object") { - Type = "json_object"; } - internal InternalAssistantResponseFormatJsonObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalAssistantResponseFormatJsonObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index 24865dbf9..777a13e94 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -7,103 +7,83 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Internal; namespace OpenAI.Assistants { internal partial class InternalAssistantResponseFormatJsonSchema : IJsonModel { + internal InternalAssistantResponseFormatJsonSchema() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatJsonSchema)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("json_schema") != true) - { - writer.WritePropertyName("json_schema"u8); - writer.WriteObjectValue(JsonSchema, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); } - InternalAssistantResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); + + protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatJsonSchema)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantResponseFormatJsonSchema(document.RootElement, options); } - internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAssistantResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAssistantResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_schema"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("json_schema"u8)) + if (prop.NameEquals("json_schema"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(property.Value, options); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantResponseFormatJsonSchema(type, serializedAdditionalRawData, jsonSchema); + return new InternalAssistantResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -113,15 +93,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalAssistantResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatJsonSchema)PersistableModelCreateCore(data, options); + protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantResponseFormatJsonSchema(document.RootElement, options); } default: @@ -130,5 +111,17 @@ InternalAssistantResponseFormatJsonSchema IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalAssistantResponseFormatJsonSchema internalAssistantResponseFormatJsonSchema) + { + return BinaryContent.Create(internalAssistantResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalAssistantResponseFormatJsonSchema(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantResponseFormatJsonSchema(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs index 68db77ffc..b67f33215 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs @@ -4,29 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; using OpenAI.Internal; namespace OpenAI.Assistants { internal partial class InternalAssistantResponseFormatJsonSchema : AssistantResponseFormat { - public InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) + public InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base("json_schema") { Argument.AssertNotNull(jsonSchema, nameof(jsonSchema)); - Type = "json_schema"; JsonSchema = jsonSchema; } - internal InternalAssistantResponseFormatJsonSchema(string type, IDictionary serializedAdditionalRawData, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(type, serializedAdditionalRawData) + internal InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } - internal InternalAssistantResponseFormatJsonSchema() - { - } - - public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; } + public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs index a2ae06eea..ac0400fcc 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,84 +15,62 @@ internal partial class InternalAssistantResponseFormatText : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatText)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalAssistantResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatText)JsonModelCreateCore(ref reader, options); + + protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantResponseFormatText)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantResponseFormatText(document.RootElement, options); } - internal static InternalAssistantResponseFormatText DeserializeInternalAssistantResponseFormatText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantResponseFormatText DeserializeInternalAssistantResponseFormatText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "text"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantResponseFormatText(type, serializedAdditionalRawData); + return new InternalAssistantResponseFormatText(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelRea } } - InternalAssistantResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatText)PersistableModelCreateCore(data, options); + protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantResponseFormatText(document.RootElement, options); } default: @@ -118,5 +98,17 @@ InternalAssistantResponseFormatText IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalAssistantResponseFormatText internalAssistantResponseFormatText) + { + return BinaryContent.Create(internalAssistantResponseFormatText, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalAssistantResponseFormatText(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantResponseFormatText(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.cs index e2763f14c..82330418f 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.cs @@ -9,12 +9,11 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantResponseFormatText : AssistantResponseFormat { - public InternalAssistantResponseFormatText() + public InternalAssistantResponseFormatText() : base("text") { - Type = "text"; } - internal InternalAssistantResponseFormatText(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalAssistantResponseFormatText(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index 7a8338608..7e56790ed 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalAssistantToolsFileSearchFileSearch : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchFileSearch)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("max_num_results") != true && Optional.IsDefined(InternalMaxNumResults)) + if (Optional.IsDefined(MaxNumResults)) { writer.WritePropertyName("max_num_results"u8); - writer.WriteNumberValue(InternalMaxNumResults.Value); + writer.WriteNumberValue(MaxNumResults.Value); } - if (SerializedAdditionalRawData?.ContainsKey("ranking_options") != true && Optional.IsDefined(RankingOptions)) + if (Optional.IsDefined(RankingOptions)) { writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalAssistantToolsFileSearchFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantToolsFileSearchFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalAssistantToolsFileSearchFileSearch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchFileSearch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantToolsFileSearchFileSearch(document.RootElement, options); } - internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAssistantToolsFileSearchFileSearch(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAssistantToolsFileSearchFileSearch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int? maxNumResults = default; FileSearchRankingOptions rankingOptions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("max_num_results"u8)) + if (prop.NameEquals("max_num_results"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + maxNumResults = null; continue; } - maxNumResults = property.Value.GetInt32(); + maxNumResults = prop.Value.GetInt32(); continue; } - if (property.NameEquals("ranking_options"u8)) + if (prop.NameEquals("ranking_options"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + rankingOptions = null; continue; } - rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(property.Value, options); + rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantToolsFileSearchFileSearch(maxNumResults, rankingOptions, serializedAdditionalRawData); + return new InternalAssistantToolsFileSearchFileSearch(maxNumResults, rankingOptions, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write(M } } - InternalAssistantToolsFileSearchFileSearch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantToolsFileSearchFileSearch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalAssistantToolsFileSearchFileSearch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantToolsFileSearchFileSearch(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalAssistantToolsFileSearchFileSearch IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalAssistantToolsFileSearchFileSearch FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAssistantToolsFileSearchFileSearch internalAssistantToolsFileSearchFileSearch) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAssistantToolsFileSearchFileSearch(document.RootElement); + return BinaryContent.Create(internalAssistantToolsFileSearchFileSearch, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalAssistantToolsFileSearchFileSearch(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantToolsFileSearchFileSearch(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs index 6da7606a9..a6adb045f 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs @@ -9,17 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchFileSearch { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalAssistantToolsFileSearchFileSearch() { } - internal InternalAssistantToolsFileSearchFileSearch(int? internalMaxNumResults, FileSearchRankingOptions rankingOptions, IDictionary serializedAdditionalRawData) + internal InternalAssistantToolsFileSearchFileSearch(int? maxNumResults, FileSearchRankingOptions rankingOptions, IDictionary additionalBinaryDataProperties) { - InternalMaxNumResults = internalMaxNumResults; + MaxNumResults = maxNumResults; RankingOptions = rankingOptions; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public FileSearchRankingOptions RankingOptions { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index ef306bf2a..375e9891d 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,27 @@ internal partial class InternalAssistantToolsFileSearchTypeOnly : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchTypeOnly)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +44,49 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } - InternalAssistantToolsFileSearchTypeOnly IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantToolsFileSearchTypeOnly IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalAssistantToolsFileSearchTypeOnly JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchTypeOnly)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantToolsFileSearchTypeOnly(document.RootElement, options); } - internal static InternalAssistantToolsFileSearchTypeOnly DeserializeInternalAssistantToolsFileSearchTypeOnly(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantToolsFileSearchTypeOnly DeserializeInternalAssistantToolsFileSearchTypeOnly(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalAssistantToolsFileSearchTypeOnlyType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalAssistantToolsFileSearchTypeOnlyType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalAssistantToolsFileSearchTypeOnlyType(property.Value.GetString()); + @type = new InternalAssistantToolsFileSearchTypeOnlyType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantToolsFileSearchTypeOnly(type, serializedAdditionalRawData); + return new InternalAssistantToolsFileSearchTypeOnly(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +96,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalAssistantToolsFileSearchTypeOnly IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantToolsFileSearchTypeOnly IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalAssistantToolsFileSearchTypeOnly PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantToolsFileSearchTypeOnly(document.RootElement, options); } default: @@ -119,15 +115,16 @@ InternalAssistantToolsFileSearchTypeOnly IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalAssistantToolsFileSearchTypeOnly FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAssistantToolsFileSearchTypeOnly internalAssistantToolsFileSearchTypeOnly) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAssistantToolsFileSearchTypeOnly(document.RootElement); + return BinaryContent.Create(internalAssistantToolsFileSearchTypeOnly, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalAssistantToolsFileSearchTypeOnly(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantToolsFileSearchTypeOnly(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs index 607f7fb44..59791e3e6 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchTypeOnly { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalAssistantToolsFileSearchTypeOnly() { } - internal InternalAssistantToolsFileSearchTypeOnly(InternalAssistantToolsFileSearchTypeOnlyType type, IDictionary serializedAdditionalRawData) + internal InternalAssistantToolsFileSearchTypeOnly(InternalAssistantToolsFileSearchTypeOnlyType @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalAssistantToolsFileSearchTypeOnlyType Type { get; } = InternalAssistantToolsFileSearchTypeOnlyType.FileSearch; + public InternalAssistantToolsFileSearchTypeOnlyType Type { get; } = "file_search"; } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs index c1378a9ae..c7b227d48 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalAssistantToolsFileSearchTypeOnlyType : IEquatable { private readonly string _value; + private const string FileSearchValue = "file_search"; public InternalAssistantToolsFileSearchTypeOnlyType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FileSearchValue = "file_search"; + _value = value; + } public static InternalAssistantToolsFileSearchTypeOnlyType FileSearch { get; } = new InternalAssistantToolsFileSearchTypeOnlyType(FileSearchValue); + public static bool operator ==(InternalAssistantToolsFileSearchTypeOnlyType left, InternalAssistantToolsFileSearchTypeOnlyType right) => left.Equals(right); + public static bool operator !=(InternalAssistantToolsFileSearchTypeOnlyType left, InternalAssistantToolsFileSearchTypeOnlyType right) => !left.Equals(right); + public static implicit operator InternalAssistantToolsFileSearchTypeOnlyType(string value) => new InternalAssistantToolsFileSearchTypeOnlyType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalAssistantToolsFileSearchTypeOnlyType other && Equals(other); + public bool Equals(InternalAssistantToolsFileSearchTypeOnlyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index 0ef83db21..427572b52 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalAssistantsNamedToolChoiceFunction : IJsonModel { + internal InternalAssistantsNamedToolChoiceFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantsNamedToolChoiceFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalAssistantsNamedToolChoiceFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAssistantsNamedToolChoiceFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalAssistantsNamedToolChoiceFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAssistantsNamedToolChoiceFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAssistantsNamedToolChoiceFunction(document.RootElement, options); } - internal static InternalAssistantsNamedToolChoiceFunction DeserializeInternalAssistantsNamedToolChoiceFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAssistantsNamedToolChoiceFunction DeserializeInternalAssistantsNamedToolChoiceFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAssistantsNamedToolChoiceFunction(name, serializedAdditionalRawData); + return new InternalAssistantsNamedToolChoiceFunction(name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalAssistantsNamedToolChoiceFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAssistantsNamedToolChoiceFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalAssistantsNamedToolChoiceFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAssistantsNamedToolChoiceFunction(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalAssistantsNamedToolChoiceFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalAssistantsNamedToolChoiceFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAssistantsNamedToolChoiceFunction internalAssistantsNamedToolChoiceFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAssistantsNamedToolChoiceFunction(document.RootElement); + return BinaryContent.Create(internalAssistantsNamedToolChoiceFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalAssistantsNamedToolChoiceFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAssistantsNamedToolChoiceFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs index 88e7c6d17..e1405c3e8 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalAssistantsNamedToolChoiceFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalAssistantsNamedToolChoiceFunction(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -17,14 +19,10 @@ public InternalAssistantsNamedToolChoiceFunction(string name) Name = name; } - internal InternalAssistantsNamedToolChoiceFunction(string name, IDictionary serializedAdditionalRawData) + internal InternalAssistantsNamedToolChoiceFunction(string name, IDictionary additionalBinaryDataProperties) { Name = name; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalAssistantsNamedToolChoiceFunction() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Name { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs index a71bdc9a0..c8a214bea 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalAssistantsNamedToolChoiceType : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; + private const string CodeInterpreterValue = "code_interpreter"; + private const string FileSearchValue = "file_search"; public InternalAssistantsNamedToolChoiceType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; - private const string CodeInterpreterValue = "code_interpreter"; - private const string FileSearchValue = "file_search"; + _value = value; + } public static InternalAssistantsNamedToolChoiceType Function { get; } = new InternalAssistantsNamedToolChoiceType(FunctionValue); + public static InternalAssistantsNamedToolChoiceType CodeInterpreter { get; } = new InternalAssistantsNamedToolChoiceType(CodeInterpreterValue); + public static InternalAssistantsNamedToolChoiceType FileSearch { get; } = new InternalAssistantsNamedToolChoiceType(FileSearchValue); + public static bool operator ==(InternalAssistantsNamedToolChoiceType left, InternalAssistantsNamedToolChoiceType right) => left.Equals(right); + public static bool operator !=(InternalAssistantsNamedToolChoiceType left, InternalAssistantsNamedToolChoiceType right) => !left.Equals(right); + public static implicit operator InternalAssistantsNamedToolChoiceType(string value) => new InternalAssistantsNamedToolChoiceType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalAssistantsNamedToolChoiceType other && Equals(other); + public bool Equals(InternalAssistantsNamedToolChoiceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs index 3f1028c9f..51478a649 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,84 +15,62 @@ internal partial class InternalAutoChunkingStrategy : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAutoChunkingStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalAutoChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAutoChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAutoChunkingStrategy)JsonModelCreateCore(ref reader, options); + + protected override FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAutoChunkingStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAutoChunkingStrategy(document.RootElement, options); } - internal static InternalAutoChunkingStrategy DeserializeInternalAutoChunkingStrategy(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAutoChunkingStrategy DeserializeInternalAutoChunkingStrategy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "auto"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAutoChunkingStrategy(type, serializedAdditionalRawData); + return new InternalAutoChunkingStrategy(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - InternalAutoChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAutoChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalAutoChunkingStrategy)PersistableModelCreateCore(data, options); + protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAutoChunkingStrategy(document.RootElement, options); } default: @@ -119,15 +99,16 @@ InternalAutoChunkingStrategy IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalAutoChunkingStrategy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAutoChunkingStrategy internalAutoChunkingStrategy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAutoChunkingStrategy(document.RootElement); + return BinaryContent.Create(internalAutoChunkingStrategy, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalAutoChunkingStrategy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAutoChunkingStrategy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.cs index 09a132829..0ff708766 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.cs @@ -9,12 +9,11 @@ namespace OpenAI.VectorStores { internal partial class InternalAutoChunkingStrategy : FileChunkingStrategy { - public InternalAutoChunkingStrategy() + public InternalAutoChunkingStrategy() : base("auto") { - Type = "auto"; } - internal InternalAutoChunkingStrategy(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalAutoChunkingStrategy(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs index ba2aafdaa..a0402b53d 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,84 +15,62 @@ internal partial class InternalAutoChunkingStrategyRequestParam : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAutoChunkingStrategyRequestParam)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalAutoChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalAutoChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAutoChunkingStrategyRequestParam)JsonModelCreateCore(ref reader, options); + + protected override InternalFileChunkingStrategyRequestParam JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalAutoChunkingStrategyRequestParam)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalAutoChunkingStrategyRequestParam(document.RootElement, options); } - internal static InternalAutoChunkingStrategyRequestParam DeserializeInternalAutoChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalAutoChunkingStrategyRequestParam DeserializeInternalAutoChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "auto"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAutoChunkingStrategyRequestParam(type, serializedAdditionalRawData); + return new InternalAutoChunkingStrategyRequestParam(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalAutoChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalAutoChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalAutoChunkingStrategyRequestParam)PersistableModelCreateCore(data, options); + protected override InternalFileChunkingStrategyRequestParam PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalAutoChunkingStrategyRequestParam(document.RootElement, options); } default: @@ -119,15 +99,16 @@ InternalAutoChunkingStrategyRequestParam IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalAutoChunkingStrategyRequestParam FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalAutoChunkingStrategyRequestParam internalAutoChunkingStrategyRequestParam) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalAutoChunkingStrategyRequestParam(document.RootElement); + return BinaryContent.Create(internalAutoChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalAutoChunkingStrategyRequestParam(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalAutoChunkingStrategyRequestParam(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.cs index 3b429d3e7..9fd245b0c 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.cs @@ -9,12 +9,11 @@ namespace OpenAI.VectorStores { internal partial class InternalAutoChunkingStrategyRequestParam : InternalFileChunkingStrategyRequestParam { - public InternalAutoChunkingStrategyRequestParam() + public InternalAutoChunkingStrategyRequestParam() : base("auto") { - Type = "auto"; } - internal InternalAutoChunkingStrategyRequestParam(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalAutoChunkingStrategyRequestParam(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs b/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs index 836a9c1e7..b488ec4cd 100644 --- a/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs +++ b/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalBatchCompletionTimeframe : IEquatable { private readonly string _value; + private const string _24hValue = "24h"; public InternalBatchCompletionTimeframe(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string _24hValue = "24h"; + _value = value; + } public static InternalBatchCompletionTimeframe _24h { get; } = new InternalBatchCompletionTimeframe(_24hValue); + public static bool operator ==(InternalBatchCompletionTimeframe left, InternalBatchCompletionTimeframe right) => left.Equals(right); + public static bool operator !=(InternalBatchCompletionTimeframe left, InternalBatchCompletionTimeframe right) => !left.Equals(right); + public static implicit operator InternalBatchCompletionTimeframe(string value) => new InternalBatchCompletionTimeframe(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalBatchCompletionTimeframe other && Equals(other); + public bool Equals(InternalBatchCompletionTimeframe other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs index 0e768f6aa..e644adf53 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,24 +15,29 @@ internal partial class InternalBatchError : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true && Optional.IsDefined(Code)) + if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (SerializedAdditionalRawData?.ContainsKey("message") != true && Optional.IsDefined(Message)) + if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (SerializedAdditionalRawData?.ContainsKey("param") != true && Optional.IsDefined(Param)) + if (Optional.IsDefined(Param)) { if (Param != null) { @@ -40,10 +46,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("param"); + writer.WriteNull("param"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("line") != true && Optional.IsDefined(Line)) + if (Optional.IsDefined(Line)) { if (Line != null) { @@ -52,20 +58,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("line"); + writer.WriteNull("line"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,81 +76,87 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - InternalBatchError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchError(document.RootElement, options); } - internal static InternalBatchError DeserializeInternalBatchError(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchError DeserializeInternalBatchError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string code = default; string message = default; - string param = default; + string @param = default; int? line = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = prop.Value.GetString(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + message = null; + continue; + } + message = prop.Value.GetString(); continue; } - if (property.NameEquals("param"u8)) + if (prop.NameEquals("param"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - param = null; + @param = null; continue; } - param = property.Value.GetString(); + @param = prop.Value.GetString(); continue; } - if (property.NameEquals("line"u8)) + if (prop.NameEquals("line"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { line = null; continue; } - line = property.Value.GetInt32(); + line = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchError(code, message, param, line, serializedAdditionalRawData); + return new InternalBatchError(code, message, @param, line, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,15 +166,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - InternalBatchError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchError(document.RootElement, options); } default: @@ -176,15 +185,16 @@ InternalBatchError IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchError internalBatchError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchError(document.RootElement); + return BinaryContent.Create(internalBatchError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.cs b/.dotnet/src/Generated/Models/InternalBatchError.cs index 411b48c42..6ecc54596 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.cs @@ -9,23 +9,27 @@ namespace OpenAI.Batch { internal partial class InternalBatchError { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchError() { } - internal InternalBatchError(string code, string message, string param, int? line, IDictionary serializedAdditionalRawData) + internal InternalBatchError(string code, string message, string @param, int? line, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - Param = param; + Param = @param; Line = line; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Code { get; } - public string Message { get; } - public string Param { get; } - public int? Line { get; } + public string Code { get; set; } + + public string Message { get; set; } + + public string Param { get; set; } + + public int? Line { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index d75c78a08..a9c8cc293 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,19 +15,24 @@ internal partial class InternalBatchErrors : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchErrors)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true && Optional.IsDefined(Object)) + if (Optional.IsDefined(Object)) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("data") != true && Optional.IsCollectionDefined(Data)) + if (Optional.IsCollectionDefined(Data)) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -36,17 +42,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,72 +57,69 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } - InternalBatchErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchErrors JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchErrors)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchErrors(document.RootElement, options); } - internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalBatchErrorsObject? @object = default; - IReadOnlyList data = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList data = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @object = null; continue; } - @object = new InternalBatchErrorsObject(property.Value.GetString()); + @object = new InternalBatchErrorsObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalBatchError.DeserializeInternalBatchError(item, options)); } data = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchErrors(@object, data ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalBatchErrors(@object, data ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +129,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - InternalBatchErrors IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchErrors IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchErrors PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchErrors(document.RootElement, options); } default: @@ -148,15 +148,16 @@ InternalBatchErrors IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchErrors FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchErrors internalBatchErrors) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchErrors(document.RootElement); + return BinaryContent.Create(internalBatchErrors, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchErrors(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchErrors(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.cs index ef20e9e07..b2778afe9 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.cs @@ -4,25 +4,28 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalBatchErrors { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchErrors() { Data = new ChangeTrackingList(); } - internal InternalBatchErrors(InternalBatchErrorsObject? @object, IReadOnlyList data, IDictionary serializedAdditionalRawData) + internal InternalBatchErrors(InternalBatchErrorsObject? @object, IList data, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalBatchErrorsObject? Object { get; } - public IReadOnlyList Data { get; } + public InternalBatchErrorsObject? Object { get; set; } + + public IList Data { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs b/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs index 0f98bd40d..d9f87a254 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalBatchErrorsObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalBatchErrorsObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalBatchErrorsObject List { get; } = new InternalBatchErrorsObject(ListValue); + public static bool operator ==(InternalBatchErrorsObject left, InternalBatchErrorsObject right) => left.Equals(right); + public static bool operator !=(InternalBatchErrorsObject left, InternalBatchErrorsObject right) => !left.Equals(right); + public static implicit operator InternalBatchErrorsObject(string value) => new InternalBatchErrorsObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalBatchErrorsObject other && Equals(other); + public bool Equals(InternalBatchErrorsObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index f0aa4f8f6..0216a9f94 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -7,116 +7,105 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalBatchJob : IJsonModel { + internal InternalBatchJob() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchJob)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("endpoint") != true) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint); - } - if (SerializedAdditionalRawData?.ContainsKey("errors") != true && Optional.IsDefined(Errors)) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + if (Optional.IsDefined(Errors)) { writer.WritePropertyName("errors"u8); writer.WriteObjectValue(Errors, options); } - if (SerializedAdditionalRawData?.ContainsKey("input_file_id") != true) - { - writer.WritePropertyName("input_file_id"u8); - writer.WriteStringValue(InputFileId); - } - if (SerializedAdditionalRawData?.ContainsKey("completion_window") != true) - { - writer.WritePropertyName("completion_window"u8); - writer.WriteStringValue(CompletionWindow); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("output_file_id") != true && Optional.IsDefined(OutputFileId)) + writer.WritePropertyName("input_file_id"u8); + writer.WriteStringValue(InputFileId); + writer.WritePropertyName("completion_window"u8); + writer.WriteStringValue(CompletionWindow); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(OutputFileId)) { writer.WritePropertyName("output_file_id"u8); writer.WriteStringValue(OutputFileId); } - if (SerializedAdditionalRawData?.ContainsKey("error_file_id") != true && Optional.IsDefined(ErrorFileId)) + if (Optional.IsDefined(ErrorFileId)) { writer.WritePropertyName("error_file_id"u8); writer.WriteStringValue(ErrorFileId); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("in_progress_at") != true && Optional.IsDefined(InProgressAt)) + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (Optional.IsDefined(InProgressAt)) { writer.WritePropertyName("in_progress_at"u8); writer.WriteNumberValue(InProgressAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true && Optional.IsDefined(ExpiresAt)) + if (Optional.IsDefined(ExpiresAt)) { writer.WritePropertyName("expires_at"u8); writer.WriteNumberValue(ExpiresAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("finalizing_at") != true && Optional.IsDefined(FinalizingAt)) + if (Optional.IsDefined(FinalizingAt)) { writer.WritePropertyName("finalizing_at"u8); writer.WriteNumberValue(FinalizingAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("completed_at") != true && Optional.IsDefined(CompletedAt)) + if (Optional.IsDefined(CompletedAt)) { writer.WritePropertyName("completed_at"u8); writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("failed_at") != true && Optional.IsDefined(FailedAt)) + if (Optional.IsDefined(FailedAt)) { writer.WritePropertyName("failed_at"u8); writer.WriteNumberValue(FailedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("expired_at") != true && Optional.IsDefined(ExpiredAt)) + if (Optional.IsDefined(ExpiredAt)) { writer.WritePropertyName("expired_at"u8); writer.WriteNumberValue(ExpiredAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("cancelling_at") != true && Optional.IsDefined(CancellingAt)) + if (Optional.IsDefined(CancellingAt)) { writer.WritePropertyName("cancelling_at"u8); writer.WriteNumberValue(CancellingAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("cancelled_at") != true && Optional.IsDefined(CancelledAt)) + if (Optional.IsDefined(CancelledAt)) { writer.WritePropertyName("cancelled_at"u8); writer.WriteNumberValue(CancelledAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("request_counts") != true && Optional.IsDefined(RequestCounts)) + if (Optional.IsDefined(RequestCounts)) { writer.WritePropertyName("request_counts"u8); writer.WriteObjectValue(RequestCounts, options); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -125,26 +114,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -153,25 +143,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - InternalBatchJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchJob)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchJob(document.RootElement, options); } - internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -195,167 +183,191 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element DateTimeOffset? cancellingAt = default; DateTimeOffset? cancelledAt = default; InternalBatchRequestCounts requestCounts = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary metadata = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalBatchObject(property.Value.GetString()); + @object = new InternalBatchObject(prop.Value.GetString()); continue; } - if (property.NameEquals("endpoint"u8)) + if (prop.NameEquals("endpoint"u8)) { - endpoint = property.Value.GetString(); + endpoint = prop.Value.GetString(); continue; } - if (property.NameEquals("errors"u8)) + if (prop.NameEquals("errors"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + errors = null; continue; } - errors = InternalBatchErrors.DeserializeInternalBatchErrors(property.Value, options); + errors = InternalBatchErrors.DeserializeInternalBatchErrors(prop.Value, options); continue; } - if (property.NameEquals("input_file_id"u8)) + if (prop.NameEquals("input_file_id"u8)) { - inputFileId = property.Value.GetString(); + inputFileId = prop.Value.GetString(); continue; } - if (property.NameEquals("completion_window"u8)) + if (prop.NameEquals("completion_window"u8)) { - completionWindow = property.Value.GetString(); + completionWindow = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new InternalBatchStatus(property.Value.GetString()); + status = new InternalBatchStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("output_file_id"u8)) + if (prop.NameEquals("output_file_id"u8)) { - outputFileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + outputFileId = null; + continue; + } + outputFileId = prop.Value.GetString(); continue; } - if (property.NameEquals("error_file_id"u8)) + if (prop.NameEquals("error_file_id"u8)) { - errorFileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + errorFileId = null; + continue; + } + errorFileId = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("in_progress_at"u8)) + if (prop.NameEquals("in_progress_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + inProgressAt = null; continue; } - inProgressAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + inProgressAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + expiresAt = null; continue; } - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("finalizing_at"u8)) + if (prop.NameEquals("finalizing_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + finalizingAt = null; continue; } - finalizingAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + finalizingAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("completed_at"u8)) + if (prop.NameEquals("completed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + completedAt = null; continue; } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("failed_at"u8)) + if (prop.NameEquals("failed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + failedAt = null; continue; } - failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + failedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("expired_at"u8)) + if (prop.NameEquals("expired_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + expiredAt = null; continue; } - expiredAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiredAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("cancelling_at"u8)) + if (prop.NameEquals("cancelling_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + cancellingAt = null; continue; } - cancellingAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + cancellingAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("cancelled_at"u8)) + if (prop.NameEquals("cancelled_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + cancelledAt = null; continue; } - cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("request_counts"u8)) + if (prop.NameEquals("request_counts"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + requestCounts = null; continue; } - requestCounts = InternalBatchRequestCounts.DeserializeInternalBatchRequestCounts(property.Value, options); + requestCounts = InternalBatchRequestCounts.DeserializeInternalBatchRequestCounts(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalBatchJob( id, @object, @@ -377,13 +389,14 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element cancelledAt, requestCounts, metadata ?? new ChangeTrackingDictionary(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -393,15 +406,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - InternalBatchJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchJob(document.RootElement, options); } default: @@ -411,15 +425,16 @@ InternalBatchJob IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchJob FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchJob internalBatchJob) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchJob(document.RootElement); + return BinaryContent.Create(internalBatchJob, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchJob(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchJob(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.cs b/.dotnet/src/Generated/Models/InternalBatchJob.cs index bbd35aeac..18ff5b4d2 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.cs @@ -4,19 +4,16 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalBatchJob { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchJob(string id, string endpoint, string inputFileId, string completionWindow, InternalBatchStatus status, DateTimeOffset createdAt) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(inputFileId, nameof(inputFileId)); - Argument.AssertNotNull(completionWindow, nameof(completionWindow)); - Id = id; Endpoint = endpoint; InputFileId = inputFileId; @@ -26,7 +23,7 @@ internal InternalBatchJob(string id, string endpoint, string inputFileId, string Metadata = new ChangeTrackingDictionary(); } - internal InternalBatchJob(string id, InternalBatchObject @object, string endpoint, InternalBatchErrors errors, string inputFileId, string completionWindow, InternalBatchStatus status, string outputFileId, string errorFileId, DateTimeOffset createdAt, DateTimeOffset? inProgressAt, DateTimeOffset? expiresAt, DateTimeOffset? finalizingAt, DateTimeOffset? completedAt, DateTimeOffset? failedAt, DateTimeOffset? expiredAt, DateTimeOffset? cancellingAt, DateTimeOffset? cancelledAt, InternalBatchRequestCounts requestCounts, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal InternalBatchJob(string id, InternalBatchObject @object, string endpoint, InternalBatchErrors errors, string inputFileId, string completionWindow, InternalBatchStatus status, string outputFileId, string errorFileId, DateTimeOffset createdAt, DateTimeOffset? inProgressAt, DateTimeOffset? expiresAt, DateTimeOffset? finalizingAt, DateTimeOffset? completedAt, DateTimeOffset? failedAt, DateTimeOffset? expiredAt, DateTimeOffset? cancellingAt, DateTimeOffset? cancelledAt, InternalBatchRequestCounts requestCounts, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -48,33 +45,47 @@ internal InternalBatchJob(string id, InternalBatchObject @object, string endpoin CancelledAt = cancelledAt; RequestCounts = requestCounts; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalBatchJob() - { - } + public string Id { get; set; } + + public InternalBatchObject Object { get; } = "batch"; + + public string Endpoint { get; set; } + + public InternalBatchErrors Errors { get; set; } + + public string InputFileId { get; set; } + + public string CompletionWindow { get; set; } + + public InternalBatchStatus Status { get; set; } + + public string OutputFileId { get; set; } + + public string ErrorFileId { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public DateTimeOffset? InProgressAt { get; set; } + + public DateTimeOffset? ExpiresAt { get; set; } + + public DateTimeOffset? FinalizingAt { get; set; } + + public DateTimeOffset? CompletedAt { get; set; } + + public DateTimeOffset? FailedAt { get; set; } + + public DateTimeOffset? ExpiredAt { get; set; } + + public DateTimeOffset? CancellingAt { get; set; } + + public DateTimeOffset? CancelledAt { get; set; } + + public InternalBatchRequestCounts RequestCounts { get; set; } - public string Id { get; } - public InternalBatchObject Object { get; } = InternalBatchObject.Batch; - - public string Endpoint { get; } - public InternalBatchErrors Errors { get; } - public string InputFileId { get; } - public string CompletionWindow { get; } - public InternalBatchStatus Status { get; } - public string OutputFileId { get; } - public string ErrorFileId { get; } - public DateTimeOffset CreatedAt { get; } - public DateTimeOffset? InProgressAt { get; } - public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? FinalizingAt { get; } - public DateTimeOffset? CompletedAt { get; } - public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? ExpiredAt { get; } - public DateTimeOffset? CancellingAt { get; } - public DateTimeOffset? CancelledAt { get; } - public InternalBatchRequestCounts RequestCounts { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchObject.cs b/.dotnet/src/Generated/Models/InternalBatchObject.cs index 96ff270ec..5b364711a 100644 --- a/.dotnet/src/Generated/Models/InternalBatchObject.cs +++ b/.dotnet/src/Generated/Models/InternalBatchObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalBatchObject : IEquatable { private readonly string _value; + private const string BatchValue = "batch"; public InternalBatchObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string BatchValue = "batch"; + _value = value; + } public static InternalBatchObject Batch { get; } = new InternalBatchObject(BatchValue); + public static bool operator ==(InternalBatchObject left, InternalBatchObject right) => left.Equals(right); + public static bool operator !=(InternalBatchObject left, InternalBatchObject right) => !left.Equals(right); + public static implicit operator InternalBatchObject(string value) => new InternalBatchObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalBatchObject other && Equals(other); + public bool Equals(InternalBatchObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index ad7ad277b..fd5f4e9ad 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalBatchRequestCounts : IJsonModel { + internal InternalBatchRequestCounts() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestCounts)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("total") != true) - { - writer.WritePropertyName("total"u8); - writer.WriteNumberValue(Total); - } - if (SerializedAdditionalRawData?.ContainsKey("completed") != true) - { - writer.WritePropertyName("completed"u8); - writer.WriteNumberValue(Completed); - } - if (SerializedAdditionalRawData?.ContainsKey("failed") != true) - { - writer.WritePropertyName("failed"u8); - writer.WriteNumberValue(Failed); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - InternalBatchRequestCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchRequestCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchRequestCounts JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestCounts)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchRequestCounts(document.RootElement, options); } - internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts int total = default; int completed = default; int failed = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("total"u8)) + if (prop.NameEquals("total"u8)) { - total = property.Value.GetInt32(); + total = prop.Value.GetInt32(); continue; } - if (property.NameEquals("completed"u8)) + if (prop.NameEquals("completed"u8)) { - completed = property.Value.GetInt32(); + completed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("failed"u8)) + if (prop.NameEquals("failed"u8)) { - failed = property.Value.GetInt32(); + failed = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchRequestCounts(total, completed, failed, serializedAdditionalRawData); + return new InternalBatchRequestCounts(total, completed, failed, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalBatchRequestCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchRequestCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchRequestCounts PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchRequestCounts(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalBatchRequestCounts IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchRequestCounts FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchRequestCounts internalBatchRequestCounts) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchRequestCounts(document.RootElement); + return BinaryContent.Create(internalBatchRequestCounts, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchRequestCounts(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchRequestCounts(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs index 1e9731e07..2a42bfa65 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs @@ -9,7 +9,8 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestCounts { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchRequestCounts(int total, int completed, int failed) { Total = total; @@ -17,20 +18,18 @@ internal InternalBatchRequestCounts(int total, int completed, int failed) Failed = failed; } - internal InternalBatchRequestCounts(int total, int completed, int failed, IDictionary serializedAdditionalRawData) + internal InternalBatchRequestCounts(int total, int completed, int failed, IDictionary additionalBinaryDataProperties) { Total = total; Completed = completed; Failed = failed; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalBatchRequestCounts() - { - } + public int Total { get; set; } + + public int Completed { get; set; } - public int Total { get; } - public int Completed { get; } - public int Failed { get; } + public int Failed { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs index fe753aed3..dbd9a05d1 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,39 +15,40 @@ internal partial class InternalBatchRequestInput : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestInput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("custom_id") != true && Optional.IsDefined(CustomId)) + if (Optional.IsDefined(CustomId)) { writer.WritePropertyName("custom_id"u8); writer.WriteStringValue(CustomId); } - if (SerializedAdditionalRawData?.ContainsKey("method") != true && Optional.IsDefined(Method)) + if (Optional.IsDefined(Method)) { writer.WritePropertyName("method"u8); writer.WriteStringValue(Method.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("url") != true && Optional.IsDefined(Url)) + if (Optional.IsDefined(Url)) { writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,73 +57,76 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - InternalBatchRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchRequestInput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestInput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchRequestInput(document.RootElement, options); } - internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string customId = default; - InternalBatchRequestInputMethod? method = default; + InternalBatchRequestInputMethod? @method = default; Uri url = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("custom_id"u8)) + if (prop.NameEquals("custom_id"u8)) { - customId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + customId = null; + continue; + } + customId = prop.Value.GetString(); continue; } - if (property.NameEquals("method"u8)) + if (prop.NameEquals("method"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @method = null; continue; } - method = new InternalBatchRequestInputMethod(property.Value.GetString()); + @method = new InternalBatchRequestInputMethod(prop.Value.GetString()); continue; } - if (property.NameEquals("url"u8)) + if (prop.NameEquals("url"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + url = null; continue; } - url = new Uri(property.Value.GetString()); + url = new Uri(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchRequestInput(customId, method, url, serializedAdditionalRawData); + return new InternalBatchRequestInput(customId, @method, url, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -131,15 +136,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - InternalBatchRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchRequestInput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchRequestInput(document.RootElement, options); } default: @@ -149,15 +155,16 @@ InternalBatchRequestInput IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchRequestInput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchRequestInput internalBatchRequestInput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchRequestInput(document.RootElement); + return BinaryContent.Create(internalBatchRequestInput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchRequestInput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchRequestInput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs index 7e4b58c93..7549c4e3a 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs @@ -9,21 +9,24 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestInput { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalBatchRequestInput() { } - internal InternalBatchRequestInput(string customId, InternalBatchRequestInputMethod? method, Uri url, IDictionary serializedAdditionalRawData) + internal InternalBatchRequestInput(string customId, InternalBatchRequestInputMethod? @method, Uri url, IDictionary additionalBinaryDataProperties) { CustomId = customId; - Method = method; + Method = @method; Url = url; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string CustomId { get; set; } + public InternalBatchRequestInputMethod? Method { get; set; } + public Uri Url { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs index daff5451d..9dbba62c6 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalBatchRequestInputMethod : IEquatable { private readonly string _value; + private const string POSTValue = "POST"; public InternalBatchRequestInputMethod(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string POSTValue = "POST"; + _value = value; + } public static InternalBatchRequestInputMethod POST { get; } = new InternalBatchRequestInputMethod(POSTValue); + public static bool operator ==(InternalBatchRequestInputMethod left, InternalBatchRequestInputMethod right) => left.Equals(right); + public static bool operator !=(InternalBatchRequestInputMethod left, InternalBatchRequestInputMethod right) => !left.Equals(right); + public static implicit operator InternalBatchRequestInputMethod(string value) => new InternalBatchRequestInputMethod(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalBatchRequestInputMethod other && Equals(other); + public bool Equals(InternalBatchRequestInputMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index cd87dfd3b..9ddfa0f69 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,24 +15,29 @@ internal partial class InternalBatchRequestOutput : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("custom_id") != true && Optional.IsDefined(CustomId)) + if (Optional.IsDefined(CustomId)) { writer.WritePropertyName("custom_id"u8); writer.WriteStringValue(CustomId); } - if (SerializedAdditionalRawData?.ContainsKey("response") != true && Optional.IsDefined(Response)) + if (Optional.IsDefined(Response)) { if (Response != null) { @@ -40,10 +46,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("response"); + writer.WriteNull("response"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("error") != true && Optional.IsDefined(Error)) + if (Optional.IsDefined(Error)) { if (Error != null) { @@ -52,20 +58,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("error"); + writer.WriteNull("error"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,25 +76,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - InternalBatchRequestOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchRequestOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchRequestOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchRequestOutput(document.RootElement, options); } - internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -101,54 +101,62 @@ internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput string customId = default; InternalBatchRequestOutputResponse response = default; InternalBatchRequestOutputError error = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (property.NameEquals("custom_id"u8)) + if (prop.NameEquals("custom_id"u8)) { - customId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + customId = null; + continue; + } + customId = prop.Value.GetString(); continue; } - if (property.NameEquals("response"u8)) + if (prop.NameEquals("response"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { response = null; continue; } - response = InternalBatchRequestOutputResponse.DeserializeInternalBatchRequestOutputResponse(property.Value, options); + response = InternalBatchRequestOutputResponse.DeserializeInternalBatchRequestOutputResponse(prop.Value, options); continue; } - if (property.NameEquals("error"u8)) + if (prop.NameEquals("error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { error = null; continue; } - error = InternalBatchRequestOutputError.DeserializeInternalBatchRequestOutputError(property.Value, options); + error = InternalBatchRequestOutputError.DeserializeInternalBatchRequestOutputError(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchRequestOutput(id, customId, response, error, serializedAdditionalRawData); + return new InternalBatchRequestOutput(id, customId, response, error, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,15 +166,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalBatchRequestOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchRequestOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchRequestOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchRequestOutput(document.RootElement, options); } default: @@ -176,15 +185,16 @@ InternalBatchRequestOutput IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchRequestOutput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchRequestOutput internalBatchRequestOutput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchRequestOutput(document.RootElement); + return BinaryContent.Create(internalBatchRequestOutput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchRequestOutput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchRequestOutput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs index ae119ecd7..986089f85 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs @@ -9,23 +9,27 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutput { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchRequestOutput() { } - internal InternalBatchRequestOutput(string id, string customId, InternalBatchRequestOutputResponse response, InternalBatchRequestOutputError error, IDictionary serializedAdditionalRawData) + internal InternalBatchRequestOutput(string id, string customId, InternalBatchRequestOutputResponse response, InternalBatchRequestOutputError error, IDictionary additionalBinaryDataProperties) { Id = id; CustomId = customId; Response = response; Error = error; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; } - public string CustomId { get; } - public InternalBatchRequestOutputResponse Response { get; } - public InternalBatchRequestOutputError Error { get; } + public string Id { get; set; } + + public string CustomId { get; set; } + + public InternalBatchRequestOutputResponse Response { get; set; } + + public InternalBatchRequestOutputError Error { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs index 00f747f15..6be0d0369 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,34 +15,35 @@ internal partial class InternalBatchRequestOutputError : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutputError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true && Optional.IsDefined(Code)) + if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (SerializedAdditionalRawData?.ContainsKey("message") != true && Optional.IsDefined(Message)) + if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalBatchRequestOutputError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchRequestOutputError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchRequestOutputError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutputError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchRequestOutputError(document.RootElement, options); } - internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestOutputError(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestOutputError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string code = default; string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = prop.Value.GetString(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + message = null; + continue; + } + message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchRequestOutputError(code, message, serializedAdditionalRawData); + return new InternalBatchRequestOutputError(code, message, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalBatchRequestOutputError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchRequestOutputError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchRequestOutputError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchRequestOutputError(document.RootElement, options); } default: @@ -130,15 +139,16 @@ InternalBatchRequestOutputError IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchRequestOutputError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchRequestOutputError internalBatchRequestOutputError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchRequestOutputError(document.RootElement); + return BinaryContent.Create(internalBatchRequestOutputError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchRequestOutputError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchRequestOutputError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs index b2ddd5bea..e00cdf7a8 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs @@ -9,19 +9,21 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputError { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchRequestOutputError() { } - internal InternalBatchRequestOutputError(string code, string message, IDictionary serializedAdditionalRawData) + internal InternalBatchRequestOutputError(string code, string message, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Code { get; } - public string Message { get; } + public string Code { get; set; } + + public string Message { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs index 5f48d8090..28934f962 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { @@ -14,24 +15,29 @@ internal partial class InternalBatchRequestOutputResponse : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutputResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("status_code") != true && Optional.IsDefined(StatusCode)) + if (Optional.IsDefined(StatusCode)) { writer.WritePropertyName("status_code"u8); writer.WriteNumberValue(StatusCode.Value); } - if (SerializedAdditionalRawData?.ContainsKey("request_id") != true && Optional.IsDefined(RequestId)) + if (Optional.IsDefined(RequestId)) { writer.WritePropertyName("request_id"u8); writer.WriteStringValue(RequestId); } - if (SerializedAdditionalRawData?.ContainsKey("body") != true && Optional.IsCollectionDefined(Body)) + if (Optional.IsCollectionDefined(Body)) { writer.WritePropertyName("body"u8); writer.WriteStartObject(); @@ -44,7 +50,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, continue; } #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -54,17 +60,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndObject(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -73,85 +75,87 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - InternalBatchRequestOutputResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalBatchRequestOutputResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalBatchRequestOutputResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalBatchRequestOutputResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalBatchRequestOutputResponse(document.RootElement, options); } - internal static InternalBatchRequestOutputResponse DeserializeInternalBatchRequestOutputResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalBatchRequestOutputResponse DeserializeInternalBatchRequestOutputResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int? statusCode = default; string requestId = default; - IReadOnlyDictionary body = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary body = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("status_code"u8)) + if (prop.NameEquals("status_code"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + statusCode = null; continue; } - statusCode = property.Value.GetInt32(); + statusCode = prop.Value.GetInt32(); continue; } - if (property.NameEquals("request_id"u8)) + if (prop.NameEquals("request_id"u8)) { - requestId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + requestId = null; + continue; + } + requestId = prop.Value.GetString(); continue; } - if (property.NameEquals("body"u8)) + if (prop.NameEquals("body"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - if (property0.Value.ValueKind == JsonValueKind.Null) + if (prop0.Value.ValueKind == JsonValueKind.Null) { - dictionary.Add(property0.Name, null); + dictionary.Add(prop0.Name, null); } else { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + dictionary.Add(prop0.Name, BinaryData.FromString(prop0.Value.GetRawText())); } } body = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalBatchRequestOutputResponse(statusCode, requestId, body ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new InternalBatchRequestOutputResponse(statusCode, requestId, body ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +165,16 @@ BinaryData IPersistableModel.Write(ModelRead } } - InternalBatchRequestOutputResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalBatchRequestOutputResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalBatchRequestOutputResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalBatchRequestOutputResponse(document.RootElement, options); } default: @@ -179,15 +184,16 @@ InternalBatchRequestOutputResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalBatchRequestOutputResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalBatchRequestOutputResponse internalBatchRequestOutputResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalBatchRequestOutputResponse(document.RootElement); + return BinaryContent.Create(internalBatchRequestOutputResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalBatchRequestOutputResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalBatchRequestOutputResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs index 8435f20dc..8e8da580e 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs @@ -4,27 +4,31 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalBatchRequestOutputResponse() { Body = new ChangeTrackingDictionary(); } - internal InternalBatchRequestOutputResponse(int? statusCode, string requestId, IReadOnlyDictionary body, IDictionary serializedAdditionalRawData) + internal InternalBatchRequestOutputResponse(int? statusCode, string requestId, IDictionary body, IDictionary additionalBinaryDataProperties) { StatusCode = statusCode; RequestId = requestId; Body = body; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int? StatusCode { get; } - public string RequestId { get; } - public IReadOnlyDictionary Body { get; } + public int? StatusCode { get; set; } + + public string RequestId { get; set; } + + public IDictionary Body { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchStatus.cs b/.dotnet/src/Generated/Models/InternalBatchStatus.cs index b34fe0bf8..57fd8864d 100644 --- a/.dotnet/src/Generated/Models/InternalBatchStatus.cs +++ b/.dotnet/src/Generated/Models/InternalBatchStatus.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalBatchStatus : IEquatable { private readonly string _value; - - public InternalBatchStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string ValidatingValue = "validating"; private const string FailedValue = "failed"; private const string InProgressValue = "in_progress"; @@ -25,24 +20,42 @@ public InternalBatchStatus(string value) private const string CancellingValue = "cancelling"; private const string CancelledValue = "cancelled"; + public InternalBatchStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalBatchStatus Validating { get; } = new InternalBatchStatus(ValidatingValue); + public static InternalBatchStatus Failed { get; } = new InternalBatchStatus(FailedValue); + public static InternalBatchStatus InProgress { get; } = new InternalBatchStatus(InProgressValue); + public static InternalBatchStatus Finalizing { get; } = new InternalBatchStatus(FinalizingValue); + public static InternalBatchStatus Completed { get; } = new InternalBatchStatus(CompletedValue); + public static InternalBatchStatus Expired { get; } = new InternalBatchStatus(ExpiredValue); + public static InternalBatchStatus Cancelling { get; } = new InternalBatchStatus(CancellingValue); + public static InternalBatchStatus Cancelled { get; } = new InternalBatchStatus(CancelledValue); + public static bool operator ==(InternalBatchStatus left, InternalBatchStatus right) => left.Equals(right); + public static bool operator !=(InternalBatchStatus left, InternalBatchStatus right) => !left.Equals(right); + public static implicit operator InternalBatchStatus(string value) => new InternalBatchStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalBatchStatus other && Equals(other); + public bool Equals(InternalBatchStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index b8f419482..09efc38b0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionFunctionCallOption : IJsonModel { + internal InternalChatCompletionFunctionCallOption() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionFunctionCallOption)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } - InternalChatCompletionFunctionCallOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionFunctionCallOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionFunctionCallOption JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionFunctionCallOption)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionFunctionCallOption(document.RootElement, options); } - internal static InternalChatCompletionFunctionCallOption DeserializeInternalChatCompletionFunctionCallOption(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionFunctionCallOption DeserializeInternalChatCompletionFunctionCallOption(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionFunctionCallOption(name, serializedAdditionalRawData); + return new InternalChatCompletionFunctionCallOption(name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalChatCompletionFunctionCallOption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionFunctionCallOption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionFunctionCallOption PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionFunctionCallOption(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalChatCompletionFunctionCallOption IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionFunctionCallOption FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionFunctionCallOption internalChatCompletionFunctionCallOption) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionFunctionCallOption(document.RootElement); + return BinaryContent.Create(internalChatCompletionFunctionCallOption, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionFunctionCallOption(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionFunctionCallOption(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs index 2cb95446c..39e20c929 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionFunctionCallOption { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionFunctionCallOption(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -17,16 +19,12 @@ public InternalChatCompletionFunctionCallOption(string name) Name = name; } - internal InternalChatCompletionFunctionCallOption(string name, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionFunctionCallOption(string name, IDictionary additionalBinaryDataProperties) { Name = name; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionFunctionCallOption() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; } + public string Name { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index 40c34b172..da736202c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,34 +15,35 @@ internal partial class InternalChatCompletionMessageToolCallChunkFunction : IJso { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallChunkFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true && Optional.IsDefined(Arguments)) + if (Optional.IsDefined(Arguments)) { writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } - InternalChatCompletionMessageToolCallChunkFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionMessageToolCallChunkFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionMessageToolCallChunkFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallChunkFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, options); } - internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeInternalChatCompletionMessageToolCallChunkFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeInternalChatCompletionMessageToolCallChunkFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; string arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + arguments = null; + continue; + } + arguments = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionMessageToolCallChunkFunction(name, arguments, serializedAdditionalRawData); + return new InternalChatCompletionMessageToolCallChunkFunction(name, arguments, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel } } - InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionMessageToolCallChunkFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, options); } default: @@ -130,15 +139,16 @@ InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionMessageToolCallChunkFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallChunkFunction internalChatCompletionMessageToolCallChunkFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement); + return BinaryContent.Create(internalChatCompletionMessageToolCallChunkFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionMessageToolCallChunkFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index 3119ca2e9..7d550a9c9 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -9,19 +9,21 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallChunkFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalChatCompletionMessageToolCallChunkFunction() { } - internal InternalChatCompletionMessageToolCallChunkFunction(string name, string arguments, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionMessageToolCallChunkFunction(string name, string arguments, IDictionary additionalBinaryDataProperties) { Name = name; Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; } - public string Arguments { get; } + public string Name { get; set; } + + public string Arguments { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs index ea62bf0ab..83f8651ef 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionMessageToolCallChunkType : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; public InternalChatCompletionMessageToolCallChunkType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; + _value = value; + } public static InternalChatCompletionMessageToolCallChunkType Function { get; } = new InternalChatCompletionMessageToolCallChunkType(FunctionValue); + public static bool operator ==(InternalChatCompletionMessageToolCallChunkType left, InternalChatCompletionMessageToolCallChunkType right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionMessageToolCallChunkType left, InternalChatCompletionMessageToolCallChunkType right) => !left.Equals(right); + public static implicit operator InternalChatCompletionMessageToolCallChunkType(string value) => new InternalChatCompletionMessageToolCallChunkType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionMessageToolCallChunkType other && Equals(other); + public bool Equals(InternalChatCompletionMessageToolCallChunkType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index bb71f2b44..9b5da9f54 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction : IJsonModel { + internal InternalChatCompletionMessageToolCallFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } - InternalChatCompletionMessageToolCallFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionMessageToolCallFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionMessageToolCallFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, options); } - internal static InternalChatCompletionMessageToolCallFunction DeserializeInternalChatCompletionMessageToolCallFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionMessageToolCallFunction DeserializeInternalChatCompletionMessageToolCallFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; string arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionMessageToolCallFunction(name, arguments, serializedAdditionalRawData); + return new InternalChatCompletionMessageToolCallFunction(name, arguments, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Writ } } - InternalChatCompletionMessageToolCallFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionMessageToolCallFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionMessageToolCallFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionMessageToolCallFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionMessageToolCallFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallFunction internalChatCompletionMessageToolCallFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement); + return BinaryContent.Create(internalChatCompletionMessageToolCallFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionMessageToolCallFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs index c725868a0..1fed8e6a4 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionMessageToolCallFunction(string name, string arguments) { Argument.AssertNotNull(name, nameof(name)); @@ -19,18 +21,15 @@ public InternalChatCompletionMessageToolCallFunction(string name, string argumen Arguments = arguments; } - internal InternalChatCompletionMessageToolCallFunction(string name, string arguments, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionMessageToolCallFunction(string name, string arguments, IDictionary additionalBinaryDataProperties) { Name = name; Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionMessageToolCallFunction() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Name { get; set; } + public string Arguments { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index 447e3509c..61d65a25e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoice : IJsonModel { + internal InternalChatCompletionNamedToolChoice() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoice)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } - InternalChatCompletionNamedToolChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionNamedToolChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionNamedToolChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoice)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionNamedToolChoice(document.RootElement, options); } - internal static InternalChatCompletionNamedToolChoice DeserializeInternalChatCompletionNamedToolChoice(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionNamedToolChoice DeserializeInternalChatCompletionNamedToolChoice(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalChatCompletionNamedToolChoiceType type = default; + InternalChatCompletionNamedToolChoiceType @type = default; InternalChatCompletionNamedToolChoiceFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalChatCompletionNamedToolChoiceType(property.Value.GetString()); + @type = new InternalChatCompletionNamedToolChoiceType(prop.Value.GetString()); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalChatCompletionNamedToolChoiceFunction.DeserializeInternalChatCompletionNamedToolChoiceFunction(property.Value, options); + function = InternalChatCompletionNamedToolChoiceFunction.DeserializeInternalChatCompletionNamedToolChoiceFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionNamedToolChoice(type, function, serializedAdditionalRawData); + return new InternalChatCompletionNamedToolChoice(@type, function, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalChatCompletionNamedToolChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionNamedToolChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionNamedToolChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionNamedToolChoice(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionNamedToolChoice IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionNamedToolChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionNamedToolChoice internalChatCompletionNamedToolChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionNamedToolChoice(document.RootElement); + return BinaryContent.Create(internalChatCompletionNamedToolChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionNamedToolChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionNamedToolChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs index 4538d8136..21beed0a7 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoiceFunction function) { Argument.AssertNotNull(function, nameof(function)); @@ -17,19 +19,15 @@ public InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoi Function = function; } - internal InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoiceType type, InternalChatCompletionNamedToolChoiceFunction function, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoiceType @type, InternalChatCompletionNamedToolChoiceFunction function, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionNamedToolChoice() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalChatCompletionNamedToolChoiceType Type { get; } = InternalChatCompletionNamedToolChoiceType.Function; + public InternalChatCompletionNamedToolChoiceType Type { get; } = "function"; - public InternalChatCompletionNamedToolChoiceFunction Function { get; } + public InternalChatCompletionNamedToolChoiceFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index 8e0e339e3..81bb5eee1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoiceFunction : IJsonModel { + internal InternalChatCompletionNamedToolChoiceFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoiceFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } - InternalChatCompletionNamedToolChoiceFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionNamedToolChoiceFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionNamedToolChoiceFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoiceFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionNamedToolChoiceFunction(document.RootElement, options); } - internal static InternalChatCompletionNamedToolChoiceFunction DeserializeInternalChatCompletionNamedToolChoiceFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionNamedToolChoiceFunction DeserializeInternalChatCompletionNamedToolChoiceFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionNamedToolChoiceFunction(name, serializedAdditionalRawData); + return new InternalChatCompletionNamedToolChoiceFunction(name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Writ } } - InternalChatCompletionNamedToolChoiceFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionNamedToolChoiceFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionNamedToolChoiceFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionNamedToolChoiceFunction(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalChatCompletionNamedToolChoiceFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionNamedToolChoiceFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionNamedToolChoiceFunction internalChatCompletionNamedToolChoiceFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionNamedToolChoiceFunction(document.RootElement); + return BinaryContent.Create(internalChatCompletionNamedToolChoiceFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionNamedToolChoiceFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionNamedToolChoiceFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs index 5097bcb79..075fc13f0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoiceFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionNamedToolChoiceFunction(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -17,16 +19,12 @@ public InternalChatCompletionNamedToolChoiceFunction(string name) Name = name; } - internal InternalChatCompletionNamedToolChoiceFunction(string name, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionNamedToolChoiceFunction(string name, IDictionary additionalBinaryDataProperties) { Name = name; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionNamedToolChoiceFunction() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; } + public string Name { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs index b5eda303b..c6f7a71c2 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionNamedToolChoiceType : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; public InternalChatCompletionNamedToolChoiceType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; + _value = value; + } public static InternalChatCompletionNamedToolChoiceType Function { get; } = new InternalChatCompletionNamedToolChoiceType(FunctionValue); + public static bool operator ==(InternalChatCompletionNamedToolChoiceType left, InternalChatCompletionNamedToolChoiceType right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionNamedToolChoiceType left, InternalChatCompletionNamedToolChoiceType right) => !left.Equals(right); + public static implicit operator InternalChatCompletionNamedToolChoiceType(string value) => new InternalChatCompletionNamedToolChoiceType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionNamedToolChoiceType other && Equals(other); + public bool Equals(InternalChatCompletionNamedToolChoiceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index f348a091d..3710bdc01 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImage : IJsonModel { + internal InternalChatCompletionRequestMessageContentPartImage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("image_url") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("image_url"u8); + writer.WriteObjectValue(ImageUrl, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("image_url"u8); - writer.WriteObjectValue(ImageUrl, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } - InternalChatCompletionRequestMessageContentPartImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionRequestMessageContentPartImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionRequestMessageContentPartImage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionRequestMessageContentPartImage(document.RootElement, options); } - internal static InternalChatCompletionRequestMessageContentPartImage DeserializeInternalChatCompletionRequestMessageContentPartImage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionRequestMessageContentPartImage DeserializeInternalChatCompletionRequestMessageContentPartImage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalChatCompletionRequestMessageContentPartImageType type = default; + InternalChatCompletionRequestMessageContentPartImageType @type = default; InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalChatCompletionRequestMessageContentPartImageType(property.Value.GetString()); + @type = new InternalChatCompletionRequestMessageContentPartImageType(prop.Value.GetString()); continue; } - if (property.NameEquals("image_url"u8)) + if (prop.NameEquals("image_url"u8)) { - imageUrl = InternalChatCompletionRequestMessageContentPartImageImageUrl.DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(property.Value, options); + imageUrl = InternalChatCompletionRequestMessageContentPartImageImageUrl.DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionRequestMessageContentPartImage(type, imageUrl, serializedAdditionalRawData); + return new InternalChatCompletionRequestMessageContentPartImage(@type, imageUrl, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionRequestMessageContentPartImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionRequestMessageContentPartImage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionRequestMessageContentPartImage(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionRequestMessageContentPartImage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionRequestMessageContentPartImage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartImage internalChatCompletionRequestMessageContentPartImage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionRequestMessageContentPartImage(document.RootElement); + return BinaryContent.Create(internalChatCompletionRequestMessageContentPartImage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionRequestMessageContentPartImage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionRequestMessageContentPartImage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs index 97fb55045..ef755f0fd 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionRequestMessageContentPartImage(InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl) { Argument.AssertNotNull(imageUrl, nameof(imageUrl)); @@ -17,19 +19,15 @@ public InternalChatCompletionRequestMessageContentPartImage(InternalChatCompleti ImageUrl = imageUrl; } - internal InternalChatCompletionRequestMessageContentPartImage(InternalChatCompletionRequestMessageContentPartImageType type, InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionRequestMessageContentPartImage(InternalChatCompletionRequestMessageContentPartImageType @type, InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; ImageUrl = imageUrl; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionRequestMessageContentPartImage() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalChatCompletionRequestMessageContentPartImageType Type { get; } = InternalChatCompletionRequestMessageContentPartImageType.ImageUrl; + public InternalChatCompletionRequestMessageContentPartImageType Type { get; } = "image_url"; - public InternalChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; } + public InternalChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index e84cdd271..0b9982266 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -7,41 +7,44 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImageImageUrl : IJsonModel { + internal InternalChatCompletionRequestMessageContentPartImageImageUrl() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImageImageUrl)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("url") != true) - { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url); - } - if (SerializedAdditionalRawData?.ContainsKey("detail") != true && Optional.IsDefined(Detail)) + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url.AbsoluteUri); + if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,63 +53,60 @@ void IJsonModel.Wr #endif } } - writer.WriteEndObject(); } - InternalChatCompletionRequestMessageContentPartImageImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionRequestMessageContentPartImageImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionRequestMessageContentPartImageImageUrl JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImageImageUrl)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(document.RootElement, options); } - internal static InternalChatCompletionRequestMessageContentPartImageImageUrl DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionRequestMessageContentPartImageImageUrl DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string url = default; + Uri url = default; ChatImageDetailLevel? detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("url"u8)) + if (prop.NameEquals("url"u8)) { - url = property.Value.GetString(); + url = new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("detail"u8)) + if (prop.NameEquals("detail"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + detail = null; continue; } - detail = new ChatImageDetailLevel(property.Value.GetString()); + detail = new ChatImageDetailLevel(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionRequestMessageContentPartImageImageUrl(url, detail, serializedAdditionalRawData); + return new InternalChatCompletionRequestMessageContentPartImageImageUrl(url, detail, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +116,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionRequestMessageContentPartImageImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionRequestMessageContentPartImageImageUrl PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(document.RootElement, options); } default: @@ -134,15 +135,16 @@ InternalChatCompletionRequestMessageContentPartImageImageUrl IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionRequestMessageContentPartImageImageUrl FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartImageImageUrl internalChatCompletionRequestMessageContentPartImageImageUrl) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(document.RootElement); + return BinaryContent.Create(internalChatCompletionRequestMessageContentPartImageImageUrl, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionRequestMessageContentPartImageImageUrl(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index e0e87271f..1e13d3f53 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -9,11 +9,15 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImageImageUrl { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionRequestMessageContentPartImageImageUrl() + internal InternalChatCompletionRequestMessageContentPartImageImageUrl(Uri url, ChatImageDetailLevel? detail, IDictionary additionalBinaryDataProperties) { + Url = url; + Detail = detail; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public ChatImageDetailLevel? Detail { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs index 2a1100017..e65338844 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionRequestMessageContentPartImageType : IEquatable { private readonly string _value; + private const string ImageUrlValue = "image_url"; public InternalChatCompletionRequestMessageContentPartImageType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ImageUrlValue = "image_url"; + _value = value; + } public static InternalChatCompletionRequestMessageContentPartImageType ImageUrl { get; } = new InternalChatCompletionRequestMessageContentPartImageType(ImageUrlValue); + public static bool operator ==(InternalChatCompletionRequestMessageContentPartImageType left, InternalChatCompletionRequestMessageContentPartImageType right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionRequestMessageContentPartImageType left, InternalChatCompletionRequestMessageContentPartImageType right) => !left.Equals(right); + public static implicit operator InternalChatCompletionRequestMessageContentPartImageType(string value) => new InternalChatCompletionRequestMessageContentPartImageType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionRequestMessageContentPartImageType other && Equals(other); + public bool Equals(InternalChatCompletionRequestMessageContentPartImageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 093b83c78..68f73b682 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartRefusal : IJsonModel { + internal InternalChatCompletionRequestMessageContentPartRefusal() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartRefusal)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } - InternalChatCompletionRequestMessageContentPartRefusal IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionRequestMessageContentPartRefusal IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionRequestMessageContentPartRefusal JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartRefusal)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionRequestMessageContentPartRefusal(document.RootElement, options); } - internal static InternalChatCompletionRequestMessageContentPartRefusal DeserializeInternalChatCompletionRequestMessageContentPartRefusal(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionRequestMessageContentPartRefusal DeserializeInternalChatCompletionRequestMessageContentPartRefusal(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalChatCompletionRequestMessageContentPartRefusalType type = default; + InternalChatCompletionRequestMessageContentPartRefusalType @type = default; string refusal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalChatCompletionRequestMessageContentPartRefusalType(property.Value.GetString()); + @type = new InternalChatCompletionRequestMessageContentPartRefusalType(prop.Value.GetString()); continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionRequestMessageContentPartRefusal(type, refusal, serializedAdditionalRawData); + return new InternalChatCompletionRequestMessageContentPartRefusal(@type, refusal, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionRequestMessageContentPartRefusal IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionRequestMessageContentPartRefusal PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionRequestMessageContentPartRefusal(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionRequestMessageContentPartRefusal IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionRequestMessageContentPartRefusal FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartRefusal internalChatCompletionRequestMessageContentPartRefusal) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionRequestMessageContentPartRefusal(document.RootElement); + return BinaryContent.Create(internalChatCompletionRequestMessageContentPartRefusal, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionRequestMessageContentPartRefusal(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionRequestMessageContentPartRefusal(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs index ea0eaa097..b4ec936cd 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartRefusal { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionRequestMessageContentPartRefusal(string refusal) { Argument.AssertNotNull(refusal, nameof(refusal)); @@ -17,19 +19,15 @@ public InternalChatCompletionRequestMessageContentPartRefusal(string refusal) Refusal = refusal; } - internal InternalChatCompletionRequestMessageContentPartRefusal(InternalChatCompletionRequestMessageContentPartRefusalType type, string refusal, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionRequestMessageContentPartRefusal(InternalChatCompletionRequestMessageContentPartRefusalType @type, string refusal, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; Refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionRequestMessageContentPartRefusal() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalChatCompletionRequestMessageContentPartRefusalType Type { get; } = InternalChatCompletionRequestMessageContentPartRefusalType.Refusal; + public InternalChatCompletionRequestMessageContentPartRefusalType Type { get; } = "refusal"; - public string Refusal { get; } + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs index d1c3e8498..1d2dd4636 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionRequestMessageContentPartRefusalType : IEquatable { private readonly string _value; + private const string RefusalValue = "refusal"; public InternalChatCompletionRequestMessageContentPartRefusalType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string RefusalValue = "refusal"; + _value = value; + } public static InternalChatCompletionRequestMessageContentPartRefusalType Refusal { get; } = new InternalChatCompletionRequestMessageContentPartRefusalType(RefusalValue); + public static bool operator ==(InternalChatCompletionRequestMessageContentPartRefusalType left, InternalChatCompletionRequestMessageContentPartRefusalType right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionRequestMessageContentPartRefusalType left, InternalChatCompletionRequestMessageContentPartRefusalType right) => !left.Equals(right); + public static implicit operator InternalChatCompletionRequestMessageContentPartRefusalType(string value) => new InternalChatCompletionRequestMessageContentPartRefusalType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionRequestMessageContentPartRefusalType other && Equals(other); + public bool Equals(InternalChatCompletionRequestMessageContentPartRefusalType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index bec3c465f..e4546feab 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartText : IJsonModel { + internal InternalChatCompletionRequestMessageContentPartText() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartText)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } - InternalChatCompletionRequestMessageContentPartText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionRequestMessageContentPartText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionRequestMessageContentPartText JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartText)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionRequestMessageContentPartText(document.RootElement, options); } - internal static InternalChatCompletionRequestMessageContentPartText DeserializeInternalChatCompletionRequestMessageContentPartText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionRequestMessageContentPartText DeserializeInternalChatCompletionRequestMessageContentPartText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalChatCompletionRequestMessageContentPartTextType type = default; + InternalChatCompletionRequestMessageContentPartTextType @type = default; string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalChatCompletionRequestMessageContentPartTextType(property.Value.GetString()); + @type = new InternalChatCompletionRequestMessageContentPartTextType(prop.Value.GetString()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionRequestMessageContentPartText(type, text, serializedAdditionalRawData); + return new InternalChatCompletionRequestMessageContentPartText(@type, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionRequestMessageContentPartText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionRequestMessageContentPartText PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionRequestMessageContentPartText(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionRequestMessageContentPartText IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionRequestMessageContentPartText FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartText internalChatCompletionRequestMessageContentPartText) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionRequestMessageContentPartText(document.RootElement); + return BinaryContent.Create(internalChatCompletionRequestMessageContentPartText, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionRequestMessageContentPartText(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionRequestMessageContentPartText(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs index 09645f628..d8e20fcaa 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartText { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionRequestMessageContentPartText(string text) { Argument.AssertNotNull(text, nameof(text)); @@ -17,19 +19,15 @@ public InternalChatCompletionRequestMessageContentPartText(string text) Text = text; } - internal InternalChatCompletionRequestMessageContentPartText(InternalChatCompletionRequestMessageContentPartTextType type, string text, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionRequestMessageContentPartText(InternalChatCompletionRequestMessageContentPartTextType @type, string text, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionRequestMessageContentPartText() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalChatCompletionRequestMessageContentPartTextType Type { get; } = InternalChatCompletionRequestMessageContentPartTextType.Text; + public InternalChatCompletionRequestMessageContentPartTextType Type { get; } = "text"; - public string Text { get; } + public string Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs index 8c58795bb..41e2afae1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionRequestMessageContentPartTextType : IEquatable { private readonly string _value; + private const string TextValue = "text"; public InternalChatCompletionRequestMessageContentPartTextType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; + _value = value; + } public static InternalChatCompletionRequestMessageContentPartTextType Text { get; } = new InternalChatCompletionRequestMessageContentPartTextType(TextValue); + public static bool operator ==(InternalChatCompletionRequestMessageContentPartTextType left, InternalChatCompletionRequestMessageContentPartTextType right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionRequestMessageContentPartTextType left, InternalChatCompletionRequestMessageContentPartTextType right) => !left.Equals(right); + public static implicit operator InternalChatCompletionRequestMessageContentPartTextType(string value) => new InternalChatCompletionRequestMessageContentPartTextType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionRequestMessageContentPartTextType other && Equals(other); + public bool Equals(InternalChatCompletionRequestMessageContentPartTextType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 637df497d..a7d973a28 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -5,28 +5,179 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage : IJsonModel { - InternalChatCompletionResponseMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalChatCompletionResponseMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support writing '{format}' format."); + } + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + else + { + writer.WriteNull("content"u8); + } + if (Refusal != null) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); } + else + { + writer.WriteNull("refusal"u8); + } + if (Optional.IsCollectionDefined(ToolCalls)) + { + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); + if (Optional.IsDefined(FunctionCall)) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionCall, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalChatCompletionResponseMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + protected virtual InternalChatCompletionResponseMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static InternalChatCompletionResponseMessage DeserializeInternalChatCompletionResponseMessage(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + string refusal = default; + IList toolCalls = default; + InternalChatCompletionResponseMessageRole role = default; + InternalChatCompletionResponseMessageFunctionCall functionCall = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("refusal"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + refusal = null; + continue; + } + refusal = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("tool_calls"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); + } + toolCalls = array; + continue; + } + if (prop.NameEquals("role"u8)) + { + role = new InternalChatCompletionResponseMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("function_call"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionCall = null; + continue; + } + functionCall = InternalChatCompletionResponseMessageFunctionCall.DeserializeInternalChatCompletionResponseMessageFunctionCall(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalChatCompletionResponseMessage( + content, + refusal, + toolCalls ?? new ChangeTrackingList(), + role, + functionCall, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +187,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalChatCompletionResponseMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionResponseMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionResponseMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } default: @@ -54,15 +206,16 @@ InternalChatCompletionResponseMessage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionResponseMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionResponseMessage internalChatCompletionResponseMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionResponseMessage(document.RootElement); + return BinaryContent.Create(internalChatCompletionResponseMessage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionResponseMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionResponseMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index f29262217..4ba554ee7 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -4,34 +4,33 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalChatCompletionResponseMessage(IEnumerable content, string refusal) + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalChatCompletionResponseMessage(string content, string refusal) { - Content = content?.ToList(); + Content = content; Refusal = refusal; ToolCalls = new ChangeTrackingList(); } - internal InternalChatCompletionResponseMessage(IReadOnlyList content, string refusal, IReadOnlyList toolCalls, ChatMessageRole role, ChatFunctionCall functionCall, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionResponseMessage(string content, string refusal, IList toolCalls, InternalChatCompletionResponseMessageRole role, InternalChatCompletionResponseMessageFunctionCall functionCall, IDictionary additionalBinaryDataProperties) { Content = content; Refusal = refusal; ToolCalls = toolCalls; Role = role; FunctionCall = functionCall; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalChatCompletionResponseMessage() - { - } - public string Refusal { get; } - public IReadOnlyList ToolCalls { get; } + public string Refusal { get; set; } + + public IList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index 6cb2512cd..b9fe1e71f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall : IJsonModel { + internal InternalChatCompletionResponseMessageFunctionCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } - InternalChatCompletionResponseMessageFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionResponseMessageFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionResponseMessageFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, options); } - internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInternalChatCompletionResponseMessageFunctionCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInternalChatCompletionResponseMessageFunctionCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string arguments = default; string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionResponseMessageFunctionCall(arguments, name, serializedAdditionalRawData); + return new InternalChatCompletionResponseMessageFunctionCall(arguments, name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel. } } - InternalChatCompletionResponseMessageFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionResponseMessageFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionResponseMessageFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionResponseMessageFunctionCall IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionResponseMessageFunctionCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionResponseMessageFunctionCall internalChatCompletionResponseMessageFunctionCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement); + return BinaryContent.Create(internalChatCompletionResponseMessageFunctionCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionResponseMessageFunctionCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index 6a070987f..657e6543e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -9,28 +9,23 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name) { - Argument.AssertNotNull(arguments, nameof(arguments)); - Argument.AssertNotNull(name, nameof(name)); - Arguments = arguments; Name = name; } - internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name, IDictionary additionalBinaryDataProperties) { Arguments = arguments; Name = name; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalChatCompletionResponseMessageFunctionCall() - { - } + public string Arguments { get; set; } - public string Arguments { get; } - public string Name { get; } + public string Name { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs index 0794f1019..08971fdec 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionResponseMessageRole : IEquatable { private readonly string _value; + private const string AssistantValue = "assistant"; public InternalChatCompletionResponseMessageRole(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AssistantValue = "assistant"; + _value = value; + } public static InternalChatCompletionResponseMessageRole Assistant { get; } = new InternalChatCompletionResponseMessageRole(AssistantValue); + public static bool operator ==(InternalChatCompletionResponseMessageRole left, InternalChatCompletionResponseMessageRole right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionResponseMessageRole left, InternalChatCompletionResponseMessageRole right) => !left.Equals(right); + public static implicit operator InternalChatCompletionResponseMessageRole(string value) => new InternalChatCompletionResponseMessageRole(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionResponseMessageRole other && Equals(other); + public bool Equals(InternalChatCompletionResponseMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs index bd3f2eb23..c8062b19a 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,29 +15,30 @@ internal partial class InternalChatCompletionStreamOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionStreamOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("include_usage") != true && Optional.IsDefined(IncludeUsage)) + if (Optional.IsDefined(IncludeUsage)) { writer.WritePropertyName("include_usage"u8); writer.WriteBooleanValue(IncludeUsage.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,57 +47,54 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } - InternalChatCompletionStreamOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionStreamOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionStreamOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionStreamOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionStreamOptions(document.RootElement, options); } - internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompletionStreamOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompletionStreamOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } bool? includeUsage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("include_usage"u8)) + if (prop.NameEquals("include_usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + includeUsage = null; continue; } - includeUsage = property.Value.GetBoolean(); + includeUsage = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionStreamOptions(includeUsage, serializedAdditionalRawData); + return new InternalChatCompletionStreamOptions(includeUsage, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +104,16 @@ BinaryData IPersistableModel.Write(ModelRea } } - InternalChatCompletionStreamOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionStreamOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionStreamOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionStreamOptions(document.RootElement, options); } default: @@ -123,15 +123,16 @@ InternalChatCompletionStreamOptions IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionStreamOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionStreamOptions internalChatCompletionStreamOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionStreamOptions(document.RootElement); + return BinaryContent.Create(internalChatCompletionStreamOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionStreamOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionStreamOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs index 65d1cc3a1..5217c6758 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs @@ -9,15 +9,16 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalChatCompletionStreamOptions() { } - internal InternalChatCompletionStreamOptions(bool? includeUsage, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionStreamOptions(bool? includeUsage, IDictionary additionalBinaryDataProperties) { IncludeUsage = includeUsage; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public bool? IncludeUsage { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index 2a58b56b2..d3c4e5592 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -5,28 +5,189 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta : IJsonModel { - InternalChatCompletionStreamResponseDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Content)) + { + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + else + { + writer.WriteNull("content"u8); + } + } + if (Optional.IsDefined(FunctionCall)) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionCall, options); + } + if (Optional.IsCollectionDefined(ToolCalls)) + { + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.Value.ToString()); } + if (Optional.IsDefined(Refusal)) + { + if (Refusal != null) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + } + else + { + writer.WriteNull("refusal"u8); + } + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalChatCompletionStreamResponseDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + protected virtual InternalChatCompletionStreamResponseDelta JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static InternalChatCompletionStreamResponseDelta DeserializeInternalChatCompletionStreamResponseDelta(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + StreamingChatFunctionCallUpdate functionCall = default; + IList toolCalls = default; + InternalChatCompletionStreamResponseDeltaRole? role = default; + string refusal = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("function_call"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionCall = null; + continue; + } + functionCall = StreamingChatFunctionCallUpdate.DeserializeStreamingChatFunctionCallUpdate(prop.Value, options); + continue; + } + if (prop.NameEquals("tool_calls"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(StreamingChatToolCallUpdate.DeserializeStreamingChatToolCallUpdate(item, options)); + } + toolCalls = array; + continue; + } + if (prop.NameEquals("role"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + role = null; + continue; + } + role = new InternalChatCompletionStreamResponseDeltaRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("refusal"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + refusal = null; + continue; + } + refusal = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalChatCompletionStreamResponseDelta( + content, + functionCall, + toolCalls ?? new ChangeTrackingList(), + role, + refusal, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +197,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalChatCompletionStreamResponseDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionStreamResponseDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionStreamResponseDelta PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } default: @@ -54,15 +216,16 @@ InternalChatCompletionStreamResponseDelta IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionStreamResponseDelta FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionStreamResponseDelta internalChatCompletionStreamResponseDelta) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement); + return BinaryContent.Create(internalChatCompletionStreamResponseDelta, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionStreamResponseDelta(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index 9bdd14f0a..b59d87446 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -9,19 +9,22 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(IReadOnlyList content, StreamingChatFunctionCallUpdate functionCall, IReadOnlyList toolCalls, ChatMessageRole? role, string refusal, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionStreamResponseDelta(string content, StreamingChatFunctionCallUpdate functionCall, IList toolCalls, InternalChatCompletionStreamResponseDeltaRole? role, string refusal, IDictionary additionalBinaryDataProperties) { Content = content; FunctionCall = functionCall; ToolCalls = toolCalls; Role = role; Refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public StreamingChatFunctionCallUpdate FunctionCall { get; } - public IReadOnlyList ToolCalls { get; } - public string Refusal { get; } + + public StreamingChatFunctionCallUpdate FunctionCall { get; set; } + + public IList ToolCalls { get; } + + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs index 07df77e42..1604824a8 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalChatCompletionStreamResponseDeltaRole : IEquatable { private readonly string _value; - - public InternalChatCompletionStreamResponseDeltaRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string SystemValue = "system"; private const string UserValue = "user"; private const string AssistantValue = "assistant"; private const string ToolValue = "tool"; + public InternalChatCompletionStreamResponseDeltaRole(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalChatCompletionStreamResponseDeltaRole System { get; } = new InternalChatCompletionStreamResponseDeltaRole(SystemValue); + public static InternalChatCompletionStreamResponseDeltaRole User { get; } = new InternalChatCompletionStreamResponseDeltaRole(UserValue); + public static InternalChatCompletionStreamResponseDeltaRole Assistant { get; } = new InternalChatCompletionStreamResponseDeltaRole(AssistantValue); + public static InternalChatCompletionStreamResponseDeltaRole Tool { get; } = new InternalChatCompletionStreamResponseDeltaRole(ToolValue); + public static bool operator ==(InternalChatCompletionStreamResponseDeltaRole left, InternalChatCompletionStreamResponseDeltaRole right) => left.Equals(right); + public static bool operator !=(InternalChatCompletionStreamResponseDeltaRole left, InternalChatCompletionStreamResponseDeltaRole right) => !left.Equals(right); + public static implicit operator InternalChatCompletionStreamResponseDeltaRole(string value) => new InternalChatCompletionStreamResponseDeltaRole(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalChatCompletionStreamResponseDeltaRole other && Equals(other); + public bool Equals(InternalChatCompletionStreamResponseDeltaRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs index 3e555b657..d381876ce 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs @@ -7,55 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatResponseFormatJsonObject : IJsonModel { - InternalChatResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonObject)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonObject)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + InternalChatResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalChatResponseFormatJsonObject)JsonModelCreateCore(ref reader, options); + protected override ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonObject)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatResponseFormatJsonObject(document.RootElement, options); } - internal static InternalChatResponseFormatJsonObject DeserializeInternalChatResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatResponseFormatJsonObject DeserializeInternalChatResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_object"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatResponseFormatJsonObject(type, serializedAdditionalRawData); + return new InternalChatResponseFormatJsonObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -65,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelRe } } - InternalChatResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalChatResponseFormatJsonObject)PersistableModelCreateCore(data, options); + protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatResponseFormatJsonObject(document.RootElement, options); } default: @@ -83,15 +99,16 @@ InternalChatResponseFormatJsonObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalChatResponseFormatJsonObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatResponseFormatJsonObject internalChatResponseFormatJsonObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatResponseFormatJsonObject(document.RootElement); + return BinaryContent.Create(internalChatResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalChatResponseFormatJsonObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatResponseFormatJsonObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.cs index a3d489404..28d430907 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.cs @@ -9,12 +9,11 @@ namespace OpenAI.Chat { internal partial class InternalChatResponseFormatJsonObject : ChatResponseFormat { - public InternalChatResponseFormatJsonObject() + public InternalChatResponseFormatJsonObject() : base("json_object") { - Type = "json_object"; } - internal InternalChatResponseFormatJsonObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalChatResponseFormatJsonObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index c2b875ee6..3cec3b5f7 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -7,62 +7,83 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Internal; namespace OpenAI.Chat { internal partial class InternalChatResponseFormatJsonSchema : IJsonModel { - InternalChatResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalChatResponseFormatJsonSchema() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonSchema)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonSchema)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); + } + InternalChatResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalChatResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); + + protected override ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonSchema)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatResponseFormatJsonSchema(document.RootElement, options); } - internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_schema"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("json_schema"u8)) + if (prop.NameEquals("json_schema"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(property.Value, options); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatResponseFormatJsonSchema(type, serializedAdditionalRawData, jsonSchema); + return new InternalChatResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -72,15 +93,16 @@ BinaryData IPersistableModel.Write(ModelRe } } - InternalChatResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalChatResponseFormatJsonSchema)PersistableModelCreateCore(data, options); + protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatResponseFormatJsonSchema(document.RootElement, options); } default: @@ -90,15 +112,16 @@ InternalChatResponseFormatJsonSchema IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalChatResponseFormatJsonSchema FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatResponseFormatJsonSchema internalChatResponseFormatJsonSchema) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatResponseFormatJsonSchema(document.RootElement); + return BinaryContent.Create(internalChatResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalChatResponseFormatJsonSchema(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatResponseFormatJsonSchema(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs index d519acb14..8f2ec2c21 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs @@ -4,29 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; using OpenAI.Internal; namespace OpenAI.Chat { internal partial class InternalChatResponseFormatJsonSchema : ChatResponseFormat { - public InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) + public InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base("json_schema") { Argument.AssertNotNull(jsonSchema, nameof(jsonSchema)); - Type = "json_schema"; JsonSchema = jsonSchema; } - internal InternalChatResponseFormatJsonSchema(string type, IDictionary serializedAdditionalRawData, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(type, serializedAdditionalRawData) + internal InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } - internal InternalChatResponseFormatJsonSchema() - { - } - - public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; } + public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs index 6ab2655f8..ecb3fc794 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs @@ -7,55 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatResponseFormatText : IJsonModel { - InternalChatResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalChatResponseFormatText)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalChatResponseFormatText)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + InternalChatResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalChatResponseFormatText)JsonModelCreateCore(ref reader, options); + protected override ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalChatResponseFormatText)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatResponseFormatText(document.RootElement, options); } - internal static InternalChatResponseFormatText DeserializeInternalChatResponseFormatText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatResponseFormatText DeserializeInternalChatResponseFormatText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "text"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatResponseFormatText(type, serializedAdditionalRawData); + return new InternalChatResponseFormatText(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -65,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - InternalChatResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalChatResponseFormatText)PersistableModelCreateCore(data, options); + protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatResponseFormatText(document.RootElement, options); } default: @@ -83,15 +99,16 @@ InternalChatResponseFormatText IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalChatResponseFormatText FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatResponseFormatText internalChatResponseFormatText) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatResponseFormatText(document.RootElement); + return BinaryContent.Create(internalChatResponseFormatText, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalChatResponseFormatText(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatResponseFormatText(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.cs index 49e7771f0..4705b5972 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.cs @@ -9,12 +9,11 @@ namespace OpenAI.Chat { internal partial class InternalChatResponseFormatText : ChatResponseFormat { - public InternalChatResponseFormatText() + public InternalChatResponseFormatText() : base("text") { - Type = "text"; } - internal InternalChatResponseFormatText(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalChatResponseFormatText(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 30ee85a04..06bb16bc6 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -7,46 +7,54 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalCompleteUploadRequest : IJsonModel { + internal InternalCompleteUploadRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCompleteUploadRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("part_ids") != true) + writer.WritePropertyName("part_ids"u8); + writer.WriteStartArray(); + foreach (var item in PartIds) { - writer.WritePropertyName("part_ids"u8); - writer.WriteStartArray(); - foreach (var item in PartIds) + if (item == null) { - writer.WriteStringValue(item); + writer.WriteNullValue(); + continue; } - writer.WriteEndArray(); + writer.WriteStringValue(item); } - if (SerializedAdditionalRawData?.ContainsKey("md5") != true && Optional.IsDefined(Md5)) + writer.WriteEndArray(); + if (Optional.IsDefined(Md5)) { writer.WritePropertyName("md5"u8); writer.WriteStringValue(Md5); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,64 +63,72 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } - InternalCompleteUploadRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCompleteUploadRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCompleteUploadRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCompleteUploadRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCompleteUploadRequest(document.RootElement, options); } - internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList partIds = default; string md5 = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("part_ids"u8)) + if (prop.NameEquals("part_ids"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } partIds = array; continue; } - if (property.NameEquals("md5"u8)) + if (prop.NameEquals("md5"u8)) { - md5 = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + md5 = null; + continue; + } + md5 = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCompleteUploadRequest(partIds, md5, serializedAdditionalRawData); + return new InternalCompleteUploadRequest(partIds, md5, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +138,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - InternalCompleteUploadRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCompleteUploadRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCompleteUploadRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCompleteUploadRequest(document.RootElement, options); } default: @@ -140,15 +157,16 @@ InternalCompleteUploadRequest IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCompleteUploadRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCompleteUploadRequest internalCompleteUploadRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCompleteUploadRequest(document.RootElement); + return BinaryContent.Create(internalCompleteUploadRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCompleteUploadRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCompleteUploadRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs index 74d4d5346..1546002ff 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs @@ -5,12 +5,14 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.Files { internal partial class InternalCompleteUploadRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCompleteUploadRequest(IEnumerable partIds) { Argument.AssertNotNull(partIds, nameof(partIds)); @@ -18,18 +20,15 @@ public InternalCompleteUploadRequest(IEnumerable partIds) PartIds = partIds.ToList(); } - internal InternalCompleteUploadRequest(IList partIds, string md5, IDictionary serializedAdditionalRawData) + internal InternalCompleteUploadRequest(IList partIds, string md5, IDictionary additionalBinaryDataProperties) { PartIds = partIds; Md5 = md5; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalCompleteUploadRequest() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList PartIds { get; } + public string Md5 { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs index dff777d4f..570d0e36e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalCreateAssistantRequestModel : IEquatable { private readonly string _value; - - public InternalCreateAssistantRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string Gpt4oValue = "gpt-4o"; private const string Gpt4o20240806Value = "gpt-4o-2024-08-06"; private const string Gpt4o20240513Value = "gpt-4o-2024-05-13"; @@ -40,39 +35,72 @@ public InternalCreateAssistantRequestModel(string value) private const string Gpt35Turbo0125Value = "gpt-3.5-turbo-0125"; private const string Gpt35Turbo16k0613Value = "gpt-3.5-turbo-16k-0613"; + public InternalCreateAssistantRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateAssistantRequestModel Gpt4o { get; } = new InternalCreateAssistantRequestModel(Gpt4oValue); + public static InternalCreateAssistantRequestModel Gpt4o20240806 { get; } = new InternalCreateAssistantRequestModel(Gpt4o20240806Value); + public static InternalCreateAssistantRequestModel Gpt4o20240513 { get; } = new InternalCreateAssistantRequestModel(Gpt4o20240513Value); + public static InternalCreateAssistantRequestModel Gpt4oMini { get; } = new InternalCreateAssistantRequestModel(Gpt4oMiniValue); + public static InternalCreateAssistantRequestModel Gpt4oMini20240718 { get; } = new InternalCreateAssistantRequestModel(Gpt4oMini20240718Value); + public static InternalCreateAssistantRequestModel Gpt4Turbo { get; } = new InternalCreateAssistantRequestModel(Gpt4TurboValue); + public static InternalCreateAssistantRequestModel Gpt4Turbo20240409 { get; } = new InternalCreateAssistantRequestModel(Gpt4Turbo20240409Value); + public static InternalCreateAssistantRequestModel Gpt40125Preview { get; } = new InternalCreateAssistantRequestModel(Gpt40125PreviewValue); + public static InternalCreateAssistantRequestModel Gpt4TurboPreview { get; } = new InternalCreateAssistantRequestModel(Gpt4TurboPreviewValue); + public static InternalCreateAssistantRequestModel Gpt41106Preview { get; } = new InternalCreateAssistantRequestModel(Gpt41106PreviewValue); + public static InternalCreateAssistantRequestModel Gpt4VisionPreview { get; } = new InternalCreateAssistantRequestModel(Gpt4VisionPreviewValue); + public static InternalCreateAssistantRequestModel Gpt4 { get; } = new InternalCreateAssistantRequestModel(Gpt4Value); + public static InternalCreateAssistantRequestModel Gpt40314 { get; } = new InternalCreateAssistantRequestModel(Gpt40314Value); + public static InternalCreateAssistantRequestModel Gpt40613 { get; } = new InternalCreateAssistantRequestModel(Gpt40613Value); + public static InternalCreateAssistantRequestModel Gpt432k { get; } = new InternalCreateAssistantRequestModel(Gpt432kValue); + public static InternalCreateAssistantRequestModel Gpt432k0314 { get; } = new InternalCreateAssistantRequestModel(Gpt432k0314Value); + public static InternalCreateAssistantRequestModel Gpt432k0613 { get; } = new InternalCreateAssistantRequestModel(Gpt432k0613Value); + public static InternalCreateAssistantRequestModel Gpt35Turbo { get; } = new InternalCreateAssistantRequestModel(Gpt35TurboValue); + public static InternalCreateAssistantRequestModel Gpt35Turbo16k { get; } = new InternalCreateAssistantRequestModel(Gpt35Turbo16kValue); + public static InternalCreateAssistantRequestModel Gpt35Turbo0613 { get; } = new InternalCreateAssistantRequestModel(Gpt35Turbo0613Value); + public static InternalCreateAssistantRequestModel Gpt35Turbo1106 { get; } = new InternalCreateAssistantRequestModel(Gpt35Turbo1106Value); + public static InternalCreateAssistantRequestModel Gpt35Turbo0125 { get; } = new InternalCreateAssistantRequestModel(Gpt35Turbo0125Value); + public static InternalCreateAssistantRequestModel Gpt35Turbo16k0613 { get; } = new InternalCreateAssistantRequestModel(Gpt35Turbo16k0613Value); + public static bool operator ==(InternalCreateAssistantRequestModel left, InternalCreateAssistantRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateAssistantRequestModel left, InternalCreateAssistantRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateAssistantRequestModel(string value) => new InternalCreateAssistantRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateAssistantRequestModel other && Equals(other); + public bool Equals(InternalCreateAssistantRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs index d21e16129..70baf621b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalCreateAssistantRequestToolResources : IJsonModel< { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } - InternalCreateAssistantRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateAssistantRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateAssistantRequestToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateAssistantRequestToolResources(document.RootElement, options); } - internal static InternalCreateAssistantRequestToolResources DeserializeInternalCreateAssistantRequestToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateAssistantRequestToolResources DeserializeInternalCreateAssistantRequestToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateAssistantRequestToolResourcesCodeInterpreter codeInterpreter = default; FileSearchToolResources fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalCreateAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalCreateAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(property.Value, options); + fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateAssistantRequestToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalCreateAssistantRequestToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write( } } - InternalCreateAssistantRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateAssistantRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateAssistantRequestToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateAssistantRequestToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalCreateAssistantRequestToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateAssistantRequestToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateAssistantRequestToolResources internalCreateAssistantRequestToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateAssistantRequestToolResources(document.RootElement); + return BinaryContent.Create(internalCreateAssistantRequestToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateAssistantRequestToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateAssistantRequestToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs index 3ac5aa737..76340c9e2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateAssistantRequestToolResources() { } - internal InternalCreateAssistantRequestToolResources(InternalCreateAssistantRequestToolResourcesCodeInterpreter codeInterpreter, FileSearchToolResources fileSearch, IDictionary serializedAdditionalRawData) + internal InternalCreateAssistantRequestToolResources(InternalCreateAssistantRequestToolResourcesCodeInterpreter codeInterpreter, FileSearchToolResources fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public InternalCreateAssistantRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public FileSearchToolResources FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index ea159b987..d956be368 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalCreateAssistantRequestToolResourcesCodeInterprete { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } - InternalCreateAssistantRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateAssistantRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateAssistantRequestToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateAssistantRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalCreateAssistantRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateAssistantRequestToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateAssistantRequestToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalCreateAssistantRequestToolResourcesCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateAssistantRequestToolResourcesCodeInterpreter internalCreateAssistantRequestToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalCreateAssistantRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateAssistantRequestToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs index ee042f14f..851293b79 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateAssistantRequestToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalCreateAssistantRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary serializedAdditionalRawData) + internal InternalCreateAssistantRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index 3fb6cc73d..b59906d54 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -7,36 +7,37 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalCreateBatchRequest : IJsonModel { + internal InternalCreateBatchRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateBatchRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("input_file_id") != true) - { - writer.WritePropertyName("input_file_id"u8); - writer.WriteStringValue(InputFileId); - } - if (SerializedAdditionalRawData?.ContainsKey("endpoint") != true) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("completion_window") != true) - { - writer.WritePropertyName("completion_window"u8); - writer.WriteStringValue(CompletionWindow.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("input_file_id"u8); + writer.WriteStringValue(InputFileId); + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint.ToString()); + writer.WritePropertyName("completion_window"u8); + writer.WriteStringValue(CompletionWindow.ToString()); + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -45,26 +46,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -73,25 +75,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - InternalCreateBatchRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateBatchRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateBatchRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateBatchRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateBatchRequest(document.RootElement, options); } - internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -99,54 +99,59 @@ internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest string inputFileId = default; InternalCreateBatchRequestEndpoint endpoint = default; InternalBatchCompletionTimeframe completionWindow = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary metadata = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("input_file_id"u8)) + if (prop.NameEquals("input_file_id"u8)) { - inputFileId = property.Value.GetString(); + inputFileId = prop.Value.GetString(); continue; } - if (property.NameEquals("endpoint"u8)) + if (prop.NameEquals("endpoint"u8)) { - endpoint = new InternalCreateBatchRequestEndpoint(property.Value.GetString()); + endpoint = new InternalCreateBatchRequestEndpoint(prop.Value.GetString()); continue; } - if (property.NameEquals("completion_window"u8)) + if (prop.NameEquals("completion_window"u8)) { - completionWindow = new InternalBatchCompletionTimeframe(property.Value.GetString()); + completionWindow = new InternalBatchCompletionTimeframe(prop.Value.GetString()); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateBatchRequest(inputFileId, endpoint, completionWindow, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new InternalCreateBatchRequest(inputFileId, endpoint, completionWindow, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -156,15 +161,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalCreateBatchRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateBatchRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateBatchRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateBatchRequest(document.RootElement, options); } default: @@ -174,15 +180,16 @@ InternalCreateBatchRequest IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateBatchRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateBatchRequest internalCreateBatchRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateBatchRequest(document.RootElement); + return BinaryContent.Create(internalCreateBatchRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateBatchRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateBatchRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs index 4b5db4d78..1acf8790e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs @@ -4,38 +4,36 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalCreateBatchRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchRequestEndpoint endpoint) { - Argument.AssertNotNull(inputFileId, nameof(inputFileId)); - InputFileId = inputFileId; Endpoint = endpoint; Metadata = new ChangeTrackingDictionary(); } - internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IDictionary metadata, IDictionary additionalBinaryDataProperties) { InputFileId = inputFileId; Endpoint = endpoint; CompletionWindow = completionWindow; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateBatchRequest() - { - } + public string InputFileId { get; set; } + + public InternalCreateBatchRequestEndpoint Endpoint { get; set; } - public string InputFileId { get; } - public InternalCreateBatchRequestEndpoint Endpoint { get; } - public InternalBatchCompletionTimeframe CompletionWindow { get; } = InternalBatchCompletionTimeframe._24h; + public InternalBatchCompletionTimeframe CompletionWindow { get; } = "24h"; - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs index 9163b9de6..7a73a6904 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalCreateBatchRequestEndpoint : IEquatable { private readonly string _value; + private const string V1ChatCompletionsValue = "/v1/chat/completions"; + private const string V1EmbeddingsValue = "/v1/embeddings"; public InternalCreateBatchRequestEndpoint(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string V1ChatCompletionsValue = "/v1/chat/completions"; - private const string V1EmbeddingsValue = "/v1/embeddings"; + _value = value; + } public static InternalCreateBatchRequestEndpoint V1ChatCompletions { get; } = new InternalCreateBatchRequestEndpoint(V1ChatCompletionsValue); + public static InternalCreateBatchRequestEndpoint V1Embeddings { get; } = new InternalCreateBatchRequestEndpoint(V1EmbeddingsValue); + public static bool operator ==(InternalCreateBatchRequestEndpoint left, InternalCreateBatchRequestEndpoint right) => left.Equals(right); + public static bool operator !=(InternalCreateBatchRequestEndpoint left, InternalCreateBatchRequestEndpoint right) => !left.Equals(right); + public static implicit operator InternalCreateBatchRequestEndpoint(string value) => new InternalCreateBatchRequestEndpoint(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateBatchRequestEndpoint other && Equals(other); + public bool Equals(InternalCreateBatchRequestEndpoint other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index a5999bf8d..b69a021a6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -7,71 +7,62 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponse : IJsonModel { + internal InternalCreateChatCompletionFunctionResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) - { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (var item in Choices) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(SystemFingerprint)) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -80,91 +71,92 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionFunctionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionFunctionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionFunctionResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionFunctionResponse(document.RootElement, options); } - internal static InternalCreateChatCompletionFunctionResponse DeserializeInternalCreateChatCompletionFunctionResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionFunctionResponse DeserializeInternalCreateChatCompletionFunctionResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - IReadOnlyList choices = default; + IList choices = default; DateTimeOffset created = default; string model = default; string systemFingerprint = default; InternalCreateChatCompletionFunctionResponseObject @object = default; ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("choices"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalCreateChatCompletionFunctionResponseChoice.DeserializeInternalCreateChatCompletionFunctionResponseChoice(item, options)); } choices = array; continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("created"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { - systemFingerprint = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + systemFingerprint = null; + continue; + } + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalCreateChatCompletionFunctionResponseObject(property.Value.GetString()); + @object = new InternalCreateChatCompletionFunctionResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + usage = null; continue; } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalCreateChatCompletionFunctionResponse( id, choices, @@ -173,13 +165,14 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal systemFingerprint, @object, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -189,15 +182,16 @@ BinaryData IPersistableModel.Write } } - InternalCreateChatCompletionFunctionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionFunctionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionFunctionResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionFunctionResponse(document.RootElement, options); } default: @@ -207,15 +201,16 @@ InternalCreateChatCompletionFunctionResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionFunctionResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionFunctionResponse internalCreateChatCompletionFunctionResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionFunctionResponse(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionFunctionResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionFunctionResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionFunctionResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs index 19c621203..a7302db76 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs @@ -10,20 +10,17 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionFunctionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); - Id = id; Choices = choices.ToList(); Created = created; Model = model; } - internal InternalCreateChatCompletionFunctionResponse(string id, IReadOnlyList choices, DateTimeOffset created, string model, string systemFingerprint, InternalCreateChatCompletionFunctionResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionFunctionResponse(string id, IList choices, DateTimeOffset created, string model, string systemFingerprint, InternalCreateChatCompletionFunctionResponseObject @object, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) { Id = id; Choices = choices; @@ -32,20 +29,21 @@ internal InternalCreateChatCompletionFunctionResponse(string id, IReadOnlyList Choices { get; } + + public DateTimeOffset Created { get; set; } + + public string Model { get; set; } + + public string SystemFingerprint { get; set; } - public string Id { get; } - public IReadOnlyList Choices { get; } - public DateTimeOffset Created { get; } - public string Model { get; } - public string SystemFingerprint { get; } - public InternalCreateChatCompletionFunctionResponseObject Object { get; } = InternalCreateChatCompletionFunctionResponseObject.ChatCompletion; + public InternalCreateChatCompletionFunctionResponseObject Object { get; } = "chat.completion"; - public ChatTokenUsage Usage { get; } + public ChatTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index 55422fd8c..7cca304ed 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponseChoice : IJsonModel { + internal InternalCreateChatCompletionFunctionResponseChoice() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponseChoice)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("finish_reason") != true) - { - writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) - { - writer.WritePropertyName("message"u8); - writer.WriteObjectValue(Message, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToString()); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + writer.WritePropertyName("message"u8); + writer.WriteObjectValue(Message, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionFunctionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionFunctionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionFunctionResponseChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponseChoice)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionFunctionResponseChoice(document.RootElement, options); } - internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeInternalCreateChatCompletionFunctionResponseChoice(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeInternalCreateChatCompletionFunctionResponseChoice(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeIn InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason = default; int index = default; InternalChatCompletionResponseMessage message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("finish_reason"u8)) + if (prop.NameEquals("finish_reason"u8)) { - finishReason = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(property.Value.GetString()); + finishReason = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(prop.Value.GetString()); continue; } - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(property.Value, options); + message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateChatCompletionFunctionResponseChoice(finishReason, index, message, serializedAdditionalRawData); + return new InternalCreateChatCompletionFunctionResponseChoice(finishReason, index, message, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel } } - InternalCreateChatCompletionFunctionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionFunctionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionFunctionResponseChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionFunctionResponseChoice(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalCreateChatCompletionFunctionResponseChoice IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionFunctionResponseChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionFunctionResponseChoice internalCreateChatCompletionFunctionResponseChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionFunctionResponseChoice(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionFunctionResponseChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionFunctionResponseChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionFunctionResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs index 6e0687ded..05be19696 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs @@ -9,30 +9,27 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponseChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason, int index, InternalChatCompletionResponseMessage message) { - Argument.AssertNotNull(message, nameof(message)); - FinishReason = finishReason; Index = index; Message = message; } - internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, IDictionary additionalBinaryDataProperties) { FinishReason = finishReason; Index = index; Message = message; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionFunctionResponseChoice() - { - } + public InternalCreateChatCompletionFunctionResponseChoiceFinishReason FinishReason { get; set; } + + public int Index { get; set; } - public InternalCreateChatCompletionFunctionResponseChoiceFinishReason FinishReason { get; } - public int Index { get; } - public InternalChatCompletionResponseMessage Message { get; } + public InternalChatCompletionResponseMessage Message { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs index 679edf97e..bbf4f031d 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionFunctionResponseChoiceFinishReason : IEquatable { private readonly string _value; - - public InternalCreateChatCompletionFunctionResponseChoiceFinishReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string StopValue = "stop"; private const string LengthValue = "length"; private const string FunctionCallValue = "function_call"; private const string ContentFilterValue = "content_filter"; + public InternalCreateChatCompletionFunctionResponseChoiceFinishReason(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateChatCompletionFunctionResponseChoiceFinishReason Stop { get; } = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(StopValue); + public static InternalCreateChatCompletionFunctionResponseChoiceFinishReason Length { get; } = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(LengthValue); + public static InternalCreateChatCompletionFunctionResponseChoiceFinishReason FunctionCall { get; } = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(FunctionCallValue); + public static InternalCreateChatCompletionFunctionResponseChoiceFinishReason ContentFilter { get; } = new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(ContentFilterValue); + public static bool operator ==(InternalCreateChatCompletionFunctionResponseChoiceFinishReason left, InternalCreateChatCompletionFunctionResponseChoiceFinishReason right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionFunctionResponseChoiceFinishReason left, InternalCreateChatCompletionFunctionResponseChoiceFinishReason right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionFunctionResponseChoiceFinishReason(string value) => new InternalCreateChatCompletionFunctionResponseChoiceFinishReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionFunctionResponseChoiceFinishReason other && Equals(other); + public bool Equals(InternalCreateChatCompletionFunctionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs index 43c04df1d..526f84ea8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionFunctionResponseObject : IEquatable { private readonly string _value; + private const string ChatCompletionValue = "chat.completion"; public InternalCreateChatCompletionFunctionResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ChatCompletionValue = "chat.completion"; + _value = value; + } public static InternalCreateChatCompletionFunctionResponseObject ChatCompletion { get; } = new InternalCreateChatCompletionFunctionResponseObject(ChatCompletionValue); + public static bool operator ==(InternalCreateChatCompletionFunctionResponseObject left, InternalCreateChatCompletionFunctionResponseObject right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionFunctionResponseObject left, InternalCreateChatCompletionFunctionResponseObject right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionFunctionResponseObject(string value) => new InternalCreateChatCompletionFunctionResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionFunctionResponseObject other && Equals(other); + public bool Equals(InternalCreateChatCompletionFunctionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs index f01b6a494..9c90975c5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionRequestModel : IEquatable { private readonly string _value; - - public InternalCreateChatCompletionRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string O1PreviewValue = "o1-preview"; private const string O1Preview20240912Value = "o1-preview-2024-09-12"; private const string O1MiniValue = "o1-mini"; @@ -46,45 +41,84 @@ public InternalCreateChatCompletionRequestModel(string value) private const string Gpt35Turbo0125Value = "gpt-3.5-turbo-0125"; private const string Gpt35Turbo16k0613Value = "gpt-3.5-turbo-16k-0613"; + public InternalCreateChatCompletionRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateChatCompletionRequestModel O1Preview { get; } = new InternalCreateChatCompletionRequestModel(O1PreviewValue); + public static InternalCreateChatCompletionRequestModel O1Preview20240912 { get; } = new InternalCreateChatCompletionRequestModel(O1Preview20240912Value); + public static InternalCreateChatCompletionRequestModel O1Mini { get; } = new InternalCreateChatCompletionRequestModel(O1MiniValue); + public static InternalCreateChatCompletionRequestModel O1Mini20240912 { get; } = new InternalCreateChatCompletionRequestModel(O1Mini20240912Value); + public static InternalCreateChatCompletionRequestModel Gpt4o { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oValue); + public static InternalCreateChatCompletionRequestModel Gpt4o20240806 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4o20240806Value); + public static InternalCreateChatCompletionRequestModel Gpt4o20240513 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4o20240513Value); + public static InternalCreateChatCompletionRequestModel Chatgpt4oLatest { get; } = new InternalCreateChatCompletionRequestModel(Chatgpt4oLatestValue); + public static InternalCreateChatCompletionRequestModel Gpt4oMini { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oMiniValue); + public static InternalCreateChatCompletionRequestModel Gpt4oMini20240718 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oMini20240718Value); + public static InternalCreateChatCompletionRequestModel Gpt4Turbo { get; } = new InternalCreateChatCompletionRequestModel(Gpt4TurboValue); + public static InternalCreateChatCompletionRequestModel Gpt4Turbo20240409 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4Turbo20240409Value); + public static InternalCreateChatCompletionRequestModel Gpt40125Preview { get; } = new InternalCreateChatCompletionRequestModel(Gpt40125PreviewValue); + public static InternalCreateChatCompletionRequestModel Gpt4TurboPreview { get; } = new InternalCreateChatCompletionRequestModel(Gpt4TurboPreviewValue); + public static InternalCreateChatCompletionRequestModel Gpt41106Preview { get; } = new InternalCreateChatCompletionRequestModel(Gpt41106PreviewValue); + public static InternalCreateChatCompletionRequestModel Gpt4VisionPreview { get; } = new InternalCreateChatCompletionRequestModel(Gpt4VisionPreviewValue); + public static InternalCreateChatCompletionRequestModel Gpt4 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4Value); + public static InternalCreateChatCompletionRequestModel Gpt40314 { get; } = new InternalCreateChatCompletionRequestModel(Gpt40314Value); + public static InternalCreateChatCompletionRequestModel Gpt40613 { get; } = new InternalCreateChatCompletionRequestModel(Gpt40613Value); + public static InternalCreateChatCompletionRequestModel Gpt432k { get; } = new InternalCreateChatCompletionRequestModel(Gpt432kValue); + public static InternalCreateChatCompletionRequestModel Gpt432k0314 { get; } = new InternalCreateChatCompletionRequestModel(Gpt432k0314Value); + public static InternalCreateChatCompletionRequestModel Gpt432k0613 { get; } = new InternalCreateChatCompletionRequestModel(Gpt432k0613Value); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo { get; } = new InternalCreateChatCompletionRequestModel(Gpt35TurboValue); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo16k { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo16kValue); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo0301 { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo0301Value); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo0613 { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo0613Value); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo1106 { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo1106Value); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo0125 { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo0125Value); + public static InternalCreateChatCompletionRequestModel Gpt35Turbo16k0613 { get; } = new InternalCreateChatCompletionRequestModel(Gpt35Turbo16k0613Value); + public static bool operator ==(InternalCreateChatCompletionRequestModel left, InternalCreateChatCompletionRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionRequestModel left, InternalCreateChatCompletionRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionRequestModel(string value) => new InternalCreateChatCompletionRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionRequestModel other && Equals(other); + public bool Equals(InternalCreateChatCompletionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs index 7d6f7f657..90bc6dc6b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionRequestServiceTier : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string DefaultValue = "default"; public InternalCreateChatCompletionRequestServiceTier(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string DefaultValue = "default"; + _value = value; + } public static InternalCreateChatCompletionRequestServiceTier Auto { get; } = new InternalCreateChatCompletionRequestServiceTier(AutoValue); + public static InternalCreateChatCompletionRequestServiceTier Default { get; } = new InternalCreateChatCompletionRequestServiceTier(DefaultValue); + public static bool operator ==(InternalCreateChatCompletionRequestServiceTier left, InternalCreateChatCompletionRequestServiceTier right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionRequestServiceTier left, InternalCreateChatCompletionRequestServiceTier right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionRequestServiceTier(string value) => new InternalCreateChatCompletionRequestServiceTier(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionRequestServiceTier other && Equals(other); + public bool Equals(InternalCreateChatCompletionRequestServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs index 04328dced..65aea4cc0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionRequestToolChoice : IEquatable { private readonly string _value; + private const string NoneValue = "none"; + private const string AutoValue = "auto"; + private const string RequiredValue = "required"; public InternalCreateChatCompletionRequestToolChoice(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string NoneValue = "none"; - private const string AutoValue = "auto"; - private const string RequiredValue = "required"; + _value = value; + } public static InternalCreateChatCompletionRequestToolChoice None { get; } = new InternalCreateChatCompletionRequestToolChoice(NoneValue); + public static InternalCreateChatCompletionRequestToolChoice Auto { get; } = new InternalCreateChatCompletionRequestToolChoice(AutoValue); + public static InternalCreateChatCompletionRequestToolChoice Required { get; } = new InternalCreateChatCompletionRequestToolChoice(RequiredValue); + public static bool operator ==(InternalCreateChatCompletionRequestToolChoice left, InternalCreateChatCompletionRequestToolChoice right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionRequestToolChoice left, InternalCreateChatCompletionRequestToolChoice right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionRequestToolChoice(string value) => new InternalCreateChatCompletionRequestToolChoice(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionRequestToolChoice other && Equals(other); + public bool Equals(InternalCreateChatCompletionRequestToolChoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index dc72c0a83..81d2a63b1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -7,58 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoice : IJsonModel { + internal InternalCreateChatCompletionResponseChoice() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoice)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("finish_reason") != true) - { - writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("index") != true) + writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToSerialString()); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + writer.WritePropertyName("message"u8); + writer.WriteObjectValue(Message, options); + if (Logprobs != null) { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); + writer.WritePropertyName("logprobs"u8); + writer.WriteObjectValue(Logprobs, options); } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + else { - writer.WritePropertyName("message"u8); - writer.WriteObjectValue(Message, options); + writer.WriteNull("logprobs"u8); } - if (SerializedAdditionalRawData?.ContainsKey("logprobs") != true) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - if (Logprobs != null) + foreach (var item in _additionalBinaryDataProperties) { - writer.WritePropertyName("logprobs"u8); - writer.WriteObjectValue(Logprobs, options); - } - else - { - writer.WriteNull("logprobs"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -67,76 +61,72 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionResponseChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoice)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionResponseChoice(document.RootElement, options); } - internal static InternalCreateChatCompletionResponseChoice DeserializeInternalCreateChatCompletionResponseChoice(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionResponseChoice DeserializeInternalCreateChatCompletionResponseChoice(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatFinishReason finishReason = default; + Chat.ChatFinishReason finishReason = default; int index = default; InternalChatCompletionResponseMessage message = default; InternalCreateChatCompletionResponseChoiceLogprobs logprobs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("finish_reason"u8)) + if (prop.NameEquals("finish_reason"u8)) { - finishReason = property.Value.GetString().ToChatFinishReason(); + finishReason = prop.Value.GetString().ToChatFinishReason(); continue; } - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(property.Value, options); + message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(prop.Value, options); continue; } - if (property.NameEquals("logprobs"u8)) + if (prop.NameEquals("logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { logprobs = null; continue; } - logprobs = InternalCreateChatCompletionResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(property.Value, options); + logprobs = InternalCreateChatCompletionResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateChatCompletionResponseChoice(finishReason, index, message, logprobs, serializedAdditionalRawData); + return new InternalCreateChatCompletionResponseChoice(finishReason, index, message, logprobs, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -146,15 +136,16 @@ BinaryData IPersistableModel.Write(M } } - InternalCreateChatCompletionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionResponseChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionResponseChoice(document.RootElement, options); } default: @@ -164,15 +155,16 @@ InternalCreateChatCompletionResponseChoice IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionResponseChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionResponseChoice internalCreateChatCompletionResponseChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionResponseChoice(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionResponseChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionResponseChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs index 88a8051cf..648b5e6fd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs @@ -9,33 +9,31 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalCreateChatCompletionResponseChoice(ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs) - { - Argument.AssertNotNull(message, nameof(message)); + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs) + { FinishReason = finishReason; Index = index; Message = message; Logprobs = logprobs; } - internal InternalCreateChatCompletionResponseChoice(ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs, IDictionary additionalBinaryDataProperties) { FinishReason = finishReason; Index = index; Message = message; Logprobs = logprobs; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionResponseChoice() - { - } + public Chat.ChatFinishReason FinishReason { get; set; } + + public int Index { get; set; } + + public InternalChatCompletionResponseMessage Message { get; set; } - public ChatFinishReason FinishReason { get; } - public int Index { get; } - public InternalChatCompletionResponseMessage Message { get; } - public InternalCreateChatCompletionResponseChoiceLogprobs Logprobs { get; } + public InternalCreateChatCompletionResponseChoiceLogprobs Logprobs { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 1098a70ff..22345c13a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -7,65 +7,65 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoiceLogprobs : IJsonModel { + internal InternalCreateChatCompletionResponseChoiceLogprobs() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) + if (Content != null && Optional.IsCollectionDefined(Content)) { - if (Content != null && Optional.IsCollectionDefined(Content)) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) { - writer.WriteNull("content"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true) + else { - if (Refusal != null && Optional.IsCollectionDefined(Refusal)) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStartArray(); - foreach (var item in Refusal) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else + writer.WriteNull("content"u8); + } + if (Refusal != null && Optional.IsCollectionDefined(Refusal)) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStartArray(); + foreach (var item in Refusal) { - writer.WriteNull("refusal"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("refusal"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,79 +74,75 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionResponseChoiceLogprobs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(document.RootElement, options); } - internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList content = default; - IReadOnlyList refusal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList content = default; + IList refusal = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { content = new ChangeTrackingList(); continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTokenLogProbabilityDetails.DeserializeChatTokenLogProbabilityDetails(item, options)); } content = array; continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = new ChangeTrackingList(); continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTokenLogProbabilityDetails.DeserializeChatTokenLogProbabilityDetails(item, options)); } refusal = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateChatCompletionResponseChoiceLogprobs(content, refusal, serializedAdditionalRawData); + return new InternalCreateChatCompletionResponseChoiceLogprobs(content, refusal, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -156,15 +152,16 @@ BinaryData IPersistableModel } } - InternalCreateChatCompletionResponseChoiceLogprobs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionResponseChoiceLogprobs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionResponseChoiceLogprobs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(document.RootElement, options); } default: @@ -174,15 +171,16 @@ InternalCreateChatCompletionResponseChoiceLogprobs IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionResponseChoiceLogprobs FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionResponseChoiceLogprobs internalCreateChatCompletionResponseChoiceLogprobs) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionResponseChoiceLogprobs(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs index 236f4909a..9d6da8f66 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs @@ -10,25 +10,23 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoiceLogprobs { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) { Content = content?.ToList(); Refusal = refusal?.ToList(); } - internal InternalCreateChatCompletionResponseChoiceLogprobs(IReadOnlyList content, IReadOnlyList refusal, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionResponseChoiceLogprobs(IList content, IList refusal, IDictionary additionalBinaryDataProperties) { Content = content; Refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionResponseChoiceLogprobs() - { - } + public IList Content { get; set; } - public IReadOnlyList Content { get; } - public IReadOnlyList Refusal { get; } + public IList Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs index 9c1c590ed..e34ce0e71 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionResponseObject : IEquatable { private readonly string _value; + private const string ChatCompletionValue = "chat.completion"; public InternalCreateChatCompletionResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ChatCompletionValue = "chat.completion"; + _value = value; + } public static InternalCreateChatCompletionResponseObject ChatCompletion { get; } = new InternalCreateChatCompletionResponseObject(ChatCompletionValue); + public static bool operator ==(InternalCreateChatCompletionResponseObject left, InternalCreateChatCompletionResponseObject right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionResponseObject left, InternalCreateChatCompletionResponseObject right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionResponseObject(string value) => new InternalCreateChatCompletionResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionResponseObject other && Equals(other); + public bool Equals(InternalCreateChatCompletionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs index 599297be0..821360822 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionResponseServiceTier : IEquatable { private readonly string _value; + private const string ScaleValue = "scale"; + private const string DefaultValue = "default"; public InternalCreateChatCompletionResponseServiceTier(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ScaleValue = "scale"; - private const string DefaultValue = "default"; + _value = value; + } public static InternalCreateChatCompletionResponseServiceTier Scale { get; } = new InternalCreateChatCompletionResponseServiceTier(ScaleValue); + public static InternalCreateChatCompletionResponseServiceTier Default { get; } = new InternalCreateChatCompletionResponseServiceTier(DefaultValue); + public static bool operator ==(InternalCreateChatCompletionResponseServiceTier left, InternalCreateChatCompletionResponseServiceTier right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionResponseServiceTier left, InternalCreateChatCompletionResponseServiceTier right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionResponseServiceTier(string value) => new InternalCreateChatCompletionResponseServiceTier(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionResponseServiceTier other && Equals(other); + public bool Equals(InternalCreateChatCompletionResponseServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index fd1dd8a10..3658458e5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -5,28 +5,143 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoice : IJsonModel { - InternalCreateChatCompletionStreamResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalCreateChatCompletionStreamResponseChoice() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support writing '{format}' format."); } + writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); + if (Optional.IsDefined(Logprobs)) + { + if (Logprobs != null) + { + writer.WritePropertyName("logprobs"u8); + writer.WriteObjectValue(Logprobs, options); + } + else + { + writer.WriteNull("logprobs"u8); + } + } + if (FinishReason != null) + { + writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.Value.ToString()); + } + else + { + writer.WriteNull("finishReason"u8); + } + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalCreateChatCompletionStreamResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + protected virtual InternalCreateChatCompletionStreamResponseChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static InternalCreateChatCompletionStreamResponseChoice DeserializeInternalCreateChatCompletionStreamResponseChoice(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalChatCompletionStreamResponseDelta delta = default; + InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs = default; + InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason = default; + int index = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("delta"u8)) + { + delta = InternalChatCompletionStreamResponseDelta.DeserializeInternalChatCompletionStreamResponseDelta(prop.Value, options); + continue; + } + if (prop.NameEquals("logprobs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + logprobs = null; + continue; + } + logprobs = InternalCreateChatCompletionStreamResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(prop.Value, options); + continue; + } + if (prop.NameEquals("finish_reason"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + finishReason = null; + continue; + } + finishReason = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("index"u8)) + { + index = prop.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalCreateChatCompletionStreamResponseChoice(delta, logprobs, finishReason, index, additionalBinaryDataProperties); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +151,16 @@ BinaryData IPersistableModel.W } } - InternalCreateChatCompletionStreamResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionStreamResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionStreamResponseChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); } default: @@ -54,15 +170,16 @@ InternalCreateChatCompletionStreamResponseChoice IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionStreamResponseChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseChoice internalCreateChatCompletionStreamResponseChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionStreamResponseChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionStreamResponseChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index 6bb376d9f..bc65d3ce5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -9,31 +9,28 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, ChatFinishReason? finishReason, int index) - { - Argument.AssertNotNull(delta, nameof(delta)); + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason, int index) + { Delta = delta; FinishReason = finishReason; Index = index; } - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, ChatFinishReason? finishReason, int index, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason, int index, IDictionary additionalBinaryDataProperties) { Delta = delta; Logprobs = logprobs; FinishReason = finishReason; Index = index; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionStreamResponseChoice() - { - } + public InternalChatCompletionStreamResponseDelta Delta { get; set; } + + public InternalCreateChatCompletionStreamResponseChoiceLogprobs Logprobs { get; set; } - public InternalChatCompletionStreamResponseDelta Delta { get; } - public InternalCreateChatCompletionStreamResponseChoiceLogprobs Logprobs { get; } - public int Index { get; } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs index 76fdf5a27..1e3c2bb23 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs @@ -4,39 +4,49 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionStreamResponseChoiceFinishReason : IEquatable { private readonly string _value; - - public InternalCreateChatCompletionStreamResponseChoiceFinishReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string StopValue = "stop"; private const string LengthValue = "length"; private const string ToolCallsValue = "tool_calls"; private const string ContentFilterValue = "content_filter"; private const string FunctionCallValue = "function_call"; + public InternalCreateChatCompletionStreamResponseChoiceFinishReason(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateChatCompletionStreamResponseChoiceFinishReason Stop { get; } = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(StopValue); + public static InternalCreateChatCompletionStreamResponseChoiceFinishReason Length { get; } = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(LengthValue); + public static InternalCreateChatCompletionStreamResponseChoiceFinishReason ToolCalls { get; } = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(ToolCallsValue); + public static InternalCreateChatCompletionStreamResponseChoiceFinishReason ContentFilter { get; } = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(ContentFilterValue); + public static InternalCreateChatCompletionStreamResponseChoiceFinishReason FunctionCall { get; } = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(FunctionCallValue); + public static bool operator ==(InternalCreateChatCompletionStreamResponseChoiceFinishReason left, InternalCreateChatCompletionStreamResponseChoiceFinishReason right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionStreamResponseChoiceFinishReason left, InternalCreateChatCompletionStreamResponseChoiceFinishReason right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionStreamResponseChoiceFinishReason(string value) => new InternalCreateChatCompletionStreamResponseChoiceFinishReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionStreamResponseChoiceFinishReason other && Equals(other); + public bool Equals(InternalCreateChatCompletionStreamResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index 02337c279..579c528b8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -7,65 +7,65 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs : IJsonModel { + internal InternalCreateChatCompletionStreamResponseChoiceLogprobs() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoiceLogprobs)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) + if (Content != null && Optional.IsCollectionDefined(Content)) { - if (Content != null && Optional.IsCollectionDefined(Content)) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) { - writer.WriteNull("content"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true) + else { - if (Refusal != null && Optional.IsCollectionDefined(Refusal)) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStartArray(); - foreach (var item in Refusal) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else + writer.WriteNull("content"u8); + } + if (Refusal != null && Optional.IsCollectionDefined(Refusal)) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStartArray(); + foreach (var item in Refusal) { - writer.WriteNull("refusal"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("refusal"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,79 +74,75 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionStreamResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionStreamResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionStreamResponseChoiceLogprobs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoiceLogprobs)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(document.RootElement, options); } - internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList content = default; - IReadOnlyList refusal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList content = default; + IList refusal = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { content = new ChangeTrackingList(); continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTokenLogProbabilityDetails.DeserializeChatTokenLogProbabilityDetails(item, options)); } content = array; continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = new ChangeTrackingList(); continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTokenLogProbabilityDetails.DeserializeChatTokenLogProbabilityDetails(item, options)); } refusal = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateChatCompletionStreamResponseChoiceLogprobs(content, refusal, serializedAdditionalRawData); + return new InternalCreateChatCompletionStreamResponseChoiceLogprobs(content, refusal, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -156,15 +152,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionStreamResponseChoiceLogprobs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionStreamResponseChoiceLogprobs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(document.RootElement, options); } default: @@ -174,15 +171,16 @@ InternalCreateChatCompletionStreamResponseChoiceLogprobs IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseChoiceLogprobs internalCreateChatCompletionStreamResponseChoiceLogprobs) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionStreamResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionStreamResponseChoiceLogprobs(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs index 9b927d501..2799ed041 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs @@ -10,25 +10,23 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) { Content = content?.ToList(); Refusal = refusal?.ToList(); } - internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IReadOnlyList content, IReadOnlyList refusal, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IList content, IList refusal, IDictionary additionalBinaryDataProperties) { Content = content; Refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionStreamResponseChoiceLogprobs() - { - } + public IList Content { get; set; } - public IReadOnlyList Content { get; } - public IReadOnlyList Refusal { get; } + public IList Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs index 65aca720e..0f2a369e8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionStreamResponseObject : IEquatable { private readonly string _value; + private const string ChatCompletionChunkValue = "chat.completion.chunk"; public InternalCreateChatCompletionStreamResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ChatCompletionChunkValue = "chat.completion.chunk"; + _value = value; + } public static InternalCreateChatCompletionStreamResponseObject ChatCompletionChunk { get; } = new InternalCreateChatCompletionStreamResponseObject(ChatCompletionChunkValue); + public static bool operator ==(InternalCreateChatCompletionStreamResponseObject left, InternalCreateChatCompletionStreamResponseObject right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionStreamResponseObject left, InternalCreateChatCompletionStreamResponseObject right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionStreamResponseObject(string value) => new InternalCreateChatCompletionStreamResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionStreamResponseObject other && Equals(other); + public bool Equals(InternalCreateChatCompletionStreamResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs index 0f2eb1326..39740f316 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Chat { internal readonly partial struct InternalCreateChatCompletionStreamResponseServiceTier : IEquatable { private readonly string _value; + private const string ScaleValue = "scale"; + private const string DefaultValue = "default"; public InternalCreateChatCompletionStreamResponseServiceTier(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ScaleValue = "scale"; - private const string DefaultValue = "default"; + _value = value; + } public static InternalCreateChatCompletionStreamResponseServiceTier Scale { get; } = new InternalCreateChatCompletionStreamResponseServiceTier(ScaleValue); + public static InternalCreateChatCompletionStreamResponseServiceTier Default { get; } = new InternalCreateChatCompletionStreamResponseServiceTier(DefaultValue); + public static bool operator ==(InternalCreateChatCompletionStreamResponseServiceTier left, InternalCreateChatCompletionStreamResponseServiceTier right) => left.Equals(right); + public static bool operator !=(InternalCreateChatCompletionStreamResponseServiceTier left, InternalCreateChatCompletionStreamResponseServiceTier right) => !left.Equals(right); + public static implicit operator InternalCreateChatCompletionStreamResponseServiceTier(string value) => new InternalCreateChatCompletionStreamResponseServiceTier(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateChatCompletionStreamResponseServiceTier other && Equals(other); + public bool Equals(InternalCreateChatCompletionStreamResponseServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index 300a01f0c..02ec523e5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseUsage : IJsonModel { + internal InternalCreateChatCompletionStreamResponseUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } - InternalCreateChatCompletionStreamResponseUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateChatCompletionStreamResponseUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateChatCompletionStreamResponseUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateChatCompletionStreamResponseUsage(document.RootElement, options); } - internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInternalCreateChatCompletionStreamResponseUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInternalCreateChatCompletionStreamResponseUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInter int completionTokens = default; int promptTokens = default; int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + completionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + promptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateChatCompletionStreamResponseUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData); + return new InternalCreateChatCompletionStreamResponseUsage(completionTokens, promptTokens, totalTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Wr } } - InternalCreateChatCompletionStreamResponseUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateChatCompletionStreamResponseUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateChatCompletionStreamResponseUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateChatCompletionStreamResponseUsage(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalCreateChatCompletionStreamResponseUsage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateChatCompletionStreamResponseUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseUsage internalCreateChatCompletionStreamResponseUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionStreamResponseUsage(document.RootElement); + return BinaryContent.Create(internalCreateChatCompletionStreamResponseUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateChatCompletionStreamResponseUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateChatCompletionStreamResponseUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs index 922ce4cae..3888a1726 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs @@ -9,7 +9,8 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, int promptTokens, int totalTokens) { CompletionTokens = completionTokens; @@ -17,20 +18,18 @@ internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, i TotalTokens = totalTokens; } - internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary serializedAdditionalRawData) + internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary additionalBinaryDataProperties) { CompletionTokens = completionTokens; PromptTokens = promptTokens; TotalTokens = totalTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateChatCompletionStreamResponseUsage() - { - } + public int CompletionTokens { get; set; } + + public int PromptTokens { get; set; } - public int CompletionTokens { get; } - public int PromptTokens { get; } - public int TotalTokens { get; } + public int TotalTokens { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index 6658d5c48..d55e617fb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -7,46 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Chat; namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionRequest : IJsonModel { + internal InternalCreateCompletionRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + if (Prompt != null) { - if (Prompt != null) - { - writer.WritePropertyName("prompt"u8); + writer.WritePropertyName("prompt"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Prompt); + writer.WriteRawValue(Prompt); #else - using (JsonDocument document = JsonDocument.Parse(Prompt)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else + using (JsonDocument document = JsonDocument.Parse(Prompt)) { - writer.WriteNull("prompt"); + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("best_of") != true && Optional.IsDefined(BestOf)) + else + { + writer.WriteNull("prompt"u8); + } + if (Optional.IsDefined(BestOf)) { if (BestOf != null) { @@ -55,10 +59,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("best_of"); + writer.WriteNull("bestOf"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("echo") != true && Optional.IsDefined(Echo)) + if (Optional.IsDefined(Echo)) { if (Echo != null) { @@ -67,10 +71,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("echo"); + writer.WriteNull("echo"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("frequency_penalty") != true && Optional.IsDefined(FrequencyPenalty)) + if (Optional.IsDefined(FrequencyPenalty)) { if (FrequencyPenalty != null) { @@ -79,10 +83,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("frequency_penalty"); + writer.WriteNull("frequencyPenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("logit_bias") != true && Optional.IsCollectionDefined(LogitBias)) + if (Optional.IsCollectionDefined(LogitBias)) { if (LogitBias != null) { @@ -97,10 +101,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("logit_bias"); + writer.WriteNull("logitBias"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("logprobs") != true && Optional.IsDefined(Logprobs)) + if (Optional.IsDefined(Logprobs)) { if (Logprobs != null) { @@ -109,10 +113,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("logprobs"); + writer.WriteNull("logprobs"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_tokens") != true && Optional.IsDefined(MaxTokens)) + if (Optional.IsDefined(MaxTokens)) { if (MaxTokens != null) { @@ -121,10 +125,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("max_tokens"); + writer.WriteNull("maxTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(N)) { if (N != null) { @@ -133,10 +137,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("n"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("presence_penalty") != true && Optional.IsDefined(PresencePenalty)) + if (Optional.IsDefined(PresencePenalty)) { if (PresencePenalty != null) { @@ -145,10 +149,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("presence_penalty"); + writer.WriteNull("presencePenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("seed") != true && Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed)) { if (Seed != null) { @@ -157,16 +161,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("seed"); + writer.WriteNull("seed"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stop") != true && Optional.IsDefined(Stop)) + if (Optional.IsDefined(Stop)) { if (Stop != null) { writer.WritePropertyName("stop"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Stop); + writer.WriteRawValue(Stop); #else using (JsonDocument document = JsonDocument.Parse(Stop)) { @@ -176,10 +180,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("stop"); + writer.WriteNull("stop"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream)) { if (Stream != null) { @@ -188,10 +192,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("stream"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream_options") != true && Optional.IsDefined(StreamOptions)) + if (Optional.IsDefined(StreamOptions)) { if (StreamOptions != null) { @@ -200,10 +204,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("stream_options"); + writer.WriteNull("streamOptions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("suffix") != true && Optional.IsDefined(Suffix)) + if (Optional.IsDefined(Suffix)) { if (Suffix != null) { @@ -212,10 +216,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("suffix"); + writer.WriteNull("suffix"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -224,10 +228,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP)) { if (TopP != null) { @@ -236,25 +240,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(User)) + if (Optional.IsDefined(User)) { writer.WritePropertyName("user"u8); writer.WriteStringValue(User); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -263,25 +263,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalCreateCompletionRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateCompletionRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateCompletionRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateCompletionRequest(document.RootElement, options); } - internal static InternalCreateCompletionRequest DeserializeInternalCreateCompletionRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateCompletionRequest DeserializeInternalCreateCompletionRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -304,191 +302,193 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet float? temperature = default; float? topP = default; string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateCompletionRequestModel(property.Value.GetString()); + model = new InternalCreateCompletionRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { prompt = null; continue; } - prompt = BinaryData.FromString(property.Value.GetRawText()); + prompt = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("best_of"u8)) + if (prop.NameEquals("best_of"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { bestOf = null; continue; } - bestOf = property.Value.GetInt32(); + bestOf = prop.Value.GetInt32(); continue; } - if (property.NameEquals("echo"u8)) + if (prop.NameEquals("echo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { echo = null; continue; } - echo = property.Value.GetBoolean(); + echo = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("frequency_penalty"u8)) + if (prop.NameEquals("frequency_penalty"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { frequencyPenalty = null; continue; } - frequencyPenalty = property.Value.GetSingle(); + frequencyPenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("logit_bias"u8)) + if (prop.NameEquals("logit_bias"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetInt32()); + dictionary.Add(prop0.Name, prop0.Value.GetInt32()); } logitBias = dictionary; continue; } - if (property.NameEquals("logprobs"u8)) + if (prop.NameEquals("logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { logprobs = null; continue; } - logprobs = property.Value.GetInt32(); + logprobs = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_tokens"u8)) + if (prop.NameEquals("max_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxTokens = null; continue; } - maxTokens = property.Value.GetInt32(); + maxTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { n = null; continue; } - n = property.Value.GetInt32(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("presence_penalty"u8)) + if (prop.NameEquals("presence_penalty"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { presencePenalty = null; continue; } - presencePenalty = property.Value.GetSingle(); + presencePenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("seed"u8)) + if (prop.NameEquals("seed"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { seed = null; continue; } - seed = property.Value.GetInt64(); + seed = prop.Value.GetInt64(); continue; } - if (property.NameEquals("stop"u8)) + if (prop.NameEquals("stop"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stop = null; continue; } - stop = BinaryData.FromString(property.Value.GetRawText()); + stop = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stream = null; continue; } - stream = property.Value.GetBoolean(); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("stream_options"u8)) + if (prop.NameEquals("stream_options"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { streamOptions = null; continue; } - streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(property.Value, options); + streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(prop.Value, options); continue; } - if (property.NameEquals("suffix"u8)) + if (prop.NameEquals("suffix"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { suffix = null; continue; } - suffix = property.Value.GetString(); + suffix = prop.Value.GetString(); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + user = null; + continue; + } + user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalCreateCompletionRequest( model, prompt, @@ -508,13 +508,14 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet temperature, topP, user, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -524,15 +525,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalCreateCompletionRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateCompletionRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateCompletionRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateCompletionRequest(document.RootElement, options); } default: @@ -542,15 +544,16 @@ InternalCreateCompletionRequest IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateCompletionRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateCompletionRequest internalCreateCompletionRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateCompletionRequest(document.RootElement); + return BinaryContent.Create(internalCreateCompletionRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateCompletionRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateCompletionRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs index 25e584d3b..495b4edfe 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs @@ -4,13 +4,15 @@ using System; using System.Collections.Generic; +using OpenAI; using OpenAI.Chat; namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateCompletionRequest(InternalCreateCompletionRequestModel model, BinaryData prompt) { Model = model; @@ -18,7 +20,7 @@ public InternalCreateCompletionRequest(InternalCreateCompletionRequestModel mode LogitBias = new ChangeTrackingDictionary(); } - internal InternalCreateCompletionRequest(InternalCreateCompletionRequestModel model, BinaryData prompt, int? bestOf, bool? echo, float? frequencyPenalty, IDictionary logitBias, int? logprobs, int? maxTokens, int? n, float? presencePenalty, long? seed, BinaryData stop, bool? stream, InternalChatCompletionStreamOptions streamOptions, string suffix, float? temperature, float? topP, string user, IDictionary serializedAdditionalRawData) + internal InternalCreateCompletionRequest(InternalCreateCompletionRequestModel model, BinaryData prompt, int? bestOf, bool? echo, float? frequencyPenalty, IDictionary logitBias, int? logprobs, int? maxTokens, int? n, float? presencePenalty, long? seed, BinaryData stop, bool? stream, InternalChatCompletionStreamOptions streamOptions, string suffix, float? temperature, float? topP, string user, IDictionary additionalBinaryDataProperties) { Model = model; Prompt = prompt; @@ -38,30 +40,43 @@ internal InternalCreateCompletionRequest(InternalCreateCompletionRequestModel mo Temperature = temperature; TopP = topP; User = user; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateCompletionRequest() - { - } + public InternalCreateCompletionRequestModel Model { get; set; } + + public BinaryData Prompt { get; set; } - public InternalCreateCompletionRequestModel Model { get; } - public BinaryData Prompt { get; } public int? BestOf { get; set; } + public bool? Echo { get; set; } + public float? FrequencyPenalty { get; set; } + public IDictionary LogitBias { get; set; } + public int? Logprobs { get; set; } + public int? MaxTokens { get; set; } + public int? N { get; set; } + public float? PresencePenalty { get; set; } + public long? Seed { get; set; } + public BinaryData Stop { get; set; } + public bool? Stream { get; set; } + public InternalChatCompletionStreamOptions StreamOptions { get; set; } + public string Suffix { get; set; } + public float? Temperature { get; set; } + public float? TopP { get; set; } + public string User { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs index 46b5e9d0f..b2f907007 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.LegacyCompletions { internal readonly partial struct InternalCreateCompletionRequestModel : IEquatable { private readonly string _value; + private const string Gpt35TurboInstructValue = "gpt-3.5-turbo-instruct"; + private const string Davinci002Value = "davinci-002"; + private const string Babbage002Value = "babbage-002"; public InternalCreateCompletionRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string Gpt35TurboInstructValue = "gpt-3.5-turbo-instruct"; - private const string Davinci002Value = "davinci-002"; - private const string Babbage002Value = "babbage-002"; + _value = value; + } public static InternalCreateCompletionRequestModel Gpt35TurboInstruct { get; } = new InternalCreateCompletionRequestModel(Gpt35TurboInstructValue); + public static InternalCreateCompletionRequestModel Davinci002 { get; } = new InternalCreateCompletionRequestModel(Davinci002Value); + public static InternalCreateCompletionRequestModel Babbage002 { get; } = new InternalCreateCompletionRequestModel(Babbage002Value); + public static bool operator ==(InternalCreateCompletionRequestModel left, InternalCreateCompletionRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateCompletionRequestModel left, InternalCreateCompletionRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateCompletionRequestModel(string value) => new InternalCreateCompletionRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateCompletionRequestModel other && Equals(other); + public bool Equals(InternalCreateCompletionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index 7f641dc9b..daec946cb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -7,72 +7,63 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Chat; namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponse : IJsonModel { + internal InternalCreateCompletionResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) - { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (var item in Choices) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(SystemFingerprint)) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -81,91 +72,92 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } - InternalCreateCompletionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateCompletionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateCompletionResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateCompletionResponse(document.RootElement, options); } - internal static InternalCreateCompletionResponse DeserializeInternalCreateCompletionResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateCompletionResponse DeserializeInternalCreateCompletionResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - IReadOnlyList choices = default; + IList choices = default; DateTimeOffset created = default; string model = default; string systemFingerprint = default; InternalCreateCompletionResponseObject @object = default; ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("choices"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalCreateCompletionResponseChoice.DeserializeInternalCreateCompletionResponseChoice(item, options)); } choices = array; continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("created"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { - systemFingerprint = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + systemFingerprint = null; + continue; + } + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalCreateCompletionResponseObject(property.Value.GetString()); + @object = new InternalCreateCompletionResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + usage = null; continue; } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalCreateCompletionResponse( id, choices, @@ -174,13 +166,14 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple systemFingerprint, @object, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -190,15 +183,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalCreateCompletionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateCompletionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateCompletionResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateCompletionResponse(document.RootElement, options); } default: @@ -208,15 +202,16 @@ InternalCreateCompletionResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateCompletionResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateCompletionResponse internalCreateCompletionResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateCompletionResponse(document.RootElement); + return BinaryContent.Create(internalCreateCompletionResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateCompletionResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateCompletionResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs index b7dd5c2a4..c16c1c75b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs @@ -11,20 +11,17 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateCompletionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); - Id = id; Choices = choices.ToList(); Created = created; Model = model; } - internal InternalCreateCompletionResponse(string id, IReadOnlyList choices, DateTimeOffset created, string model, string systemFingerprint, InternalCreateCompletionResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal InternalCreateCompletionResponse(string id, IList choices, DateTimeOffset created, string model, string systemFingerprint, InternalCreateCompletionResponseObject @object, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) { Id = id; Choices = choices; @@ -33,20 +30,21 @@ internal InternalCreateCompletionResponse(string id, IReadOnlyList Choices { get; } + + public DateTimeOffset Created { get; set; } + + public string Model { get; set; } + + public string SystemFingerprint { get; set; } - public string Id { get; } - public IReadOnlyList Choices { get; } - public DateTimeOffset Created { get; } - public string Model { get; } - public string SystemFingerprint { get; } - public InternalCreateCompletionResponseObject Object { get; } = InternalCreateCompletionResponseObject.TextCompletion; + public InternalCreateCompletionResponseObject Object { get; } = "text_completion"; - public ChatTokenUsage Usage { get; } + public ChatTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index b49151000..795f84038 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -7,58 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoice : IJsonModel { + internal InternalCreateCompletionResponseChoice() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoice)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("finish_reason") != true) + writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToString()); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Logprobs != null) { - writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToString()); + writer.WritePropertyName("logprobs"u8); + writer.WriteObjectValue(Logprobs, options); } - if (SerializedAdditionalRawData?.ContainsKey("index") != true) + else { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); + writer.WriteNull("logprobs"u8); } - if (SerializedAdditionalRawData?.ContainsKey("logprobs") != true) + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - if (Logprobs != null) - { - writer.WritePropertyName("logprobs"u8); - writer.WriteObjectValue(Logprobs, options); - } - else + foreach (var item in _additionalBinaryDataProperties) { - writer.WriteNull("logprobs"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -67,25 +61,23 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } - InternalCreateCompletionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateCompletionResponseChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateCompletionResponseChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoice)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateCompletionResponseChoice(document.RootElement, options); } - internal static InternalCreateCompletionResponseChoice DeserializeInternalCreateCompletionResponseChoice(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateCompletionResponseChoice DeserializeInternalCreateCompletionResponseChoice(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -94,49 +86,47 @@ internal static InternalCreateCompletionResponseChoice DeserializeInternalCreate int index = default; InternalCreateCompletionResponseChoiceLogprobs logprobs = default; string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("finish_reason"u8)) + if (prop.NameEquals("finish_reason"u8)) { - finishReason = new InternalCreateCompletionResponseChoiceFinishReason(property.Value.GetString()); + finishReason = new InternalCreateCompletionResponseChoiceFinishReason(prop.Value.GetString()); continue; } - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("logprobs"u8)) + if (prop.NameEquals("logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { logprobs = null; continue; } - logprobs = InternalCreateCompletionResponseChoiceLogprobs.DeserializeInternalCreateCompletionResponseChoiceLogprobs(property.Value, options); + logprobs = InternalCreateCompletionResponseChoiceLogprobs.DeserializeInternalCreateCompletionResponseChoiceLogprobs(prop.Value, options); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateCompletionResponseChoice(finishReason, index, logprobs, text, serializedAdditionalRawData); + return new InternalCreateCompletionResponseChoice(finishReason, index, logprobs, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -146,15 +136,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalCreateCompletionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateCompletionResponseChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateCompletionResponseChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateCompletionResponseChoice(document.RootElement, options); } default: @@ -164,15 +155,16 @@ InternalCreateCompletionResponseChoice IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateCompletionResponseChoice FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateCompletionResponseChoice internalCreateCompletionResponseChoice) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateCompletionResponseChoice(document.RootElement); + return BinaryContent.Create(internalCreateCompletionResponseChoice, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateCompletionResponseChoice(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateCompletionResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs index 5aa7f0cca..29fe49176 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs @@ -9,33 +9,31 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoice { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponseChoiceFinishReason finishReason, int index, InternalCreateCompletionResponseChoiceLogprobs logprobs, string text) { - Argument.AssertNotNull(text, nameof(text)); - FinishReason = finishReason; Index = index; Logprobs = logprobs; Text = text; } - internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponseChoiceFinishReason finishReason, int index, InternalCreateCompletionResponseChoiceLogprobs logprobs, string text, IDictionary serializedAdditionalRawData) + internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponseChoiceFinishReason finishReason, int index, InternalCreateCompletionResponseChoiceLogprobs logprobs, string text, IDictionary additionalBinaryDataProperties) { FinishReason = finishReason; Index = index; Logprobs = logprobs; Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateCompletionResponseChoice() - { - } + public InternalCreateCompletionResponseChoiceFinishReason FinishReason { get; set; } + + public int Index { get; set; } + + public InternalCreateCompletionResponseChoiceLogprobs Logprobs { get; set; } - public InternalCreateCompletionResponseChoiceFinishReason FinishReason { get; } - public int Index { get; } - public InternalCreateCompletionResponseChoiceLogprobs Logprobs { get; } - public string Text { get; } + public string Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs index e10b1ef37..631ea53b3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.LegacyCompletions { internal readonly partial struct InternalCreateCompletionResponseChoiceFinishReason : IEquatable { private readonly string _value; + private const string StopValue = "stop"; + private const string LengthValue = "length"; + private const string ContentFilterValue = "content_filter"; public InternalCreateCompletionResponseChoiceFinishReason(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string StopValue = "stop"; - private const string LengthValue = "length"; - private const string ContentFilterValue = "content_filter"; + _value = value; + } public static InternalCreateCompletionResponseChoiceFinishReason Stop { get; } = new InternalCreateCompletionResponseChoiceFinishReason(StopValue); + public static InternalCreateCompletionResponseChoiceFinishReason Length { get; } = new InternalCreateCompletionResponseChoiceFinishReason(LengthValue); + public static InternalCreateCompletionResponseChoiceFinishReason ContentFilter { get; } = new InternalCreateCompletionResponseChoiceFinishReason(ContentFilterValue); + public static bool operator ==(InternalCreateCompletionResponseChoiceFinishReason left, InternalCreateCompletionResponseChoiceFinishReason right) => left.Equals(right); + public static bool operator !=(InternalCreateCompletionResponseChoiceFinishReason left, InternalCreateCompletionResponseChoiceFinishReason right) => !left.Equals(right); + public static implicit operator InternalCreateCompletionResponseChoiceFinishReason(string value) => new InternalCreateCompletionResponseChoiceFinishReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateCompletionResponseChoiceFinishReason other && Equals(other); + public bool Equals(InternalCreateCompletionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index 9117d8366..9cfcf0ddc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.LegacyCompletions { @@ -14,14 +15,19 @@ internal partial class InternalCreateCompletionResponseChoiceLogprobs : IJsonMod { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text_offset") != true && Optional.IsCollectionDefined(TextOffset)) + if (Optional.IsCollectionDefined(TextOffset)) { writer.WritePropertyName("text_offset"u8); writer.WriteStartArray(); @@ -31,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("token_logprobs") != true && Optional.IsCollectionDefined(TokenLogprobs)) + if (Optional.IsCollectionDefined(TokenLogprobs)) { writer.WritePropertyName("token_logprobs"u8); writer.WriteStartArray(); @@ -41,17 +47,22 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tokens") != true && Optional.IsCollectionDefined(Tokens)) + if (Optional.IsCollectionDefined(Tokens)) { writer.WritePropertyName("tokens"u8); writer.WriteStartArray(); foreach (var item in Tokens) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("top_logprobs") != true && Optional.IsCollectionDefined(TopLogprobs)) + if (Optional.IsCollectionDefined(TopLogprobs)) { writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); @@ -72,17 +83,13 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -91,87 +98,91 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } - InternalCreateCompletionResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateCompletionResponseChoiceLogprobs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateCompletionResponseChoiceLogprobs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoiceLogprobs)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateCompletionResponseChoiceLogprobs(document.RootElement, options); } - internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeInternalCreateCompletionResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeInternalCreateCompletionResponseChoiceLogprobs(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList textOffset = default; - IReadOnlyList tokenLogprobs = default; - IReadOnlyList tokens = default; - IReadOnlyList> topLogprobs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList textOffset = default; + IList tokenLogprobs = default; + IList tokens = default; + IList> topLogprobs = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("text_offset"u8)) + if (prop.NameEquals("text_offset"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(item.GetInt32()); } textOffset = array; continue; } - if (property.NameEquals("token_logprobs"u8)) + if (prop.NameEquals("token_logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(item.GetSingle()); } tokenLogprobs = array; continue; } - if (property.NameEquals("tokens"u8)) + if (prop.NameEquals("tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } tokens = array; continue; } - if (property.NameEquals("top_logprobs"u8)) + if (prop.NameEquals("top_logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List> array = new List>(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { @@ -180,9 +191,9 @@ internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeIntern else { Dictionary dictionary = new Dictionary(); - foreach (var property0 in item.EnumerateObject()) + foreach (var prop0 in item.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetSingle()); + dictionary.Add(prop0.Name, prop0.Value.GetSingle()); } array.Add(dictionary); } @@ -190,20 +201,19 @@ internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeIntern topLogprobs = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateCompletionResponseChoiceLogprobs(textOffset ?? new ChangeTrackingList(), tokenLogprobs ?? new ChangeTrackingList(), tokens ?? new ChangeTrackingList(), topLogprobs ?? new ChangeTrackingList>(), serializedAdditionalRawData); + return new InternalCreateCompletionResponseChoiceLogprobs(textOffset ?? new ChangeTrackingList(), tokenLogprobs ?? new ChangeTrackingList(), tokens ?? new ChangeTrackingList(), topLogprobs ?? new ChangeTrackingList>(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -213,15 +223,16 @@ BinaryData IPersistableModel.Wri } } - InternalCreateCompletionResponseChoiceLogprobs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateCompletionResponseChoiceLogprobs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateCompletionResponseChoiceLogprobs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateCompletionResponseChoiceLogprobs(document.RootElement, options); } default: @@ -231,15 +242,16 @@ InternalCreateCompletionResponseChoiceLogprobs IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateCompletionResponseChoiceLogprobs FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateCompletionResponseChoiceLogprobs internalCreateCompletionResponseChoiceLogprobs) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateCompletionResponseChoiceLogprobs(document.RootElement); + return BinaryContent.Create(internalCreateCompletionResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateCompletionResponseChoiceLogprobs(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateCompletionResponseChoiceLogprobs(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs index 6f5de82a3..1282ec28b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoiceLogprobs { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateCompletionResponseChoiceLogprobs() { TextOffset = new ChangeTrackingList(); @@ -18,18 +20,21 @@ internal InternalCreateCompletionResponseChoiceLogprobs() TopLogprobs = new ChangeTrackingList>(); } - internal InternalCreateCompletionResponseChoiceLogprobs(IReadOnlyList textOffset, IReadOnlyList tokenLogprobs, IReadOnlyList tokens, IReadOnlyList> topLogprobs, IDictionary serializedAdditionalRawData) + internal InternalCreateCompletionResponseChoiceLogprobs(IList textOffset, IList tokenLogprobs, IList tokens, IList> topLogprobs, IDictionary additionalBinaryDataProperties) { TextOffset = textOffset; TokenLogprobs = tokenLogprobs; Tokens = tokens; TopLogprobs = topLogprobs; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList TextOffset { get; } - public IReadOnlyList TokenLogprobs { get; } - public IReadOnlyList Tokens { get; } - public IReadOnlyList> TopLogprobs { get; } + public IList TextOffset { get; } + + public IList TokenLogprobs { get; } + + public IList Tokens { get; } + + public IList> TopLogprobs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs index 8dfbd3475..4a11f0080 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.LegacyCompletions { internal readonly partial struct InternalCreateCompletionResponseObject : IEquatable { private readonly string _value; + private const string TextCompletionValue = "text_completion"; public InternalCreateCompletionResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextCompletionValue = "text_completion"; + _value = value; + } public static InternalCreateCompletionResponseObject TextCompletion { get; } = new InternalCreateCompletionResponseObject(TextCompletionValue); + public static bool operator ==(InternalCreateCompletionResponseObject left, InternalCreateCompletionResponseObject right) => left.Equals(right); + public static bool operator !=(InternalCreateCompletionResponseObject left, InternalCreateCompletionResponseObject right) => !left.Equals(right); + public static implicit operator InternalCreateCompletionResponseObject(string value) => new InternalCreateCompletionResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateCompletionResponseObject other && Equals(other); + public bool Equals(InternalCreateCompletionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs index 6f59eb8e5..3f66210c6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Embeddings { internal readonly partial struct InternalCreateEmbeddingRequestEncodingFormat : IEquatable { private readonly string _value; + private const string FloatValue = "float"; + private const string Base64Value = "base64"; public InternalCreateEmbeddingRequestEncodingFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FloatValue = "float"; - private const string Base64Value = "base64"; + _value = value; + } public static InternalCreateEmbeddingRequestEncodingFormat Float { get; } = new InternalCreateEmbeddingRequestEncodingFormat(FloatValue); + public static InternalCreateEmbeddingRequestEncodingFormat Base64 { get; } = new InternalCreateEmbeddingRequestEncodingFormat(Base64Value); + public static bool operator ==(InternalCreateEmbeddingRequestEncodingFormat left, InternalCreateEmbeddingRequestEncodingFormat right) => left.Equals(right); + public static bool operator !=(InternalCreateEmbeddingRequestEncodingFormat left, InternalCreateEmbeddingRequestEncodingFormat right) => !left.Equals(right); + public static implicit operator InternalCreateEmbeddingRequestEncodingFormat(string value) => new InternalCreateEmbeddingRequestEncodingFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateEmbeddingRequestEncodingFormat other && Equals(other); + public bool Equals(InternalCreateEmbeddingRequestEncodingFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs index 98fa114a0..45ca31a3a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Embeddings { internal readonly partial struct InternalCreateEmbeddingRequestModel : IEquatable { private readonly string _value; + private const string TextEmbeddingAda002Value = "text-embedding-ada-002"; + private const string TextEmbedding3SmallValue = "text-embedding-3-small"; + private const string TextEmbedding3LargeValue = "text-embedding-3-large"; public InternalCreateEmbeddingRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextEmbeddingAda002Value = "text-embedding-ada-002"; - private const string TextEmbedding3SmallValue = "text-embedding-3-small"; - private const string TextEmbedding3LargeValue = "text-embedding-3-large"; + _value = value; + } public static InternalCreateEmbeddingRequestModel TextEmbeddingAda002 { get; } = new InternalCreateEmbeddingRequestModel(TextEmbeddingAda002Value); + public static InternalCreateEmbeddingRequestModel TextEmbedding3Small { get; } = new InternalCreateEmbeddingRequestModel(TextEmbedding3SmallValue); + public static InternalCreateEmbeddingRequestModel TextEmbedding3Large { get; } = new InternalCreateEmbeddingRequestModel(TextEmbedding3LargeValue); + public static bool operator ==(InternalCreateEmbeddingRequestModel left, InternalCreateEmbeddingRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateEmbeddingRequestModel left, InternalCreateEmbeddingRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateEmbeddingRequestModel(string value) => new InternalCreateEmbeddingRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateEmbeddingRequestModel other && Equals(other); + public bool Equals(InternalCreateEmbeddingRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs index dc8b38632..d491df820 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Embeddings { internal readonly partial struct InternalCreateEmbeddingResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalCreateEmbeddingResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalCreateEmbeddingResponseObject List { get; } = new InternalCreateEmbeddingResponseObject(ListValue); + public static bool operator ==(InternalCreateEmbeddingResponseObject left, InternalCreateEmbeddingResponseObject right) => left.Equals(right); + public static bool operator !=(InternalCreateEmbeddingResponseObject left, InternalCreateEmbeddingResponseObject right) => !left.Equals(right); + public static implicit operator InternalCreateEmbeddingResponseObject(string value) => new InternalCreateEmbeddingResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateEmbeddingResponseObject other && Equals(other); + public bool Equals(InternalCreateEmbeddingResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs index e85d5c334..ec23f2729 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalCreateFineTuningJobRequestModel : IEquatable { private readonly string _value; - - public InternalCreateFineTuningJobRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string Babbage002Value = "babbage-002"; private const string Davinci002Value = "davinci-002"; private const string Gpt35TurboValue = "gpt-3.5-turbo"; private const string Gpt4oMiniValue = "gpt-4o-mini"; + public InternalCreateFineTuningJobRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateFineTuningJobRequestModel Babbage002 { get; } = new InternalCreateFineTuningJobRequestModel(Babbage002Value); + public static InternalCreateFineTuningJobRequestModel Davinci002 { get; } = new InternalCreateFineTuningJobRequestModel(Davinci002Value); + public static InternalCreateFineTuningJobRequestModel Gpt35Turbo { get; } = new InternalCreateFineTuningJobRequestModel(Gpt35TurboValue); + public static InternalCreateFineTuningJobRequestModel Gpt4oMini { get; } = new InternalCreateFineTuningJobRequestModel(Gpt4oMiniValue); + public static bool operator ==(InternalCreateFineTuningJobRequestModel left, InternalCreateFineTuningJobRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateFineTuningJobRequestModel left, InternalCreateFineTuningJobRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateFineTuningJobRequestModel(string value) => new InternalCreateFineTuningJobRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateFineTuningJobRequestModel other && Equals(other); + public bool Equals(InternalCreateFineTuningJobRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index b17e11cfb..de75f193c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -7,26 +7,33 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalCreateFineTuningJobRequestWandbIntegrationWandb : IJsonModel { + internal InternalCreateFineTuningJobRequestWandbIntegrationWandb() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateFineTuningJobRequestWandbIntegrationWandb)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("project") != true) - { - writer.WritePropertyName("project"u8); - writer.WriteStringValue(Project); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + writer.WritePropertyName("project"u8); + writer.WriteStringValue(Project); + if (Optional.IsDefined(Name)) { if (Name != null) { @@ -35,10 +42,10 @@ void IJsonModel.Write(U } else { - writer.WriteNull("name"); + writer.WriteNull("name"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("entity") != true && Optional.IsDefined(Entity)) + if (Optional.IsDefined(Entity)) { if (Entity != null) { @@ -47,30 +54,31 @@ void IJsonModel.Write(U } else { - writer.WriteNull("entity"); + writer.WriteNull("entity"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tags") != true && Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); foreach (var item in Tags) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -79,25 +87,23 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } - InternalCreateFineTuningJobRequestWandbIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateFineTuningJobRequestWandbIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateFineTuningJobRequestWandbIntegrationWandb JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateFineTuningJobRequestWandbIntegrationWandb)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(document.RootElement, options); } - internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -106,63 +112,68 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial string name = default; string entity = default; IList tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("project"u8)) + if (prop.NameEquals("project"u8)) { - project = property.Value.GetString(); + project = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("entity"u8)) + if (prop.NameEquals("entity"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { entity = null; continue; } - entity = property.Value.GetString(); + entity = prop.Value.GetString(); continue; } - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } tags = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateFineTuningJobRequestWandbIntegrationWandb(project, name, entity, tags ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalCreateFineTuningJobRequestWandbIntegrationWandb(project, name, entity, tags ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -172,15 +183,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateFineTuningJobRequestWandbIntegrationWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateFineTuningJobRequestWandbIntegrationWandb PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(document.RootElement, options); } default: @@ -190,15 +202,16 @@ InternalCreateFineTuningJobRequestWandbIntegrationWandb IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateFineTuningJobRequestWandbIntegrationWandb internalCreateFineTuningJobRequestWandbIntegrationWandb) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(document.RootElement); + return BinaryContent.Create(internalCreateFineTuningJobRequestWandbIntegrationWandb, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateFineTuningJobRequestWandbIntegrationWandb(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs index bd389026b..e00c5d6a4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalCreateFineTuningJobRequestWandbIntegrationWandb { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project) { Argument.AssertNotNull(project, nameof(project)); @@ -18,20 +20,19 @@ public InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project) Tags = new ChangeTrackingList(); } - internal InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project, string name, string entity, IList tags, IDictionary serializedAdditionalRawData) + internal InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project, string name, string entity, IList tags, IDictionary additionalBinaryDataProperties) { Project = project; Name = name; Entity = entity; Tags = tags; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateFineTuningJobRequestWandbIntegrationWandb() - { - } public string Name { get; set; } + public string Entity { get; set; } + public IList Tags { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs index c1ae8ba57..d525a4774 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageEditRequestModel : IEquatable { private readonly string _value; + private const string DallE2Value = "dall-e-2"; public InternalCreateImageEditRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DallE2Value = "dall-e-2"; + _value = value; + } public static InternalCreateImageEditRequestModel DallE2 { get; } = new InternalCreateImageEditRequestModel(DallE2Value); + public static bool operator ==(InternalCreateImageEditRequestModel left, InternalCreateImageEditRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateImageEditRequestModel left, InternalCreateImageEditRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateImageEditRequestModel(string value) => new InternalCreateImageEditRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageEditRequestModel other && Equals(other); + public bool Equals(InternalCreateImageEditRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs index 7da85fee8..db5b5e155 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageEditRequestResponseFormat : IEquatable { private readonly string _value; + private const string UrlValue = "url"; + private const string B64JsonValue = "b64_json"; public InternalCreateImageEditRequestResponseFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UrlValue = "url"; - private const string B64JsonValue = "b64_json"; + _value = value; + } public static InternalCreateImageEditRequestResponseFormat Url { get; } = new InternalCreateImageEditRequestResponseFormat(UrlValue); + public static InternalCreateImageEditRequestResponseFormat B64Json { get; } = new InternalCreateImageEditRequestResponseFormat(B64JsonValue); + public static bool operator ==(InternalCreateImageEditRequestResponseFormat left, InternalCreateImageEditRequestResponseFormat right) => left.Equals(right); + public static bool operator !=(InternalCreateImageEditRequestResponseFormat left, InternalCreateImageEditRequestResponseFormat right) => !left.Equals(right); + public static implicit operator InternalCreateImageEditRequestResponseFormat(string value) => new InternalCreateImageEditRequestResponseFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageEditRequestResponseFormat other && Equals(other); + public bool Equals(InternalCreateImageEditRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs index 122d3fc3b..af074d4dd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageEditRequestSize : IEquatable { private readonly string _value; + private const string _256x256Value = "256x256"; + private const string _512x512Value = "512x512"; + private const string _1024x1024Value = "1024x1024"; public InternalCreateImageEditRequestSize(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string _256x256Value = "256x256"; - private const string _512x512Value = "512x512"; - private const string _1024x1024Value = "1024x1024"; + _value = value; + } public static InternalCreateImageEditRequestSize _256x256 { get; } = new InternalCreateImageEditRequestSize(_256x256Value); + public static InternalCreateImageEditRequestSize _512x512 { get; } = new InternalCreateImageEditRequestSize(_512x512Value); + public static InternalCreateImageEditRequestSize _1024x1024 { get; } = new InternalCreateImageEditRequestSize(_1024x1024Value); + public static bool operator ==(InternalCreateImageEditRequestSize left, InternalCreateImageEditRequestSize right) => left.Equals(right); + public static bool operator !=(InternalCreateImageEditRequestSize left, InternalCreateImageEditRequestSize right) => !left.Equals(right); + public static implicit operator InternalCreateImageEditRequestSize(string value) => new InternalCreateImageEditRequestSize(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageEditRequestSize other && Equals(other); + public bool Equals(InternalCreateImageEditRequestSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs index a43ec9fc4..884549d94 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageRequestModel : IEquatable { private readonly string _value; + private const string DallE2Value = "dall-e-2"; + private const string DallE3Value = "dall-e-3"; public InternalCreateImageRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DallE2Value = "dall-e-2"; - private const string DallE3Value = "dall-e-3"; + _value = value; + } public static InternalCreateImageRequestModel DallE2 { get; } = new InternalCreateImageRequestModel(DallE2Value); + public static InternalCreateImageRequestModel DallE3 { get; } = new InternalCreateImageRequestModel(DallE3Value); + public static bool operator ==(InternalCreateImageRequestModel left, InternalCreateImageRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateImageRequestModel left, InternalCreateImageRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateImageRequestModel(string value) => new InternalCreateImageRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageRequestModel other && Equals(other); + public bool Equals(InternalCreateImageRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs index 2f57438b8..a98754d90 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageVariationRequestModel : IEquatable { private readonly string _value; + private const string DallE2Value = "dall-e-2"; public InternalCreateImageVariationRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DallE2Value = "dall-e-2"; + _value = value; + } public static InternalCreateImageVariationRequestModel DallE2 { get; } = new InternalCreateImageVariationRequestModel(DallE2Value); + public static bool operator ==(InternalCreateImageVariationRequestModel left, InternalCreateImageVariationRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateImageVariationRequestModel left, InternalCreateImageVariationRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateImageVariationRequestModel(string value) => new InternalCreateImageVariationRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageVariationRequestModel other && Equals(other); + public bool Equals(InternalCreateImageVariationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs index bb1ed33e1..ca4d4db97 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageVariationRequestResponseFormat : IEquatable { private readonly string _value; + private const string UrlValue = "url"; + private const string B64JsonValue = "b64_json"; public InternalCreateImageVariationRequestResponseFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UrlValue = "url"; - private const string B64JsonValue = "b64_json"; + _value = value; + } public static InternalCreateImageVariationRequestResponseFormat Url { get; } = new InternalCreateImageVariationRequestResponseFormat(UrlValue); + public static InternalCreateImageVariationRequestResponseFormat B64Json { get; } = new InternalCreateImageVariationRequestResponseFormat(B64JsonValue); + public static bool operator ==(InternalCreateImageVariationRequestResponseFormat left, InternalCreateImageVariationRequestResponseFormat right) => left.Equals(right); + public static bool operator !=(InternalCreateImageVariationRequestResponseFormat left, InternalCreateImageVariationRequestResponseFormat right) => !left.Equals(right); + public static implicit operator InternalCreateImageVariationRequestResponseFormat(string value) => new InternalCreateImageVariationRequestResponseFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageVariationRequestResponseFormat other && Equals(other); + public bool Equals(InternalCreateImageVariationRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs index 8a60593b0..d42f50031 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { internal readonly partial struct InternalCreateImageVariationRequestSize : IEquatable { private readonly string _value; + private const string _256x256Value = "256x256"; + private const string _512x512Value = "512x512"; + private const string _1024x1024Value = "1024x1024"; public InternalCreateImageVariationRequestSize(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string _256x256Value = "256x256"; - private const string _512x512Value = "512x512"; - private const string _1024x1024Value = "1024x1024"; + _value = value; + } public static InternalCreateImageVariationRequestSize _256x256 { get; } = new InternalCreateImageVariationRequestSize(_256x256Value); + public static InternalCreateImageVariationRequestSize _512x512 { get; } = new InternalCreateImageVariationRequestSize(_512x512Value); + public static InternalCreateImageVariationRequestSize _1024x1024 { get; } = new InternalCreateImageVariationRequestSize(_1024x1024Value); + public static bool operator ==(InternalCreateImageVariationRequestSize left, InternalCreateImageVariationRequestSize right) => left.Equals(right); + public static bool operator !=(InternalCreateImageVariationRequestSize left, InternalCreateImageVariationRequestSize right) => !left.Equals(right); + public static implicit operator InternalCreateImageVariationRequestSize(string value) => new InternalCreateImageVariationRequestSize(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateImageVariationRequestSize other && Equals(other); + public bool Equals(InternalCreateImageVariationRequestSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs index f58696815..7d8688cf4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Moderations { internal readonly partial struct InternalCreateModerationRequestModel : IEquatable { private readonly string _value; + private const string TextModerationLatestValue = "text-moderation-latest"; + private const string TextModerationStableValue = "text-moderation-stable"; public InternalCreateModerationRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextModerationLatestValue = "text-moderation-latest"; - private const string TextModerationStableValue = "text-moderation-stable"; + _value = value; + } public static InternalCreateModerationRequestModel TextModerationLatest { get; } = new InternalCreateModerationRequestModel(TextModerationLatestValue); + public static InternalCreateModerationRequestModel TextModerationStable { get; } = new InternalCreateModerationRequestModel(TextModerationStableValue); + public static bool operator ==(InternalCreateModerationRequestModel left, InternalCreateModerationRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateModerationRequestModel left, InternalCreateModerationRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateModerationRequestModel(string value) => new InternalCreateModerationRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateModerationRequestModel other && Equals(other); + public bool Equals(InternalCreateModerationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs index 27b73a31b..032128f6a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalCreateRunRequestModel : IEquatable { private readonly string _value; - - public InternalCreateRunRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string Gpt4oValue = "gpt-4o"; private const string Gpt4o20240806Value = "gpt-4o-2024-08-06"; private const string Gpt4o20240513Value = "gpt-4o-2024-05-13"; @@ -40,39 +35,72 @@ public InternalCreateRunRequestModel(string value) private const string Gpt35Turbo0125Value = "gpt-3.5-turbo-0125"; private const string Gpt35Turbo16k0613Value = "gpt-3.5-turbo-16k-0613"; + public InternalCreateRunRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateRunRequestModel Gpt4o { get; } = new InternalCreateRunRequestModel(Gpt4oValue); + public static InternalCreateRunRequestModel Gpt4o20240806 { get; } = new InternalCreateRunRequestModel(Gpt4o20240806Value); + public static InternalCreateRunRequestModel Gpt4o20240513 { get; } = new InternalCreateRunRequestModel(Gpt4o20240513Value); + public static InternalCreateRunRequestModel Gpt4oMini { get; } = new InternalCreateRunRequestModel(Gpt4oMiniValue); + public static InternalCreateRunRequestModel Gpt4oMini20240718 { get; } = new InternalCreateRunRequestModel(Gpt4oMini20240718Value); + public static InternalCreateRunRequestModel Gpt4Turbo { get; } = new InternalCreateRunRequestModel(Gpt4TurboValue); + public static InternalCreateRunRequestModel Gpt4Turbo20240409 { get; } = new InternalCreateRunRequestModel(Gpt4Turbo20240409Value); + public static InternalCreateRunRequestModel Gpt40125Preview { get; } = new InternalCreateRunRequestModel(Gpt40125PreviewValue); + public static InternalCreateRunRequestModel Gpt4TurboPreview { get; } = new InternalCreateRunRequestModel(Gpt4TurboPreviewValue); + public static InternalCreateRunRequestModel Gpt41106Preview { get; } = new InternalCreateRunRequestModel(Gpt41106PreviewValue); + public static InternalCreateRunRequestModel Gpt4VisionPreview { get; } = new InternalCreateRunRequestModel(Gpt4VisionPreviewValue); + public static InternalCreateRunRequestModel Gpt4 { get; } = new InternalCreateRunRequestModel(Gpt4Value); + public static InternalCreateRunRequestModel Gpt40314 { get; } = new InternalCreateRunRequestModel(Gpt40314Value); + public static InternalCreateRunRequestModel Gpt40613 { get; } = new InternalCreateRunRequestModel(Gpt40613Value); + public static InternalCreateRunRequestModel Gpt432k { get; } = new InternalCreateRunRequestModel(Gpt432kValue); + public static InternalCreateRunRequestModel Gpt432k0314 { get; } = new InternalCreateRunRequestModel(Gpt432k0314Value); + public static InternalCreateRunRequestModel Gpt432k0613 { get; } = new InternalCreateRunRequestModel(Gpt432k0613Value); + public static InternalCreateRunRequestModel Gpt35Turbo { get; } = new InternalCreateRunRequestModel(Gpt35TurboValue); + public static InternalCreateRunRequestModel Gpt35Turbo16k { get; } = new InternalCreateRunRequestModel(Gpt35Turbo16kValue); + public static InternalCreateRunRequestModel Gpt35Turbo0613 { get; } = new InternalCreateRunRequestModel(Gpt35Turbo0613Value); + public static InternalCreateRunRequestModel Gpt35Turbo1106 { get; } = new InternalCreateRunRequestModel(Gpt35Turbo1106Value); + public static InternalCreateRunRequestModel Gpt35Turbo0125 { get; } = new InternalCreateRunRequestModel(Gpt35Turbo0125Value); + public static InternalCreateRunRequestModel Gpt35Turbo16k0613 { get; } = new InternalCreateRunRequestModel(Gpt35Turbo16k0613Value); + public static bool operator ==(InternalCreateRunRequestModel left, InternalCreateRunRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateRunRequestModel left, InternalCreateRunRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateRunRequestModel(string value) => new InternalCreateRunRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateRunRequestModel other && Equals(other); + public bool Equals(InternalCreateRunRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs index 795344fd1..ef13537c2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateSpeechRequestModel : IEquatable { private readonly string _value; + private const string Tts1Value = "tts-1"; + private const string Tts1HdValue = "tts-1-hd"; public InternalCreateSpeechRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string Tts1Value = "tts-1"; - private const string Tts1HdValue = "tts-1-hd"; + _value = value; + } public static InternalCreateSpeechRequestModel Tts1 { get; } = new InternalCreateSpeechRequestModel(Tts1Value); + public static InternalCreateSpeechRequestModel Tts1Hd { get; } = new InternalCreateSpeechRequestModel(Tts1HdValue); + public static bool operator ==(InternalCreateSpeechRequestModel left, InternalCreateSpeechRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateSpeechRequestModel left, InternalCreateSpeechRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateSpeechRequestModel(string value) => new InternalCreateSpeechRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateSpeechRequestModel other && Equals(other); + public bool Equals(InternalCreateSpeechRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 20185da5d..ea4404bcf 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -7,43 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequest : IJsonModel { + internal InternalCreateThreadAndRunRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) - { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - } - if (SerializedAdditionalRawData?.ContainsKey("thread") != true && Optional.IsDefined(Thread)) + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + if (Optional.IsDefined(Thread)) { writer.WritePropertyName("thread"u8); writer.WriteObjectValue(Thread, options); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) + if (Optional.IsDefined(Model)) { if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteStringValue(Model.Value.ToString()); } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions)) { if (Instructions != null) { @@ -52,10 +59,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("instructions"); + writer.WriteNull("instructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools)) { if (Tools != null) { @@ -69,22 +76,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tools"); + writer.WriteNull("tools"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -93,16 +100,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -111,10 +123,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP)) { if (TopP != null) { @@ -123,10 +135,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream)) { if (Stream != null) { @@ -135,10 +147,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("stream"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_prompt_tokens") != true && Optional.IsDefined(MaxPromptTokens)) + if (Optional.IsDefined(MaxPromptTokens)) { if (MaxPromptTokens != null) { @@ -147,10 +159,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("max_prompt_tokens"); + writer.WriteNull("maxPromptTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true && Optional.IsDefined(MaxCompletionTokens)) + if (Optional.IsDefined(MaxCompletionTokens)) { if (MaxCompletionTokens != null) { @@ -159,10 +171,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("max_completion_tokens"); + writer.WriteNull("maxCompletionTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("truncation_strategy") != true && Optional.IsDefined(TruncationStrategy)) + if (Optional.IsDefined(TruncationStrategy)) { if (TruncationStrategy != null) { @@ -171,49 +183,59 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("truncation_strategy"); + writer.WriteNull("truncationStrategy"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice)) { if (ToolChoice != null) { writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolChoice, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("tool_choice"); + writer.WriteNull("toolChoice"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(ParallelToolCalls)) + if (Optional.IsDefined(ParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -222,35 +244,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - InternalCreateThreadAndRunRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadAndRunRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadAndRunRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadAndRunRequest(document.RootElement, options); } - internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThreadAndRunRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThreadAndRunRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string assistantId = default; ThreadCreationOptions thread = default; - string model = default; + InternalCreateThreadAndRunRequestModel? model = default; string instructions = default; IList tools = default; - ToolResources toolResources = default; + InternalCreateThreadAndRunRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; float? topP = default; @@ -258,181 +278,187 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea int? maxPromptTokens = default; int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - ToolConstraint toolChoice = default; + BinaryData toolChoice = default; bool? parallelToolCalls = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("thread"u8)) + if (prop.NameEquals("thread"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + thread = null; continue; } - thread = ThreadCreationOptions.DeserializeThreadCreationOptions(property.Value, options); + thread = ThreadCreationOptions.DeserializeThreadCreationOptions(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { model = null; continue; } - model = property.Value.GetString(); + model = new InternalCreateThreadAndRunRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { instructions = null; continue; } - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalCreateThreadAndRunRequestToolResources.DeserializeInternalCreateThreadAndRunRequestToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stream = null; continue; } - stream = property.Value.GetBoolean(); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("max_prompt_tokens"u8)) + if (prop.NameEquals("max_prompt_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxPromptTokens = null; continue; } - maxPromptTokens = property.Value.GetInt32(); + maxPromptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxCompletionTokens = null; continue; } - maxCompletionTokens = property.Value.GetInt32(); + maxCompletionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("truncation_strategy"u8)) + if (prop.NameEquals("truncation_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { truncationStrategy = null; continue; } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(property.Value, options); + truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolChoice = null; continue; } - toolChoice = ToolConstraint.DeserializeToolConstraint(property.Value, options); + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parallelToolCalls = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalCreateThreadAndRunRequest( assistantId, thread, @@ -450,13 +476,14 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea toolChoice, parallelToolCalls, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -466,15 +493,16 @@ BinaryData IPersistableModel.Write(ModelReade } } - InternalCreateThreadAndRunRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadAndRunRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadAndRunRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadAndRunRequest(document.RootElement, options); } default: @@ -484,15 +512,16 @@ InternalCreateThreadAndRunRequest IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadAndRunRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadAndRunRequest internalCreateThreadAndRunRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadAndRunRequest(document.RootElement); + return BinaryContent.Create(internalCreateThreadAndRunRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadAndRunRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadAndRunRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index 5e50cf643..b110bb6b3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadAndRunRequest(string assistantId) { Argument.AssertNotNull(assistantId, nameof(assistantId)); @@ -19,7 +21,7 @@ public InternalCreateThreadAndRunRequest(string assistantId) Metadata = new ChangeTrackingDictionary(); } - internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, ToolConstraint toolChoice, bool? parallelToolCalls, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, InternalCreateThreadAndRunRequestModel? model, string instructions, IList tools, InternalCreateThreadAndRunRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool? parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Thread = thread; @@ -37,24 +39,31 @@ internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOpt ToolChoice = toolChoice; ParallelToolCalls = parallelToolCalls; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateThreadAndRunRequest() - { - } + public string AssistantId { get; set; } - public string AssistantId { get; } public ThreadCreationOptions Thread { get; set; } + public string Instructions { get; set; } + public IList Tools { get; set; } + public IDictionary Metadata { get; set; } + public float? Temperature { get; set; } + public float? TopP { get; set; } + public bool? Stream { get; set; } + public int? MaxPromptTokens { get; set; } + public int? MaxCompletionTokens { get; set; } + public RunTruncationStrategy TruncationStrategy { get; set; } + public bool? ParallelToolCalls { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs index 04d84a623..842f6fa7f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalCreateThreadAndRunRequestModel : IEquatable { private readonly string _value; - - public InternalCreateThreadAndRunRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string Gpt4oValue = "gpt-4o"; private const string Gpt4o20240806Value = "gpt-4o-2024-08-06"; private const string Gpt4o20240513Value = "gpt-4o-2024-05-13"; @@ -40,39 +35,72 @@ public InternalCreateThreadAndRunRequestModel(string value) private const string Gpt35Turbo0125Value = "gpt-3.5-turbo-0125"; private const string Gpt35Turbo16k0613Value = "gpt-3.5-turbo-16k-0613"; + public InternalCreateThreadAndRunRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateThreadAndRunRequestModel Gpt4o { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4oValue); + public static InternalCreateThreadAndRunRequestModel Gpt4o20240806 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4o20240806Value); + public static InternalCreateThreadAndRunRequestModel Gpt4o20240513 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4o20240513Value); + public static InternalCreateThreadAndRunRequestModel Gpt4oMini { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4oMiniValue); + public static InternalCreateThreadAndRunRequestModel Gpt4oMini20240718 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4oMini20240718Value); + public static InternalCreateThreadAndRunRequestModel Gpt4Turbo { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4TurboValue); + public static InternalCreateThreadAndRunRequestModel Gpt4Turbo20240409 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4Turbo20240409Value); + public static InternalCreateThreadAndRunRequestModel Gpt40125Preview { get; } = new InternalCreateThreadAndRunRequestModel(Gpt40125PreviewValue); + public static InternalCreateThreadAndRunRequestModel Gpt4TurboPreview { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4TurboPreviewValue); + public static InternalCreateThreadAndRunRequestModel Gpt41106Preview { get; } = new InternalCreateThreadAndRunRequestModel(Gpt41106PreviewValue); + public static InternalCreateThreadAndRunRequestModel Gpt4VisionPreview { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4VisionPreviewValue); + public static InternalCreateThreadAndRunRequestModel Gpt4 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt4Value); + public static InternalCreateThreadAndRunRequestModel Gpt40314 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt40314Value); + public static InternalCreateThreadAndRunRequestModel Gpt40613 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt40613Value); + public static InternalCreateThreadAndRunRequestModel Gpt432k { get; } = new InternalCreateThreadAndRunRequestModel(Gpt432kValue); + public static InternalCreateThreadAndRunRequestModel Gpt432k0314 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt432k0314Value); + public static InternalCreateThreadAndRunRequestModel Gpt432k0613 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt432k0613Value); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35TurboValue); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo16k { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35Turbo16kValue); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo0613 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35Turbo0613Value); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo1106 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35Turbo1106Value); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo0125 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35Turbo0125Value); + public static InternalCreateThreadAndRunRequestModel Gpt35Turbo16k0613 { get; } = new InternalCreateThreadAndRunRequestModel(Gpt35Turbo16k0613Value); + public static bool operator ==(InternalCreateThreadAndRunRequestModel left, InternalCreateThreadAndRunRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateThreadAndRunRequestModel left, InternalCreateThreadAndRunRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateThreadAndRunRequestModel(string value) => new InternalCreateThreadAndRunRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateThreadAndRunRequestModel other && Equals(other); + public bool Equals(InternalCreateThreadAndRunRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs index 45a467b3c..3d87e1ecc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalCreateThreadAndRunRequestToolChoice : IEquatable { private readonly string _value; + private const string NoneValue = "none"; + private const string AutoValue = "auto"; + private const string RequiredValue = "required"; public InternalCreateThreadAndRunRequestToolChoice(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string NoneValue = "none"; - private const string AutoValue = "auto"; - private const string RequiredValue = "required"; + _value = value; + } public static InternalCreateThreadAndRunRequestToolChoice None { get; } = new InternalCreateThreadAndRunRequestToolChoice(NoneValue); + public static InternalCreateThreadAndRunRequestToolChoice Auto { get; } = new InternalCreateThreadAndRunRequestToolChoice(AutoValue); + public static InternalCreateThreadAndRunRequestToolChoice Required { get; } = new InternalCreateThreadAndRunRequestToolChoice(RequiredValue); + public static bool operator ==(InternalCreateThreadAndRunRequestToolChoice left, InternalCreateThreadAndRunRequestToolChoice right) => left.Equals(right); + public static bool operator !=(InternalCreateThreadAndRunRequestToolChoice left, InternalCreateThreadAndRunRequestToolChoice right) => !left.Equals(right); + public static implicit operator InternalCreateThreadAndRunRequestToolChoice(string value) => new InternalCreateThreadAndRunRequestToolChoice(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateThreadAndRunRequestToolChoice other && Equals(other); + public bool Equals(InternalCreateThreadAndRunRequestToolChoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs index aff6e9e50..1922a5839 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalCreateThreadAndRunRequestToolResources : IJsonMod { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } - InternalCreateThreadAndRunRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadAndRunRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadAndRunRequestToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadAndRunRequestToolResources(document.RootElement, options); } - internal static InternalCreateThreadAndRunRequestToolResources DeserializeInternalCreateThreadAndRunRequestToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadAndRunRequestToolResources DeserializeInternalCreateThreadAndRunRequestToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter codeInterpreter = default; InternalToolResourcesFileSearchIdsOnly fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(property.Value, options); + fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateThreadAndRunRequestToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalCreateThreadAndRunRequestToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Wri } } - InternalCreateThreadAndRunRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadAndRunRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadAndRunRequestToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadAndRunRequestToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalCreateThreadAndRunRequestToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadAndRunRequestToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadAndRunRequestToolResources internalCreateThreadAndRunRequestToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadAndRunRequestToolResources(document.RootElement); + return BinaryContent.Create(internalCreateThreadAndRunRequestToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadAndRunRequestToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadAndRunRequestToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs index a07a484a3..7eb24acf9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadAndRunRequestToolResources() { } - internal InternalCreateThreadAndRunRequestToolResources(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary serializedAdditionalRawData) + internal InternalCreateThreadAndRunRequestToolResources(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index 73c8d2c30..5888fe951 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalCreateThreadAndRunRequestToolResourcesCodeInterpr { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } - InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter IPersistableModel< string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter internalCreateThreadAndRunRequestToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalCreateThreadAndRunRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs index ed362ab6b..5b7b3f4f0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary serializedAdditionalRawData) + internal InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs index 39b6689b2..879160326 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalCreateThreadRequestToolResources : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } - InternalCreateThreadRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadRequestToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadRequestToolResources(document.RootElement, options); } - internal static InternalCreateThreadRequestToolResources DeserializeInternalCreateThreadRequestToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadRequestToolResources DeserializeInternalCreateThreadRequestToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateThreadRequestToolResourcesCodeInterpreter codeInterpreter = default; FileSearchToolResources fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalCreateThreadRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalCreateThreadRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(property.Value, options); + fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateThreadRequestToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalCreateThreadRequestToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalCreateThreadRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadRequestToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadRequestToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalCreateThreadRequestToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadRequestToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadRequestToolResources internalCreateThreadRequestToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadRequestToolResources(document.RootElement); + return BinaryContent.Create(internalCreateThreadRequestToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadRequestToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadRequestToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs index 08a68fce1..0a0bb79f4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadRequestToolResources() { } - internal InternalCreateThreadRequestToolResources(InternalCreateThreadRequestToolResourcesCodeInterpreter codeInterpreter, FileSearchToolResources fileSearch, IDictionary serializedAdditionalRawData) + internal InternalCreateThreadRequestToolResources(InternalCreateThreadRequestToolResourcesCodeInterpreter codeInterpreter, FileSearchToolResources fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public InternalCreateThreadRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public FileSearchToolResources FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 55825459e..ee9c58f2b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalCreateThreadRequestToolResourcesCodeInterpreter : { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } - InternalCreateThreadRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadRequestToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalCreateThreadRequestToolResourcesCodeInterpreter DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadRequestToolResourcesCodeInterpreter DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateThreadRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalCreateThreadRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadRequestToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadRequestToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalCreateThreadRequestToolResourcesCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadRequestToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadRequestToolResourcesCodeInterpreter internalCreateThreadRequestToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalCreateThreadRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadRequestToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs index df61d7ce5..b9fc3ccd7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadRequestToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalCreateThreadRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary serializedAdditionalRawData) + internal InternalCreateThreadRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs index bc7fd659d..b9354a847 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,24 +15,25 @@ internal partial class InternalCreateThreadRequestToolResourcesFileSearchBase : { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesFileSearchBase)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -40,47 +42,43 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } - InternalCreateThreadRequestToolResourcesFileSearchBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateThreadRequestToolResourcesFileSearchBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateThreadRequestToolResourcesFileSearchBase JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesFileSearchBase)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(document.RootElement, options); } - internal static InternalCreateThreadRequestToolResourcesFileSearchBase DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateThreadRequestToolResourcesFileSearchBase DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateThreadRequestToolResourcesFileSearchBase(serializedAdditionalRawData); + return new InternalCreateThreadRequestToolResourcesFileSearchBase(additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -90,15 +88,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateThreadRequestToolResourcesFileSearchBase IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateThreadRequestToolResourcesFileSearchBase PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(document.RootElement, options); } default: @@ -108,15 +107,16 @@ InternalCreateThreadRequestToolResourcesFileSearchBase IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateThreadRequestToolResourcesFileSearchBase FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateThreadRequestToolResourcesFileSearchBase internalCreateThreadRequestToolResourcesFileSearchBase) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(document.RootElement); + return BinaryContent.Create(internalCreateThreadRequestToolResourcesFileSearchBase, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateThreadRequestToolResourcesFileSearchBase(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateThreadRequestToolResourcesFileSearchBase(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs index 4a84b73f5..06f7b21e5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs @@ -9,14 +9,15 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesFileSearchBase { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateThreadRequestToolResourcesFileSearchBase() { } - internal InternalCreateThreadRequestToolResourcesFileSearchBase(IDictionary serializedAdditionalRawData) + internal InternalCreateThreadRequestToolResourcesFileSearchBase(IDictionary additionalBinaryDataProperties) { - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs index a04004f24..1ce927e3b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateTranscriptionRequestModel : IEquatable { private readonly string _value; + private const string Whisper1Value = "whisper-1"; public InternalCreateTranscriptionRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string Whisper1Value = "whisper-1"; + _value = value; + } public static InternalCreateTranscriptionRequestModel Whisper1 { get; } = new InternalCreateTranscriptionRequestModel(Whisper1Value); + public static bool operator ==(InternalCreateTranscriptionRequestModel left, InternalCreateTranscriptionRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateTranscriptionRequestModel left, InternalCreateTranscriptionRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateTranscriptionRequestModel(string value) => new InternalCreateTranscriptionRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateTranscriptionRequestModel other && Equals(other); + public bool Equals(InternalCreateTranscriptionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularity.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularity.cs index 5a13a25c6..659a38415 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularity.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularity.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateTranscriptionRequestTimestampGranularity : IEquatable { private readonly string _value; + private const string WordValue = "word"; + private const string SegmentValue = "segment"; public InternalCreateTranscriptionRequestTimestampGranularity(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string WordValue = "word"; - private const string SegmentValue = "segment"; + _value = value; + } public static InternalCreateTranscriptionRequestTimestampGranularity Word { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(WordValue); + public static InternalCreateTranscriptionRequestTimestampGranularity Segment { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(SegmentValue); + public static bool operator ==(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => left.Equals(right); + public static bool operator !=(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => !left.Equals(right); + public static implicit operator InternalCreateTranscriptionRequestTimestampGranularity(string value) => new InternalCreateTranscriptionRequestTimestampGranularity(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateTranscriptionRequestTimestampGranularity other && Equals(other); + public bool Equals(InternalCreateTranscriptionRequestTimestampGranularity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index a5e4863a8..270d2107e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { internal partial class InternalCreateTranscriptionResponseJson : IJsonModel { + internal InternalCreateTranscriptionResponseJson() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateTranscriptionResponseJson)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } - InternalCreateTranscriptionResponseJson IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateTranscriptionResponseJson IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateTranscriptionResponseJson JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateTranscriptionResponseJson)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateTranscriptionResponseJson(document.RootElement, options); } - internal static InternalCreateTranscriptionResponseJson DeserializeInternalCreateTranscriptionResponseJson(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateTranscriptionResponseJson DeserializeInternalCreateTranscriptionResponseJson(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateTranscriptionResponseJson(text, serializedAdditionalRawData); + return new InternalCreateTranscriptionResponseJson(text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(Mode } } - InternalCreateTranscriptionResponseJson IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateTranscriptionResponseJson IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateTranscriptionResponseJson PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateTranscriptionResponseJson(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalCreateTranscriptionResponseJson IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateTranscriptionResponseJson FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateTranscriptionResponseJson internalCreateTranscriptionResponseJson) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateTranscriptionResponseJson(document.RootElement); + return BinaryContent.Create(internalCreateTranscriptionResponseJson, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateTranscriptionResponseJson(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateTranscriptionResponseJson(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs index 19818f1d1..315b7cc31 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs @@ -9,24 +9,19 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranscriptionResponseJson { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateTranscriptionResponseJson(string text) { - Argument.AssertNotNull(text, nameof(text)); - Text = text; } - internal InternalCreateTranscriptionResponseJson(string text, IDictionary serializedAdditionalRawData) + internal InternalCreateTranscriptionResponseJson(string text, IDictionary additionalBinaryDataProperties) { Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalCreateTranscriptionResponseJson() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Text { get; } + public string Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs index a94a2f567..96af492ac 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateTranscriptionResponseVerboseJsonTask : IEquatable { private readonly string _value; + private const string TranscribeValue = "transcribe"; public InternalCreateTranscriptionResponseVerboseJsonTask(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TranscribeValue = "transcribe"; + _value = value; + } public static InternalCreateTranscriptionResponseVerboseJsonTask Transcribe { get; } = new InternalCreateTranscriptionResponseVerboseJsonTask(TranscribeValue); + public static bool operator ==(InternalCreateTranscriptionResponseVerboseJsonTask left, InternalCreateTranscriptionResponseVerboseJsonTask right) => left.Equals(right); + public static bool operator !=(InternalCreateTranscriptionResponseVerboseJsonTask left, InternalCreateTranscriptionResponseVerboseJsonTask right) => !left.Equals(right); + public static implicit operator InternalCreateTranscriptionResponseVerboseJsonTask(string value) => new InternalCreateTranscriptionResponseVerboseJsonTask(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateTranscriptionResponseVerboseJsonTask other && Equals(other); + public bool Equals(InternalCreateTranscriptionResponseVerboseJsonTask other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs index 67effb4f6..3b14b02d0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateTranslationRequestModel : IEquatable { private readonly string _value; + private const string Whisper1Value = "whisper-1"; public InternalCreateTranslationRequestModel(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string Whisper1Value = "whisper-1"; + _value = value; + } public static InternalCreateTranslationRequestModel Whisper1 { get; } = new InternalCreateTranslationRequestModel(Whisper1Value); + public static bool operator ==(InternalCreateTranslationRequestModel left, InternalCreateTranslationRequestModel right) => left.Equals(right); + public static bool operator !=(InternalCreateTranslationRequestModel left, InternalCreateTranslationRequestModel right) => !left.Equals(right); + public static implicit operator InternalCreateTranslationRequestModel(string value) => new InternalCreateTranslationRequestModel(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateTranslationRequestModel other && Equals(other); + public bool Equals(InternalCreateTranslationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index d0d1fcd37..6d73f4a43 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { internal partial class InternalCreateTranslationResponseJson : IJsonModel { + internal InternalCreateTranslationResponseJson() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateTranslationResponseJson)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } - InternalCreateTranslationResponseJson IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateTranslationResponseJson IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateTranslationResponseJson JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateTranslationResponseJson)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateTranslationResponseJson(document.RootElement, options); } - internal static InternalCreateTranslationResponseJson DeserializeInternalCreateTranslationResponseJson(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateTranslationResponseJson DeserializeInternalCreateTranslationResponseJson(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateTranslationResponseJson(text, serializedAdditionalRawData); + return new InternalCreateTranslationResponseJson(text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalCreateTranslationResponseJson IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateTranslationResponseJson IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateTranslationResponseJson PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateTranslationResponseJson(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalCreateTranslationResponseJson IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateTranslationResponseJson FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateTranslationResponseJson internalCreateTranslationResponseJson) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateTranslationResponseJson(document.RootElement); + return BinaryContent.Create(internalCreateTranslationResponseJson, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateTranslationResponseJson(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateTranslationResponseJson(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs index e6e9dae14..e76f332d2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs @@ -9,24 +9,19 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranslationResponseJson { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateTranslationResponseJson(string text) { - Argument.AssertNotNull(text, nameof(text)); - Text = text; } - internal InternalCreateTranslationResponseJson(string text, IDictionary serializedAdditionalRawData) + internal InternalCreateTranslationResponseJson(string text, IDictionary additionalBinaryDataProperties) { Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalCreateTranslationResponseJson() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Text { get; } + public string Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs index 089261285..196639de8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { internal readonly partial struct InternalCreateTranslationResponseVerboseJsonTask : IEquatable { private readonly string _value; + private const string TranslateValue = "translate"; public InternalCreateTranslationResponseVerboseJsonTask(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TranslateValue = "translate"; + _value = value; + } public static InternalCreateTranslationResponseVerboseJsonTask Translate { get; } = new InternalCreateTranslationResponseVerboseJsonTask(TranslateValue); + public static bool operator ==(InternalCreateTranslationResponseVerboseJsonTask left, InternalCreateTranslationResponseVerboseJsonTask right) => left.Equals(right); + public static bool operator !=(InternalCreateTranslationResponseVerboseJsonTask left, InternalCreateTranslationResponseVerboseJsonTask right) => !left.Equals(right); + public static implicit operator InternalCreateTranslationResponseVerboseJsonTask(string value) => new InternalCreateTranslationResponseVerboseJsonTask(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateTranslationResponseVerboseJsonTask other && Equals(other); + public bool Equals(InternalCreateTranslationResponseVerboseJsonTask other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index e2ed769ba..222a4405b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -7,51 +7,45 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalCreateUploadRequest : IJsonModel { + internal InternalCreateUploadRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateUploadRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("filename") != true) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) - { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToString()); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes); + writer.WritePropertyName("mime_type"u8); + writer.WriteStringValue(MimeType); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(Bytes); - } - if (SerializedAdditionalRawData?.ContainsKey("mime_type") != true) - { - writer.WritePropertyName("mime_type"u8); - writer.WriteStringValue(MimeType); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,25 +54,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - InternalCreateUploadRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateUploadRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateUploadRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateUploadRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateUploadRequest(document.RootElement, options); } - internal static InternalCreateUploadRequest DeserializeInternalCreateUploadRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateUploadRequest DeserializeInternalCreateUploadRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -87,44 +79,42 @@ internal static InternalCreateUploadRequest DeserializeInternalCreateUploadReque InternalCreateUploadRequestPurpose purpose = default; int bytes = default; string mimeType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("filename"u8)) + if (prop.NameEquals("filename"u8)) { - filename = property.Value.GetString(); + filename = prop.Value.GetString(); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = new InternalCreateUploadRequestPurpose(property.Value.GetString()); + purpose = new InternalCreateUploadRequestPurpose(prop.Value.GetString()); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - bytes = property.Value.GetInt32(); + bytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("mime_type"u8)) + if (prop.NameEquals("mime_type"u8)) { - mimeType = property.Value.GetString(); + mimeType = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateUploadRequest(filename, purpose, bytes, mimeType, serializedAdditionalRawData); + return new InternalCreateUploadRequest(filename, purpose, bytes, mimeType, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +124,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - InternalCreateUploadRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateUploadRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateUploadRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateUploadRequest(document.RootElement, options); } default: @@ -152,15 +143,16 @@ InternalCreateUploadRequest IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateUploadRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateUploadRequest internalCreateUploadRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateUploadRequest(document.RootElement); + return BinaryContent.Create(internalCreateUploadRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateUploadRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateUploadRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs index f580307a6..8711f4a25 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Files { internal partial class InternalCreateUploadRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateUploadRequest(string filename, InternalCreateUploadRequestPurpose purpose, int bytes, string mimeType) { Argument.AssertNotNull(filename, nameof(filename)); @@ -21,22 +23,21 @@ public InternalCreateUploadRequest(string filename, InternalCreateUploadRequestP MimeType = mimeType; } - internal InternalCreateUploadRequest(string filename, InternalCreateUploadRequestPurpose purpose, int bytes, string mimeType, IDictionary serializedAdditionalRawData) + internal InternalCreateUploadRequest(string filename, InternalCreateUploadRequestPurpose purpose, int bytes, string mimeType, IDictionary additionalBinaryDataProperties) { Filename = filename; Purpose = purpose; Bytes = bytes; MimeType = mimeType; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateUploadRequest() - { - } + public string Filename { get; set; } + + public InternalCreateUploadRequestPurpose Purpose { get; set; } + + public int Bytes { get; set; } - public string Filename { get; } - public InternalCreateUploadRequestPurpose Purpose { get; } - public int Bytes { get; } - public string MimeType { get; } + public string MimeType { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs index 6b76958f0..7c416878e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalCreateUploadRequestPurpose : IEquatable { private readonly string _value; - - public InternalCreateUploadRequestPurpose(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string AssistantsValue = "assistants"; private const string BatchValue = "batch"; private const string FineTuneValue = "fine-tune"; private const string VisionValue = "vision"; + public InternalCreateUploadRequestPurpose(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalCreateUploadRequestPurpose Assistants { get; } = new InternalCreateUploadRequestPurpose(AssistantsValue); + public static InternalCreateUploadRequestPurpose Batch { get; } = new InternalCreateUploadRequestPurpose(BatchValue); + public static InternalCreateUploadRequestPurpose FineTune { get; } = new InternalCreateUploadRequestPurpose(FineTuneValue); + public static InternalCreateUploadRequestPurpose Vision { get; } = new InternalCreateUploadRequestPurpose(VisionValue); + public static bool operator ==(InternalCreateUploadRequestPurpose left, InternalCreateUploadRequestPurpose right) => left.Equals(right); + public static bool operator !=(InternalCreateUploadRequestPurpose left, InternalCreateUploadRequestPurpose right) => !left.Equals(right); + public static implicit operator InternalCreateUploadRequestPurpose(string value) => new InternalCreateUploadRequestPurpose(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateUploadRequestPurpose other && Equals(other); + public bool Equals(InternalCreateUploadRequestPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index 90585d41f..cfd16ec43 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -7,35 +7,47 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileBatchRequest : IJsonModel { + internal InternalCreateVectorStoreFileBatchRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileBatchRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true) + writer.WritePropertyName("file_ids"u8); + writer.WriteStartArray(); + foreach (var item in FileIds) { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) + if (item == null) { - writer.WriteStringValue(item); + writer.WriteNullValue(); + continue; } - writer.WriteEndArray(); + writer.WriteStringValue(item); } - if (SerializedAdditionalRawData?.ContainsKey("chunking_strategy") != true && Optional.IsDefined(ChunkingStrategy)) + writer.WriteEndArray(); + if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(ChunkingStrategy); + writer.WriteRawValue(ChunkingStrategy); #else using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) { @@ -43,17 +55,13 @@ void IJsonModel.Write(Utf8JsonWriter } #endif } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,68 +70,72 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalCreateVectorStoreFileBatchRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateVectorStoreFileBatchRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateVectorStoreFileBatchRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileBatchRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateVectorStoreFileBatchRequest(document.RootElement, options); } - internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCreateVectorStoreFileBatchRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCreateVectorStoreFileBatchRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; BinaryData chunkingStrategy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (property.NameEquals("chunking_strategy"u8)) + if (prop.NameEquals("chunking_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } - chunkingStrategy = BinaryData.FromString(property.Value.GetRawText()); + chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateVectorStoreFileBatchRequest(fileIds, chunkingStrategy, serializedAdditionalRawData); + return new InternalCreateVectorStoreFileBatchRequest(fileIds, chunkingStrategy, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -133,15 +145,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalCreateVectorStoreFileBatchRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateVectorStoreFileBatchRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateVectorStoreFileBatchRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateVectorStoreFileBatchRequest(document.RootElement, options); } default: @@ -151,15 +164,16 @@ InternalCreateVectorStoreFileBatchRequest IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateVectorStoreFileBatchRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateVectorStoreFileBatchRequest internalCreateVectorStoreFileBatchRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateVectorStoreFileBatchRequest(document.RootElement); + return BinaryContent.Create(internalCreateVectorStoreFileBatchRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateVectorStoreFileBatchRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateVectorStoreFileBatchRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs index 3064e3505..f4358821f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs @@ -5,12 +5,14 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileBatchRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateVectorStoreFileBatchRequest(IEnumerable fileIds) { Argument.AssertNotNull(fileIds, nameof(fileIds)); @@ -18,18 +20,15 @@ public InternalCreateVectorStoreFileBatchRequest(IEnumerable fileIds) FileIds = fileIds.ToList(); } - internal InternalCreateVectorStoreFileBatchRequest(IList fileIds, BinaryData chunkingStrategy, IDictionary serializedAdditionalRawData) + internal InternalCreateVectorStoreFileBatchRequest(IList fileIds, BinaryData chunkingStrategy, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; ChunkingStrategy = chunkingStrategy; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalCreateVectorStoreFileBatchRequest() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } + public BinaryData ChunkingStrategy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index 4e124f18f..721bd1455 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -7,41 +7,51 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileRequest : IJsonModel { + internal InternalCreateVectorStoreFileRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("chunking_strategy") != true && Optional.IsDefined(ChunkingStrategy)) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ChunkingStrategy); +#else + using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,63 +60,60 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } - InternalCreateVectorStoreFileRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateVectorStoreFileRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateVectorStoreFileRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateVectorStoreFileRequest(document.RootElement, options); } - internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVectorStoreFileRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVectorStoreFileRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - FileChunkingStrategy chunkingStrategy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData chunkingStrategy = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("chunking_strategy"u8)) + if (prop.NameEquals("chunking_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } - chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(property.Value, options); + chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateVectorStoreFileRequest(fileId, chunkingStrategy, serializedAdditionalRawData); + return new InternalCreateVectorStoreFileRequest(fileId, chunkingStrategy, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +123,16 @@ BinaryData IPersistableModel.Write(ModelRe } } - InternalCreateVectorStoreFileRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateVectorStoreFileRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateVectorStoreFileRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateVectorStoreFileRequest(document.RootElement, options); } default: @@ -134,15 +142,16 @@ InternalCreateVectorStoreFileRequest IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateVectorStoreFileRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateVectorStoreFileRequest internalCreateVectorStoreFileRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateVectorStoreFileRequest(document.RootElement); + return BinaryContent.Create(internalCreateVectorStoreFileRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateVectorStoreFileRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateVectorStoreFileRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs index 4224f5fca..89126b85e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateVectorStoreFileRequest(string fileId) { Argument.AssertNotNull(fileId, nameof(fileId)); @@ -17,17 +19,13 @@ public InternalCreateVectorStoreFileRequest(string fileId) FileId = fileId; } - internal InternalCreateVectorStoreFileRequest(string fileId, FileChunkingStrategy chunkingStrategy, IDictionary serializedAdditionalRawData) + internal InternalCreateVectorStoreFileRequest(string fileId, BinaryData chunkingStrategy, IDictionary additionalBinaryDataProperties) { FileId = fileId; ChunkingStrategy = chunkingStrategy; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalCreateVectorStoreFileRequest() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs index 1ee139041..fa5f04dff 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalDeleteAssistantResponseObject : IEquatable { private readonly string _value; + private const string AssistantDeletedValue = "assistant.deleted"; public InternalDeleteAssistantResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AssistantDeletedValue = "assistant.deleted"; + _value = value; + } public static InternalDeleteAssistantResponseObject AssistantDeleted { get; } = new InternalDeleteAssistantResponseObject(AssistantDeletedValue); + public static bool operator ==(InternalDeleteAssistantResponseObject left, InternalDeleteAssistantResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteAssistantResponseObject left, InternalDeleteAssistantResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteAssistantResponseObject(string value) => new InternalDeleteAssistantResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteAssistantResponseObject other && Equals(other); + public bool Equals(InternalDeleteAssistantResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs index f6fbfc918..7f6f454bf 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalDeleteFileResponseObject : IEquatable { private readonly string _value; + private const string FileValue = "file"; public InternalDeleteFileResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FileValue = "file"; + _value = value; + } public static InternalDeleteFileResponseObject File { get; } = new InternalDeleteFileResponseObject(FileValue); + public static bool operator ==(InternalDeleteFileResponseObject left, InternalDeleteFileResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteFileResponseObject left, InternalDeleteFileResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteFileResponseObject(string value) => new InternalDeleteFileResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteFileResponseObject other && Equals(other); + public bool Equals(InternalDeleteFileResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs index 772ffbcb3..98065f2d6 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalDeleteMessageResponseObject : IEquatable { private readonly string _value; + private const string ThreadMessageDeletedValue = "thread.message.deleted"; public InternalDeleteMessageResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadMessageDeletedValue = "thread.message.deleted"; + _value = value; + } public static InternalDeleteMessageResponseObject ThreadMessageDeleted { get; } = new InternalDeleteMessageResponseObject(ThreadMessageDeletedValue); + public static bool operator ==(InternalDeleteMessageResponseObject left, InternalDeleteMessageResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteMessageResponseObject left, InternalDeleteMessageResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteMessageResponseObject(string value) => new InternalDeleteMessageResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteMessageResponseObject other && Equals(other); + public bool Equals(InternalDeleteMessageResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs index 967d11d7a..665be1cce 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Models { internal readonly partial struct InternalDeleteModelResponseObject : IEquatable { private readonly string _value; + private const string ModelValue = "model"; public InternalDeleteModelResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ModelValue = "model"; + _value = value; + } public static InternalDeleteModelResponseObject Model { get; } = new InternalDeleteModelResponseObject(ModelValue); + public static bool operator ==(InternalDeleteModelResponseObject left, InternalDeleteModelResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteModelResponseObject left, InternalDeleteModelResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteModelResponseObject(string value) => new InternalDeleteModelResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteModelResponseObject other && Equals(other); + public bool Equals(InternalDeleteModelResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs index bc843faac..8a8ee5818 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalDeleteThreadResponseObject : IEquatable { private readonly string _value; + private const string ThreadDeletedValue = "thread.deleted"; public InternalDeleteThreadResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadDeletedValue = "thread.deleted"; + _value = value; + } public static InternalDeleteThreadResponseObject ThreadDeleted { get; } = new InternalDeleteThreadResponseObject(ThreadDeletedValue); + public static bool operator ==(InternalDeleteThreadResponseObject left, InternalDeleteThreadResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteThreadResponseObject left, InternalDeleteThreadResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteThreadResponseObject(string value) => new InternalDeleteThreadResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteThreadResponseObject other && Equals(other); + public bool Equals(InternalDeleteThreadResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs index 6716460af..81262cbba 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalDeleteVectorStoreFileResponseObject : IEquatable { private readonly string _value; + private const string VectorStoreFileDeletedValue = "vector_store.file.deleted"; public InternalDeleteVectorStoreFileResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VectorStoreFileDeletedValue = "vector_store.file.deleted"; + _value = value; + } public static InternalDeleteVectorStoreFileResponseObject VectorStoreFileDeleted { get; } = new InternalDeleteVectorStoreFileResponseObject(VectorStoreFileDeletedValue); + public static bool operator ==(InternalDeleteVectorStoreFileResponseObject left, InternalDeleteVectorStoreFileResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteVectorStoreFileResponseObject left, InternalDeleteVectorStoreFileResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteVectorStoreFileResponseObject(string value) => new InternalDeleteVectorStoreFileResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteVectorStoreFileResponseObject other && Equals(other); + public bool Equals(InternalDeleteVectorStoreFileResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs index c13ec4b2f..6a72e9ce4 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalDeleteVectorStoreResponseObject : IEquatable { private readonly string _value; + private const string VectorStoreDeletedValue = "vector_store.deleted"; public InternalDeleteVectorStoreResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VectorStoreDeletedValue = "vector_store.deleted"; + _value = value; + } public static InternalDeleteVectorStoreResponseObject VectorStoreDeleted { get; } = new InternalDeleteVectorStoreResponseObject(VectorStoreDeletedValue); + public static bool operator ==(InternalDeleteVectorStoreResponseObject left, InternalDeleteVectorStoreResponseObject right) => left.Equals(right); + public static bool operator !=(InternalDeleteVectorStoreResponseObject left, InternalDeleteVectorStoreResponseObject right) => !left.Equals(right); + public static implicit operator InternalDeleteVectorStoreResponseObject(string value) => new InternalDeleteVectorStoreResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalDeleteVectorStoreResponseObject other && Equals(other); + public bool Equals(InternalDeleteVectorStoreResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs b/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs index 5a0c0e4d3..c9ce5abd8 100644 --- a/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs +++ b/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Embeddings { internal readonly partial struct InternalEmbeddingObject : IEquatable { private readonly string _value; + private const string EmbeddingValue = "embedding"; public InternalEmbeddingObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string EmbeddingValue = "embedding"; + _value = value; + } public static InternalEmbeddingObject Embedding { get; } = new InternalEmbeddingObject(EmbeddingValue); + public static bool operator ==(InternalEmbeddingObject left, InternalEmbeddingObject right) => left.Equals(right); + public static bool operator !=(InternalEmbeddingObject left, InternalEmbeddingObject right) => !left.Equals(right); + public static implicit operator InternalEmbeddingObject(string value) => new InternalEmbeddingObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalEmbeddingObject other && Equals(other); + public bool Equals(InternalEmbeddingObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 4a61d2d17..99acd7163 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { [PersistableModelProxy(typeof(InternalUnknownFileChunkingStrategyRequestParamProxy))] - internal partial class InternalFileChunkingStrategyRequestParam : IJsonModel + internal abstract partial class InternalFileChunkingStrategyRequestParam : IJsonModel { + internal InternalFileChunkingStrategyRequestParam() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileChunkingStrategyRequestParam)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } - InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFileChunkingStrategyRequestParam JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileChunkingStrategyRequestParam)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement, options); } - internal static InternalFileChunkingStrategyRequestParam DeserializeInternalFileChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFileChunkingStrategyRequestParam DeserializeInternalFileChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "auto": return InternalAutoChunkingStrategyRequestParam.DeserializeInternalAutoChunkingStrategyRequestParam(element, options); - case "static": return InternalStaticChunkingStrategyRequestParam.DeserializeInternalStaticChunkingStrategyRequestParam(element, options); + case "auto": + return InternalAutoChunkingStrategyRequestParam.DeserializeInternalAutoChunkingStrategyRequestParam(element, options); + case "static": + return InternalStaticChunkingStrategyRequestParam.DeserializeInternalStaticChunkingStrategyRequestParam(element, options); } } return InternalUnknownFileChunkingStrategyRequestParamProxy.DeserializeInternalUnknownFileChunkingStrategyRequestParamProxy(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFileChunkingStrategyRequestParam PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement, options); } default: @@ -110,15 +115,16 @@ InternalFileChunkingStrategyRequestParam IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFileChunkingStrategyRequestParam FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFileChunkingStrategyRequestParam internalFileChunkingStrategyRequestParam) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement); + return BinaryContent.Create(internalFileChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFileChunkingStrategyRequestParam(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs index 275a076ed..391a64ff9 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs @@ -9,15 +9,17 @@ namespace OpenAI.VectorStores { internal abstract partial class InternalFileChunkingStrategyRequestParam { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalFileChunkingStrategyRequestParam() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalFileChunkingStrategyRequestParam(string @type) { + Type = @type; } - internal InternalFileChunkingStrategyRequestParam(string type, IDictionary serializedAdditionalRawData) + internal InternalFileChunkingStrategyRequestParam(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index 8a86ad75b..497da99c0 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { @@ -15,41 +15,29 @@ internal partial class InternalFileUploadOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file") != true) + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("file"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(global::System.BinaryData.FromStream(File)); -#else - using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(File))) + foreach (var item in _additionalBinaryDataProperties) { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) - { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -58,102 +46,74 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - InternalFileUploadOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFileUploadOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFileUploadOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFileUploadOptions(document.RootElement, options); } - internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - Stream file = default; + BinaryData @file = default; FileUploadPurpose purpose = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file"u8)) + if (prop.NameEquals("file"u8)) { - file = BinaryData.FromString(property.Value.GetRawText()).ToStream(); + @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = new FileUploadPurpose(property.Value.GetString()); + purpose = new FileUploadPurpose(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFileUploadOptions(file, purpose, serializedAdditionalRawData); + return new InternalFileUploadOptions(@file, purpose, additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file", "application/octet-stream"); - content.Add(Purpose.ToString(), "purpose"); - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support writing '{options.Format}' format."); } } - InternalFileUploadOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFileUploadOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFileUploadOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFileUploadOptions(document.RootElement, options); } default: @@ -161,17 +121,18 @@ InternalFileUploadOptions IPersistableModel.Create(Bi } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFileUploadOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFileUploadOptions internalFileUploadOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFileUploadOptions(document.RootElement); + return BinaryContent.Create(internalFileUploadOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFileUploadOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFileUploadOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs index 7873ae62e..2c81f60fd 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs @@ -4,19 +4,27 @@ using System; using System.Collections.Generic; -using System.IO; +using OpenAI; namespace OpenAI.Files { internal partial class InternalFileUploadOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal InternalFileUploadOptions(Stream file, FileUploadPurpose purpose, IDictionary serializedAdditionalRawData) + public InternalFileUploadOptions(BinaryData @file, FileUploadPurpose purpose) { - File = file; + Argument.AssertNotNull(@file, nameof(@file)); + + File = @file; + Purpose = purpose; + } + + internal InternalFileUploadOptions(BinaryData @file, FileUploadPurpose purpose, IDictionary additionalBinaryDataProperties) + { + File = @file; Purpose = purpose; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 72d9dbab5..38f52c029 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Chat; namespace OpenAI.FineTuning @@ -15,73 +16,26 @@ internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : I { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuneChatCompletionRequestAssistantMessage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true && Optional.IsDefined(Refusal)) - { - if (Refusal != null) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); - } - else - { - writer.WriteNull("refusal"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(ParticipantName)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(ParticipantName); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true && Optional.IsCollectionDefined(ToolCalls)) - { - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionCall)) - { - if (FunctionCall != null) - { - writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionCall, options); - } - else - { - writer.WriteNull("function_call"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("content") != true && Optional.IsCollectionDefined(Content)) + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("content"u8); - SerializeContentValue(writer, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -90,109 +44,117 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } - InternalFineTuneChatCompletionRequestAssistantMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuneChatCompletionRequestAssistantMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuneChatCompletionRequestAssistantMessage)JsonModelCreateCore(ref reader, options); + + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuneChatCompletionRequestAssistantMessage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, options); } - internal static InternalFineTuneChatCompletionRequestAssistantMessage DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuneChatCompletionRequestAssistantMessage DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string refusal = default; string name = default; IList toolCalls = default; ChatFunctionCall functionCall = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary additionalBinaryDataProperties0 = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("refusal"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = null; continue; } - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("function_call"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { functionCall = null; continue; } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(property.Value, options); - continue; - } - if (property.NameEquals("role"u8)) - { - role = property.Value.GetString().ToChatMessageRole(); + functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties0.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalFineTuneChatCompletionRequestAssistantMessage( - role, - content ?? new ChangeTrackingList(), - serializedAdditionalRawData, + content, refusal, name, toolCalls ?? new ChangeTrackingList(), - functionCall); + functionCall, + role, + additionalBinaryDataProperties, + additionalBinaryDataProperties0); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -202,15 +164,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuneChatCompletionRequestAssistantMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuneChatCompletionRequestAssistantMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, options); } default: @@ -220,15 +183,16 @@ InternalFineTuneChatCompletionRequestAssistantMessage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalFineTuneChatCompletionRequestAssistantMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuneChatCompletionRequestAssistantMessage internalFineTuneChatCompletionRequestAssistantMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement); + return BinaryContent.Create(internalFineTuneChatCompletionRequestAssistantMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuneChatCompletionRequestAssistantMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index e7f33bc58..cdf147da8 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -10,12 +10,15 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : AssistantChatMessage { - public InternalFineTuneChatCompletionRequestAssistantMessage() + private protected IDictionary _additionalBinaryDataProperties; + + public InternalFineTuneChatCompletionRequestAssistantMessage() : base(role) { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, serializedAdditionalRawData, refusal, participantName, toolCalls, functionCall) + internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string name, IList toolCalls, ChatFunctionCall functionCall, string role, IDictionary additionalBinaryDataProperties, IDictionary additionalBinaryDataProperties0) : base(content, refusal, name, toolCalls, functionCall, role, additionalBinaryDataProperties) { + _additionalBinaryDataProperties = additionalBinaryDataProperties0; } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index c6cdd8c10..1737d7d74 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { [PersistableModelProxy(typeof(UnknownFineTuningIntegration))] - internal partial class InternalFineTuningIntegration : IJsonModel + internal abstract partial class InternalFineTuningIntegration : IJsonModel { + internal InternalFineTuningIntegration() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + this.JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegration)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,43 +48,43 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } - InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegration)this.JsonModelCreateCore(ref reader, options); + + protected virtual InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuningIntegration(document.RootElement, options); } - internal static InternalFineTuningIntegration DeserializeInternalFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuningIntegration DeserializeInternalFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "wandb": return InternalFineTuningIntegrationWandb.DeserializeInternalFineTuningIntegrationWandb(element, options); + case "wandb": + return InternalFineTuningIntegrationWandb.DeserializeInternalFineTuningIntegrationWandb(element, options); } } return UnknownFineTuningIntegration.DeserializeUnknownFineTuningIntegration(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -91,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuningIntegration)this.PersistableModelCreateCore(data, options); + protected virtual InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuningIntegration(document.RootElement, options); } default: @@ -109,15 +113,16 @@ InternalFineTuningIntegration IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFineTuningIntegration FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuningIntegration internalFineTuningIntegration) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuningIntegration(document.RootElement); + return BinaryContent.Create(internalFineTuningIntegration, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuningIntegration(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuningIntegration(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs index 4ee21aa07..3e22f8770 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs @@ -9,15 +9,17 @@ namespace OpenAI.FineTuning { internal abstract partial class InternalFineTuningIntegration { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalFineTuningIntegration() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalFineTuningIntegration(string @type) { + Type = @type; } - internal InternalFineTuningIntegration(string type, IDictionary serializedAdditionalRawData) + internal InternalFineTuningIntegration(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index a8ff8e640..cf4f01957 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalFineTuningIntegrationWandb : IJsonModel { + internal InternalFineTuningIntegrationWandb() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + this.JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegrationWandb)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("wandb") != true) - { - writer.WritePropertyName("wandb"u8); - writer.WriteObjectValue(Wandb, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("wandb"u8); + writer.WriteObjectValue(Wandb, options); } - InternalFineTuningIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuningIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)this.JsonModelCreateCore(ref reader, options); + + protected override InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegrationWandb)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuningIntegrationWandb(document.RootElement, options); } - internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuningIntegrationWandb(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuningIntegrationWandb(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } FineTuningIntegrationWandbWandb wandb = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "wandb"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("wandb"u8)) + if (prop.NameEquals("wandb"u8)) { - wandb = FineTuningIntegrationWandbWandb.DeserializeFineTuningIntegrationWandbWandb(property.Value, options); + wandb = FineTuningIntegrationWandbWandb.DeserializeFineTuningIntegrationWandbWandb(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFineTuningIntegrationWandb(type, serializedAdditionalRawData, wandb); + return new InternalFineTuningIntegrationWandb(wandb, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(ModelRead } } - InternalFineTuningIntegrationWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuningIntegrationWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)this.PersistableModelCreateCore(data, options); + protected override InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuningIntegrationWandb(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalFineTuningIntegrationWandb IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalFineTuningIntegrationWandb FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuningIntegrationWandb internalFineTuningIntegrationWandb) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuningIntegrationWandb(document.RootElement); + return BinaryContent.Create(internalFineTuningIntegrationWandb, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuningIntegrationWandb(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuningIntegrationWandb(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs index 02a6deab0..8d90f4aba 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs @@ -9,23 +9,16 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningIntegrationWandb : InternalFineTuningIntegration { - internal InternalFineTuningIntegrationWandb(FineTuningIntegrationWandbWandb wandb) + internal InternalFineTuningIntegrationWandb(FineTuningIntegrationWandbWandb wandb) : base("wandb") { - Argument.AssertNotNull(wandb, nameof(wandb)); - - Type = "wandb"; Wandb = wandb; } - internal InternalFineTuningIntegrationWandb(string type, IDictionary serializedAdditionalRawData, FineTuningIntegrationWandbWandb wandb) : base(type, serializedAdditionalRawData) + internal InternalFineTuningIntegrationWandb(FineTuningIntegrationWandbWandb wandb, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Wandb = wandb; } - internal InternalFineTuningIntegrationWandb() - { - } - - public FineTuningIntegrationWandbWandb Wandb { get; } + public FineTuningIntegrationWandbWandb Wandb { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index d562b0cbd..1fbbcd1b5 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -7,66 +7,51 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpoint : IJsonModel { + internal InternalFineTuningJobCheckpoint() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpoint)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("fine_tuned_model_checkpoint") != true) - { - writer.WritePropertyName("fine_tuned_model_checkpoint"u8); - writer.WriteStringValue(FineTunedModelCheckpoint); - } - if (SerializedAdditionalRawData?.ContainsKey("step_number") != true) - { - writer.WritePropertyName("step_number"u8); - writer.WriteNumberValue(StepNumber); - } - if (SerializedAdditionalRawData?.ContainsKey("metrics") != true) - { - writer.WritePropertyName("metrics"u8); - writer.WriteObjectValue(Metrics, options); - } - if (SerializedAdditionalRawData?.ContainsKey("fine_tuning_job_id") != true) - { - writer.WritePropertyName("fine_tuning_job_id"u8); - writer.WriteStringValue(FineTuningJobId); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("fine_tuned_model_checkpoint"u8); + writer.WriteStringValue(FineTunedModelCheckpoint); + writer.WritePropertyName("step_number"u8); + writer.WriteNumberValue(StepNumber); + writer.WritePropertyName("metrics"u8); + writer.WriteObjectValue(Metrics, options); + writer.WritePropertyName("fine_tuning_job_id"u8); + writer.WriteStringValue(FineTuningJobId); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -75,25 +60,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalFineTuningJobCheckpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuningJobCheckpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFineTuningJobCheckpoint JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpoint)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuningJobCheckpoint(document.RootElement, options); } - internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJobCheckpoint(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJobCheckpoint(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -105,52 +88,49 @@ internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJob InternalFineTuningJobCheckpointMetrics metrics = default; string fineTuningJobId = default; InternalFineTuningJobCheckpointObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("fine_tuned_model_checkpoint"u8)) + if (prop.NameEquals("fine_tuned_model_checkpoint"u8)) { - fineTunedModelCheckpoint = property.Value.GetString(); + fineTunedModelCheckpoint = prop.Value.GetString(); continue; } - if (property.NameEquals("step_number"u8)) + if (prop.NameEquals("step_number"u8)) { - stepNumber = property.Value.GetInt32(); + stepNumber = prop.Value.GetInt32(); continue; } - if (property.NameEquals("metrics"u8)) + if (prop.NameEquals("metrics"u8)) { - metrics = InternalFineTuningJobCheckpointMetrics.DeserializeInternalFineTuningJobCheckpointMetrics(property.Value, options); + metrics = InternalFineTuningJobCheckpointMetrics.DeserializeInternalFineTuningJobCheckpointMetrics(prop.Value, options); continue; } - if (property.NameEquals("fine_tuning_job_id"u8)) + if (prop.NameEquals("fine_tuning_job_id"u8)) { - fineTuningJobId = property.Value.GetString(); + fineTuningJobId = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalFineTuningJobCheckpointObject(property.Value.GetString()); + @object = new InternalFineTuningJobCheckpointObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalFineTuningJobCheckpoint( id, createdAt, @@ -159,13 +139,14 @@ internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJob metrics, fineTuningJobId, @object, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -175,15 +156,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalFineTuningJobCheckpoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuningJobCheckpoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFineTuningJobCheckpoint PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuningJobCheckpoint(document.RootElement, options); } default: @@ -193,15 +175,16 @@ InternalFineTuningJobCheckpoint IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFineTuningJobCheckpoint FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuningJobCheckpoint internalFineTuningJobCheckpoint) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuningJobCheckpoint(document.RootElement); + return BinaryContent.Create(internalFineTuningJobCheckpoint, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuningJobCheckpoint(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuningJobCheckpoint(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs index 463cfd4fb..6494e5e19 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs @@ -9,14 +9,10 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpoint { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, string fineTunedModelCheckpoint, int stepNumber, InternalFineTuningJobCheckpointMetrics metrics, string fineTuningJobId) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(fineTunedModelCheckpoint, nameof(fineTunedModelCheckpoint)); - Argument.AssertNotNull(metrics, nameof(metrics)); - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - Id = id; CreatedAt = createdAt; FineTunedModelCheckpoint = fineTunedModelCheckpoint; @@ -25,7 +21,7 @@ internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, st FineTuningJobId = fineTuningJobId; } - internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, string fineTunedModelCheckpoint, int stepNumber, InternalFineTuningJobCheckpointMetrics metrics, string fineTuningJobId, InternalFineTuningJobCheckpointObject @object, IDictionary serializedAdditionalRawData) + internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, string fineTunedModelCheckpoint, int stepNumber, InternalFineTuningJobCheckpointMetrics metrics, string fineTuningJobId, InternalFineTuningJobCheckpointObject @object, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -34,19 +30,21 @@ internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, st Metrics = metrics; FineTuningJobId = fineTuningJobId; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalFineTuningJobCheckpoint() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string FineTunedModelCheckpoint { get; set; } + + public int StepNumber { get; set; } + + public InternalFineTuningJobCheckpointMetrics Metrics { get; set; } + + public string FineTuningJobId { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string FineTunedModelCheckpoint { get; } - public int StepNumber { get; } - public InternalFineTuningJobCheckpointMetrics Metrics { get; } - public string FineTuningJobId { get; } - public InternalFineTuningJobCheckpointObject Object { get; } = InternalFineTuningJobCheckpointObject.FineTuningJobCheckpoint; + public InternalFineTuningJobCheckpointObject Object { get; } = "fine_tuning.job.checkpoint"; } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs index 3c411f901..fa7d33ee0 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { @@ -14,59 +15,60 @@ internal partial class InternalFineTuningJobCheckpointMetrics : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpointMetrics)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("step") != true && Optional.IsDefined(Step)) + if (Optional.IsDefined(Step)) { writer.WritePropertyName("step"u8); writer.WriteNumberValue(Step.Value); } - if (SerializedAdditionalRawData?.ContainsKey("train_loss") != true && Optional.IsDefined(TrainLoss)) + if (Optional.IsDefined(TrainLoss)) { writer.WritePropertyName("train_loss"u8); writer.WriteNumberValue(TrainLoss.Value); } - if (SerializedAdditionalRawData?.ContainsKey("train_mean_token_accuracy") != true && Optional.IsDefined(TrainMeanTokenAccuracy)) + if (Optional.IsDefined(TrainMeanTokenAccuracy)) { writer.WritePropertyName("train_mean_token_accuracy"u8); writer.WriteNumberValue(TrainMeanTokenAccuracy.Value); } - if (SerializedAdditionalRawData?.ContainsKey("valid_loss") != true && Optional.IsDefined(ValidLoss)) + if (Optional.IsDefined(ValidLoss)) { writer.WritePropertyName("valid_loss"u8); writer.WriteNumberValue(ValidLoss.Value); } - if (SerializedAdditionalRawData?.ContainsKey("valid_mean_token_accuracy") != true && Optional.IsDefined(ValidMeanTokenAccuracy)) + if (Optional.IsDefined(ValidMeanTokenAccuracy)) { writer.WritePropertyName("valid_mean_token_accuracy"u8); writer.WriteNumberValue(ValidMeanTokenAccuracy.Value); } - if (SerializedAdditionalRawData?.ContainsKey("full_valid_loss") != true && Optional.IsDefined(FullValidLoss)) + if (Optional.IsDefined(FullValidLoss)) { writer.WritePropertyName("full_valid_loss"u8); writer.WriteNumberValue(FullValidLoss.Value); } - if (SerializedAdditionalRawData?.ContainsKey("full_valid_mean_token_accuracy") != true && Optional.IsDefined(FullValidMeanTokenAccuracy)) + if (Optional.IsDefined(FullValidMeanTokenAccuracy)) { writer.WritePropertyName("full_valid_mean_token_accuracy"u8); writer.WriteNumberValue(FullValidMeanTokenAccuracy.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -75,25 +77,23 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } - InternalFineTuningJobCheckpointMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuningJobCheckpointMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFineTuningJobCheckpointMetrics JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpointMetrics)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuningJobCheckpointMetrics(document.RootElement, options); } - internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTuningJobCheckpointMetrics(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTuningJobCheckpointMetrics(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -105,80 +105,84 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu float? validMeanTokenAccuracy = default; float? fullValidLoss = default; float? fullValidMeanTokenAccuracy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("step"u8)) + if (prop.NameEquals("step"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + step = null; continue; } - step = property.Value.GetSingle(); + step = prop.Value.GetSingle(); continue; } - if (property.NameEquals("train_loss"u8)) + if (prop.NameEquals("train_loss"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + trainLoss = null; continue; } - trainLoss = property.Value.GetSingle(); + trainLoss = prop.Value.GetSingle(); continue; } - if (property.NameEquals("train_mean_token_accuracy"u8)) + if (prop.NameEquals("train_mean_token_accuracy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + trainMeanTokenAccuracy = null; continue; } - trainMeanTokenAccuracy = property.Value.GetSingle(); + trainMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (property.NameEquals("valid_loss"u8)) + if (prop.NameEquals("valid_loss"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + validLoss = null; continue; } - validLoss = property.Value.GetSingle(); + validLoss = prop.Value.GetSingle(); continue; } - if (property.NameEquals("valid_mean_token_accuracy"u8)) + if (prop.NameEquals("valid_mean_token_accuracy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + validMeanTokenAccuracy = null; continue; } - validMeanTokenAccuracy = property.Value.GetSingle(); + validMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (property.NameEquals("full_valid_loss"u8)) + if (prop.NameEquals("full_valid_loss"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fullValidLoss = null; continue; } - fullValidLoss = property.Value.GetSingle(); + fullValidLoss = prop.Value.GetSingle(); continue; } - if (property.NameEquals("full_valid_mean_token_accuracy"u8)) + if (prop.NameEquals("full_valid_mean_token_accuracy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fullValidMeanTokenAccuracy = null; continue; } - fullValidMeanTokenAccuracy = property.Value.GetSingle(); + fullValidMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalFineTuningJobCheckpointMetrics( step, trainLoss, @@ -187,13 +191,14 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu validMeanTokenAccuracy, fullValidLoss, fullValidMeanTokenAccuracy, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -203,15 +208,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalFineTuningJobCheckpointMetrics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuningJobCheckpointMetrics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFineTuningJobCheckpointMetrics PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuningJobCheckpointMetrics(document.RootElement, options); } default: @@ -221,15 +227,16 @@ InternalFineTuningJobCheckpointMetrics IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFineTuningJobCheckpointMetrics FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuningJobCheckpointMetrics internalFineTuningJobCheckpointMetrics) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuningJobCheckpointMetrics(document.RootElement); + return BinaryContent.Create(internalFineTuningJobCheckpointMetrics, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuningJobCheckpointMetrics(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuningJobCheckpointMetrics(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs index 63c7256ec..f3a3276fb 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs @@ -9,12 +9,13 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpointMetrics { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalFineTuningJobCheckpointMetrics() { } - internal InternalFineTuningJobCheckpointMetrics(float? step, float? trainLoss, float? trainMeanTokenAccuracy, float? validLoss, float? validMeanTokenAccuracy, float? fullValidLoss, float? fullValidMeanTokenAccuracy, IDictionary serializedAdditionalRawData) + internal InternalFineTuningJobCheckpointMetrics(float? step, float? trainLoss, float? trainMeanTokenAccuracy, float? validLoss, float? validMeanTokenAccuracy, float? fullValidLoss, float? fullValidMeanTokenAccuracy, IDictionary additionalBinaryDataProperties) { Step = step; TrainLoss = trainLoss; @@ -23,15 +24,21 @@ internal InternalFineTuningJobCheckpointMetrics(float? step, float? trainLoss, f ValidMeanTokenAccuracy = validMeanTokenAccuracy; FullValidLoss = fullValidLoss; FullValidMeanTokenAccuracy = fullValidMeanTokenAccuracy; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public float? Step { get; } - public float? TrainLoss { get; } - public float? TrainMeanTokenAccuracy { get; } - public float? ValidLoss { get; } - public float? ValidMeanTokenAccuracy { get; } - public float? FullValidLoss { get; } - public float? FullValidMeanTokenAccuracy { get; } + public float? Step { get; set; } + + public float? TrainLoss { get; set; } + + public float? TrainMeanTokenAccuracy { get; set; } + + public float? ValidLoss { get; set; } + + public float? ValidMeanTokenAccuracy { get; set; } + + public float? FullValidLoss { get; set; } + + public float? FullValidMeanTokenAccuracy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs index 5cdd24ad8..8ef8bdf93 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalFineTuningJobCheckpointObject : IEquatable { private readonly string _value; + private const string FineTuningJobCheckpointValue = "fine_tuning.job.checkpoint"; public InternalFineTuningJobCheckpointObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FineTuningJobCheckpointValue = "fine_tuning.job.checkpoint"; + _value = value; + } public static InternalFineTuningJobCheckpointObject FineTuningJobCheckpoint { get; } = new InternalFineTuningJobCheckpointObject(FineTuningJobCheckpointValue); + public static bool operator ==(InternalFineTuningJobCheckpointObject left, InternalFineTuningJobCheckpointObject right) => left.Equals(right); + public static bool operator !=(InternalFineTuningJobCheckpointObject left, InternalFineTuningJobCheckpointObject right) => !left.Equals(right); + public static implicit operator InternalFineTuningJobCheckpointObject(string value) => new InternalFineTuningJobCheckpointObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalFineTuningJobCheckpointObject other && Equals(other); + public bool Equals(InternalFineTuningJobCheckpointObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs index 04fdff4dc..73d371f6a 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalFineTuningJobEventObject : IEquatable { private readonly string _value; + private const string FineTuningJobEventValue = "fine_tuning.job.event"; public InternalFineTuningJobEventObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FineTuningJobEventValue = "fine_tuning.job.event"; + _value = value; + } public static InternalFineTuningJobEventObject FineTuningJobEvent { get; } = new InternalFineTuningJobEventObject(FineTuningJobEventValue); + public static bool operator ==(InternalFineTuningJobEventObject left, InternalFineTuningJobEventObject right) => left.Equals(right); + public static bool operator !=(InternalFineTuningJobEventObject left, InternalFineTuningJobEventObject right) => !left.Equals(right); + public static implicit operator InternalFineTuningJobEventObject(string value) => new InternalFineTuningJobEventObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalFineTuningJobEventObject other && Equals(other); + public bool Equals(InternalFineTuningJobEventObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs index b627e2945..3790583ef 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalFineTuningJobObject : IEquatable { private readonly string _value; + private const string FineTuningJobValue = "fine_tuning.job"; public InternalFineTuningJobObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FineTuningJobValue = "fine_tuning.job"; + _value = value; + } public static InternalFineTuningJobObject FineTuningJob { get; } = new InternalFineTuningJobObject(FineTuningJobValue); + public static bool operator ==(InternalFineTuningJobObject left, InternalFineTuningJobObject right) => left.Equals(right); + public static bool operator !=(InternalFineTuningJobObject left, InternalFineTuningJobObject right) => !left.Equals(right); + public static implicit operator InternalFineTuningJobObject(string value) => new InternalFineTuningJobObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalFineTuningJobObject other && Equals(other); + public bool Equals(InternalFineTuningJobObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index 946bb2d93..d42148adb 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Chat; namespace OpenAI.FineTuning @@ -15,14 +16,19 @@ internal partial class InternalFinetuneChatRequestInput : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFinetuneChatRequestInput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("messages") != true && Optional.IsCollectionDefined(Messages)) + if (Optional.IsCollectionDefined(Messages)) { writer.WritePropertyName("messages"u8); writer.WriteStartArray(); @@ -34,7 +40,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M continue; } #if NET6_0_OR_GREATER - writer.WriteRawValue(item); + writer.WriteRawValue(item); #else using (JsonDocument document = JsonDocument.Parse(item)) { @@ -44,7 +50,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -54,12 +60,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(ParallelToolCalls)) + if (Optional.IsDefined(ParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (SerializedAdditionalRawData?.ContainsKey("functions") != true && Optional.IsCollectionDefined(Functions)) + if (Optional.IsCollectionDefined(Functions)) { writer.WritePropertyName("functions"u8); writer.WriteStartArray(); @@ -69,17 +75,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -88,25 +90,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } - InternalFinetuneChatRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFinetuneChatRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFinetuneChatRequestInput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFinetuneChatRequestInput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFinetuneChatRequestInput(document.RootElement, options); } - internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChatRequestInput(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChatRequestInput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -115,18 +115,17 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat IList tools = default; bool? parallelToolCalls = default; IList functions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("messages"u8)) + if (prop.NameEquals("messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { @@ -140,57 +139,57 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat messages = array; continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatTool.DeserializeChatTool(item, options)); } tools = array; continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parallelToolCalls = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("functions"u8)) + if (prop.NameEquals("functions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatFunction.DeserializeChatFunction(item, options)); } functions = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFinetuneChatRequestInput(messages ?? new ChangeTrackingList(), tools ?? new ChangeTrackingList(), parallelToolCalls, functions ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalFinetuneChatRequestInput(messages ?? new ChangeTrackingList(), tools ?? new ChangeTrackingList(), parallelToolCalls, functions ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -200,15 +199,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalFinetuneChatRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFinetuneChatRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFinetuneChatRequestInput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFinetuneChatRequestInput(document.RootElement, options); } default: @@ -218,15 +218,16 @@ InternalFinetuneChatRequestInput IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFinetuneChatRequestInput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFinetuneChatRequestInput internalFinetuneChatRequestInput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFinetuneChatRequestInput(document.RootElement); + return BinaryContent.Create(internalFinetuneChatRequestInput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFinetuneChatRequestInput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFinetuneChatRequestInput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs index b325ed536..c4c884e2b 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs @@ -4,13 +4,15 @@ using System; using System.Collections.Generic; +using OpenAI; using OpenAI.Chat; namespace OpenAI.FineTuning { internal partial class InternalFinetuneChatRequestInput { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalFinetuneChatRequestInput() { Messages = new ChangeTrackingList(); @@ -18,18 +20,21 @@ public InternalFinetuneChatRequestInput() Functions = new ChangeTrackingList(); } - internal InternalFinetuneChatRequestInput(IList messages, IList tools, bool? parallelToolCalls, IList functions, IDictionary serializedAdditionalRawData) + internal InternalFinetuneChatRequestInput(IList messages, IList tools, bool? parallelToolCalls, IList functions, IDictionary additionalBinaryDataProperties) { Messages = messages; Tools = tools; ParallelToolCalls = parallelToolCalls; Functions = functions; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList Messages { get; } + public IList Tools { get; } + public bool? ParallelToolCalls { get; set; } + public IList Functions { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs index 5fbbb7472..6583b57c8 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { @@ -14,34 +15,35 @@ internal partial class InternalFinetuneCompletionRequestInput : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFinetuneCompletionRequestInput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true && Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (SerializedAdditionalRawData?.ContainsKey("completion") != true && Optional.IsDefined(Completion)) + if (Optional.IsDefined(Completion)) { writer.WritePropertyName("completion"u8); writer.WriteStringValue(Completion); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } - InternalFinetuneCompletionRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFinetuneCompletionRequestInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFinetuneCompletionRequestInput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFinetuneCompletionRequestInput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFinetuneCompletionRequestInput(document.RootElement, options); } - internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetuneCompletionRequestInput(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetuneCompletionRequestInput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string prompt = default; string completion = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prompt = null; + continue; + } + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("completion"u8)) + if (prop.NameEquals("completion"u8)) { - completion = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + completion = null; + continue; + } + completion = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFinetuneCompletionRequestInput(prompt, completion, serializedAdditionalRawData); + return new InternalFinetuneCompletionRequestInput(prompt, completion, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalFinetuneCompletionRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFinetuneCompletionRequestInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFinetuneCompletionRequestInput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFinetuneCompletionRequestInput(document.RootElement, options); } default: @@ -130,15 +139,16 @@ InternalFinetuneCompletionRequestInput IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFinetuneCompletionRequestInput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFinetuneCompletionRequestInput internalFinetuneCompletionRequestInput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFinetuneCompletionRequestInput(document.RootElement); + return BinaryContent.Create(internalFinetuneCompletionRequestInput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFinetuneCompletionRequestInput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFinetuneCompletionRequestInput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs index 3e30640c6..bc945026d 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs @@ -9,19 +9,21 @@ namespace OpenAI.FineTuning { internal partial class InternalFinetuneCompletionRequestInput { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalFinetuneCompletionRequestInput() { } - internal InternalFinetuneCompletionRequestInput(string prompt, string completion, IDictionary serializedAdditionalRawData) + internal InternalFinetuneCompletionRequestInput(string prompt, string completion, IDictionary additionalBinaryDataProperties) { Prompt = prompt; Completion = completion; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Prompt { get; set; } + public string Completion { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index 57335523d..153c420f5 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -7,43 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI.Chat; namespace OpenAI { internal partial class InternalFunctionDefinition : IJsonModel { + internal InternalFunctionDefinition() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFunctionDefinition)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(Description)) + if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("parameters") != true && Optional.IsDefined(Parameters)) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("parameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Parameters); -#else - using (JsonDocument document = JsonDocument.Parse(Parameters)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(Parameters, options); } - if (SerializedAdditionalRawData?.ContainsKey("strict") != true && Optional.IsDefined(Strict)) + if (Optional.IsDefined(Strict)) { if (Strict != null) { @@ -52,20 +52,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("strict"); + writer.WriteNull("strict"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,80 +70,82 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - InternalFunctionDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFunctionDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFunctionDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFunctionDefinition)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFunctionDefinition(document.RootElement, options); } - internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string description = default; string name = default; - BinaryData parameters = default; + InternalFunctionParameters parameters = default; bool? strict = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - description = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("parameters"u8)) + if (prop.NameEquals("parameters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parameters = null; continue; } - parameters = BinaryData.FromString(property.Value.GetRawText()); + parameters = InternalFunctionParameters.DeserializeInternalFunctionParameters(prop.Value, options); continue; } - if (property.NameEquals("strict"u8)) + if (prop.NameEquals("strict"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { strict = null; continue; } - strict = property.Value.GetBoolean(); + strict = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFunctionDefinition(description, name, parameters, strict, serializedAdditionalRawData); + return new InternalFunctionDefinition(description, name, parameters, strict, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -157,15 +155,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalFunctionDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFunctionDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFunctionDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFunctionDefinition(document.RootElement, options); } default: @@ -175,15 +174,16 @@ InternalFunctionDefinition IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFunctionDefinition FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFunctionDefinition internalFunctionDefinition) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFunctionDefinition(document.RootElement); + return BinaryContent.Create(internalFunctionDefinition, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFunctionDefinition(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFunctionDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs index 9e385deb8..aace672a8 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI.Chat; namespace OpenAI { internal partial class InternalFunctionDefinition { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalFunctionDefinition(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -17,21 +19,21 @@ public InternalFunctionDefinition(string name) Name = name; } - internal InternalFunctionDefinition(string description, string name, BinaryData parameters, bool? strict, IDictionary serializedAdditionalRawData) + internal InternalFunctionDefinition(string description, string name, InternalFunctionParameters parameters, bool? strict, IDictionary additionalBinaryDataProperties) { Description = description; Name = name; Parameters = parameters; Strict = strict; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalFunctionDefinition() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Description { get; set; } + public string Name { get; set; } + + public InternalFunctionParameters Parameters { get; set; } + public bool? Strict { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs index 4ab8c6f4c..4a5de31ea 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,18 +15,23 @@ internal partial class InternalFunctionParameters : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFunctionParameters)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -33,43 +39,40 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } #endif } - writer.WriteEndObject(); } - InternalFunctionParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFunctionParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalFunctionParameters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFunctionParameters)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFunctionParameters(document.RootElement, options); } - internal static InternalFunctionParameters DeserializeInternalFunctionParameters(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFunctionParameters DeserializeInternalFunctionParameters(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; return new InternalFunctionParameters(additionalProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -79,15 +82,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalFunctionParameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFunctionParameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalFunctionParameters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFunctionParameters(document.RootElement, options); } default: @@ -97,15 +101,16 @@ InternalFunctionParameters IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalFunctionParameters FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFunctionParameters internalFunctionParameters) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFunctionParameters(document.RootElement); + return BinaryContent.Create(internalFunctionParameters, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalFunctionParameters(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFunctionParameters(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs index 0320cf60c..b7532402e 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs @@ -4,21 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalFunctionParameters { + private protected IDictionary _additionalBinaryDataProperties; + public InternalFunctionParameters() { - AdditionalProperties = new ChangeTrackingDictionary(); + _additionalBinaryDataProperties = new ChangeTrackingDictionary(); } internal InternalFunctionParameters(IDictionary additionalProperties) { - AdditionalProperties = additionalProperties; + _additionalBinaryDataProperties = additionalProperties; } - public IDictionary AdditionalProperties { get; } + public IDictionary AdditionalProperties => _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index edbc8c764..3ec4dbc0a 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalListAssistantsResponse : IJsonModel { + internal InternalListAssistantsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListAssistantsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } - InternalListAssistantsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListAssistantsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListAssistantsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListAssistantsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListAssistantsResponse(document.RootElement, options); } - internal static InternalListAssistantsResponse DeserializeInternalListAssistantsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListAssistantsResponse DeserializeInternalListAssistantsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListAssistantsResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListAssistantsResponseObject(property.Value.GetString()); + @object = new InternalListAssistantsResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(Assistant.DeserializeAssistant(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListAssistantsResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - InternalListAssistantsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListAssistantsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListAssistantsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListAssistantsResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListAssistantsResponse IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListAssistantsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListAssistantsResponse internalListAssistantsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListAssistantsResponse(document.RootElement); + return BinaryContent.Create(internalListAssistantsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListAssistantsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListAssistantsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs index 6ee4c4ccd..97bb4ec56 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.Assistants { internal partial class InternalListAssistantsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListAssistantsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListAssistantsResponse() - { - } + public InternalListAssistantsResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListAssistantsResponseObject Object { get; } = InternalListAssistantsResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs index 6d7350e78..d428b9654 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalListAssistantsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListAssistantsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListAssistantsResponseObject List { get; } = new InternalListAssistantsResponseObject(ListValue); + public static bool operator ==(InternalListAssistantsResponseObject left, InternalListAssistantsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListAssistantsResponseObject left, InternalListAssistantsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListAssistantsResponseObject(string value) => new InternalListAssistantsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListAssistantsResponseObject other && Equals(other); + public bool Equals(InternalListAssistantsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index 432479b4b..ae0a62742 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -7,61 +7,58 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Batch { internal partial class InternalListBatchesResponse : IJsonModel { + internal InternalListBatchesResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListBatchesResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("data") != true) + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true && Optional.IsDefined(FirstId)) + writer.WriteEndArray(); + if (Optional.IsDefined(FirstId)) { writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true && Optional.IsDefined(LastId)) + if (Optional.IsDefined(LastId)) { writer.WritePropertyName("last_id"u8); writer.WriteStringValue(LastId); } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) - { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +67,94 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - InternalListBatchesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListBatchesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListBatchesResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListBatchesResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListBatchesResponse(document.RootElement, options); } - internal static InternalListBatchesResponse DeserializeInternalListBatchesResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListBatchesResponse DeserializeInternalListBatchesResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; InternalListBatchesResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalBatchJob.DeserializeInternalBatchJob(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + firstId = null; + continue; + } + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + lastId = null; + continue; + } + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListBatchesResponseObject(property.Value.GetString()); + @object = new InternalListBatchesResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListBatchesResponse( data, firstId, lastId, hasMore, @object, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +164,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - InternalListBatchesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListBatchesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListBatchesResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListBatchesResponse(document.RootElement, options); } default: @@ -179,15 +183,16 @@ InternalListBatchesResponse IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListBatchesResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListBatchesResponse internalListBatchesResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListBatchesResponse(document.RootElement); + return BinaryContent.Create(internalListBatchesResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListBatchesResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListBatchesResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs index c81c672cc..a3ccd8aa7 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs @@ -10,33 +10,32 @@ namespace OpenAI.Batch { internal partial class InternalListBatchesResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListBatchesResponse(IEnumerable data, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Data = data.ToList(); HasMore = hasMore; } - internal InternalListBatchesResponse(IReadOnlyList data, string firstId, string lastId, bool hasMore, InternalListBatchesResponseObject @object, IDictionary serializedAdditionalRawData) + internal InternalListBatchesResponse(IList data, string firstId, string lastId, bool hasMore, InternalListBatchesResponseObject @object, IDictionary additionalBinaryDataProperties) { Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListBatchesResponse() - { - } + public IList Data { get; } + + public string FirstId { get; set; } + + public string LastId { get; set; } + + public bool HasMore { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } - public InternalListBatchesResponseObject Object { get; } = InternalListBatchesResponseObject.List; + public InternalListBatchesResponseObject Object { get; } = "list"; } } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs index 3f562b70d..05c00ddb0 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Batch { internal readonly partial struct InternalListBatchesResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListBatchesResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListBatchesResponseObject List { get; } = new InternalListBatchesResponseObject(ListValue); + public static bool operator ==(InternalListBatchesResponseObject left, InternalListBatchesResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListBatchesResponseObject left, InternalListBatchesResponseObject right) => !left.Equals(right); + public static implicit operator InternalListBatchesResponseObject(string value) => new InternalListBatchesResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListBatchesResponseObject other && Equals(other); + public bool Equals(InternalListBatchesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs b/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs index 3cabf6088..799f45741 100644 --- a/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs +++ b/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalListFilesInVectorStoreBatchRequestOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public InternalListFilesInVectorStoreBatchRequestOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AscValue = "asc"; - private const string DescValue = "desc"; + _value = value; + } public static InternalListFilesInVectorStoreBatchRequestOrder Asc { get; } = new InternalListFilesInVectorStoreBatchRequestOrder(AscValue); + public static InternalListFilesInVectorStoreBatchRequestOrder Desc { get; } = new InternalListFilesInVectorStoreBatchRequestOrder(DescValue); + public static bool operator ==(InternalListFilesInVectorStoreBatchRequestOrder left, InternalListFilesInVectorStoreBatchRequestOrder right) => left.Equals(right); + public static bool operator !=(InternalListFilesInVectorStoreBatchRequestOrder left, InternalListFilesInVectorStoreBatchRequestOrder right) => !left.Equals(right); + public static implicit operator InternalListFilesInVectorStoreBatchRequestOrder(string value) => new InternalListFilesInVectorStoreBatchRequestOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListFilesInVectorStoreBatchRequestOrder other && Equals(other); + public bool Equals(InternalListFilesInVectorStoreBatchRequestOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs index 2b578ea18..ea6bd2fa4 100644 --- a/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalListFilesResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListFilesResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListFilesResponseObject List { get; } = new InternalListFilesResponseObject(ListValue); + public static bool operator ==(InternalListFilesResponseObject left, InternalListFilesResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListFilesResponseObject left, InternalListFilesResponseObject right) => !left.Equals(right); + public static implicit operator InternalListFilesResponseObject(string value) => new InternalListFilesResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListFilesResponseObject other && Equals(other); + public bool Equals(InternalListFilesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index 9078810a3..33a3a2ca8 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -7,36 +7,40 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobCheckpointsResponse : IJsonModel { + internal InternalListFineTuningJobCheckpointsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListFineTuningJobCheckpointsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true && Optional.IsDefined(FirstId)) + writer.WriteEndArray(); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (Optional.IsDefined(FirstId)) { if (FirstId != null) { @@ -45,10 +49,10 @@ void IJsonModel.Write(Utf8JsonWrit } else { - writer.WriteNull("first_id"); + writer.WriteNull("firstId"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true && Optional.IsDefined(LastId)) + if (Optional.IsDefined(LastId)) { if (LastId != null) { @@ -57,25 +61,18 @@ void IJsonModel.Write(Utf8JsonWrit } else { - writer.WriteNull("last_id"); + writer.WriteNull("lastId"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -84,98 +81,94 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } - InternalListFineTuningJobCheckpointsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListFineTuningJobCheckpointsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListFineTuningJobCheckpointsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListFineTuningJobCheckpointsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListFineTuningJobCheckpointsResponse(document.RootElement, options); } - internal static InternalListFineTuningJobCheckpointsResponse DeserializeInternalListFineTuningJobCheckpointsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListFineTuningJobCheckpointsResponse DeserializeInternalListFineTuningJobCheckpointsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList data = default; + IList data = default; InternalListFineTuningJobCheckpointsResponseObject @object = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalFineTuningJobCheckpoint.DeserializeInternalFineTuningJobCheckpoint(item, options)); } data = array; continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListFineTuningJobCheckpointsResponseObject(property.Value.GetString()); + @object = new InternalListFineTuningJobCheckpointsResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { firstId = null; continue; } - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastId = null; continue; } - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListFineTuningJobCheckpointsResponse( data, @object, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -185,15 +178,16 @@ BinaryData IPersistableModel.Write } } - InternalListFineTuningJobCheckpointsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListFineTuningJobCheckpointsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListFineTuningJobCheckpointsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListFineTuningJobCheckpointsResponse(document.RootElement, options); } default: @@ -203,15 +197,16 @@ InternalListFineTuningJobCheckpointsResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListFineTuningJobCheckpointsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListFineTuningJobCheckpointsResponse internalListFineTuningJobCheckpointsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListFineTuningJobCheckpointsResponse(document.RootElement); + return BinaryContent.Create(internalListFineTuningJobCheckpointsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListFineTuningJobCheckpointsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListFineTuningJobCheckpointsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs index f96a3d96a..f94f4683d 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs @@ -10,34 +10,32 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobCheckpointsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListFineTuningJobCheckpointsResponse(IEnumerable data, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Data = data.ToList(); HasMore = hasMore; } - internal InternalListFineTuningJobCheckpointsResponse(IReadOnlyList data, InternalListFineTuningJobCheckpointsResponseObject @object, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListFineTuningJobCheckpointsResponse(IList data, InternalListFineTuningJobCheckpointsResponseObject @object, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Data = data; Object = @object; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListFineTuningJobCheckpointsResponse() - { - } + public IList Data { get; } + + public InternalListFineTuningJobCheckpointsResponseObject Object { get; } = "list"; + + public string FirstId { get; set; } - public IReadOnlyList Data { get; } - public InternalListFineTuningJobCheckpointsResponseObject Object { get; } = InternalListFineTuningJobCheckpointsResponseObject.List; + public string LastId { get; set; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs index 8a9ca04a3..73a435d76 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalListFineTuningJobCheckpointsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListFineTuningJobCheckpointsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListFineTuningJobCheckpointsResponseObject List { get; } = new InternalListFineTuningJobCheckpointsResponseObject(ListValue); + public static bool operator ==(InternalListFineTuningJobCheckpointsResponseObject left, InternalListFineTuningJobCheckpointsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListFineTuningJobCheckpointsResponseObject left, InternalListFineTuningJobCheckpointsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListFineTuningJobCheckpointsResponseObject(string value) => new InternalListFineTuningJobCheckpointsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListFineTuningJobCheckpointsResponseObject other && Equals(other); + public bool Equals(InternalListFineTuningJobCheckpointsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index 14fbb61f6..31628537b 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -7,51 +7,48 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobEventsResponse : IJsonModel { + internal InternalListFineTuningJobEventsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListFineTuningJobEventsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) - { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,70 +57,66 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } - InternalListFineTuningJobEventsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListFineTuningJobEventsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListFineTuningJobEventsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListFineTuningJobEventsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListFineTuningJobEventsResponse(document.RootElement, options); } - internal static InternalListFineTuningJobEventsResponse DeserializeInternalListFineTuningJobEventsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListFineTuningJobEventsResponse DeserializeInternalListFineTuningJobEventsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } bool hasMore = default; - IReadOnlyList data = default; + IList data = default; InternalListFineTuningJobEventsResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(FineTuningJobEvent.DeserializeFineTuningJobEvent(item, options)); } data = array; continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListFineTuningJobEventsResponseObject(property.Value.GetString()); + @object = new InternalListFineTuningJobEventsResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalListFineTuningJobEventsResponse(hasMore, data, @object, serializedAdditionalRawData); + return new InternalListFineTuningJobEventsResponse(hasMore, data, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -133,15 +126,16 @@ BinaryData IPersistableModel.Write(Mode } } - InternalListFineTuningJobEventsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListFineTuningJobEventsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListFineTuningJobEventsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListFineTuningJobEventsResponse(document.RootElement, options); } default: @@ -151,15 +145,16 @@ InternalListFineTuningJobEventsResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListFineTuningJobEventsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListFineTuningJobEventsResponse internalListFineTuningJobEventsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListFineTuningJobEventsResponse(document.RootElement); + return BinaryContent.Create(internalListFineTuningJobEventsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListFineTuningJobEventsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListFineTuningJobEventsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs index e8e12b311..a1808d9fc 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs @@ -10,29 +10,26 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobEventsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListFineTuningJobEventsResponse(bool hasMore, IEnumerable data) { - Argument.AssertNotNull(data, nameof(data)); - HasMore = hasMore; Data = data.ToList(); } - internal InternalListFineTuningJobEventsResponse(bool hasMore, IReadOnlyList data, InternalListFineTuningJobEventsResponseObject @object, IDictionary serializedAdditionalRawData) + internal InternalListFineTuningJobEventsResponse(bool hasMore, IList data, InternalListFineTuningJobEventsResponseObject @object, IDictionary additionalBinaryDataProperties) { HasMore = hasMore; Data = data; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListFineTuningJobEventsResponse() - { - } + public bool HasMore { get; set; } + + public IList Data { get; } - public bool HasMore { get; } - public IReadOnlyList Data { get; } - public InternalListFineTuningJobEventsResponseObject Object { get; } = InternalListFineTuningJobEventsResponseObject.List; + public InternalListFineTuningJobEventsResponseObject Object { get; } = "list"; } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs index 5f4aa8afb..7c6fe2d0b 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalListFineTuningJobEventsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListFineTuningJobEventsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListFineTuningJobEventsResponseObject List { get; } = new InternalListFineTuningJobEventsResponseObject(ListValue); + public static bool operator ==(InternalListFineTuningJobEventsResponseObject left, InternalListFineTuningJobEventsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListFineTuningJobEventsResponseObject left, InternalListFineTuningJobEventsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListFineTuningJobEventsResponseObject(string value) => new InternalListFineTuningJobEventsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListFineTuningJobEventsResponseObject other && Equals(other); + public bool Equals(InternalListFineTuningJobEventsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index f91fc9dec..b7556b5ea 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalListMessagesResponse : IJsonModel { + internal InternalListMessagesResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListMessagesResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - InternalListMessagesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListMessagesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListMessagesResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListMessagesResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListMessagesResponse(document.RootElement, options); } - internal static InternalListMessagesResponse DeserializeInternalListMessagesResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListMessagesResponse DeserializeInternalListMessagesResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListMessagesResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListMessagesResponseObject(property.Value.GetString()); + @object = new InternalListMessagesResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ThreadMessage.DeserializeThreadMessage(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListMessagesResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - InternalListMessagesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListMessagesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListMessagesResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListMessagesResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListMessagesResponse IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListMessagesResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListMessagesResponse internalListMessagesResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListMessagesResponse(document.RootElement); + return BinaryContent.Create(internalListMessagesResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListMessagesResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListMessagesResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs index 8fd5be212..0af91bdb1 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.Assistants { internal partial class InternalListMessagesResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListMessagesResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListMessagesResponse(InternalListMessagesResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListMessagesResponse(InternalListMessagesResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListMessagesResponse() - { - } + public InternalListMessagesResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListMessagesResponseObject Object { get; } = InternalListMessagesResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs index 44e0d2aba..80a401aba 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalListMessagesResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListMessagesResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListMessagesResponseObject List { get; } = new InternalListMessagesResponseObject(ListValue); + public static bool operator ==(InternalListMessagesResponseObject left, InternalListMessagesResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListMessagesResponseObject left, InternalListMessagesResponseObject right) => !left.Equals(right); + public static implicit operator InternalListMessagesResponseObject(string value) => new InternalListMessagesResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListMessagesResponseObject other && Equals(other); + public bool Equals(InternalListMessagesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs index 29abbc2c7..aece92494 100644 --- a/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Models { internal readonly partial struct InternalListModelsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListModelsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListModelsResponseObject List { get; } = new InternalListModelsResponseObject(ListValue); + public static bool operator ==(InternalListModelsResponseObject left, InternalListModelsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListModelsResponseObject left, InternalListModelsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListModelsResponseObject(string value) => new InternalListModelsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListModelsResponseObject other && Equals(other); + public bool Equals(InternalListModelsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index bde114de7..88cbf4cc8 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -7,51 +7,48 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class InternalListPaginatedFineTuningJobsResponse : IJsonModel { + internal InternalListPaginatedFineTuningJobsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListPaginatedFineTuningJobsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) - { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,70 +57,66 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } - InternalListPaginatedFineTuningJobsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListPaginatedFineTuningJobsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListPaginatedFineTuningJobsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListPaginatedFineTuningJobsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListPaginatedFineTuningJobsResponse(document.RootElement, options); } - internal static InternalListPaginatedFineTuningJobsResponse DeserializeInternalListPaginatedFineTuningJobsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListPaginatedFineTuningJobsResponse DeserializeInternalListPaginatedFineTuningJobsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList data = default; + IList data = default; bool hasMore = default; InternalListPaginatedFineTuningJobsResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(FineTuningJob.DeserializeFineTuningJob(item, options)); } data = array; continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListPaginatedFineTuningJobsResponseObject(property.Value.GetString()); + @object = new InternalListPaginatedFineTuningJobsResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalListPaginatedFineTuningJobsResponse(data, hasMore, @object, serializedAdditionalRawData); + return new InternalListPaginatedFineTuningJobsResponse(data, hasMore, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -133,15 +126,16 @@ BinaryData IPersistableModel.Write( } } - InternalListPaginatedFineTuningJobsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListPaginatedFineTuningJobsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListPaginatedFineTuningJobsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListPaginatedFineTuningJobsResponse(document.RootElement, options); } default: @@ -151,15 +145,16 @@ InternalListPaginatedFineTuningJobsResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListPaginatedFineTuningJobsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListPaginatedFineTuningJobsResponse internalListPaginatedFineTuningJobsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListPaginatedFineTuningJobsResponse(document.RootElement); + return BinaryContent.Create(internalListPaginatedFineTuningJobsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListPaginatedFineTuningJobsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListPaginatedFineTuningJobsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs index 3789ce4e4..e54b9ce17 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs @@ -10,29 +10,26 @@ namespace OpenAI.FineTuning { internal partial class InternalListPaginatedFineTuningJobsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListPaginatedFineTuningJobsResponse(IEnumerable data, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Data = data.ToList(); HasMore = hasMore; } - internal InternalListPaginatedFineTuningJobsResponse(IReadOnlyList data, bool hasMore, InternalListPaginatedFineTuningJobsResponseObject @object, IDictionary serializedAdditionalRawData) + internal InternalListPaginatedFineTuningJobsResponse(IList data, bool hasMore, InternalListPaginatedFineTuningJobsResponseObject @object, IDictionary additionalBinaryDataProperties) { Data = data; HasMore = hasMore; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListPaginatedFineTuningJobsResponse() - { - } + public IList Data { get; } + + public bool HasMore { get; set; } - public IReadOnlyList Data { get; } - public bool HasMore { get; } - public InternalListPaginatedFineTuningJobsResponseObject Object { get; } = InternalListPaginatedFineTuningJobsResponseObject.List; + public InternalListPaginatedFineTuningJobsResponseObject Object { get; } = "list"; } } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs index b9dcd5fb9..4606b7c1b 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.FineTuning { internal readonly partial struct InternalListPaginatedFineTuningJobsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListPaginatedFineTuningJobsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListPaginatedFineTuningJobsResponseObject List { get; } = new InternalListPaginatedFineTuningJobsResponseObject(ListValue); + public static bool operator ==(InternalListPaginatedFineTuningJobsResponseObject left, InternalListPaginatedFineTuningJobsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListPaginatedFineTuningJobsResponseObject left, InternalListPaginatedFineTuningJobsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListPaginatedFineTuningJobsResponseObject(string value) => new InternalListPaginatedFineTuningJobsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListPaginatedFineTuningJobsResponseObject other && Equals(other); + public bool Equals(InternalListPaginatedFineTuningJobsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 74e2033af..a53ebc660 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalListRunStepsResponse : IJsonModel { + internal InternalListRunStepsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListRunStepsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - InternalListRunStepsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListRunStepsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListRunStepsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListRunStepsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListRunStepsResponse(document.RootElement, options); } - internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListRunStepsResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListRunStepsResponseObject(property.Value.GetString()); + @object = new InternalListRunStepsResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(RunStep.DeserializeRunStep(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListRunStepsResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - InternalListRunStepsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListRunStepsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListRunStepsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListRunStepsResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListRunStepsResponse IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListRunStepsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListRunStepsResponse internalListRunStepsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListRunStepsResponse(document.RootElement); + return BinaryContent.Create(internalListRunStepsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListRunStepsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListRunStepsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs index 4ef3eb223..bdaf82d25 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.Assistants { internal partial class InternalListRunStepsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListRunStepsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListRunStepsResponse() - { - } + public InternalListRunStepsResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListRunStepsResponseObject Object { get; } = InternalListRunStepsResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs index c554f8ae4..99039f3f9 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalListRunStepsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListRunStepsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListRunStepsResponseObject List { get; } = new InternalListRunStepsResponseObject(ListValue); + public static bool operator ==(InternalListRunStepsResponseObject left, InternalListRunStepsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListRunStepsResponseObject left, InternalListRunStepsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListRunStepsResponseObject(string value) => new InternalListRunStepsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListRunStepsResponseObject other && Equals(other); + public bool Equals(InternalListRunStepsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index 049905e5d..68b86ed99 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalListRunsResponse : IJsonModel { + internal InternalListRunsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListRunsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } - InternalListRunsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListRunsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListRunsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListRunsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListRunsResponse(document.RootElement, options); } - internal static InternalListRunsResponse DeserializeInternalListRunsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListRunsResponse DeserializeInternalListRunsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListRunsResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListRunsResponseObject(property.Value.GetString()); + @object = new InternalListRunsResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ThreadRun.DeserializeThreadRun(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListRunsResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - InternalListRunsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListRunsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListRunsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListRunsResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListRunsResponse IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListRunsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListRunsResponse internalListRunsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListRunsResponse(document.RootElement); + return BinaryContent.Create(internalListRunsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListRunsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListRunsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs index 4f10784e6..683525eab 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.Assistants { internal partial class InternalListRunsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListRunsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListRunsResponse(InternalListRunsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListRunsResponse(InternalListRunsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListRunsResponse() - { - } + public InternalListRunsResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListRunsResponseObject Object { get; } = InternalListRunsResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs index 68d723f1c..4d1fa4fc2 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalListRunsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListRunsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListRunsResponseObject List { get; } = new InternalListRunsResponseObject(ListValue); + public static bool operator ==(InternalListRunsResponseObject left, InternalListRunsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListRunsResponseObject left, InternalListRunsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListRunsResponseObject(string value) => new InternalListRunsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListRunsResponseObject other && Equals(other); + public bool Equals(InternalListRunsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index 9a4ec1998..4262c1de5 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalListThreadsResponse : IJsonModel { + internal InternalListThreadsResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListThreadsResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - InternalListThreadsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListThreadsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListThreadsResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListThreadsResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListThreadsResponse(document.RootElement, options); } - internal static InternalListThreadsResponse DeserializeInternalListThreadsResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListThreadsResponse DeserializeInternalListThreadsResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListThreadsResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListThreadsResponseObject(property.Value.GetString()); + @object = new InternalListThreadsResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(AssistantThread.DeserializeAssistantThread(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListThreadsResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - InternalListThreadsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListThreadsResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListThreadsResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListThreadsResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListThreadsResponse IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListThreadsResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListThreadsResponse internalListThreadsResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListThreadsResponse(document.RootElement); + return BinaryContent.Create(internalListThreadsResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListThreadsResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListThreadsResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs index 0424339fa..ef64e7a33 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.Assistants { internal partial class InternalListThreadsResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListThreadsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListThreadsResponse() - { - } + public InternalListThreadsResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListThreadsResponseObject Object { get; } = InternalListThreadsResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs index 8fc2b64bf..d2cf19ac9 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalListThreadsResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListThreadsResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListThreadsResponseObject List { get; } = new InternalListThreadsResponseObject(ListValue); + public static bool operator ==(InternalListThreadsResponseObject left, InternalListThreadsResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListThreadsResponseObject left, InternalListThreadsResponseObject right) => !left.Equals(right); + public static implicit operator InternalListThreadsResponseObject(string value) => new InternalListThreadsResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListThreadsResponseObject other && Equals(other); + public bool Equals(InternalListThreadsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index 3b5f44ef5..dc7b67fdc 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalListVectorStoreFilesResponse : IJsonModel { + internal InternalListVectorStoreFilesResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListVectorStoreFilesResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } - InternalListVectorStoreFilesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListVectorStoreFilesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListVectorStoreFilesResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListVectorStoreFilesResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListVectorStoreFilesResponse(document.RootElement, options); } - internal static InternalListVectorStoreFilesResponse DeserializeInternalListVectorStoreFilesResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListVectorStoreFilesResponse DeserializeInternalListVectorStoreFilesResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListVectorStoreFilesResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListVectorStoreFilesResponseObject(property.Value.GetString()); + @object = new InternalListVectorStoreFilesResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(VectorStoreFileAssociation.DeserializeVectorStoreFileAssociation(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListVectorStoreFilesResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelRe } } - InternalListVectorStoreFilesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListVectorStoreFilesResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListVectorStoreFilesResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListVectorStoreFilesResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListVectorStoreFilesResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListVectorStoreFilesResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListVectorStoreFilesResponse internalListVectorStoreFilesResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListVectorStoreFilesResponse(document.RootElement); + return BinaryContent.Create(internalListVectorStoreFilesResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListVectorStoreFilesResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListVectorStoreFilesResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs index cef502099..58584dbed 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoreFilesResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListVectorStoreFilesResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListVectorStoreFilesResponse() - { - } + public InternalListVectorStoreFilesResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListVectorStoreFilesResponseObject Object { get; } = InternalListVectorStoreFilesResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs index bc320af37..61323e295 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalListVectorStoreFilesResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListVectorStoreFilesResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListVectorStoreFilesResponseObject List { get; } = new InternalListVectorStoreFilesResponseObject(ListValue); + public static bool operator ==(InternalListVectorStoreFilesResponseObject left, InternalListVectorStoreFilesResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListVectorStoreFilesResponseObject left, InternalListVectorStoreFilesResponseObject right) => !left.Equals(right); + public static implicit operator InternalListVectorStoreFilesResponseObject(string value) => new InternalListVectorStoreFilesResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListVectorStoreFilesResponseObject other && Equals(other); + public bool Equals(InternalListVectorStoreFilesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index e01ffb73e..8b465c0cd 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -7,61 +7,52 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalListVectorStoresResponse : IJsonModel { + internal InternalListVectorStoresResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListVectorStoresResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("data") != true) - { - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("first_id") != true) - { - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - } - if (SerializedAdditionalRawData?.ContainsKey("last_id") != true) - { - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - } - if (SerializedAdditionalRawData?.ContainsKey("has_more") != true) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) { - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,88 +61,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } - InternalListVectorStoresResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalListVectorStoresResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalListVectorStoresResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalListVectorStoresResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalListVectorStoresResponse(document.RootElement, options); } - internal static InternalListVectorStoresResponse DeserializeInternalListVectorStoresResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalListVectorStoresResponse DeserializeInternalListVectorStoresResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalListVectorStoresResponseObject @object = default; - IReadOnlyList data = default; + IList data = default; string firstId = default; string lastId = default; bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalListVectorStoresResponseObject(property.Value.GetString()); + @object = new InternalListVectorStoresResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("data"u8)) + if (prop.NameEquals("data"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(VectorStore.DeserializeVectorStore(item, options)); } data = array; continue; } - if (property.NameEquals("first_id"u8)) + if (prop.NameEquals("first_id"u8)) { - firstId = property.Value.GetString(); + firstId = prop.Value.GetString(); continue; } - if (property.NameEquals("last_id"u8)) + if (prop.NameEquals("last_id"u8)) { - lastId = property.Value.GetString(); + lastId = prop.Value.GetString(); continue; } - if (property.NameEquals("has_more"u8)) + if (prop.NameEquals("has_more"u8)) { - hasMore = property.Value.GetBoolean(); + hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalListVectorStoresResponse( @object, data, firstId, lastId, hasMore, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -161,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalListVectorStoresResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalListVectorStoresResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalListVectorStoresResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalListVectorStoresResponse(document.RootElement, options); } default: @@ -179,15 +167,16 @@ InternalListVectorStoresResponse IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalListVectorStoresResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalListVectorStoresResponse internalListVectorStoresResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalListVectorStoresResponse(document.RootElement); + return BinaryContent.Create(internalListVectorStoresResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalListVectorStoresResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalListVectorStoresResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs index 98135e24b..89bc2cf8c 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs @@ -10,38 +10,34 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoresResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalListVectorStoresResponse(IEnumerable data, string firstId, string lastId, bool hasMore) { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - Data = data.ToList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; FirstId = firstId; LastId = lastId; HasMore = hasMore; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalListVectorStoresResponse() - { - } + public InternalListVectorStoresResponseObject Object { get; } = "list"; + + public IList Data { get; } + + public string FirstId { get; set; } - public InternalListVectorStoresResponseObject Object { get; } = InternalListVectorStoresResponseObject.List; + public string LastId { get; set; } - public IReadOnlyList Data { get; } - public string FirstId { get; } - public string LastId { get; } - public bool HasMore { get; } + public bool HasMore { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs index 1f3c8a3f2..d46a9aa4e 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalListVectorStoresResponseObject : IEquatable { private readonly string _value; + private const string ListValue = "list"; public InternalListVectorStoresResponseObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ListValue = "list"; + _value = value; + } public static InternalListVectorStoresResponseObject List { get; } = new InternalListVectorStoresResponseObject(ListValue); + public static bool operator ==(InternalListVectorStoresResponseObject left, InternalListVectorStoresResponseObject right) => left.Equals(right); + public static bool operator !=(InternalListVectorStoresResponseObject left, InternalListVectorStoresResponseObject right) => !left.Equals(right); + public static implicit operator InternalListVectorStoresResponseObject(string value) => new InternalListVectorStoresResponseObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalListVectorStoresResponseObject other && Equals(other); + public bool Equals(InternalListVectorStoresResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs index c6099b4c4..dfb83dfd1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentImageFileObjectImageFileDetail : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LowValue = "low"; + private const string HighValue = "high"; public InternalMessageContentImageFileObjectImageFileDetail(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; + _value = value; + } public static InternalMessageContentImageFileObjectImageFileDetail Auto { get; } = new InternalMessageContentImageFileObjectImageFileDetail(AutoValue); + public static InternalMessageContentImageFileObjectImageFileDetail Low { get; } = new InternalMessageContentImageFileObjectImageFileDetail(LowValue); + public static InternalMessageContentImageFileObjectImageFileDetail High { get; } = new InternalMessageContentImageFileObjectImageFileDetail(HighValue); + public static bool operator ==(InternalMessageContentImageFileObjectImageFileDetail left, InternalMessageContentImageFileObjectImageFileDetail right) => left.Equals(right); + public static bool operator !=(InternalMessageContentImageFileObjectImageFileDetail left, InternalMessageContentImageFileObjectImageFileDetail right) => !left.Equals(right); + public static implicit operator InternalMessageContentImageFileObjectImageFileDetail(string value) => new InternalMessageContentImageFileObjectImageFileDetail(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentImageFileObjectImageFileDetail other && Equals(other); + public bool Equals(InternalMessageContentImageFileObjectImageFileDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs index 716165ec3..9c7870d76 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentImageFileObjectType : IEquatable { private readonly string _value; + private const string ImageFileValue = "image_file"; public InternalMessageContentImageFileObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ImageFileValue = "image_file"; + _value = value; + } public static InternalMessageContentImageFileObjectType ImageFile { get; } = new InternalMessageContentImageFileObjectType(ImageFileValue); + public static bool operator ==(InternalMessageContentImageFileObjectType left, InternalMessageContentImageFileObjectType right) => left.Equals(right); + public static bool operator !=(InternalMessageContentImageFileObjectType left, InternalMessageContentImageFileObjectType right) => !left.Equals(right); + public static implicit operator InternalMessageContentImageFileObjectType(string value) => new InternalMessageContentImageFileObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentImageFileObjectType other && Equals(other); + public bool Equals(InternalMessageContentImageFileObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 376726676..10ab39f88 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -7,41 +7,44 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentImageUrlObjectImageUrl : IJsonModel { + internal InternalMessageContentImageUrlObjectImageUrl() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentImageUrlObjectImageUrl)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("url") != true) - { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); - } - if (SerializedAdditionalRawData?.ContainsKey("detail") != true && Optional.IsDefined(Detail)) + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url.AbsoluteUri); + if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +53,60 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } - InternalMessageContentImageUrlObjectImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentImageUrlObjectImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentImageUrlObjectImageUrl JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentImageUrlObjectImageUrl)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentImageUrlObjectImageUrl(document.RootElement, options); } - internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternalMessageContentImageUrlObjectImageUrl(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternalMessageContentImageUrlObjectImageUrl(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } Uri url = default; - string detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalMessageContentImageUrlObjectImageUrlDetail? detail = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("url"u8)) + if (prop.NameEquals("url"u8)) { - url = new Uri(property.Value.GetString()); + url = new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("detail"u8)) + if (prop.NameEquals("detail"u8)) { - detail = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } + detail = new InternalMessageContentImageUrlObjectImageUrlDetail(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageContentImageUrlObjectImageUrl(url, detail, serializedAdditionalRawData); + return new InternalMessageContentImageUrlObjectImageUrl(url, detail, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +116,16 @@ BinaryData IPersistableModel.Write } } - InternalMessageContentImageUrlObjectImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentImageUrlObjectImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentImageUrlObjectImageUrl PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentImageUrlObjectImageUrl(document.RootElement, options); } default: @@ -130,15 +135,16 @@ InternalMessageContentImageUrlObjectImageUrl IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentImageUrlObjectImageUrl FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentImageUrlObjectImageUrl internalMessageContentImageUrlObjectImageUrl) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentImageUrlObjectImageUrl(document.RootElement); + return BinaryContent.Create(internalMessageContentImageUrlObjectImageUrl, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentImageUrlObjectImageUrl(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentImageUrlObjectImageUrl(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs index ec3f49b7f..bc12d334c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentImageUrlObjectImageUrl { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalMessageContentImageUrlObjectImageUrl(Uri url) { Argument.AssertNotNull(url, nameof(url)); @@ -17,15 +19,11 @@ public InternalMessageContentImageUrlObjectImageUrl(Uri url) Url = url; } - internal InternalMessageContentImageUrlObjectImageUrl(Uri url, string detail, IDictionary serializedAdditionalRawData) + internal InternalMessageContentImageUrlObjectImageUrl(Uri url, InternalMessageContentImageUrlObjectImageUrlDetail? detail, IDictionary additionalBinaryDataProperties) { Url = url; Detail = detail; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalMessageContentImageUrlObjectImageUrl() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public Uri Url { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs index 1ae9181d0..f3a9f7a9f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentImageUrlObjectImageUrlDetail : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LowValue = "low"; + private const string HighValue = "high"; public InternalMessageContentImageUrlObjectImageUrlDetail(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; + _value = value; + } public static InternalMessageContentImageUrlObjectImageUrlDetail Auto { get; } = new InternalMessageContentImageUrlObjectImageUrlDetail(AutoValue); + public static InternalMessageContentImageUrlObjectImageUrlDetail Low { get; } = new InternalMessageContentImageUrlObjectImageUrlDetail(LowValue); + public static InternalMessageContentImageUrlObjectImageUrlDetail High { get; } = new InternalMessageContentImageUrlObjectImageUrlDetail(HighValue); + public static bool operator ==(InternalMessageContentImageUrlObjectImageUrlDetail left, InternalMessageContentImageUrlObjectImageUrlDetail right) => left.Equals(right); + public static bool operator !=(InternalMessageContentImageUrlObjectImageUrlDetail left, InternalMessageContentImageUrlObjectImageUrlDetail right) => !left.Equals(right); + public static implicit operator InternalMessageContentImageUrlObjectImageUrlDetail(string value) => new InternalMessageContentImageUrlObjectImageUrlDetail(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentImageUrlObjectImageUrlDetail other && Equals(other); + public bool Equals(InternalMessageContentImageUrlObjectImageUrlDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs index 741398764..b45ee019a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentImageUrlObjectType : IEquatable { private readonly string _value; + private const string ImageUrlValue = "image_url"; public InternalMessageContentImageUrlObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ImageUrlValue = "image_url"; + _value = value; + } public static InternalMessageContentImageUrlObjectType ImageUrl { get; } = new InternalMessageContentImageUrlObjectType(ImageUrlValue); + public static bool operator ==(InternalMessageContentImageUrlObjectType left, InternalMessageContentImageUrlObjectType right) => left.Equals(right); + public static bool operator !=(InternalMessageContentImageUrlObjectType left, InternalMessageContentImageUrlObjectType right) => !left.Equals(right); + public static implicit operator InternalMessageContentImageUrlObjectType(string value) => new InternalMessageContentImageUrlObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentImageUrlObjectType other && Equals(other); + public bool Equals(InternalMessageContentImageUrlObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index a05a67384..5e0aa57da 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -7,41 +7,44 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentItemFileObjectImageFile : IJsonModel { + internal InternalMessageContentItemFileObjectImageFile() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentItemFileObjectImageFile)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("detail") != true && Optional.IsDefined(Detail)) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +53,60 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } - InternalMessageContentItemFileObjectImageFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentItemFileObjectImageFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentItemFileObjectImageFile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentItemFileObjectImageFile)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentItemFileObjectImageFile(document.RootElement, options); } - internal static InternalMessageContentItemFileObjectImageFile DeserializeInternalMessageContentItemFileObjectImageFile(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentItemFileObjectImageFile DeserializeInternalMessageContentItemFileObjectImageFile(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - string detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalMessageContentImageFileObjectImageFileDetail? detail = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("detail"u8)) + if (prop.NameEquals("detail"u8)) { - detail = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } + detail = new InternalMessageContentImageFileObjectImageFileDetail(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageContentItemFileObjectImageFile(fileId, detail, serializedAdditionalRawData); + return new InternalMessageContentItemFileObjectImageFile(fileId, detail, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +116,16 @@ BinaryData IPersistableModel.Writ } } - InternalMessageContentItemFileObjectImageFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentItemFileObjectImageFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentItemFileObjectImageFile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentItemFileObjectImageFile(document.RootElement, options); } default: @@ -130,15 +135,16 @@ InternalMessageContentItemFileObjectImageFile IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentItemFileObjectImageFile FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentItemFileObjectImageFile internalMessageContentItemFileObjectImageFile) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentItemFileObjectImageFile(document.RootElement); + return BinaryContent.Create(internalMessageContentItemFileObjectImageFile, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentItemFileObjectImageFile(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentItemFileObjectImageFile(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs index b002cac9f..260af5630 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentItemFileObjectImageFile { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalMessageContentItemFileObjectImageFile(string fileId) { Argument.AssertNotNull(fileId, nameof(fileId)); @@ -17,15 +19,11 @@ public InternalMessageContentItemFileObjectImageFile(string fileId) FileId = fileId; } - internal InternalMessageContentItemFileObjectImageFile(string fileId, string detail, IDictionary serializedAdditionalRawData) + internal InternalMessageContentItemFileObjectImageFile(string fileId, InternalMessageContentImageFileObjectImageFileDetail? detail, IDictionary additionalBinaryDataProperties) { FileId = fileId; Detail = detail; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalMessageContentItemFileObjectImageFile() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string FileId { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs index 7a127f292..325e45e68 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentRefusalObjectType : IEquatable { private readonly string _value; + private const string RefusalValue = "refusal"; public InternalMessageContentRefusalObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string RefusalValue = "refusal"; + _value = value; + } public static InternalMessageContentRefusalObjectType Refusal { get; } = new InternalMessageContentRefusalObjectType(RefusalValue); + public static bool operator ==(InternalMessageContentRefusalObjectType left, InternalMessageContentRefusalObjectType right) => left.Equals(right); + public static bool operator !=(InternalMessageContentRefusalObjectType left, InternalMessageContentRefusalObjectType right) => !left.Equals(right); + public static implicit operator InternalMessageContentRefusalObjectType(string value) => new InternalMessageContentRefusalObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentRefusalObjectType other && Equals(other); + public bool Equals(InternalMessageContentRefusalObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index a2d9393c1..7b45057c6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -7,83 +7,56 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObject : IJsonModel { + internal InternalMessageContentTextAnnotationsFileCitationObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("file_citation") != true) - { - writer.WritePropertyName("file_citation"u8); - writer.WriteObjectValue(FileCitation, options); - } - if (SerializedAdditionalRawData?.ContainsKey("start_index") != true) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("end_index") != true) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("file_citation"u8); + writer.WriteObjectValue(FileCitation, options); + writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex); + writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex); } - InternalMessageContentTextAnnotationsFileCitationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextAnnotationsFileCitationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFileCitationObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageContentTextObjectAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextAnnotationsFileCitationObject(document.RootElement, options); } - internal static InternalMessageContentTextAnnotationsFileCitationObject DeserializeInternalMessageContentTextAnnotationsFileCitationObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextAnnotationsFileCitationObject DeserializeInternalMessageContentTextAnnotationsFileCitationObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -92,56 +65,54 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation = default; int startIndex = default; int endIndex = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_citation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("file_citation"u8)) + if (prop.NameEquals("file_citation"u8)) { - fileCitation = InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(property.Value, options); + fileCitation = InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(prop.Value, options); continue; } - if (property.NameEquals("start_index"u8)) + if (prop.NameEquals("start_index"u8)) { - startIndex = property.Value.GetInt32(); + startIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("end_index"u8)) + if (prop.NameEquals("end_index"u8)) { - endIndex = property.Value.GetInt32(); + endIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalMessageContentTextAnnotationsFileCitationObject( - type, - serializedAdditionalRawData, text, fileCitation, startIndex, - endIndex); + endIndex, + @type, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -151,15 +122,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextAnnotationsFileCitationObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFileCitationObject)PersistableModelCreateCore(data, options); + protected override InternalMessageContentTextObjectAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextAnnotationsFileCitationObject(document.RootElement, options); } default: @@ -169,15 +141,16 @@ InternalMessageContentTextAnnotationsFileCitationObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageContentTextAnnotationsFileCitationObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFileCitationObject internalMessageContentTextAnnotationsFileCitationObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextAnnotationsFileCitationObject(document.RootElement); + return BinaryContent.Create(internalMessageContentTextAnnotationsFileCitationObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextAnnotationsFileCitationObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextAnnotationsFileCitationObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs index f1a6d8ea9..db793d89f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs @@ -4,24 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObject : InternalMessageContentTextObjectAnnotation { - public InternalMessageContentTextAnnotationsFileCitationObject(string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex) + public InternalMessageContentTextAnnotationsFileCitationObject(string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex) : base("file_citation") { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(fileCitation, nameof(fileCitation)); - Type = "file_citation"; Text = text; FileCitation = fileCitation; StartIndex = startIndex; EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFileCitationObject(string type, IDictionary serializedAdditionalRawData, string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex) : base(type, serializedAdditionalRawData) + internal InternalMessageContentTextAnnotationsFileCitationObject(string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Text = text; FileCitation = fileCitation; @@ -29,13 +29,12 @@ internal InternalMessageContentTextAnnotationsFileCitationObject(string type, ID EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFileCitationObject() - { - } - public string Text { get; set; } + public InternalMessageContentTextAnnotationsFileCitationObjectFileCitation FileCitation { get; set; } + public int StartIndex { get; set; } + public int EndIndex { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index b18974701..7f1888078 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObjectFileCitation : IJsonModel { + internal InternalMessageContentTextAnnotationsFileCitationObjectFileCitation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObjectFileCitation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextAnnotationsFileCitationObjectFileCitation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentTextAnnotationsFileCitationObjectFileCitation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObjectFileCitation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, options); } - internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitation DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitation DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(fileId, serializedAdditionalRawData); + return new InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(fileId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextAnnotationsFileCitationObjectFileCitation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentTextAnnotationsFileCitationObjectFileCitation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalMessageContentTextAnnotationsFileCitationObjectFileCitation IPersistable string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFileCitationObjectFileCitation internalMessageContentTextAnnotationsFileCitationObjectFileCitation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement); + return BinaryContent.Create(internalMessageContentTextAnnotationsFileCitationObjectFileCitation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs index 1c255cb2c..1675ffc5b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObjectFileCitation { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(string fileId) { Argument.AssertNotNull(fileId, nameof(fileId)); @@ -17,14 +19,10 @@ public InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(strin FileId = fileId; } - internal InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(string fileId, IDictionary serializedAdditionalRawData) + internal InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(string fileId, IDictionary additionalBinaryDataProperties) { FileId = fileId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalMessageContentTextAnnotationsFileCitationObjectFileCitation() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string FileId { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index c06a4f2d7..f58de5b87 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -7,83 +7,56 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObject : IJsonModel { + internal InternalMessageContentTextAnnotationsFilePathObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("file_path") != true) - { - writer.WritePropertyName("file_path"u8); - writer.WriteObjectValue(FilePath, options); - } - if (SerializedAdditionalRawData?.ContainsKey("start_index") != true) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("end_index") != true) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("file_path"u8); + writer.WriteObjectValue(FilePath, options); + writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex); + writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex); } - InternalMessageContentTextAnnotationsFilePathObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextAnnotationsFilePathObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFilePathObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageContentTextObjectAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextAnnotationsFilePathObject(document.RootElement, options); } - internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeInternalMessageContentTextAnnotationsFilePathObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeInternalMessageContentTextAnnotationsFilePathObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -92,56 +65,54 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath = default; int startIndex = default; int endIndex = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_path"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("file_path"u8)) + if (prop.NameEquals("file_path"u8)) { - filePath = InternalMessageContentTextAnnotationsFilePathObjectFilePath.DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(property.Value, options); + filePath = InternalMessageContentTextAnnotationsFilePathObjectFilePath.DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(prop.Value, options); continue; } - if (property.NameEquals("start_index"u8)) + if (prop.NameEquals("start_index"u8)) { - startIndex = property.Value.GetInt32(); + startIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("end_index"u8)) + if (prop.NameEquals("end_index"u8)) { - endIndex = property.Value.GetInt32(); + endIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalMessageContentTextAnnotationsFilePathObject( - type, - serializedAdditionalRawData, text, filePath, startIndex, - endIndex); + endIndex, + @type, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -151,15 +122,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextAnnotationsFilePathObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFilePathObject)PersistableModelCreateCore(data, options); + protected override InternalMessageContentTextObjectAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextAnnotationsFilePathObject(document.RootElement, options); } default: @@ -169,15 +141,16 @@ InternalMessageContentTextAnnotationsFilePathObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageContentTextAnnotationsFilePathObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFilePathObject internalMessageContentTextAnnotationsFilePathObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextAnnotationsFilePathObject(document.RootElement); + return BinaryContent.Create(internalMessageContentTextAnnotationsFilePathObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextAnnotationsFilePathObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextAnnotationsFilePathObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs index c0098007c..37641dc68 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs @@ -4,24 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObject : InternalMessageContentTextObjectAnnotation { - public InternalMessageContentTextAnnotationsFilePathObject(string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex) + public InternalMessageContentTextAnnotationsFilePathObject(string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex) : base("file_path") { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(filePath, nameof(filePath)); - Type = "file_path"; Text = text; FilePath = filePath; StartIndex = startIndex; EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFilePathObject(string type, IDictionary serializedAdditionalRawData, string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex) : base(type, serializedAdditionalRawData) + internal InternalMessageContentTextAnnotationsFilePathObject(string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Text = text; FilePath = filePath; @@ -29,13 +29,12 @@ internal InternalMessageContentTextAnnotationsFilePathObject(string type, IDicti EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFilePathObject() - { - } - public string Text { get; set; } + public InternalMessageContentTextAnnotationsFilePathObjectFilePath FilePath { get; set; } + public int StartIndex { get; set; } + public int EndIndex { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index e398f1480..a8a99b8a9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObjectFilePath : IJsonModel { + internal InternalMessageContentTextAnnotationsFilePathObjectFilePath() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObjectFilePath)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } - InternalMessageContentTextAnnotationsFilePathObjectFilePath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextAnnotationsFilePathObjectFilePath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentTextAnnotationsFilePathObjectFilePath JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObjectFilePath)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(document.RootElement, options); } - internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageContentTextAnnotationsFilePathObjectFilePath(fileId, serializedAdditionalRawData); + return new InternalMessageContentTextAnnotationsFilePathObjectFilePath(fileId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextAnnotationsFilePathObjectFilePath IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentTextAnnotationsFilePathObjectFilePath PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalMessageContentTextAnnotationsFilePathObjectFilePath IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFilePathObjectFilePath internalMessageContentTextAnnotationsFilePathObjectFilePath) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(document.RootElement); + return BinaryContent.Create(internalMessageContentTextAnnotationsFilePathObjectFilePath, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextAnnotationsFilePathObjectFilePath(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextAnnotationsFilePathObjectFilePath(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs index de47c05b1..74bad6595 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObjectFilePath { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId) { Argument.AssertNotNull(fileId, nameof(fileId)); @@ -17,14 +19,10 @@ public InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId FileId = fileId; } - internal InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId, IDictionary serializedAdditionalRawData) + internal InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId, IDictionary additionalBinaryDataProperties) { FileId = fileId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalMessageContentTextAnnotationsFilePathObjectFilePath() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string FileId { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index 92f8d5b79..cea26d35f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownMessageContentTextObjectAnnotation))] - internal partial class InternalMessageContentTextObjectAnnotation : IJsonModel + internal abstract partial class InternalMessageContentTextObjectAnnotation : IJsonModel { + internal InternalMessageContentTextObjectAnnotation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectAnnotation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentTextObjectAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectAnnotation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement, options); } - internal static InternalMessageContentTextObjectAnnotation DeserializeInternalMessageContentTextObjectAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextObjectAnnotation DeserializeInternalMessageContentTextObjectAnnotation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "file_citation": return InternalMessageContentTextAnnotationsFileCitationObject.DeserializeInternalMessageContentTextAnnotationsFileCitationObject(element, options); - case "file_path": return InternalMessageContentTextAnnotationsFilePathObject.DeserializeInternalMessageContentTextAnnotationsFilePathObject(element, options); + case "file_citation": + return InternalMessageContentTextAnnotationsFileCitationObject.DeserializeInternalMessageContentTextAnnotationsFileCitationObject(element, options); + case "file_path": + return InternalMessageContentTextAnnotationsFilePathObject.DeserializeInternalMessageContentTextAnnotationsFilePathObject(element, options); } } return UnknownMessageContentTextObjectAnnotation.DeserializeUnknownMessageContentTextObjectAnnotation(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(M } } - InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentTextObjectAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement, options); } default: @@ -110,15 +115,16 @@ InternalMessageContentTextObjectAnnotation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentTextObjectAnnotation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextObjectAnnotation internalMessageContentTextObjectAnnotation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement); + return BinaryContent.Create(internalMessageContentTextObjectAnnotation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextObjectAnnotation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs index 4e2df613a..19d010ea8 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageContentTextObjectAnnotation { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalMessageContentTextObjectAnnotation() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalMessageContentTextObjectAnnotation(string @type) { + Type = @type; } - internal InternalMessageContentTextObjectAnnotation(string type, IDictionary serializedAdditionalRawData) + internal InternalMessageContentTextObjectAnnotation(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index 0c951aee1..8d4d20cd4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -7,46 +7,46 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextObjectText : IJsonModel { + internal InternalMessageContentTextObjectText() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectText)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("value") != true) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (SerializedAdditionalRawData?.ContainsKey("annotations") != true) + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + writer.WritePropertyName("annotations"u8); + writer.WriteStartArray(); + foreach (var item in Annotations) { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,64 +55,60 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } - InternalMessageContentTextObjectText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextObjectText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageContentTextObjectText JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectText)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextObjectText(document.RootElement, options); } - internal static InternalMessageContentTextObjectText DeserializeInternalMessageContentTextObjectText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageContentTextObjectText DeserializeInternalMessageContentTextObjectText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string value = default; IList annotations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { - value = property.Value.GetString(); + value = prop.Value.GetString(); continue; } - if (property.NameEquals("annotations"u8)) + if (prop.NameEquals("annotations"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalMessageContentTextObjectAnnotation.DeserializeInternalMessageContentTextObjectAnnotation(item, options)); } annotations = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageContentTextObjectText(value, annotations, serializedAdditionalRawData); + return new InternalMessageContentTextObjectText(value, annotations, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +118,16 @@ BinaryData IPersistableModel.Write(ModelRe } } - InternalMessageContentTextObjectText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextObjectText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageContentTextObjectText PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextObjectText(document.RootElement, options); } default: @@ -140,15 +137,16 @@ InternalMessageContentTextObjectText IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageContentTextObjectText FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageContentTextObjectText internalMessageContentTextObjectText) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageContentTextObjectText(document.RootElement); + return BinaryContent.Create(internalMessageContentTextObjectText, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageContentTextObjectText(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageContentTextObjectText(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs index 3ebc901f8..11fcd92ae 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs @@ -5,12 +5,14 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageContentTextObjectText { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalMessageContentTextObjectText(string value, IEnumerable annotations) { Argument.AssertNotNull(value, nameof(value)); @@ -20,18 +22,15 @@ public InternalMessageContentTextObjectText(string value, IEnumerable annotations, IDictionary serializedAdditionalRawData) + internal InternalMessageContentTextObjectText(string value, IList annotations, IDictionary additionalBinaryDataProperties) { Value = value; Annotations = annotations; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalMessageContentTextObjectText() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Value { get; set; } + public IList Annotations { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs index daf657e15..d4dc38cff 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageContentTextObjectType : IEquatable { private readonly string _value; + private const string TextValue = "text"; public InternalMessageContentTextObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; + _value = value; + } public static InternalMessageContentTextObjectType Text { get; } = new InternalMessageContentTextObjectType(TextValue); + public static bool operator ==(InternalMessageContentTextObjectType left, InternalMessageContentTextObjectType right) => left.Equals(right); + public static bool operator !=(InternalMessageContentTextObjectType left, InternalMessageContentTextObjectType right) => !left.Equals(right); + public static implicit operator InternalMessageContentTextObjectType(string value) => new InternalMessageContentTextObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageContentTextObjectType other && Equals(other); + public bool Equals(InternalMessageContentTextObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index 7b0d037e3..da2f77930 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownMessageDeltaContent))] - internal partial class InternalMessageDeltaContent : IJsonModel + internal abstract partial class InternalMessageDeltaContent : IJsonModel { + internal InternalMessageDeltaContent() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContent)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,46 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContent(document.RootElement, options); } - internal static InternalMessageDeltaContent DeserializeInternalMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContent DeserializeInternalMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "image_file": return InternalMessageDeltaContentImageFileObject.DeserializeInternalMessageDeltaContentImageFileObject(element, options); - case "image_url": return InternalMessageDeltaContentImageUrlObject.DeserializeInternalMessageDeltaContentImageUrlObject(element, options); - case "refusal": return InternalMessageDeltaContentRefusalObject.DeserializeInternalMessageDeltaContentRefusalObject(element, options); - case "text": return InternalMessageDeltaContentTextObject.DeserializeInternalMessageDeltaContentTextObject(element, options); + case "image_file": + return InternalMessageDeltaContentImageFileObject.DeserializeInternalMessageDeltaContentImageFileObject(element, options); + case "image_url": + return InternalMessageDeltaContentImageUrlObject.DeserializeInternalMessageDeltaContentImageUrlObject(element, options); + case "text": + return InternalMessageDeltaContentTextObject.DeserializeInternalMessageDeltaContentTextObject(element, options); + case "refusal": + return InternalMessageDeltaContentRefusalObject.DeserializeInternalMessageDeltaContentRefusalObject(element, options); } } return UnknownMessageDeltaContent.DeserializeUnknownMessageDeltaContent(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -94,15 +100,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContent(document.RootElement, options); } default: @@ -112,15 +119,16 @@ InternalMessageDeltaContent IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContent internalMessageDeltaContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContent(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContent, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs index 861574e93..8bc7ed768 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaContent { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalMessageDeltaContent() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalMessageDeltaContent(string @type) { + Type = @type; } - internal InternalMessageDeltaContent(string type, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContent(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index 56a49b626..5c986c14b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -7,117 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageFileObject : IJsonModel { + internal InternalMessageDeltaContentImageFileObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("image_file") != true && Optional.IsDefined(ImageFile)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(ImageFile)) { writer.WritePropertyName("image_file"u8); writer.WriteObjectValue(ImageFile, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentImageFileObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentImageFileObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentImageFileObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentImageFileObject(document.RootElement, options); } - internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMessageDeltaContentImageFileObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMessageDeltaContentImageFileObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; InternalMessageDeltaContentImageFileObjectImageFile imageFile = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "image_file"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("image_file"u8)) + if (prop.NameEquals("image_file"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + imageFile = null; continue; } - imageFile = InternalMessageDeltaContentImageFileObjectImageFile.DeserializeInternalMessageDeltaContentImageFileObjectImageFile(property.Value, options); + imageFile = InternalMessageDeltaContentImageFileObjectImageFile.DeserializeInternalMessageDeltaContentImageFileObjectImageFile(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentImageFileObject(type, serializedAdditionalRawData, index, imageFile); + return new InternalMessageDeltaContentImageFileObject(index, imageFile, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +108,16 @@ BinaryData IPersistableModel.Write(M } } - InternalMessageDeltaContentImageFileObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentImageFileObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentImageFileObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentImageFileObject(document.RootElement, options); } default: @@ -145,15 +127,16 @@ InternalMessageDeltaContentImageFileObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentImageFileObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentImageFileObject internalMessageDeltaContentImageFileObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentImageFileObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentImageFileObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentImageFileObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentImageFileObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs index 09615bdae..91754591d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs @@ -9,23 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageFileObject : InternalMessageDeltaContent { - internal InternalMessageDeltaContentImageFileObject(int index) + internal InternalMessageDeltaContentImageFileObject(int index) : base("image_file") { - Type = "image_file"; Index = index; } - internal InternalMessageDeltaContentImageFileObject(string type, IDictionary serializedAdditionalRawData, int index, InternalMessageDeltaContentImageFileObjectImageFile imageFile) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentImageFileObject(int index, InternalMessageDeltaContentImageFileObjectImageFile imageFile, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; ImageFile = imageFile; } - internal InternalMessageDeltaContentImageFileObject() - { - } + public int Index { get; set; } - public int Index { get; } - public InternalMessageDeltaContentImageFileObjectImageFile ImageFile { get; } + public InternalMessageDeltaContentImageFileObjectImageFile ImageFile { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index aeba95b5b..77188771e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalMessageDeltaContentImageFileObjectImageFile : IJs { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObjectImageFile)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true && Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId)) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (SerializedAdditionalRawData?.ContainsKey("detail") != true && Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaContentImageFileObjectImageFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentImageFileObjectImageFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContentImageFileObjectImageFile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObjectImageFile)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentImageFileObjectImageFile(document.RootElement, options); } - internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeInternalMessageDeltaContentImageFileObjectImageFile(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeInternalMessageDeltaContentImageFileObjectImageFile(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - string detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalMessageDeltaContentImageFileObjectImageFileDetail? detail = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileId = null; + continue; + } + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("detail"u8)) + if (prop.NameEquals("detail"u8)) { - detail = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } + detail = new InternalMessageDeltaContentImageFileObjectImageFileDetail(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentImageFileObjectImageFile(fileId, detail, serializedAdditionalRawData); + return new InternalMessageDeltaContentImageFileObjectImageFile(fileId, detail, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentImageFileObjectImageFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContentImageFileObjectImageFile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentImageFileObjectImageFile(document.RootElement, options); } default: @@ -130,15 +139,16 @@ InternalMessageDeltaContentImageFileObjectImageFile IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContentImageFileObjectImageFile FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentImageFileObjectImageFile internalMessageDeltaContentImageFileObjectImageFile) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentImageFileObjectImageFile(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentImageFileObjectImageFile, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentImageFileObjectImageFile(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentImageFileObjectImageFile(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs index ce44aab8c..fc9e82e19 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs @@ -9,18 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageFileObjectImageFile { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaContentImageFileObjectImageFile() { } - internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, string detail, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, InternalMessageDeltaContentImageFileObjectImageFileDetail? detail, IDictionary additionalBinaryDataProperties) { FileId = fileId; Detail = detail; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs index 3de4b3ed9..3645c770d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageDeltaContentImageFileObjectImageFileDetail : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LowValue = "low"; + private const string HighValue = "high"; public InternalMessageDeltaContentImageFileObjectImageFileDetail(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; + _value = value; + } public static InternalMessageDeltaContentImageFileObjectImageFileDetail Auto { get; } = new InternalMessageDeltaContentImageFileObjectImageFileDetail(AutoValue); + public static InternalMessageDeltaContentImageFileObjectImageFileDetail Low { get; } = new InternalMessageDeltaContentImageFileObjectImageFileDetail(LowValue); + public static InternalMessageDeltaContentImageFileObjectImageFileDetail High { get; } = new InternalMessageDeltaContentImageFileObjectImageFileDetail(HighValue); + public static bool operator ==(InternalMessageDeltaContentImageFileObjectImageFileDetail left, InternalMessageDeltaContentImageFileObjectImageFileDetail right) => left.Equals(right); + public static bool operator !=(InternalMessageDeltaContentImageFileObjectImageFileDetail left, InternalMessageDeltaContentImageFileObjectImageFileDetail right) => !left.Equals(right); + public static implicit operator InternalMessageDeltaContentImageFileObjectImageFileDetail(string value) => new InternalMessageDeltaContentImageFileObjectImageFileDetail(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageDeltaContentImageFileObjectImageFileDetail other && Equals(other); + public bool Equals(InternalMessageDeltaContentImageFileObjectImageFileDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index 40317ea42..c990b00a4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -7,117 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageUrlObject : IJsonModel { + internal InternalMessageDeltaContentImageUrlObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("image_url") != true && Optional.IsDefined(ImageUrl)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(ImageUrl)) { writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentImageUrlObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentImageUrlObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentImageUrlObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentImageUrlObject(document.RootElement, options); } - internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMessageDeltaContentImageUrlObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMessageDeltaContentImageUrlObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "image_url"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("image_url"u8)) + if (prop.NameEquals("image_url"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + imageUrl = null; continue; } - imageUrl = InternalMessageDeltaContentImageUrlObjectImageUrl.DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(property.Value, options); + imageUrl = InternalMessageDeltaContentImageUrlObjectImageUrl.DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentImageUrlObject(type, serializedAdditionalRawData, index, imageUrl); + return new InternalMessageDeltaContentImageUrlObject(index, imageUrl, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +108,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalMessageDeltaContentImageUrlObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentImageUrlObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentImageUrlObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentImageUrlObject(document.RootElement, options); } default: @@ -145,15 +127,16 @@ InternalMessageDeltaContentImageUrlObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentImageUrlObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentImageUrlObject internalMessageDeltaContentImageUrlObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentImageUrlObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentImageUrlObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentImageUrlObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentImageUrlObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs index 07fa17e8e..bf9051931 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs @@ -9,23 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageUrlObject : InternalMessageDeltaContent { - internal InternalMessageDeltaContentImageUrlObject(int index) + internal InternalMessageDeltaContentImageUrlObject(int index) : base("image_url") { - Type = "image_url"; Index = index; } - internal InternalMessageDeltaContentImageUrlObject(string type, IDictionary serializedAdditionalRawData, int index, InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentImageUrlObject(int index, InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; ImageUrl = imageUrl; } - internal InternalMessageDeltaContentImageUrlObject() - { - } + public int Index { get; set; } - public int Index { get; } - public InternalMessageDeltaContentImageUrlObjectImageUrl ImageUrl { get; } + public InternalMessageDeltaContentImageUrlObjectImageUrl ImageUrl { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 17fdc9aaa..d3ec7cc11 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalMessageDeltaContentImageUrlObjectImageUrl : IJson { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObjectImageUrl)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("url") != true && Optional.IsDefined(Url)) + if (Optional.IsDefined(Url)) { writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (SerializedAdditionalRawData?.ContainsKey("detail") != true && Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,63 +52,65 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaContentImageUrlObjectImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentImageUrlObjectImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContentImageUrlObjectImageUrl JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObjectImageUrl)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(document.RootElement, options); } - internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } Uri url = default; - string detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalMessageDeltaContentImageUrlObjectImageUrlDetail? detail = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("url"u8)) + if (prop.NameEquals("url"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + url = null; continue; } - url = new Uri(property.Value.GetString()); + url = new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("detail"u8)) + if (prop.NameEquals("detail"u8)) { - detail = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } + detail = new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentImageUrlObjectImageUrl(url, detail, serializedAdditionalRawData); + return new InternalMessageDeltaContentImageUrlObjectImageUrl(url, detail, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +120,16 @@ BinaryData IPersistableModel. } } - InternalMessageDeltaContentImageUrlObjectImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentImageUrlObjectImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContentImageUrlObjectImageUrl PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(document.RootElement, options); } default: @@ -134,15 +139,16 @@ InternalMessageDeltaContentImageUrlObjectImageUrl IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContentImageUrlObjectImageUrl FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentImageUrlObjectImageUrl internalMessageDeltaContentImageUrlObjectImageUrl) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentImageUrlObjectImageUrl, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentImageUrlObjectImageUrl(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs index 886c78999..357b1c8e9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs @@ -9,18 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageUrlObjectImageUrl { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaContentImageUrlObjectImageUrl() { } - internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, string detail, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, InternalMessageDeltaContentImageUrlObjectImageUrlDetail? detail, IDictionary additionalBinaryDataProperties) { Url = url; Detail = detail; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public Uri Url { get; } + public Uri Url { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs index ffd7b7bb4..d4e85ecc3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageDeltaContentImageUrlObjectImageUrlDetail : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LowValue = "low"; + private const string HighValue = "high"; public InternalMessageDeltaContentImageUrlObjectImageUrlDetail(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; + _value = value; + } public static InternalMessageDeltaContentImageUrlObjectImageUrlDetail Auto { get; } = new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(AutoValue); + public static InternalMessageDeltaContentImageUrlObjectImageUrlDetail Low { get; } = new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(LowValue); + public static InternalMessageDeltaContentImageUrlObjectImageUrlDetail High { get; } = new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(HighValue); + public static bool operator ==(InternalMessageDeltaContentImageUrlObjectImageUrlDetail left, InternalMessageDeltaContentImageUrlObjectImageUrlDetail right) => left.Equals(right); + public static bool operator !=(InternalMessageDeltaContentImageUrlObjectImageUrlDetail left, InternalMessageDeltaContentImageUrlObjectImageUrlDetail right) => !left.Equals(right); + public static implicit operator InternalMessageDeltaContentImageUrlObjectImageUrlDetail(string value) => new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageDeltaContentImageUrlObjectImageUrlDetail other && Equals(other); + public bool Equals(InternalMessageDeltaContentImageUrlObjectImageUrlDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index 1668fc35c..44888bb15 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -7,113 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentRefusalObject : IJsonModel { + internal InternalMessageDeltaContentRefusalObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentRefusalObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true && Optional.IsDefined(Refusal)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Refusal)) { writer.WritePropertyName("refusal"u8); writer.WriteStringValue(Refusal); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentRefusalObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentRefusalObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentRefusalObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentRefusalObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentRefusalObject(document.RootElement, options); } - internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMessageDeltaContentRefusalObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMessageDeltaContentRefusalObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; string refusal = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "refusal"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - refusal = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + refusal = null; + continue; + } + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentRefusalObject(type, serializedAdditionalRawData, index, refusal); + return new InternalMessageDeltaContentRefusalObject(index, refusal, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +108,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalMessageDeltaContentRefusalObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentRefusalObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentRefusalObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentRefusalObject(document.RootElement, options); } default: @@ -141,15 +127,16 @@ InternalMessageDeltaContentRefusalObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentRefusalObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentRefusalObject internalMessageDeltaContentRefusalObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentRefusalObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentRefusalObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentRefusalObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentRefusalObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs index d7b88a830..1411b253d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs @@ -9,23 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentRefusalObject : InternalMessageDeltaContent { - internal InternalMessageDeltaContentRefusalObject(int index) + internal InternalMessageDeltaContentRefusalObject(int index) : base("refusal") { - Type = "refusal"; Index = index; } - internal InternalMessageDeltaContentRefusalObject(string type, IDictionary serializedAdditionalRawData, int index, string refusal) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentRefusalObject(int index, string refusal, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Refusal = refusal; } - internal InternalMessageDeltaContentRefusalObject() - { - } + public int Index { get; set; } - public int Index { get; } - public string Refusal { get; } + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index f35ad0979..f2eeafa19 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -7,88 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObject : IJsonModel { + internal InternalMessageDeltaContentTextAnnotationsFileCitationObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true && Optional.IsDefined(Text)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (SerializedAdditionalRawData?.ContainsKey("file_citation") != true && Optional.IsDefined(FileCitation)) + if (Optional.IsDefined(FileCitation)) { writer.WritePropertyName("file_citation"u8); writer.WriteObjectValue(FileCitation, options); } - if (SerializedAdditionalRawData?.ContainsKey("start_index") != true && Optional.IsDefined(StartIndex)) + if (Optional.IsDefined(StartIndex)) { writer.WritePropertyName("start_index"u8); writer.WriteNumberValue(StartIndex.Value); } - if (SerializedAdditionalRawData?.ContainsKey("end_index") != true && Optional.IsDefined(EndIndex)) + if (Optional.IsDefined(EndIndex)) { writer.WritePropertyName("end_index"u8); writer.WriteNumberValue(EndIndex.Value); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentTextAnnotationsFileCitationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextAnnotationsFileCitationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextAnnotationsFileCitationObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaTextContentAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(document.RootElement, options); } - internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -98,74 +80,80 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation = default; int? startIndex = default; int? endIndex = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_citation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + text = null; + continue; + } + text = prop.Value.GetString(); continue; } - if (property.NameEquals("file_citation"u8)) + if (prop.NameEquals("file_citation"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileCitation = null; continue; } - fileCitation = InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(property.Value, options); + fileCitation = InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(prop.Value, options); continue; } - if (property.NameEquals("start_index"u8)) + if (prop.NameEquals("start_index"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + startIndex = null; continue; } - startIndex = property.Value.GetInt32(); + startIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("end_index"u8)) + if (prop.NameEquals("end_index"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + endIndex = null; continue; } - endIndex = property.Value.GetInt32(); + endIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalMessageDeltaContentTextAnnotationsFileCitationObject( - type, - serializedAdditionalRawData, index, text, fileCitation, startIndex, - endIndex); + endIndex, + @type, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -175,15 +163,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextAnnotationsFileCitationObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextAnnotationsFileCitationObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaTextContentAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(document.RootElement, options); } default: @@ -193,15 +182,16 @@ InternalMessageDeltaContentTextAnnotationsFileCitationObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentTextAnnotationsFileCitationObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFileCitationObject internalMessageDeltaContentTextAnnotationsFileCitationObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFileCitationObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextAnnotationsFileCitationObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs index a96c66517..84bd901b1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs @@ -9,13 +9,12 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObject : InternalMessageDeltaTextContentAnnotation { - internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index) + internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index) : base("file_citation") { - Type = "file_citation"; Index = index; } - internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(string type, IDictionary serializedAdditionalRawData, int index, string text, InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int? startIndex, int? endIndex) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index, string text, InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int? startIndex, int? endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; @@ -24,14 +23,14 @@ internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(string typ EndIndex = endIndex; } - internal InternalMessageDeltaContentTextAnnotationsFileCitationObject() - { - } + public int Index { get; set; } + + public string Text { get; set; } + + public InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation FileCitation { get; set; } + + public int? StartIndex { get; set; } - public int Index { get; } - public string Text { get; } - public InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation FileCitation { get; } - public int? StartIndex { get; } - public int? EndIndex { get; } + public int? EndIndex { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 61580bfdb..2d3ba087f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObj { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true && Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId)) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (SerializedAdditionalRawData?.ContainsKey("quote") != true && Optional.IsDefined(Quote)) + if (Optional.IsDefined(Quote)) { writer.WritePropertyName("quote"u8); writer.WriteStringValue(Quote); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, options); } - internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; string quote = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileId = null; + continue; + } + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("quote"u8)) + if (prop.NameEquals("quote"u8)) { - quote = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + quote = null; + continue; + } + quote = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(fileId, quote, serializedAdditionalRawData); + return new InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(fileId, quote, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, options); } default: @@ -130,15 +139,16 @@ InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation IPersis string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation internalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs index 8451e2157..6c383c7e8 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation() { } - internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(string fileId, string quote, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(string fileId, string quote, IDictionary additionalBinaryDataProperties) { FileId = fileId; Quote = quote; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } - public string Quote { get; } + public string FileId { get; set; } + + public string Quote { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 1ed21a80d..3dd9fcdb4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -7,88 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObject : IJsonModel { + internal InternalMessageDeltaContentTextAnnotationsFilePathObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true && Optional.IsDefined(Text)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (SerializedAdditionalRawData?.ContainsKey("file_path") != true && Optional.IsDefined(FilePath)) + if (Optional.IsDefined(FilePath)) { writer.WritePropertyName("file_path"u8); writer.WriteObjectValue(FilePath, options); } - if (SerializedAdditionalRawData?.ContainsKey("start_index") != true && Optional.IsDefined(StartIndex)) + if (Optional.IsDefined(StartIndex)) { writer.WritePropertyName("start_index"u8); writer.WriteNumberValue(StartIndex.Value); } - if (SerializedAdditionalRawData?.ContainsKey("end_index") != true && Optional.IsDefined(EndIndex)) + if (Optional.IsDefined(EndIndex)) { writer.WritePropertyName("end_index"u8); writer.WriteNumberValue(EndIndex.Value); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentTextAnnotationsFilePathObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextAnnotationsFilePathObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextAnnotationsFilePathObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaTextContentAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(document.RootElement, options); } - internal static InternalMessageDeltaContentTextAnnotationsFilePathObject DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextAnnotationsFilePathObject DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -98,74 +80,80 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath = default; int? startIndex = default; int? endIndex = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_path"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + text = null; + continue; + } + text = prop.Value.GetString(); continue; } - if (property.NameEquals("file_path"u8)) + if (prop.NameEquals("file_path"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + filePath = null; continue; } - filePath = InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(property.Value, options); + filePath = InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(prop.Value, options); continue; } - if (property.NameEquals("start_index"u8)) + if (prop.NameEquals("start_index"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + startIndex = null; continue; } - startIndex = property.Value.GetInt32(); + startIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("end_index"u8)) + if (prop.NameEquals("end_index"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + endIndex = null; continue; } - endIndex = property.Value.GetInt32(); + endIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalMessageDeltaContentTextAnnotationsFilePathObject( - type, - serializedAdditionalRawData, index, text, filePath, startIndex, - endIndex); + endIndex, + @type, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -175,15 +163,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextAnnotationsFilePathObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextAnnotationsFilePathObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaTextContentAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(document.RootElement, options); } default: @@ -193,15 +182,16 @@ InternalMessageDeltaContentTextAnnotationsFilePathObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentTextAnnotationsFilePathObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFilePathObject internalMessageDeltaContentTextAnnotationsFilePathObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFilePathObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextAnnotationsFilePathObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs index 92320c4f5..bab46819b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs @@ -9,13 +9,12 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObject : InternalMessageDeltaTextContentAnnotation { - internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index) + internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index) : base("file_path") { - Type = "file_path"; Index = index; } - internal InternalMessageDeltaContentTextAnnotationsFilePathObject(string type, IDictionary serializedAdditionalRawData, int index, string text, InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath, int? startIndex, int? endIndex) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index, string text, InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath, int? startIndex, int? endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; @@ -24,14 +23,14 @@ internal InternalMessageDeltaContentTextAnnotationsFilePathObject(string type, I EndIndex = endIndex; } - internal InternalMessageDeltaContentTextAnnotationsFilePathObject() - { - } + public int Index { get; set; } + + public string Text { get; set; } + + public InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath FilePath { get; set; } + + public int? StartIndex { get; set; } - public int Index { get; } - public string Text { get; } - public InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath FilePath { get; } - public int? StartIndex { get; } - public int? EndIndex { get; } + public int? EndIndex { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 2cabf1597..b74a77ae4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,30 @@ internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObjectF { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true && Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId)) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +47,54 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(document.RootElement, options); } - internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileId = null; + continue; + } + fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(fileId, serializedAdditionalRawData); + return new InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(fileId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +104,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(document.RootElement, options); } default: @@ -119,15 +123,16 @@ InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath IPersistableMod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath internalMessageDeltaContentTextAnnotationsFilePathObjectFilePath) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFilePathObjectFilePath, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs index 3e41f99b0..3fd2ece4d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath() { } - internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(string fileId, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(string fileId, IDictionary additionalBinaryDataProperties) { FileId = fileId; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 75983efa0..7dcb0168e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -7,117 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextObject : IJsonModel { + internal InternalMessageDeltaContentTextObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true && Optional.IsDefined(Text)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); writer.WriteObjectValue(Text, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalMessageDeltaContentTextObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextObject)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextObject(document.RootElement, options); } - internal static InternalMessageDeltaContentTextObject DeserializeInternalMessageDeltaContentTextObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextObject DeserializeInternalMessageDeltaContentTextObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; InternalMessageDeltaContentTextObjectText text = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "text"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + text = null; continue; } - text = InternalMessageDeltaContentTextObjectText.DeserializeInternalMessageDeltaContentTextObjectText(property.Value, options); + text = InternalMessageDeltaContentTextObjectText.DeserializeInternalMessageDeltaContentTextObjectText(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentTextObject(type, serializedAdditionalRawData, index, text); + return new InternalMessageDeltaContentTextObject(index, text, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalMessageDeltaContentTextObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageDeltaContentTextObject)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextObject(document.RootElement, options); } default: @@ -145,15 +127,16 @@ InternalMessageDeltaContentTextObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageDeltaContentTextObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextObject internalMessageDeltaContentTextObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs index a4154f431..f84993fbf 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs @@ -9,23 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextObject : InternalMessageDeltaContent { - internal InternalMessageDeltaContentTextObject(int index) + internal InternalMessageDeltaContentTextObject(int index) : base("text") { - Type = "text"; Index = index; } - internal InternalMessageDeltaContentTextObject(string type, IDictionary serializedAdditionalRawData, int index, InternalMessageDeltaContentTextObjectText text) : base(type, serializedAdditionalRawData) + internal InternalMessageDeltaContentTextObject(int index, InternalMessageDeltaContentTextObjectText text, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; } - internal InternalMessageDeltaContentTextObject() - { - } + public int Index { get; set; } - public int Index { get; } - public InternalMessageDeltaContentTextObjectText Text { get; } + public InternalMessageDeltaContentTextObjectText Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index fbc18edf5..f529d860c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ internal partial class InternalMessageDeltaContentTextObjectText : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObjectText)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("value") != true && Optional.IsDefined(Value)) + if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); } - if (SerializedAdditionalRawData?.ContainsKey("annotations") != true && Optional.IsCollectionDefined(Annotations)) + if (Optional.IsCollectionDefined(Annotations)) { writer.WritePropertyName("annotations"u8); writer.WriteStartArray(); @@ -36,17 +42,13 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,68 +57,69 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaContentTextObjectText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContentTextObjectText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaContentTextObjectText JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObjectText)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContentTextObjectText(document.RootElement, options); } - internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMessageDeltaContentTextObjectText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMessageDeltaContentTextObjectText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string value = default; - IReadOnlyList annotations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList annotations = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { - value = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + value = null; + continue; + } + value = prop.Value.GetString(); continue; } - if (property.NameEquals("annotations"u8)) + if (prop.NameEquals("annotations"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalMessageDeltaTextContentAnnotation.DeserializeInternalMessageDeltaTextContentAnnotation(item, options)); } annotations = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaContentTextObjectText(value, annotations ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalMessageDeltaContentTextObjectText(value, annotations ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -126,15 +129,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalMessageDeltaContentTextObjectText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContentTextObjectText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaContentTextObjectText PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContentTextObjectText(document.RootElement, options); } default: @@ -144,15 +148,16 @@ InternalMessageDeltaContentTextObjectText IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaContentTextObjectText FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaContentTextObjectText internalMessageDeltaContentTextObjectText) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaContentTextObjectText(document.RootElement); + return BinaryContent.Create(internalMessageDeltaContentTextObjectText, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaContentTextObjectText(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaContentTextObjectText(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs index f2b651436..53f5d8e48 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs @@ -4,25 +4,28 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextObjectText { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaContentTextObjectText() { Annotations = new ChangeTrackingList(); } - internal InternalMessageDeltaContentTextObjectText(string value, IReadOnlyList annotations, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaContentTextObjectText(string value, IList annotations, IDictionary additionalBinaryDataProperties) { Value = value; Annotations = annotations; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Value { get; } - public IReadOnlyList Annotations { get; } + public string Value { get; set; } + + public IList Annotations { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index 1bba65403..911c6e33b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObject : IJsonModel { + internal InternalMessageDeltaObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteObjectValue(Delta, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaObject(document.RootElement, options); } - internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject string id = default; InternalMessageDeltaObjectObject @object = default; InternalMessageDeltaObjectDelta delta = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalMessageDeltaObjectObject(property.Value.GetString()); + @object = new InternalMessageDeltaObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("delta"u8)) + if (prop.NameEquals("delta"u8)) { - delta = InternalMessageDeltaObjectDelta.DeserializeInternalMessageDeltaObjectDelta(property.Value, options); + delta = InternalMessageDeltaObjectDelta.DeserializeInternalMessageDeltaObjectDelta(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaObject(id, @object, delta, serializedAdditionalRawData); + return new InternalMessageDeltaObject(id, @object, delta, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalMessageDeltaObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaObject(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalMessageDeltaObject IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaObject internalMessageDeltaObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaObject(document.RootElement); + return BinaryContent.Create(internalMessageDeltaObject, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs index 92dad3abb..fadfeec07 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs @@ -9,31 +9,26 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObject { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectDelta delta) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(delta, nameof(delta)); - Id = id; Delta = delta; } - internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectObject @object, InternalMessageDeltaObjectDelta delta, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectObject @object, InternalMessageDeltaObjectDelta delta, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; Delta = delta; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalMessageDeltaObject() - { - } + public string Id { get; set; } - public string Id { get; } - public InternalMessageDeltaObjectObject Object { get; } = InternalMessageDeltaObjectObject.ThreadMessageDelta; + public InternalMessageDeltaObjectObject Object { get; } = "thread.message.delta"; - public InternalMessageDeltaObjectDelta Delta { get; } + public InternalMessageDeltaObjectDelta Delta { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 93e19568b..3de207fe1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ internal partial class InternalMessageDeltaObjectDelta : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaObjectDelta)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("role") != true) + if (Optional.IsDefined(Role)) { writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); + writer.WriteStringValue(Role.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("content") != true && Optional.IsCollectionDefined(Content)) + if (Optional.IsCollectionDefined(Content)) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -36,17 +42,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,72 +57,69 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaObjectDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaObjectDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaObjectDelta JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaObjectDelta)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaObjectDelta(document.RootElement, options); } - internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaObjectDelta(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaObjectDelta(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - MessageRole role = default; - IReadOnlyList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalMessageDeltaObjectDeltaRole? role = default; + IList content = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + role = null; continue; } - role = property.Value.GetString().ToMessageRole(); + role = new InternalMessageDeltaObjectDeltaRole(prop.Value.GetString()); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalMessageDeltaContent.DeserializeInternalMessageDeltaContent(item, options)); } content = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageDeltaObjectDelta(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalMessageDeltaObjectDelta(role, content ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +129,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalMessageDeltaObjectDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaObjectDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaObjectDelta PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaObjectDelta(document.RootElement, options); } default: @@ -148,15 +148,16 @@ InternalMessageDeltaObjectDelta IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaObjectDelta FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaObjectDelta internalMessageDeltaObjectDelta) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaObjectDelta(document.RootElement); + return BinaryContent.Create(internalMessageDeltaObjectDelta, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaObjectDelta(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaObjectDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs index 63a7af934..81d78e734 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs @@ -4,23 +4,26 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObjectDelta { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageDeltaObjectDelta() { Content = new ChangeTrackingList(); } - internal InternalMessageDeltaObjectDelta(MessageRole role, IReadOnlyList content, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaObjectDelta(InternalMessageDeltaObjectDeltaRole? role, IList content, IDictionary additionalBinaryDataProperties) { Role = role; Content = content; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList Content { get; } + + public IList Content { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs index d477fcb93..d7a814730 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageDeltaObjectDeltaRole : IEquatable { private readonly string _value; + private const string UserValue = "user"; + private const string AssistantValue = "assistant"; public InternalMessageDeltaObjectDeltaRole(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UserValue = "user"; - private const string AssistantValue = "assistant"; + _value = value; + } public static InternalMessageDeltaObjectDeltaRole User { get; } = new InternalMessageDeltaObjectDeltaRole(UserValue); + public static InternalMessageDeltaObjectDeltaRole Assistant { get; } = new InternalMessageDeltaObjectDeltaRole(AssistantValue); + public static bool operator ==(InternalMessageDeltaObjectDeltaRole left, InternalMessageDeltaObjectDeltaRole right) => left.Equals(right); + public static bool operator !=(InternalMessageDeltaObjectDeltaRole left, InternalMessageDeltaObjectDeltaRole right) => !left.Equals(right); + public static implicit operator InternalMessageDeltaObjectDeltaRole(string value) => new InternalMessageDeltaObjectDeltaRole(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageDeltaObjectDeltaRole other && Equals(other); + public bool Equals(InternalMessageDeltaObjectDeltaRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs index a420957ec..5e9ce070b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageDeltaObjectObject : IEquatable { private readonly string _value; + private const string ThreadMessageDeltaValue = "thread.message.delta"; public InternalMessageDeltaObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadMessageDeltaValue = "thread.message.delta"; + _value = value; + } public static InternalMessageDeltaObjectObject ThreadMessageDelta { get; } = new InternalMessageDeltaObjectObject(ThreadMessageDeltaValue); + public static bool operator ==(InternalMessageDeltaObjectObject left, InternalMessageDeltaObjectObject right) => left.Equals(right); + public static bool operator !=(InternalMessageDeltaObjectObject left, InternalMessageDeltaObjectObject right) => !left.Equals(right); + public static implicit operator InternalMessageDeltaObjectObject(string value) => new InternalMessageDeltaObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageDeltaObjectObject other && Equals(other); + public bool Equals(InternalMessageDeltaObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 1382bacd8..5c95f5348 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownMessageDeltaTextContentAnnotation))] - internal partial class InternalMessageDeltaTextContentAnnotation : IJsonModel + internal abstract partial class InternalMessageDeltaTextContentAnnotation : IJsonModel { + internal InternalMessageDeltaTextContentAnnotation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaTextContentAnnotation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageDeltaTextContentAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaTextContentAnnotation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement, options); } - internal static InternalMessageDeltaTextContentAnnotation DeserializeInternalMessageDeltaTextContentAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageDeltaTextContentAnnotation DeserializeInternalMessageDeltaTextContentAnnotation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "file_citation": return InternalMessageDeltaContentTextAnnotationsFileCitationObject.DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(element, options); - case "file_path": return InternalMessageDeltaContentTextAnnotationsFilePathObject.DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(element, options); + case "file_citation": + return InternalMessageDeltaContentTextAnnotationsFileCitationObject.DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObject(element, options); + case "file_path": + return InternalMessageDeltaContentTextAnnotationsFilePathObject.DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObject(element, options); } } return UnknownMessageDeltaTextContentAnnotation.DeserializeUnknownMessageDeltaTextContentAnnotation(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageDeltaTextContentAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement, options); } default: @@ -110,15 +115,16 @@ InternalMessageDeltaTextContentAnnotation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageDeltaTextContentAnnotation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageDeltaTextContentAnnotation internalMessageDeltaTextContentAnnotation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement); + return BinaryContent.Create(internalMessageDeltaTextContentAnnotation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageDeltaTextContentAnnotation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs index 34640b4dc..4fd514e10 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaTextContentAnnotation { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalMessageDeltaTextContentAnnotation() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalMessageDeltaTextContentAnnotation(string @type) { + Type = @type; } - internal InternalMessageDeltaTextContentAnnotation(string type, IDictionary serializedAdditionalRawData) + internal InternalMessageDeltaTextContentAnnotation(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 8a176fdbf..de0ab8bc4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -7,61 +7,84 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageFileContent : IJsonModel { - InternalMessageImageFileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalMessageImageFileContent() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalMessageImageFileContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalMessageImageFileContent)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("image_file"u8); + writer.WriteObjectValue(ImageFile, options); + } + InternalMessageImageFileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageFileContent)JsonModelCreateCore(ref reader, options); + + protected override MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalMessageImageFileContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageImageFileContent(document.RootElement, options); } - internal static InternalMessageImageFileContent DeserializeInternalMessageImageFileContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageImageFileContent DeserializeInternalMessageImageFileContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; + InternalMessageContentImageFileObjectType @type = default; InternalMessageContentItemFileObjectImageFile imageFile = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = new InternalMessageContentImageFileObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("image_file"u8)) + if (prop.NameEquals("image_file"u8)) { - imageFile = InternalMessageContentItemFileObjectImageFile.DeserializeInternalMessageContentItemFileObjectImageFile(property.Value, options); + imageFile = InternalMessageContentItemFileObjectImageFile.DeserializeInternalMessageContentItemFileObjectImageFile(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageImageFileContent(serializedAdditionalRawData, type, imageFile); + return new InternalMessageImageFileContent(@type, imageFile, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalMessageImageFileContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageImageFileContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageImageFileContent)PersistableModelCreateCore(data, options); + protected override MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageImageFileContent(document.RootElement, options); } default: @@ -89,15 +113,16 @@ InternalMessageImageFileContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageImageFileContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageImageFileContent internalMessageImageFileContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageImageFileContent(document.RootElement); + return BinaryContent.Create(internalMessageImageFileContent, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageImageFileContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageImageFileContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs index 0daac586c..311f547bb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs @@ -9,14 +9,14 @@ namespace OpenAI.Assistants { internal partial class InternalMessageImageFileContent : MessageContent { - internal InternalMessageImageFileContent(IDictionary serializedAdditionalRawData, string type, InternalMessageContentItemFileObjectImageFile imageFile) : base(serializedAdditionalRawData) + internal InternalMessageImageFileContent(InternalMessageContentImageFileObjectType @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - _type = type; - _imageFile = imageFile; + Type = @type; + ImageFile = imageFile; } - internal InternalMessageImageFileContent() - { - } + public InternalMessageContentImageFileObjectType Type { get; } = "image_file"; + + public InternalMessageContentItemFileObjectImageFile ImageFile { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index bbf8977d0..09a3210aa 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -7,61 +7,84 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageUrlContent : IJsonModel { - InternalMessageImageUrlContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalMessageImageUrlContent() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalMessageImageUrlContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalMessageImageUrlContent)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("image_url"u8); + writer.WriteObjectValue(ImageUrl, options); + } + InternalMessageImageUrlContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageUrlContent)JsonModelCreateCore(ref reader, options); + + protected override MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalMessageImageUrlContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageImageUrlContent(document.RootElement, options); } - internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUrlContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUrlContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; + InternalMessageContentImageUrlObjectType @type = default; InternalMessageContentImageUrlObjectImageUrl imageUrl = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = new InternalMessageContentImageUrlObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("image_url"u8)) + if (prop.NameEquals("image_url"u8)) { - imageUrl = InternalMessageContentImageUrlObjectImageUrl.DeserializeInternalMessageContentImageUrlObjectImageUrl(property.Value, options); + imageUrl = InternalMessageContentImageUrlObjectImageUrl.DeserializeInternalMessageContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageImageUrlContent(serializedAdditionalRawData, type, imageUrl); + return new InternalMessageImageUrlContent(@type, imageUrl, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - InternalMessageImageUrlContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageImageUrlContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageImageUrlContent)PersistableModelCreateCore(data, options); + protected override MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageImageUrlContent(document.RootElement, options); } default: @@ -89,15 +113,16 @@ InternalMessageImageUrlContent IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageImageUrlContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageImageUrlContent internalMessageImageUrlContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageImageUrlContent(document.RootElement); + return BinaryContent.Create(internalMessageImageUrlContent, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageImageUrlContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageImageUrlContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs index beb249485..2d228a6dd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs @@ -9,14 +9,14 @@ namespace OpenAI.Assistants { internal partial class InternalMessageImageUrlContent : MessageContent { - internal InternalMessageImageUrlContent(IDictionary serializedAdditionalRawData, string type, InternalMessageContentImageUrlObjectImageUrl imageUrl) : base(serializedAdditionalRawData) + internal InternalMessageImageUrlContent(InternalMessageContentImageUrlObjectType @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - _type = type; - _imageUrl = imageUrl; + Type = @type; + ImageUrl = imageUrl; } - internal InternalMessageImageUrlContent() - { - } + public InternalMessageContentImageUrlObjectType Type { get; } = "image_url"; + + public InternalMessageContentImageUrlObjectImageUrl ImageUrl { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index 3d0849f9a..43d243c00 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ internal partial class InternalMessageObjectAttachment : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageObjectAttachment)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true && Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId)) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -38,7 +44,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo continue; } #if NET6_0_OR_GREATER - writer.WriteRawValue(item); + writer.WriteRawValue(item); #else using (JsonDocument document = JsonDocument.Parse(item)) { @@ -48,17 +54,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -67,48 +69,50 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalMessageObjectAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageObjectAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalMessageObjectAttachment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageObjectAttachment)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageObjectAttachment(document.RootElement, options); } - internal static InternalMessageObjectAttachment DeserializeInternalMessageObjectAttachment(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageObjectAttachment DeserializeInternalMessageObjectAttachment(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IReadOnlyList tools = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList tools = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileId = null; + continue; + } + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { @@ -122,20 +126,19 @@ internal static InternalMessageObjectAttachment DeserializeInternalMessageObject tools = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageObjectAttachment(fileId, tools ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalMessageObjectAttachment(fileId, tools ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -145,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalMessageObjectAttachment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageObjectAttachment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalMessageObjectAttachment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageObjectAttachment(document.RootElement, options); } default: @@ -163,15 +167,16 @@ InternalMessageObjectAttachment IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalMessageObjectAttachment FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageObjectAttachment internalMessageObjectAttachment) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageObjectAttachment(document.RootElement); + return BinaryContent.Create(internalMessageObjectAttachment, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalMessageObjectAttachment(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageObjectAttachment(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs index 1e92848e3..c392d0b7a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs @@ -4,25 +4,28 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageObjectAttachment { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalMessageObjectAttachment() { Tools = new ChangeTrackingList(); } - internal InternalMessageObjectAttachment(string fileId, IReadOnlyList tools, IDictionary serializedAdditionalRawData) + internal InternalMessageObjectAttachment(string fileId, IList tools, IDictionary additionalBinaryDataProperties) { FileId = fileId; Tools = tools; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } - public IReadOnlyList Tools { get; } + public string FileId { get; set; } + + public IList Tools { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs b/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs index e419910c5..fd6cf18d3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageObjectObject : IEquatable { private readonly string _value; + private const string ThreadMessageValue = "thread.message"; public InternalMessageObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadMessageValue = "thread.message"; + _value = value; + } public static InternalMessageObjectObject ThreadMessage { get; } = new InternalMessageObjectObject(ThreadMessageValue); + public static bool operator ==(InternalMessageObjectObject left, InternalMessageObjectObject right) => left.Equals(right); + public static bool operator !=(InternalMessageObjectObject left, InternalMessageObjectObject right) => !left.Equals(right); + public static implicit operator InternalMessageObjectObject(string value) => new InternalMessageObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageObjectObject other && Equals(other); + public bool Equals(InternalMessageObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs b/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs index 91e68a9de..ede892f8b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageObjectRole : IEquatable { private readonly string _value; + private const string UserValue = "user"; + private const string AssistantValue = "assistant"; public InternalMessageObjectRole(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UserValue = "user"; - private const string AssistantValue = "assistant"; + _value = value; + } public static InternalMessageObjectRole User { get; } = new InternalMessageObjectRole(UserValue); + public static InternalMessageObjectRole Assistant { get; } = new InternalMessageObjectRole(AssistantValue); + public static bool operator ==(InternalMessageObjectRole left, InternalMessageObjectRole right) => left.Equals(right); + public static bool operator !=(InternalMessageObjectRole left, InternalMessageObjectRole right) => !left.Equals(right); + public static implicit operator InternalMessageObjectRole(string value) => new InternalMessageObjectRole(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageObjectRole other && Equals(other); + public bool Equals(InternalMessageObjectRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index 6e3c9846f..b9fad5e55 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -7,61 +7,84 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageRefusalContent : IJsonModel { - InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalMessageRefusalContent() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalMessageRefusalContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalMessageRefusalContent)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + } + InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)JsonModelCreateCore(ref reader, options); + + protected override MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalMessageRefusalContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageRefusalContent(document.RootElement, options); } - internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; + InternalMessageContentRefusalObjectType @type = default; string refusal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = new InternalMessageContentRefusalObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageRefusalContent(serializedAdditionalRawData, type, refusal); + return new InternalMessageRefusalContent(@type, refusal, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - InternalMessageRefusalContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageRefusalContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)PersistableModelCreateCore(data, options); + protected override MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageRefusalContent(document.RootElement, options); } default: @@ -89,15 +113,16 @@ InternalMessageRefusalContent IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalMessageRefusalContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalMessageRefusalContent internalMessageRefusalContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalMessageRefusalContent(document.RootElement); + return BinaryContent.Create(internalMessageRefusalContent, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalMessageRefusalContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalMessageRefusalContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index dc6f0e0af..e72470bb7 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -4,26 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageRefusalContent : MessageContent { - public InternalMessageRefusalContent(string internalRefusal) + public InternalMessageRefusalContent(string refusal) { - Argument.AssertNotNull(internalRefusal, nameof(internalRefusal)); + Argument.AssertNotNull(refusal, nameof(refusal)); - InternalRefusal = internalRefusal; + Refusal = refusal; } - internal InternalMessageRefusalContent(IDictionary serializedAdditionalRawData, string type, string internalRefusal) : base(serializedAdditionalRawData) + internal InternalMessageRefusalContent(InternalMessageContentRefusalObjectType @type, string refusal, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - _type = type; - InternalRefusal = internalRefusal; + Type = @type; + Refusal = refusal; } - internal InternalMessageRefusalContent() - { - } + public InternalMessageContentRefusalObjectType Type { get; } = "refusal"; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs index f41f3c083..0059a44f1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalMessageRequestContentTextObjectType : IEquatable { private readonly string _value; + private const string TextValue = "text"; public InternalMessageRequestContentTextObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; + _value = value; + } public static InternalMessageRequestContentTextObjectType Text { get; } = new InternalMessageRequestContentTextObjectType(TextValue); + public static bool operator ==(InternalMessageRequestContentTextObjectType left, InternalMessageRequestContentTextObjectType right) => left.Equals(right); + public static bool operator !=(InternalMessageRequestContentTextObjectType left, InternalMessageRequestContentTextObjectType right) => !left.Equals(right); + public static implicit operator InternalMessageRequestContentTextObjectType(string value) => new InternalMessageRequestContentTextObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalMessageRequestContentTextObjectType other && Equals(other); + public bool Equals(InternalMessageRequestContentTextObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalModelObject.cs b/.dotnet/src/Generated/Models/InternalModelObject.cs index 79b9cefab..f3f3bfe10 100644 --- a/.dotnet/src/Generated/Models/InternalModelObject.cs +++ b/.dotnet/src/Generated/Models/InternalModelObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Models { internal readonly partial struct InternalModelObject : IEquatable { private readonly string _value; + private const string ModelValue = "model"; public InternalModelObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ModelValue = "model"; + _value = value; + } public static InternalModelObject Model { get; } = new InternalModelObject(ModelValue); + public static bool operator ==(InternalModelObject left, InternalModelObject right) => left.Equals(right); + public static bool operator !=(InternalModelObject left, InternalModelObject right) => !left.Equals(right); + public static implicit operator InternalModelObject(string value) => new InternalModelObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalModelObject other && Equals(other); + public bool Equals(InternalModelObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs index bb4a89610..5073a09cf 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalModifyAssistantRequestToolResources : IJsonModel< { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } - InternalModifyAssistantRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModifyAssistantRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModifyAssistantRequestToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModifyAssistantRequestToolResources(document.RootElement, options); } - internal static InternalModifyAssistantRequestToolResources DeserializeInternalModifyAssistantRequestToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModifyAssistantRequestToolResources DeserializeInternalModifyAssistantRequestToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalModifyAssistantRequestToolResourcesCodeInterpreter codeInterpreter = default; InternalToolResourcesFileSearchIdsOnly fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalModifyAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalModifyAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(property.Value, options); + fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalModifyAssistantRequestToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalModifyAssistantRequestToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write( } } - InternalModifyAssistantRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModifyAssistantRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModifyAssistantRequestToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModifyAssistantRequestToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalModifyAssistantRequestToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModifyAssistantRequestToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModifyAssistantRequestToolResources internalModifyAssistantRequestToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModifyAssistantRequestToolResources(document.RootElement); + return BinaryContent.Create(internalModifyAssistantRequestToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModifyAssistantRequestToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModifyAssistantRequestToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs index 3bcf4c24d..c789d2719 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalModifyAssistantRequestToolResources() { } - internal InternalModifyAssistantRequestToolResources(InternalModifyAssistantRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary serializedAdditionalRawData) + internal InternalModifyAssistantRequestToolResources(InternalModifyAssistantRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public InternalModifyAssistantRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 2b3ea1d6a..972ebccb2 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalModifyAssistantRequestToolResourcesCodeInterprete { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } - InternalModifyAssistantRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModifyAssistantRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModifyAssistantRequestToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalModifyAssistantRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalModifyAssistantRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModifyAssistantRequestToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModifyAssistantRequestToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalModifyAssistantRequestToolResourcesCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModifyAssistantRequestToolResourcesCodeInterpreter internalModifyAssistantRequestToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalModifyAssistantRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModifyAssistantRequestToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs index 1b2538796..0ff149d99 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalModifyAssistantRequestToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalModifyAssistantRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary serializedAdditionalRawData) + internal InternalModifyAssistantRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs index 3354accf3..582f3981c 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalModifyThreadRequestToolResources : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } - InternalModifyThreadRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModifyThreadRequestToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModifyThreadRequestToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModifyThreadRequestToolResources(document.RootElement, options); } - internal static InternalModifyThreadRequestToolResources DeserializeInternalModifyThreadRequestToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModifyThreadRequestToolResources DeserializeInternalModifyThreadRequestToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalModifyThreadRequestToolResourcesCodeInterpreter codeInterpreter = default; InternalToolResourcesFileSearchIdsOnly fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalModifyThreadRequestToolResourcesCodeInterpreter.DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalModifyThreadRequestToolResourcesCodeInterpreter.DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(property.Value, options); + fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalModifyThreadRequestToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalModifyThreadRequestToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalModifyThreadRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModifyThreadRequestToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModifyThreadRequestToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModifyThreadRequestToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalModifyThreadRequestToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModifyThreadRequestToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModifyThreadRequestToolResources internalModifyThreadRequestToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModifyThreadRequestToolResources(document.RootElement); + return BinaryContent.Create(internalModifyThreadRequestToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModifyThreadRequestToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModifyThreadRequestToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs index 0876ba2de..c414d9963 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalModifyThreadRequestToolResources() { } - internal InternalModifyThreadRequestToolResources(InternalModifyThreadRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary serializedAdditionalRawData) + internal InternalModifyThreadRequestToolResources(InternalModifyThreadRequestToolResourcesCodeInterpreter codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public InternalModifyThreadRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index cc3aafd77..9051b64a1 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalModifyThreadRequestToolResourcesCodeInterpreter : { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } - InternalModifyThreadRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModifyThreadRequestToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModifyThreadRequestToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalModifyThreadRequestToolResourcesCodeInterpreter DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModifyThreadRequestToolResourcesCodeInterpreter DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalModifyThreadRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalModifyThreadRequestToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModifyThreadRequestToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModifyThreadRequestToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalModifyThreadRequestToolResourcesCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModifyThreadRequestToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModifyThreadRequestToolResourcesCodeInterpreter internalModifyThreadRequestToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalModifyThreadRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModifyThreadRequestToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs index df0ce6bf8..c0c8e67c8 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalModifyThreadRequestToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalModifyThreadRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary serializedAdditionalRawData) + internal InternalModifyThreadRequestToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index 6ccf09de3..e8cb919ba 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { [PersistableModelProxy(typeof(InternalUnknownOmniTypedResponseFormat))] - internal partial class InternalOmniTypedResponseFormat : IJsonModel + internal abstract partial class InternalOmniTypedResponseFormat : IJsonModel { + internal InternalOmniTypedResponseFormat() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalOmniTypedResponseFormat)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,45 +48,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalOmniTypedResponseFormat)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalOmniTypedResponseFormat(document.RootElement, options); } - internal static InternalOmniTypedResponseFormat DeserializeInternalOmniTypedResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalOmniTypedResponseFormat DeserializeInternalOmniTypedResponseFormat(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "json_object": return InternalResponseFormatJsonObject.DeserializeInternalResponseFormatJsonObject(element, options); - case "json_schema": return InternalResponseFormatJsonSchema.DeserializeInternalResponseFormatJsonSchema(element, options); - case "text": return InternalResponseFormatText.DeserializeInternalResponseFormatText(element, options); + case "text": + return InternalResponseFormatText.DeserializeInternalResponseFormatText(element, options); + case "json_object": + return InternalResponseFormatJsonObject.DeserializeInternalResponseFormatJsonObject(element, options); + case "json_schema": + return InternalResponseFormatJsonSchema.DeserializeInternalResponseFormatJsonSchema(element, options); } } return InternalUnknownOmniTypedResponseFormat.DeserializeInternalUnknownOmniTypedResponseFormat(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -93,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalOmniTypedResponseFormat(document.RootElement, options); } default: @@ -111,15 +117,16 @@ InternalOmniTypedResponseFormat IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalOmniTypedResponseFormat FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalOmniTypedResponseFormat internalOmniTypedResponseFormat) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalOmniTypedResponseFormat(document.RootElement); + return BinaryContent.Create(internalOmniTypedResponseFormat, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalOmniTypedResponseFormat(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalOmniTypedResponseFormat(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs index da255f506..4a1e6d5b2 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs @@ -9,15 +9,17 @@ namespace OpenAI.Internal { internal abstract partial class InternalOmniTypedResponseFormat { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalOmniTypedResponseFormat() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalOmniTypedResponseFormat(string @type) { + Type = @type; } - internal InternalOmniTypedResponseFormat(string type, IDictionary serializedAdditionalRawData) + internal InternalOmniTypedResponseFormat(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs b/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs index d32ba1770..666d4132a 100644 --- a/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs +++ b/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalOpenAIFileObject : IEquatable { private readonly string _value; + private const string FileValue = "file"; public InternalOpenAIFileObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FileValue = "file"; + _value = value; + } public static InternalOpenAIFileObject File { get; } = new InternalOpenAIFileObject(FileValue); + public static bool operator ==(InternalOpenAIFileObject left, InternalOpenAIFileObject right) => left.Equals(right); + public static bool operator !=(InternalOpenAIFileObject left, InternalOpenAIFileObject right) => !left.Equals(right); + public static implicit operator InternalOpenAIFileObject(string value) => new InternalOpenAIFileObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalOpenAIFileObject other && Equals(other); + public bool Equals(InternalOpenAIFileObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index abecb82df..2b865f814 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -7,61 +7,84 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRequestMessageTextContent : IJsonModel { - InternalRequestMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalRequestMessageTextContent() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalRequestMessageTextContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalRequestMessageTextContent)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + InternalRequestMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRequestMessageTextContent)JsonModelCreateCore(ref reader, options); + + protected override MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRequestMessageTextContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRequestMessageTextContent(document.RootElement, options); } - internal static InternalRequestMessageTextContent DeserializeInternalRequestMessageTextContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRequestMessageTextContent DeserializeInternalRequestMessageTextContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalMessageRequestContentTextObjectType type = default; + InternalMessageRequestContentTextObjectType @type = default; string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalMessageRequestContentTextObjectType(property.Value.GetString()); + @type = new InternalMessageRequestContentTextObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRequestMessageTextContent(serializedAdditionalRawData, type, text); + return new InternalRequestMessageTextContent(@type, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelReade } } - InternalRequestMessageTextContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRequestMessageTextContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRequestMessageTextContent)PersistableModelCreateCore(data, options); + protected override MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRequestMessageTextContent(document.RootElement, options); } default: @@ -89,15 +113,16 @@ InternalRequestMessageTextContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRequestMessageTextContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRequestMessageTextContent internalRequestMessageTextContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRequestMessageTextContent(document.RootElement); + return BinaryContent.Create(internalRequestMessageTextContent, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRequestMessageTextContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRequestMessageTextContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs index 7fb763cb2..0aa4e93aa 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs @@ -4,28 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRequestMessageTextContent : MessageContent { - public InternalRequestMessageTextContent(string internalText) + public InternalRequestMessageTextContent(string text) { - Argument.AssertNotNull(internalText, nameof(internalText)); + Argument.AssertNotNull(text, nameof(text)); - InternalText = internalText; + Text = text; } - internal InternalRequestMessageTextContent(IDictionary serializedAdditionalRawData, InternalMessageRequestContentTextObjectType type, string internalText) : base(serializedAdditionalRawData) + internal InternalRequestMessageTextContent(InternalMessageRequestContentTextObjectType @type, string text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - Type = type; - InternalText = internalText; + Type = @type; + Text = text; } - internal InternalRequestMessageTextContent() - { - } - - public InternalMessageRequestContentTextObjectType Type { get; } = InternalMessageRequestContentTextObjectType.Text; + public InternalMessageRequestContentTextObjectType Type { get; } = "text"; } } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index ab8bbc81c..3fa04d455 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRequiredFunctionToolCall : IJsonModel { + internal InternalRequiredFunctionToolCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRequiredFunctionToolCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteObjectValue(_type, options); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(_internalFunction, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } - InternalRequiredFunctionToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRequiredFunctionToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRequiredFunctionToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRequiredFunctionToolCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRequiredFunctionToolCall(document.RootElement, options); } - internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunctionToolCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunctionToolCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - object type = default; + InternalRunToolCallObjectType @type = default; InternalRunToolCallObjectFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetObject(); + @type = new InternalRunToolCallObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(property.Value, options); + function = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRequiredFunctionToolCall(id, type, function, serializedAdditionalRawData); + return new InternalRequiredFunctionToolCall(id, @type, function, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalRequiredFunctionToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRequiredFunctionToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRequiredFunctionToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRequiredFunctionToolCall(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalRequiredFunctionToolCall IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRequiredFunctionToolCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRequiredFunctionToolCall internalRequiredFunctionToolCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRequiredFunctionToolCall(document.RootElement); + return BinaryContent.Create(internalRequiredFunctionToolCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRequiredFunctionToolCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRequiredFunctionToolCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index 3d44b809d..647a9a1e5 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -9,28 +9,26 @@ namespace OpenAI.Assistants { internal partial class InternalRequiredFunctionToolCall { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction internalFunction) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(internalFunction, nameof(internalFunction)); + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction function) + { Id = id; - _internalFunction = internalFunction; + Function = function; } - internal InternalRequiredFunctionToolCall(string id, object type, InternalRunToolCallObjectFunction internalFunction, IDictionary serializedAdditionalRawData) + internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectType @type, InternalRunToolCallObjectFunction function, IDictionary additionalBinaryDataProperties) { Id = id; - _type = type; - _internalFunction = internalFunction; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + Function = function; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRequiredFunctionToolCall() - { - } + public string Id { get; set; } + + public InternalRunToolCallObjectType Type { get; } = "function"; - public string Id { get; } + public InternalRunToolCallObjectFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs index 66e2b97f1..77792f78b 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { @@ -14,84 +15,62 @@ internal partial class InternalResponseFormatJsonObject : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalResponseFormatJsonObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseFormatJsonObject)JsonModelCreateCore(ref reader, options); + + protected override InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseFormatJsonObject(document.RootElement, options); } - internal static InternalResponseFormatJsonObject DeserializeInternalResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseFormatJsonObject DeserializeInternalResponseFormatJsonObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_object"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalResponseFormatJsonObject(type, serializedAdditionalRawData); + return new InternalResponseFormatJsonObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseFormatJsonObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalResponseFormatJsonObject)PersistableModelCreateCore(data, options); + protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseFormatJsonObject(document.RootElement, options); } default: @@ -119,15 +99,16 @@ InternalResponseFormatJsonObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalResponseFormatJsonObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseFormatJsonObject internalResponseFormatJsonObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseFormatJsonObject(document.RootElement); + return BinaryContent.Create(internalResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalResponseFormatJsonObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseFormatJsonObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.cs index b62b1891f..d6348da4a 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.cs @@ -9,12 +9,11 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonObject : InternalOmniTypedResponseFormat { - public InternalResponseFormatJsonObject() + public InternalResponseFormatJsonObject() : base("json_object") { - Type = "json_object"; } - internal InternalResponseFormatJsonObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalResponseFormatJsonObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index 1746508f2..a7c23b0aa 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchema : IJsonModel { + internal InternalResponseFormatJsonSchema() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchema)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("json_schema") != true) - { - writer.WritePropertyName("json_schema"u8); - writer.WriteObjectValue(JsonSchema, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); } - InternalResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); + + protected override InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchema)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseFormatJsonSchema(document.RootElement, options); } - internal static InternalResponseFormatJsonSchema DeserializeInternalResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseFormatJsonSchema DeserializeInternalResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "json_schema"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("json_schema"u8)) + if (prop.NameEquals("json_schema"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(property.Value, options); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalResponseFormatJsonSchema(type, serializedAdditionalRawData, jsonSchema); + return new InternalResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseFormatJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalResponseFormatJsonSchema)PersistableModelCreateCore(data, options); + protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseFormatJsonSchema(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalResponseFormatJsonSchema IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalResponseFormatJsonSchema FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseFormatJsonSchema internalResponseFormatJsonSchema) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseFormatJsonSchema(document.RootElement); + return BinaryContent.Create(internalResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalResponseFormatJsonSchema(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseFormatJsonSchema(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs index 739eb22b9..e512ae87c 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs @@ -4,28 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchema : InternalOmniTypedResponseFormat { - public InternalResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) + public InternalResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base("json_schema") { Argument.AssertNotNull(jsonSchema, nameof(jsonSchema)); - Type = "json_schema"; JsonSchema = jsonSchema; } - internal InternalResponseFormatJsonSchema(string type, IDictionary serializedAdditionalRawData, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(type, serializedAdditionalRawData) + internal InternalResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } - internal InternalResponseFormatJsonSchema() - { - } - public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 5b9c4d930..897823b52 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -7,43 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaJsonSchema : IJsonModel { + internal InternalResponseFormatJsonSchemaJsonSchema() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchemaJsonSchema)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(Description)) + if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("schema") != true && Optional.IsDefined(Schema)) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Schema)) { writer.WritePropertyName("schema"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Schema); -#else - using (JsonDocument document = JsonDocument.Parse(Schema)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(Schema, options); } - if (SerializedAdditionalRawData?.ContainsKey("strict") != true && Optional.IsDefined(Strict)) + if (Optional.IsDefined(Strict)) { if (Strict != null) { @@ -52,20 +52,16 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("strict"); + writer.WriteNull("strict"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,80 +70,82 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalResponseFormatJsonSchemaJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalResponseFormatJsonSchemaJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalResponseFormatJsonSchemaJsonSchema JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchemaJsonSchema)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseFormatJsonSchemaJsonSchema(document.RootElement, options); } - internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalResponseFormatJsonSchemaJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalResponseFormatJsonSchemaJsonSchema(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string description = default; string name = default; - BinaryData schema = default; + InternalResponseFormatJsonSchemaSchema schema = default; bool? strict = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("description"u8)) + if (prop.NameEquals("description"u8)) { - description = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("schema"u8)) + if (prop.NameEquals("schema"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + schema = null; continue; } - schema = BinaryData.FromString(property.Value.GetRawText()); + schema = InternalResponseFormatJsonSchemaSchema.DeserializeInternalResponseFormatJsonSchemaSchema(prop.Value, options); continue; } - if (property.NameEquals("strict"u8)) + if (prop.NameEquals("strict"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { strict = null; continue; } - strict = property.Value.GetBoolean(); + strict = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalResponseFormatJsonSchemaJsonSchema(description, name, schema, strict, serializedAdditionalRawData); + return new InternalResponseFormatJsonSchemaJsonSchema(description, name, schema, strict, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -157,15 +155,16 @@ BinaryData IPersistableModel.Write(M } } - InternalResponseFormatJsonSchemaJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseFormatJsonSchemaJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalResponseFormatJsonSchemaJsonSchema PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseFormatJsonSchemaJsonSchema(document.RootElement, options); } default: @@ -175,15 +174,16 @@ InternalResponseFormatJsonSchemaJsonSchema IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalResponseFormatJsonSchemaJsonSchema FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseFormatJsonSchemaJsonSchema internalResponseFormatJsonSchemaJsonSchema) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseFormatJsonSchemaJsonSchema(document.RootElement); + return BinaryContent.Create(internalResponseFormatJsonSchemaJsonSchema, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalResponseFormatJsonSchemaJsonSchema(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseFormatJsonSchemaJsonSchema(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs index 533d36db0..bd600d65c 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaJsonSchema { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalResponseFormatJsonSchemaJsonSchema(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -17,21 +19,19 @@ public InternalResponseFormatJsonSchemaJsonSchema(string name) Name = name; } - internal InternalResponseFormatJsonSchemaJsonSchema(string description, string name, BinaryData schema, bool? strict, IDictionary serializedAdditionalRawData) + internal InternalResponseFormatJsonSchemaJsonSchema(string description, string name, InternalResponseFormatJsonSchemaSchema schema, bool? strict, IDictionary additionalBinaryDataProperties) { Description = description; Name = name; Schema = schema; Strict = strict; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalResponseFormatJsonSchemaJsonSchema() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Description { get; set; } + public string Name { get; set; } + public bool? Strict { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs index d77918543..7be6b78b6 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { @@ -14,18 +15,23 @@ internal partial class InternalResponseFormatJsonSchemaSchema : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchemaSchema)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -33,43 +39,40 @@ void IJsonModel.Write(Utf8JsonWriter wri } #endif } - writer.WriteEndObject(); } - InternalResponseFormatJsonSchemaSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalResponseFormatJsonSchemaSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalResponseFormatJsonSchemaSchema JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchemaSchema)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseFormatJsonSchemaSchema(document.RootElement, options); } - internal static InternalResponseFormatJsonSchemaSchema DeserializeInternalResponseFormatJsonSchemaSchema(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseFormatJsonSchemaSchema DeserializeInternalResponseFormatJsonSchemaSchema(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; return new InternalResponseFormatJsonSchemaSchema(additionalProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -79,15 +82,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalResponseFormatJsonSchemaSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseFormatJsonSchemaSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalResponseFormatJsonSchemaSchema PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseFormatJsonSchemaSchema(document.RootElement, options); } default: @@ -97,15 +101,16 @@ InternalResponseFormatJsonSchemaSchema IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalResponseFormatJsonSchemaSchema FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseFormatJsonSchemaSchema internalResponseFormatJsonSchemaSchema) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseFormatJsonSchemaSchema(document.RootElement); + return BinaryContent.Create(internalResponseFormatJsonSchemaSchema, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalResponseFormatJsonSchemaSchema(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseFormatJsonSchemaSchema(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs index d00500adb..585f0b244 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs @@ -4,21 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaSchema { + private protected IDictionary _additionalBinaryDataProperties; + public InternalResponseFormatJsonSchemaSchema() { - AdditionalProperties = new ChangeTrackingDictionary(); + _additionalBinaryDataProperties = new ChangeTrackingDictionary(); } internal InternalResponseFormatJsonSchemaSchema(IDictionary additionalProperties) { - AdditionalProperties = additionalProperties; + _additionalBinaryDataProperties = additionalProperties; } - public IDictionary AdditionalProperties { get; } + public IDictionary AdditionalProperties => _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs index b213da2e7..c8b013d9d 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { @@ -14,84 +15,62 @@ internal partial class InternalResponseFormatText : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatText)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalResponseFormatText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseFormatText)JsonModelCreateCore(ref reader, options); + + protected override InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalResponseFormatText)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseFormatText(document.RootElement, options); } - internal static InternalResponseFormatText DeserializeInternalResponseFormatText(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseFormatText DeserializeInternalResponseFormatText(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "text"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalResponseFormatText(type, serializedAdditionalRawData); + return new InternalResponseFormatText(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - InternalResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseFormatText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalResponseFormatText)PersistableModelCreateCore(data, options); + protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseFormatText(document.RootElement, options); } default: @@ -119,15 +99,16 @@ InternalResponseFormatText IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalResponseFormatText FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseFormatText internalResponseFormatText) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseFormatText(document.RootElement); + return BinaryContent.Create(internalResponseFormatText, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalResponseFormatText(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseFormatText(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatText.cs b/.dotnet/src/Generated/Models/InternalResponseFormatText.cs index efe4d6fce..81ccbc8d1 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatText.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatText.cs @@ -9,12 +9,11 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatText : InternalOmniTypedResponseFormat { - public InternalResponseFormatText() + public InternalResponseFormatText() : base("text") { - Type = "text"; } - internal InternalResponseFormatText(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalResponseFormatText(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 4a89d0389..48e162679 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -7,61 +7,84 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalResponseMessageTextContent : IJsonModel { - InternalResponseMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalResponseMessageTextContent() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalResponseMessageTextContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InternalResponseMessageTextContent)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text, options); + } + InternalResponseMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseMessageTextContent)JsonModelCreateCore(ref reader, options); + + protected override MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalResponseMessageTextContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalResponseMessageTextContent(document.RootElement, options); } - internal static InternalResponseMessageTextContent DeserializeInternalResponseMessageTextContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalResponseMessageTextContent DeserializeInternalResponseMessageTextContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; + InternalMessageContentTextObjectType @type = default; InternalMessageContentTextObjectText text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = new InternalMessageContentTextObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = InternalMessageContentTextObjectText.DeserializeInternalMessageContentTextObjectText(property.Value, options); + text = InternalMessageContentTextObjectText.DeserializeInternalMessageContentTextObjectText(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalResponseMessageTextContent(serializedAdditionalRawData, type, text); + return new InternalResponseMessageTextContent(@type, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +94,16 @@ BinaryData IPersistableModel.Write(ModelRead } } - InternalResponseMessageTextContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalResponseMessageTextContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalResponseMessageTextContent)PersistableModelCreateCore(data, options); + protected override MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalResponseMessageTextContent(document.RootElement, options); } default: @@ -89,15 +113,16 @@ InternalResponseMessageTextContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalResponseMessageTextContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalResponseMessageTextContent internalResponseMessageTextContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalResponseMessageTextContent(document.RootElement); + return BinaryContent.Create(internalResponseMessageTextContent, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalResponseMessageTextContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalResponseMessageTextContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs index 83930eb9b..75784e85a 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs @@ -9,14 +9,14 @@ namespace OpenAI.Assistants { internal partial class InternalResponseMessageTextContent : MessageContent { - internal InternalResponseMessageTextContent(IDictionary serializedAdditionalRawData, string type, InternalMessageContentTextObjectText text) : base(serializedAdditionalRawData) + internal InternalResponseMessageTextContent(InternalMessageContentTextObjectType @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - _type = type; - _text = text; + Type = @type; + Text = text; } - internal InternalResponseMessageTextContent() - { - } + public InternalMessageContentTextObjectType Type { get; } = "text"; + + public InternalMessageContentTextObjectText Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunObjectObject.cs index 4f2c77d99..3e5daf6e8 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunObjectObject : IEquatable { private readonly string _value; + private const string ThreadRunValue = "thread.run"; public InternalRunObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadRunValue = "thread.run"; + _value = value; + } public static InternalRunObjectObject ThreadRun { get; } = new InternalRunObjectObject(ThreadRunValue); + public static bool operator ==(InternalRunObjectObject left, InternalRunObjectObject right) => left.Equals(right); + public static bool operator !=(InternalRunObjectObject left, InternalRunObjectObject right) => !left.Equals(right); + public static implicit operator InternalRunObjectObject(string value) => new InternalRunObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunObjectObject other && Equals(other); + public bool Equals(InternalRunObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index cd9245941..94322ef51 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -7,41 +7,44 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunObjectRequiredActionSubmitToolOutputs : IJsonModel { + internal InternalRunObjectRequiredActionSubmitToolOutputs() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true) + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) { - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,58 +53,54 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } - InternalRunObjectRequiredActionSubmitToolOutputs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunObjectRequiredActionSubmitToolOutputs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunObjectRequiredActionSubmitToolOutputs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(document.RootElement, options); } - internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList toolCalls = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList toolCalls = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalRequiredFunctionToolCall.DeserializeInternalRequiredFunctionToolCall(item, options)); } toolCalls = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunObjectRequiredActionSubmitToolOutputs(toolCalls, serializedAdditionalRawData); + return new InternalRunObjectRequiredActionSubmitToolOutputs(toolCalls, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -111,15 +110,16 @@ BinaryData IPersistableModel.W } } - InternalRunObjectRequiredActionSubmitToolOutputs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunObjectRequiredActionSubmitToolOutputs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunObjectRequiredActionSubmitToolOutputs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(document.RootElement, options); } default: @@ -129,15 +129,16 @@ InternalRunObjectRequiredActionSubmitToolOutputs IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunObjectRequiredActionSubmitToolOutputs FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunObjectRequiredActionSubmitToolOutputs internalRunObjectRequiredActionSubmitToolOutputs) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(document.RootElement); + return BinaryContent.Create(internalRunObjectRequiredActionSubmitToolOutputs, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunObjectRequiredActionSubmitToolOutputs(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs index 323fc341c..2ed1a55f1 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs @@ -10,24 +10,19 @@ namespace OpenAI.Assistants { internal partial class InternalRunObjectRequiredActionSubmitToolOutputs { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunObjectRequiredActionSubmitToolOutputs(IEnumerable toolCalls) { - Argument.AssertNotNull(toolCalls, nameof(toolCalls)); - ToolCalls = toolCalls.ToList(); } - internal InternalRunObjectRequiredActionSubmitToolOutputs(IReadOnlyList toolCalls, IDictionary serializedAdditionalRawData) + internal InternalRunObjectRequiredActionSubmitToolOutputs(IList toolCalls, IDictionary additionalBinaryDataProperties) { ToolCalls = toolCalls; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRunObjectRequiredActionSubmitToolOutputs() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList ToolCalls { get; } + public IList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs index bd53c3266..943d81c6b 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunObjectRequiredActionType : IEquatable { private readonly string _value; + private const string SubmitToolOutputsValue = "submit_tool_outputs"; public InternalRunObjectRequiredActionType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string SubmitToolOutputsValue = "submit_tool_outputs"; + _value = value; + } public static InternalRunObjectRequiredActionType SubmitToolOutputs { get; } = new InternalRunObjectRequiredActionType(SubmitToolOutputsValue); + public static bool operator ==(InternalRunObjectRequiredActionType left, InternalRunObjectRequiredActionType right) => left.Equals(right); + public static bool operator !=(InternalRunObjectRequiredActionType left, InternalRunObjectRequiredActionType right) => !left.Equals(right); + public static implicit operator InternalRunObjectRequiredActionType(string value) => new InternalRunObjectRequiredActionType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunObjectRequiredActionType other && Equals(other); + public bool Equals(InternalRunObjectRequiredActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index 67fe40abc..c79224331 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunRequiredAction : IJsonModel { + internal InternalRunRequiredAction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunRequiredAction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteObjectValue(Type, options); - } - if (SerializedAdditionalRawData?.ContainsKey("submit_tool_outputs") != true) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("submit_tool_outputs"u8); + writer.WriteObjectValue(SubmitToolOutputs, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("submit_tool_outputs"u8); - writer.WriteObjectValue(SubmitToolOutputs, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - InternalRunRequiredAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunRequiredAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunRequiredAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunRequiredAction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunRequiredAction(document.RootElement, options); } - internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - object type = default; + InternalRunObjectRequiredActionType @type = default; InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetObject(); + @type = new InternalRunObjectRequiredActionType(prop.Value.GetString()); continue; } - if (property.NameEquals("submit_tool_outputs"u8)) + if (prop.NameEquals("submit_tool_outputs"u8)) { - submitToolOutputs = InternalRunObjectRequiredActionSubmitToolOutputs.DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(property.Value, options); + submitToolOutputs = InternalRunObjectRequiredActionSubmitToolOutputs.DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunRequiredAction(type, submitToolOutputs, serializedAdditionalRawData); + return new InternalRunRequiredAction(@type, submitToolOutputs, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - InternalRunRequiredAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunRequiredAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunRequiredAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunRequiredAction(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalRunRequiredAction IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunRequiredAction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunRequiredAction internalRunRequiredAction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunRequiredAction(document.RootElement); + return BinaryContent.Create(internalRunRequiredAction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunRequiredAction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunRequiredAction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 627dd8b84..1946552ea 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -9,25 +9,22 @@ namespace OpenAI.Assistants { internal partial class InternalRunRequiredAction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs) { - Argument.AssertNotNull(submitToolOutputs, nameof(submitToolOutputs)); - SubmitToolOutputs = submitToolOutputs; } - internal InternalRunRequiredAction(object type, InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, IDictionary serializedAdditionalRawData) + internal InternalRunRequiredAction(InternalRunObjectRequiredActionType @type, InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; SubmitToolOutputs = submitToolOutputs; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRunRequiredAction() - { - } + public InternalRunObjectRequiredActionType Type { get; } = "submit_tool_outputs"; - public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; } + public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 84313365a..1f8741634 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepCodeInterpreterLogOutput : IJsonModel { + internal InternalRunStepCodeInterpreterLogOutput() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterLogOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("logs") != true) - { - writer.WritePropertyName("logs"u8); - writer.WriteStringValue(InternalLogs); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("logs"u8); + writer.WriteStringValue(Logs); } - InternalRunStepCodeInterpreterLogOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepCodeInterpreterLogOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterLogOutput)JsonModelCreateCore(ref reader, options); + + protected override RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterLogOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepCodeInterpreterLogOutput(document.RootElement, options); } - internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunStepCodeInterpreterLogOutput(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunStepCodeInterpreterLogOutput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string logs = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "logs"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("logs"u8)) + if (prop.NameEquals("logs"u8)) { - logs = property.Value.GetString(); + logs = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepCodeInterpreterLogOutput(type, serializedAdditionalRawData, logs); + return new InternalRunStepCodeInterpreterLogOutput(logs, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(Mode } } - InternalRunStepCodeInterpreterLogOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepCodeInterpreterLogOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterLogOutput)PersistableModelCreateCore(data, options); + protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepCodeInterpreterLogOutput(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalRunStepCodeInterpreterLogOutput IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepCodeInterpreterLogOutput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepCodeInterpreterLogOutput internalRunStepCodeInterpreterLogOutput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepCodeInterpreterLogOutput(document.RootElement); + return BinaryContent.Create(internalRunStepCodeInterpreterLogOutput, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepCodeInterpreterLogOutput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepCodeInterpreterLogOutput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs index a44f25f41..39b6d5068 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs @@ -9,21 +9,14 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepCodeInterpreterLogOutput : RunStepCodeInterpreterOutput { - internal InternalRunStepCodeInterpreterLogOutput(string internalLogs) + internal InternalRunStepCodeInterpreterLogOutput(string logs) : base("logs") { - Argument.AssertNotNull(internalLogs, nameof(internalLogs)); - - Type = "logs"; - InternalLogs = internalLogs; - } - - internal InternalRunStepCodeInterpreterLogOutput(string type, IDictionary serializedAdditionalRawData, string internalLogs) : base(type, serializedAdditionalRawData) - { - InternalLogs = internalLogs; + Logs = logs; } - internal InternalRunStepCodeInterpreterLogOutput() + internal InternalRunStepCodeInterpreterLogOutput(string logs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + Logs = logs; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index af3e3f3fd..4e967a4ed 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -7,113 +7,90 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepCodeInterpreterToolCallDetails : IJsonModel { + internal InternalRunStepCodeInterpreterToolCallDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterToolCallDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(_codeInterpreter, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("code_interpreter"u8); + writer.WriteObjectValue(CodeInterpreter, options); } - InternalRunStepCodeInterpreterToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepCodeInterpreterToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterToolCallDetails)JsonModelCreateCore(ref reader, options); + + protected override RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterToolCallDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepCodeInterpreterToolCallDetails(document.RootElement, options); } - internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInternalRunStepCodeInterpreterToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInternalRunStepCodeInterpreterToolCallDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "code_interpreter"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - codeInterpreter = InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(property.Value, options); + codeInterpreter = InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepCodeInterpreterToolCallDetails(type, serializedAdditionalRawData, id, codeInterpreter); + return new InternalRunStepCodeInterpreterToolCallDetails(id, codeInterpreter, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +100,16 @@ BinaryData IPersistableModel.Writ } } - InternalRunStepCodeInterpreterToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepCodeInterpreterToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterToolCallDetails)PersistableModelCreateCore(data, options); + protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepCodeInterpreterToolCallDetails(document.RootElement, options); } default: @@ -141,15 +119,16 @@ InternalRunStepCodeInterpreterToolCallDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepCodeInterpreterToolCallDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepCodeInterpreterToolCallDetails internalRunStepCodeInterpreterToolCallDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepCodeInterpreterToolCallDetails(document.RootElement); + return BinaryContent.Create(internalRunStepCodeInterpreterToolCallDetails, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepCodeInterpreterToolCallDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepCodeInterpreterToolCallDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs index 0b72cde80..52fb4e256 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -9,26 +9,20 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepCodeInterpreterToolCallDetails : RunStepToolCall { - internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) + internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base("code_interpreter") { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(codeInterpreter, nameof(codeInterpreter)); - - Type = "code_interpreter"; Id = id; - _codeInterpreter = codeInterpreter; + CodeInterpreter = codeInterpreter; } - internal InternalRunStepCodeInterpreterToolCallDetails(string type, IDictionary serializedAdditionalRawData, string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base(type, serializedAdditionalRawData) + internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; - _codeInterpreter = codeInterpreter; + CodeInterpreter = codeInterpreter; } - internal InternalRunStepCodeInterpreterToolCallDetails() - { - } + public string Id { get; set; } - public string Id { get; } + public InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index 3b6d44463..4fa2e3c7a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDelta : IJsonModel { + internal InternalRunStepDelta() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDelta)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteObjectValue(Delta, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } - InternalRunStepDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDelta JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDelta)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDelta(document.RootElement, options); } - internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - object @object = default; + InternalRunStepDeltaObjectObject @object = default; InternalRunStepDeltaObjectDelta delta = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = property.Value.GetObject(); + @object = new InternalRunStepDeltaObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("delta"u8)) + if (prop.NameEquals("delta"u8)) { - delta = InternalRunStepDeltaObjectDelta.DeserializeInternalRunStepDeltaObjectDelta(property.Value, options); + delta = InternalRunStepDeltaObjectDelta.DeserializeInternalRunStepDeltaObjectDelta(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDelta(id, @object, delta, serializedAdditionalRawData); + return new InternalRunStepDelta(id, @object, delta, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - InternalRunStepDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDelta PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDelta(document.RootElement, options); } default: @@ -141,15 +135,16 @@ InternalRunStepDelta IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDelta FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDelta internalRunStepDelta) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDelta(document.RootElement); + return BinaryContent.Create(internalRunStepDelta, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDelta(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 55d73464a..92bfc67c6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -9,30 +9,26 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDelta { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(delta, nameof(delta)); - Id = id; Delta = delta; } - internal InternalRunStepDelta(string id, object @object, InternalRunStepDeltaObjectDelta delta, IDictionary serializedAdditionalRawData) + internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectObject @object, InternalRunStepDeltaObjectDelta delta, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; Delta = delta; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRunStepDelta() - { - } + public string Id { get; set; } - public string Id { get; } + public InternalRunStepDeltaObjectObject Object { get; } = "thread.run.step.delta"; - public InternalRunStepDeltaObjectDelta Delta { get; } + public InternalRunStepDeltaObjectDelta Delta { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs index b3430a127..e3c4a935c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,30 @@ internal partial class InternalRunStepDeltaObjectDelta : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaObjectDelta)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("step_details") != true && Optional.IsDefined(StepDetails)) + if (Optional.IsDefined(StepDetails)) { writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(StepDetails, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,57 +47,54 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalRunStepDeltaObjectDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaObjectDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaObjectDelta JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaObjectDelta)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaObjectDelta(document.RootElement, options); } - internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaObjectDelta(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaObjectDelta(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalRunStepDeltaStepDetails stepDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("step_details"u8)) + if (prop.NameEquals("step_details"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + stepDetails = null; continue; } - stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(property.Value, options); + stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaObjectDelta(stepDetails, serializedAdditionalRawData); + return new InternalRunStepDeltaObjectDelta(stepDetails, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +104,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalRunStepDeltaObjectDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaObjectDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaObjectDelta PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaObjectDelta(document.RootElement, options); } default: @@ -123,15 +123,16 @@ InternalRunStepDeltaObjectDelta IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaObjectDelta FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaObjectDelta internalRunStepDeltaObjectDelta) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaObjectDelta(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaObjectDelta, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaObjectDelta(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaObjectDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs index 1faf845db..cbc7105d0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaObjectDelta { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDeltaObjectDelta() { } - internal InternalRunStepDeltaObjectDelta(InternalRunStepDeltaStepDetails stepDetails, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaObjectDelta(InternalRunStepDeltaStepDetails stepDetails, IDictionary additionalBinaryDataProperties) { StepDetails = stepDetails; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunStepDeltaStepDetails StepDetails { get; } + public InternalRunStepDeltaStepDetails StepDetails { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs index ea17969d2..8214252da 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunStepDeltaObjectObject : IEquatable { private readonly string _value; + private const string ThreadRunStepDeltaValue = "thread.run.step.delta"; public InternalRunStepDeltaObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadRunStepDeltaValue = "thread.run.step.delta"; + _value = value; + } public static InternalRunStepDeltaObjectObject ThreadRunStepDelta { get; } = new InternalRunStepDeltaObjectObject(ThreadRunStepDeltaValue); + public static bool operator ==(InternalRunStepDeltaObjectObject left, InternalRunStepDeltaObjectObject right) => left.Equals(right); + public static bool operator !=(InternalRunStepDeltaObjectObject left, InternalRunStepDeltaObjectObject right) => !left.Equals(right); + public static implicit operator InternalRunStepDeltaObjectObject(string value) => new InternalRunStepDeltaObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunStepDeltaObjectObject other && Equals(other); + public bool Equals(InternalRunStepDeltaObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index 6ba369d00..36d3a0305 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepDeltaStepDetails))] - internal partial class InternalRunStepDeltaStepDetails : IJsonModel + internal abstract partial class InternalRunStepDeltaStepDetails : IJsonModel { + internal InternalRunStepDeltaStepDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetails(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetails DeserializeInternalRunStepDeltaStepDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetails DeserializeInternalRunStepDeltaStepDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "message_creation": return InternalRunStepDeltaStepDetailsMessageCreationObject.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(element, options); - case "tool_calls": return InternalRunStepDeltaStepDetailsToolCallsObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(element, options); + case "message_creation": + return InternalRunStepDeltaStepDetailsMessageCreationObject.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(element, options); + case "tool_calls": + return InternalRunStepDeltaStepDetailsToolCallsObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(element, options); } } return UnknownRunStepDeltaStepDetails.DeserializeUnknownRunStepDeltaStepDetails(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetails(document.RootElement, options); } default: @@ -110,15 +115,16 @@ InternalRunStepDeltaStepDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetails internalRunStepDeltaStepDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetails(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs index 987886798..c934d03d3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRunStepDeltaStepDetails() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRunStepDeltaStepDetails(string @type) { + Type = @type; } - internal InternalRunStepDeltaStepDetails(string type, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetails(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 0c0825062..035bfe948 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,99 +15,78 @@ internal partial class InternalRunStepDeltaStepDetailsMessageCreationObject : IJ { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("message_creation") != true && Optional.IsDefined(MessageCreation)) + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(MessageCreation)) { writer.WritePropertyName("message_creation"u8); writer.WriteObjectValue(MessageCreation, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsMessageCreationObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsMessageCreationObject DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsMessageCreationObject DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "message_creation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("message_creation"u8)) + if (prop.NameEquals("message_creation"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + messageCreation = null; continue; } - messageCreation = InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(property.Value, options); + messageCreation = InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsMessageCreationObject(type, serializedAdditionalRawData, messageCreation); + return new InternalRunStepDeltaStepDetailsMessageCreationObject(messageCreation, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +96,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsMessageCreationObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsMessageCreationObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(document.RootElement, options); } default: @@ -134,15 +115,16 @@ InternalRunStepDeltaStepDetailsMessageCreationObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsMessageCreationObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsMessageCreationObject internalRunStepDeltaStepDetailsMessageCreationObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsMessageCreationObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsMessageCreationObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs index 0ee0b50a4..18025db59 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs @@ -9,16 +9,15 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsMessageCreationObject : InternalRunStepDeltaStepDetails { - internal InternalRunStepDeltaStepDetailsMessageCreationObject() + internal InternalRunStepDeltaStepDetailsMessageCreationObject() : base("message_creation") { - Type = "message_creation"; } - internal InternalRunStepDeltaStepDetailsMessageCreationObject(string type, IDictionary serializedAdditionalRawData, InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsMessageCreationObject(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { MessageCreation = messageCreation; } - public InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; } + public InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 24e660350..bc2dd8fc7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,30 @@ internal partial class InternalRunStepDeltaStepDetailsMessageCreationObjectMessa { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("message_id") != true && Optional.IsDefined(MessageId)) + if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +47,54 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string messageId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("message_id"u8)) + if (prop.NameEquals("message_id"u8)) { - messageId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + messageId = null; + continue; + } + messageId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(messageId, serializedAdditionalRawData); + return new InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(messageId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +104,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(document.RootElement, options); } default: @@ -119,15 +123,16 @@ InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation IPersistable string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation internalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs index 812f249c3..0cb96d3f9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation() { } - internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(string messageId, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(string messageId, IDictionary additionalBinaryDataProperties) { MessageId = messageId; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string MessageId { get; } + public string MessageId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 0b67792c5..1d0f4da52 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -7,78 +7,60 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsCodeObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsCodeObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsCodeObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -86,49 +68,53 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn int index = default; string id = default; InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "code_interpreter"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(property.Value, options); + codeInterpreter = InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsCodeObject(type, serializedAdditionalRawData, index, id, codeInterpreter); + return new InternalRunStepDeltaStepDetailsToolCallsCodeObject(index, id, codeInterpreter, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -138,15 +124,16 @@ BinaryData IPersistableModel } } - InternalRunStepDeltaStepDetailsToolCallsCodeObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsCodeObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(document.RootElement, options); } default: @@ -156,15 +143,16 @@ InternalRunStepDeltaStepDetailsToolCallsCodeObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsCodeObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeObject internalRunStepDeltaStepDetailsToolCallsCodeObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsCodeObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs index ccd8ec23b..94181af8a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs @@ -9,25 +9,22 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObject : InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index) + internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index) : base("code_interpreter") { - Type = "code_interpreter"; Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(string type, IDictionary serializedAdditionalRawData, int index, string id, InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index, string id, InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; CodeInterpreter = codeInterpreter; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeObject() - { - } + public int Index { get; set; } + + public string Id { get; set; } - public int Index { get; } - public string Id { get; } - public InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; } + public InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index a95a27852..5f20df761 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInt { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("input") != true && Optional.IsDefined(Input)) + if (Optional.IsDefined(Input)) { writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (SerializedAdditionalRawData?.ContainsKey("outputs") != true && Optional.IsCollectionDefined(Outputs)) + if (Optional.IsCollectionDefined(Outputs)) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -36,17 +42,13 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string input = default; - IReadOnlyList outputs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList outputs = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("input"u8)) + if (prop.NameEquals("input"u8)) { - input = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + input = null; + continue; + } + input = prop.Value.GetString(); continue; } - if (property.NameEquals("outputs"u8)) + if (prop.NameEquals("outputs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(RunStepUpdateCodeInterpreterOutput.DeserializeRunStepUpdateCodeInterpreterOutput(item, options)); } outputs = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(input, outputs ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(input, outputs ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -126,15 +129,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, options); } default: @@ -144,15 +148,16 @@ InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter IPersistableMo string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter internalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 2330d340a..4e7c4d9f7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -4,25 +4,28 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter() { Outputs = new ChangeTrackingList(); } - internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IReadOnlyList outputs, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IList outputs, IDictionary additionalBinaryDataProperties) { Input = input; Outputs = outputs; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Input { get; } - public IReadOnlyList Outputs { get; } + public string Input { get; set; } + + public IList Outputs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 2e1725b51..9c6229523 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -7,117 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("image") != true && Optional.IsDefined(Image)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Image)) { writer.WritePropertyName("image"u8); writer.WriteObjectValue(Image, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "image"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("image"u8)) + if (prop.NameEquals("image"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + image = null; continue; } - image = InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(property.Value, options); + image = InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(type, serializedAdditionalRawData, index, image); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(index, image, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject)PersistableModelCreateCore(data, options); + protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(document.RootElement, options); } default: @@ -145,15 +127,16 @@ InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject IPersistableModel< string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs index 26acd5b75..77c77ae5c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs @@ -9,23 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject : RunStepUpdateCodeInterpreterOutput { - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index) : base("image") { - Type = "image"; Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(string type, IDictionary serializedAdditionalRawData, int index, InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index, InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Image = image; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject() - { - } + public int Index { get; set; } - public int Index { get; } - public InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage Image { get; } + public InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 9ad45a123..76bbfe8c3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,30 @@ internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageOb { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true && Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId)) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +47,54 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileId = null; + continue; + } + fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(fileId, serializedAdditionalRawData); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(fileId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +104,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, options); } default: @@ -119,15 +123,16 @@ InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage IPersistableM string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs index cd41fb9fa..e4be793af 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage() { } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(string fileId, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(string fileId, IDictionary additionalBinaryDataProperties) { FileId = fileId; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 0047ba1a9..0c30ab39c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -7,113 +7,98 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("logs") != true && Optional.IsDefined(InternalLogs)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Logs)) { writer.WritePropertyName("logs"u8); - writer.WriteStringValue(InternalLogs); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WriteStringValue(Logs); } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; string logs = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "logs"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("logs"u8)) + if (prop.NameEquals("logs"u8)) { - logs = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + logs = null; + continue; + } + logs = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(type, serializedAdditionalRawData, index, logs); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(index, logs, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)PersistableModelCreateCore(data, options); + protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(document.RootElement, options); } default: @@ -141,15 +127,16 @@ InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject internalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs index aa0e9501d..fc0aeea53 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs @@ -9,22 +9,17 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject : RunStepUpdateCodeInterpreterOutput { - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index) : base("logs") { - Type = "logs"; Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(string type, IDictionary serializedAdditionalRawData, int index, string internalLogs) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index, string logs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; - InternalLogs = internalLogs; + Logs = logs; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject() - { - } - - public int Index { get; } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index 78a34b22e..e6b6d3b40 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -7,154 +7,136 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFileSearchObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true) + writer.WritePropertyName("file_search"u8); + writer.WriteStartObject(); + foreach (var item in FileSearch) { - writer.WritePropertyName("file_search"u8); - writer.WriteStartObject(); - foreach (var item in FileSearch) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsFileSearchObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsFileSearchObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; string id = default; - IReadOnlyDictionary fileSearch = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary fileSearch = default; + string @type = "file_search"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - if (property0.Value.ValueKind == JsonValueKind.Null) + if (prop0.Value.ValueKind == JsonValueKind.Null) { - dictionary.Add(property0.Name, null); + dictionary.Add(prop0.Name, null); } else { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + dictionary.Add(prop0.Name, BinaryData.FromString(prop0.Value.GetRawText())); } } fileSearch = dictionary; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(type, serializedAdditionalRawData, index, id, fileSearch); + return new InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(index, id, fileSearch, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -164,15 +146,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsFileSearchObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(document.RootElement, options); } default: @@ -182,15 +165,16 @@ InternalRunStepDeltaStepDetailsToolCallsFileSearchObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsFileSearchObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFileSearchObject internalRunStepDeltaStepDetailsToolCallsFileSearchObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFileSearchObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs index e3db470bb..579e98ac2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs @@ -9,28 +9,23 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFileSearchObject : InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, IReadOnlyDictionary fileSearch) + internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, IDictionary fileSearch) : base("file_search") { - Argument.AssertNotNull(fileSearch, nameof(fileSearch)); - - Type = "file_search"; Index = index; FileSearch = fileSearch; } - internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(string type, IDictionary serializedAdditionalRawData, int index, string id, IReadOnlyDictionary fileSearch) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, string id, IDictionary fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; FileSearch = fileSearch; } - internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject() - { - } + public int Index { get; set; } + + public string Id { get; set; } - public int Index { get; } - public string Id { get; } - public IReadOnlyDictionary FileSearch { get; } + public IDictionary FileSearch { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 66776a57d..2c0be24e1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -7,78 +7,60 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("function") != true && Optional.IsDefined(Function)) + if (Optional.IsDefined(Function)) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsFunctionObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsFunctionObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsFunctionObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -86,49 +68,53 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali int index = default; string id = default; InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "function"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + function = null; continue; } - function = InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(property.Value, options); + function = InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsFunctionObject(type, serializedAdditionalRawData, index, id, function); + return new InternalRunStepDeltaStepDetailsToolCallsFunctionObject(index, id, function, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -138,15 +124,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsFunctionObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsFunctionObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(document.RootElement, options); } default: @@ -156,15 +143,16 @@ InternalRunStepDeltaStepDetailsToolCallsFunctionObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsFunctionObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFunctionObject internalRunStepDeltaStepDetailsToolCallsFunctionObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFunctionObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsFunctionObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs index e45ecae14..3b0050bf5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs @@ -9,25 +9,22 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObject : InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index) + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index) : base("function") { - Type = "function"; Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(string type, IDictionary serializedAdditionalRawData, int index, string id, InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index, string id, InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; Function = function; } - internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject() - { - } + public int Index { get; set; } + + public string Id { get; set; } - public int Index { get; } - public string Id { get; } - public InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction Function { get; } + public InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index f96531c16..b5bc37826 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,24 +15,29 @@ internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFun { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true && Optional.IsDefined(Arguments)) + if (Optional.IsDefined(Arguments)) { writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (SerializedAdditionalRawData?.ContainsKey("output") != true && Optional.IsDefined(Output)) + if (Optional.IsDefined(Output)) { if (Output != null) { @@ -40,20 +46,16 @@ void IJsonModel. } else { - writer.WriteNull("output"); + writer.WriteNull("output"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,25 +64,23 @@ void IJsonModel. #endif } } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -88,44 +88,52 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction D string name = default; string arguments = default; string output = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + arguments = null; + continue; + } + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("output"u8)) + if (prop.NameEquals("output"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { output = null; continue; } - output = property.Value.GetString(); + output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(name, arguments, output, serializedAdditionalRawData); + return new InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(name, arguments, output, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -135,15 +143,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(document.RootElement, options); } default: @@ -153,15 +162,16 @@ InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction internalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs index e546c4f89..8af370fc4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,21 +9,24 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction() { } - internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output, IDictionary additionalBinaryDataProperties) { Name = name; Arguments = arguments; Output = output; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; } - public string Arguments { get; } - public string Output { get; } + public string Name { get; set; } + + public string Arguments { get; set; } + + public string Output { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index b1ba9cfad..2ebe14a78 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,14 +15,20 @@ internal partial class InternalRunStepDeltaStepDetailsToolCallsObject : IJsonMod { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true && Optional.IsCollectionDefined(ToolCalls)) + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(ToolCalls)) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -31,92 +38,64 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList toolCalls = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList toolCalls = default; + string @type = "tool_calls"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDeltaStepDetailsToolCallsObject(type, serializedAdditionalRawData, toolCalls ?? new ChangeTrackingList()); + return new InternalRunStepDeltaStepDetailsToolCallsObject(toolCalls ?? new ChangeTrackingList(), @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -126,15 +105,16 @@ BinaryData IPersistableModel.Wri } } - InternalRunStepDeltaStepDetailsToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(document.RootElement, options); } default: @@ -144,15 +124,16 @@ InternalRunStepDeltaStepDetailsToolCallsObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDeltaStepDetailsToolCallsObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsObject internalRunStepDeltaStepDetailsToolCallsObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs index bae1ef100..291deb3c2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs @@ -4,22 +4,22 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsObject : InternalRunStepDeltaStepDetails { - internal InternalRunStepDeltaStepDetailsToolCallsObject() + internal InternalRunStepDeltaStepDetailsToolCallsObject() : base("tool_calls") { - Type = "tool_calls"; ToolCalls = new ChangeTrackingList(); } - internal InternalRunStepDeltaStepDetailsToolCallsObject(string type, IDictionary serializedAdditionalRawData, IReadOnlyList toolCalls) : base(type, serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsObject(IList toolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { ToolCalls = toolCalls; } - public IReadOnlyList ToolCalls { get; } + public IList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index f9aa10e1a..5fcbbae0d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject))] - internal partial class InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject : IJsonModel + internal abstract partial class InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject : IJsonModel { + internal InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,45 +48,47 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } - InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement, options); } - internal static InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "code_interpreter": return InternalRunStepDeltaStepDetailsToolCallsCodeObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(element, options); - case "file_search": return InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(element, options); - case "function": return InternalRunStepDeltaStepDetailsToolCallsFunctionObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(element, options); + case "code_interpreter": + return InternalRunStepDeltaStepDetailsToolCallsCodeObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObject(element, options); + case "file_search": + return InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsFileSearchObject(element, options); + case "function": + return InternalRunStepDeltaStepDetailsToolCallsFunctionObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObject(element, options); } } return UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.DeserializeUnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -93,15 +98,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement, options); } default: @@ -111,15 +117,16 @@ InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel< string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject internalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement); + return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs index 55b7f0b45..1b0e6d6aa 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject() + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @type) { + Type = @type; } - internal InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string type, IDictionary serializedAdditionalRawData) + internal InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 8f037505f..8b1df2914 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObject : IJsonModel { + internal InternalRunStepDetailsMessageCreationObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("message_creation") != true) - { - writer.WritePropertyName("message_creation"u8); - writer.WriteObjectValue(_messageCreation, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("message_creation"u8); + writer.WriteObjectValue(MessageCreation, options); } - InternalRunStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsMessageCreationObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsMessageCreationObject(document.RootElement, options); } - internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalRunStepDetailsMessageCreationObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalRunStepDetailsMessageCreationObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "message_creation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("message_creation"u8)) + if (prop.NameEquals("message_creation"u8)) { - messageCreation = InternalRunStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(property.Value, options); + messageCreation = InternalRunStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsMessageCreationObject(type, serializedAdditionalRawData, messageCreation); + return new InternalRunStepDetailsMessageCreationObject(messageCreation, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write( } } - InternalRunStepDetailsMessageCreationObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsMessageCreationObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDetailsMessageCreationObject)PersistableModelCreateCore(data, options); + protected override RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsMessageCreationObject(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalRunStepDetailsMessageCreationObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDetailsMessageCreationObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsMessageCreationObject internalRunStepDetailsMessageCreationObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsMessageCreationObject(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsMessageCreationObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsMessageCreationObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsMessageCreationObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs index e36008494..bbeeca0aa 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs @@ -9,21 +9,16 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObject : RunStepDetails { - internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) + internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) : base("message_creation") { - Argument.AssertNotNull(messageCreation, nameof(messageCreation)); - - Type = "message_creation"; - _messageCreation = messageCreation; + MessageCreation = messageCreation; } - internal InternalRunStepDetailsMessageCreationObject(string type, IDictionary serializedAdditionalRawData, InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) : base(type, serializedAdditionalRawData) + internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - _messageCreation = messageCreation; + MessageCreation = messageCreation; } - internal InternalRunStepDetailsMessageCreationObject() - { - } + public InternalRunStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 4f0ef2047..d10eadcde 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObjectMessageCreation : IJsonModel { + internal InternalRunStepDetailsMessageCreationObjectMessageCreation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObjectMessageCreation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("message_id") != true) - { - writer.WritePropertyName("message_id"u8); - writer.WriteStringValue(MessageId); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("message_id"u8); + writer.WriteStringValue(MessageId); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsMessageCreationObjectMessageCreation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsMessageCreationObjectMessageCreation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsMessageCreationObjectMessageCreation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObjectMessageCreation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(document.RootElement, options); } - internal static InternalRunStepDetailsMessageCreationObjectMessageCreation DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsMessageCreationObjectMessageCreation DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string messageId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("message_id"u8)) + if (prop.NameEquals("message_id"u8)) { - messageId = property.Value.GetString(); + messageId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsMessageCreationObjectMessageCreation(messageId, serializedAdditionalRawData); + return new InternalRunStepDetailsMessageCreationObjectMessageCreation(messageId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsMessageCreationObjectMessageCreation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsMessageCreationObjectMessageCreation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalRunStepDetailsMessageCreationObjectMessageCreation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsMessageCreationObjectMessageCreation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsMessageCreationObjectMessageCreation internalRunStepDetailsMessageCreationObjectMessageCreation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsMessageCreationObjectMessageCreation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsMessageCreationObjectMessageCreation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs index b876ff8c4..12818dfc4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,24 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObjectMessageCreation { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messageId) { - Argument.AssertNotNull(messageId, nameof(messageId)); - MessageId = messageId; } - internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messageId, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messageId, IDictionary additionalBinaryDataProperties) { MessageId = messageId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRunStepDetailsMessageCreationObjectMessageCreation() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string MessageId { get; } + public string MessageId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index d1550479d..db725a0a7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -7,46 +7,46 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter : IJsonModel { + internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("input") != true) - { - writer.WritePropertyName("input"u8); - writer.WriteStringValue(Input); - } - if (SerializedAdditionalRawData?.ContainsKey("outputs") != true) + writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); + writer.WritePropertyName("outputs"u8); + writer.WriteStartArray(); + foreach (var item in Outputs) { - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,64 +55,60 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string input = default; - IReadOnlyList outputs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList outputs = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("input"u8)) + if (prop.NameEquals("input"u8)) { - input = property.Value.GetString(); + input = prop.Value.GetString(); continue; } - if (property.NameEquals("outputs"u8)) + if (prop.NameEquals("outputs"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(RunStepCodeInterpreterOutput.DeserializeRunStepCodeInterpreterOutput(item, options)); } outputs = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(input, outputs, serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(input, outputs, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +118,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, options); } default: @@ -140,15 +137,16 @@ InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter internalRunStepDetailsToolCallsCodeObjectCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsCodeObjectCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 2c309b663..2b3e28945 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -10,28 +10,23 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IEnumerable outputs) { - Argument.AssertNotNull(input, nameof(input)); - Argument.AssertNotNull(outputs, nameof(outputs)); - Input = input; Outputs = outputs.ToList(); } - internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IReadOnlyList outputs, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IList outputs, IDictionary additionalBinaryDataProperties) { Input = input; Outputs = outputs; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter() - { - } + public string Input { get; set; } - public string Input { get; } - public IReadOnlyList Outputs { get; } + public IList Outputs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index e0de2eb55..6d848a709 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObject : IJsonModel { + internal InternalRunStepDetailsToolCallsCodeOutputImageObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("image") != true) - { - writer.WritePropertyName("image"u8); - writer.WriteObjectValue(_image, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image, options); } - InternalRunStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsCodeOutputImageObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsCodeOutputImageObject DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsCodeOutputImageObject DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "image"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("image"u8)) + if (prop.NameEquals("image"u8)) { - image = InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(property.Value, options); + image = InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsCodeOutputImageObject(type, serializedAdditionalRawData, image); + return new InternalRunStepDetailsToolCallsCodeOutputImageObject(image, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsCodeOutputImageObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsCodeOutputImageObject)PersistableModelCreateCore(data, options); + protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalRunStepDetailsToolCallsCodeOutputImageObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDetailsToolCallsCodeOutputImageObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeOutputImageObject internalRunStepDetailsToolCallsCodeOutputImageObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsCodeOutputImageObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsCodeOutputImageObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs index 2d12da18d..606f7c318 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs @@ -9,21 +9,16 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObject : RunStepCodeInterpreterOutput { - internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) + internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) : base("image") { - Argument.AssertNotNull(image, nameof(image)); - - Type = "image"; - _image = image; + Image = image; } - internal InternalRunStepDetailsToolCallsCodeOutputImageObject(string type, IDictionary serializedAdditionalRawData, InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) : base(type, serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - _image = image; + Image = image; } - internal InternalRunStepDetailsToolCallsCodeOutputImageObject() - { - } + public InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 6e6ffba6a..95a33121b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObjectImage : IJsonModel { + internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsCodeOutputImageObjectImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsCodeOutputImageObjectImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsCodeOutputImageObjectImage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(fileId, serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(fileId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsCodeOutputImageObjectImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsCodeOutputImageObjectImage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, options); } default: @@ -119,15 +119,16 @@ InternalRunStepDetailsToolCallsCodeOutputImageObjectImage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage internalRunStepDetailsToolCallsCodeOutputImageObjectImage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsCodeOutputImageObjectImage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs index 17afb0073..752be0192 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,24 +9,19 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObjectImage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId) { - Argument.AssertNotNull(fileId, nameof(fileId)); - FileId = fileId; } - internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId, IDictionary additionalBinaryDataProperties) { FileId = fileId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index 4df4c4960..417ab03ce 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,24 @@ internal partial class InternalRunStepDetailsToolCallsFileSearchObjectFileSearch { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("ranking_options") != true && Optional.IsDefined(RankingOptions)) + if (Optional.IsDefined(RankingOptions)) { writer.WritePropertyName("ranking_options"u8); - writer.WriteObjectValue(RankingOptions, options); + writer.WriteObjectValue(RankingOptions, options); } - if (SerializedAdditionalRawData?.ContainsKey("results") != true && Optional.IsCollectionDefined(Results)) + if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -36,17 +42,13 @@ void IJsonModel.Write } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,72 +57,69 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsFileSearchObjectFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsFileSearchObjectFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsFileSearchObjectFileSearch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - FileSearchRankingOptions rankingOptions = default; - IReadOnlyList results = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject rankingOptions = default; + IList results = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("ranking_options"u8)) + if (prop.NameEquals("ranking_options"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + rankingOptions = null; continue; } - rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(property.Value, options); + rankingOptions = InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(prop.Value, options); continue; } - if (property.NameEquals("results"u8)) + if (prop.NameEquals("results"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(RunStepFileSearchResult.DeserializeRunStepFileSearchResult(item, options)); } results = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(rankingOptions, results ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(rankingOptions, results ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +129,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsFileSearchObjectFileSearch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsFileSearchObjectFileSearch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(document.RootElement, options); } default: @@ -148,15 +148,16 @@ InternalRunStepDetailsToolCallsFileSearchObjectFileSearch IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch internalRunStepDetailsToolCallsFileSearchObjectFileSearch) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchObjectFileSearch, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs index e48b1ce80..4c0feca55 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs @@ -4,23 +4,26 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchObjectFileSearch { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch() { Results = new ChangeTrackingList(); } - internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(FileSearchRankingOptions rankingOptions, IReadOnlyList results, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject rankingOptions, IList results, IDictionary additionalBinaryDataProperties) { RankingOptions = rankingOptions; Results = results; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList Results { get; } + + public IList Results { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index 2d2fa16ef..1d9a83ad9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject : IJsonModel { + internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("ranker") != true) - { - writer.WritePropertyName("ranker"u8); - writer.WriteStringValue(Ranker.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("score_threshold") != true) + writer.WritePropertyName("ranker"u8); + writer.WriteStringValue(Ranker.ToString()); + writer.WritePropertyName("score_threshold"u8); + writer.WriteNumberValue(ScoreThreshold); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("score_threshold"u8); - writer.WriteNumberValue(ScoreThreshold); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker ranker = default; float scoreThreshold = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("ranker"u8)) + if (prop.NameEquals("ranker"u8)) { - ranker = new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(property.Value.GetString()); + ranker = new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(prop.Value.GetString()); continue; } - if (property.NameEquals("score_threshold"u8)) + if (prop.NameEquals("score_threshold"u8)) { - scoreThreshold = property.Value.GetSingle(); + scoreThreshold = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(ranker, scoreThreshold, serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(ranker, scoreThreshold, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject IPersistableModel< string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject internalRunStepDetailsToolCallsFileSearchRankingOptionsObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchRankingOptionsObject, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs index 84c5989ab..6fc64bbfa 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs @@ -9,25 +9,22 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(float scoreThreshold) { ScoreThreshold = scoreThreshold; } - internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker ranker, float scoreThreshold, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker ranker, float scoreThreshold, IDictionary additionalBinaryDataProperties) { Ranker = ranker; ScoreThreshold = scoreThreshold; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker Ranker { get; } = InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.Default20240821; + public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker Ranker { get; } = "default_2024_08_21"; - public float ScoreThreshold { get; } + public float ScoreThreshold { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs index 3e0d585cf..b991fd43d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker : IEquatable { private readonly string _value; + private const string Default20240821Value = "default_2024_08_21"; public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string Default20240821Value = "default_2024_08_21"; + _value = value; + } public static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker Default20240821 { get; } = new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(Default20240821Value); + public static bool operator ==(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker left, InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker right) => left.Equals(right); + public static bool operator !=(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker left, InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker right) => !left.Equals(right); + public static implicit operator InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(string value) => new InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker other && Equals(other); + public bool Equals(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs index 92b13851c..0ebe75286 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalRunStepDetailsToolCallsFileSearchResultObjectCont { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchResultObjectContent)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true && Optional.IsDefined(Type)) + if (Optional.IsDefined(Type)) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("text") != true && Optional.IsDefined(Text)) + if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,63 +52,65 @@ void IJsonModel.Wr #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsFileSearchResultObjectContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsFileSearchResultObjectContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsFileSearchResultObjectContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchResultObjectContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? type = default; + InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? @type = default; string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @type = null; continue; } - type = new InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(property.Value.GetString()); + @type = new InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(prop.Value.GetString()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + text = null; + continue; + } + text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsFileSearchResultObjectContent(type, text, serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsFileSearchResultObjectContent(@type, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -116,15 +120,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsFileSearchResultObjectContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsFileSearchResultObjectContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(document.RootElement, options); } default: @@ -134,15 +139,16 @@ InternalRunStepDetailsToolCallsFileSearchResultObjectContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchResultObjectContent internalRunStepDetailsToolCallsFileSearchResultObjectContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchResultObjectContent, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsFileSearchResultObjectContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs index 4c93e4965..ea8869c9a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchResultObjectContent { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent() { } - internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? type, string text, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? @type, string text, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? Type { get; } - public string Text { get; } + public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? Type { get; set; } + + public string Text { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs index a59978a37..611bf39b4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunStepDetailsToolCallsFileSearchResultObjectContentType : IEquatable { private readonly string _value; + private const string TextValue = "text"; public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; + _value = value; + } public static InternalRunStepDetailsToolCallsFileSearchResultObjectContentType Text { get; } = new InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(TextValue); + public static bool operator ==(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType left, InternalRunStepDetailsToolCallsFileSearchResultObjectContentType right) => left.Equals(right); + public static bool operator !=(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType left, InternalRunStepDetailsToolCallsFileSearchResultObjectContentType right) => !left.Equals(right); + public static implicit operator InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(string value) => new InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunStepDetailsToolCallsFileSearchResultObjectContentType other && Equals(other); + public bool Equals(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index d72f701a2..64f2801f5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -7,53 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFunctionObjectFunction : IJsonModel { + internal InternalRunStepDetailsToolCallsFunctionObjectFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFunctionObjectFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + if (Output != null) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) + else { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); + writer.WriteNull("output"u8); } - if (SerializedAdditionalRawData?.ContainsKey("output") != true) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - if (Output != null) + foreach (var item in _additionalBinaryDataProperties) { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - else - { - writer.WriteNull("output"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,25 +59,23 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } - InternalRunStepDetailsToolCallsFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunStepDetailsToolCallsFunctionObjectFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFunctionObjectFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsFunctionObjectFunction DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsFunctionObjectFunction DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -88,44 +83,42 @@ internal static InternalRunStepDetailsToolCallsFunctionObjectFunction Deserializ string name = default; string arguments = default; string output = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("output"u8)) + if (prop.NameEquals("output"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { output = null; continue; } - output = property.Value.GetString(); + output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsFunctionObjectFunction(name, arguments, output, serializedAdditionalRawData); + return new InternalRunStepDetailsToolCallsFunctionObjectFunction(name, arguments, output, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -135,15 +128,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsFunctionObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunStepDetailsToolCallsFunctionObjectFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(document.RootElement, options); } default: @@ -153,15 +147,16 @@ InternalRunStepDetailsToolCallsFunctionObjectFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunStepDetailsToolCallsFunctionObjectFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFunctionObjectFunction internalRunStepDetailsToolCallsFunctionObjectFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsFunctionObjectFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsFunctionObjectFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs index 588377cde..19b68a0a8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,31 +9,27 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFunctionObjectFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output) { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); - Name = name; Arguments = arguments; Output = output; } - internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output, IDictionary serializedAdditionalRawData) + internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output, IDictionary additionalBinaryDataProperties) { Name = name; Arguments = arguments; Output = output; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRunStepDetailsToolCallsFunctionObjectFunction() - { - } + public string Name { get; set; } + + public string Arguments { get; set; } - public string Name { get; } - public string Arguments { get; } - public string Output { get; } + public string Output { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index 122837da8..fa35444d9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -7,112 +7,92 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsObject : IJsonModel { + internal InternalRunStepDetailsToolCallsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true) - { - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in InternalToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WriteObjectValue(item, options); } - writer.WriteEndObject(); + writer.WriteEndArray(); } - InternalRunStepDetailsToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDetailsToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDetailsToolCallsObject(document.RootElement, options); } - internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStepDetailsToolCallsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStepDetailsToolCallsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList toolCalls = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList toolCalls = default; + string @type = "tool_calls"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(RunStepToolCall.DeserializeRunStepToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepDetailsToolCallsObject(type, serializedAdditionalRawData, toolCalls); + return new InternalRunStepDetailsToolCallsObject(toolCalls, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +102,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalRunStepDetailsToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDetailsToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsObject)PersistableModelCreateCore(data, options); + protected override RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDetailsToolCallsObject(document.RootElement, options); } default: @@ -140,15 +121,16 @@ InternalRunStepDetailsToolCallsObject IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepDetailsToolCallsObject FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsObject internalRunStepDetailsToolCallsObject) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepDetailsToolCallsObject(document.RootElement); + return BinaryContent.Create(internalRunStepDetailsToolCallsObject, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepDetailsToolCallsObject(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepDetailsToolCallsObject(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs index 5b428be16..26284fd2c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs @@ -10,21 +10,14 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsObject : RunStepDetails { - internal InternalRunStepDetailsToolCallsObject(IEnumerable internalToolCalls) + internal InternalRunStepDetailsToolCallsObject(IEnumerable toolCalls) : base("tool_calls") { - Argument.AssertNotNull(internalToolCalls, nameof(internalToolCalls)); - - Type = "tool_calls"; - InternalToolCalls = internalToolCalls.ToList(); - } - - internal InternalRunStepDetailsToolCallsObject(string type, IDictionary serializedAdditionalRawData, IReadOnlyList internalToolCalls) : base(type, serializedAdditionalRawData) - { - InternalToolCalls = internalToolCalls; + ToolCalls = toolCalls.ToList(); } - internal InternalRunStepDetailsToolCallsObject() + internal InternalRunStepDetailsToolCallsObject(IList toolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + ToolCalls = toolCalls; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index ab0da878d..7ffb3d166 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -7,113 +7,90 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepFileSearchToolCallDetails : IJsonModel { + internal InternalRunStepFileSearchToolCallDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepFileSearchToolCallDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("file_search"u8); + writer.WriteObjectValue(FileSearch, options); } - InternalRunStepFileSearchToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepFileSearchToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepFileSearchToolCallDetails)JsonModelCreateCore(ref reader, options); + + protected override RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepFileSearchToolCallDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepFileSearchToolCallDetails(document.RootElement, options); } - internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunStepFileSearchToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunStepFileSearchToolCallDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "file_search"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - fileSearch = InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(property.Value, options); + fileSearch = InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepFileSearchToolCallDetails(type, serializedAdditionalRawData, id, fileSearch); + return new InternalRunStepFileSearchToolCallDetails(id, fileSearch, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +100,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalRunStepFileSearchToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepFileSearchToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepFileSearchToolCallDetails)PersistableModelCreateCore(data, options); + protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepFileSearchToolCallDetails(document.RootElement, options); } default: @@ -141,15 +119,16 @@ InternalRunStepFileSearchToolCallDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepFileSearchToolCallDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepFileSearchToolCallDetails internalRunStepFileSearchToolCallDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepFileSearchToolCallDetails(document.RootElement); + return BinaryContent.Create(internalRunStepFileSearchToolCallDetails, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepFileSearchToolCallDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepFileSearchToolCallDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs index af796016a..0d850f153 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs @@ -9,27 +9,20 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepFileSearchToolCallDetails : RunStepToolCall { - internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch) + internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch) : base("file_search") { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(fileSearch, nameof(fileSearch)); - - Type = "file_search"; Id = id; FileSearch = fileSearch; } - internal InternalRunStepFileSearchToolCallDetails(string type, IDictionary serializedAdditionalRawData, string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch) : base(type, serializedAdditionalRawData) + internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; FileSearch = fileSearch; } - internal InternalRunStepFileSearchToolCallDetails() - { - } + public string Id { get; set; } - public string Id { get; } - public InternalRunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; } + public InternalRunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 263ace277..7a07ce9c3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -7,113 +7,90 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunStepFunctionToolCallDetails : IJsonModel { + internal InternalRunStepFunctionToolCallDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepFunctionToolCallDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(_internalFunction, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - InternalRunStepFunctionToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepFunctionToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepFunctionToolCallDetails)JsonModelCreateCore(ref reader, options); + + protected override RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepFunctionToolCallDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement, options); } - internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunStepFunctionToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunStepFunctionToolCallDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; InternalRunStepDetailsToolCallsFunctionObjectFunction function = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "function"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - function = InternalRunStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(property.Value, options); + function = InternalRunStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepFunctionToolCallDetails(type, serializedAdditionalRawData, id, function); + return new InternalRunStepFunctionToolCallDetails(id, function, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +100,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalRunStepFunctionToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepFunctionToolCallDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRunStepFunctionToolCallDetails)PersistableModelCreateCore(data, options); + protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement, options); } default: @@ -141,15 +119,16 @@ InternalRunStepFunctionToolCallDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalRunStepFunctionToolCallDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunStepFunctionToolCallDetails internalRunStepFunctionToolCallDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement); + return BinaryContent.Create(internalRunStepFunctionToolCallDetails, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalRunStepFunctionToolCallDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs index ad318c7da..27f6336b8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs @@ -9,26 +9,20 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepFunctionToolCallDetails : RunStepToolCall { - internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction) + internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction function) : base("function") { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(internalFunction, nameof(internalFunction)); - - Type = "function"; Id = id; - _internalFunction = internalFunction; + Function = function; } - internal InternalRunStepFunctionToolCallDetails(string type, IDictionary serializedAdditionalRawData, string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction) : base(type, serializedAdditionalRawData) + internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; - _internalFunction = internalFunction; + Function = function; } - internal InternalRunStepFunctionToolCallDetails() - { - } + public string Id { get; set; } - public string Id { get; } + public InternalRunStepDetailsToolCallsFunctionObjectFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs index c587668ab..053f4db89 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunStepObjectObject : IEquatable { private readonly string _value; + private const string ThreadRunStepValue = "thread.run.step"; public InternalRunStepObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadRunStepValue = "thread.run.step"; + _value = value; + } public static InternalRunStepObjectObject ThreadRunStep { get; } = new InternalRunStepObjectObject(ThreadRunStepValue); + public static bool operator ==(InternalRunStepObjectObject left, InternalRunStepObjectObject right) => left.Equals(right); + public static bool operator !=(InternalRunStepObjectObject left, InternalRunStepObjectObject right) => !left.Equals(right); + public static implicit operator InternalRunStepObjectObject(string value) => new InternalRunStepObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunStepObjectObject other && Equals(other); + public bool Equals(InternalRunStepObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index 820fb48cc..f7ef21041 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunToolCallObjectFunction : IJsonModel { + internal InternalRunToolCallObjectFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunToolCallObjectFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - InternalRunToolCallObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunToolCallObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRunToolCallObjectFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunToolCallObjectFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunToolCallObjectFunction(document.RootElement, options); } - internal static InternalRunToolCallObjectFunction DeserializeInternalRunToolCallObjectFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRunToolCallObjectFunction DeserializeInternalRunToolCallObjectFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; string arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunToolCallObjectFunction(name, arguments, serializedAdditionalRawData); + return new InternalRunToolCallObjectFunction(name, arguments, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReade } } - InternalRunToolCallObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunToolCallObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRunToolCallObjectFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunToolCallObjectFunction(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalRunToolCallObjectFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRunToolCallObjectFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRunToolCallObjectFunction internalRunToolCallObjectFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRunToolCallObjectFunction(document.RootElement); + return BinaryContent.Create(internalRunToolCallObjectFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRunToolCallObjectFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRunToolCallObjectFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs index a9f72778e..4ea964edb 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs @@ -9,28 +9,23 @@ namespace OpenAI.Assistants { internal partial class InternalRunToolCallObjectFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRunToolCallObjectFunction(string name, string arguments) { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); - Name = name; Arguments = arguments; } - internal InternalRunToolCallObjectFunction(string name, string arguments, IDictionary serializedAdditionalRawData) + internal InternalRunToolCallObjectFunction(string name, string arguments, IDictionary additionalBinaryDataProperties) { Name = name; Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRunToolCallObjectFunction() - { - } + public string Name { get; set; } - public string Name { get; } - public string Arguments { get; } + public string Arguments { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs index 55e7b1d45..37de57345 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalRunToolCallObjectType : IEquatable { private readonly string _value; + private const string FunctionValue = "function"; public InternalRunToolCallObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FunctionValue = "function"; + _value = value; + } public static InternalRunToolCallObjectType Function { get; } = new InternalRunToolCallObjectType(FunctionValue); + public static bool operator ==(InternalRunToolCallObjectType left, InternalRunToolCallObjectType right) => left.Equals(right); + public static bool operator !=(InternalRunToolCallObjectType left, InternalRunToolCallObjectType right) => !left.Equals(right); + public static implicit operator InternalRunToolCallObjectType(string value) => new InternalRunToolCallObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRunToolCallObjectType other && Equals(other); + public bool Equals(InternalRunToolCallObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index f40eef604..06dd37435 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyDetails : IJsonModel { + internal InternalStaticChunkingStrategyDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("max_chunk_size_tokens") != true) - { - writer.WritePropertyName("max_chunk_size_tokens"u8); - writer.WriteNumberValue(MaxChunkSizeTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("chunk_overlap_tokens") != true) + writer.WritePropertyName("max_chunk_size_tokens"u8); + writer.WriteNumberValue(MaxChunkSizeTokens); + writer.WritePropertyName("chunk_overlap_tokens"u8); + writer.WriteNumberValue(ChunkOverlapTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("chunk_overlap_tokens"u8); - writer.WriteNumberValue(ChunkOverlapTokens); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } - InternalStaticChunkingStrategyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalStaticChunkingStrategyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalStaticChunkingStrategyDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalStaticChunkingStrategyDetails(document.RootElement, options); } - internal static InternalStaticChunkingStrategyDetails DeserializeInternalStaticChunkingStrategyDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalStaticChunkingStrategyDetails DeserializeInternalStaticChunkingStrategyDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int maxChunkSizeTokens = default; int chunkOverlapTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("max_chunk_size_tokens"u8)) + if (prop.NameEquals("max_chunk_size_tokens"u8)) { - maxChunkSizeTokens = property.Value.GetInt32(); + maxChunkSizeTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("chunk_overlap_tokens"u8)) + if (prop.NameEquals("chunk_overlap_tokens"u8)) { - chunkOverlapTokens = property.Value.GetInt32(); + chunkOverlapTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalStaticChunkingStrategyDetails(maxChunkSizeTokens, chunkOverlapTokens, serializedAdditionalRawData); + return new InternalStaticChunkingStrategyDetails(maxChunkSizeTokens, chunkOverlapTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalStaticChunkingStrategyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalStaticChunkingStrategyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalStaticChunkingStrategyDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalStaticChunkingStrategyDetails(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalStaticChunkingStrategyDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalStaticChunkingStrategyDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalStaticChunkingStrategyDetails internalStaticChunkingStrategyDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalStaticChunkingStrategyDetails(document.RootElement); + return BinaryContent.Create(internalStaticChunkingStrategyDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalStaticChunkingStrategyDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalStaticChunkingStrategyDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs index 26a6aa2e1..379ab6230 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs @@ -9,25 +9,23 @@ namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunkOverlapTokens) { MaxChunkSizeTokens = maxChunkSizeTokens; ChunkOverlapTokens = chunkOverlapTokens; } - internal InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunkOverlapTokens, IDictionary serializedAdditionalRawData) + internal InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunkOverlapTokens, IDictionary additionalBinaryDataProperties) { MaxChunkSizeTokens = maxChunkSizeTokens; ChunkOverlapTokens = chunkOverlapTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalStaticChunkingStrategyDetails() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public int MaxChunkSizeTokens { get; set; } + public int ChunkOverlapTokens { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 47c705b9e..6abed9b2a 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyRequestParam : IJsonModel { + internal InternalStaticChunkingStrategyRequestParam() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyRequestParam)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("static") != true) - { - writer.WritePropertyName("static"u8); - writer.WriteObjectValue(Static, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("static"u8); + writer.WriteObjectValue(Static, options); } - InternalStaticChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalStaticChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalStaticChunkingStrategyRequestParam)JsonModelCreateCore(ref reader, options); + + protected override InternalFileChunkingStrategyRequestParam JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyRequestParam)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalStaticChunkingStrategyRequestParam(document.RootElement, options); } - internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalStaticChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalStaticChunkingStrategyRequestParam(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalStaticChunkingStrategyDetails @static = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "static"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("static"u8)) + if (prop.NameEquals("static"u8)) { - @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(property.Value, options); + @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalStaticChunkingStrategyRequestParam(type, serializedAdditionalRawData, @static); + return new InternalStaticChunkingStrategyRequestParam(@static, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(M } } - InternalStaticChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalStaticChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalStaticChunkingStrategyRequestParam)PersistableModelCreateCore(data, options); + protected override InternalFileChunkingStrategyRequestParam PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalStaticChunkingStrategyRequestParam(document.RootElement, options); } default: @@ -130,15 +111,16 @@ InternalStaticChunkingStrategyRequestParam IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalStaticChunkingStrategyRequestParam FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalStaticChunkingStrategyRequestParam internalStaticChunkingStrategyRequestParam) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalStaticChunkingStrategyRequestParam(document.RootElement); + return BinaryContent.Create(internalStaticChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalStaticChunkingStrategyRequestParam(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalStaticChunkingStrategyRequestParam(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs index 2b96bd6ea..c6cf51ad6 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs @@ -4,28 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyRequestParam : InternalFileChunkingStrategyRequestParam { - public InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrategyDetails @static) + public InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrategyDetails @static) : base("static") { Argument.AssertNotNull(@static, nameof(@static)); - Type = "static"; Static = @static; } - internal InternalStaticChunkingStrategyRequestParam(string type, IDictionary serializedAdditionalRawData, InternalStaticChunkingStrategyDetails @static) : base(type, serializedAdditionalRawData) + internal InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrategyDetails @static, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Static = @static; } - internal InternalStaticChunkingStrategyRequestParam() - { - } - - public InternalStaticChunkingStrategyDetails Static { get; } + public InternalStaticChunkingStrategyDetails Static { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index d6c8b0d3f..f6fa79b13 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -7,31 +7,38 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalSubmitToolOutputsRunRequest : IJsonModel { + internal InternalSubmitToolOutputsRunRequest() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalSubmitToolOutputsRunRequest)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_outputs") != true) + writer.WritePropertyName("tool_outputs"u8); + writer.WriteStartArray(); + foreach (var item in ToolOutputs) { - writer.WritePropertyName("tool_outputs"u8); - writer.WriteStartArray(); - foreach (var item in ToolOutputs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + writer.WriteEndArray(); + if (Optional.IsDefined(Stream)) { if (Stream != null) { @@ -40,20 +47,16 @@ void IJsonModel.Write(Utf8JsonWriter writer } else { - writer.WriteNull("stream"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,69 +65,65 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } - InternalSubmitToolOutputsRunRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalSubmitToolOutputsRunRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalSubmitToolOutputsRunRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalSubmitToolOutputsRunRequest)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalSubmitToolOutputsRunRequest(document.RootElement, options); } - internal static InternalSubmitToolOutputsRunRequest DeserializeInternalSubmitToolOutputsRunRequest(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalSubmitToolOutputsRunRequest DeserializeInternalSubmitToolOutputsRunRequest(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList toolOutputs = default; bool? stream = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_outputs"u8)) + if (prop.NameEquals("tool_outputs"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolOutput.DeserializeToolOutput(item, options)); } toolOutputs = array; continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stream = null; continue; } - stream = property.Value.GetBoolean(); + stream = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalSubmitToolOutputsRunRequest(toolOutputs, stream, serializedAdditionalRawData); + return new InternalSubmitToolOutputsRunRequest(toolOutputs, stream, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +133,16 @@ BinaryData IPersistableModel.Write(ModelRea } } - InternalSubmitToolOutputsRunRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalSubmitToolOutputsRunRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalSubmitToolOutputsRunRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalSubmitToolOutputsRunRequest(document.RootElement, options); } default: @@ -152,15 +152,16 @@ InternalSubmitToolOutputsRunRequest IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalSubmitToolOutputsRunRequest FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalSubmitToolOutputsRunRequest internalSubmitToolOutputsRunRequest) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalSubmitToolOutputsRunRequest(document.RootElement); + return BinaryContent.Create(internalSubmitToolOutputsRunRequest, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalSubmitToolOutputsRunRequest(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalSubmitToolOutputsRunRequest(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs index 13a442914..d9b07b07a 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs @@ -5,12 +5,14 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalSubmitToolOutputsRunRequest { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalSubmitToolOutputsRunRequest(IEnumerable toolOutputs) { Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); @@ -18,18 +20,15 @@ public InternalSubmitToolOutputsRunRequest(IEnumerable toolOutputs) ToolOutputs = toolOutputs.ToList(); } - internal InternalSubmitToolOutputsRunRequest(IList toolOutputs, bool? stream, IDictionary serializedAdditionalRawData) + internal InternalSubmitToolOutputsRunRequest(IList toolOutputs, bool? stream, IDictionary additionalBinaryDataProperties) { ToolOutputs = toolOutputs; Stream = stream; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalSubmitToolOutputsRunRequest() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList ToolOutputs { get; } + public bool? Stream { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs b/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs index 1ae268486..997b9b71f 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalThreadObjectObject : IEquatable { private readonly string _value; + private const string ThreadValue = "thread"; public InternalThreadObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ThreadValue = "thread"; + _value = value; + } public static InternalThreadObjectObject Thread { get; } = new InternalThreadObjectObject(ThreadValue); + public static bool operator ==(InternalThreadObjectObject left, InternalThreadObjectObject right) => left.Equals(right); + public static bool operator !=(InternalThreadObjectObject left, InternalThreadObjectObject right) => !left.Equals(right); + public static implicit operator InternalThreadObjectObject(string value) => new InternalThreadObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalThreadObjectObject other && Equals(other); + public bool Equals(InternalThreadObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs index d33c9da5a..bd5345183 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ internal partial class InternalThreadObjectToolResources : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - InternalThreadObjectToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalThreadObjectToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalThreadObjectToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalThreadObjectToolResources(document.RootElement, options); } - internal static InternalThreadObjectToolResources DeserializeInternalThreadObjectToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalThreadObjectToolResources DeserializeInternalThreadObjectToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalThreadObjectToolResourcesCodeInterpreter codeInterpreter = default; InternalThreadObjectToolResourcesFileSearch fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = InternalThreadObjectToolResourcesCodeInterpreter.DeserializeInternalThreadObjectToolResourcesCodeInterpreter(property.Value, options); + codeInterpreter = InternalThreadObjectToolResourcesCodeInterpreter.DeserializeInternalThreadObjectToolResourcesCodeInterpreter(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(property.Value, options); + fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalThreadObjectToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new InternalThreadObjectToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write(ModelReade } } - InternalThreadObjectToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalThreadObjectToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalThreadObjectToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalThreadObjectToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ InternalThreadObjectToolResources IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalThreadObjectToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalThreadObjectToolResources internalThreadObjectToolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalThreadObjectToolResources(document.RootElement); + return BinaryContent.Create(internalThreadObjectToolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalThreadObjectToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalThreadObjectToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs index 5d766bb62..5515ab7e4 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalThreadObjectToolResources() { } - internal InternalThreadObjectToolResources(InternalThreadObjectToolResourcesCodeInterpreter codeInterpreter, InternalThreadObjectToolResourcesFileSearch fileSearch, IDictionary serializedAdditionalRawData) + internal InternalThreadObjectToolResources(InternalThreadObjectToolResourcesCodeInterpreter codeInterpreter, InternalThreadObjectToolResourcesFileSearch fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalThreadObjectToolResourcesCodeInterpreter CodeInterpreter { get; } - public InternalThreadObjectToolResourcesFileSearch FileSearch { get; } + public InternalThreadObjectToolResourcesCodeInterpreter CodeInterpreter { get; set; } + + public InternalThreadObjectToolResourcesFileSearch FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index a65e19205..0d9655eaa 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalThreadObjectToolResourcesCodeInterpreter : IJsonM { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } - InternalThreadObjectToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalThreadObjectToolResourcesCodeInterpreter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalThreadObjectToolResourcesCodeInterpreter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesCodeInterpreter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalThreadObjectToolResourcesCodeInterpreter(document.RootElement, options); } - internal static InternalThreadObjectToolResourcesCodeInterpreter DeserializeInternalThreadObjectToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalThreadObjectToolResourcesCodeInterpreter DeserializeInternalThreadObjectToolResourcesCodeInterpreter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList fileIds = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalThreadObjectToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalThreadObjectToolResourcesCodeInterpreter(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.W } } - InternalThreadObjectToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalThreadObjectToolResourcesCodeInterpreter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalThreadObjectToolResourcesCodeInterpreter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalThreadObjectToolResourcesCodeInterpreter(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalThreadObjectToolResourcesCodeInterpreter IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalThreadObjectToolResourcesCodeInterpreter FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalThreadObjectToolResourcesCodeInterpreter internalThreadObjectToolResourcesCodeInterpreter) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalThreadObjectToolResourcesCodeInterpreter(document.RootElement); + return BinaryContent.Create(internalThreadObjectToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalThreadObjectToolResourcesCodeInterpreter(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalThreadObjectToolResourcesCodeInterpreter(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs index ddcfa61ee..95ec7ef6d 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs @@ -4,23 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesCodeInterpreter { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalThreadObjectToolResourcesCodeInterpreter() { FileIds = new ChangeTrackingList(); } - internal InternalThreadObjectToolResourcesCodeInterpreter(IReadOnlyList fileIds, IDictionary serializedAdditionalRawData) + internal InternalThreadObjectToolResourcesCodeInterpreter(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList FileIds { get; } + public IList FileIds { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index f2697edf2..c6092042d 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalThreadObjectToolResourcesFileSearch : IJsonModel< { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesFileSearch)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("vector_store_ids") != true && Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds)) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); foreach (var item in VectorStoreIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } - InternalThreadObjectToolResourcesFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalThreadObjectToolResourcesFileSearch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalThreadObjectToolResourcesFileSearch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesFileSearch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalThreadObjectToolResourcesFileSearch(document.RootElement, options); } - internal static InternalThreadObjectToolResourcesFileSearch DeserializeInternalThreadObjectToolResourcesFileSearch(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalThreadObjectToolResourcesFileSearch DeserializeInternalThreadObjectToolResourcesFileSearch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList vectorStoreIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList vectorStoreIds = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("vector_store_ids"u8)) + if (prop.NameEquals("vector_store_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } vectorStoreIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalThreadObjectToolResourcesFileSearch(vectorStoreIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalThreadObjectToolResourcesFileSearch(vectorStoreIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Write( } } - InternalThreadObjectToolResourcesFileSearch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalThreadObjectToolResourcesFileSearch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalThreadObjectToolResourcesFileSearch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalThreadObjectToolResourcesFileSearch(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalThreadObjectToolResourcesFileSearch IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalThreadObjectToolResourcesFileSearch FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalThreadObjectToolResourcesFileSearch internalThreadObjectToolResourcesFileSearch) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalThreadObjectToolResourcesFileSearch(document.RootElement); + return BinaryContent.Create(internalThreadObjectToolResourcesFileSearch, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalThreadObjectToolResourcesFileSearch(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalThreadObjectToolResourcesFileSearch(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs index 4214562af..2d63f86aa 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs @@ -4,23 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesFileSearch { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalThreadObjectToolResourcesFileSearch() { VectorStoreIds = new ChangeTrackingList(); } - internal InternalThreadObjectToolResourcesFileSearch(IReadOnlyList vectorStoreIds, IDictionary serializedAdditionalRawData) + internal InternalThreadObjectToolResourcesFileSearch(IList vectorStoreIds, IDictionary additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IReadOnlyList VectorStoreIds { get; } + public IList VectorStoreIds { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index 3b188f3b2..36bc40894 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,40 @@ internal partial class InternalToolResourcesFileSearchIdsOnly : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalToolResourcesFileSearchIdsOnly)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("vector_store_ids") != true && Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds)) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); foreach (var item in VectorStoreIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,62 +57,65 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } - InternalToolResourcesFileSearchIdsOnly IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalToolResourcesFileSearchIdsOnly IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalToolResourcesFileSearchIdsOnly JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalToolResourcesFileSearchIdsOnly)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalToolResourcesFileSearchIdsOnly(document.RootElement, options); } - internal static InternalToolResourcesFileSearchIdsOnly DeserializeInternalToolResourcesFileSearchIdsOnly(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalToolResourcesFileSearchIdsOnly DeserializeInternalToolResourcesFileSearchIdsOnly(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList vectorStoreIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("vector_store_ids"u8)) + if (prop.NameEquals("vector_store_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } vectorStoreIds = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalToolResourcesFileSearchIdsOnly(vectorStoreIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalToolResourcesFileSearchIdsOnly(vectorStoreIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -115,15 +125,16 @@ BinaryData IPersistableModel.Write(Model } } - InternalToolResourcesFileSearchIdsOnly IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalToolResourcesFileSearchIdsOnly IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalToolResourcesFileSearchIdsOnly PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalToolResourcesFileSearchIdsOnly(document.RootElement, options); } default: @@ -133,15 +144,16 @@ InternalToolResourcesFileSearchIdsOnly IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalToolResourcesFileSearchIdsOnly FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalToolResourcesFileSearchIdsOnly internalToolResourcesFileSearchIdsOnly) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalToolResourcesFileSearchIdsOnly(document.RootElement); + return BinaryContent.Create(internalToolResourcesFileSearchIdsOnly, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalToolResourcesFileSearchIdsOnly(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalToolResourcesFileSearchIdsOnly(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs index 33ed0185e..8e7f84634 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalToolResourcesFileSearchIdsOnly { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalToolResourcesFileSearchIdsOnly() { VectorStoreIds = new ChangeTrackingList(); } - internal InternalToolResourcesFileSearchIdsOnly(IList vectorStoreIds, IDictionary serializedAdditionalRawData) + internal InternalToolResourcesFileSearchIdsOnly(IList vectorStoreIds, IDictionary additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList VectorStoreIds { get; } diff --git a/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs b/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs index a6a78832e..75fe3eddc 100644 --- a/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { internal readonly partial struct InternalTruncationObjectType : IEquatable { private readonly string _value; + private const string AutoValue = "auto"; + private const string LastMessagesValue = "last_messages"; public InternalTruncationObjectType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutoValue = "auto"; - private const string LastMessagesValue = "last_messages"; + _value = value; + } public static InternalTruncationObjectType Auto { get; } = new InternalTruncationObjectType(AutoValue); + public static InternalTruncationObjectType LastMessages { get; } = new InternalTruncationObjectType(LastMessagesValue); + public static bool operator ==(InternalTruncationObjectType left, InternalTruncationObjectType right) => left.Equals(right); + public static bool operator !=(InternalTruncationObjectType left, InternalTruncationObjectType right) => !left.Equals(right); + public static implicit operator InternalTruncationObjectType(string value) => new InternalTruncationObjectType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalTruncationObjectType other && Equals(other); + public bool Equals(InternalTruncationObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index ff9e4c05e..33adabc30 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalUnknownAssistantResponseFormat : IJsonModel { + internal InternalUnknownAssistantResponseFormat() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownAssistantResponseFormat)JsonModelCreateCore(ref reader, options); + + protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantResponseFormat(document.RootElement, options); } - internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknownAssistantResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknownAssistantResponseFormat(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownAssistantResponseFormat(type, serializedAdditionalRawData); + return new InternalUnknownAssistantResponseFormat(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownAssistantResponseFormat)PersistableModelCreateCore(data, options); + protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantResponseFormat(document.RootElement, options); } default: diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.cs index 13ee16c7d..ba9acc69d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalUnknownAssistantResponseFormat : AssistantResponseFormat { - internal InternalUnknownAssistantResponseFormat(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal InternalUnknownAssistantResponseFormat() + internal InternalUnknownAssistantResponseFormat(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 4ff268505..b65767b6d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -3,65 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : IJsonModel { - ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalUnknownChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatMessage(document.RootElement, options); } - internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("role"u8)) - { - role = property.Value.GetString().ToChatMessageRole(); - continue; - } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownChatMessage(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new InternalUnknownChatMessage(role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -71,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatMessage(document.RootElement, options); } default: @@ -88,16 +101,5 @@ ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWr } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownChatMessage FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownChatMessage(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs index 8f25fa22a..da7cc80be 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs @@ -9,11 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : ChatMessage { - internal InternalUnknownChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData) : base(role, content, serializedAdditionalRawData) - { - } - - internal InternalUnknownChatMessage() + internal InternalUnknownChatMessage(string role, IDictionary additionalBinaryDataProperties) : base(role ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index 756d520b6..1bccde8fa 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -3,59 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalUnknownChatResponseFormat : IJsonModel { - ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalUnknownChatResponseFormat() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChatResponseFormat)JsonModelCreateCore(ref reader, options); + protected override ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatResponseFormat(document.RootElement, options); } - internal static InternalUnknownChatResponseFormat DeserializeInternalUnknownChatResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownChatResponseFormat DeserializeInternalUnknownChatResponseFormat(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownChatResponseFormat(type, serializedAdditionalRawData); + return new InternalUnknownChatResponseFormat(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -65,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChatResponseFormat)PersistableModelCreateCore(data, options); + protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatResponseFormat(document.RootElement, options); } default: @@ -82,16 +101,5 @@ ChatResponseFormat IPersistableModel.Create(BinaryData data, } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownChatResponseFormat FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownChatResponseFormat(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.cs index e3def713f..3a8c419f3 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.cs @@ -9,11 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalUnknownChatResponseFormat : ChatResponseFormat { - internal InternalUnknownChatResponseFormat(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal InternalUnknownChatResponseFormat() + internal InternalUnknownChatResponseFormat(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs index 6ac1d2f89..20e5400fb 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,84 +15,62 @@ internal partial class InternalUnknownChunkingStrategy : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUnknownChunkingStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalUnknownChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalUnknownChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChunkingStrategy)JsonModelCreateCore(ref reader, options); + + protected override FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUnknownChunkingStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalUnknownChunkingStrategy(document.RootElement, options); } - internal static InternalUnknownChunkingStrategy DeserializeInternalUnknownChunkingStrategy(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownChunkingStrategy DeserializeInternalUnknownChunkingStrategy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "other"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownChunkingStrategy(type, serializedAdditionalRawData); + return new InternalUnknownChunkingStrategy(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +80,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalUnknownChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalUnknownChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChunkingStrategy)PersistableModelCreateCore(data, options); + protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalUnknownChunkingStrategy(document.RootElement, options); } default: @@ -119,15 +99,16 @@ InternalUnknownChunkingStrategy IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalUnknownChunkingStrategy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalUnknownChunkingStrategy internalUnknownChunkingStrategy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownChunkingStrategy(document.RootElement); + return BinaryContent.Create(internalUnknownChunkingStrategy, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalUnknownChunkingStrategy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalUnknownChunkingStrategy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.cs b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.cs index d9026a4d2..0a1dd5f45 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.cs @@ -9,12 +9,11 @@ namespace OpenAI.VectorStores { internal partial class InternalUnknownChunkingStrategy : FileChunkingStrategy { - public InternalUnknownChunkingStrategy() + public InternalUnknownChunkingStrategy() : base("other") { - Type = "other"; } - internal InternalUnknownChunkingStrategy(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + internal InternalUnknownChunkingStrategy(string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs index 5a958dfeb..40aadd8c3 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalUnknownFileChunkingStrategyRequestParamProxy : IJsonModel { + internal InternalUnknownFileChunkingStrategyRequestParamProxy() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileChunkingStrategyRequestParam)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyRequestParamProxy)JsonModelCreateCore(ref reader, options); + + protected override InternalFileChunkingStrategyRequestParam JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFileChunkingStrategyRequestParam)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement, options); } - internal static InternalUnknownFileChunkingStrategyRequestParamProxy DeserializeInternalUnknownFileChunkingStrategyRequestParamProxy(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownFileChunkingStrategyRequestParamProxy DeserializeInternalUnknownFileChunkingStrategyRequestParamProxy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownFileChunkingStrategyRequestParamProxy(type, serializedAdditionalRawData); + return new InternalUnknownFileChunkingStrategyRequestParamProxy(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(Mod } } - InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyRequestParamProxy)PersistableModelCreateCore(data, options); + protected override InternalFileChunkingStrategyRequestParam PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFileChunkingStrategyRequestParam(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalFileChunkingStrategyRequestParam IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownFileChunkingStrategyRequestParamProxy FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownFileChunkingStrategyRequestParamProxy(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.cs index 91f50cabb..e2067aeef 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.cs @@ -9,11 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalUnknownFileChunkingStrategyRequestParamProxy : InternalFileChunkingStrategyRequestParam { - internal InternalUnknownFileChunkingStrategyRequestParamProxy(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal InternalUnknownFileChunkingStrategyRequestParamProxy() + internal InternalUnknownFileChunkingStrategyRequestParamProxy(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs index c98a69cd1..ff02ebd47 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalUnknownFileChunkingStrategyResponseParamProxy : IJsonModel { + internal InternalUnknownFileChunkingStrategyResponseParamProxy() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileChunkingStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyResponseParamProxy)JsonModelCreateCore(ref reader, options); + + protected override FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FileChunkingStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFileChunkingStrategy(document.RootElement, options); } - internal static InternalUnknownFileChunkingStrategyResponseParamProxy DeserializeInternalUnknownFileChunkingStrategyResponseParamProxy(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownFileChunkingStrategyResponseParamProxy DeserializeInternalUnknownFileChunkingStrategyResponseParamProxy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownFileChunkingStrategyResponseParamProxy(type, serializedAdditionalRawData); + return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyResponseParamProxy)PersistableModelCreateCore(data, options); + protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFileChunkingStrategy(document.RootElement, options); } default: @@ -118,16 +101,5 @@ FileChunkingStrategy IPersistableModel.Create(BinaryData d } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownFileChunkingStrategyResponseParamProxy FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownFileChunkingStrategyResponseParamProxy(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.cs index db5bbec83..46c4b12c8 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.cs @@ -9,11 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalUnknownFileChunkingStrategyResponseParamProxy : FileChunkingStrategy { - internal InternalUnknownFileChunkingStrategyResponseParamProxy(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal InternalUnknownFileChunkingStrategyResponseParamProxy() + internal InternalUnknownFileChunkingStrategyResponseParamProxy(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs index 43b17f909..211ebe410 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { internal partial class InternalUnknownOmniTypedResponseFormat : IJsonModel { + internal InternalUnknownOmniTypedResponseFormat() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalOmniTypedResponseFormat)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownOmniTypedResponseFormat)JsonModelCreateCore(ref reader, options); + + protected override InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalOmniTypedResponseFormat)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalOmniTypedResponseFormat(document.RootElement, options); } - internal static InternalUnknownOmniTypedResponseFormat DeserializeInternalUnknownOmniTypedResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownOmniTypedResponseFormat DeserializeInternalUnknownOmniTypedResponseFormat(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUnknownOmniTypedResponseFormat(type, serializedAdditionalRawData); + return new InternalUnknownOmniTypedResponseFormat(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownOmniTypedResponseFormat)PersistableModelCreateCore(data, options); + protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalOmniTypedResponseFormat(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalOmniTypedResponseFormat IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownOmniTypedResponseFormat FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownOmniTypedResponseFormat(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.cs index 8ae4808ff..071536a4b 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.cs @@ -9,11 +9,7 @@ namespace OpenAI.Internal { internal partial class InternalUnknownOmniTypedResponseFormat : InternalOmniTypedResponseFormat { - internal InternalUnknownOmniTypedResponseFormat(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal InternalUnknownOmniTypedResponseFormat() + internal InternalUnknownOmniTypedResponseFormat(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 6b2b8604d..d67140c8d 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -7,61 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalUpload : IJsonModel { + internal InternalUpload() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUpload)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("filename") != true) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(Bytes); - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) - { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true && Optional.IsDefined(Object)) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt, "U"); + if (Optional.IsDefined(Object)) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("file") != true && Optional.IsDefined(File)) + if (Optional.IsDefined(File)) { if (File != null) { @@ -70,20 +59,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } else { - writer.WriteNull("file"); + writer.WriteNull("file"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,25 +77,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - InternalUpload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalUpload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalUpload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUpload)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalUpload(document.RootElement, options); } - internal static InternalUpload DeserializeInternalUpload(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUpload DeserializeInternalUpload(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -123,72 +106,70 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo InternalUploadStatus status = default; DateTimeOffset expiresAt = default; InternalUploadObject? @object = default; - OpenAIFileInfo file = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + OpenAIFileInfo @file = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("filename"u8)) + if (prop.NameEquals("filename"u8)) { - filename = property.Value.GetString(); + filename = prop.Value.GetString(); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - bytes = property.Value.GetInt32(); + bytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = property.Value.GetString(); + purpose = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new InternalUploadStatus(property.Value.GetString()); + status = new InternalUploadStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @object = null; continue; } - @object = new InternalUploadObject(property.Value.GetString()); + @object = new InternalUploadObject(prop.Value.GetString()); continue; } - if (property.NameEquals("file"u8)) + if (prop.NameEquals("file"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - file = null; + @file = null; continue; } - file = OpenAIFileInfo.DeserializeOpenAIFileInfo(property.Value, options); + @file = OpenAIFileInfo.DeserializeOpenAIFileInfo(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalUpload( id, createdAt, @@ -198,14 +179,15 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo status, expiresAt, @object, - file, - serializedAdditionalRawData); + @file, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -215,15 +197,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - InternalUpload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalUpload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalUpload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalUpload(document.RootElement, options); } default: @@ -233,15 +216,16 @@ InternalUpload IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalUpload FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalUpload internalUpload) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUpload(document.RootElement); + return BinaryContent.Create(internalUpload, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalUpload(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalUpload(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalUpload.cs b/.dotnet/src/Generated/Models/InternalUpload.cs index fb464dedd..4121f31c4 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.cs @@ -9,13 +9,10 @@ namespace OpenAI.Files { internal partial class InternalUpload { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(filename, nameof(filename)); - Argument.AssertNotNull(purpose, nameof(purpose)); - Id = id; CreatedAt = createdAt; Filename = filename; @@ -25,7 +22,7 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in ExpiresAt = expiresAt; } - internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt, InternalUploadObject? @object, OpenAIFileInfo file, IDictionary serializedAdditionalRawData) + internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt, InternalUploadObject? @object, OpenAIFileInfo @file, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -35,22 +32,26 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in Status = status; ExpiresAt = expiresAt; Object = @object; - File = file; - SerializedAdditionalRawData = serializedAdditionalRawData; + File = @file; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalUpload() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string Filename { get; set; } + + public int Bytes { get; set; } + + public string Purpose { get; set; } + + public InternalUploadStatus Status { get; set; } + + public DateTimeOffset ExpiresAt { get; set; } + + public InternalUploadObject? Object { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string Filename { get; } - public int Bytes { get; } - public string Purpose { get; } - public InternalUploadStatus Status { get; } - public DateTimeOffset ExpiresAt { get; } - public InternalUploadObject? Object { get; } - public OpenAIFileInfo File { get; } + public OpenAIFileInfo File { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalUploadObject.cs b/.dotnet/src/Generated/Models/InternalUploadObject.cs index 9dacd622a..8801efbff 100644 --- a/.dotnet/src/Generated/Models/InternalUploadObject.cs +++ b/.dotnet/src/Generated/Models/InternalUploadObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalUploadObject : IEquatable { private readonly string _value; + private const string UploadValue = "upload"; public InternalUploadObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UploadValue = "upload"; + _value = value; + } public static InternalUploadObject Upload { get; } = new InternalUploadObject(UploadValue); + public static bool operator ==(InternalUploadObject left, InternalUploadObject right) => left.Equals(right); + public static bool operator !=(InternalUploadObject left, InternalUploadObject right) => !left.Equals(right); + public static implicit operator InternalUploadObject(string value) => new InternalUploadObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalUploadObject other && Equals(other); + public bool Equals(InternalUploadObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index c6f4c77f8..bc578f043 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -7,51 +7,45 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalUploadPart : IJsonModel { + internal InternalUploadPart() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUploadPart)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("upload_id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("upload_id"u8); + writer.WriteStringValue(UploadId); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("upload_id"u8); - writer.WriteStringValue(UploadId); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,25 +54,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - InternalUploadPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalUploadPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalUploadPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUploadPart)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalUploadPart(document.RootElement, options); } - internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -87,44 +79,42 @@ internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement ele DateTimeOffset createdAt = default; string uploadId = default; InternalUploadPartObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("upload_id"u8)) + if (prop.NameEquals("upload_id"u8)) { - uploadId = property.Value.GetString(); + uploadId = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalUploadPartObject(property.Value.GetString()); + @object = new InternalUploadPartObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalUploadPart(id, createdAt, uploadId, @object, serializedAdditionalRawData); + return new InternalUploadPart(id, createdAt, uploadId, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +124,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - InternalUploadPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalUploadPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalUploadPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalUploadPart(document.RootElement, options); } default: @@ -152,15 +143,16 @@ InternalUploadPart IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalUploadPart FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalUploadPart internalUploadPart) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUploadPart(document.RootElement); + return BinaryContent.Create(internalUploadPart, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalUploadPart(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalUploadPart(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.cs b/.dotnet/src/Generated/Models/InternalUploadPart.cs index 5a7239276..5edb58fb8 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.cs @@ -9,33 +9,30 @@ namespace OpenAI.Files { internal partial class InternalUploadPart { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(uploadId, nameof(uploadId)); - Id = id; CreatedAt = createdAt; UploadId = uploadId; } - internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId, InternalUploadPartObject @object, IDictionary serializedAdditionalRawData) + internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId, InternalUploadPartObject @object, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; UploadId = uploadId; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalUploadPart() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string UploadId { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string UploadId { get; } - public InternalUploadPartObject Object { get; } = InternalUploadPartObject.UploadPart; + public InternalUploadPartObject Object { get; } = "upload.part"; } } diff --git a/.dotnet/src/Generated/Models/InternalUploadPartObject.cs b/.dotnet/src/Generated/Models/InternalUploadPartObject.cs index b790ad181..ecf163eb7 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPartObject.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPartObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalUploadPartObject : IEquatable { private readonly string _value; + private const string UploadPartValue = "upload.part"; public InternalUploadPartObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UploadPartValue = "upload.part"; + _value = value; + } public static InternalUploadPartObject UploadPart { get; } = new InternalUploadPartObject(UploadPartValue); + public static bool operator ==(InternalUploadPartObject left, InternalUploadPartObject right) => left.Equals(right); + public static bool operator !=(InternalUploadPartObject left, InternalUploadPartObject right) => !left.Equals(right); + public static implicit operator InternalUploadPartObject(string value) => new InternalUploadPartObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalUploadPartObject other && Equals(other); + public bool Equals(InternalUploadPartObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalUploadStatus.cs b/.dotnet/src/Generated/Models/InternalUploadStatus.cs index 4ac5876d4..f2bad245d 100644 --- a/.dotnet/src/Generated/Models/InternalUploadStatus.cs +++ b/.dotnet/src/Generated/Models/InternalUploadStatus.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { internal readonly partial struct InternalUploadStatus : IEquatable { private readonly string _value; - - public InternalUploadStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string PendingValue = "pending"; private const string CompletedValue = "completed"; private const string CancelledValue = "cancelled"; private const string ExpiredValue = "expired"; + public InternalUploadStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalUploadStatus Pending { get; } = new InternalUploadStatus(PendingValue); + public static InternalUploadStatus Completed { get; } = new InternalUploadStatus(CompletedValue); + public static InternalUploadStatus Cancelled { get; } = new InternalUploadStatus(CancelledValue); + public static InternalUploadStatus Expired { get; } = new InternalUploadStatus(ExpiredValue); + public static bool operator ==(InternalUploadStatus left, InternalUploadStatus right) => left.Equals(right); + public static bool operator !=(InternalUploadStatus left, InternalUploadStatus right) => !left.Equals(right); + public static implicit operator InternalUploadStatus(string value) => new InternalUploadStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalUploadStatus other && Equals(other); + public bool Equals(InternalUploadStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index fa75b3b88..b51ebc35d 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -7,56 +7,47 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { internal partial class InternalVectorStoreFileBatchObjectFileCounts : IJsonModel { + internal InternalVectorStoreFileBatchObjectFileCounts() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalVectorStoreFileBatchObjectFileCounts)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("in_progress") != true) - { - writer.WritePropertyName("in_progress"u8); - writer.WriteNumberValue(InProgress); - } - if (SerializedAdditionalRawData?.ContainsKey("completed") != true) - { - writer.WritePropertyName("completed"u8); - writer.WriteNumberValue(Completed); - } - if (SerializedAdditionalRawData?.ContainsKey("failed") != true) - { - writer.WritePropertyName("failed"u8); - writer.WriteNumberValue(Failed); - } - if (SerializedAdditionalRawData?.ContainsKey("cancelled") != true) - { - writer.WritePropertyName("cancelled"u8); - writer.WriteNumberValue(Cancelled); - } - if (SerializedAdditionalRawData?.ContainsKey("total") != true) - { - writer.WritePropertyName("total"u8); - writer.WriteNumberValue(Total); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("in_progress"u8); + writer.WriteNumberValue(InProgress); + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + writer.WritePropertyName("cancelled"u8); + writer.WriteNumberValue(Cancelled); + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -65,25 +56,23 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } - InternalVectorStoreFileBatchObjectFileCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalVectorStoreFileBatchObjectFileCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalVectorStoreFileBatchObjectFileCounts JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalVectorStoreFileBatchObjectFileCounts)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalVectorStoreFileBatchObjectFileCounts(document.RootElement, options); } - internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternalVectorStoreFileBatchObjectFileCounts(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternalVectorStoreFileBatchObjectFileCounts(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -93,55 +82,53 @@ internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternal int failed = default; int cancelled = default; int total = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("in_progress"u8)) + if (prop.NameEquals("in_progress"u8)) { - inProgress = property.Value.GetInt32(); + inProgress = prop.Value.GetInt32(); continue; } - if (property.NameEquals("completed"u8)) + if (prop.NameEquals("completed"u8)) { - completed = property.Value.GetInt32(); + completed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("failed"u8)) + if (prop.NameEquals("failed"u8)) { - failed = property.Value.GetInt32(); + failed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("cancelled"u8)) + if (prop.NameEquals("cancelled"u8)) { - cancelled = property.Value.GetInt32(); + cancelled = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total"u8)) + if (prop.NameEquals("total"u8)) { - total = property.Value.GetInt32(); + total = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalVectorStoreFileBatchObjectFileCounts( inProgress, completed, failed, cancelled, total, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -151,15 +138,16 @@ BinaryData IPersistableModel.Write } } - InternalVectorStoreFileBatchObjectFileCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalVectorStoreFileBatchObjectFileCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalVectorStoreFileBatchObjectFileCounts PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalVectorStoreFileBatchObjectFileCounts(document.RootElement, options); } default: @@ -169,15 +157,16 @@ InternalVectorStoreFileBatchObjectFileCounts IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalVectorStoreFileBatchObjectFileCounts FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalVectorStoreFileBatchObjectFileCounts internalVectorStoreFileBatchObjectFileCounts) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalVectorStoreFileBatchObjectFileCounts(document.RootElement); + return BinaryContent.Create(internalVectorStoreFileBatchObjectFileCounts, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalVectorStoreFileBatchObjectFileCounts(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalVectorStoreFileBatchObjectFileCounts(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs index 03849395d..e6aca88b9 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs @@ -9,7 +9,8 @@ namespace OpenAI.VectorStores { internal partial class InternalVectorStoreFileBatchObjectFileCounts { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { InProgress = inProgress; @@ -19,24 +20,24 @@ internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int comple Total = total; } - internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int completed, int failed, int cancelled, int total, IDictionary serializedAdditionalRawData) + internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int completed, int failed, int cancelled, int total, IDictionary additionalBinaryDataProperties) { InProgress = inProgress; Completed = completed; Failed = failed; Cancelled = cancelled; Total = total; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalVectorStoreFileBatchObjectFileCounts() - { - } + public int InProgress { get; set; } + + public int Completed { get; set; } + + public int Failed { get; set; } + + public int Cancelled { get; set; } - public int InProgress { get; } - public int Completed { get; } - public int Failed { get; } - public int Cancelled { get; } - public int Total { get; } + public int Total { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs index baa95d6a2..df5739621 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalVectorStoreFileBatchObjectObject : IEquatable { private readonly string _value; + private const string VectorStoreFilesBatchValue = "vector_store.files_batch"; public InternalVectorStoreFileBatchObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VectorStoreFilesBatchValue = "vector_store.files_batch"; + _value = value; + } public static InternalVectorStoreFileBatchObjectObject VectorStoreFilesBatch { get; } = new InternalVectorStoreFileBatchObjectObject(VectorStoreFilesBatchValue); + public static bool operator ==(InternalVectorStoreFileBatchObjectObject left, InternalVectorStoreFileBatchObjectObject right) => left.Equals(right); + public static bool operator !=(InternalVectorStoreFileBatchObjectObject left, InternalVectorStoreFileBatchObjectObject right) => !left.Equals(right); + public static implicit operator InternalVectorStoreFileBatchObjectObject(string value) => new InternalVectorStoreFileBatchObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalVectorStoreFileBatchObjectObject other && Equals(other); + public bool Equals(InternalVectorStoreFileBatchObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs index 89fbddec0..ebad832d3 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalVectorStoreFileObjectObject : IEquatable { private readonly string _value; + private const string VectorStoreFileValue = "vector_store.file"; public InternalVectorStoreFileObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VectorStoreFileValue = "vector_store.file"; + _value = value; + } public static InternalVectorStoreFileObjectObject VectorStoreFile { get; } = new InternalVectorStoreFileObjectObject(VectorStoreFileValue); + public static bool operator ==(InternalVectorStoreFileObjectObject left, InternalVectorStoreFileObjectObject right) => left.Equals(right); + public static bool operator !=(InternalVectorStoreFileObjectObject left, InternalVectorStoreFileObjectObject right) => !left.Equals(right); + public static implicit operator InternalVectorStoreFileObjectObject(string value) => new InternalVectorStoreFileObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalVectorStoreFileObjectObject other && Equals(other); + public bool Equals(InternalVectorStoreFileObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs index f65258a8c..1f098e0f4 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { internal readonly partial struct InternalVectorStoreObjectObject : IEquatable { private readonly string _value; + private const string VectorStoreValue = "vector_store"; public InternalVectorStoreObjectObject(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VectorStoreValue = "vector_store"; + _value = value; + } public static InternalVectorStoreObjectObject VectorStore { get; } = new InternalVectorStoreObjectObject(VectorStoreValue); + public static bool operator ==(InternalVectorStoreObjectObject left, InternalVectorStoreObjectObject right) => left.Equals(right); + public static bool operator !=(InternalVectorStoreObjectObject left, InternalVectorStoreObjectObject right) => !left.Equals(right); + public static implicit operator InternalVectorStoreObjectObject(string value) => new InternalVectorStoreObjectObject(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalVectorStoreObjectObject other && Equals(other); + public bool Equals(InternalVectorStoreObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/MessageCollectionOrder.cs b/.dotnet/src/Generated/Models/MessageCollectionOrder.cs index 785954834..cfc06b9f3 100644 --- a/.dotnet/src/Generated/Models/MessageCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/MessageCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct MessageCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public MessageCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(MessageCollectionOrder left, MessageCollectionOrder right) => left.Equals(right); + public static bool operator !=(MessageCollectionOrder left, MessageCollectionOrder right) => !left.Equals(right); + public static implicit operator MessageCollectionOrder(string value) => new MessageCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is MessageCollectionOrder other && Equals(other); + public bool Equals(MessageCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index 8f0030793..cad1bfab9 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -5,28 +5,80 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageContent : IJsonModel { - MessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MessageContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + MessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageContent)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageContent(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static MessageContent DeserializeMessageContent(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new MessageContent(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +88,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - MessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageContent(document.RootElement, options); } default: @@ -54,15 +107,16 @@ MessageContent IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageContent FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageContent messageContent) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageContent(document.RootElement); + return BinaryContent.Create(messageContent, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageContent(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageContent.cs b/.dotnet/src/Generated/Models/MessageContent.cs index cee79aaec..5bf12c9d0 100644 --- a/.dotnet/src/Generated/Models/MessageContent.cs +++ b/.dotnet/src/Generated/Models/MessageContent.cs @@ -7,13 +7,13 @@ namespace OpenAI.Assistants { - public abstract partial class MessageContent + public partial class MessageContent { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal MessageContent(IDictionary serializedAdditionalRawData) + internal MessageContent(IDictionary additionalBinaryDataProperties) { - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index 8ab9a3be3..b74a2498c 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -7,41 +7,58 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageCreationAttachment : IJsonModel { + internal MessageCreationAttachment() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageCreationAttachment)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (var item in Tools) { - writer.WritePropertyName("tools"u8); - SerializeTools(writer, options); + if (item == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData != null) + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +67,67 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - MessageCreationAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MessageCreationAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageCreationAttachment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageCreationAttachment)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageCreationAttachment(document.RootElement, options); } - internal static MessageCreationAttachment DeserializeMessageCreationAttachment(JsonElement element, ModelReaderWriterOptions options = null) + internal static MessageCreationAttachment DeserializeMessageCreationAttachment(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string fileId = default; - IReadOnlyList tools = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList tools = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - DeserializeTools(property, ref tools); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + tools = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MessageCreationAttachment(fileId, tools, serializedAdditionalRawData); + return new MessageCreationAttachment(fileId, tools, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +137,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - MessageCreationAttachment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageCreationAttachment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageCreationAttachment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageCreationAttachment(document.RootElement, options); } default: @@ -130,15 +156,16 @@ MessageCreationAttachment IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageCreationAttachment FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageCreationAttachment messageCreationAttachment) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageCreationAttachment(document.RootElement); + return BinaryContent.Create(messageCreationAttachment, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageCreationAttachment(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageCreationAttachment(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 3def69b58..1111c7e6a 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -5,13 +5,15 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageCreationAttachment { - internal IDictionary SerializedAdditionalRawData { get; set; } - public MessageCreationAttachment(string fileId, IEnumerable tools) + private protected IDictionary _additionalBinaryDataProperties; + + public MessageCreationAttachment(string fileId, IEnumerable tools) { Argument.AssertNotNull(fileId, nameof(fileId)); Argument.AssertNotNull(tools, nameof(tools)); @@ -20,17 +22,13 @@ public MessageCreationAttachment(string fileId, IEnumerable tool Tools = tools.ToList(); } - internal MessageCreationAttachment(string fileId, IReadOnlyList tools, IDictionary serializedAdditionalRawData) + internal MessageCreationAttachment(string fileId, IList tools, IDictionary additionalBinaryDataProperties) { FileId = fileId; Tools = tools; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal MessageCreationAttachment() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; } + public string FileId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index cec07156b..a9f4a14f5 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,24 +15,28 @@ public partial class MessageCreationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("role") != true) + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToSerialString()); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("content") != true) - { - writer.WritePropertyName("content"u8); - SerializeContent(writer, options); - } - if (SerializedAdditionalRawData?.ContainsKey("attachments") != true && Optional.IsCollectionDefined(Attachments)) + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(Attachments)) { if (Attachments != null) { @@ -45,10 +50,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("attachments"); + writer.WriteNull("attachments"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -57,26 +62,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -85,94 +91,97 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } - MessageCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MessageCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageCreationOptions(document.RootElement, options); } - internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - MessageRole role = default; + Assistants.MessageRole role = default; IList content = default; IList attachments = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) { - role = property.Value.GetString().ToMessageRole(); + role = prop.Value.GetString().ToMessageRole(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(MessageContent.DeserializeMessageContent(item, options)); } content = array; continue; } - if (property.NameEquals("attachments"u8)) + if (prop.NameEquals("attachments"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(MessageCreationAttachment.DeserializeMessageCreationAttachment(item, options)); } attachments = array; continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MessageCreationOptions(role, content, attachments ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new MessageCreationOptions(role, content, attachments ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -182,15 +191,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - MessageCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageCreationOptions(document.RootElement, options); } default: @@ -200,15 +210,16 @@ MessageCreationOptions IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageCreationOptions messageCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageCreationOptions(document.RootElement); + return BinaryContent.Create(messageCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.cs index 123344624..7136d31d1 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.cs @@ -4,23 +4,24 @@ using System; using System.Collections.Generic; -using System.Linq; namespace OpenAI.Assistants { public partial class MessageCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal MessageCreationOptions(MessageRole role, IList content, IList attachments, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal MessageCreationOptions(Assistants.MessageRole role, IList content, IList attachments, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Role = role; Content = content; Attachments = attachments; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public IList Attachments { get; set; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index 0025d8dcf..54f35b89b 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageDeletionResult : IJsonModel { + internal MessageDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(MessageId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - MessageDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MessageDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageDeletionResult(document.RootElement, options); } - internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme string id = default; bool deleted = default; InternalDeleteMessageResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteMessageResponseObject(property.Value.GetString()); + @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeletionResult(id, deleted, @object, serializedAdditionalRawData); + return new MessageDeletionResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - MessageDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ MessageDeletionResult IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageDeletionResult messageDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageDeletionResult(document.RootElement); + return BinaryContent.Create(messageDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index c99f9922a..f26bb6eaa 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -9,26 +9,22 @@ namespace OpenAI.Assistants { public partial class MessageDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal MessageDeletionResult(string messageId, bool deleted) - { - Argument.AssertNotNull(messageId, nameof(messageId)); + private protected IDictionary _additionalBinaryDataProperties; - MessageId = messageId; + internal MessageDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal MessageDeletionResult(string messageId, bool deleted, InternalDeleteMessageResponseObject @object, IDictionary serializedAdditionalRawData) + internal MessageDeletionResult(string id, bool deleted, InternalDeleteMessageResponseObject @object, IDictionary additionalBinaryDataProperties) { - MessageId = messageId; + Id = id; Deleted = deleted; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal MessageDeletionResult() - { - } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index 50740a3cd..a09a69023 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageFailureDetails : IJsonModel { + internal MessageFailureDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageFailureDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reason") != true) - { - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - MessageFailureDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MessageFailureDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageFailureDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageFailureDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageFailureDetails(document.RootElement, options); } - internal static MessageFailureDetails DeserializeMessageFailureDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static MessageFailureDetails DeserializeMessageFailureDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } MessageFailureReason reason = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("reason"u8)) + if (prop.NameEquals("reason"u8)) { - reason = new MessageFailureReason(property.Value.GetString()); + reason = new MessageFailureReason(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MessageFailureDetails(reason, serializedAdditionalRawData); + return new MessageFailureDetails(reason, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - MessageFailureDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageFailureDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageFailureDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageFailureDetails(document.RootElement, options); } default: @@ -119,15 +119,16 @@ MessageFailureDetails IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageFailureDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageFailureDetails messageFailureDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageFailureDetails(document.RootElement); + return BinaryContent.Create(messageFailureDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageFailureDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageFailureDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.cs index 9c6b6e8e6..c141346a6 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.cs @@ -9,22 +9,19 @@ namespace OpenAI.Assistants { public partial class MessageFailureDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal MessageFailureDetails(MessageFailureReason reason) { Reason = reason; } - internal MessageFailureDetails(MessageFailureReason reason, IDictionary serializedAdditionalRawData) + internal MessageFailureDetails(MessageFailureReason reason, IDictionary additionalBinaryDataProperties) { Reason = reason; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal MessageFailureDetails() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public MessageFailureReason Reason { get; } + public MessageFailureReason Reason { get; set; } } } diff --git a/.dotnet/src/Generated/Models/MessageFailureReason.cs b/.dotnet/src/Generated/Models/MessageFailureReason.cs index ac0b0a02f..5027bb403 100644 --- a/.dotnet/src/Generated/Models/MessageFailureReason.cs +++ b/.dotnet/src/Generated/Models/MessageFailureReason.cs @@ -4,39 +4,49 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct MessageFailureReason : IEquatable { private readonly string _value; - - public MessageFailureReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string ContentFilterValue = "content_filter"; private const string MaxTokensValue = "max_tokens"; private const string RunCancelledValue = "run_cancelled"; private const string RunExpiredValue = "run_expired"; private const string RunFailedValue = "run_failed"; + public MessageFailureReason(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static MessageFailureReason ContentFilter { get; } = new MessageFailureReason(ContentFilterValue); + public static MessageFailureReason MaxTokens { get; } = new MessageFailureReason(MaxTokensValue); + public static MessageFailureReason RunCancelled { get; } = new MessageFailureReason(RunCancelledValue); + public static MessageFailureReason RunExpired { get; } = new MessageFailureReason(RunExpiredValue); + public static MessageFailureReason RunFailed { get; } = new MessageFailureReason(RunFailedValue); + public static bool operator ==(MessageFailureReason left, MessageFailureReason right) => left.Equals(right); + public static bool operator !=(MessageFailureReason left, MessageFailureReason right) => !left.Equals(right); + public static implicit operator MessageFailureReason(string value) => new MessageFailureReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is MessageFailureReason other && Equals(other); + public bool Equals(MessageFailureReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs index f5b28713b..bbfbefa67 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,14 +15,19 @@ public partial class MessageModificationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageModificationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -30,26 +36,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -58,62 +65,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - MessageModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MessageModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual MessageModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MessageModificationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMessageModificationOptions(document.RootElement, options); } - internal static MessageModificationOptions DeserializeMessageModificationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static MessageModificationOptions DeserializeMessageModificationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MessageModificationOptions(metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new MessageModificationOptions(metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +133,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - MessageModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + MessageModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual MessageModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeMessageModificationOptions(document.RootElement, options); } default: @@ -141,15 +152,16 @@ MessageModificationOptions IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static MessageModificationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(MessageModificationOptions messageModificationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeMessageModificationOptions(document.RootElement); + return BinaryContent.Create(messageModificationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator MessageModificationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMessageModificationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.cs index 5c53d2234..dbdffa35b 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class MessageModificationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public MessageModificationOptions() { Metadata = new ChangeTrackingDictionary(); } - internal MessageModificationOptions(IDictionary metadata, IDictionary serializedAdditionalRawData) + internal MessageModificationOptions(IDictionary metadata, IDictionary additionalBinaryDataProperties) { Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IDictionary Metadata { get; set; } diff --git a/.dotnet/src/Generated/Models/MessageRole.Serialization.cs b/.dotnet/src/Generated/Models/MessageRole.Serialization.cs index 6d77ee639..33366fef5 100644 --- a/.dotnet/src/Generated/Models/MessageRole.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageRole.Serialization.cs @@ -8,17 +8,23 @@ namespace OpenAI.Assistants { internal static partial class MessageRoleExtensions { - public static string ToSerialString(this MessageRole value) => value switch + public static string ToSerialString(this Assistants.MessageRole value) => value switch { - MessageRole.User => "user", - MessageRole.Assistant => "assistant", + Assistants.MessageRole.User => "user", + Assistants.MessageRole.Assistant => "assistant", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MessageRole value.") }; - public static MessageRole ToMessageRole(this string value) + public static Assistants.MessageRole ToMessageRole(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) return MessageRole.User; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) return MessageRole.Assistant; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) + { + return Assistants.MessageRole.User; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) + { + return Assistants.MessageRole.Assistant; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MessageRole value."); } } diff --git a/.dotnet/src/Generated/Models/MessageStatus.cs b/.dotnet/src/Generated/Models/MessageStatus.cs index 86f1d414c..14de118bb 100644 --- a/.dotnet/src/Generated/Models/MessageStatus.cs +++ b/.dotnet/src/Generated/Models/MessageStatus.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct MessageStatus : IEquatable { private readonly string _value; + private const string InProgressValue = "in_progress"; + private const string IncompleteValue = "incomplete"; + private const string CompletedValue = "completed"; public MessageStatus(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string InProgressValue = "in_progress"; - private const string IncompleteValue = "incomplete"; - private const string CompletedValue = "completed"; + _value = value; + } public static MessageStatus InProgress { get; } = new MessageStatus(InProgressValue); + public static MessageStatus Incomplete { get; } = new MessageStatus(IncompleteValue); + public static MessageStatus Completed { get; } = new MessageStatus(CompletedValue); + public static bool operator ==(MessageStatus left, MessageStatus right) => left.Equals(right); + public static bool operator !=(MessageStatus left, MessageStatus right) => !left.Equals(right); + public static implicit operator MessageStatus(string value) => new MessageStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is MessageStatus other && Equals(other); + public bool Equals(MessageStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 0339219c0..4f5bfb611 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Models { public partial class ModelDeletionResult : IJsonModel { + internal ModelDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModelDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ModelId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } - ModelDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ModelDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModelDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModelDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModelDeletionResult(document.RootElement, options); } - internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e string id = default; bool deleted = default; InternalDeleteModelResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteModelResponseObject(property.Value.GetString()); + @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ModelDeletionResult(id, deleted, @object, serializedAdditionalRawData); + return new ModelDeletionResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - ModelDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModelDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModelDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModelDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ ModelDeletionResult IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModelDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModelDeletionResult modelDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModelDeletionResult(document.RootElement); + return BinaryContent.Create(modelDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModelDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModelDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index d70e155fe..4afd6ea42 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -9,26 +9,22 @@ namespace OpenAI.Models { public partial class ModelDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ModelDeletionResult(string modelId, bool deleted) - { - Argument.AssertNotNull(modelId, nameof(modelId)); + private protected IDictionary _additionalBinaryDataProperties; - ModelId = modelId; + internal ModelDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal ModelDeletionResult(string modelId, bool deleted, InternalDeleteModelResponseObject @object, IDictionary serializedAdditionalRawData) + internal ModelDeletionResult(string id, bool deleted, InternalDeleteModelResponseObject @object, IDictionary additionalBinaryDataProperties) { - ModelId = modelId; + Id = id; Deleted = deleted; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ModelDeletionResult() - { - } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/ModerationCategories.Serialization.cs index f8bc1c570..7e03880b4 100644 --- a/.dotnet/src/Generated/Models/ModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationCategories.Serialization.cs @@ -7,86 +7,59 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationCategories : IJsonModel { + internal ModerationCategories() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationCategories)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("hate") != true) - { - writer.WritePropertyName("hate"u8); - writer.WriteBooleanValue(Hate); - } - if (SerializedAdditionalRawData?.ContainsKey("hate/threatening") != true) - { - writer.WritePropertyName("hate/threatening"u8); - writer.WriteBooleanValue(HateThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment") != true) - { - writer.WritePropertyName("harassment"u8); - writer.WriteBooleanValue(Harassment); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment/threatening") != true) - { - writer.WritePropertyName("harassment/threatening"u8); - writer.WriteBooleanValue(HarassmentThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm") != true) - { - writer.WritePropertyName("self-harm"u8); - writer.WriteBooleanValue(SelfHarm); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/intent") != true) - { - writer.WritePropertyName("self-harm/intent"u8); - writer.WriteBooleanValue(SelfHarmIntent); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/instructions") != true) - { - writer.WritePropertyName("self-harm/instructions"u8); - writer.WriteBooleanValue(SelfHarmInstructions); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual") != true) - { - writer.WritePropertyName("sexual"u8); - writer.WriteBooleanValue(Sexual); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual/minors") != true) - { - writer.WritePropertyName("sexual/minors"u8); - writer.WriteBooleanValue(SexualMinors); - } - if (SerializedAdditionalRawData?.ContainsKey("violence") != true) - { - writer.WritePropertyName("violence"u8); - writer.WriteBooleanValue(Violence); - } - if (SerializedAdditionalRawData?.ContainsKey("violence/graphic") != true) - { - writer.WritePropertyName("violence/graphic"u8); - writer.WriteBooleanValue(ViolenceGraphic); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + writer.WritePropertyName("hate"u8); + writer.WriteBooleanValue(Hate); + writer.WritePropertyName("hate/threatening"u8); + writer.WriteBooleanValue(HateThreatening); + writer.WritePropertyName("harassment"u8); + writer.WriteBooleanValue(Harassment); + writer.WritePropertyName("harassment/threatening"u8); + writer.WriteBooleanValue(HarassmentThreatening); + writer.WritePropertyName("self-harm"u8); + writer.WriteBooleanValue(SelfHarm); + writer.WritePropertyName("self-harm/intent"u8); + writer.WriteBooleanValue(SelfHarmIntent); + writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteBooleanValue(SelfHarmInstructions); + writer.WritePropertyName("sexual"u8); + writer.WriteBooleanValue(Sexual); + writer.WritePropertyName("sexual/minors"u8); + writer.WriteBooleanValue(SexualMinors); + writer.WritePropertyName("violence"u8); + writer.WriteBooleanValue(Violence); + writer.WritePropertyName("violence/graphic"u8); + writer.WriteBooleanValue(ViolenceGraphic); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,25 +68,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } - ModerationCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ModerationCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationCategories JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationCategories)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModerationCategories(document.RootElement, options); } - internal static ModerationCategories DeserializeModerationCategories(JsonElement element, ModelReaderWriterOptions options = null) + internal static ModerationCategories DeserializeModerationCategories(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -129,72 +100,69 @@ internal static ModerationCategories DeserializeModerationCategories(JsonElement bool sexualMinors = default; bool violence = default; bool violenceGraphic = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("hate"u8)) + if (prop.NameEquals("hate"u8)) { - hate = property.Value.GetBoolean(); + hate = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("hate/threatening"u8)) + if (prop.NameEquals("hate/threatening"u8)) { - hateThreatening = property.Value.GetBoolean(); + hateThreatening = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("harassment"u8)) + if (prop.NameEquals("harassment"u8)) { - harassment = property.Value.GetBoolean(); + harassment = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("harassment/threatening"u8)) + if (prop.NameEquals("harassment/threatening"u8)) { - harassmentThreatening = property.Value.GetBoolean(); + harassmentThreatening = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm"u8)) + if (prop.NameEquals("self-harm"u8)) { - selfHarm = property.Value.GetBoolean(); + selfHarm = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm/intent"u8)) + if (prop.NameEquals("self-harm/intent"u8)) { - selfHarmIntent = property.Value.GetBoolean(); + selfHarmIntent = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm/instructions"u8)) + if (prop.NameEquals("self-harm/instructions"u8)) { - selfHarmInstructions = property.Value.GetBoolean(); + selfHarmInstructions = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("sexual"u8)) + if (prop.NameEquals("sexual"u8)) { - sexual = property.Value.GetBoolean(); + sexual = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("sexual/minors"u8)) + if (prop.NameEquals("sexual/minors"u8)) { - sexualMinors = property.Value.GetBoolean(); + sexualMinors = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("violence"u8)) + if (prop.NameEquals("violence"u8)) { - violence = property.Value.GetBoolean(); + violence = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("violence/graphic"u8)) + if (prop.NameEquals("violence/graphic"u8)) { - violenceGraphic = property.Value.GetBoolean(); + violenceGraphic = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ModerationCategories( hate, hateThreatening, @@ -207,13 +175,14 @@ internal static ModerationCategories DeserializeModerationCategories(JsonElement sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -223,15 +192,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - ModerationCategories IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationCategories IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationCategories PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModerationCategories(document.RootElement, options); } default: @@ -241,15 +211,16 @@ ModerationCategories IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationCategories FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationCategories moderationCategories) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationCategories(document.RootElement); + return BinaryContent.Create(moderationCategories, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationCategories(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModerationCategories(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationCategories.cs b/.dotnet/src/Generated/Models/ModerationCategories.cs index 978eaf4e7..f696967a4 100644 --- a/.dotnet/src/Generated/Models/ModerationCategories.cs +++ b/.dotnet/src/Generated/Models/ModerationCategories.cs @@ -9,7 +9,8 @@ namespace OpenAI.Moderations { public partial class ModerationCategories { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal ModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { Hate = hate; @@ -25,7 +26,7 @@ internal ModerationCategories(bool hate, bool hateThreatening, bool harassment, ViolenceGraphic = violenceGraphic; } - internal ModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary serializedAdditionalRawData) + internal ModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -38,23 +39,29 @@ internal ModerationCategories(bool hate, bool hateThreatening, bool harassment, SexualMinors = sexualMinors; Violence = violence; ViolenceGraphic = violenceGraphic; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ModerationCategories() - { - } + public bool Hate { get; set; } + + public bool HateThreatening { get; set; } + + public bool Harassment { get; set; } + + public bool HarassmentThreatening { get; set; } + + public bool SelfHarm { get; set; } + + public bool SelfHarmIntent { get; set; } + + public bool SelfHarmInstructions { get; set; } + + public bool Sexual { get; set; } + + public bool SexualMinors { get; set; } + + public bool Violence { get; set; } - public bool Hate { get; } - public bool HateThreatening { get; } - public bool Harassment { get; } - public bool HarassmentThreatening { get; } - public bool SelfHarm { get; } - public bool SelfHarmIntent { get; } - public bool SelfHarmInstructions { get; } - public bool Sexual { get; } - public bool SexualMinors { get; } - public bool Violence { get; } - public bool ViolenceGraphic { get; } + public bool ViolenceGraphic { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/ModerationCategoryScores.Serialization.cs index 52df6f3f9..e16beab64 100644 --- a/.dotnet/src/Generated/Models/ModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationCategoryScores.Serialization.cs @@ -7,86 +7,59 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationCategoryScores : IJsonModel { + internal ModerationCategoryScores() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationCategoryScores)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("hate") != true) - { - writer.WritePropertyName("hate"u8); - writer.WriteNumberValue(Hate); - } - if (SerializedAdditionalRawData?.ContainsKey("hate/threatening") != true) - { - writer.WritePropertyName("hate/threatening"u8); - writer.WriteNumberValue(HateThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment") != true) - { - writer.WritePropertyName("harassment"u8); - writer.WriteNumberValue(Harassment); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment/threatening") != true) - { - writer.WritePropertyName("harassment/threatening"u8); - writer.WriteNumberValue(HarassmentThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm") != true) - { - writer.WritePropertyName("self-harm"u8); - writer.WriteNumberValue(SelfHarm); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/intent") != true) - { - writer.WritePropertyName("self-harm/intent"u8); - writer.WriteNumberValue(SelfHarmIntent); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/instructions") != true) - { - writer.WritePropertyName("self-harm/instructions"u8); - writer.WriteNumberValue(SelfHarmInstructions); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual") != true) - { - writer.WritePropertyName("sexual"u8); - writer.WriteNumberValue(Sexual); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual/minors") != true) - { - writer.WritePropertyName("sexual/minors"u8); - writer.WriteNumberValue(SexualMinors); - } - if (SerializedAdditionalRawData?.ContainsKey("violence") != true) - { - writer.WritePropertyName("violence"u8); - writer.WriteNumberValue(Violence); - } - if (SerializedAdditionalRawData?.ContainsKey("violence/graphic") != true) - { - writer.WritePropertyName("violence/graphic"u8); - writer.WriteNumberValue(ViolenceGraphic); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + writer.WritePropertyName("hate"u8); + writer.WriteNumberValue(Hate); + writer.WritePropertyName("hate/threatening"u8); + writer.WriteNumberValue(HateThreatening); + writer.WritePropertyName("harassment"u8); + writer.WriteNumberValue(Harassment); + writer.WritePropertyName("harassment/threatening"u8); + writer.WriteNumberValue(HarassmentThreatening); + writer.WritePropertyName("self-harm"u8); + writer.WriteNumberValue(SelfHarm); + writer.WritePropertyName("self-harm/intent"u8); + writer.WriteNumberValue(SelfHarmIntent); + writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteNumberValue(SelfHarmInstructions); + writer.WritePropertyName("sexual"u8); + writer.WriteNumberValue(Sexual); + writer.WritePropertyName("sexual/minors"u8); + writer.WriteNumberValue(SexualMinors); + writer.WritePropertyName("violence"u8); + writer.WriteNumberValue(Violence); + writer.WritePropertyName("violence/graphic"u8); + writer.WriteNumberValue(ViolenceGraphic); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,25 +68,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } - ModerationCategoryScores IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ModerationCategoryScores IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationCategoryScores JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationCategoryScores)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModerationCategoryScores(document.RootElement, options); } - internal static ModerationCategoryScores DeserializeModerationCategoryScores(JsonElement element, ModelReaderWriterOptions options = null) + internal static ModerationCategoryScores DeserializeModerationCategoryScores(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -129,72 +100,69 @@ internal static ModerationCategoryScores DeserializeModerationCategoryScores(Jso float sexualMinors = default; float violence = default; float violenceGraphic = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("hate"u8)) + if (prop.NameEquals("hate"u8)) { - hate = property.Value.GetSingle(); + hate = prop.Value.GetSingle(); continue; } - if (property.NameEquals("hate/threatening"u8)) + if (prop.NameEquals("hate/threatening"u8)) { - hateThreatening = property.Value.GetSingle(); + hateThreatening = prop.Value.GetSingle(); continue; } - if (property.NameEquals("harassment"u8)) + if (prop.NameEquals("harassment"u8)) { - harassment = property.Value.GetSingle(); + harassment = prop.Value.GetSingle(); continue; } - if (property.NameEquals("harassment/threatening"u8)) + if (prop.NameEquals("harassment/threatening"u8)) { - harassmentThreatening = property.Value.GetSingle(); + harassmentThreatening = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm"u8)) + if (prop.NameEquals("self-harm"u8)) { - selfHarm = property.Value.GetSingle(); + selfHarm = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm/intent"u8)) + if (prop.NameEquals("self-harm/intent"u8)) { - selfHarmIntent = property.Value.GetSingle(); + selfHarmIntent = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm/instructions"u8)) + if (prop.NameEquals("self-harm/instructions"u8)) { - selfHarmInstructions = property.Value.GetSingle(); + selfHarmInstructions = prop.Value.GetSingle(); continue; } - if (property.NameEquals("sexual"u8)) + if (prop.NameEquals("sexual"u8)) { - sexual = property.Value.GetSingle(); + sexual = prop.Value.GetSingle(); continue; } - if (property.NameEquals("sexual/minors"u8)) + if (prop.NameEquals("sexual/minors"u8)) { - sexualMinors = property.Value.GetSingle(); + sexualMinors = prop.Value.GetSingle(); continue; } - if (property.NameEquals("violence"u8)) + if (prop.NameEquals("violence"u8)) { - violence = property.Value.GetSingle(); + violence = prop.Value.GetSingle(); continue; } - if (property.NameEquals("violence/graphic"u8)) + if (prop.NameEquals("violence/graphic"u8)) { - violenceGraphic = property.Value.GetSingle(); + violenceGraphic = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ModerationCategoryScores( hate, hateThreatening, @@ -207,13 +175,14 @@ internal static ModerationCategoryScores DeserializeModerationCategoryScores(Jso sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -223,15 +192,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - ModerationCategoryScores IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationCategoryScores IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationCategoryScores PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModerationCategoryScores(document.RootElement, options); } default: @@ -241,15 +211,16 @@ ModerationCategoryScores IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationCategoryScores FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationCategoryScores moderationCategoryScores) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationCategoryScores(document.RootElement); + return BinaryContent.Create(moderationCategoryScores, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationCategoryScores(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModerationCategoryScores(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationCategoryScores.cs b/.dotnet/src/Generated/Models/ModerationCategoryScores.cs index a734260ce..7888af9af 100644 --- a/.dotnet/src/Generated/Models/ModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/ModerationCategoryScores.cs @@ -9,7 +9,8 @@ namespace OpenAI.Moderations { public partial class ModerationCategoryScores { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal ModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) { Hate = hate; @@ -25,7 +26,7 @@ internal ModerationCategoryScores(float hate, float hateThreatening, float haras ViolenceGraphic = violenceGraphic; } - internal ModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary serializedAdditionalRawData) + internal ModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -38,23 +39,29 @@ internal ModerationCategoryScores(float hate, float hateThreatening, float haras SexualMinors = sexualMinors; Violence = violence; ViolenceGraphic = violenceGraphic; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ModerationCategoryScores() - { - } + public float Hate { get; set; } + + public float HateThreatening { get; set; } + + public float Harassment { get; set; } + + public float HarassmentThreatening { get; set; } + + public float SelfHarm { get; set; } + + public float SelfHarmIntent { get; set; } + + public float SelfHarmInstructions { get; set; } + + public float Sexual { get; set; } + + public float SexualMinors { get; set; } + + public float Violence { get; set; } - public float Hate { get; } - public float HateThreatening { get; } - public float Harassment { get; } - public float HarassmentThreatening { get; } - public float SelfHarm { get; } - public float SelfHarmIntent { get; } - public float SelfHarmInstructions { get; } - public float Sexual { get; } - public float SexualMinors { get; } - public float Violence { get; } - public float ViolenceGraphic { get; } + public float ViolenceGraphic { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs index cb0f039f8..53949e507 100644 --- a/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs @@ -5,28 +5,114 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationCollection : IJsonModel { - ModerationCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ModerationCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ModerationCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("results"u8); + writer.WriteStartArray(); + foreach (var item in Results) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ModerationCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModerationCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModerationCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static ModerationCollection DeserializeModerationCollection(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string model = default; + IList results = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("results"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ModerationResult.DeserializeModerationResult(item, options)); + } + results = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ModerationCollection(id, model, results, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +122,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - ModerationCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModerationCollection(document.RootElement, options); } default: @@ -54,15 +141,16 @@ ModerationCollection IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationCollection moderationCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationCollection(document.RootElement); + return BinaryContent.Create(moderationCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModerationCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationCollection.cs b/.dotnet/src/Generated/Models/ModerationCollection.cs index c8436d807..2b1e8256b 100644 --- a/.dotnet/src/Generated/Models/ModerationCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationCollection.cs @@ -2,15 +2,25 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Moderations { - public partial class ModerationCollection : ReadOnlyCollection + public partial class ModerationCollection { - public string Id { get; } - public string Model { get; } + private protected IDictionary _additionalBinaryDataProperties; + + internal ModerationCollection(string id, string model, IList results, IDictionary additionalBinaryDataProperties) + { + Id = id; + Model = model; + Results = results; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Id { get; set; } + + public string Model { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 591577235..91397d1cc 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { @@ -14,41 +15,39 @@ internal partial class ModerationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("input") != true) - { - writer.WritePropertyName("input"u8); + writer.WritePropertyName("input"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Input); + writer.WriteRawValue(Input); #else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(Input)) + { + JsonSerializer.Serialize(writer, document.RootElement); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) +#endif + if (Optional.IsDefined(Model)) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -57,63 +56,60 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } - ModerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ModerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModerationOptions(document.RootElement, options); } - internal static ModerationOptions DeserializeModerationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ModerationOptions DeserializeModerationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } BinaryData input = default; InternalCreateModerationRequestModel? model = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("input"u8)) + if (prop.NameEquals("input"u8)) { - input = BinaryData.FromString(property.Value.GetRawText()); + input = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + model = null; continue; } - model = new InternalCreateModerationRequestModel(property.Value.GetString()); + model = new InternalCreateModerationRequestModel(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ModerationOptions(input, model, serializedAdditionalRawData); + return new ModerationOptions(input, model, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +119,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - ModerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModerationOptions(document.RootElement, options); } default: @@ -141,15 +138,16 @@ ModerationOptions IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationOptions moderationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationOptions(document.RootElement); + return BinaryContent.Create(moderationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModerationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index e21defe31..1739b2dcc 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -9,13 +9,13 @@ namespace OpenAI.Moderations { internal partial class ModerationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary serializedAdditionalRawData) + internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) { Input = input; Model = model; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index 4e5f4ee28..26e0dcb72 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationResult : IJsonModel { + internal ModerationResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("flagged") != true) - { - writer.WritePropertyName("flagged"u8); - writer.WriteBooleanValue(Flagged); - } - if (SerializedAdditionalRawData?.ContainsKey("categories") != true) - { - writer.WritePropertyName("categories"u8); - writer.WriteObjectValue(Categories, options); - } - if (SerializedAdditionalRawData?.ContainsKey("category_scores") != true) - { - writer.WritePropertyName("category_scores"u8); - writer.WriteObjectValue(CategoryScores, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("flagged"u8); + writer.WriteBooleanValue(Flagged); + writer.WritePropertyName("categories"u8); + writer.WriteObjectValue(Categories, options); + writer.WritePropertyName("category_scores"u8); + writer.WriteObjectValue(CategoryScores, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - ModerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ModerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ModerationResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeModerationResult(document.RootElement, options); } - internal static ModerationResult DeserializeModerationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static ModerationResult DeserializeModerationResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static ModerationResult DeserializeModerationResult(JsonElement element bool flagged = default; ModerationCategories categories = default; ModerationCategoryScores categoryScores = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("flagged"u8)) + if (prop.NameEquals("flagged"u8)) { - flagged = property.Value.GetBoolean(); + flagged = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("categories"u8)) + if (prop.NameEquals("categories"u8)) { - categories = ModerationCategories.DeserializeModerationCategories(property.Value, options); + categories = ModerationCategories.DeserializeModerationCategories(prop.Value, options); continue; } - if (property.NameEquals("category_scores"u8)) + if (prop.NameEquals("category_scores"u8)) { - categoryScores = ModerationCategoryScores.DeserializeModerationCategoryScores(property.Value, options); + categoryScores = ModerationCategoryScores.DeserializeModerationCategoryScores(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ModerationResult(flagged, categories, categoryScores, serializedAdditionalRawData); + return new ModerationResult(flagged, categories, categoryScores, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - ModerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeModerationResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ ModerationResult IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationResult moderationResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationResult(document.RootElement); + return BinaryContent.Create(moderationResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeModerationResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationResult.cs b/.dotnet/src/Generated/Models/ModerationResult.cs index ae015e2eb..390a61724 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.cs @@ -9,31 +9,27 @@ namespace OpenAI.Moderations { public partial class ModerationResult { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal ModerationResult(bool flagged, ModerationCategories categories, ModerationCategoryScores categoryScores) { - Argument.AssertNotNull(categories, nameof(categories)); - Argument.AssertNotNull(categoryScores, nameof(categoryScores)); - Flagged = flagged; Categories = categories; CategoryScores = categoryScores; } - internal ModerationResult(bool flagged, ModerationCategories categories, ModerationCategoryScores categoryScores, IDictionary serializedAdditionalRawData) + internal ModerationResult(bool flagged, ModerationCategories categories, ModerationCategoryScores categoryScores, IDictionary additionalBinaryDataProperties) { Flagged = flagged; Categories = categories; CategoryScores = categoryScores; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ModerationResult() - { - } + public bool Flagged { get; set; } + + public ModerationCategories Categories { get; set; } - public bool Flagged { get; } - public ModerationCategories Categories { get; } - public ModerationCategoryScores CategoryScores { get; } + public ModerationCategoryScores CategoryScores { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index 6bc1f6fc5..ced4a1d5f 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -7,65 +7,59 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { internal partial class OpenAIError : IJsonModel { + internal OpenAIError() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true) + if (Code != null) { - if (Code != null) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - else - { - writer.WriteNull("code"); - } + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + else { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); + writer.WriteNull("code"u8); } - if (SerializedAdditionalRawData?.ContainsKey("param") != true) + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Param != null) { - if (Param != null) - { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); - } - else - { - writer.WriteNull("param"); - } + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + else { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); + writer.WriteNull("param"u8); } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -74,81 +68,77 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } - OpenAIError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIError(document.RootElement, options); } - internal static OpenAIError DeserializeOpenAIError(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIError DeserializeOpenAIError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string code = default; string message = default; - string param = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @param = default; + string @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { code = null; continue; } - code = property.Value.GetString(); + code = prop.Value.GetString(); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (property.NameEquals("param"u8)) + if (prop.NameEquals("param"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - param = null; + @param = null; continue; } - param = property.Value.GetString(); + @param = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIError(code, message, param, type, serializedAdditionalRawData); + return new OpenAIError(code, message, @param, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - OpenAIError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIError(document.RootElement, options); } default: @@ -176,15 +167,16 @@ OpenAIError IPersistableModel.Create(BinaryData data, ModelReaderWr string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIError openAIError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIError(document.RootElement); + return BinaryContent.Create(openAIError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIError.cs b/.dotnet/src/Generated/Models/OpenAIError.cs index 7b94f06f3..1aab89313 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.cs @@ -9,34 +9,31 @@ namespace OpenAI.Internal { internal partial class OpenAIError { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal OpenAIError(string code, string message, string param, string type) - { - Argument.AssertNotNull(message, nameof(message)); - Argument.AssertNotNull(type, nameof(type)); + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIError(string code, string message, string @param, string @type) + { Code = code; Message = message; - Param = param; - Type = type; + Param = @param; + Type = @type; } - internal OpenAIError(string code, string message, string param, string type, IDictionary serializedAdditionalRawData) + internal OpenAIError(string code, string message, string @param, string @type, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - Param = param; - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Param = @param; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal OpenAIError() - { - } + public string Code { get; set; } + + public string Message { get; set; } + + public string Param { get; set; } - public string Code { get; } - public string Message { get; } - public string Param { get; } - public string Type { get; } + public string Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index e78630aea..e9bd286b6 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -7,36 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Internal { internal partial class OpenAIErrorResponse : IJsonModel { + internal OpenAIErrorResponse() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIErrorResponse)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("error") != true) - { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,53 +48,49 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } - OpenAIErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIErrorResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIErrorResponse)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIErrorResponse(document.RootElement, options); } - internal static OpenAIErrorResponse DeserializeOpenAIErrorResponse(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIErrorResponse DeserializeOpenAIErrorResponse(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } OpenAIError error = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("error"u8)) + if (prop.NameEquals("error"u8)) { - error = OpenAIError.DeserializeOpenAIError(property.Value, options); + error = OpenAIError.DeserializeOpenAIError(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIErrorResponse(error, serializedAdditionalRawData); + return new OpenAIErrorResponse(error, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +100,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - OpenAIErrorResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIErrorResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIErrorResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIErrorResponse(document.RootElement, options); } default: @@ -119,15 +119,16 @@ OpenAIErrorResponse IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIErrorResponse FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIErrorResponse openAIErrorResponse) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIErrorResponse(document.RootElement); + return BinaryContent.Create(openAIErrorResponse, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIErrorResponse(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIErrorResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs index 764dd3854..ce8342fab 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs @@ -9,24 +9,19 @@ namespace OpenAI.Internal { internal partial class OpenAIErrorResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIErrorResponse(OpenAIError error) { - Argument.AssertNotNull(error, nameof(error)); - Error = error; } - internal OpenAIErrorResponse(OpenAIError error, IDictionary serializedAdditionalRawData) + internal OpenAIErrorResponse(OpenAIError error, IDictionary additionalBinaryDataProperties) { Error = error; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal OpenAIErrorResponse() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public OpenAIError Error { get; } + public OpenAIError Error { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs index fcd6544a3..0493c58c3 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs @@ -7,78 +7,63 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { public partial class OpenAIFileInfo : IJsonModel { + internal OpenAIFileInfo() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIFileInfo)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - if (SizeInBytes != null) - { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(SizeInBytes.Value); - } - else - { - writer.WriteNull("bytes"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("filename") != true) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Bytes != null) { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes.Value); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + else { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteNull("bytes"u8); } - if (SerializedAdditionalRawData?.ContainsKey("status_details") != true && Optional.IsDefined(StatusDetails)) + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToString()); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(StatusDetails)) { writer.WritePropertyName("status_details"u8); writer.WriteStringValue(StatusDetails); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -87,25 +72,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - OpenAIFileInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIFileInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIFileInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIFileInfo)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIFileInfo(document.RootElement, options); } - internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -118,62 +101,64 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo OpenAIFilePurpose purpose = default; OpenAIFileStatus status = default; string statusDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { bytes = null; continue; } - bytes = property.Value.GetInt32(); + bytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("filename"u8)) + if (prop.NameEquals("filename"u8)) { - filename = property.Value.GetString(); + filename = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalOpenAIFileObject(property.Value.GetString()); + @object = new InternalOpenAIFileObject(prop.Value.GetString()); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = new OpenAIFilePurpose(property.Value.GetString()); + purpose = new OpenAIFilePurpose(prop.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new OpenAIFileStatus(property.Value.GetString()); + status = new OpenAIFileStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("status_details"u8)) + if (prop.NameEquals("status_details"u8)) { - statusDetails = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + statusDetails = null; + continue; + } + statusDetails = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new OpenAIFileInfo( id, bytes, @@ -183,13 +168,14 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo purpose, status, statusDetails, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -199,15 +185,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - OpenAIFileInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIFileInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIFileInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIFileInfo(document.RootElement, options); } default: @@ -217,15 +204,16 @@ OpenAIFileInfo IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIFileInfo FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIFileInfo openAIFileInfo) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIFileInfo(document.RootElement); + return BinaryContent.Create(openAIFileInfo, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIFileInfo(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIFileInfo(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfo.cs b/.dotnet/src/Generated/Models/OpenAIFileInfo.cs index 447da57d5..fe9e1fdfd 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfo.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfo.cs @@ -9,41 +9,37 @@ namespace OpenAI.Files { public partial class OpenAIFileInfo { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal OpenAIFileInfo(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, OpenAIFilePurpose purpose, OpenAIFileStatus status) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(filename, nameof(filename)); + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIFileInfo(string id, int? bytes, DateTimeOffset createdAt, string filename, OpenAIFilePurpose purpose, OpenAIFileStatus status) + { Id = id; - SizeInBytes = sizeInBytes; + Bytes = bytes; CreatedAt = createdAt; Filename = filename; Purpose = purpose; Status = status; } - internal OpenAIFileInfo(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, InternalOpenAIFileObject @object, OpenAIFilePurpose purpose, OpenAIFileStatus status, string statusDetails, IDictionary serializedAdditionalRawData) + internal OpenAIFileInfo(string id, int? bytes, DateTimeOffset createdAt, string filename, InternalOpenAIFileObject @object, OpenAIFilePurpose purpose, OpenAIFileStatus status, string statusDetails, IDictionary additionalBinaryDataProperties) { Id = id; - SizeInBytes = sizeInBytes; + Bytes = bytes; CreatedAt = createdAt; Filename = filename; Object = @object; Purpose = purpose; Status = status; StatusDetails = statusDetails; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal OpenAIFileInfo() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string Filename { get; } + public string Filename { get; set; } - public OpenAIFilePurpose Purpose { get; } + public OpenAIFilePurpose Purpose { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs index 5cd5d039a..1d251806b 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs @@ -5,28 +5,106 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { public partial class OpenAIFileInfoCollection : IJsonModel { - OpenAIFileInfoCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + OpenAIFileInfoCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIFileInfoCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIFileInfoCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static OpenAIFileInfoCollection DeserializeOpenAIFileInfoCollection(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList data = default; + InternalListFilesResponseObject @object = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(OpenAIFileInfo.DeserializeOpenAIFileInfo(item, options)); + } + data = array; + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = new InternalListFilesResponseObject(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OpenAIFileInfoCollection(data, @object, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +114,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - OpenAIFileInfoCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIFileInfoCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIFileInfoCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIFileInfoCollection(document.RootElement, options); } default: @@ -54,15 +133,16 @@ OpenAIFileInfoCollection IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIFileInfoCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIFileInfoCollection openAIFileInfoCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIFileInfoCollection(document.RootElement); + return BinaryContent.Create(openAIFileInfoCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIFileInfoCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIFileInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs index c1887f232..1617f0b65 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs @@ -2,13 +2,20 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Files { - public partial class OpenAIFileInfoCollection : ReadOnlyCollection + public partial class OpenAIFileInfoCollection { + private protected IDictionary _additionalBinaryDataProperties; + + internal OpenAIFileInfoCollection(IList data, InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) + { + Data = data; + Object = @object; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFilePurpose.cs b/.dotnet/src/Generated/Models/OpenAIFilePurpose.cs index 71c6cfbf6..103188d86 100644 --- a/.dotnet/src/Generated/Models/OpenAIFilePurpose.cs +++ b/.dotnet/src/Generated/Models/OpenAIFilePurpose.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { public readonly partial struct OpenAIFilePurpose : IEquatable { private readonly string _value; - - public OpenAIFilePurpose(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string AssistantsValue = "assistants"; private const string AssistantsOutputValue = "assistants_output"; private const string BatchValue = "batch"; @@ -24,23 +19,40 @@ public OpenAIFilePurpose(string value) private const string FineTuneResultsValue = "fine-tune-results"; private const string VisionValue = "vision"; + public OpenAIFilePurpose(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static OpenAIFilePurpose Assistants { get; } = new OpenAIFilePurpose(AssistantsValue); + public static OpenAIFilePurpose AssistantsOutput { get; } = new OpenAIFilePurpose(AssistantsOutputValue); + public static OpenAIFilePurpose Batch { get; } = new OpenAIFilePurpose(BatchValue); + public static OpenAIFilePurpose BatchOutput { get; } = new OpenAIFilePurpose(BatchOutputValue); + public static OpenAIFilePurpose FineTune { get; } = new OpenAIFilePurpose(FineTuneValue); + public static OpenAIFilePurpose FineTuneResults { get; } = new OpenAIFilePurpose(FineTuneResultsValue); + public static OpenAIFilePurpose Vision { get; } = new OpenAIFilePurpose(VisionValue); + public static bool operator ==(OpenAIFilePurpose left, OpenAIFilePurpose right) => left.Equals(right); + public static bool operator !=(OpenAIFilePurpose left, OpenAIFilePurpose right) => !left.Equals(right); + public static implicit operator OpenAIFilePurpose(string value) => new OpenAIFilePurpose(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is OpenAIFilePurpose other && Equals(other); + public bool Equals(OpenAIFilePurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileStatus.cs b/.dotnet/src/Generated/Models/OpenAIFileStatus.cs index 9176c8618..6ae4b9db1 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileStatus.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileStatus.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Files { public readonly partial struct OpenAIFileStatus : IEquatable { private readonly string _value; + private const string UploadedValue = "uploaded"; + private const string ProcessedValue = "processed"; + private const string ErrorValue = "error"; public OpenAIFileStatus(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string UploadedValue = "uploaded"; - private const string ProcessedValue = "processed"; - private const string ErrorValue = "error"; + _value = value; + } public static OpenAIFileStatus Uploaded { get; } = new OpenAIFileStatus(UploadedValue); + public static OpenAIFileStatus Processed { get; } = new OpenAIFileStatus(ProcessedValue); + public static OpenAIFileStatus Error { get; } = new OpenAIFileStatus(ErrorValue); + public static bool operator ==(OpenAIFileStatus left, OpenAIFileStatus right) => left.Equals(right); + public static bool operator !=(OpenAIFileStatus left, OpenAIFileStatus right) => !left.Equals(right); + public static implicit operator OpenAIFileStatus(string value) => new OpenAIFileStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is OpenAIFileStatus other && Equals(other); + public bool Equals(OpenAIFileStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs index 575c7e962..c3adeaedb 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs @@ -7,51 +7,45 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Models { public partial class OpenAIModelInfo : IJsonModel { + internal OpenAIModelInfo() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIModelInfo)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("owned_by"u8); + writer.WriteStringValue(OwnedBy); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("owned_by") != true) - { - writer.WritePropertyName("owned_by"u8); - writer.WriteStringValue(OwnedBy); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,25 +54,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } - OpenAIModelInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIModelInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIModelInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIModelInfo)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIModelInfo(document.RootElement, options); } - internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -87,44 +79,42 @@ internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, DateTimeOffset created = default; InternalModelObject @object = default; string ownedBy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("created"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalModelObject(property.Value.GetString()); + @object = new InternalModelObject(prop.Value.GetString()); continue; } - if (property.NameEquals("owned_by"u8)) + if (prop.NameEquals("owned_by"u8)) { - ownedBy = property.Value.GetString(); + ownedBy = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIModelInfo(id, created, @object, ownedBy, serializedAdditionalRawData); + return new OpenAIModelInfo(id, created, @object, ownedBy, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +124,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - OpenAIModelInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIModelInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIModelInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIModelInfo(document.RootElement, options); } default: @@ -152,15 +143,16 @@ OpenAIModelInfo IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIModelInfo FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIModelInfo openAIModelInfo) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIModelInfo(document.RootElement); + return BinaryContent.Create(openAIModelInfo, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIModelInfo(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIModelInfo(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfo.cs b/.dotnet/src/Generated/Models/OpenAIModelInfo.cs index c838e75ab..ee9379975 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfo.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfo.cs @@ -9,32 +9,26 @@ namespace OpenAI.Models { public partial class OpenAIModelInfo { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal OpenAIModelInfo(string id, DateTimeOffset createdAt, string ownedBy) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(ownedBy, nameof(ownedBy)); + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIModelInfo(string id, DateTimeOffset created, string ownedBy) + { Id = id; - CreatedAt = createdAt; + Created = created; OwnedBy = ownedBy; } - internal OpenAIModelInfo(string id, DateTimeOffset createdAt, InternalModelObject @object, string ownedBy, IDictionary serializedAdditionalRawData) + internal OpenAIModelInfo(string id, DateTimeOffset created, InternalModelObject @object, string ownedBy, IDictionary additionalBinaryDataProperties) { Id = id; - CreatedAt = createdAt; + Created = created; Object = @object; OwnedBy = ownedBy; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal OpenAIModelInfo() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; } + public string Id { get; set; } - public string OwnedBy { get; } + public string OwnedBy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs index f9790a97a..d15d307e4 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs @@ -5,28 +5,106 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Models { public partial class OpenAIModelInfoCollection : IJsonModel { - OpenAIModelInfoCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + OpenAIModelInfoCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIModelInfoCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIModelInfoCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + internal static OpenAIModelInfoCollection DeserializeOpenAIModelInfoCollection(JsonElement element, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalListModelsResponseObject @object = default; + IList data = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("object"u8)) + { + @object = new InternalListModelsResponseObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(OpenAIModelInfo.DeserializeOpenAIModelInfo(item, options)); + } + data = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OpenAIModelInfoCollection(@object, data, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,15 +114,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - OpenAIModelInfoCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIModelInfoCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIModelInfoCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIModelInfoCollection(document.RootElement, options); } default: @@ -54,15 +133,16 @@ OpenAIModelInfoCollection IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIModelInfoCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIModelInfoCollection openAIModelInfoCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIModelInfoCollection(document.RootElement); + return BinaryContent.Create(openAIModelInfoCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIModelInfoCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIModelInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs index f917c20de..09239bfd7 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs @@ -2,13 +2,20 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Models { - public partial class OpenAIModelInfoCollection : ReadOnlyCollection + public partial class OpenAIModelInfoCollection { + private protected IDictionary _additionalBinaryDataProperties; + + internal OpenAIModelInfoCollection(InternalListModelsResponseObject @object, IList data, IDictionary additionalBinaryDataProperties) + { + Object = @object; + Data = data; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/RunCollectionOrder.cs b/.dotnet/src/Generated/Models/RunCollectionOrder.cs index ee88afced..530d05e99 100644 --- a/.dotnet/src/Generated/Models/RunCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/RunCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public RunCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right) => left.Equals(right); + public static bool operator !=(RunCollectionOrder left, RunCollectionOrder right) => !left.Equals(right); + public static implicit operator RunCollectionOrder(string value) => new RunCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunCollectionOrder other && Equals(other); + public bool Equals(RunCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 2c0dc45c8..64c919c13 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,43 +15,45 @@ public partial class RunCreationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) - { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(ModelOverride)) + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + if (Optional.IsDefined(Model)) { - if (ModelOverride != null) + if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(ModelOverride); + writer.WriteStringValue(Model.Value.ToString()); } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(InstructionsOverride)) + if (Optional.IsDefined(Instructions)) { - if (InstructionsOverride != null) + if (Instructions != null) { writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(InstructionsOverride); + writer.WriteStringValue(Instructions); } else { - writer.WriteNull("instructions"); + writer.WriteNull("instructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("additional_instructions") != true && Optional.IsDefined(AdditionalInstructions)) + if (Optional.IsDefined(AdditionalInstructions)) { if (AdditionalInstructions != null) { @@ -59,16 +62,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("additional_instructions"); + writer.WriteNull("additionalInstructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("additional_messages") != true && Optional.IsCollectionDefined(InternalMessages)) + if (Optional.IsCollectionDefined(AdditionalMessages)) { - if (InternalMessages != null) + if (AdditionalMessages != null) { writer.WritePropertyName("additional_messages"u8); writer.WriteStartArray(); - foreach (var item in InternalMessages) + foreach (var item in AdditionalMessages) { writer.WriteObjectValue(item, options); } @@ -76,16 +79,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("additional_messages"); + writer.WriteNull("additionalMessages"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(ToolsOverride)) + if (Optional.IsCollectionDefined(Tools)) { - if (ToolsOverride != null) + if (Tools != null) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in ToolsOverride) + foreach (var item in Tools) { writer.WriteObjectValue(item, options); } @@ -93,10 +96,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("tools"); + writer.WriteNull("tools"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -105,16 +108,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -123,22 +131,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(TopP)) { - if (NucleusSamplingFactor != null) + if (TopP != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream)) { if (Stream != null) { @@ -147,10 +155,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("stream"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_prompt_tokens") != true && Optional.IsDefined(MaxPromptTokens)) + if (Optional.IsDefined(MaxPromptTokens)) { if (MaxPromptTokens != null) { @@ -159,10 +167,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("max_prompt_tokens"); + writer.WriteNull("maxPromptTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true && Optional.IsDefined(MaxCompletionTokens)) + if (Optional.IsDefined(MaxCompletionTokens)) { if (MaxCompletionTokens != null) { @@ -171,10 +179,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("max_completion_tokens"); + writer.WriteNull("maxCompletionTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("truncation_strategy") != true && Optional.IsDefined(TruncationStrategy)) + if (Optional.IsDefined(TruncationStrategy)) { if (TruncationStrategy != null) { @@ -183,49 +191,59 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("truncation_strategy"); + writer.WriteNull("truncationStrategy"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolConstraint)) + if (Optional.IsDefined(ToolChoice)) { - if (ToolConstraint != null) + if (ToolChoice != null) { writer.WritePropertyName("tool_choice"u8); - SerializeToolConstraint(writer, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("tool_choice"); + writer.WriteNull("toolChoice"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(ParallelToolCallsEnabled)) + if (Optional.IsDefined(ParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); + writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -234,31 +252,29 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - RunCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunCreationOptions(document.RootElement, options); } - internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string assistantId = default; - string model = default; + InternalCreateRunRequestModel? model = default; string instructions = default; string additionalInstructions = default; IList additionalMessages = default; @@ -270,186 +286,191 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele int? maxPromptTokens = default; int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - ToolConstraint toolChoice = default; + BinaryData toolChoice = default; bool? parallelToolCalls = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { model = null; continue; } - model = property.Value.GetString(); + model = new InternalCreateRunRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { instructions = null; continue; } - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("additional_instructions"u8)) + if (prop.NameEquals("additional_instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { additionalInstructions = null; continue; } - additionalInstructions = property.Value.GetString(); + additionalInstructions = prop.Value.GetString(); continue; } - if (property.NameEquals("additional_messages"u8)) + if (prop.NameEquals("additional_messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } additionalMessages = array; continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { stream = null; continue; } - stream = property.Value.GetBoolean(); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("max_prompt_tokens"u8)) + if (prop.NameEquals("max_prompt_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxPromptTokens = null; continue; } - maxPromptTokens = property.Value.GetInt32(); + maxPromptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxCompletionTokens = null; continue; } - maxCompletionTokens = property.Value.GetInt32(); + maxCompletionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("truncation_strategy"u8)) + if (prop.NameEquals("truncation_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { truncationStrategy = null; continue; } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(property.Value, options); + truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolChoice = null; continue; } - toolChoice = Assistants.ToolConstraint.DeserializeToolConstraint(property.Value, options); + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + parallelToolCalls = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new RunCreationOptions( assistantId, model, @@ -467,13 +488,14 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele toolChoice, parallelToolCalls, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -483,15 +505,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - RunCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunCreationOptions(document.RootElement, options); } default: @@ -501,15 +524,16 @@ RunCreationOptions IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunCreationOptions runCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunCreationOptions(document.RootElement); + return BinaryContent.Create(runCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index 9e0d88fa7..b81192ee9 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -9,27 +9,27 @@ namespace OpenAI.Assistants { public partial class RunCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? parallelToolCallsEnabled, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal RunCreationOptions(string assistantId, InternalCreateRunRequestModel? model, string instructions, string additionalInstructions, IList additionalMessages, IList tools, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool? parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; - ModelOverride = modelOverride; - InstructionsOverride = instructionsOverride; + Model = model; + Instructions = instructions; AdditionalInstructions = additionalInstructions; - InternalMessages = internalMessages; - ToolsOverride = toolsOverride; + AdditionalMessages = additionalMessages; + Tools = tools; Metadata = metadata; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; + TopP = topP; Stream = stream; MaxPromptTokens = maxPromptTokens; MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; - ToolConstraint = toolConstraint; - ParallelToolCallsEnabled = parallelToolCallsEnabled; + ToolChoice = toolChoice; + ParallelToolCalls = parallelToolCalls; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index df0a592e1..a6bd6342f 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunError : IJsonModel { + internal RunError() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - RunError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunError(document.RootElement, options); } - internal static RunError DeserializeRunError(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunError DeserializeRunError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } RunErrorCode code = default; string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = new RunErrorCode(property.Value.GetString()); + code = new RunErrorCode(prop.Value.GetString()); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunError(code, message, serializedAdditionalRawData); + return new RunError(code, message, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - RunError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunError(document.RootElement, options); } default: @@ -130,15 +127,16 @@ RunError IPersistableModel.Create(BinaryData data, ModelReaderWriterOp string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunError runError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunError(document.RootElement); + return BinaryContent.Create(runError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunError.cs b/.dotnet/src/Generated/Models/RunError.cs index 8404fbbe2..e5aff9203 100644 --- a/.dotnet/src/Generated/Models/RunError.cs +++ b/.dotnet/src/Generated/Models/RunError.cs @@ -9,27 +9,23 @@ namespace OpenAI.Assistants { public partial class RunError { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunError(RunErrorCode code, string message) { - Argument.AssertNotNull(message, nameof(message)); - Code = code; Message = message; } - internal RunError(RunErrorCode code, string message, IDictionary serializedAdditionalRawData) + internal RunError(RunErrorCode code, string message, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunError() - { - } + public RunErrorCode Code { get; set; } - public RunErrorCode Code { get; } - public string Message { get; } + public string Message { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunErrorCode.cs b/.dotnet/src/Generated/Models/RunErrorCode.cs index 815942d5e..64c452f85 100644 --- a/.dotnet/src/Generated/Models/RunErrorCode.cs +++ b/.dotnet/src/Generated/Models/RunErrorCode.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunErrorCode : IEquatable { private readonly string _value; + private const string ServerErrorValue = "server_error"; + private const string RateLimitExceededValue = "rate_limit_exceeded"; + private const string InvalidPromptValue = "invalid_prompt"; public RunErrorCode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ServerErrorValue = "server_error"; - private const string RateLimitExceededValue = "rate_limit_exceeded"; - private const string InvalidPromptValue = "invalid_prompt"; + _value = value; + } public static RunErrorCode ServerError { get; } = new RunErrorCode(ServerErrorValue); + public static RunErrorCode RateLimitExceeded { get; } = new RunErrorCode(RateLimitExceededValue); + public static RunErrorCode InvalidPrompt { get; } = new RunErrorCode(InvalidPromptValue); + public static bool operator ==(RunErrorCode left, RunErrorCode right) => left.Equals(right); + public static bool operator !=(RunErrorCode left, RunErrorCode right) => !left.Equals(right); + public static implicit operator RunErrorCode(string value) => new RunErrorCode(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunErrorCode other && Equals(other); + public bool Equals(RunErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs index 097376a17..2db25a483 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,29 +15,30 @@ public partial class RunIncompleteDetails : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunIncompleteDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reason") != true && Optional.IsDefined(Reason)) + if (Optional.IsDefined(Reason)) { writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.Value.ToString()); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,57 +47,54 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } - RunIncompleteDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunIncompleteDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunIncompleteDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunIncompleteDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunIncompleteDetails(document.RootElement, options); } - internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } RunIncompleteReason? reason = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("reason"u8)) + if (prop.NameEquals("reason"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + reason = null; continue; } - reason = new RunIncompleteReason(property.Value.GetString()); + reason = new RunIncompleteReason(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunIncompleteDetails(reason, serializedAdditionalRawData); + return new RunIncompleteDetails(reason, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +104,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - RunIncompleteDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunIncompleteDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunIncompleteDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunIncompleteDetails(document.RootElement, options); } default: @@ -123,15 +123,16 @@ RunIncompleteDetails IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunIncompleteDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunIncompleteDetails runIncompleteDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunIncompleteDetails(document.RootElement); + return BinaryContent.Create(runIncompleteDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunIncompleteDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunIncompleteDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs index 5c063d7c0..1497fff39 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs @@ -9,17 +9,18 @@ namespace OpenAI.Assistants { public partial class RunIncompleteDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunIncompleteDetails() { } - internal RunIncompleteDetails(RunIncompleteReason? reason, IDictionary serializedAdditionalRawData) + internal RunIncompleteDetails(RunIncompleteReason? reason, IDictionary additionalBinaryDataProperties) { Reason = reason; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public RunIncompleteReason? Reason { get; } + public RunIncompleteReason? Reason { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunIncompleteReason.cs b/.dotnet/src/Generated/Models/RunIncompleteReason.cs index b0baa9e8e..c603d0bd9 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteReason.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteReason.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunIncompleteReason : IEquatable { private readonly string _value; + private const string MaxCompletionTokensValue = "max_completion_tokens"; + private const string MaxPromptTokensValue = "max_prompt_tokens"; public RunIncompleteReason(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string MaxCompletionTokensValue = "max_completion_tokens"; - private const string MaxPromptTokensValue = "max_prompt_tokens"; + _value = value; + } public static RunIncompleteReason MaxCompletionTokens { get; } = new RunIncompleteReason(MaxCompletionTokensValue); + public static RunIncompleteReason MaxPromptTokens { get; } = new RunIncompleteReason(MaxPromptTokensValue); + public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right) => left.Equals(right); + public static bool operator !=(RunIncompleteReason left, RunIncompleteReason right) => !left.Equals(right); + public static implicit operator RunIncompleteReason(string value) => new RunIncompleteReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunIncompleteReason other && Equals(other); + public bool Equals(RunIncompleteReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs index f13f9b1a8..2648a5a22 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,14 +15,19 @@ public partial class RunModificationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunModificationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -30,26 +36,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -58,62 +65,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } - RunModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunModificationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunModificationOptions(document.RootElement, options); } - internal static RunModificationOptions DeserializeRunModificationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunModificationOptions DeserializeRunModificationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunModificationOptions(metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new RunModificationOptions(metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +133,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - RunModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunModificationOptions(document.RootElement, options); } default: @@ -141,15 +152,16 @@ RunModificationOptions IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunModificationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunModificationOptions runModificationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunModificationOptions(document.RootElement); + return BinaryContent.Create(runModificationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunModificationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunModificationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.cs b/.dotnet/src/Generated/Models/RunModificationOptions.cs index b9c29be48..e586c02e2 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.cs @@ -4,21 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class RunModificationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public RunModificationOptions() { Metadata = new ChangeTrackingDictionary(); } - internal RunModificationOptions(IDictionary metadata, IDictionary serializedAdditionalRawData) + internal RunModificationOptions(IDictionary metadata, IDictionary additionalBinaryDataProperties) { Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IDictionary Metadata { get; set; } diff --git a/.dotnet/src/Generated/Models/RunStatus.cs b/.dotnet/src/Generated/Models/RunStatus.cs index 08c6af672..319178da1 100644 --- a/.dotnet/src/Generated/Models/RunStatus.cs +++ b/.dotnet/src/Generated/Models/RunStatus.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunStatus : IEquatable { private readonly string _value; - - public RunStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string QueuedValue = "queued"; private const string InProgressValue = "in_progress"; private const string RequiresActionValue = "requires_action"; @@ -26,25 +21,44 @@ public RunStatus(string value) private const string IncompleteValue = "incomplete"; private const string ExpiredValue = "expired"; + public RunStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static RunStatus Queued { get; } = new RunStatus(QueuedValue); + public static RunStatus InProgress { get; } = new RunStatus(InProgressValue); + public static RunStatus RequiresAction { get; } = new RunStatus(RequiresActionValue); + public static RunStatus Cancelling { get; } = new RunStatus(CancellingValue); + public static RunStatus Cancelled { get; } = new RunStatus(CancelledValue); + public static RunStatus Failed { get; } = new RunStatus(FailedValue); + public static RunStatus Completed { get; } = new RunStatus(CompletedValue); + public static RunStatus Incomplete { get; } = new RunStatus(IncompleteValue); + public static RunStatus Expired { get; } = new RunStatus(ExpiredValue); + public static bool operator ==(RunStatus left, RunStatus right) => left.Equals(right); + public static bool operator !=(RunStatus left, RunStatus right) => !left.Equals(right); + public static implicit operator RunStatus(string value) => new RunStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunStatus other && Equals(other); + public bool Equals(RunStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index c31d89f57..b99bf3500 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -7,166 +7,129 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStep : IJsonModel { + internal RunStep() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStep)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); + writer.WritePropertyName("run_id"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("step_details"u8); + writer.WriteObjectValue(StepDetails, options); + if (LastError != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("lastError"u8); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + if (ExpiredAt != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("expired_at"u8); + writer.WriteNumberValue(ExpiredAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) + else { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteNull("expiredAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("thread_id") != true) + if (CancelledAt != null) { - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); + writer.WritePropertyName("cancelled_at"u8); + writer.WriteNumberValue(CancelledAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("run_id") != true) + else { - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); + writer.WriteNull("cancelledAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (FailedAt != null) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("failed_at"u8); + writer.WriteNumberValue(FailedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + else { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteNull("failedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("step_details") != true) + if (CompletedAt != null) { - writer.WritePropertyName("step_details"u8); - writer.WriteObjectValue(Details, options); + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("last_error") != true) + else { - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } + writer.WriteNull("completedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("expired_at") != true) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (ExpiredAt != null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("expired_at"u8); - writer.WriteNumberValue(ExpiredAt.Value, "U"); - } - else - { - writer.WriteNull("expired_at"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("cancelled_at") != true) - { - if (CancelledAt != null) - { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); - } - else - { - writer.WriteNull("cancelled_at"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("failed_at") != true) - { - if (FailedAt != null) - { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); - } - else - { - writer.WriteNull("failed_at"); + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); } - if (SerializedAdditionalRawData?.ContainsKey("completed_at") != true) + else { - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } + writer.WriteNull("metadata"u8); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + if (Usage != null) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true) + else { - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - else - { - writer.WriteNull("usage"); - } + writer.WriteNull("usage"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -175,25 +138,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } - RunStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStep JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStep)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStep(document.RootElement, options); } - internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -204,7 +165,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite string assistantId = default; string threadId = default; string runId = default; - RunStepType type = default; + RunStepType @type = default; RunStepStatus status = default; RunStepDetails stepDetails = default; RunStepError lastError = default; @@ -212,139 +173,143 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite DateTimeOffset? cancelledAt = default; DateTimeOffset? failedAt = default; DateTimeOffset? completedAt = default; - IReadOnlyDictionary metadata = default; + IDictionary metadata = default; RunStepTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalRunStepObjectObject(property.Value.GetString()); + @object = new InternalRunStepObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("thread_id"u8)) + if (prop.NameEquals("thread_id"u8)) { - threadId = property.Value.GetString(); + threadId = prop.Value.GetString(); continue; } - if (property.NameEquals("run_id"u8)) + if (prop.NameEquals("run_id"u8)) { - runId = property.Value.GetString(); + runId = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new RunStepType(property.Value.GetString()); + @type = new RunStepType(prop.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new RunStepStatus(property.Value.GetString()); + status = new RunStepStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("step_details"u8)) + if (prop.NameEquals("step_details"u8)) { - stepDetails = RunStepDetails.DeserializeRunStepDetails(property.Value, options); + stepDetails = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); continue; } - if (property.NameEquals("last_error"u8)) + if (prop.NameEquals("last_error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastError = null; continue; } - lastError = RunStepError.DeserializeRunStepError(property.Value, options); + lastError = RunStepError.DeserializeRunStepError(prop.Value, options); continue; } - if (property.NameEquals("expired_at"u8)) + if (prop.NameEquals("expired_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { expiredAt = null; continue; } - expiredAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiredAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("cancelled_at"u8)) + if (prop.NameEquals("cancelled_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { cancelledAt = null; continue; } - cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("failed_at"u8)) + if (prop.NameEquals("failed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { failedAt = null; continue; } - failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + failedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("completed_at"u8)) + if (prop.NameEquals("completed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { completedAt = null; continue; } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { usage = null; continue; } - usage = RunStepTokenUsage.DeserializeRunStepTokenUsage(property.Value, options); + usage = RunStepTokenUsage.DeserializeRunStepTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new RunStep( id, @object, @@ -352,7 +317,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite assistantId, threadId, runId, - type, + @type, status, stepDetails, lastError, @@ -362,13 +327,14 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite completedAt, metadata, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -378,15 +344,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - RunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStep PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStep(document.RootElement, options); } default: @@ -396,15 +363,16 @@ RunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOpti string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStep FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStep runStep) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStep(document.RootElement); + return BinaryContent.Create(runStep, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStep(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStep(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index e6d00c191..00baad621 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -9,23 +9,18 @@ namespace OpenAI.Assistants { public partial class RunStep { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType type, RunStepStatus status, RunStepDetails details, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IReadOnlyDictionary metadata, RunStepTokenUsage usage) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(runId, nameof(runId)); - Argument.AssertNotNull(details, nameof(details)); + private protected IDictionary _additionalBinaryDataProperties; + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage) + { Id = id; CreatedAt = createdAt; AssistantId = assistantId; ThreadId = threadId; RunId = runId; - Type = type; + Type = @type; Status = status; - Details = details; + StepDetails = stepDetails; LastError = lastError; ExpiredAt = expiredAt; CancelledAt = cancelledAt; @@ -35,7 +30,7 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string Usage = usage; } - internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType type, RunStepStatus status, RunStepDetails details, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IReadOnlyDictionary metadata, RunStepTokenUsage usage, IDictionary serializedAdditionalRawData) + internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -43,9 +38,9 @@ internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset AssistantId = assistantId; ThreadId = threadId; RunId = runId; - Type = type; + Type = @type; Status = status; - Details = details; + StepDetails = stepDetails; LastError = lastError; ExpiredAt = expiredAt; CancelledAt = cancelledAt; @@ -53,27 +48,35 @@ internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset CompletedAt = completedAt; Metadata = metadata; Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunStep() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string AssistantId { get; set; } + + public string ThreadId { get; set; } + + public string RunId { get; set; } + + public RunStepType Type { get; set; } + + public RunStepStatus Status { get; set; } + + public RunStepError LastError { get; set; } + + public DateTimeOffset? ExpiredAt { get; set; } + + public DateTimeOffset? CancelledAt { get; set; } + + public DateTimeOffset? FailedAt { get; set; } + + public DateTimeOffset? CompletedAt { get; set; } + + public IDictionary Metadata { get; set; } - public string Id { get; } - - public DateTimeOffset CreatedAt { get; } - public string AssistantId { get; } - public string ThreadId { get; } - public string RunId { get; } - public RunStepType Type { get; } - public RunStepStatus Status { get; } - public RunStepError LastError { get; } - public DateTimeOffset? ExpiredAt { get; } - public DateTimeOffset? CancelledAt { get; } - public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? CompletedAt { get; } - public IReadOnlyDictionary Metadata { get; } - public RunStepTokenUsage Usage { get; } + public RunStepTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index f7ef07662..817f54871 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject))] - public partial class RunStepCodeInterpreterOutput : IJsonModel + public abstract partial class RunStepCodeInterpreterOutput : IJsonModel { + internal RunStepCodeInterpreterOutput() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepCodeInterpreterOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepCodeInterpreterOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepCodeInterpreterOutput(document.RootElement, options); } - internal static RunStepCodeInterpreterOutput DeserializeRunStepCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepCodeInterpreterOutput DeserializeRunStepCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "image": return InternalRunStepDetailsToolCallsCodeOutputImageObject.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(element, options); - case "logs": return InternalRunStepCodeInterpreterLogOutput.DeserializeInternalRunStepCodeInterpreterLogOutput(element, options); + case "logs": + return InternalRunStepCodeInterpreterLogOutput.DeserializeInternalRunStepCodeInterpreterLogOutput(element, options); + case "image": + return InternalRunStepDetailsToolCallsCodeOutputImageObject.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObject(element, options); } } return UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.DeserializeUnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepCodeInterpreterOutput(document.RootElement, options); } default: @@ -110,15 +115,16 @@ RunStepCodeInterpreterOutput IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepCodeInterpreterOutput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepCodeInterpreterOutput runStepCodeInterpreterOutput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepCodeInterpreterOutput(document.RootElement); + return BinaryContent.Create(runStepCodeInterpreterOutput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepCodeInterpreterOutput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepCodeInterpreterOutput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs index 1419ce55c..d95c70275 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { public abstract partial class RunStepCodeInterpreterOutput { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected RunStepCodeInterpreterOutput() + private protected IDictionary _additionalBinaryDataProperties; + + private protected RunStepCodeInterpreterOutput(string @type) { + Type = @type; } - internal RunStepCodeInterpreterOutput(string type, IDictionary serializedAdditionalRawData) + internal RunStepCodeInterpreterOutput(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs b/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs index a818d310b..7b173e278 100644 --- a/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunStepCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public RunStepCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right) => left.Equals(right); + public static bool operator !=(RunStepCollectionOrder left, RunStepCollectionOrder right) => !left.Equals(right); + public static implicit operator RunStepCollectionOrder(string value) => new RunStepCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunStepCollectionOrder other && Equals(other); + public bool Equals(RunStepCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index 35e15ea14..ad2445caf 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepObjectStepDetails))] - public partial class RunStepDetails : IJsonModel + public abstract partial class RunStepDetails : IJsonModel { + internal RunStepDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepDetails(document.RootElement, options); } - internal static RunStepDetails DeserializeRunStepDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepDetails DeserializeRunStepDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "message_creation": return InternalRunStepDetailsMessageCreationObject.DeserializeInternalRunStepDetailsMessageCreationObject(element, options); - case "tool_calls": return InternalRunStepDetailsToolCallsObject.DeserializeInternalRunStepDetailsToolCallsObject(element, options); + case "message_creation": + return InternalRunStepDetailsMessageCreationObject.DeserializeInternalRunStepDetailsMessageCreationObject(element, options); + case "tool_calls": + return InternalRunStepDetailsToolCallsObject.DeserializeInternalRunStepDetailsToolCallsObject(element, options); } } return UnknownRunStepObjectStepDetails.DeserializeUnknownRunStepObjectStepDetails(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepDetails(document.RootElement, options); } default: @@ -110,15 +115,16 @@ RunStepDetails IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepDetails runStepDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepDetails(document.RootElement); + return BinaryContent.Create(runStepDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepDetails.cs b/.dotnet/src/Generated/Models/RunStepDetails.cs index 29a98a672..c8a2f52d4 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { public abstract partial class RunStepDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected RunStepDetails() + private protected IDictionary _additionalBinaryDataProperties; + + private protected RunStepDetails(string @type) { + Type = @type; } - internal RunStepDetails(string type, IDictionary serializedAdditionalRawData) + internal RunStepDetails(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index 2e84d4c87..8b7210ef4 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStepError : IJsonModel { + internal RunStepError() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } - RunStepError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepError(document.RootElement, options); } - internal static RunStepError DeserializeRunStepError(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepError DeserializeRunStepError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } RunStepErrorCode code = default; string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = new RunStepErrorCode(property.Value.GetString()); + code = new RunStepErrorCode(prop.Value.GetString()); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepError(code, message, serializedAdditionalRawData); + return new RunStepError(code, message, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions option } } - RunStepError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepError(document.RootElement, options); } default: @@ -130,15 +127,16 @@ RunStepError IPersistableModel.Create(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepError runStepError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepError(document.RootElement); + return BinaryContent.Create(runStepError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepError.cs b/.dotnet/src/Generated/Models/RunStepError.cs index 780003cbb..2776c4682 100644 --- a/.dotnet/src/Generated/Models/RunStepError.cs +++ b/.dotnet/src/Generated/Models/RunStepError.cs @@ -9,27 +9,23 @@ namespace OpenAI.Assistants { public partial class RunStepError { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunStepError(RunStepErrorCode code, string message) { - Argument.AssertNotNull(message, nameof(message)); - Code = code; Message = message; } - internal RunStepError(RunStepErrorCode code, string message, IDictionary serializedAdditionalRawData) + internal RunStepError(RunStepErrorCode code, string message, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunStepError() - { - } + public RunStepErrorCode Code { get; set; } - public RunStepErrorCode Code { get; } - public string Message { get; } + public string Message { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunStepErrorCode.cs b/.dotnet/src/Generated/Models/RunStepErrorCode.cs index 3feed9ad8..3d42926c7 100644 --- a/.dotnet/src/Generated/Models/RunStepErrorCode.cs +++ b/.dotnet/src/Generated/Models/RunStepErrorCode.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunStepErrorCode : IEquatable { private readonly string _value; + private const string ServerErrorValue = "server_error"; + private const string RateLimitExceededValue = "rate_limit_exceeded"; public RunStepErrorCode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ServerErrorValue = "server_error"; - private const string RateLimitExceededValue = "rate_limit_exceeded"; + _value = value; + } public static RunStepErrorCode ServerError { get; } = new RunStepErrorCode(ServerErrorValue); + public static RunStepErrorCode RateLimitExceeded { get; } = new RunStepErrorCode(RateLimitExceededValue); + public static bool operator ==(RunStepErrorCode left, RunStepErrorCode right) => left.Equals(right); + public static bool operator !=(RunStepErrorCode left, RunStepErrorCode right) => !left.Equals(right); + public static implicit operator RunStepErrorCode(string value) => new RunStepErrorCode(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunStepErrorCode other && Equals(other); + public bool Equals(RunStepErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index 2bd5b0e7f..dafc695d6 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -7,36 +7,37 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStepFileSearchResult : IJsonModel { + internal RunStepFileSearchResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepFileSearchResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (SerializedAdditionalRawData?.ContainsKey("file_name") != true) - { - writer.WritePropertyName("file_name"u8); - writer.WriteStringValue(FileName); - } - if (SerializedAdditionalRawData?.ContainsKey("score") != true) - { - writer.WritePropertyName("score"u8); - writer.WriteNumberValue(Score); - } - if (SerializedAdditionalRawData?.ContainsKey("content") != true && Optional.IsCollectionDefined(Content)) + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + writer.WritePropertyName("file_name"u8); + writer.WriteStringValue(FileName); + writer.WritePropertyName("score"u8); + writer.WriteNumberValue(Score); + if (Optional.IsCollectionDefined(Content)) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -46,17 +47,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -65,25 +62,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - RunStepFileSearchResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepFileSearchResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepFileSearchResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepFileSearchResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepFileSearchResult(document.RootElement, options); } - internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -91,54 +86,52 @@ internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonE string fileId = default; string fileName = default; float score = default; - IReadOnlyList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList content = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_id"u8)) + if (prop.NameEquals("file_id"u8)) { - fileId = property.Value.GetString(); + fileId = prop.Value.GetString(); continue; } - if (property.NameEquals("file_name"u8)) + if (prop.NameEquals("file_name"u8)) { - fileName = property.Value.GetString(); + fileName = prop.Value.GetString(); continue; } - if (property.NameEquals("score"u8)) + if (prop.NameEquals("score"u8)) { - score = property.Value.GetSingle(); + score = prop.Value.GetSingle(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalRunStepDetailsToolCallsFileSearchResultObjectContent.DeserializeInternalRunStepDetailsToolCallsFileSearchResultObjectContent(item, options)); } content = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepFileSearchResult(fileId, fileName, score, content ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new RunStepFileSearchResult(fileId, fileName, score, content ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -148,15 +141,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - RunStepFileSearchResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepFileSearchResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepFileSearchResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepFileSearchResult(document.RootElement, options); } default: @@ -166,15 +160,16 @@ RunStepFileSearchResult IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepFileSearchResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepFileSearchResult runStepFileSearchResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepFileSearchResult(document.RootElement); + return BinaryContent.Create(runStepFileSearchResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepFileSearchResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepFileSearchResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs index 02e968dbd..4ee10b25c 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs @@ -4,38 +4,35 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStepFileSearchResult { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunStepFileSearchResult(string fileId, string fileName, float score) { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(fileName, nameof(fileName)); - FileId = fileId; FileName = fileName; Score = score; Content = new ChangeTrackingList(); } - internal RunStepFileSearchResult(string fileId, string fileName, float score, IReadOnlyList content, IDictionary serializedAdditionalRawData) + internal RunStepFileSearchResult(string fileId, string fileName, float score, IList content, IDictionary additionalBinaryDataProperties) { FileId = fileId; FileName = fileName; Score = score; Content = content; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunStepFileSearchResult() - { - } + public string FileId { get; set; } + + public string FileName { get; set; } - public string FileId { get; } - public string FileName { get; } - public float Score { get; } + public float Score { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunStepStatus.cs b/.dotnet/src/Generated/Models/RunStepStatus.cs index b328305d0..31ce7d2bc 100644 --- a/.dotnet/src/Generated/Models/RunStepStatus.cs +++ b/.dotnet/src/Generated/Models/RunStepStatus.cs @@ -4,39 +4,49 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunStepStatus : IEquatable { private readonly string _value; - - public RunStepStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string InProgressValue = "in_progress"; private const string CancelledValue = "cancelled"; private const string FailedValue = "failed"; private const string CompletedValue = "completed"; private const string ExpiredValue = "expired"; + public RunStepStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static RunStepStatus InProgress { get; } = new RunStepStatus(InProgressValue); + public static RunStepStatus Cancelled { get; } = new RunStepStatus(CancelledValue); + public static RunStepStatus Failed { get; } = new RunStepStatus(FailedValue); + public static RunStepStatus Completed { get; } = new RunStepStatus(CompletedValue); + public static RunStepStatus Expired { get; } = new RunStepStatus(ExpiredValue); + public static bool operator ==(RunStepStatus left, RunStepStatus right) => left.Equals(right); + public static bool operator !=(RunStepStatus left, RunStepStatus right) => !left.Equals(right); + public static implicit operator RunStepStatus(string value) => new RunStepStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunStepStatus other && Equals(other); + public bool Equals(RunStepStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index eed20e75e..f1b69d104 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStepTokenUsage : IJsonModel { + internal RunStepTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } - RunStepTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepTokenUsage(document.RootElement, options); } - internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement eleme int completionTokens = default; int promptTokens = default; int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + completionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + promptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData); + return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - RunStepTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepTokenUsage(document.RootElement, options); } default: @@ -141,15 +135,16 @@ RunStepTokenUsage IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepTokenUsage runStepTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepTokenUsage(document.RootElement); + return BinaryContent.Create(runStepTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs index 3e1e81939..388bc0eee 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs @@ -9,7 +9,8 @@ namespace OpenAI.Assistants { public partial class RunStepTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunStepTokenUsage(int completionTokens, int promptTokens, int totalTokens) { CompletionTokens = completionTokens; @@ -17,20 +18,18 @@ internal RunStepTokenUsage(int completionTokens, int promptTokens, int totalToke TotalTokens = totalTokens; } - internal RunStepTokenUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary serializedAdditionalRawData) + internal RunStepTokenUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary additionalBinaryDataProperties) { CompletionTokens = completionTokens; PromptTokens = promptTokens; TotalTokens = totalTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunStepTokenUsage() - { - } + public int CompletionTokens { get; set; } + + public int PromptTokens { get; set; } - public int CompletionTokens { get; } - public int PromptTokens { get; } - public int TotalTokens { get; } + public int TotalTokens { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index 322ca021d..1238416f7 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepDetailsToolCallsObjectToolCallsObject))] - public partial class RunStepToolCall : IJsonModel + public abstract partial class RunStepToolCall : IJsonModel { + internal RunStepToolCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepToolCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,45 +48,47 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } - RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepToolCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepToolCall(document.RootElement, options); } - internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "code_interpreter": return InternalRunStepCodeInterpreterToolCallDetails.DeserializeInternalRunStepCodeInterpreterToolCallDetails(element, options); - case "file_search": return InternalRunStepFileSearchToolCallDetails.DeserializeInternalRunStepFileSearchToolCallDetails(element, options); - case "function": return InternalRunStepFunctionToolCallDetails.DeserializeInternalRunStepFunctionToolCallDetails(element, options); + case "code_interpreter": + return InternalRunStepCodeInterpreterToolCallDetails.DeserializeInternalRunStepCodeInterpreterToolCallDetails(element, options); + case "file_search": + return InternalRunStepFileSearchToolCallDetails.DeserializeInternalRunStepFileSearchToolCallDetails(element, options); + case "function": + return InternalRunStepFunctionToolCallDetails.DeserializeInternalRunStepFunctionToolCallDetails(element, options); } } return UnknownRunStepDetailsToolCallsObjectToolCallsObject.DeserializeUnknownRunStepDetailsToolCallsObjectToolCallsObject(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -93,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepToolCall(document.RootElement, options); } default: @@ -111,15 +117,16 @@ RunStepToolCall IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepToolCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepToolCall runStepToolCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepToolCall(document.RootElement); + return BinaryContent.Create(runStepToolCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepToolCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepToolCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.cs b/.dotnet/src/Generated/Models/RunStepToolCall.cs index 7c21afff2..60766f643 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { public abstract partial class RunStepToolCall { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected RunStepToolCall() + private protected IDictionary _additionalBinaryDataProperties; + + private protected RunStepToolCall(string @type) { + Type = @type; } - internal RunStepToolCall(string type, IDictionary serializedAdditionalRawData) + internal RunStepToolCall(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/RunStepType.cs b/.dotnet/src/Generated/Models/RunStepType.cs index 699bc37a5..ae775cb19 100644 --- a/.dotnet/src/Generated/Models/RunStepType.cs +++ b/.dotnet/src/Generated/Models/RunStepType.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunStepType : IEquatable { private readonly string _value; + private const string MessageCreationValue = "message_creation"; + private const string ToolCallsValue = "tool_calls"; public RunStepType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string MessageCreationValue = "message_creation"; - private const string ToolCallsValue = "tool_calls"; + _value = value; + } public static RunStepType MessageCreation { get; } = new RunStepType(MessageCreationValue); + public static RunStepType ToolCalls { get; } = new RunStepType(ToolCallsValue); + public static bool operator ==(RunStepType left, RunStepType right) => left.Equals(right); + public static bool operator !=(RunStepType left, RunStepType right) => !left.Equals(right); + public static implicit operator RunStepType(string value) => new RunStepType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunStepType other && Equals(other); + public bool Equals(RunStepType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 15407f30d..5a62e5bad 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -6,37 +6,40 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject))] - public partial class RunStepUpdateCodeInterpreterOutput : IJsonModel + public abstract partial class RunStepUpdateCodeInterpreterOutput : IJsonModel { + internal RunStepUpdateCodeInterpreterOutput() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepUpdateCodeInterpreterOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,44 +48,45 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } - RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepUpdateCodeInterpreterOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement, options); } - internal static RunStepUpdateCodeInterpreterOutput DeserializeRunStepUpdateCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepUpdateCodeInterpreterOutput DeserializeRunStepUpdateCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "image": return InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(element, options); - case "logs": return InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(element, options); + case "logs": + return InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(element, options); + case "image": + return InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(element, options); } } return UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.DeserializeUnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -92,15 +96,16 @@ BinaryData IPersistableModel.Write(ModelRead } } - RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement, options); } default: @@ -110,15 +115,16 @@ RunStepUpdateCodeInterpreterOutput IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepUpdateCodeInterpreterOutput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepUpdateCodeInterpreterOutput runStepUpdateCodeInterpreterOutput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement); + return BinaryContent.Create(runStepUpdateCodeInterpreterOutput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepUpdateCodeInterpreterOutput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs index 637332102..e183012ee 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs @@ -9,15 +9,17 @@ namespace OpenAI.Assistants { public abstract partial class RunStepUpdateCodeInterpreterOutput { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected RunStepUpdateCodeInterpreterOutput() + private protected IDictionary _additionalBinaryDataProperties; + + private protected RunStepUpdateCodeInterpreterOutput(string @type) { + Type = @type; } - internal RunStepUpdateCodeInterpreterOutput(string type, IDictionary serializedAdditionalRawData) + internal RunStepUpdateCodeInterpreterOutput(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index 7f50758cc..a0f5dbe81 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunTokenUsage : IJsonModel { + internal RunTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } - RunTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunTokenUsage(document.RootElement, options); } - internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, Mode int completionTokens = default; int promptTokens = default; int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + completionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + promptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData); + return new RunTokenUsage(completionTokens, promptTokens, totalTokens, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio } } - RunTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunTokenUsage(document.RootElement, options); } default: @@ -141,15 +135,16 @@ RunTokenUsage IPersistableModel.Create(BinaryData data, ModelRead string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunTokenUsage runTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunTokenUsage(document.RootElement); + return BinaryContent.Create(runTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.cs b/.dotnet/src/Generated/Models/RunTokenUsage.cs index c961964df..9f4187854 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.cs @@ -9,7 +9,8 @@ namespace OpenAI.Assistants { public partial class RunTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunTokenUsage(int completionTokens, int promptTokens, int totalTokens) { CompletionTokens = completionTokens; @@ -17,20 +18,18 @@ internal RunTokenUsage(int completionTokens, int promptTokens, int totalTokens) TotalTokens = totalTokens; } - internal RunTokenUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary serializedAdditionalRawData) + internal RunTokenUsage(int completionTokens, int promptTokens, int totalTokens, IDictionary additionalBinaryDataProperties) { CompletionTokens = completionTokens; PromptTokens = promptTokens; TotalTokens = totalTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunTokenUsage() - { - } + public int CompletionTokens { get; set; } + + public int PromptTokens { get; set; } - public int CompletionTokens { get; } - public int PromptTokens { get; } - public int TotalTokens { get; } + public int TotalTokens { get; set; } } } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 7aad14eb4..5e4917360 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -7,26 +7,33 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunTruncationStrategy : IJsonModel { + internal RunTruncationStrategy() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTruncationStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("last_messages") != true && Optional.IsDefined(LastMessages)) + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(LastMessages)) { if (LastMessages != null) { @@ -35,20 +42,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("last_messages"); + writer.WriteNull("lastMessages"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -57,64 +60,60 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - RunTruncationStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunTruncationStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunTruncationStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTruncationStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunTruncationStrategy(document.RootElement, options); } - internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalTruncationObjectType type = default; + InternalTruncationObjectType @type = default; int? lastMessages = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalTruncationObjectType(property.Value.GetString()); + @type = new InternalTruncationObjectType(prop.Value.GetString()); continue; } - if (property.NameEquals("last_messages"u8)) + if (prop.NameEquals("last_messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastMessages = null; continue; } - lastMessages = property.Value.GetInt32(); + lastMessages = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunTruncationStrategy(type, lastMessages, serializedAdditionalRawData); + return new RunTruncationStrategy(@type, lastMessages, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -124,15 +123,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - RunTruncationStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunTruncationStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunTruncationStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunTruncationStrategy(document.RootElement, options); } default: @@ -142,15 +142,16 @@ RunTruncationStrategy IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunTruncationStrategy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunTruncationStrategy runTruncationStrategy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunTruncationStrategy(document.RootElement); + return BinaryContent.Create(runTruncationStrategy, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunTruncationStrategy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunTruncationStrategy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs index 3fb0b2da8..a607b9667 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs @@ -9,15 +9,15 @@ namespace OpenAI.Assistants { public partial class RunTruncationStrategy { - internal RunTruncationStrategy(InternalTruncationObjectType type, int? lastMessages, IDictionary serializedAdditionalRawData) + private protected IDictionary _additionalBinaryDataProperties; + + internal RunTruncationStrategy(InternalTruncationObjectType @type, int? lastMessages, IDictionary additionalBinaryDataProperties) { - _type = type; + Type = @type; LastMessages = lastMessages; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal RunTruncationStrategy() - { - } + public InternalTruncationObjectType Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index 823b6165b..560ed40e7 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { @@ -14,49 +15,41 @@ public partial class SpeechGenerationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SpeechGenerationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("input") != true) - { - writer.WritePropertyName("input"u8); - writer.WriteStringValue(Input); - } - if (SerializedAdditionalRawData?.ContainsKey("voice") != true) - { - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); + writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); + writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.ToString()); + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("speed") != true && Optional.IsDefined(SpeedRatio)) + if (Optional.IsDefined(Speed)) { writer.WritePropertyName("speed"u8); - writer.WriteNumberValue(SpeedRatio.Value); + writer.WriteNumberValue(Speed.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -65,25 +58,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - SpeechGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SpeechGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual SpeechGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SpeechGenerationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSpeechGenerationOptions(document.RootElement, options); } - internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -93,63 +84,63 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE GeneratedSpeechVoice voice = default; GeneratedSpeechFormat? responseFormat = default; float? speed = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = new InternalCreateSpeechRequestModel(property.Value.GetString()); + model = new InternalCreateSpeechRequestModel(prop.Value.GetString()); continue; } - if (property.NameEquals("input"u8)) + if (prop.NameEquals("input"u8)) { - input = property.Value.GetString(); + input = prop.Value.GetString(); continue; } - if (property.NameEquals("voice"u8)) + if (prop.NameEquals("voice"u8)) { - voice = new GeneratedSpeechVoice(property.Value.GetString()); + voice = new GeneratedSpeechVoice(prop.Value.GetString()); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new GeneratedSpeechFormat(property.Value.GetString()); + responseFormat = new GeneratedSpeechFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("speed"u8)) + if (prop.NameEquals("speed"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + speed = null; continue; } - speed = property.Value.GetSingle(); + speed = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SpeechGenerationOptions( model, input, voice, responseFormat, speed, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -159,15 +150,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - SpeechGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + SpeechGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual SpeechGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeSpeechGenerationOptions(document.RootElement, options); } default: @@ -177,15 +169,16 @@ SpeechGenerationOptions IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static SpeechGenerationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(SpeechGenerationOptions speechGenerationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSpeechGenerationOptions(document.RootElement); + return BinaryContent.Create(speechGenerationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator SpeechGenerationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeSpeechGenerationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs index 8ecda5dc0..45ed2ca12 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs @@ -9,17 +9,18 @@ namespace OpenAI.Audio { public partial class SpeechGenerationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal SpeechGenerationOptions(InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, GeneratedSpeechFormat? responseFormat, float? speedRatio, IDictionary serializedAdditionalRawData) + internal SpeechGenerationOptions(InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, GeneratedSpeechFormat? responseFormat, float? speed, IDictionary additionalBinaryDataProperties) { Model = model; Input = input; Voice = voice; ResponseFormat = responseFormat; - SpeedRatio = speedRatio; - SerializedAdditionalRawData = serializedAdditionalRawData; + Speed = speed; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public GeneratedSpeechFormat? ResponseFormat { get; set; } } } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index 94b1916af..26db524ca 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class StaticFileChunkingStrategy : IJsonModel { + internal StaticFileChunkingStrategy() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StaticFileChunkingStrategy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("static") != true) - { - writer.WritePropertyName("static"u8); - writer.WriteObjectValue(_internalDetails, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("static"u8); + writer.WriteObjectValue(Static, options); } - StaticFileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StaticFileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (StaticFileChunkingStrategy)JsonModelCreateCore(ref reader, options); + + protected override FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StaticFileChunkingStrategy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStaticFileChunkingStrategy(document.RootElement, options); } - internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy(JsonElement element, ModelReaderWriterOptions options = null) + internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalStaticChunkingStrategyDetails @static = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "static"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("static"u8)) + if (prop.NameEquals("static"u8)) { - @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(property.Value, options); + @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new StaticFileChunkingStrategy(type, serializedAdditionalRawData, @static); + return new StaticFileChunkingStrategy(@static, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - StaticFileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StaticFileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (StaticFileChunkingStrategy)PersistableModelCreateCore(data, options); + protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStaticFileChunkingStrategy(document.RootElement, options); } default: @@ -130,15 +111,16 @@ StaticFileChunkingStrategy IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new StaticFileChunkingStrategy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StaticFileChunkingStrategy staticFileChunkingStrategy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStaticFileChunkingStrategy(document.RootElement); + return BinaryContent.Create(staticFileChunkingStrategy, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator StaticFileChunkingStrategy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStaticFileChunkingStrategy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs index a86690ab1..507fda999 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs @@ -9,13 +9,11 @@ namespace OpenAI.VectorStores { public partial class StaticFileChunkingStrategy : FileChunkingStrategy { - internal StaticFileChunkingStrategy(string type, IDictionary serializedAdditionalRawData, InternalStaticChunkingStrategyDetails internalDetails) : base(type, serializedAdditionalRawData) + internal StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails @static, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - _internalDetails = internalDetails; + Static = @static; } - internal StaticFileChunkingStrategy() - { - } + public InternalStaticChunkingStrategyDetails Static { get; set; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 6a39741da..ee90761ec 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -7,46 +7,44 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate : IJsonModel { + internal StreamingChatCompletionUpdate() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatCompletionUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) - { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (var item in Choices) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(ServiceTier)) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(ServiceTier)) { if (ServiceTier != null) { @@ -55,35 +53,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } else { - writer.WriteNull("service_tier"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint)) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); + writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,102 +83,103 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } - StreamingChatCompletionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatCompletionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatCompletionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatCompletionUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatCompletionUpdate(document.RootElement, options); } - internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletionUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletionUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - IReadOnlyList choices = default; + IList choices = default; DateTimeOffset created = default; string model = default; InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; string systemFingerprint = default; InternalCreateChatCompletionStreamResponseObject @object = default; - ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalCreateChatCompletionStreamResponseUsage usage = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("choices"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(item, options)); } choices = array; continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("created"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { serviceTier = null; continue; } - serviceTier = new InternalCreateChatCompletionStreamResponseServiceTier(property.Value.GetString()); + serviceTier = new InternalCreateChatCompletionStreamResponseServiceTier(prop.Value.GetString()); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { - systemFingerprint = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + systemFingerprint = null; + continue; + } + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalCreateChatCompletionStreamResponseObject(property.Value.GetString()); + @object = new InternalCreateChatCompletionStreamResponseObject(prop.Value.GetString()); continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + usage = null; continue; } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + usage = InternalCreateChatCompletionStreamResponseUsage.DeserializeInternalCreateChatCompletionStreamResponseUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new StreamingChatCompletionUpdate( id, choices, @@ -197,13 +189,14 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion systemFingerprint, @object, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -213,15 +206,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - StreamingChatCompletionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatCompletionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatCompletionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatCompletionUpdate(document.RootElement, options); } default: @@ -231,15 +225,16 @@ StreamingChatCompletionUpdate IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatCompletionUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatCompletionUpdate streamingChatCompletionUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatCompletionUpdate(document.RootElement); + return BinaryContent.Create(streamingChatCompletionUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatCompletionUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatCompletionUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index b72279024..69e90321a 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -10,38 +10,33 @@ namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal StreamingChatCompletionUpdate(string id, IEnumerable choices, DateTimeOffset createdAt, string model) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); + private protected IDictionary _additionalBinaryDataProperties; + internal StreamingChatCompletionUpdate(string id, IEnumerable choices, DateTimeOffset created, string model) + { Id = id; Choices = choices.ToList(); - CreatedAt = createdAt; + Created = created; Model = model; } - internal StreamingChatCompletionUpdate(string id, IReadOnlyList choices, DateTimeOffset createdAt, string model, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal StreamingChatCompletionUpdate(string id, IList choices, DateTimeOffset created, string model, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, InternalCreateChatCompletionStreamResponseUsage usage, IDictionary additionalBinaryDataProperties) { Id = id; Choices = choices; - CreatedAt = createdAt; + Created = created; Model = model; ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; Object = @object; Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal StreamingChatCompletionUpdate() - { - } + public string Id { get; set; } + + public string Model { get; set; } - public string Id { get; } - public string Model { get; } - public string SystemFingerprint { get; } + public string SystemFingerprint { get; set; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 8a47d0a0b..c9d438328 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,34 +15,35 @@ public partial class StreamingChatFunctionCallUpdate : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true && Optional.IsDefined(FunctionArgumentsUpdate)) + if (Optional.IsDefined(Arguments)) { writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(FunctionArgumentsUpdate); + writer.WriteStringValue(Arguments); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(FunctionName)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); - writer.WriteStringValue(FunctionName); + writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - StreamingChatFunctionCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatFunctionCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatFunctionCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, options); } - internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunctionCallUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunctionCallUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string arguments = default; string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - arguments = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + arguments = null; + continue; + } + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new StreamingChatFunctionCallUpdate(arguments, name, serializedAdditionalRawData); + return new StreamingChatFunctionCallUpdate(arguments, name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - StreamingChatFunctionCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatFunctionCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatFunctionCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, options); } default: @@ -130,15 +139,16 @@ StreamingChatFunctionCallUpdate IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatFunctionCallUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatFunctionCallUpdate streamingChatFunctionCallUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatFunctionCallUpdate(document.RootElement); + return BinaryContent.Create(streamingChatFunctionCallUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatFunctionCallUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs index cdf403d42..3d191c22f 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs @@ -9,16 +9,17 @@ namespace OpenAI.Chat { public partial class StreamingChatFunctionCallUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal StreamingChatFunctionCallUpdate() { } - internal StreamingChatFunctionCallUpdate(string functionArgumentsUpdate, string functionName, IDictionary serializedAdditionalRawData) + internal StreamingChatFunctionCallUpdate(string arguments, string name, IDictionary additionalBinaryDataProperties) { - FunctionArgumentsUpdate = functionArgumentsUpdate; - FunctionName = functionName; - SerializedAdditionalRawData = serializedAdditionalRawData; + Arguments = arguments; + Name = name; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 123891d29..17568c4d8 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -7,51 +7,54 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate : IJsonModel { + internal StreamingChatToolCallUpdate() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatToolCallUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (Optional.IsDefined(Type)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); + writer.WriteStringValue(Type.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("function") != true && Optional.IsDefined(Function)) + if (Optional.IsDefined(Function)) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,79 +63,82 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - StreamingChatToolCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatToolCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatToolCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatToolCallUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatToolCallUpdate(document.RootElement, options); } - internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; string id = default; - ChatToolCallKind type = default; + InternalChatCompletionMessageToolCallChunkType? @type = default; InternalChatCompletionMessageToolCallChunkFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @type = null; continue; } - type = new ChatToolCallKind(property.Value.GetString()); + @type = new InternalChatCompletionMessageToolCallChunkType(prop.Value.GetString()); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("function"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + function = null; continue; } - function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(property.Value, options); + function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new StreamingChatToolCallUpdate(index, id, type, function, serializedAdditionalRawData); + return new StreamingChatToolCallUpdate(index, id, @type, function, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -142,15 +148,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - StreamingChatToolCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatToolCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatToolCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatToolCallUpdate(document.RootElement, options); } default: @@ -160,15 +167,16 @@ StreamingChatToolCallUpdate IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatToolCallUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatToolCallUpdate streamingChatToolCallUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatToolCallUpdate(document.RootElement); + return BinaryContent.Create(streamingChatToolCallUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatToolCallUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatToolCallUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs index 5d606fc1b..3f1f49137 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs @@ -9,22 +9,19 @@ namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal StreamingChatToolCallUpdate(int index, string id, ChatToolCallKind kind, InternalChatCompletionMessageToolCallChunkFunction function, IDictionary serializedAdditionalRawData) + internal StreamingChatToolCallUpdate(int index, string id, InternalChatCompletionMessageToolCallChunkType? @type, InternalChatCompletionMessageToolCallChunkFunction function, IDictionary additionalBinaryDataProperties) { Index = index; Id = id; - Kind = kind; + Type = @type; Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal StreamingChatToolCallUpdate() - { - } + public int Index { get; set; } - public int Index { get; } - public string Id { get; } + public string Id { get; set; } } } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index 71a6676c5..93e20532f 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -7,67 +7,105 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class SystemChatMessage : IJsonModel { - SystemChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal SystemChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SystemChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SystemChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + } + + SystemChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SystemChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSystemChatMessage(document.RootElement, options); } - internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string name = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "system"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SystemChatMessage(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData, name); + return new SystemChatMessage(content, name, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -77,15 +115,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - SystemChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + SystemChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SystemChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeSystemChatMessage(document.RootElement, options); } default: @@ -95,15 +134,16 @@ SystemChatMessage IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new SystemChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(SystemChatMessage systemChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSystemChatMessage(document.RootElement); + return BinaryContent.Create(systemChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator SystemChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeSystemChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index 962eee34b..82ea3e06c 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -4,18 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class SystemChatMessage : ChatMessage { - internal SystemChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string participantName) : base(role, content, serializedAdditionalRawData) + public SystemChatMessage(BinaryData content) : base("system") { - ParticipantName = participantName; + Argument.AssertNotNull(content, nameof(content)); + + Content = content; } - internal SystemChatMessage() + internal SystemChatMessage(BinaryData content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + Name = name; } + + public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index a415df841..1acbfe5fc 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,36 +15,41 @@ public partial class ThreadCreationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("messages") != true && Optional.IsCollectionDefined(InternalMessages)) + if (Optional.IsCollectionDefined(Messages)) { writer.WritePropertyName("messages"u8); writer.WriteStartArray(); - foreach (var item in InternalMessages) + foreach (var item in Messages) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -52,26 +58,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -80,88 +87,91 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - ThreadCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadCreationOptions(document.RootElement, options); } - internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList messages = default; - ToolResources toolResources = default; + InternalCreateThreadRequestToolResources toolResources = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("messages"u8)) + if (prop.NameEquals("messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } messages = array; continue; } - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalCreateThreadRequestToolResources.DeserializeInternalCreateThreadRequestToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadCreationOptions(messages ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new ThreadCreationOptions(messages ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -171,15 +181,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - ThreadCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadCreationOptions(document.RootElement, options); } default: @@ -189,15 +200,16 @@ ThreadCreationOptions IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadCreationOptions threadCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadCreationOptions(document.RootElement); + return BinaryContent.Create(threadCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs index 450cf612a..0127b1be3 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs @@ -4,25 +4,28 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public ThreadCreationOptions() { - InternalMessages = new ChangeTrackingList(); + Messages = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } - internal ThreadCreationOptions(IList internalMessages, ToolResources toolResources, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal ThreadCreationOptions(IList messages, InternalCreateThreadRequestToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) { - InternalMessages = internalMessages; + Messages = messages; ToolResources = toolResources; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index ed9dba9f8..3aeffe70f 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadDeletionResult : IJsonModel { + internal ThreadDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ThreadId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } - ThreadDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadDeletionResult(document.RootElement, options); } - internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement string id = default; bool deleted = default; InternalDeleteThreadResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteThreadResponseObject(property.Value.GetString()); + @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadDeletionResult(id, deleted, @object, serializedAdditionalRawData); + return new ThreadDeletionResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - ThreadDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ ThreadDeletionResult IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadDeletionResult threadDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadDeletionResult(document.RootElement); + return BinaryContent.Create(threadDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index d0b06a680..e386d3b69 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -9,26 +9,22 @@ namespace OpenAI.Assistants { public partial class ThreadDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ThreadDeletionResult(string threadId, bool deleted) - { - Argument.AssertNotNull(threadId, nameof(threadId)); + private protected IDictionary _additionalBinaryDataProperties; - ThreadId = threadId; + internal ThreadDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal ThreadDeletionResult(string threadId, bool deleted, InternalDeleteThreadResponseObject @object, IDictionary serializedAdditionalRawData) + internal ThreadDeletionResult(string id, bool deleted, InternalDeleteThreadResponseObject @object, IDictionary additionalBinaryDataProperties) { - ThreadId = threadId; + Id = id; Deleted = deleted; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ThreadDeletionResult() - { - } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index 333213907..bdef82033 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -7,166 +7,135 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadMessage : IJsonModel { + internal ThreadMessage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadMessage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (IncompleteDetails != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("incomplete_details"u8); + writer.WriteObjectValue(IncompleteDetails, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("incompleteDetails"u8); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + if (CompletedAt != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("thread_id") != true) + else { - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); + writer.WriteNull("completedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + if (IncompleteAt != null) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("incomplete_at"u8); + writer.WriteNumberValue(IncompleteAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("incomplete_details") != true) + else { - if (IncompleteDetails != null) - { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); - } - else - { - writer.WriteNull("incomplete_details"); - } + writer.WriteNull("incompleteAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("completed_at") != true) + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) { - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("incomplete_at") != true) + writer.WriteEndArray(); + if (AssistantId != null) { - if (IncompleteAt != null) - { - writer.WritePropertyName("incomplete_at"u8); - writer.WriteNumberValue(IncompleteAt.Value, "U"); - } - else - { - writer.WriteNull("incomplete_at"); - } + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) + else { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); + writer.WriteNull("assistantId"u8); } - if (SerializedAdditionalRawData?.ContainsKey("content") != true) + if (RunId != null) { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("run_id"u8); + writer.WriteStringValue(RunId); } - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) + else { - if (AssistantId != null) - { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - } - else - { - writer.WriteNull("assistant_id"); - } + writer.WriteNull("runId"u8); } - if (SerializedAdditionalRawData?.ContainsKey("run_id") != true) + if (Attachments != null && Optional.IsCollectionDefined(Attachments)) { - if (RunId != null) - { - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); - } - else + writer.WritePropertyName("attachments"u8); + writer.WriteStartArray(); + foreach (var item in Attachments) { - writer.WriteNull("run_id"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("attachments") != true) + else { - if (Attachments != null && Optional.IsCollectionDefined(Attachments)) - { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (var item in Attachments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"); - } + writer.WriteNull("attachments"u8); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -175,25 +144,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } - ThreadMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadMessage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadMessage(document.RootElement, options); } - internal static ThreadMessage DeserializeThreadMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadMessage DeserializeThreadMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -206,143 +173,147 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode MessageFailureDetails incompleteDetails = default; DateTimeOffset? completedAt = default; DateTimeOffset? incompleteAt = default; - MessageRole role = default; - IReadOnlyList content = default; + InternalMessageObjectRole role = default; + IList content = default; string assistantId = default; string runId = default; - IReadOnlyList attachments = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList attachments = default; + IDictionary metadata = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalMessageObjectObject(property.Value.GetString()); + @object = new InternalMessageObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("thread_id"u8)) + if (prop.NameEquals("thread_id"u8)) { - threadId = property.Value.GetString(); + threadId = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new MessageStatus(property.Value.GetString()); + status = new MessageStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("incomplete_details"u8)) + if (prop.NameEquals("incomplete_details"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { incompleteDetails = null; continue; } - incompleteDetails = MessageFailureDetails.DeserializeMessageFailureDetails(property.Value, options); + incompleteDetails = MessageFailureDetails.DeserializeMessageFailureDetails(prop.Value, options); continue; } - if (property.NameEquals("completed_at"u8)) + if (prop.NameEquals("completed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { completedAt = null; continue; } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("incomplete_at"u8)) + if (prop.NameEquals("incomplete_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { incompleteAt = null; continue; } - incompleteAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + incompleteAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) { - role = property.Value.GetString().ToMessageRole(); + role = new InternalMessageObjectRole(prop.Value.GetString()); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("content"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(MessageContent.DeserializeMessageContent(item, options)); } content = array; continue; } - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { assistantId = null; continue; } - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("run_id"u8)) + if (prop.NameEquals("run_id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { runId = null; continue; } - runId = property.Value.GetString(); + runId = prop.Value.GetString(); continue; } - if (property.NameEquals("attachments"u8)) + if (prop.NameEquals("attachments"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - attachments = new ChangeTrackingList(); + attachments = new ChangeTrackingList(); continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(MessageCreationAttachment.DeserializeMessageCreationAttachment(item, options)); + array.Add(InternalMessageObjectAttachment.DeserializeInternalMessageObjectAttachment(item, options)); } attachments = array; continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ThreadMessage( id, @object, @@ -358,13 +329,14 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode runId, attachments, metadata, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -374,15 +346,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio } } - ThreadMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadMessage(document.RootElement, options); } default: @@ -392,15 +365,16 @@ ThreadMessage IPersistableModel.Create(BinaryData data, ModelRead string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadMessage threadMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadMessage(document.RootElement); + return BinaryContent.Create(threadMessage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index ba5967d55..2d9a1cb80 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -10,13 +10,10 @@ namespace OpenAI.Assistants { public partial class ThreadMessage { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IEnumerable content, string assistantId, string runId, IEnumerable attachments, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); + private protected IDictionary _additionalBinaryDataProperties; + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, InternalMessageObjectRole role, IEnumerable content, string assistantId, string runId, IEnumerable attachments, IDictionary metadata) + { Id = id; CreatedAt = createdAt; ThreadId = threadId; @@ -32,7 +29,7 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes Metadata = metadata; } - internal ThreadMessage(string id, InternalMessageObjectObject @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IReadOnlyList content, string assistantId, string runId, IReadOnlyList attachments, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal ThreadMessage(string id, InternalMessageObjectObject @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, InternalMessageObjectRole role, IList content, string assistantId, string runId, IList attachments, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -48,24 +45,29 @@ internal ThreadMessage(string id, InternalMessageObjectObject @object, DateTimeO RunId = runId; Attachments = attachments; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ThreadMessage() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string ThreadId { get; set; } + + public MessageStatus Status { get; set; } + + public MessageFailureDetails IncompleteDetails { get; set; } + + public DateTimeOffset? CompletedAt { get; set; } + + public DateTimeOffset? IncompleteAt { get; set; } + + public IList Content { get; } + + public string AssistantId { get; set; } + + public string RunId { get; set; } - public string Id { get; } - - public DateTimeOffset CreatedAt { get; } - public string ThreadId { get; } - public MessageStatus Status { get; } - public MessageFailureDetails IncompleteDetails { get; } - public DateTimeOffset? CompletedAt { get; } - public DateTimeOffset? IncompleteAt { get; } - public IReadOnlyList Content { get; } - public string AssistantId { get; } - public string RunId { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index e53955c26..e1ee0f782 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,26 +15,31 @@ public partial class ThreadModificationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadModificationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_resources") != true && Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources)) { if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("tool_resources"); + writer.WriteNull("toolResources"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -42,26 +48,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,73 +77,76 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - ThreadModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadModificationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadModificationOptions(document.RootElement, options); } - internal static ThreadModificationOptions DeserializeThreadModificationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadModificationOptions DeserializeThreadModificationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ToolResources toolResources = default; + InternalModifyThreadRequestToolResources toolResources = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_resources"u8)) + if (prop.NameEquals("tool_resources"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolResources = null; continue; } - toolResources = Assistants.ToolResources.DeserializeToolResources(property.Value, options); + toolResources = InternalModifyThreadRequestToolResources.DeserializeInternalModifyThreadRequestToolResources(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadModificationOptions(toolResources, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new ThreadModificationOptions(toolResources, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -146,15 +156,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - ThreadModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadModificationOptions(document.RootElement, options); } default: @@ -164,15 +175,16 @@ ThreadModificationOptions IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadModificationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadModificationOptions threadModificationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadModificationOptions(document.RootElement); + return BinaryContent.Create(threadModificationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadModificationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadModificationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs index b26090b10..0b1c3bc45 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs @@ -4,23 +4,26 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadModificationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public ThreadModificationOptions() { Metadata = new ChangeTrackingDictionary(); } - internal ThreadModificationOptions(ToolResources toolResources, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal ThreadModificationOptions(InternalModifyThreadRequestToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) { ToolResources = toolResources; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 4c8844894..d5967c8a3 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -7,197 +7,155 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadRun : IJsonModel { + internal ThreadRun() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadRun)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (RequiredAction != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("required_action"u8); + writer.WriteObjectValue(RequiredAction, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("requiredAction"u8); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + if (LastError != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); } - if (SerializedAdditionalRawData?.ContainsKey("thread_id") != true) + else { - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); + writer.WriteNull("lastError"u8); } - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) + if (ExpiresAt != null) { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + else { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteNull("expiresAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("required_action") != true) + if (StartedAt != null) { - if (_internalRequiredAction != null) - { - writer.WritePropertyName("required_action"u8); - writer.WriteObjectValue(_internalRequiredAction, options); - } - else - { - writer.WriteNull("required_action"); - } + writer.WritePropertyName("started_at"u8); + writer.WriteNumberValue(StartedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("last_error") != true) + else { - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } + writer.WriteNull("startedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true) + if (CancelledAt != null) { - if (ExpiresAt != null) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt.Value, "U"); - } - else - { - writer.WriteNull("expires_at"); - } + writer.WritePropertyName("cancelled_at"u8); + writer.WriteNumberValue(CancelledAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("started_at") != true) + else { - if (StartedAt != null) - { - writer.WritePropertyName("started_at"u8); - writer.WriteNumberValue(StartedAt.Value, "U"); - } - else - { - writer.WriteNull("started_at"); - } + writer.WriteNull("cancelledAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("cancelled_at") != true) + if (FailedAt != null) { - if (CancelledAt != null) - { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); - } - else - { - writer.WriteNull("cancelled_at"); - } + writer.WritePropertyName("failed_at"u8); + writer.WriteNumberValue(FailedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("failed_at") != true) + else { - if (FailedAt != null) - { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); - } - else - { - writer.WriteNull("failed_at"); - } + writer.WriteNull("failedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("completed_at") != true) + if (CompletedAt != null) { - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("incomplete_details") != true) + else { - if (IncompleteDetails != null) - { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); - } - else - { - writer.WriteNull("incomplete_details"); - } + writer.WriteNull("completedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + if (IncompleteDetails != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("incomplete_details"u8); + writer.WriteObjectValue(IncompleteDetails, options); } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true) + else { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); + writer.WriteNull("incompleteDetails"u8); } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (var item in Tools) { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + writer.WriteEndArray(); + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true) + else { - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - else - { - writer.WriteNull("usage"); - } + writer.WriteNull("metadata"u8); + } + if (Usage != null) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } + else + { + writer.WriteNull("usage"u8); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -206,97 +164,89 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(TopP)) { - if (NucleusSamplingFactor != null) + if (TopP != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("top_p"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_prompt_tokens") != true) + if (MaxPromptTokens != null) { - if (MaxPromptTokens != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxPromptTokens.Value); - } - else - { - writer.WriteNull("max_prompt_tokens"); - } + writer.WritePropertyName("max_prompt_tokens"u8); + writer.WriteNumberValue(MaxPromptTokens.Value); } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true) + else { - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else - { - writer.WriteNull("max_completion_tokens"); - } + writer.WriteNull("maxPromptTokens"u8); } - if (SerializedAdditionalRawData?.ContainsKey("truncation_strategy") != true) + if (MaxCompletionTokens != null) { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); - } + writer.WritePropertyName("max_completion_tokens"u8); + writer.WriteNumberValue(MaxCompletionTokens.Value); } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true) + else { - if (ToolConstraint != null) - { - writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolConstraint, options); - } - else - { - writer.WriteNull("tool_choice"); - } + writer.WriteNull("maxCompletionTokens"u8); + } + if (TruncationStrategy != null) + { + writer.WritePropertyName("truncation_strategy"u8); + writer.WriteObjectValue(TruncationStrategy, options); } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true) + else { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); + writer.WriteNull("truncationStrategy"u8); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true) + if (ToolChoice != null) { - if (ResponseFormat != null) + writer.WritePropertyName("tool_choice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + JsonSerializer.Serialize(writer, document.RootElement); } - else +#endif + } + else + { + writer.WriteNull("toolChoice"u8); + } + writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(ParallelToolCalls); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) { - writer.WriteNull("response_format"); + JsonSerializer.Serialize(writer, document.RootElement); } +#endif + } + else + { + writer.WriteNull("responseFormat"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -305,25 +255,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - ThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadRun)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadRun(document.RootElement, options); } - internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -344,258 +292,262 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW RunIncompleteDetails incompleteDetails = default; string model = default; string instructions = default; - IReadOnlyList tools = default; - IReadOnlyDictionary metadata = default; + IList tools = default; + IDictionary metadata = default; RunTokenUsage usage = default; float? temperature = default; float? topP = default; int? maxPromptTokens = default; int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - ToolConstraint toolChoice = default; - bool? parallelToolCalls = default; - AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData toolChoice = default; + bool parallelToolCalls = default; + BinaryData responseFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalRunObjectObject(property.Value.GetString()); + @object = new InternalRunObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("thread_id"u8)) + if (prop.NameEquals("thread_id"u8)) { - threadId = property.Value.GetString(); + threadId = prop.Value.GetString(); continue; } - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new RunStatus(property.Value.GetString()); + status = new RunStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("required_action"u8)) + if (prop.NameEquals("required_action"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { requiredAction = null; continue; } - requiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(property.Value, options); + requiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } - if (property.NameEquals("last_error"u8)) + if (prop.NameEquals("last_error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastError = null; continue; } - lastError = RunError.DeserializeRunError(property.Value, options); + lastError = RunError.DeserializeRunError(prop.Value, options); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { expiresAt = null; continue; } - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("started_at"u8)) + if (prop.NameEquals("started_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { startedAt = null; continue; } - startedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + startedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("cancelled_at"u8)) + if (prop.NameEquals("cancelled_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { cancelledAt = null; continue; } - cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("failed_at"u8)) + if (prop.NameEquals("failed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { failedAt = null; continue; } - failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + failedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("completed_at"u8)) + if (prop.NameEquals("completed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { completedAt = null; continue; } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("incomplete_details"u8)) + if (prop.NameEquals("incomplete_details"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { incompleteDetails = null; continue; } - incompleteDetails = RunIncompleteDetails.DeserializeRunIncompleteDetails(property.Value, options); + incompleteDetails = RunIncompleteDetails.DeserializeRunIncompleteDetails(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { usage = null; continue; } - usage = RunTokenUsage.DeserializeRunTokenUsage(property.Value, options); + usage = RunTokenUsage.DeserializeRunTokenUsage(prop.Value, options); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { topP = null; continue; } - topP = property.Value.GetSingle(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("max_prompt_tokens"u8)) + if (prop.NameEquals("max_prompt_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxPromptTokens = null; continue; } - maxPromptTokens = property.Value.GetInt32(); + maxPromptTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { maxCompletionTokens = null; continue; } - maxCompletionTokens = property.Value.GetInt32(); + maxCompletionTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("truncation_strategy"u8)) + if (prop.NameEquals("truncation_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { truncationStrategy = null; continue; } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(property.Value, options); + truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { toolChoice = null; continue; } - toolChoice = Assistants.ToolConstraint.DeserializeToolConstraint(property.Value, options); + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - parallelToolCalls = property.Value.GetBoolean(); + parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + responseFormat = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ThreadRun( id, @object, @@ -624,13 +576,14 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW toolChoice, parallelToolCalls, responseFormat, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -640,15 +593,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadRun(document.RootElement, options); } default: @@ -658,15 +612,16 @@ ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriter string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadRun FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadRun threadRun) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadRun(document.RootElement); + return BinaryContent.Create(threadRun, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadRun(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadRun(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index cc4a44572..caf65a10a 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -10,9 +10,37 @@ namespace OpenAI.Assistants { public partial class ThreadRun { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IReadOnlyList tools, IReadOnlyDictionary metadata, RunTokenUsage usage, float? temperature, float? nucleusSamplingFactor, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? parallelToolCallsEnabled, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool parallelToolCalls, BinaryData responseFormat) + { + Id = id; + CreatedAt = createdAt; + ThreadId = threadId; + AssistantId = assistantId; + Status = status; + RequiredAction = requiredAction; + LastError = lastError; + ExpiresAt = expiresAt; + StartedAt = startedAt; + CancelledAt = cancelledAt; + FailedAt = failedAt; + CompletedAt = completedAt; + IncompleteDetails = incompleteDetails; + Model = model; + Instructions = instructions; + Tools = tools.ToList(); + Metadata = metadata; + Usage = usage; + MaxPromptTokens = maxPromptTokens; + MaxCompletionTokens = maxCompletionTokens; + TruncationStrategy = truncationStrategy; + ToolChoice = toolChoice; + ParallelToolCalls = parallelToolCalls; + ResponseFormat = responseFormat; + } + + internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -20,7 +48,7 @@ internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset cr ThreadId = threadId; AssistantId = assistantId; Status = status; - _internalRequiredAction = internalRequiredAction; + RequiredAction = requiredAction; LastError = lastError; ExpiresAt = expiresAt; StartedAt = startedAt; @@ -34,41 +62,58 @@ internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset cr Metadata = metadata; Usage = usage; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; + TopP = topP; MaxPromptTokens = maxPromptTokens; MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; - ToolConstraint = toolConstraint; - ParallelToolCallsEnabled = parallelToolCallsEnabled; + ToolChoice = toolChoice; + ParallelToolCalls = parallelToolCalls; ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ThreadRun() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string ThreadId { get; set; } + + public string AssistantId { get; set; } + + public RunStatus Status { get; set; } + + public InternalRunRequiredAction RequiredAction { get; set; } + + public RunError LastError { get; set; } + + public DateTimeOffset? ExpiresAt { get; set; } + + public DateTimeOffset? StartedAt { get; set; } + + public DateTimeOffset? CancelledAt { get; set; } + + public DateTimeOffset? FailedAt { get; set; } + + public DateTimeOffset? CompletedAt { get; set; } + + public RunIncompleteDetails IncompleteDetails { get; set; } + + public string Model { get; set; } + + public string Instructions { get; set; } + + public IList Tools { get; } + + public IDictionary Metadata { get; set; } + + public RunTokenUsage Usage { get; set; } + + public float? Temperature { get; set; } + + public int? MaxPromptTokens { get; set; } + + public int? MaxCompletionTokens { get; set; } - public string Id { get; } - - public DateTimeOffset CreatedAt { get; } - public string ThreadId { get; } - public string AssistantId { get; } - public RunStatus Status { get; } - public RunError LastError { get; } - public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? StartedAt { get; } - public DateTimeOffset? CancelledAt { get; } - public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? CompletedAt { get; } - public RunIncompleteDetails IncompleteDetails { get; } - public string Model { get; } - public string Instructions { get; } - public IReadOnlyList Tools { get; } - public IReadOnlyDictionary Metadata { get; } - public RunTokenUsage Usage { get; } - public float? Temperature { get; } - public int? MaxPromptTokens { get; } - public int? MaxCompletionTokens { get; } - public RunTruncationStrategy TruncationStrategy { get; } + public RunTruncationStrategy TruncationStrategy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index fb4921699..4871fd85f 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -7,67 +7,97 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ToolChatMessage : IJsonModel { - ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal ToolChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ToolChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ToolChatMessage)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif + writer.WritePropertyName("tool_call_id"u8); + writer.WriteStringValue(ToolCallId); + } + + ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ToolChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolChatMessage(document.RootElement, options); } - internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string toolCallId = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "tool"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_call_id"u8)) + if (prop.NameEquals("content"u8)) { - toolCallId = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("tool_call_id"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + toolCallId = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ToolChatMessage(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData, toolCallId); + return new ToolChatMessage(content, toolCallId, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -77,15 +107,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - ToolChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ToolChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolChatMessage(document.RootElement, options); } default: @@ -95,15 +126,16 @@ ToolChatMessage IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ToolChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolChatMessage toolChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolChatMessage(document.RootElement); + return BinaryContent.Create(toolChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ToolChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index d0d4c210b..4ec3d8af2 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -4,20 +4,29 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class ToolChatMessage : ChatMessage { - internal ToolChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string toolCallId) : base(role, content, serializedAdditionalRawData) + public ToolChatMessage(BinaryData content, string toolCallId) : base("tool") { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(toolCallId, nameof(toolCallId)); + + Content = content; ToolCallId = toolCallId; } - internal ToolChatMessage() + internal ToolChatMessage(BinaryData content, string toolCallId, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + ToolCallId = toolCallId; } - public string ToolCallId { get; } + public BinaryData Content { get; set; } + + public string ToolCallId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 2282c137b..23c742669 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -5,23 +5,146 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class ToolConstraint : IJsonModel { + internal ToolConstraint() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConstraint)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(Function)) + { + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ToolConstraint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ToolConstraint JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConstraint)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeToolConstraint(document.RootElement, options); + } + + internal static ToolConstraint DeserializeToolConstraint(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalAssistantsNamedToolChoiceType @type = default; + InternalAssistantsNamedToolChoiceFunction function = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new InternalAssistantsNamedToolChoiceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("function"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + function = null; + continue; + } + function = InternalAssistantsNamedToolChoiceFunction.DeserializeInternalAssistantsNamedToolChoiceFunction(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ToolConstraint(@type, function, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ToolConstraint)} does not support writing '{options.Format}' format."); + } + } + + ToolConstraint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ToolConstraint PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeToolConstraint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ToolConstraint)} does not support reading '{options.Format}' format."); + } + } + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ToolConstraint FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolConstraint toolConstraint) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolConstraint(document.RootElement); + return BinaryContent.Create(toolConstraint, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ToolConstraint(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolConstraint(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.cs b/.dotnet/src/Generated/Models/ToolConstraint.cs index 519953a5f..9c208bea9 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.cs @@ -9,15 +9,20 @@ namespace OpenAI.Assistants { public partial class ToolConstraint { - internal ToolConstraint(string objectType, InternalAssistantsNamedToolChoiceFunction function, IDictionary serializedAdditionalRawData) + private protected IDictionary _additionalBinaryDataProperties; + + public ToolConstraint(InternalAssistantsNamedToolChoiceType @type) { - _objectType = objectType; - Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; } - internal ToolConstraint() + internal ToolConstraint(InternalAssistantsNamedToolChoiceType @type, InternalAssistantsNamedToolChoiceFunction function, IDictionary additionalBinaryDataProperties) { + Type = @type; + Function = function; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + public InternalAssistantsNamedToolChoiceType Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 443582baf..a90069c3b 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -6,48 +6,89 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { [PersistableModelProxy(typeof(UnknownAssistantToolDefinition))] - public partial class ToolDefinition : IJsonModel + public abstract partial class ToolDefinition : IJsonModel { - ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal ToolDefinition() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ToolDefinition)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + + ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + protected virtual ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolDefinition)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolDefinition(document.RootElement, options); } - internal static ToolDefinition DeserializeToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static ToolDefinition DeserializeToolDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("type", out JsonElement discriminator)) + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "code_interpreter": return CodeInterpreterToolDefinition.DeserializeCodeInterpreterToolDefinition(element, options); - case "file_search": return FileSearchToolDefinition.DeserializeFileSearchToolDefinition(element, options); - case "function": return FunctionToolDefinition.DeserializeFunctionToolDefinition(element, options); + case "code_interpreter": + return CodeInterpreterToolDefinition.DeserializeCodeInterpreterToolDefinition(element, options); + case "file_search": + return FileSearchToolDefinition.DeserializeFileSearchToolDefinition(element, options); + case "function": + return FunctionToolDefinition.DeserializeFunctionToolDefinition(element, options); } } return UnknownAssistantToolDefinition.DeserializeUnknownAssistantToolDefinition(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -57,15 +98,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolDefinition(document.RootElement, options); } default: @@ -75,15 +117,16 @@ ToolDefinition IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ToolDefinition FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolDefinition toolDefinition) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolDefinition(document.RootElement); + return BinaryContent.Create(toolDefinition, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ToolDefinition(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.cs b/.dotnet/src/Generated/Models/ToolDefinition.cs index 8f3a99763..7dceefcff 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.cs @@ -9,15 +9,12 @@ namespace OpenAI.Assistants { public abstract partial class ToolDefinition { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ToolDefinition() - { - } + private protected IDictionary _additionalBinaryDataProperties; - internal ToolDefinition(string type, IDictionary serializedAdditionalRawData) + internal ToolDefinition(string @type, IDictionary additionalBinaryDataProperties) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs index d4b3f7f17..28e1f084d 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ public partial class ToolOutput : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ToolOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("tool_call_id") != true && Optional.IsDefined(ToolCallId)) + if (Optional.IsDefined(ToolCallId)) { writer.WritePropertyName("tool_call_id"u8); writer.WriteStringValue(ToolCallId); } - if (SerializedAdditionalRawData?.ContainsKey("output") != true && Optional.IsDefined(Output)) + if (Optional.IsDefined(Output)) { writer.WritePropertyName("output"u8); writer.WriteStringValue(Output); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } - ToolOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ToolOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ToolOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolOutput(document.RootElement, options); } - internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReaderWriterOptions options = null) + internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string toolCallId = default; string output = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_call_id"u8)) + if (prop.NameEquals("tool_call_id"u8)) { - toolCallId = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolCallId = null; + continue; + } + toolCallId = prop.Value.GetString(); continue; } - if (property.NameEquals("output"u8)) + if (prop.NameEquals("output"u8)) { - output = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + output = null; + continue; + } + output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ToolOutput(toolCallId, output, serializedAdditionalRawData); + return new ToolOutput(toolCallId, output, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +120,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - ToolOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolOutput(document.RootElement, options); } default: @@ -130,15 +139,16 @@ ToolOutput IPersistableModel.Create(BinaryData data, ModelReaderWrit string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ToolOutput FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolOutput toolOutput) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolOutput(document.RootElement); + return BinaryContent.Create(toolOutput, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ToolOutput(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolOutput(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolOutput.cs b/.dotnet/src/Generated/Models/ToolOutput.cs index 0e7b6441b..6e05d3f3a 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.cs @@ -9,19 +9,21 @@ namespace OpenAI.Assistants { public partial class ToolOutput { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public ToolOutput() { } - internal ToolOutput(string toolCallId, string output, IDictionary serializedAdditionalRawData) + internal ToolOutput(string toolCallId, string output, IDictionary additionalBinaryDataProperties) { ToolCallId = toolCallId; Output = output; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string ToolCallId { get; set; } + public string Output { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 75ceb9212..3e390109f 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,34 +15,35 @@ public partial class ToolResources : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ToolResources)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code_interpreter") != true && Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter)) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (SerializedAdditionalRawData?.ContainsKey("file_search") != true && Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch)) { writer.WritePropertyName("file_search"u8); - SerializeFileSearch(writer, options); + writer.WriteObjectValue(FileSearch, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +52,65 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } - ToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ToolResources)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolResources(document.RootElement, options); } - internal static ToolResources DeserializeToolResources(JsonElement element, ModelReaderWriterOptions options = null) + internal static ToolResources DeserializeToolResources(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } CodeInterpreterToolResources codeInterpreter = default; - FileSearchToolResources fileSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalToolResourcesFileSearchIdsOnly fileSearch = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code_interpreter"u8)) + if (prop.NameEquals("code_interpreter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + codeInterpreter = null; continue; } - codeInterpreter = CodeInterpreterToolResources.DeserializeCodeInterpreterToolResources(property.Value, options); + codeInterpreter = CodeInterpreterToolResources.DeserializeCodeInterpreterToolResources(prop.Value, options); continue; } - if (property.NameEquals("file_search"u8)) + if (prop.NameEquals("file_search"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + fileSearch = null; continue; } - fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(property.Value, options); + fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ToolResources(codeInterpreter, fileSearch, serializedAdditionalRawData); + return new ToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +120,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio } } - ToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolResources(document.RootElement, options); } default: @@ -138,15 +139,16 @@ ToolResources IPersistableModel.Create(BinaryData data, ModelRead string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ToolResources FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolResources toolResources) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolResources(document.RootElement); + return BinaryContent.Create(toolResources, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ToolResources(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolResources(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolResources.cs b/.dotnet/src/Generated/Models/ToolResources.cs index 67b190971..64e52dab5 100644 --- a/.dotnet/src/Generated/Models/ToolResources.cs +++ b/.dotnet/src/Generated/Models/ToolResources.cs @@ -9,13 +9,13 @@ namespace OpenAI.Assistants { public partial class ToolResources { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ToolResources(CodeInterpreterToolResources codeInterpreter, FileSearchToolResources fileSearch, IDictionary serializedAdditionalRawData) + internal ToolResources(CodeInterpreterToolResources codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary additionalBinaryDataProperties) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index 71025c452..e0ec3fdba 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -7,86 +7,62 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { - public partial struct TranscribedSegment : IJsonModel, IJsonModel + public readonly partial struct TranscribedSegment : IJsonModel, IJsonModel { + public TranscribedSegment() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedSegment)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteNumberValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("seek") != true) - { - writer.WritePropertyName("seek"u8); - writer.WriteNumberValue(SeekOffset); - } - if (SerializedAdditionalRawData?.ContainsKey("start") != true) - { - writer.WritePropertyName("start"u8); - writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("end") != true) - { - writer.WritePropertyName("end"u8); - writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("tokens") != true) - { - writer.WritePropertyName("tokens"u8); - writer.WriteStartArray(); - foreach (var item in TokenIds) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature); - } - if (SerializedAdditionalRawData?.ContainsKey("avg_logprob") != true) - { - writer.WritePropertyName("avg_logprob"u8); - writer.WriteNumberValue(AverageLogProbability); - } - if (SerializedAdditionalRawData?.ContainsKey("compression_ratio") != true) - { - writer.WritePropertyName("compression_ratio"u8); - writer.WriteNumberValue(CompressionRatio); - } - if (SerializedAdditionalRawData?.ContainsKey("no_speech_prob") != true) - { - writer.WritePropertyName("no_speech_prob"u8); - writer.WriteNumberValue(NoSpeechProbability); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id); + writer.WritePropertyName("seek"u8); + writer.WriteNumberValue(Seek); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(Start.ToString("s\\.FFF"))); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(End.ToString("s\\.FFF"))); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("tokens"u8); + writer.WriteStartArray(); + foreach (var item in Tokens) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); + writer.WritePropertyName("avg_logprob"u8); + writer.WriteNumberValue(AvgLogprob); + writer.WritePropertyName("compression_ratio"u8); + writer.WriteNumberValue(CompressionRatio); + writer.WritePropertyName("no_speech_prob"u8); + writer.WriteNumberValue(NoSpeechProb); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,105 +71,100 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual TranscribedSegment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedSegment)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeTranscribedSegment(document.RootElement, options); } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); - - object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); - - internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement element, ModelReaderWriterOptions options = null) + internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } int id = default; int seek = default; TimeSpan start = default; TimeSpan end = default; string text = default; - IReadOnlyList tokens = default; + IList tokens = default; float temperature = default; float avgLogprob = default; float compressionRatio = default; float noSpeechProb = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetInt32(); + id = prop.Value.GetInt32(); continue; } - if (property.NameEquals("seek"u8)) + if (prop.NameEquals("seek"u8)) { - seek = property.Value.GetInt32(); + seek = prop.Value.GetInt32(); continue; } - if (property.NameEquals("start"u8)) + if (prop.NameEquals("start"u8)) { - start = TimeSpan.FromSeconds(property.Value.GetDouble()); + start = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("end"u8)) + if (prop.NameEquals("end"u8)) { - end = TimeSpan.FromSeconds(property.Value.GetDouble()); + end = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("tokens"u8)) + if (prop.NameEquals("tokens"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(item.GetInt32()); } tokens = array; continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("avg_logprob"u8)) + if (prop.NameEquals("avg_logprob"u8)) { - avgLogprob = property.Value.GetSingle(); + avgLogprob = prop.Value.GetSingle(); continue; } - if (property.NameEquals("compression_ratio"u8)) + if (prop.NameEquals("compression_ratio"u8)) { - compressionRatio = property.Value.GetSingle(); + compressionRatio = prop.Value.GetSingle(); continue; } - if (property.NameEquals("no_speech_prob"u8)) + if (prop.NameEquals("no_speech_prob"u8)) { - noSpeechProb = property.Value.GetSingle(); + noSpeechProb = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new TranscribedSegment( id, seek, @@ -205,13 +176,14 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele avgLogprob, compressionRatio, noSpeechProb, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -221,15 +193,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - TranscribedSegment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + TranscribedSegment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual TranscribedSegment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeTranscribedSegment(document.RootElement, options); } default: @@ -239,21 +212,26 @@ TranscribedSegment IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); - - object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); - - internal static TranscribedSegment FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(TranscribedSegment transcribedSegment) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTranscribedSegment(document.RootElement); + return BinaryContent.Create(transcribedSegment, ModelSerializationExtensions.WireOptions); } - internal BinaryContent ToBinaryContent() + public static explicit operator TranscribedSegment(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeTranscribedSegment(document.RootElement, ModelSerializationExtensions.WireOptions); } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); + + object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); + + object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index 5f27659f6..e5e59f136 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -10,45 +10,43 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedSegment { - internal TranscribedSegment(int id, int seekOffset, TimeSpan startTime, TimeSpan endTime, string text, IEnumerable tokenIds, float temperature, float averageLogProbability, float compressionRatio, float noSpeechProbability) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(tokenIds, nameof(tokenIds)); + private protected IDictionary _additionalBinaryDataProperties; + internal TranscribedSegment(int id, int seek, TimeSpan start, TimeSpan end, string text, IEnumerable tokens, float temperature, float avgLogprob, float compressionRatio, float noSpeechProb) + { Id = id; - SeekOffset = seekOffset; - StartTime = startTime; - EndTime = endTime; + Seek = seek; + Start = start; + End = end; Text = text; - TokenIds = tokenIds.ToList(); + Tokens = tokens.ToList(); Temperature = temperature; - AverageLogProbability = averageLogProbability; + AvgLogprob = avgLogprob; CompressionRatio = compressionRatio; - NoSpeechProbability = noSpeechProbability; + NoSpeechProb = noSpeechProb; } - internal TranscribedSegment(int id, int seekOffset, TimeSpan startTime, TimeSpan endTime, string text, IReadOnlyList tokenIds, float temperature, float averageLogProbability, float compressionRatio, float noSpeechProbability, IDictionary serializedAdditionalRawData) + internal TranscribedSegment(int id, int seek, TimeSpan start, TimeSpan end, string text, IList tokens, float temperature, float avgLogprob, float compressionRatio, float noSpeechProb, IDictionary additionalBinaryDataProperties) { Id = id; - SeekOffset = seekOffset; - StartTime = startTime; - EndTime = endTime; + Seek = seek; + Start = start; + End = end; Text = text; - TokenIds = tokenIds; + Tokens = tokens; Temperature = temperature; - AverageLogProbability = averageLogProbability; + AvgLogprob = avgLogprob; CompressionRatio = compressionRatio; - NoSpeechProbability = noSpeechProbability; - SerializedAdditionalRawData = serializedAdditionalRawData; + NoSpeechProb = noSpeechProb; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public TranscribedSegment() - { - } + public int Id { get; set; } + + public string Text { get; set; } + + public float Temperature { get; set; } - public int Id { get; } - public string Text { get; } - public float Temperature { get; } - public float CompressionRatio { get; } + public float CompressionRatio { get; set; } } } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index c3e0cc0f4..b25b3f64a 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { - public partial struct TranscribedWord : IJsonModel, IJsonModel + public readonly partial struct TranscribedWord : IJsonModel, IJsonModel { + public TranscribedWord() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedWord)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("word") != true) - { - writer.WritePropertyName("word"u8); - writer.WriteStringValue(Word); - } - if (SerializedAdditionalRawData?.ContainsKey("start") != true) + writer.WritePropertyName("word"u8); + writer.WriteStringValue(Word); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(Start.ToString("s\\.FFF"))); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(End.ToString("s\\.FFF"))); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("start"u8); - writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("end") != true) - { - writer.WritePropertyName("end"u8); - writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } - TranscribedWord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TranscribedWord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual TranscribedWord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedWord)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeTranscribedWord(document.RootElement, options); } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); - - object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); - - internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, ModelReaderWriterOptions options = null) + internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } string word = default; TimeSpan start = default; TimeSpan end = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("word"u8)) + if (prop.NameEquals("word"u8)) { - word = property.Value.GetString(); + word = prop.Value.GetString(); continue; } - if (property.NameEquals("start"u8)) + if (prop.NameEquals("start"u8)) { - start = TimeSpan.FromSeconds(property.Value.GetDouble()); + start = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("end"u8)) + if (prop.NameEquals("end"u8)) { - end = TimeSpan.FromSeconds(property.Value.GetDouble()); + end = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new TranscribedWord(word, start, end, serializedAdditionalRawData); + return new TranscribedWord(word, start, end, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - TranscribedWord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + TranscribedWord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual TranscribedWord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeTranscribedWord(document.RootElement, options); } default: @@ -141,21 +135,26 @@ TranscribedWord IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); - - object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); - - internal static TranscribedWord FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(TranscribedWord transcribedWord) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTranscribedWord(document.RootElement); + return BinaryContent.Create(transcribedWord, ModelSerializationExtensions.WireOptions); } - internal BinaryContent ToBinaryContent() + public static explicit operator TranscribedWord(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeTranscribedWord(document.RootElement, ModelSerializationExtensions.WireOptions); } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); + + object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); + + object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); } } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index 1ccbc4f85..629efadca 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -9,27 +9,23 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedWord { - internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime) - { - Argument.AssertNotNull(word, nameof(word)); + private protected IDictionary _additionalBinaryDataProperties; - Word = word; - StartTime = startTime; - EndTime = endTime; - } - - internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime, IDictionary serializedAdditionalRawData) + internal TranscribedWord(string word, TimeSpan start, TimeSpan end) { Word = word; - StartTime = startTime; - EndTime = endTime; - SerializedAdditionalRawData = serializedAdditionalRawData; + Start = start; + End = end; } - public TranscribedWord() + internal TranscribedWord(string word, TimeSpan start, TimeSpan end, IDictionary additionalBinaryDataProperties) { + Word = word; + Start = start; + End = end; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Word { get; } + public string Word { get; set; } } } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index b26d26d05..4742e3180 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -3,59 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownAssistantToolDefinition : IJsonModel { - ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal UnknownAssistantToolDefinition() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ToolDefinition)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownAssistantToolDefinition)JsonModelCreateCore(ref reader, options); + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolDefinition)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolDefinition(document.RootElement, options); } - internal static UnknownAssistantToolDefinition DeserializeUnknownAssistantToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownAssistantToolDefinition DeserializeUnknownAssistantToolDefinition(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownAssistantToolDefinition(type, serializedAdditionalRawData); + return new UnknownAssistantToolDefinition(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -65,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownAssistantToolDefinition)PersistableModelCreateCore(data, options); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolDefinition(document.RootElement, options); } default: @@ -82,16 +101,5 @@ ToolDefinition IPersistableModel.Create(BinaryData data, ModelRe } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownAssistantToolDefinition FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownAssistantToolDefinition(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.cs index ca5c335e1..9241104cc 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownAssistantToolDefinition : ToolDefinition { - internal UnknownAssistantToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownAssistantToolDefinition() + internal UnknownAssistantToolDefinition(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index 7e77542bf..4c398bdde 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class UnknownCreateFineTuningJobRequestIntegration : IJsonModel { + internal UnknownCreateFineTuningJobRequestIntegration() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownCreateFineTuningJobRequestIntegration)JsonModelCreateCore(ref reader, options); + + protected override FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFineTuningIntegration(document.RootElement, options); + return FineTuningIntegration.DeserializeFineTuningIntegration(document.RootElement, options); } - internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownCreateFineTuningJobRequestIntegration(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownCreateFineTuningJobRequestIntegration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownCreateFineTuningJobRequestIntegration(type, serializedAdditionalRawData); + return new UnknownCreateFineTuningJobRequestIntegration(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,16 +83,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownCreateFineTuningJobRequestIntegration)PersistableModelCreateCore(data, options); + protected override FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFineTuningIntegration(document.RootElement, options); + return FineTuningIntegration.DeserializeFineTuningIntegration(document.RootElement, options); } default: throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{options.Format}' format."); @@ -118,16 +101,5 @@ FineTuningIntegration IPersistableModel.Create(BinaryData } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownCreateFineTuningJobRequestIntegration FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownCreateFineTuningJobRequestIntegration(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.cs index cbf12dee8..b883407b7 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.cs @@ -9,11 +9,7 @@ namespace OpenAI.FineTuning { internal partial class UnknownCreateFineTuningJobRequestIntegration : FineTuningIntegration { - internal UnknownCreateFineTuningJobRequestIntegration(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownCreateFineTuningJobRequestIntegration() + internal UnknownCreateFineTuningJobRequestIntegration(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index dd39b6cd8..837c64f65 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class UnknownFineTuningIntegration : IJsonModel { + internal UnknownFineTuningIntegration() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + this.JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegration)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)this.JsonModelCreateCore(ref reader, options); + + protected override InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuningIntegration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuningIntegration(document.RootElement, options); } - internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownFineTuningIntegration(type, serializedAdditionalRawData); + return new UnknownFineTuningIntegration(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)this.PersistableModelCreateCore(data, options); + protected override InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuningIntegration(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalFineTuningIntegration IPersistableModel.C } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownFineTuningIntegration FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownFineTuningIntegration(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.cs index 8252f2576..8e6fd4d22 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.cs @@ -9,11 +9,7 @@ namespace OpenAI.FineTuning { internal partial class UnknownFineTuningIntegration : InternalFineTuningIntegration { - internal UnknownFineTuningIntegration(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownFineTuningIntegration() + internal UnknownFineTuningIntegration(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs index b0a6d9584..3e687a893 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownMessageContentTextObjectAnnotation : IJsonModel { + internal UnknownMessageContentTextObjectAnnotation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectAnnotation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageContentTextObjectAnnotation)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageContentTextObjectAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectAnnotation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement, options); } - internal static UnknownMessageContentTextObjectAnnotation DeserializeUnknownMessageContentTextObjectAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownMessageContentTextObjectAnnotation DeserializeUnknownMessageContentTextObjectAnnotation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownMessageContentTextObjectAnnotation(type, serializedAdditionalRawData); + return new UnknownMessageContentTextObjectAnnotation(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(M } } - InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageContentTextObjectAnnotation)PersistableModelCreateCore(data, options); + protected override InternalMessageContentTextObjectAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageContentTextObjectAnnotation(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalMessageContentTextObjectAnnotation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownMessageContentTextObjectAnnotation FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownMessageContentTextObjectAnnotation(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.cs index b5561f7cd..cdc91cb65 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownMessageContentTextObjectAnnotation : InternalMessageContentTextObjectAnnotation { - internal UnknownMessageContentTextObjectAnnotation(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownMessageContentTextObjectAnnotation() + internal UnknownMessageContentTextObjectAnnotation(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs index f4570019f..0492c3fe3 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownMessageDeltaContent : IJsonModel { + internal UnknownMessageDeltaContent() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContent)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageDeltaContent)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaContent(document.RootElement, options); } - internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownMessageDeltaContent(type, serializedAdditionalRawData); + return new UnknownMessageDeltaContent(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageDeltaContent)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaContent(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalMessageDeltaContent IPersistableModel.Creat } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownMessageDeltaContent FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownMessageDeltaContent(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.cs index a33b74454..add4753cc 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownMessageDeltaContent : InternalMessageDeltaContent { - internal UnknownMessageDeltaContent(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownMessageDeltaContent() + internal UnknownMessageDeltaContent(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs index 1fda24c5c..2c25dd275 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownMessageDeltaTextContentAnnotation : IJsonModel { + internal UnknownMessageDeltaTextContentAnnotation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaTextContentAnnotation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageDeltaTextContentAnnotation)JsonModelCreateCore(ref reader, options); + + protected override InternalMessageDeltaTextContentAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalMessageDeltaTextContentAnnotation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement, options); } - internal static UnknownMessageDeltaTextContentAnnotation DeserializeUnknownMessageDeltaTextContentAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownMessageDeltaTextContentAnnotation DeserializeUnknownMessageDeltaTextContentAnnotation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownMessageDeltaTextContentAnnotation(type, serializedAdditionalRawData); + return new UnknownMessageDeltaTextContentAnnotation(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageDeltaTextContentAnnotation)PersistableModelCreateCore(data, options); + protected override InternalMessageDeltaTextContentAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalMessageDeltaTextContentAnnotation(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalMessageDeltaTextContentAnnotation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownMessageDeltaTextContentAnnotation FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownMessageDeltaTextContentAnnotation(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.cs index d6f17c1ab..b72e96ef1 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownMessageDeltaTextContentAnnotation : InternalMessageDeltaTextContentAnnotation { - internal UnknownMessageDeltaTextContentAnnotation(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownMessageDeltaTextContentAnnotation() + internal UnknownMessageDeltaTextContentAnnotation(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs index 287960a64..8776ce9f5 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetails : IJsonModel { + internal UnknownRunStepDeltaStepDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetails)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetails(document.RootElement, options); } - internal static UnknownRunStepDeltaStepDetails DeserializeUnknownRunStepDeltaStepDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepDeltaStepDetails DeserializeUnknownRunStepDeltaStepDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDeltaStepDetails(type, serializedAdditionalRawData); + return new UnknownRunStepDeltaStepDetails(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetails)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetails(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalRunStepDeltaStepDetails IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepDeltaStepDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepDeltaStepDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.cs index d56091482..7db2d8484 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetails : InternalRunStepDeltaStepDetails { - internal UnknownRunStepDeltaStepDetails(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepDeltaStepDetails() + internal UnknownRunStepDeltaStepDetails(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 4790ac0f2..3c71ac3e3 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject : IJsonModel { + internal UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepUpdateCodeInterpreterOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepUpdateCodeInterpreterOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement, options); } - internal static UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject DeserializeUnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject DeserializeUnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(type, serializedAdditionalRawData); + return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelRead } } - RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)PersistableModelCreateCore(data, options); + protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepUpdateCodeInterpreterOutput(document.RootElement, options); } default: @@ -118,16 +101,5 @@ RunStepUpdateCodeInterpreterOutput IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs index d57ff0397..714634424 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject : RunStepUpdateCodeInterpreterOutput { - internal UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject() + internal UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index b5bcbda2c..a67ce37c0 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject : IJsonModel { + internal UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement, options); } - internal static UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject DeserializeUnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject DeserializeUnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(type, serializedAdditionalRawData); + return new UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)PersistableModelCreateCore(data, options); + protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement, options); } default: @@ -118,16 +101,5 @@ InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel< } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs index 5a0c3e670..2cb16e57d 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject : InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - internal UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject() + internal UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 86648d23b..688add701 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject : IJsonModel { + internal UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepCodeInterpreterOutput)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepCodeInterpreterOutput)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepCodeInterpreterOutput(document.RootElement, options); } - internal static UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject DeserializeUnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject DeserializeUnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(type, serializedAdditionalRawData); + return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)PersistableModelCreateCore(data, options); + protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepCodeInterpreterOutput(document.RootElement, options); } default: @@ -118,16 +101,5 @@ RunStepCodeInterpreterOutput IPersistableModel.Cre } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs index 210c6b0af..b4c3c2632 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject : RunStepCodeInterpreterOutput { - internal UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject() + internal UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index 79e5d73db..9dbbc39ee 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepDetailsToolCallsObjectToolCallsObject : IJsonModel { + internal UnknownRunStepDetailsToolCallsObjectToolCallsObject() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepToolCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsObjectToolCallsObject)JsonModelCreateCore(ref reader, options); + + protected override RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepToolCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepToolCall(document.RootElement, options); } - internal static UnknownRunStepDetailsToolCallsObjectToolCallsObject DeserializeUnknownRunStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepDetailsToolCallsObjectToolCallsObject DeserializeUnknownRunStepDetailsToolCallsObjectToolCallsObject(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(type, serializedAdditionalRawData); + return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsObjectToolCallsObject)PersistableModelCreateCore(data, options); + protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepToolCall(document.RootElement, options); } default: @@ -118,16 +101,5 @@ RunStepToolCall IPersistableModel.Create(BinaryData data, Model } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepDetailsToolCallsObjectToolCallsObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepDetailsToolCallsObjectToolCallsObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.cs index fa779e444..ec7714e56 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepDetailsToolCallsObjectToolCallsObject : RunStepToolCall { - internal UnknownRunStepDetailsToolCallsObjectToolCallsObject(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepDetailsToolCallsObjectToolCallsObject() + internal UnknownRunStepDetailsToolCallsObjectToolCallsObject(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs index 142bdc28b..f3086084f 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs @@ -3,95 +3,77 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { internal partial class UnknownRunStepObjectStepDetails : IJsonModel { + internal UnknownRunStepObjectStepDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } - RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepObjectStepDetails)JsonModelCreateCore(ref reader, options); + + protected override RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepDetails(document.RootElement, options); } - internal static UnknownRunStepObjectStepDetails DeserializeUnknownRunStepObjectStepDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownRunStepObjectStepDetails DeserializeUnknownRunStepObjectStepDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "unknown"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepObjectStepDetails(type, serializedAdditionalRawData); + return new UnknownRunStepObjectStepDetails(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,15 +83,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepObjectStepDetails)PersistableModelCreateCore(data, options); + protected override RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepDetails(document.RootElement, options); } default: @@ -118,16 +101,5 @@ RunStepDetails IPersistableModel.Create(BinaryData data, ModelRe } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRunStepObjectStepDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRunStepObjectStepDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.cs index e91259e4e..fa6a7a879 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.cs @@ -9,11 +9,7 @@ namespace OpenAI.Assistants { internal partial class UnknownRunStepObjectStepDetails : RunStepDetails { - internal UnknownRunStepObjectStepDetails(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRunStepObjectStepDetails() + internal UnknownRunStepObjectStepDetails(string @type, IDictionary additionalBinaryDataProperties) : base(@type ?? "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index c6fdb45b8..fa0d22eae 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -7,67 +7,105 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class UserChatMessage : IJsonModel { - UserChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal UserChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(UserChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + } + + UserChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UserChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeUserChatMessage(document.RootElement, options); } - internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string name = default; - ChatMessageRole role = default; - IList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string role = "user"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UserChatMessage(role, content ?? new ChangeTrackingList(), serializedAdditionalRawData, name); + return new UserChatMessage(content, name, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -77,15 +115,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - UserChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + UserChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UserChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeUserChatMessage(document.RootElement, options); } default: @@ -95,15 +134,16 @@ UserChatMessage IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new UserChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(UserChatMessage userChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUserChatMessage(document.RootElement); + return BinaryContent.Create(userChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator UserChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeUserChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index 65a986ebd..7d728c37a 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -4,18 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class UserChatMessage : ChatMessage { - internal UserChatMessage(ChatMessageRole role, IList content, IDictionary serializedAdditionalRawData, string participantName) : base(role, content, serializedAdditionalRawData) + public UserChatMessage(BinaryData content) : base("user") { - ParticipantName = participantName; + Argument.AssertNotNull(content, nameof(content)); + + Content = content; } - internal UserChatMessage() + internal UserChatMessage(BinaryData content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + Name = name; } + + public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index d2aacb781..2ce1db2fe 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -7,61 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStore : IJsonModel { + internal VectorStore() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStore)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("usage_bytes") != true) - { - writer.WritePropertyName("usage_bytes"u8); - writer.WriteNumberValue(UsageBytes); - } - if (SerializedAdditionalRawData?.ContainsKey("file_counts") != true) - { - writer.WritePropertyName("file_counts"u8); - writer.WriteObjectValue(FileCounts, options); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("expires_after") != true && Optional.IsDefined(ExpirationPolicy)) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("usage_bytes"u8); + writer.WriteNumberValue(UsageBytes); + writer.WritePropertyName("file_counts"u8); + writer.WriteObjectValue(FileCounts, options); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); + if (Optional.IsDefined(ExpiresAfter)) { writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpirationPolicy, options); + writer.WriteObjectValue(ExpiresAfter, options); } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true && Optional.IsDefined(ExpiresAt)) + if (Optional.IsDefined(ExpiresAt)) { if (ExpiresAt != null) { @@ -70,50 +59,45 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio } else { - writer.WriteNull("expires_at"); + writer.WriteNull("expiresAt"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("last_active_at") != true) + if (LastActiveAt != null) { - if (LastActiveAt != null) - { - writer.WritePropertyName("last_active_at"u8); - writer.WriteNumberValue(LastActiveAt.Value, "U"); - } - else - { - writer.WriteNull("last_active_at"); - } + writer.WritePropertyName("last_active_at"u8); + writer.WriteNumberValue(LastActiveAt.Value, "U"); + } + else + { + writer.WriteNull("lastActiveAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -122,25 +106,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } - VectorStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStore JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStore)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStore(document.RootElement, options); } - internal static VectorStore DeserializeVectorStore(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStore DeserializeVectorStore(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -151,101 +133,106 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea string name = default; int usageBytes = default; VectorStoreFileCounts fileCounts = default; - VectorStoreStatus status = default; + VectorStores.VectorStoreStatus status = default; VectorStoreExpirationPolicy expiresAfter = default; DateTimeOffset? expiresAt = default; DateTimeOffset? lastActiveAt = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary metadata = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalVectorStoreObjectObject(property.Value.GetString()); + @object = new InternalVectorStoreObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("usage_bytes"u8)) + if (prop.NameEquals("usage_bytes"u8)) { - usageBytes = property.Value.GetInt32(); + usageBytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("file_counts"u8)) + if (prop.NameEquals("file_counts"u8)) { - fileCounts = VectorStoreFileCounts.DeserializeVectorStoreFileCounts(property.Value, options); + fileCounts = VectorStoreFileCounts.DeserializeVectorStoreFileCounts(prop.Value, options); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = property.Value.GetString().ToVectorStoreStatus(); + status = prop.Value.GetString().ToVectorStoreStatus(); continue; } - if (property.NameEquals("expires_after"u8)) + if (prop.NameEquals("expires_after"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + expiresAfter = null; continue; } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); + expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { expiresAt = null; continue; } - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("last_active_at"u8)) + if (prop.NameEquals("last_active_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastActiveAt = null; continue; } - lastActiveAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + lastActiveAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new VectorStore( id, @object, @@ -258,13 +245,14 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea expiresAt, lastActiveAt, metadata, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -274,15 +262,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - VectorStore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStore PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStore(document.RootElement, options); } default: @@ -292,15 +281,16 @@ VectorStore IPersistableModel.Create(BinaryData data, ModelReaderWr string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStore FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStore vectorStore) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStore(document.RootElement); + return BinaryContent.Create(vectorStore, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStore(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStore(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index 3f39a41e2..d5aad500d 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -9,13 +9,10 @@ namespace OpenAI.VectorStores { public partial class VectorStore { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStoreStatus status, DateTimeOffset? lastActiveAt, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(fileCounts, nameof(fileCounts)); + private protected IDictionary _additionalBinaryDataProperties; + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) + { Id = id; CreatedAt = createdAt; Name = name; @@ -26,7 +23,7 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage Metadata = metadata; } - internal VectorStore(string id, InternalVectorStoreObjectObject @object, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStoreStatus status, VectorStoreExpirationPolicy expirationPolicy, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal VectorStore(string id, InternalVectorStoreObjectObject @object, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, VectorStoreExpirationPolicy expiresAfter, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -35,26 +32,29 @@ internal VectorStore(string id, InternalVectorStoreObjectObject @object, DateTim UsageBytes = usageBytes; FileCounts = fileCounts; Status = status; - ExpirationPolicy = expirationPolicy; + ExpiresAfter = expiresAfter; ExpiresAt = expiresAt; LastActiveAt = lastActiveAt; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStore() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string Name { get; set; } + + public int UsageBytes { get; set; } + + public VectorStoreFileCounts FileCounts { get; set; } + + public VectorStores.VectorStoreStatus Status { get; set; } + + public DateTimeOffset? ExpiresAt { get; set; } - public string Id { get; } + public DateTimeOffset? LastActiveAt { get; set; } - public DateTimeOffset CreatedAt { get; } - public string Name { get; } - public int UsageBytes { get; } - public VectorStoreFileCounts FileCounts { get; } - public VectorStoreStatus Status { get; } - public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? LastActiveAt { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index bdfa594c4..6a5eafc2d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -7,61 +7,49 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreBatchFileJob : IJsonModel { + internal VectorStoreBatchFileJob() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreBatchFileJob)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(BatchId); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("vector_store_id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("vector_store_id"u8); + writer.WriteStringValue(VectorStoreId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("file_counts"u8); + writer.WriteObjectValue(FileCounts, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("vector_store_id"u8); - writer.WriteStringValue(VectorStoreId); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("file_counts") != true) - { - writer.WritePropertyName("file_counts"u8); - writer.WriteObjectValue(FileCounts, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -70,76 +58,71 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - VectorStoreBatchFileJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreBatchFileJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreBatchFileJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreBatchFileJob)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreBatchFileJob(document.RootElement, options); } - internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - object @object = default; + InternalVectorStoreFileBatchObjectObject @object = default; DateTimeOffset createdAt = default; string vectorStoreId = default; VectorStoreBatchFileJobStatus status = default; - VectorStoreFileCounts fileCounts = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalVectorStoreFileBatchObjectFileCounts fileCounts = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = property.Value.GetObject(); + @object = new InternalVectorStoreFileBatchObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("vector_store_id"u8)) + if (prop.NameEquals("vector_store_id"u8)) { - vectorStoreId = property.Value.GetString(); + vectorStoreId = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new VectorStoreBatchFileJobStatus(property.Value.GetString()); + status = new VectorStoreBatchFileJobStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("file_counts"u8)) + if (prop.NameEquals("file_counts"u8)) { - fileCounts = VectorStoreFileCounts.DeserializeVectorStoreFileCounts(property.Value, options); + fileCounts = InternalVectorStoreFileBatchObjectFileCounts.DeserializeInternalVectorStoreFileBatchObjectFileCounts(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new VectorStoreBatchFileJob( id, @object, @@ -147,13 +130,14 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE vectorStoreId, status, fileCounts, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -163,15 +147,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - VectorStoreBatchFileJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreBatchFileJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreBatchFileJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreBatchFileJob(document.RootElement, options); } default: @@ -181,15 +166,16 @@ VectorStoreBatchFileJob IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreBatchFileJob FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreBatchFileJob vectorStoreBatchFileJob) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreBatchFileJob(document.RootElement); + return BinaryContent.Create(vectorStoreBatchFileJob, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreBatchFileJob(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreBatchFileJob(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index a584a5e60..f7d5d2e3c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -9,37 +9,34 @@ namespace OpenAI.VectorStores { public partial class VectorStoreBatchFileJob { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal VectorStoreBatchFileJob(string batchId, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, VectorStoreFileCounts fileCounts) - { - Argument.AssertNotNull(batchId, nameof(batchId)); - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileCounts, nameof(fileCounts)); + private protected IDictionary _additionalBinaryDataProperties; - BatchId = batchId; + internal VectorStoreBatchFileJob(string id, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, InternalVectorStoreFileBatchObjectFileCounts fileCounts) + { + Id = id; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; FileCounts = fileCounts; } - internal VectorStoreBatchFileJob(string batchId, object @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, VectorStoreFileCounts fileCounts, IDictionary serializedAdditionalRawData) + internal VectorStoreBatchFileJob(string id, InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, InternalVectorStoreFileBatchObjectFileCounts fileCounts, IDictionary additionalBinaryDataProperties) { - BatchId = batchId; + Id = id; Object = @object; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; FileCounts = fileCounts; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStoreBatchFileJob() - { - } + public InternalVectorStoreFileBatchObjectObject Object { get; } = "vector_store.files_batch"; + + public DateTimeOffset CreatedAt { get; set; } + + public string VectorStoreId { get; set; } - public DateTimeOffset CreatedAt { get; } - public string VectorStoreId { get; } - public VectorStoreBatchFileJobStatus Status { get; } + public VectorStoreBatchFileJobStatus Status { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs index c47559446..57427d209 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { public readonly partial struct VectorStoreBatchFileJobStatus : IEquatable { private readonly string _value; - - public VectorStoreBatchFileJobStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string InProgressValue = "in_progress"; private const string CompletedValue = "completed"; private const string CancelledValue = "cancelled"; private const string FailedValue = "failed"; + public VectorStoreBatchFileJobStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static VectorStoreBatchFileJobStatus InProgress { get; } = new VectorStoreBatchFileJobStatus(InProgressValue); + public static VectorStoreBatchFileJobStatus Completed { get; } = new VectorStoreBatchFileJobStatus(CompletedValue); + public static VectorStoreBatchFileJobStatus Cancelled { get; } = new VectorStoreBatchFileJobStatus(CancelledValue); + public static VectorStoreBatchFileJobStatus Failed { get; } = new VectorStoreBatchFileJobStatus(FailedValue); + public static bool operator ==(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right) => left.Equals(right); + public static bool operator !=(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right) => !left.Equals(right); + public static implicit operator VectorStoreBatchFileJobStatus(string value) => new VectorStoreBatchFileJobStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is VectorStoreBatchFileJobStatus other && Equals(other); + public bool Equals(VectorStoreBatchFileJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs b/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs index d8e019322..1276dde8c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { public readonly partial struct VectorStoreCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public VectorStoreCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right) => left.Equals(right); + public static bool operator !=(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right) => !left.Equals(right); + public static implicit operator VectorStoreCollectionOrder(string value) => new VectorStoreCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is VectorStoreCollectionOrder other && Equals(other); + public bool Equals(VectorStoreCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index 3004632e0..348a1bfe0 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -7,7 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using OpenAI.VectorStores; +using OpenAI; namespace OpenAI.Assistants { @@ -15,50 +15,68 @@ public partial class VectorStoreCreationHelper : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreCreationHelper)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("chunking_strategy") != true && Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ChunkingStrategy); +#else + using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); writer.WriteStartObject(); foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -67,87 +85,98 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - VectorStoreCreationHelper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreCreationHelper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreCreationHelper JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreCreationHelper)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreCreationHelper(document.RootElement, options); } - internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList fileIds = default; - FileChunkingStrategy chunkingStrategy = default; + BinaryData chunkingStrategy = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (property.NameEquals("chunking_strategy"u8)) + if (prop.NameEquals("chunking_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } - chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(property.Value, options); + chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreCreationHelper(fileIds ?? new ChangeTrackingList(), chunkingStrategy, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new VectorStoreCreationHelper(fileIds ?? new ChangeTrackingList(), chunkingStrategy, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -157,15 +186,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - VectorStoreCreationHelper IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreCreationHelper IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreCreationHelper PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreCreationHelper(document.RootElement, options); } default: @@ -175,15 +205,16 @@ VectorStoreCreationHelper IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreCreationHelper FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreCreationHelper vectorStoreCreationHelper) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreCreationHelper(document.RootElement); + return BinaryContent.Create(vectorStoreCreationHelper, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreCreationHelper(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreCreationHelper(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs index 6871ab916..c88f9d2bb 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs @@ -4,28 +4,30 @@ using System; using System.Collections.Generic; -using OpenAI.VectorStores; +using OpenAI; namespace OpenAI.Assistants { public partial class VectorStoreCreationHelper { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public VectorStoreCreationHelper() { FileIds = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreCreationHelper(IList fileIds, FileChunkingStrategy chunkingStrategy, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal VectorStoreCreationHelper(IList fileIds, BinaryData chunkingStrategy, IDictionary metadata, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; ChunkingStrategy = chunkingStrategy; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 4b08b506a..3c97355a6 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,39 +15,56 @@ public partial class VectorStoreCreationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file_ids") != true && Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds)) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); foreach (var item in FileIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData?.ContainsKey("expires_after") != true && Optional.IsDefined(ExpirationPolicy)) + if (Optional.IsDefined(ExpiresAfter)) { writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpirationPolicy, options); + writer.WriteObjectValue(ExpiresAfter, options); } - if (SerializedAdditionalRawData?.ContainsKey("chunking_strategy") != true && Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ChunkingStrategy); +#else + using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -55,26 +73,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -83,25 +102,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - VectorStoreCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreCreationOptions(document.RootElement, options); } - internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -109,83 +126,102 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions IList fileIds = default; string name = default; VectorStoreExpirationPolicy expiresAfter = default; - FileChunkingStrategy chunkingStrategy = default; + BinaryData chunkingStrategy = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file_ids"u8)) + if (prop.NameEquals("file_ids"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } fileIds = array; continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (property.NameEquals("expires_after"u8)) + if (prop.NameEquals("expires_after"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + expiresAfter = null; continue; } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); + expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (property.NameEquals("chunking_strategy"u8)) + if (prop.NameEquals("chunking_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } - chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(property.Value, options); + chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new VectorStoreCreationOptions( fileIds ?? new ChangeTrackingList(), name, expiresAfter, chunkingStrategy, metadata ?? new ChangeTrackingDictionary(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -195,15 +231,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - VectorStoreCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreCreationOptions(document.RootElement, options); } default: @@ -213,15 +250,16 @@ VectorStoreCreationOptions IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreCreationOptions vectorStoreCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreCreationOptions(document.RootElement); + return BinaryContent.Create(vectorStoreCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs index 6d5f31216..edd44a70f 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs @@ -4,30 +4,34 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public VectorStoreCreationOptions() { FileIds = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreCreationOptions(IList fileIds, string name, VectorStoreExpirationPolicy expirationPolicy, FileChunkingStrategy chunkingStrategy, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal VectorStoreCreationOptions(IList fileIds, string name, VectorStoreExpirationPolicy expiresAfter, BinaryData chunkingStrategy, IDictionary metadata, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; Name = name; - ExpirationPolicy = expirationPolicy; + ExpiresAfter = expiresAfter; ChunkingStrategy = chunkingStrategy; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList FileIds { get; } + public string Name { get; set; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 2504be9db..8713d93c6 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreDeletionResult : IJsonModel { + internal VectorStoreDeletionResult() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreDeletionResult)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(VectorStoreId); - } - if (SerializedAdditionalRawData?.ContainsKey("deleted") != true) - { - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,25 +52,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - VectorStoreDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreDeletionResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreDeletionResult(document.RootElement, options); } - internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -81,39 +76,37 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J string id = default; bool deleted = default; InternalDeleteVectorStoreResponseObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("deleted"u8)) + if (prop.NameEquals("deleted"u8)) { - deleted = property.Value.GetBoolean(); + deleted = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteVectorStoreResponseObject(property.Value.GetString()); + @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreDeletionResult(id, deleted, @object, serializedAdditionalRawData); + return new VectorStoreDeletionResult(id, deleted, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - VectorStoreDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreDeletionResult(document.RootElement, options); } default: @@ -141,15 +135,16 @@ VectorStoreDeletionResult IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreDeletionResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreDeletionResult vectorStoreDeletionResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreDeletionResult(document.RootElement); + return BinaryContent.Create(vectorStoreDeletionResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreDeletionResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 1e046bda0..99824e833 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -9,26 +9,22 @@ namespace OpenAI.VectorStores { public partial class VectorStoreDeletionResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal VectorStoreDeletionResult(string vectorStoreId, bool deleted) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + private protected IDictionary _additionalBinaryDataProperties; - VectorStoreId = vectorStoreId; + internal VectorStoreDeletionResult(string id, bool deleted) + { + Id = id; Deleted = deleted; } - internal VectorStoreDeletionResult(string vectorStoreId, bool deleted, InternalDeleteVectorStoreResponseObject @object, IDictionary serializedAdditionalRawData) + internal VectorStoreDeletionResult(string id, bool deleted, InternalDeleteVectorStoreResponseObject @object, IDictionary additionalBinaryDataProperties) { - VectorStoreId = vectorStoreId; + Id = id; Deleted = deleted; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStoreDeletionResult() - { - } - public bool Deleted { get; } + public bool Deleted { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationAnchor.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationAnchor.Serialization.cs index 90af403e1..0c7b2962c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationAnchor.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationAnchor.Serialization.cs @@ -8,15 +8,18 @@ namespace OpenAI.VectorStores { internal static partial class VectorStoreExpirationAnchorExtensions { - public static string ToSerialString(this VectorStoreExpirationAnchor value) => value switch + public static string ToSerialString(this VectorStores.VectorStoreExpirationAnchor value) => value switch { - VectorStoreExpirationAnchor.LastActiveAt => "last_active_at", + VectorStores.VectorStoreExpirationAnchor.LastActiveAt => "last_active_at", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreExpirationAnchor value.") }; - public static VectorStoreExpirationAnchor ToVectorStoreExpirationAnchor(this string value) + public static VectorStores.VectorStoreExpirationAnchor ToVectorStoreExpirationAnchor(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "last_active_at")) return VectorStoreExpirationAnchor.LastActiveAt; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "last_active_at")) + { + return VectorStores.VectorStoreExpirationAnchor.LastActiveAt; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreExpirationAnchor value."); } } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index 76b1d5d3c..fc46d1dad 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,34 +15,29 @@ public partial class VectorStoreExpirationPolicy : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("anchor") != true) - { - writer.WritePropertyName("anchor"u8); - writer.WriteStringValue(_anchor.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("days") != true) - { - writer.WritePropertyName("days"u8); - writer.WriteNumberValue(_days); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("anchor"u8); + writer.WriteStringValue(Anchor.ToSerialString()); + writer.WritePropertyName("days"u8); + writer.WriteNumberValue(Days); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +46,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - VectorStoreExpirationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreExpirationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreExpirationPolicy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreExpirationPolicy(document.RootElement, options); } - internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPolicy(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPolicy(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - VectorStoreExpirationAnchor anchor = default; + VectorStores.VectorStoreExpirationAnchor anchor = default; int days = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("anchor"u8)) + if (prop.NameEquals("anchor"u8)) { - anchor = property.Value.GetString().ToVectorStoreExpirationAnchor(); + anchor = prop.Value.GetString().ToVectorStoreExpirationAnchor(); continue; } - if (property.NameEquals("days"u8)) + if (prop.NameEquals("days"u8)) { - days = property.Value.GetInt32(); + days = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreExpirationPolicy(anchor, days, serializedAdditionalRawData); + return new VectorStoreExpirationPolicy(anchor, days, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +104,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - VectorStoreExpirationPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreExpirationPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreExpirationPolicy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreExpirationPolicy(document.RootElement, options); } default: @@ -130,15 +123,16 @@ VectorStoreExpirationPolicy IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreExpirationPolicy FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreExpirationPolicy vectorStoreExpirationPolicy) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreExpirationPolicy(document.RootElement); + return BinaryContent.Create(vectorStoreExpirationPolicy, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreExpirationPolicy(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreExpirationPolicy(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs index 3fd71c7e7..af60e2adc 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs @@ -9,5 +9,6 @@ namespace OpenAI.VectorStores { public partial class VectorStoreExpirationPolicy { + private protected IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index ede8e0d5b..430df6499 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -7,78 +7,70 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociation : IJsonModel { + internal VectorStoreFileAssociation() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileAssociation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("usage_bytes"u8); + writer.WriteNumberValue(UsageBytes); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("vector_store_id"u8); + writer.WriteStringValue(VectorStoreId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); + if (LastError != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(FileId); + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("lastError"u8); } - if (SerializedAdditionalRawData?.ContainsKey("usage_bytes") != true) + if (Optional.IsDefined(ChunkingStrategy)) { - writer.WritePropertyName("usage_bytes"u8); - writer.WriteNumberValue(Size); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("vector_store_id") != true) - { - writer.WritePropertyName("vector_store_id"u8); - writer.WriteStringValue(VectorStoreId); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("last_error") != true) - { - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else + writer.WritePropertyName("chunking_strategy"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ChunkingStrategy); +#else + using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) { - writer.WriteNull("last_error"); + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } - if (SerializedAdditionalRawData?.ContainsKey("chunking_strategy") != true && Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, options); - } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -87,25 +79,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - VectorStoreFileAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreFileAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreFileAssociation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileAssociation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreFileAssociation(document.RootElement, options); } - internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -115,69 +105,67 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation int usageBytes = default; DateTimeOffset createdAt = default; string vectorStoreId = default; - VectorStoreFileAssociationStatus status = default; + VectorStores.VectorStoreFileAssociationStatus status = default; VectorStoreFileAssociationError lastError = default; - FileChunkingStrategy chunkingStrategy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData chunkingStrategy = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = new InternalVectorStoreFileObjectObject(property.Value.GetString()); + @object = new InternalVectorStoreFileObjectObject(prop.Value.GetString()); continue; } - if (property.NameEquals("usage_bytes"u8)) + if (prop.NameEquals("usage_bytes"u8)) { - usageBytes = property.Value.GetInt32(); + usageBytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("vector_store_id"u8)) + if (prop.NameEquals("vector_store_id"u8)) { - vectorStoreId = property.Value.GetString(); + vectorStoreId = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = property.Value.GetString().ToVectorStoreFileAssociationStatus(); + status = prop.Value.GetString().ToVectorStoreFileAssociationStatus(); continue; } - if (property.NameEquals("last_error"u8)) + if (prop.NameEquals("last_error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastError = null; continue; } - lastError = VectorStoreFileAssociationError.DeserializeVectorStoreFileAssociationError(property.Value, options); + lastError = VectorStoreFileAssociationError.DeserializeVectorStoreFileAssociationError(prop.Value, options); continue; } - if (property.NameEquals("chunking_strategy"u8)) + if (prop.NameEquals("chunking_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } - chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(property.Value, options); + chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new VectorStoreFileAssociation( id, @object, @@ -187,13 +175,14 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation status, lastError, chunkingStrategy, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -203,15 +192,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - VectorStoreFileAssociation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreFileAssociation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreFileAssociation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreFileAssociation(document.RootElement, options); } default: @@ -221,15 +211,16 @@ VectorStoreFileAssociation IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreFileAssociation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreFileAssociation vectorStoreFileAssociation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreFileAssociation(document.RootElement); + return BinaryContent.Create(vectorStoreFileAssociation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreFileAssociation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreFileAssociation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index c7da0b027..084197083 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -9,39 +9,37 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociation { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal VectorStoreFileAssociation(string fileId, int size, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + private protected IDictionary _additionalBinaryDataProperties; - FileId = fileId; - Size = size; + internal VectorStoreFileAssociation(string id, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError) + { + Id = id; + UsageBytes = usageBytes; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; LastError = lastError; } - internal VectorStoreFileAssociation(string fileId, InternalVectorStoreFileObjectObject @object, int size, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, FileChunkingStrategy chunkingStrategy, IDictionary serializedAdditionalRawData) + internal VectorStoreFileAssociation(string id, InternalVectorStoreFileObjectObject @object, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, BinaryData chunkingStrategy, IDictionary additionalBinaryDataProperties) { - FileId = fileId; + Id = id; Object = @object; - Size = size; + UsageBytes = usageBytes; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; LastError = lastError; ChunkingStrategy = chunkingStrategy; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStoreFileAssociation() - { - } - public DateTimeOffset CreatedAt { get; } - public string VectorStoreId { get; } - public VectorStoreFileAssociationStatus Status { get; } - public VectorStoreFileAssociationError LastError { get; } + public DateTimeOffset CreatedAt { get; set; } + + public string VectorStoreId { get; set; } + + public VectorStores.VectorStoreFileAssociationStatus Status { get; set; } + + public VectorStoreFileAssociationError LastError { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs index 02656b21d..1bc70287b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { public readonly partial struct VectorStoreFileAssociationCollectionOrder : IEquatable { private readonly string _value; + private const string AscValue = "asc"; + private const string DescValue = "desc"; public VectorStoreFileAssociationCollectionOrder(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right) => left.Equals(right); + public static bool operator !=(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right) => !left.Equals(right); + public static implicit operator VectorStoreFileAssociationCollectionOrder(string value) => new VectorStoreFileAssociationCollectionOrder(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is VectorStoreFileAssociationCollectionOrder other && Equals(other); + public bool Equals(VectorStoreFileAssociationCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index 9bc7e2126..f815f0f11 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociationError : IJsonModel { + internal VectorStoreFileAssociationError() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileAssociationError)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("code") != true) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - VectorStoreFileAssociationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreFileAssociationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreFileAssociationError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileAssociationError)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreFileAssociationError(document.RootElement, options); } - internal static VectorStoreFileAssociationError DeserializeVectorStoreFileAssociationError(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreFileAssociationError DeserializeVectorStoreFileAssociationError(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } VectorStoreFileAssociationErrorCode code = default; string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("code"u8)) + if (prop.NameEquals("code"u8)) { - code = new VectorStoreFileAssociationErrorCode(property.Value.GetString()); + code = new VectorStoreFileAssociationErrorCode(prop.Value.GetString()); continue; } - if (property.NameEquals("message"u8)) + if (prop.NameEquals("message"u8)) { - message = property.Value.GetString(); + message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreFileAssociationError(code, message, serializedAdditionalRawData); + return new VectorStoreFileAssociationError(code, message, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - VectorStoreFileAssociationError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreFileAssociationError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreFileAssociationError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreFileAssociationError(document.RootElement, options); } default: @@ -130,15 +127,16 @@ VectorStoreFileAssociationError IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreFileAssociationError FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreFileAssociationError vectorStoreFileAssociationError) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreFileAssociationError(document.RootElement); + return BinaryContent.Create(vectorStoreFileAssociationError, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreFileAssociationError(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreFileAssociationError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs index 638e7f527..dbf84187d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs @@ -9,27 +9,23 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociationError { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code, string message) { - Argument.AssertNotNull(message, nameof(message)); - Code = code; Message = message; } - internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code, string message, IDictionary serializedAdditionalRawData) + internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code, string message, IDictionary additionalBinaryDataProperties) { Code = code; Message = message; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStoreFileAssociationError() - { - } + public VectorStoreFileAssociationErrorCode Code { get; set; } - public VectorStoreFileAssociationErrorCode Code { get; } - public string Message { get; } + public string Message { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs index 167ad6b2a..16bebef5e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { public readonly partial struct VectorStoreFileAssociationErrorCode : IEquatable { private readonly string _value; + private const string ServerErrorValue = "server_error"; + private const string UnsupportedFileValue = "unsupported_file"; + private const string InvalidFileValue = "invalid_file"; public VectorStoreFileAssociationErrorCode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ServerErrorValue = "server_error"; - private const string UnsupportedFileValue = "unsupported_file"; - private const string InvalidFileValue = "invalid_file"; + _value = value; + } public static VectorStoreFileAssociationErrorCode ServerError { get; } = new VectorStoreFileAssociationErrorCode(ServerErrorValue); + public static VectorStoreFileAssociationErrorCode UnsupportedFile { get; } = new VectorStoreFileAssociationErrorCode(UnsupportedFileValue); + public static VectorStoreFileAssociationErrorCode InvalidFile { get; } = new VectorStoreFileAssociationErrorCode(InvalidFileValue); + public static bool operator ==(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right) => left.Equals(right); + public static bool operator !=(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right) => !left.Equals(right); + public static implicit operator VectorStoreFileAssociationErrorCode(string value) => new VectorStoreFileAssociationErrorCode(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is VectorStoreFileAssociationErrorCode other && Equals(other); + public bool Equals(VectorStoreFileAssociationErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationStatus.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationStatus.Serialization.cs index fc493ac6a..49c9326c3 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationStatus.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationStatus.Serialization.cs @@ -8,21 +8,33 @@ namespace OpenAI.VectorStores { internal static partial class VectorStoreFileAssociationStatusExtensions { - public static string ToSerialString(this VectorStoreFileAssociationStatus value) => value switch + public static string ToSerialString(this VectorStores.VectorStoreFileAssociationStatus value) => value switch { - VectorStoreFileAssociationStatus.InProgress => "in_progress", - VectorStoreFileAssociationStatus.Completed => "completed", - VectorStoreFileAssociationStatus.Cancelled => "cancelled", - VectorStoreFileAssociationStatus.Failed => "failed", + VectorStores.VectorStoreFileAssociationStatus.InProgress => "in_progress", + VectorStores.VectorStoreFileAssociationStatus.Completed => "completed", + VectorStores.VectorStoreFileAssociationStatus.Cancelled => "cancelled", + VectorStores.VectorStoreFileAssociationStatus.Failed => "failed", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreFileAssociationStatus value.") }; - public static VectorStoreFileAssociationStatus ToVectorStoreFileAssociationStatus(this string value) + public static VectorStores.VectorStoreFileAssociationStatus ToVectorStoreFileAssociationStatus(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress")) return VectorStoreFileAssociationStatus.InProgress; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed")) return VectorStoreFileAssociationStatus.Completed; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "cancelled")) return VectorStoreFileAssociationStatus.Cancelled; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "failed")) return VectorStoreFileAssociationStatus.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress")) + { + return VectorStores.VectorStoreFileAssociationStatus.InProgress; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed")) + { + return VectorStores.VectorStoreFileAssociationStatus.Completed; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "cancelled")) + { + return VectorStores.VectorStoreFileAssociationStatus.Cancelled; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "failed")) + { + return VectorStores.VectorStoreFileAssociationStatus.Failed; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreFileAssociationStatus value."); } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index 0a4998a0f..44c1a8ce1 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -7,56 +7,47 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreFileCounts : IJsonModel { + internal VectorStoreFileCounts() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileCounts)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("in_progress") != true) - { - writer.WritePropertyName("in_progress"u8); - writer.WriteNumberValue(InProgress); - } - if (SerializedAdditionalRawData?.ContainsKey("completed") != true) - { - writer.WritePropertyName("completed"u8); - writer.WriteNumberValue(Completed); - } - if (SerializedAdditionalRawData?.ContainsKey("failed") != true) - { - writer.WritePropertyName("failed"u8); - writer.WriteNumberValue(Failed); - } - if (SerializedAdditionalRawData?.ContainsKey("cancelled") != true) - { - writer.WritePropertyName("cancelled"u8); - writer.WriteNumberValue(Cancelled); - } - if (SerializedAdditionalRawData?.ContainsKey("total") != true) - { - writer.WritePropertyName("total"u8); - writer.WriteNumberValue(Total); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("in_progress"u8); + writer.WriteNumberValue(InProgress); + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + writer.WritePropertyName("cancelled"u8); + writer.WriteNumberValue(Cancelled); + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -65,25 +56,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - VectorStoreFileCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreFileCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreFileCounts JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreFileCounts)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreFileCounts(document.RootElement, options); } - internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -93,55 +82,53 @@ internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonEleme int failed = default; int cancelled = default; int total = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("in_progress"u8)) + if (prop.NameEquals("in_progress"u8)) { - inProgress = property.Value.GetInt32(); + inProgress = prop.Value.GetInt32(); continue; } - if (property.NameEquals("completed"u8)) + if (prop.NameEquals("completed"u8)) { - completed = property.Value.GetInt32(); + completed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("failed"u8)) + if (prop.NameEquals("failed"u8)) { - failed = property.Value.GetInt32(); + failed = prop.Value.GetInt32(); continue; } - if (property.NameEquals("cancelled"u8)) + if (prop.NameEquals("cancelled"u8)) { - cancelled = property.Value.GetInt32(); + cancelled = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total"u8)) + if (prop.NameEquals("total"u8)) { - total = property.Value.GetInt32(); + total = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new VectorStoreFileCounts( inProgress, completed, failed, cancelled, total, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -151,15 +138,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - VectorStoreFileCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreFileCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreFileCounts PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreFileCounts(document.RootElement, options); } default: @@ -169,15 +157,16 @@ VectorStoreFileCounts IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreFileCounts FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreFileCounts vectorStoreFileCounts) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreFileCounts(document.RootElement); + return BinaryContent.Create(vectorStoreFileCounts, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreFileCounts(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreFileCounts(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs index 7d35eacce..e9d2a780e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs @@ -9,7 +9,8 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileCounts { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal VectorStoreFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { InProgress = inProgress; @@ -19,24 +20,24 @@ internal VectorStoreFileCounts(int inProgress, int completed, int failed, int ca Total = total; } - internal VectorStoreFileCounts(int inProgress, int completed, int failed, int cancelled, int total, IDictionary serializedAdditionalRawData) + internal VectorStoreFileCounts(int inProgress, int completed, int failed, int cancelled, int total, IDictionary additionalBinaryDataProperties) { InProgress = inProgress; Completed = completed; Failed = failed; Cancelled = cancelled; Total = total; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal VectorStoreFileCounts() - { - } + public int InProgress { get; set; } + + public int Completed { get; set; } + + public int Failed { get; set; } + + public int Cancelled { get; set; } - public int InProgress { get; } - public int Completed { get; } - public int Failed { get; } - public int Cancelled { get; } - public int Total { get; } + public int Total { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs b/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs index 762b7f106..1d3eadcfc 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs @@ -4,37 +4,46 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.VectorStores { public readonly partial struct VectorStoreFileStatusFilter : IEquatable { private readonly string _value; - - public VectorStoreFileStatusFilter(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string InProgressValue = "in_progress"; private const string CompletedValue = "completed"; private const string FailedValue = "failed"; private const string CancelledValue = "cancelled"; + public VectorStoreFileStatusFilter(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static VectorStoreFileStatusFilter InProgress { get; } = new VectorStoreFileStatusFilter(InProgressValue); + public static VectorStoreFileStatusFilter Completed { get; } = new VectorStoreFileStatusFilter(CompletedValue); + public static VectorStoreFileStatusFilter Failed { get; } = new VectorStoreFileStatusFilter(FailedValue); + public static VectorStoreFileStatusFilter Cancelled { get; } = new VectorStoreFileStatusFilter(CancelledValue); + public static bool operator ==(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right) => left.Equals(right); + public static bool operator !=(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right) => !left.Equals(right); + public static implicit operator VectorStoreFileStatusFilter(string value) => new VectorStoreFileStatusFilter(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is VectorStoreFileStatusFilter other && Equals(other); + public bool Equals(VectorStoreFileStatusFilter other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index 16e2ec490..851fe450b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.VectorStores { @@ -14,14 +15,19 @@ public partial class VectorStoreModificationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreModificationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { if (Name != null) { @@ -30,22 +36,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } else { - writer.WriteNull("name"); + writer.WriteNull("name"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("expires_after") != true && Optional.IsDefined(ExpirationPolicy)) + if (Optional.IsDefined(ExpiresAfter)) { - if (ExpirationPolicy != null) + if (ExpiresAfter != null) { writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpirationPolicy, options); + writer.WriteObjectValue(ExpiresAfter, options); } else { - writer.WriteNull("expires_after"); + writer.WriteNull("expiresAfter"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) { @@ -54,26 +60,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod foreach (var item in Metadata) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("metadata"); + writer.WriteNull("metadata"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -82,25 +89,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } - VectorStoreModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VectorStoreModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual VectorStoreModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(VectorStoreModificationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeVectorStoreModificationOptions(document.RootElement, options); } - internal static VectorStoreModificationOptions DeserializeVectorStoreModificationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static VectorStoreModificationOptions DeserializeVectorStoreModificationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -108,58 +113,63 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio string name = default; VectorStoreExpirationPolicy expiresAfter = default; IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { name = null; continue; } - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("expires_after"u8)) + if (prop.NameEquals("expires_after"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { expiresAfter = null; continue; } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); + expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreModificationOptions(name, expiresAfter, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new VectorStoreModificationOptions(name, expiresAfter, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -169,15 +179,16 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - VectorStoreModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + VectorStoreModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual VectorStoreModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeVectorStoreModificationOptions(document.RootElement, options); } default: @@ -187,15 +198,16 @@ VectorStoreModificationOptions IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static VectorStoreModificationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(VectorStoreModificationOptions vectorStoreModificationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorStoreModificationOptions(document.RootElement); + return BinaryContent.Create(vectorStoreModificationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator VectorStoreModificationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeVectorStoreModificationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs index 8597db68c..80056a7ad 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs @@ -4,26 +4,29 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.VectorStores { public partial class VectorStoreModificationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public VectorStoreModificationOptions() { Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreModificationOptions(string name, VectorStoreExpirationPolicy expirationPolicy, IDictionary metadata, IDictionary serializedAdditionalRawData) + internal VectorStoreModificationOptions(string name, VectorStoreExpirationPolicy expiresAfter, IDictionary metadata, IDictionary additionalBinaryDataProperties) { Name = name; - ExpirationPolicy = expirationPolicy; + ExpiresAfter = expiresAfter; Metadata = metadata; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Name { get; set; } + public IDictionary Metadata { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreStatus.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreStatus.Serialization.cs index c4417aef5..51e3ad31d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreStatus.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreStatus.Serialization.cs @@ -8,19 +8,28 @@ namespace OpenAI.VectorStores { internal static partial class VectorStoreStatusExtensions { - public static string ToSerialString(this VectorStoreStatus value) => value switch + public static string ToSerialString(this VectorStores.VectorStoreStatus value) => value switch { - VectorStoreStatus.Expired => "expired", - VectorStoreStatus.InProgress => "in_progress", - VectorStoreStatus.Completed => "completed", + VectorStores.VectorStoreStatus.Expired => "expired", + VectorStores.VectorStoreStatus.InProgress => "in_progress", + VectorStores.VectorStoreStatus.Completed => "completed", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreStatus value.") }; - public static VectorStoreStatus ToVectorStoreStatus(this string value) + public static VectorStores.VectorStoreStatus ToVectorStoreStatus(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "expired")) return VectorStoreStatus.Expired; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress")) return VectorStoreStatus.InProgress; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed")) return VectorStoreStatus.Completed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "expired")) + { + return VectorStores.VectorStoreStatus.Expired; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress")) + { + return VectorStores.VectorStoreStatus.InProgress; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed")) + { + return VectorStores.VectorStoreStatus.Completed; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreStatus value."); } } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index dfdc93fe7..7de03afea 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -7,102 +7,82 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.FineTuning { internal partial class WeightsAndBiasesIntegration : IJsonModel { + internal WeightsAndBiasesIntegration() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WeightsAndBiasesIntegration)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("wandb") != true) - { - writer.WritePropertyName("wandb"u8); - writer.WriteObjectValue(Wandb, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("wandb"u8); + writer.WriteObjectValue(Wandb, options); } - WeightsAndBiasesIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + WeightsAndBiasesIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (WeightsAndBiasesIntegration)JsonModelCreateCore(ref reader, options); + + protected override FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WeightsAndBiasesIntegration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeWeightsAndBiasesIntegration(document.RootElement, options); } - internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegration(JsonElement element, ModelReaderWriterOptions options = null) + internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string @type = "wandb"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("wandb"u8)) + if (prop.NameEquals("wandb"u8)) { - wandb = InternalCreateFineTuningJobRequestWandbIntegrationWandb.DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(property.Value, options); + wandb = InternalCreateFineTuningJobRequestWandbIntegrationWandb.DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(prop.Value, options); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new WeightsAndBiasesIntegration(type, serializedAdditionalRawData, wandb); + return new WeightsAndBiasesIntegration(wandb, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +92,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - WeightsAndBiasesIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + WeightsAndBiasesIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (WeightsAndBiasesIntegration)PersistableModelCreateCore(data, options); + protected override FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeWeightsAndBiasesIntegration(document.RootElement, options); } default: @@ -130,15 +111,16 @@ WeightsAndBiasesIntegration IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new WeightsAndBiasesIntegration FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(WeightsAndBiasesIntegration weightsAndBiasesIntegration) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeWeightsAndBiasesIntegration(document.RootElement); + return BinaryContent.Create(weightsAndBiasesIntegration, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator WeightsAndBiasesIntegration(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeWeightsAndBiasesIntegration(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs index 98fb23f82..ecbf736d6 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs @@ -4,28 +4,24 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.FineTuning { internal partial class WeightsAndBiasesIntegration : FineTuningIntegration { - public WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb) + public WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb) : base("wandb") { Argument.AssertNotNull(wandb, nameof(wandb)); - Type = "wandb"; Wandb = wandb; } - internal WeightsAndBiasesIntegration(string type, IDictionary serializedAdditionalRawData, InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb) : base(type, serializedAdditionalRawData) + internal WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Wandb = wandb; } - internal WeightsAndBiasesIntegration() - { - } - - public InternalCreateFineTuningJobRequestWandbIntegrationWandb Wandb { get; } + public InternalCreateFineTuningJobRequestWandbIntegrationWandb Wandb { get; set; } } } diff --git a/.dotnet/src/Generated/ModerationClient.RestClient.cs b/.dotnet/src/Generated/ModerationClient.RestClient.cs new file mode 100644 index 000000000..b89fd6345 --- /dev/null +++ b/.dotnet/src/Generated/ModerationClient.RestClient.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.Moderations +{ + public partial class ModerationClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.ModerationClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.ModerationClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ModerationClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateCreateModerationRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/moderations", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/ModerationClient.cs b/.dotnet/src/Generated/ModerationClient.cs index 9eac79948..e9b11d1f4 100644 --- a/.dotnet/src/Generated/ModerationClient.cs +++ b/.dotnet/src/Generated/ModerationClient.cs @@ -5,43 +5,20 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Moderations { - // Data plane generated sub-client. public partial class ModerationClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected ModerationClient() { } - internal PipelineMessage CreateCreateModerationRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/moderations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/OpenAIClient.RestClient.cs b/.dotnet/src/Generated/OpenAIClient.RestClient.cs new file mode 100644 index 000000000..c9bf6a757 --- /dev/null +++ b/.dotnet/src/Generated/OpenAIClient.RestClient.cs @@ -0,0 +1,47 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; + +namespace OpenAI +{ + public partial class OpenAIClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 6b71023a8..9340df58d 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -21,19 +21,113 @@ namespace OpenAI { - // Data plane generated client. public partial class OpenAIClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; + private AudioClient _cachedAudioClient; + private AssistantClient _cachedAssistantClient; + private BatchClient _cachedBatchClient; + private ChatClient _cachedChatClient; + private LegacyCompletionClient _cachedLegacyCompletionClient; + private EmbeddingClient _cachedEmbeddingClient; + private FileClient _cachedFileClient; + private FineTuningClient _cachedFineTuningClient; + private ImageClient _cachedImageClient; + private InternalAssistantMessageClient _cachedInternalAssistantMessageClient; + private ModelClient _cachedModelClient; + private ModerationClient _cachedModerationClient; + private InternalAssistantThreadClient _cachedInternalAssistantThreadClient; + private InternalAssistantRunClient _cachedInternalAssistantRunClient; + private VectorStoreClient _cachedVectorStoreClient; + private InternalUploadsClient _cachedInternalUploadsClient; protected OpenAIClient() { } + + public ClientPipeline Pipeline { get; } + + public virtual AudioClient GetAudioClientClient() + { + return Volatile.Read(ref _cachedAudioClient) ?? Interlocked.CompareExchange(ref _cachedAudioClient, new AudioClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAudioClient; + } + + public virtual AssistantClient GetAssistantClientClient() + { + return Volatile.Read(ref _cachedAssistantClient) ?? Interlocked.CompareExchange(ref _cachedAssistantClient, new AssistantClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAssistantClient; + } + + public virtual BatchClient GetBatchClientClient() + { + return Volatile.Read(ref _cachedBatchClient) ?? Interlocked.CompareExchange(ref _cachedBatchClient, new BatchClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedBatchClient; + } + + public virtual ChatClient GetChatClientClient() + { + return Volatile.Read(ref _cachedChatClient) ?? Interlocked.CompareExchange(ref _cachedChatClient, new ChatClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedChatClient; + } + + public virtual LegacyCompletionClient GetLegacyCompletionClientClient() + { + return Volatile.Read(ref _cachedLegacyCompletionClient) ?? Interlocked.CompareExchange(ref _cachedLegacyCompletionClient, new LegacyCompletionClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedLegacyCompletionClient; + } + + public virtual EmbeddingClient GetEmbeddingClientClient() + { + return Volatile.Read(ref _cachedEmbeddingClient) ?? Interlocked.CompareExchange(ref _cachedEmbeddingClient, new EmbeddingClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedEmbeddingClient; + } + + public virtual FileClient GetFileClientClient() + { + return Volatile.Read(ref _cachedFileClient) ?? Interlocked.CompareExchange(ref _cachedFileClient, new FileClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedFileClient; + } + + public virtual FineTuningClient GetFineTuningClientClient() + { + return Volatile.Read(ref _cachedFineTuningClient) ?? Interlocked.CompareExchange(ref _cachedFineTuningClient, new FineTuningClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedFineTuningClient; + } + + public virtual ImageClient GetImageClientClient() + { + return Volatile.Read(ref _cachedImageClient) ?? Interlocked.CompareExchange(ref _cachedImageClient, new ImageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedImageClient; + } + + public virtual InternalAssistantMessageClient GetInternalAssistantMessageClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantMessageClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantMessageClient, new InternalAssistantMessageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantMessageClient; + } + + public virtual ModelClient GetModelClientClient() + { + return Volatile.Read(ref _cachedModelClient) ?? Interlocked.CompareExchange(ref _cachedModelClient, new ModelClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedModelClient; + } + + public virtual ModerationClient GetModerationClientClient() + { + return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedModerationClient; + } + + public virtual InternalAssistantThreadClient GetInternalAssistantThreadClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; + } + + public virtual InternalAssistantRunClient GetInternalAssistantRunClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantRunClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantRunClient, new InternalAssistantRunClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantRunClient; + } + + public virtual VectorStoreClient GetVectorStoreClientClient() + { + return Volatile.Read(ref _cachedVectorStoreClient) ?? Interlocked.CompareExchange(ref _cachedVectorStoreClient, new VectorStoreClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedVectorStoreClient; + } + + public virtual InternalUploadsClient GetInternalUploadsClientClient() + { + return Volatile.Read(ref _cachedInternalUploadsClient) ?? Interlocked.CompareExchange(ref _cachedInternalUploadsClient, new InternalUploadsClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalUploadsClient; + } } } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 68a9674fd..0c709bfaa 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -9,69 +9,431 @@ using OpenAI.Audio; using OpenAI.Chat; using OpenAI.Embeddings; +using OpenAI.Files; using OpenAI.Images; +using OpenAI.Models; using OpenAI.Moderations; using OpenAI.VectorStores; namespace OpenAI { - internal static partial class OpenAIModelFactory + public static partial class OpenAIModelFactory { + public static OpenAIFileInfo OpenAIFileInfo(string id = default, int? bytes = default, DateTimeOffset createdAt = default, string filename = default, InternalOpenAIFileObject @object = default, OpenAIFilePurpose purpose = default, OpenAIFileStatus status = default, string statusDetails = default) + { + + return new OpenAIFileInfo( + id, + bytes, + createdAt, + filename, + @object, + purpose, + status, + statusDetails, + null); + } + + public static VectorStore VectorStore(string id = default, InternalVectorStoreObjectObject @object = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStore( + id, + @object, + createdAt, + name, + usageBytes, + fileCounts, + status, + expiresAfter, + expiresAt, + lastActiveAt, + metadata, + null); + } + public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) { + return new VectorStoreFileCounts( inProgress, completed, failed, cancelled, total, - serializedAdditionalRawData: null); + null); + } + + public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy(VectorStores.VectorStoreExpirationAnchor anchor = default, int days = default) + { + + return new VectorStoreExpirationPolicy(anchor, days, null); + } + + public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, VectorStoreExpirationPolicy expiresAfter = default, BinaryData chunkingStrategy = default, IDictionary metadata = default) + { + fileIds ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreCreationOptions( + fileIds?.ToList(), + name, + expiresAfter, + chunkingStrategy, + metadata, + null); + } + + public static VectorStoreModificationOptions VectorStoreModificationOptions(string name = default, VectorStoreExpirationPolicy expiresAfter = default, IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreModificationOptions(name, expiresAfter, metadata, null); } - public static VectorStoreFileAssociationError VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code = default, string message = null) + public static VectorStoreDeletionResult VectorStoreDeletionResult(string id = default, bool deleted = default, InternalDeleteVectorStoreResponseObject @object = default) { - return new VectorStoreFileAssociationError(code, message, serializedAdditionalRawData: null); + + return new VectorStoreDeletionResult(id, deleted, @object, null); + } + + public static VectorStoreFileAssociation VectorStoreFileAssociation(string id = default, InternalVectorStoreFileObjectObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, BinaryData chunkingStrategy = default) + { + + return new VectorStoreFileAssociation( + id, + @object, + usageBytes, + createdAt, + vectorStoreId, + status, + lastError, + chunkingStrategy, + null); + } + + public static VectorStoreFileAssociationError VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code = default, string message = default) + { + + return new VectorStoreFileAssociationError(code, message, null); + } + + public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails @static = default) + { + + return new StaticFileChunkingStrategy(@static, "static", null); } - public static RunError RunError(RunErrorCode code = default, string message = null) + public static FileChunkingStrategy FileChunkingStrategy(string @type = default) { - return new RunError(code, message, serializedAdditionalRawData: null); + + return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, null); } - public static RunIncompleteDetails RunIncompleteDetails(RunIncompleteReason? reason = null) + public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string id = default, bool deleted = default, InternalDeleteVectorStoreFileResponseObject @object = default) { - return new RunIncompleteDetails(reason, serializedAdditionalRawData: null); + + return new FileFromStoreRemovalResult(id, deleted, @object, null); + } + + public static VectorStoreBatchFileJob VectorStoreBatchFileJob(string id = default, InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, InternalVectorStoreFileBatchObjectFileCounts fileCounts = default) + { + + return new VectorStoreBatchFileJob( + id, + @object, + createdAt, + vectorStoreId, + status, + fileCounts, + null); + } + + public static ThreadCreationOptions ThreadCreationOptions(IEnumerable messages = default, InternalCreateThreadRequestToolResources toolResources = default, IDictionary metadata = default) + { + messages ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadCreationOptions(messages?.ToList(), toolResources, metadata, null); + } + + public static MessageCreationOptions MessageCreationOptions(Assistants.MessageRole role = default, IEnumerable content = default, IEnumerable attachments = default, IDictionary metadata = default) + { + content ??= new ChangeTrackingList(); + attachments ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new MessageCreationOptions(role, content?.ToList(), attachments?.ToList(), metadata, null); + } + + public static MessageContent MessageContent() + { + + return new MessageContent(null); + } + + public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) + { + tools ??= new ChangeTrackingList(); + + return new MessageCreationAttachment(fileId, tools?.ToList(), null); + } + + public static CodeInterpreterToolDefinition CodeInterpreterToolDefinition() + { + + return new CodeInterpreterToolDefinition("code_interpreter", null); + } + + public static ToolDefinition ToolDefinition(string @type = default) + { + + return new UnknownAssistantToolDefinition(@type, null); + } + + public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch = default) + { + + return new FileSearchToolDefinition(fileSearch, "file_search", null); + } + + public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default, float scoreThreshold = default) + { + + return new FileSearchRankingOptions(ranker, scoreThreshold, null); + } + + public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition function = default) + { + + return new FunctionToolDefinition(function, "function", null); + } + + public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable vectorStores = default) + { + vectorStoreIds ??= new ChangeTrackingList(); + vectorStores ??= new ChangeTrackingList(); + + return new FileSearchToolResources(vectorStoreIds?.ToList(), vectorStores?.ToList(), null); + } + + public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable fileIds = default, BinaryData chunkingStrategy = default, IDictionary metadata = default) + { + fileIds ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreCreationHelper(fileIds?.ToList(), chunkingStrategy, metadata, null); + } + + public static RunTruncationStrategy RunTruncationStrategy(InternalTruncationObjectType @type = default, int? lastMessages = default) + { + + return new RunTruncationStrategy(@type, lastMessages, null); + } + + public static ToolConstraint ToolConstraint(InternalAssistantsNamedToolChoiceType @type = default, InternalAssistantsNamedToolChoiceFunction function = default) + { + + return new ToolConstraint(@type, function, null); + } + + public static ThreadRun ThreadRun(string id = default, InternalRunObjectObject @object = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, InternalRunRequiredAction requiredAction = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, float? topP = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, RunTruncationStrategy truncationStrategy = default, BinaryData toolChoice = default, bool parallelToolCalls = default, BinaryData responseFormat = default) + { + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadRun( + id, + @object, + createdAt, + threadId, + assistantId, + status, + requiredAction, + lastError, + expiresAt, + startedAt, + cancelledAt, + failedAt, + completedAt, + incompleteDetails, + model, + instructions, + tools?.ToList(), + metadata, + usage, + temperature, + topP, + maxPromptTokens, + maxCompletionTokens, + truncationStrategy, + toolChoice, + parallelToolCalls, + responseFormat, + null); + } + + public static RunError RunError(RunErrorCode code = default, string message = default) + { + + return new RunError(code, message, null); + } + + public static RunIncompleteDetails RunIncompleteDetails(RunIncompleteReason? reason = default) + { + + return new RunIncompleteDetails(reason, null); } public static RunTokenUsage RunTokenUsage(int completionTokens = default, int promptTokens = default, int totalTokens = default) { - return new RunTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); + + return new RunTokenUsage(completionTokens, promptTokens, totalTokens, null); + } + + public static RunCreationOptions RunCreationOptions(string assistantId = default, InternalCreateRunRequestModel? model = default, string instructions = default, string additionalInstructions = default, IEnumerable additionalMessages = default, IEnumerable tools = default, IDictionary metadata = default, float? temperature = default, float? topP = default, bool? stream = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, RunTruncationStrategy truncationStrategy = default, BinaryData toolChoice = default, bool? parallelToolCalls = default, BinaryData responseFormat = default) + { + additionalMessages ??= new ChangeTrackingList(); + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new RunCreationOptions( + assistantId, + model, + instructions, + additionalInstructions, + additionalMessages?.ToList(), + tools?.ToList(), + metadata, + temperature, + topP, + stream, + maxPromptTokens, + maxCompletionTokens, + truncationStrategy, + toolChoice, + parallelToolCalls, + responseFormat, + null); + } + + public static RunModificationOptions RunModificationOptions(IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new RunModificationOptions(metadata, null); + } + + public static ToolOutput ToolOutput(string toolCallId = default, string output = default) + { + + return new ToolOutput(toolCallId, output, null); + } + + public static RunStep RunStep(string id = default, InternalRunStepObjectObject @object = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepDetails stepDetails = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new RunStep( + id, + @object, + createdAt, + assistantId, + threadId, + runId, + @type, + status, + stepDetails, + lastError, + expiredAt, + cancelledAt, + failedAt, + completedAt, + metadata, + usage, + null); + } + + public static RunStepDetails RunStepDetails(string @type = default) + { + + return new UnknownRunStepObjectStepDetails(@type, null); + } + + public static RunStepToolCall RunStepToolCall(string @type = default) + { + + return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(@type, null); + } + + public static RunStepCodeInterpreterOutput RunStepCodeInterpreterOutput(string @type = default) + { + + return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); + } + + public static RunStepFileSearchResult RunStepFileSearchResult(string fileId = default, string fileName = default, float score = default, IEnumerable content = default) + { + content ??= new ChangeTrackingList(); + + return new RunStepFileSearchResult(fileId, fileName, score, content?.ToList(), null); } - public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null) + public static RunStepError RunStepError(RunStepErrorCode code = default, string message = default) { - return new RunStepError(code, message, serializedAdditionalRawData: null); + + return new RunStepError(code, message, null); } public static RunStepTokenUsage RunStepTokenUsage(int completionTokens = default, int promptTokens = default, int totalTokens = default) { - return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); + + return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, null); } - public static ModerationCollection ModerationCollection(string id = null, string model = null, IEnumerable results = null) + public static AssistantThread AssistantThread(string id = default, InternalThreadObjectObject @object = default, DateTimeOffset createdAt = default, InternalThreadObjectToolResources toolResources = default, IDictionary metadata = default) { - results ??= new List(); + metadata ??= new ChangeTrackingDictionary(); - return new ModerationCollection(id, model, results?.ToList()); + return new AssistantThread( + id, + @object, + createdAt, + toolResources, + metadata, + null); } - public static ModerationResult ModerationResult(bool flagged = default, ModerationCategories categories = null, ModerationCategoryScores categoryScores = null) + public static ThreadModificationOptions ThreadModificationOptions(InternalModifyThreadRequestToolResources toolResources = default, IDictionary metadata = default) { - return new ModerationResult(flagged, categories, categoryScores, serializedAdditionalRawData: null); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadModificationOptions(toolResources, metadata, null); + } + + public static ThreadDeletionResult ThreadDeletionResult(string id = default, bool deleted = default, InternalDeleteThreadResponseObject @object = default) + { + + return new ThreadDeletionResult(id, deleted, @object, null); + } + + public static ModerationCollection ModerationCollection(string id = default, string model = default, IEnumerable results = default) + { + results ??= new ChangeTrackingList(); + + return new ModerationCollection(id, model, results?.ToList(), null); + } + + public static ModerationResult ModerationResult(bool flagged = default, ModerationCategories categories = default, ModerationCategoryScores categoryScores = default) + { + + return new ModerationResult(flagged, categories, categoryScores, null); } public static ModerationCategories ModerationCategories(bool hate = default, bool hateThreatening = default, bool harassment = default, bool harassmentThreatening = default, bool selfHarm = default, bool selfHarmIntent = default, bool selfHarmInstructions = default, bool sexual = default, bool sexualMinors = default, bool violence = default, bool violenceGraphic = default) { + return new ModerationCategories( hate, hateThreatening, @@ -84,11 +446,12 @@ public static ModerationCategories ModerationCategories(bool hate = default, boo sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData: null); + null); } public static ModerationCategoryScores ModerationCategoryScores(float hate = default, float hateThreatening = default, float harassment = default, float harassmentThreatening = default, float selfHarm = default, float selfHarmIntent = default, float selfHarmInstructions = default, float sexual = default, float sexualMinors = default, float violence = default, float violenceGraphic = default) { + return new ModerationCategoryScores( hate, hateThreatening, @@ -101,98 +464,549 @@ public static ModerationCategoryScores ModerationCategoryScores(float hate = def sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData: null); + null); + } + + public static OpenAIModelInfoCollection OpenAIModelInfoCollection(InternalListModelsResponseObject @object = default, IEnumerable data = default) + { + data ??= new ChangeTrackingList(); + + return new OpenAIModelInfoCollection(@object, data?.ToList(), null); + } + + public static OpenAIModelInfo OpenAIModelInfo(string id = default, DateTimeOffset created = default, InternalModelObject @object = default, string ownedBy = default) + { + + return new OpenAIModelInfo(id, created, @object, ownedBy, null); + } + + public static ModelDeletionResult ModelDeletionResult(string id = default, bool deleted = default, InternalDeleteModelResponseObject @object = default) + { + + return new ModelDeletionResult(id, deleted, @object, null); + } + + public static ThreadMessage ThreadMessage(string id = default, InternalMessageObjectObject @object = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, InternalMessageObjectRole role = default, IEnumerable content = default, string assistantId = default, string runId = default, IEnumerable attachments = default, IDictionary metadata = default) + { + content ??= new ChangeTrackingList(); + attachments ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadMessage( + id, + @object, + createdAt, + threadId, + status, + incompleteDetails, + completedAt, + incompleteAt, + role, + content?.ToList(), + assistantId, + runId, + attachments?.ToList(), + metadata, + null); } public static MessageFailureDetails MessageFailureDetails(MessageFailureReason reason = default) { - return new MessageFailureDetails(reason, serializedAdditionalRawData: null); + + return new MessageFailureDetails(reason, null); + } + + public static MessageModificationOptions MessageModificationOptions(IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new MessageModificationOptions(metadata, null); + } + + public static MessageDeletionResult MessageDeletionResult(string id = default, bool deleted = default, InternalDeleteMessageResponseObject @object = default) + { + + return new MessageDeletionResult(id, deleted, @object, null); + } + + public static ImageGenerationOptions ImageGenerationOptions(string prompt = default, InternalCreateImageRequestModel? model = default, int? n = default, Images.GeneratedImageQuality? quality = default, Images.GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, Images.GeneratedImageStyle? style = default, string user = default) + { + + return new ImageGenerationOptions( + prompt, + model, + n, + quality, + responseFormat, + size, + style, + user, + null); + } + + public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset created = default, IEnumerable data = default) + { + data ??= new ChangeTrackingList(); + + return new GeneratedImageCollection(created, data?.ToList(), null); + } + + public static GeneratedImage GeneratedImage(BinaryData b64Json = default, Uri url = default, string revisedPrompt = default) + { + + return new GeneratedImage(b64Json, url, revisedPrompt, null); + } + + public static ImageEditOptions ImageEditOptions(BinaryData image = default, string prompt = default, BinaryData mask = default, InternalCreateImageEditRequestModel? model = default, int? n = default, InternalCreateImageEditRequestSize? size = default, InternalCreateImageEditRequestResponseFormat? responseFormat = default, string user = default) + { + + return new ImageEditOptions( + image, + prompt, + mask, + model, + n, + size, + responseFormat, + user, + null); + } + + public static ImageVariationOptions ImageVariationOptions(BinaryData image = default, InternalCreateImageVariationRequestModel? model = default, int? n = default, InternalCreateImageVariationRequestResponseFormat? responseFormat = default, InternalCreateImageVariationRequestSize? size = default, string user = default) + { + + return new ImageVariationOptions( + image, + model, + n, + responseFormat, + size, + user, + null); + } + + public static OpenAIFileInfoCollection OpenAIFileInfoCollection(IEnumerable data = default, InternalListFilesResponseObject @object = default) + { + data ??= new ChangeTrackingList(); + + return new OpenAIFileInfoCollection(data?.ToList(), @object, null); + } + + public static FileDeletionResult FileDeletionResult(string id = default, InternalDeleteFileResponseObject @object = default, bool deleted = default) + { + + return new FileDeletionResult(id, @object, deleted, null); + } + + public static EmbeddingGenerationOptions EmbeddingGenerationOptions(BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, int? dimensions = default, string user = default) + { + + return new EmbeddingGenerationOptions( + input, + model, + encodingFormat, + dimensions, + user, + null); + } + + public static EmbeddingCollection EmbeddingCollection(IEnumerable data = default, string model = default, InternalCreateEmbeddingResponseObject @object = default, EmbeddingTokenUsage usage = default) + { + data ??= new ChangeTrackingList(); + + return new EmbeddingCollection(data?.ToList(), model, @object, usage, null); + } + + public static Embedding Embedding(int index = default, BinaryData embedding = default, InternalEmbeddingObject @object = default) + { + + return new Embedding(index, embedding, @object, null); + } + + public static EmbeddingTokenUsage EmbeddingTokenUsage(int promptTokens = default, int totalTokens = default) + { + + return new EmbeddingTokenUsage(promptTokens, totalTokens, null); + } + + public static ChatTokenUsage ChatTokenUsage(int completionTokens = default, int promptTokens = default, int totalTokens = default, ChatOutputTokenUsageDetails completionTokensDetails = default) + { + + return new ChatTokenUsage(completionTokens, promptTokens, totalTokens, completionTokensDetails, null); + } + + public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int? reasoningTokens = default) + { + + return new ChatOutputTokenUsageDetails(reasoningTokens, null); + } + + public static ChatCompletionOptions ChatCompletionOptions(IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, float? frequencyPenalty = default, IDictionary logitBias = default, bool? logprobs = default, int? topLogprobs = default, int? maxTokens = default, int? maxCompletionTokens = default, int? n = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, long? seed = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, BinaryData stop = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, float? temperature = default, float? topP = default, IEnumerable tools = default, BinaryData toolChoice = default, bool? parallelToolCalls = default, string user = default, BinaryData functionCall = default, IEnumerable functions = default) + { + messages ??= new ChangeTrackingList(); + logitBias ??= new ChangeTrackingDictionary(); + tools ??= new ChangeTrackingList(); + functions ??= new ChangeTrackingList(); + + return new ChatCompletionOptions( + messages?.ToList(), + model, + frequencyPenalty, + logitBias, + logprobs, + topLogprobs, + maxTokens, + maxCompletionTokens, + n, + presencePenalty, + responseFormat, + seed, + serviceTier, + stop, + stream, + streamOptions, + temperature, + topP, + tools?.ToList(), + toolChoice, + parallelToolCalls, + user, + functionCall, + functions?.ToList(), + null); + } + + public static ChatMessage ChatMessage(string role = default) + { + + return new InternalUnknownChatMessage(role, null); + } + + public static SystemChatMessage SystemChatMessage(BinaryData content = default, string name = default) + { + + return new SystemChatMessage(content, name, "system", null); + } + + public static UserChatMessage UserChatMessage(BinaryData content = default, string name = default) + { + + return new UserChatMessage(content, name, "user", null); + } + + public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string name = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default) + { + toolCalls ??= new ChangeTrackingList(); + + return new AssistantChatMessage( + content, + refusal, + name, + toolCalls?.ToList(), + functionCall, + "assistant", + null); + } + + public static ChatToolCall ChatToolCall(string id = default, ChatToolCallKind @type = default, InternalChatCompletionMessageToolCallFunction function = default) + { + + return new ChatToolCall(id, @type, function, null); + } + + public static ChatFunctionCall ChatFunctionCall(string arguments = default, string name = default) + { + + return new ChatFunctionCall(arguments, name, null); + } + + public static ToolChatMessage ToolChatMessage(BinaryData content = default, string toolCallId = default) + { + + return new ToolChatMessage(content, toolCallId, "tool", null); } - public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset created = default, IEnumerable data = null) + public static FunctionChatMessage FunctionChatMessage(string content = default, string name = default) { - data ??= new List(); - return new GeneratedImageCollection(created, data?.ToList()); + return new FunctionChatMessage(content, name, "function", null); } - public static GeneratedImage GeneratedImage(BinaryData imageBytes = null, Uri imageUri = null, string revisedPrompt = null) + public static ChatResponseFormat ChatResponseFormat(string @type = default) { - return new GeneratedImage(imageBytes, imageUri, revisedPrompt, serializedAdditionalRawData: null); + + return new InternalUnknownChatResponseFormat(@type, null); } - public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokens = default, int totalTokens = default) + public static ChatTool ChatTool(ChatToolKind @type = default, InternalFunctionDefinition function = default) { - return new EmbeddingTokenUsage(inputTokens, totalTokens, serializedAdditionalRawData: null); + + return new ChatTool(@type, function, null); } - public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = null) + public static ChatFunction ChatFunction(string description = default, string name = default, InternalFunctionParameters parameters = default) { - return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, serializedAdditionalRawData: null); + + return new ChatFunction(description, name, parameters, null); } - public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default) + public static ChatCompletion ChatCompletion(string id = default, IEnumerable choices = default, DateTimeOffset created = default, string model = default, InternalCreateChatCompletionResponseServiceTier? serviceTier = default, string systemFingerprint = default, InternalCreateChatCompletionResponseObject @object = default, ChatTokenUsage usage = default) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, serializedAdditionalRawData: null); + choices ??= new ChangeTrackingList(); + + return new ChatCompletion( + id, + choices?.ToList(), + created, + model, + serviceTier, + systemFingerprint, + @object, + usage, + null); } - public static ToolChatMessage ToolChatMessage(IEnumerable content = null, string toolCallId = null) + public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logprob = default, IEnumerable bytes = default, IEnumerable topLogprobs = default) { - content ??= new List(); + bytes ??= new ChangeTrackingList(); + topLogprobs ??= new ChangeTrackingList(); - return new ToolChatMessage(ChatMessageRole.Tool, content?.ToList(), serializedAdditionalRawData: null, toolCallId); + return new ChatTokenLogProbabilityDetails(token, logprob, bytes?.ToList(), topLogprobs?.ToList(), null); } - public static FunctionChatMessage FunctionChatMessage(IEnumerable content = null, string functionName = null) + public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logprob = default, IEnumerable bytes = default) { - content ??= new List(); + bytes ??= new ChangeTrackingList(); - return new FunctionChatMessage(ChatMessageRole.Function, content?.ToList(), serializedAdditionalRawData: null, functionName); + return new ChatTokenTopLogProbabilityDetails(token, logprob, bytes?.ToList(), null); } - public static ChatFunction ChatFunction(string functionDescription = null, string functionName = null, BinaryData functionParameters = null) + public static AssistantCreationOptions AssistantCreationOptions(InternalCreateAssistantRequestModel model = default, string name = default, string description = default, string instructions = default, IEnumerable tools = default, InternalCreateAssistantRequestToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) { - return new ChatFunction(functionDescription, functionName, functionParameters, serializedAdditionalRawData: null); + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new AssistantCreationOptions( + model, + name, + description, + instructions, + tools?.ToList(), + toolResources, + metadata, + temperature, + topP, + responseFormat, + null); } - public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = default, ReadOnlyMemory? utf8Bytes = null, IEnumerable topLogProbabilities = null) + public static Assistant Assistant(string id = default, InternalAssistantObjectObject @object = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) { - topLogProbabilities ??= new List(); + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); - return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes, topLogProbabilities?.ToList(), serializedAdditionalRawData: null); + return new Assistant( + id, + @object, + createdAt, + name, + description, + model, + instructions, + tools?.ToList(), + toolResources, + metadata, + temperature, + topP, + responseFormat, + null); + } + + public static ToolResources ToolResources(CodeInterpreterToolResources codeInterpreter = default, InternalToolResourcesFileSearchIdsOnly fileSearch = default) + { + + return new ToolResources(codeInterpreter, fileSearch, null); + } + + public static CodeInterpreterToolResources CodeInterpreterToolResources(IEnumerable fileIds = default) + { + fileIds ??= new ChangeTrackingList(); + + return new CodeInterpreterToolResources(fileIds?.ToList(), null); + } + + public static AssistantModificationOptions AssistantModificationOptions(string model = default, string name = default, string description = default, string instructions = default, IEnumerable tools = default, InternalModifyAssistantRequestToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) + { + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new AssistantModificationOptions( + model, + name, + description, + instructions, + tools?.ToList(), + toolResources, + metadata, + temperature, + topP, + responseFormat, + null); + } + + public static AssistantDeletionResult AssistantDeletionResult(string id = default, bool deleted = default, InternalDeleteAssistantResponseObject @object = default) + { + + return new AssistantDeletionResult(id, deleted, @object, null); + } + + public static SpeechGenerationOptions SpeechGenerationOptions(InternalCreateSpeechRequestModel model = default, string input = default, GeneratedSpeechVoice voice = default, GeneratedSpeechFormat? responseFormat = default, float? speed = default) + { + + return new SpeechGenerationOptions( + model, + input, + voice, + responseFormat, + speed, + null); + } + + public static AudioTranscriptionOptions AudioTranscriptionOptions(BinaryData @file = default, InternalCreateTranscriptionRequestModel model = default, string language = default, string prompt = default, Audio.AudioTranscriptionFormat? responseFormat = default, float? temperature = default, IEnumerable timestampGranularities = default) + { + timestampGranularities ??= new ChangeTrackingList(); + + return new AudioTranscriptionOptions( + @file, + model, + language, + prompt, + responseFormat, + temperature, + timestampGranularities?.ToList(), + null); } - public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = default, ReadOnlyMemory? utf8Bytes = null) + public static AudioTranscription AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask task = default, string language = default, TimeSpan duration = default, string text = default, IEnumerable words = default, IEnumerable segments = default) { - return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes, serializedAdditionalRawData: null); + words ??= new ChangeTrackingList(); + segments ??= new ChangeTrackingList(); + + return new AudioTranscription( + task, + language, + duration, + text, + words?.ToList(), + segments?.ToList(), + null); } - public static TranscribedWord TranscribedWord(string word = null, TimeSpan startTime = default, TimeSpan endTime = default) + public static TranscribedWord TranscribedWord(string word = default, TimeSpan start = default, TimeSpan end = default) { - return new TranscribedWord(word, startTime, endTime, serializedAdditionalRawData: null); + + return new TranscribedWord(word, start, end, null); } - public static TranscribedSegment TranscribedSegment(int id = default, int seekOffset = default, TimeSpan startTime = default, TimeSpan endTime = default, string text = null, IEnumerable tokenIds = null, float temperature = default, float averageLogProbability = default, float compressionRatio = default, float noSpeechProbability = default) + public static TranscribedSegment TranscribedSegment(int id = default, int seek = default, TimeSpan start = default, TimeSpan end = default, string text = default, IEnumerable tokens = default, float temperature = default, float avgLogprob = default, float compressionRatio = default, float noSpeechProb = default) { - tokenIds ??= new List(); + tokens ??= new ChangeTrackingList(); return new TranscribedSegment( id, - seekOffset, - startTime, - endTime, + seek, + start, + end, text, - tokenIds?.ToList(), + tokens?.ToList(), temperature, - averageLogProbability, + avgLogprob, compressionRatio, - noSpeechProbability, - serializedAdditionalRawData: null); + noSpeechProb, + null); + } + + public static AudioTranslationOptions AudioTranslationOptions(BinaryData @file = default, InternalCreateTranslationRequestModel model = default, string prompt = default, Audio.AudioTranslationFormat? responseFormat = default, float? temperature = default) + { + + return new AudioTranslationOptions( + @file, + model, + prompt, + responseFormat, + temperature, + null); + } + + public static AudioTranslation AudioTranslation(InternalCreateTranslationResponseVerboseJsonTask task = default, string language = default, TimeSpan duration = default, string text = default, IEnumerable segments = default) + { + segments ??= new ChangeTrackingList(); + + return new AudioTranslation( + task, + language, + duration, + text, + segments?.ToList(), + null); + } + + public static AssistantResponseFormat AssistantResponseFormat(string @type = default) + { + + return new InternalUnknownAssistantResponseFormat(@type, null); } - public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionArgumentsUpdate = null, string functionName = null) + public static ChatFunctionChoice ChatFunctionChoice() { - return new StreamingChatFunctionCallUpdate(functionArgumentsUpdate, functionName, serializedAdditionalRawData: null); + + return new ChatFunctionChoice(null); + } + + public static ChatToolChoice ChatToolChoice() + { + + return new ChatToolChoice(null); + } + + public static ChatMessageContentPart ChatMessageContentPart() + { + + return new ChatMessageContentPart(null); + } + + public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string arguments = default, string name = default) + { + + return new StreamingChatFunctionCallUpdate(arguments, name, null); + } + + public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = default, string id = default, InternalChatCompletionMessageToolCallChunkType? @type = default, InternalChatCompletionMessageToolCallChunkFunction function = default) + { + + return new StreamingChatToolCallUpdate(index, id, @type, function, null); + } + + public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string id = default, IEnumerable choices = default, DateTimeOffset created = default, string model = default, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, InternalCreateChatCompletionStreamResponseUsage usage = default) + { + choices ??= new ChangeTrackingList(); + + return new StreamingChatCompletionUpdate( + id, + choices?.ToList(), + created, + model, + serviceTier, + systemFingerprint, + @object, + usage, + null); + } + + public static RunStepUpdateCodeInterpreterOutput RunStepUpdateCodeInterpreterOutput(string @type = default) + { + + return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); } } } diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs new file mode 100644 index 000000000..2ee523bbf --- /dev/null +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -0,0 +1,334 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.VectorStores +{ + public partial class VectorStoreClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.VectorStoreClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.VectorStoreClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.VectorStoreClient.Classifier2xxAnd4xx(); + + internal PipelineMessage CreateListVectorStoresRequest(int? limit, string order, string after, string before, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetVectorStoreRequest(string vector_store_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateModifyVectorStoreRequest(string vector_store_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteVectorStoreRequest(string vector_store_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListVectorStoreFilesRequest(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/files", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (filter != null) + { + uri.AppendQuery("filter", TypeFormatters.ConvertToString(filter, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateVectorStoreFileRequest(string vector_store_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/files", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetVectorStoreFileRequest(string vector_store_id, string file_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/files/", false); + uri.AppendPath(file_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vector_store_id, string file_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "DELETE"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/files/", false); + uri.AppendPath(file_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vector_store_id, BinaryContent content, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/file_batches", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + request.Headers.Set("Content-Type", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vector_store_id, string batch_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/file_batches/", false); + uri.AppendPath(batch_id, true); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vector_store_id, string batch_id, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "POST"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/file_batches/", false); + uri.AppendPath(batch_id, true); + uri.AppendPath("/cancel", false); + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + PipelineMessage message = Pipeline.CreateMessage(); + message.ResponseClassifier = PipelineMessageClassifier200; + PipelineRequest request = message.Request; + request.Method = "GET"; + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/vector_stores/", false); + uri.AppendPath(vector_store_id, true); + uri.AppendPath("/file_batches/", false); + uri.AppendPath(batch_id, true); + uri.AppendPath("/files", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); + } + if (order != null) + { + uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (filter != null) + { + uri.AppendQuery("filter", TypeFormatters.ConvertToString(filter, null), true); + } + request.Uri = uri.ToUri(); + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 5e44c7abe..21b6a8988 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -6,310 +6,179 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.VectorStores { - // Data plane generated sub-client. public partial class VectorStoreClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; - - public virtual ClientPipeline Pipeline => _pipeline; protected VectorStoreClient() { } - internal PipelineMessage CreateGetVectorStoresRequest(int? limit, string order, string after, string before, RequestOptions options) + public ClientPipeline Pipeline { get; } + + public virtual ClientResult ListVectorStores(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListVectorStoresAsync(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListVectorStores(int? limit, VectorStoreCollectionOrder? order, string after, string before) + { + ClientResult result = ListVectorStores(limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListVectorStoresAsync(int? limit, VectorStoreCollectionOrder? order, string after, string before) + { + ClientResult result = await ListVectorStoresAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult GetVectorStore(string vector_store_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateGetVectorStoreRequest(vector_store_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, RequestOptions options) + public virtual async Task GetVectorStoreAsync(string vector_store_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateGetVectorStoreRequest(vector_store_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestOptions options) + public virtual ClientResult ModifyVectorStore(string vector_store_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyVectorStoreRequest(vector_store_id, content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) + public virtual async Task ModifyVectorStoreAsync(string vector_store_id, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateModifyVectorStoreRequest(vector_store_id, content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestOptions options) + public virtual ClientResult DeleteVectorStore(string vector_store_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateDeleteVectorStoreRequest(vector_store_id, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetVectorStoreFilesRequest(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual async Task DeleteVectorStoreAsync(string vector_store_id, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - if (filter != null) - { - uri.AppendQuery("filter", filter, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateDeleteVectorStoreRequest(vector_store_id, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, BinaryContent content, RequestOptions options) + public virtual ClientResult ListVectorStoreFiles(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateListVectorStoreFilesRequest(vector_store_id, limit, order, after, before, filter, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) + public virtual async Task ListVectorStoreFilesAsync(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + using PipelineMessage message = CreateListVectorStoreFilesRequest(vector_store_id, limit, order, after, before, filter, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) + public virtual ClientResult ListVectorStoreFiles(string vector_store_id, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + ClientResult result = ListVectorStoreFiles(vector_store_id, limit, order.ToString(), after, before, filter.ToString(), null); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, BinaryContent content, RequestOptions options) + public virtual async Task> ListVectorStoreFilesAsync(string vector_store_id, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + + ClientResult result = await ListVectorStoreFilesAsync(vector_store_id, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) + public virtual ClientResult ListFilesInVectorStoreBatch(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vector_store_id, batch_id, limit, order, after, before, filter, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) + public virtual async Task ListFilesInVectorStoreBatchAsync(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vector_store_id, batch_id, limit, order, after, before, filter, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetFilesInVectorStoreBatchesRequest(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual ClientResult ListFilesInVectorStoreBatch(string vector_store_id, string batch_id, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/files", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - if (filter != null) - { - uri.AppendQuery("filter", filter, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + ClientResult result = ListFilesInVectorStoreBatch(vector_store_id, batch_id, limit, order.ToString(), after, before, filter.ToString(), null); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task> ListFilesInVectorStoreBatchAsync(string vector_store_id, string batch_id, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + { + Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(batch_id, nameof(batch_id)); + + ClientResult result = await ListFilesInVectorStoreBatchAsync(vector_store_id, batch_id, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json new file mode 100644 index 000000000..85ce5e49c --- /dev/null +++ b/.dotnet/tspCodeModel.json @@ -0,0 +1,42049 @@ +{ + "$id": "1", + "Name": "OpenAI", + "ApiVersions": [], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "CreateUploadRequestPurpose", + "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "12", + "kind": "enum", + "name": "UploadStatus", + "crossLanguageDefinitionId": "Upload.status.anonymous", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "14", + "kind": "enumvalue", + "name": "pending", + "value": "pending", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "Upload_object", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "upload", + "value": "upload", + "description": "upload", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Upload_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "25", + "kind": "enum", + "name": "OpenAIFile_object", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "27", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "26" + }, + "enumType": { + "$ref": "25" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The OpenAIFile_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "28", + "kind": "enum", + "name": "OpenAIFilePurpose", + "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "30", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "assistants_output", + "value": "assistants_output", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "batch_output", + "value": "batch_output", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "fine-tune-results", + "value": "fine-tune-results", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "OpenAIFileStatus", + "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "uploaded", + "value": "uploaded", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "processed", + "value": "processed", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "UploadPart_object", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "upload.part", + "value": "upload.part", + "description": "upload.part", + "valueType": { + "$ref": "53" + }, + "enumType": { + "$ref": "52" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The UploadPart_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "55", + "kind": "enum", + "name": "ListVectorStoresRequestOrder", + "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", + "valueType": { + "$id": "56", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "57", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + }, + { + "$id": "59", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "60", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "61", + "kind": "enum", + "name": "ListVectorStoresResponse_object", + "valueType": { + "$id": "62", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "63", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "62" + }, + "enumType": { + "$ref": "61" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoresResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "VectorStoreObject_object", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "vector_store", + "value": "vector_store", + "description": "vector_store", + "valueType": { + "$ref": "65" + }, + "enumType": { + "$ref": "64" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "67", + "kind": "enum", + "name": "VectorStoreObjectStatus", + "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", + "valueType": { + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "69", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "70", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "71", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "72", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "73", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "74", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "75", + "kind": "enum", + "name": "VectorStoreExpirationAfter_anchor", + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "77", + "kind": "enumvalue", + "name": "last_active_at", + "value": "last_active_at", + "description": "last_active_at", + "valueType": { + "$ref": "76" + }, + "enumType": { + "$ref": "75" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreExpirationAfter_anchor", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "DeleteVectorStoreResponse_object", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "vector_store.deleted", + "value": "vector_store.deleted", + "description": "vector_store.deleted", + "valueType": { + "$ref": "79" + }, + "enumType": { + "$ref": "78" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "81", + "kind": "enum", + "name": "ListVectorStoreFilesRequestOrder", + "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", + "valueType": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "83", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "84", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + }, + { + "$id": "85", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "86", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "87", + "kind": "enum", + "name": "ListVectorStoreFilesFilter", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", + "valueType": { + "$id": "88", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "89", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "90", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "91", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "92", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "93", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "95", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "97", + "kind": "enum", + "name": "ListVectorStoreFilesResponse_object", + "valueType": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "99", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "98" + }, + "enumType": { + "$ref": "97" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoreFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "VectorStoreFileObject_object", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "vector_store.file", + "value": "vector_store.file", + "description": "vector_store.file", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "103", + "kind": "enum", + "name": "VectorStoreFileObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", + "valueType": { + "$id": "104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "105", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "107", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "109", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "111", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "113", + "kind": "enum", + "name": "VectorStoreFileObjectLastErrorCode", + "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", + "valueType": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "115", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "117", + "kind": "enumvalue", + "name": "unsupported_file", + "value": "unsupported_file", + "valueType": { + "$id": "118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "119", + "kind": "enumvalue", + "name": "invalid_file", + "value": "invalid_file", + "valueType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "121", + "kind": "enum", + "name": "DeleteVectorStoreFileResponse_object", + "valueType": { + "$id": "122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "123", + "kind": "enumvalue", + "name": "vector_store.file.deleted", + "value": "vector_store.file.deleted", + "description": "vector_store.file.deleted", + "valueType": { + "$ref": "122" + }, + "enumType": { + "$ref": "121" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "VectorStoreFileBatchObject_object", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "vector_store.files_batch", + "value": "vector_store.files_batch", + "description": "vector_store.files_batch", + "valueType": { + "$ref": "125" + }, + "enumType": { + "$ref": "124" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileBatchObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "127", + "kind": "enum", + "name": "VectorStoreFileBatchObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", + "valueType": { + "$id": "128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "129", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "131", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "133", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "135", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "137", + "kind": "enum", + "name": "ListFilesInVectorStoreBatchRequestOrder", + "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", + "valueType": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "139", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + }, + { + "$id": "141", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "143", + "kind": "enum", + "name": "CreateMessageRequestRole", + "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", + "valueType": { + "$id": "144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "145", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + }, + { + "$id": "147", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "149", + "kind": "enum", + "name": "FileSearchRankingOptionsRanker", + "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", + "valueType": { + "$id": "150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "151", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + }, + { + "$id": "153", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "valueType": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "155", + "kind": "enum", + "name": "AssistantToolsFileSearchTypeOnly_type", + "valueType": { + "$id": "156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "157", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "description": "file_search", + "valueType": { + "$ref": "156" + }, + "enumType": { + "$ref": "155" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantToolsFileSearchTypeOnly_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "158", + "kind": "enum", + "name": "CreateThreadAndRunRequestModel", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "160", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "164", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "166", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "172", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "200", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "206", + "kind": "enum", + "name": "TruncationObjectType", + "crossLanguageDefinitionId": "TruncationObject.type.anonymous", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "208", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "last_messages", + "value": "last_messages", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "CreateThreadAndRunRequestToolChoice", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "AssistantsNamedToolChoiceType", + "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "code_interpreter", + "value": "code_interpreter", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "228", + "kind": "enum", + "name": "RunObject_object", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "230", + "kind": "enumvalue", + "name": "thread.run", + "value": "thread.run", + "description": "thread.run", + "valueType": { + "$ref": "229" + }, + "enumType": { + "$ref": "228" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "231", + "kind": "enum", + "name": "RunObjectStatus", + "crossLanguageDefinitionId": "RunObject.status.anonymous", + "valueType": { + "$id": "232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "233", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "235", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "237", + "kind": "enumvalue", + "name": "requires_action", + "value": "requires_action", + "valueType": { + "$id": "238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "239", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "241", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "243", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "245", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "247", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "249", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "251", + "kind": "enum", + "name": "RunObjectRequiredAction_type", + "valueType": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "253", + "kind": "enumvalue", + "name": "submit_tool_outputs", + "value": "submit_tool_outputs", + "description": "submit_tool_outputs", + "valueType": { + "$ref": "252" + }, + "enumType": { + "$ref": "251" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObjectRequiredAction_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "RunToolCallObject_type", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "255" + }, + "enumType": { + "$ref": "254" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunToolCallObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "257", + "kind": "enum", + "name": "RunObjectLastErrorCode", + "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", + "valueType": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "259", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "261", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "263", + "kind": "enumvalue", + "name": "invalid_prompt", + "value": "invalid_prompt", + "valueType": { + "$id": "264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "265", + "kind": "enum", + "name": "RunObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "267", + "kind": "enumvalue", + "name": "max_completion_tokens", + "value": "max_completion_tokens", + "valueType": { + "$id": "268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + }, + { + "$id": "269", + "kind": "enumvalue", + "name": "max_prompt_tokens", + "value": "max_prompt_tokens", + "valueType": { + "$id": "270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "271", + "kind": "enum", + "name": "CreateRunRequestModel", + "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", + "valueType": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "273", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "275", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "277", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "279", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "281", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "283", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "285", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "287", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "289", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "291", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "293", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "295", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "297", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "299", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "301", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "303", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "305", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "307", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "309", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "311", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "313", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "315", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "317", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "319", + "kind": "enum", + "name": "ListRunsRequestOrder", + "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", + "valueType": { + "$id": "320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "321", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + }, + { + "$id": "323", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "325", + "kind": "enum", + "name": "ListRunsResponse_object", + "valueType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "327", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "326" + }, + "enumType": { + "$ref": "325" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "ListRunStepsRequestOrder", + "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "ListRunStepsResponse_object", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "335" + }, + "enumType": { + "$ref": "334" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunStepsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "337", + "kind": "enum", + "name": "RunStepObject_object", + "valueType": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "339", + "kind": "enumvalue", + "name": "thread.run.step", + "value": "thread.run.step", + "description": "thread.run.step", + "valueType": { + "$ref": "338" + }, + "enumType": { + "$ref": "337" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "340", + "kind": "enum", + "name": "RunStepObjectType", + "crossLanguageDefinitionId": "RunStepObject.type.anonymous", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "342", + "kind": "enumvalue", + "name": "message_creation", + "value": "message_creation", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "RunStepObjectStatus", + "crossLanguageDefinitionId": "RunStepObject.status.anonymous", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "350", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "354", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "356", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "358", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "360", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "description": "default_2024_08_21", + "valueType": { + "$ref": "359" + }, + "enumType": { + "$ref": "358" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "361", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "valueType": { + "$id": "362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "363", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "362" + }, + "enumType": { + "$ref": "361" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "364", + "kind": "enum", + "name": "RunStepObjectLastErrorCode", + "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", + "valueType": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "366", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + }, + { + "$id": "368", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "370", + "kind": "enum", + "name": "ThreadObject_object", + "valueType": { + "$id": "371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "372", + "kind": "enumvalue", + "name": "thread", + "value": "thread", + "description": "thread", + "valueType": { + "$ref": "371" + }, + "enumType": { + "$ref": "370" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ThreadObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "373", + "kind": "enum", + "name": "DeleteThreadResponse_object", + "valueType": { + "$id": "374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "375", + "kind": "enumvalue", + "name": "thread.deleted", + "value": "thread.deleted", + "description": "thread.deleted", + "valueType": { + "$ref": "374" + }, + "enumType": { + "$ref": "373" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteThreadResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "376", + "kind": "enum", + "name": "CreateModerationRequestModel", + "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", + "valueType": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "378", + "kind": "enumvalue", + "name": "text-moderation-latest", + "value": "text-moderation-latest", + "valueType": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "380", + "kind": "enumvalue", + "name": "text-moderation-stable", + "value": "text-moderation-stable", + "valueType": { + "$id": "381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "382", + "kind": "enum", + "name": "ListModelsResponse_object", + "valueType": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "384", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "383" + }, + "enumType": { + "$ref": "382" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListModelsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "385", + "kind": "enum", + "name": "Model_object", + "valueType": { + "$id": "386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "387", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "386" + }, + "enumType": { + "$ref": "385" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Model_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "388", + "kind": "enum", + "name": "DeleteModelResponse_object", + "valueType": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "390", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "389" + }, + "enumType": { + "$ref": "388" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteModelResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "391", + "kind": "enum", + "name": "MessageObject_object", + "valueType": { + "$id": "392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "393", + "kind": "enumvalue", + "name": "thread.message", + "value": "thread.message", + "description": "thread.message", + "valueType": { + "$ref": "392" + }, + "enumType": { + "$ref": "391" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "394", + "kind": "enum", + "name": "MessageObjectStatus", + "crossLanguageDefinitionId": "MessageObject.status.anonymous", + "valueType": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "396", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "394" + }, + "decorators": [] + }, + { + "$id": "398", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "394" + }, + "decorators": [] + }, + { + "$id": "400", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "394" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "402", + "kind": "enum", + "name": "MessageObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "404", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "402" + }, + "decorators": [] + }, + { + "$id": "406", + "kind": "enumvalue", + "name": "max_tokens", + "value": "max_tokens", + "valueType": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "402" + }, + "decorators": [] + }, + { + "$id": "408", + "kind": "enumvalue", + "name": "run_cancelled", + "value": "run_cancelled", + "valueType": { + "$id": "409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "402" + }, + "decorators": [] + }, + { + "$id": "410", + "kind": "enumvalue", + "name": "run_expired", + "value": "run_expired", + "valueType": { + "$id": "411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "402" + }, + "decorators": [] + }, + { + "$id": "412", + "kind": "enumvalue", + "name": "run_failed", + "value": "run_failed", + "valueType": { + "$id": "413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "402" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "414", + "kind": "enum", + "name": "MessageObjectRole", + "crossLanguageDefinitionId": "MessageObject.role.anonymous", + "valueType": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "416", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + }, + { + "$id": "418", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "420", + "kind": "enum", + "name": "ListMessagesRequestOrder", + "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", + "valueType": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "422", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "420" + }, + "decorators": [] + }, + { + "$id": "424", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "420" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "426", + "kind": "enum", + "name": "ListMessagesResponse_object", + "valueType": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "428", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "427" + }, + "enumType": { + "$ref": "426" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListMessagesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "429", + "kind": "enum", + "name": "DeleteMessageResponse_object", + "valueType": { + "$id": "430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "431", + "kind": "enumvalue", + "name": "thread.message.deleted", + "value": "thread.message.deleted", + "description": "thread.message.deleted", + "valueType": { + "$ref": "430" + }, + "enumType": { + "$ref": "429" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteMessageResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "432", + "kind": "enum", + "name": "CreateImageRequestModel", + "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", + "valueType": { + "$id": "433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "434", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "432" + }, + "decorators": [] + }, + { + "$id": "436", + "kind": "enumvalue", + "name": "dall-e-3", + "value": "dall-e-3", + "valueType": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "432" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "438", + "kind": "enum", + "name": "CreateImageRequestQuality", + "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", + "valueType": { + "$id": "439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "440", + "kind": "enumvalue", + "name": "standard", + "value": "standard", + "valueType": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "438" + }, + "decorators": [] + }, + { + "$id": "442", + "kind": "enumvalue", + "name": "hd", + "value": "hd", + "valueType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "438" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "444", + "kind": "enum", + "name": "CreateImageRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", + "valueType": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "446", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "444" + }, + "decorators": [] + }, + { + "$id": "448", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "444" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "450", + "kind": "enum", + "name": "CreateImageRequestSize", + "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", + "valueType": { + "$id": "451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "452", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "454", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "456", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "458", + "kind": "enumvalue", + "name": "1792x1024", + "value": "1792x1024", + "valueType": { + "$id": "459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "460", + "kind": "enumvalue", + "name": "1024x1792", + "value": "1024x1792", + "valueType": { + "$id": "461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "462", + "kind": "enum", + "name": "CreateImageRequestStyle", + "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", + "valueType": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "464", + "kind": "enumvalue", + "name": "vivid", + "value": "vivid", + "valueType": { + "$id": "465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "462" + }, + "decorators": [] + }, + { + "$id": "466", + "kind": "enumvalue", + "name": "natural", + "value": "natural", + "valueType": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "462" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "468", + "kind": "enum", + "name": "CreateImageEditRequestModel", + "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", + "valueType": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "470", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "468" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "472", + "kind": "enum", + "name": "CreateImageEditRequestSize", + "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", + "valueType": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "474", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "472" + }, + "decorators": [] + }, + { + "$id": "476", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "472" + }, + "decorators": [] + }, + { + "$id": "478", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "472" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "480", + "kind": "enum", + "name": "CreateImageEditRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", + "valueType": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "482", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "480" + }, + "decorators": [] + }, + { + "$id": "484", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "480" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "486", + "kind": "enum", + "name": "CreateImageVariationRequestModel", + "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", + "valueType": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "488", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "486" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "490", + "kind": "enum", + "name": "CreateImageVariationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", + "valueType": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "492", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "490" + }, + "decorators": [] + }, + { + "$id": "494", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "490" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "496", + "kind": "enum", + "name": "CreateImageVariationRequestSize", + "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", + "valueType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "498", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "496" + }, + "decorators": [] + }, + { + "$id": "500", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "496" + }, + "decorators": [] + }, + { + "$id": "502", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "496" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "504", + "kind": "enum", + "name": "CreateFineTuningJobRequestModel", + "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", + "valueType": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "506", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "504" + }, + "decorators": [] + }, + { + "$id": "508", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "504" + }, + "decorators": [] + }, + { + "$id": "510", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "504" + }, + "decorators": [] + }, + { + "$id": "512", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "504" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "514", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "516", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "514" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "518", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "520", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "518" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "522", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "524", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "522" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "526", + "kind": "enum", + "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "528", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "526" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "530", + "kind": "enum", + "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "532", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "530" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "534", + "kind": "enum", + "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "535", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "536", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "534" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "538", + "kind": "enum", + "name": "FineTuningJob_object", + "valueType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "540", + "kind": "enumvalue", + "name": "fine_tuning.job", + "value": "fine_tuning.job", + "description": "fine_tuning.job", + "valueType": { + "$ref": "539" + }, + "enumType": { + "$ref": "538" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJob_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "541", + "kind": "enum", + "name": "FineTuningJobStatus", + "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", + "valueType": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "543", + "kind": "enumvalue", + "name": "validating_files", + "value": "validating_files", + "valueType": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "545", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "547", + "kind": "enumvalue", + "name": "running", + "value": "running", + "valueType": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "549", + "kind": "enumvalue", + "name": "succeeded", + "value": "succeeded", + "valueType": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "551", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "553", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "555", + "kind": "enum", + "name": "ListPaginatedFineTuningJobsResponse_object", + "valueType": { + "$id": "556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "557", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "556" + }, + "enumType": { + "$ref": "555" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListPaginatedFineTuningJobsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "558", + "kind": "enum", + "name": "FineTuningJobCheckpoint_object", + "valueType": { + "$id": "559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "560", + "kind": "enumvalue", + "name": "fine_tuning.job.checkpoint", + "value": "fine_tuning.job.checkpoint", + "description": "fine_tuning.job.checkpoint", + "valueType": { + "$ref": "559" + }, + "enumType": { + "$ref": "558" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobCheckpoint_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "561", + "kind": "enum", + "name": "ListFineTuningJobCheckpointsResponse_object", + "valueType": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "563", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "562" + }, + "enumType": { + "$ref": "561" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobCheckpointsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "564", + "kind": "enum", + "name": "FineTuningJobEventLevel", + "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", + "valueType": { + "$id": "565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "566", + "kind": "enumvalue", + "name": "info", + "value": "info", + "valueType": { + "$id": "567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "564" + }, + "decorators": [] + }, + { + "$id": "568", + "kind": "enumvalue", + "name": "warn", + "value": "warn", + "valueType": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "564" + }, + "decorators": [] + }, + { + "$id": "570", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "564" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "572", + "kind": "enum", + "name": "FineTuningJobEvent_object", + "valueType": { + "$id": "573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "574", + "kind": "enumvalue", + "name": "fine_tuning.job.event", + "value": "fine_tuning.job.event", + "description": "fine_tuning.job.event", + "valueType": { + "$ref": "573" + }, + "enumType": { + "$ref": "572" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobEvent_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "575", + "kind": "enum", + "name": "ListFineTuningJobEventsResponse_object", + "valueType": { + "$id": "576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "577", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "576" + }, + "enumType": { + "$ref": "575" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobEventsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "578", + "kind": "enum", + "name": "CreateFileRequestPurpose", + "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", + "valueType": { + "$id": "579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "580", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "578" + }, + "decorators": [] + }, + { + "$id": "582", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "578" + }, + "decorators": [] + }, + { + "$id": "584", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "585", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "578" + }, + "decorators": [] + }, + { + "$id": "586", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "578" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "588", + "kind": "enum", + "name": "ListFilesResponse_object", + "valueType": { + "$id": "589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "590", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "589" + }, + "enumType": { + "$ref": "588" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "591", + "kind": "enum", + "name": "DeleteFileResponse_object", + "valueType": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "593", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "592" + }, + "enumType": { + "$ref": "591" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "594", + "kind": "enum", + "name": "CreateEmbeddingRequestModel", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", + "valueType": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "596", + "kind": "enumvalue", + "name": "text-embedding-ada-002", + "value": "text-embedding-ada-002", + "valueType": { + "$id": "597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "594" + }, + "decorators": [] + }, + { + "$id": "598", + "kind": "enumvalue", + "name": "text-embedding-3-small", + "value": "text-embedding-3-small", + "valueType": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "594" + }, + "decorators": [] + }, + { + "$id": "600", + "kind": "enumvalue", + "name": "text-embedding-3-large", + "value": "text-embedding-3-large", + "valueType": { + "$id": "601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "594" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "602", + "kind": "enum", + "name": "CreateEmbeddingRequestEncodingFormat", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", + "valueType": { + "$id": "603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "604", + "kind": "enumvalue", + "name": "float", + "value": "float", + "valueType": { + "$id": "605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "602" + }, + "decorators": [] + }, + { + "$id": "606", + "kind": "enumvalue", + "name": "base64", + "value": "base64", + "valueType": { + "$id": "607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "602" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "608", + "kind": "enum", + "name": "Embedding_object", + "valueType": { + "$id": "609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "610", + "kind": "enumvalue", + "name": "embedding", + "value": "embedding", + "description": "embedding", + "valueType": { + "$ref": "609" + }, + "enumType": { + "$ref": "608" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Embedding_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "611", + "kind": "enum", + "name": "CreateEmbeddingResponse_object", + "valueType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "613", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "612" + }, + "enumType": { + "$ref": "611" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateEmbeddingResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "614", + "kind": "enum", + "name": "CreateCompletionRequestModel", + "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", + "valueType": { + "$id": "615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "616", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-instruct", + "value": "gpt-3.5-turbo-instruct", + "valueType": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "614" + }, + "decorators": [] + }, + { + "$id": "618", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "614" + }, + "decorators": [] + }, + { + "$id": "620", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "614" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "622", + "kind": "enum", + "name": "CreateCompletionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "624", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "622" + }, + "decorators": [] + }, + { + "$id": "626", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "622" + }, + "decorators": [] + }, + { + "$id": "628", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "622" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "630", + "kind": "enum", + "name": "CreateCompletionResponse_object", + "valueType": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "632", + "kind": "enumvalue", + "name": "text_completion", + "value": "text_completion", + "description": "text_completion", + "valueType": { + "$ref": "631" + }, + "enumType": { + "$ref": "630" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "633", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartText_type", + "valueType": { + "$id": "634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "635", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "634" + }, + "enumType": { + "$ref": "633" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartText_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "636", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImage_type", + "valueType": { + "$id": "637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "638", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "637" + }, + "enumType": { + "$ref": "636" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartImage_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "639", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", + "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", + "valueType": { + "$id": "640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "641", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "643", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "645", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "647", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartRefusal_type", + "valueType": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "649", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "648" + }, + "enumType": { + "$ref": "647" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartRefusal_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "650", + "kind": "enum", + "name": "ChatCompletionMessageToolCall_type", + "valueType": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "652", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "651" + }, + "enumType": { + "$ref": "650" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCall_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "653", + "kind": "enum", + "name": "CreateChatCompletionRequestModel", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", + "valueType": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "655", + "kind": "enumvalue", + "name": "o1-preview", + "value": "o1-preview", + "valueType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "657", + "kind": "enumvalue", + "name": "o1-preview-2024-09-12", + "value": "o1-preview-2024-09-12", + "valueType": { + "$id": "658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "659", + "kind": "enumvalue", + "name": "o1-mini", + "value": "o1-mini", + "valueType": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "661", + "kind": "enumvalue", + "name": "o1-mini-2024-09-12", + "value": "o1-mini-2024-09-12", + "valueType": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "663", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "665", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "667", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "669", + "kind": "enumvalue", + "name": "chatgpt-4o-latest", + "value": "chatgpt-4o-latest", + "valueType": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "671", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "673", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "675", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "677", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "679", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "681", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "683", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "685", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "687", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "689", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "691", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "693", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "695", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "697", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "699", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "701", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "703", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0301", + "value": "gpt-3.5-turbo-0301", + "valueType": { + "$id": "704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "705", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "707", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "709", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + }, + { + "$id": "711", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "653" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "713", + "kind": "enum", + "name": "CreateChatCompletionRequestServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", + "valueType": { + "$id": "714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "715", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "713" + }, + "decorators": [] + }, + { + "$id": "717", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "713" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "719", + "kind": "enum", + "name": "ChatCompletionTool_type", + "valueType": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "721", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "720" + }, + "enumType": { + "$ref": "719" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionTool_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "722", + "kind": "enum", + "name": "CreateChatCompletionRequestToolChoice", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", + "valueType": { + "$id": "723", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "724", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "722" + }, + "decorators": [] + }, + { + "$id": "726", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "722" + }, + "decorators": [] + }, + { + "$id": "728", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "722" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "730", + "kind": "enum", + "name": "ChatCompletionNamedToolChoice_type", + "valueType": { + "$id": "731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "732", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "731" + }, + "enumType": { + "$ref": "730" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionNamedToolChoice_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "733", + "kind": "enum", + "name": "CreateChatCompletionResponseChoiceFinishReason1", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "735", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "733" + }, + "decorators": [] + }, + { + "$id": "737", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "733" + }, + "decorators": [] + }, + { + "$id": "739", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "733" + }, + "decorators": [] + }, + { + "$id": "741", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "733" + }, + "decorators": [] + }, + { + "$id": "743", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "733" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "745", + "kind": "enum", + "name": "ChatCompletionResponseMessage_role", + "valueType": { + "$id": "746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "747", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "746" + }, + "enumType": { + "$ref": "745" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionResponseMessage_role", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "748", + "kind": "enum", + "name": "CreateChatCompletionResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", + "valueType": { + "$id": "749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "750", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "748" + }, + "decorators": [] + }, + { + "$id": "752", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "748" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "754", + "kind": "enum", + "name": "CreateChatCompletionResponse_object", + "valueType": { + "$id": "755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "756", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "755" + }, + "enumType": { + "$ref": "754" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "757", + "kind": "enum", + "name": "CreateBatchRequestEndpoint", + "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", + "valueType": { + "$id": "758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "759", + "kind": "enumvalue", + "name": "/v1/chat/completions", + "value": "/v1/chat/completions", + "valueType": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "757" + }, + "decorators": [] + }, + { + "$id": "761", + "kind": "enumvalue", + "name": "/v1/embeddings", + "value": "/v1/embeddings", + "valueType": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "757" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "763", + "kind": "enum", + "name": "CreateBatchRequest_completion_window", + "valueType": { + "$id": "764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "765", + "kind": "enumvalue", + "name": "24h", + "value": "24h", + "description": "24h", + "valueType": { + "$ref": "764" + }, + "enumType": { + "$ref": "763" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateBatchRequest_completion_window", + "isFixed": false, + "isFlags": false, + "usage": "Spread,Json", + "decorators": [] + }, + { + "$id": "766", + "kind": "enum", + "name": "Batch_object", + "valueType": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "768", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "description": "batch", + "valueType": { + "$ref": "767" + }, + "enumType": { + "$ref": "766" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Batch_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "769", + "kind": "enum", + "name": "BatchErrors_object", + "valueType": { + "$id": "770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "771", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "770" + }, + "enumType": { + "$ref": "769" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchErrors_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "772", + "kind": "enum", + "name": "BatchStatus", + "crossLanguageDefinitionId": "Batch.status.anonymous", + "valueType": { + "$id": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "774", + "kind": "enumvalue", + "name": "validating", + "value": "validating", + "valueType": { + "$id": "775", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "776", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "778", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "780", + "kind": "enumvalue", + "name": "finalizing", + "value": "finalizing", + "valueType": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "782", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "784", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "786", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + }, + { + "$id": "788", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "772" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "790", + "kind": "enum", + "name": "ListBatchesResponse_object", + "valueType": { + "$id": "791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "792", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "791" + }, + "enumType": { + "$ref": "790" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListBatchesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "793", + "kind": "enum", + "name": "CreateAssistantRequestModel", + "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", + "valueType": { + "$id": "794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "795", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "797", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "799", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "801", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "803", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "805", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "807", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "809", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "811", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "813", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "815", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "817", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "819", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "821", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "823", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "825", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "827", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "829", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "831", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "833", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "835", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "837", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + }, + { + "$id": "839", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "793" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "841", + "kind": "enum", + "name": "AssistantObject_object", + "valueType": { + "$id": "842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "843", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "842" + }, + "enumType": { + "$ref": "841" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "844", + "kind": "enum", + "name": "ListAssistantsRequestOrder", + "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", + "valueType": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "846", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "844" + }, + "decorators": [] + }, + { + "$id": "848", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "844" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "850", + "kind": "enum", + "name": "ListAssistantsResponse_object", + "valueType": { + "$id": "851", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "852", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "851" + }, + "enumType": { + "$ref": "850" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListAssistantsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "853", + "kind": "enum", + "name": "DeleteAssistantResponse_object", + "valueType": { + "$id": "854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "855", + "kind": "enumvalue", + "name": "assistant.deleted", + "value": "assistant.deleted", + "description": "assistant.deleted", + "valueType": { + "$ref": "854" + }, + "enumType": { + "$ref": "853" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteAssistantResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "856", + "kind": "enum", + "name": "CreateSpeechRequestModel", + "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", + "valueType": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "858", + "kind": "enumvalue", + "name": "tts-1", + "value": "tts-1", + "valueType": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "856" + }, + "decorators": [] + }, + { + "$id": "860", + "kind": "enumvalue", + "name": "tts-1-hd", + "value": "tts-1-hd", + "valueType": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "856" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "862", + "kind": "enum", + "name": "CreateSpeechRequestVoice", + "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", + "valueType": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "864", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + }, + { + "$id": "866", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + }, + { + "$id": "868", + "kind": "enumvalue", + "name": "fable", + "value": "fable", + "valueType": { + "$id": "869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + }, + { + "$id": "870", + "kind": "enumvalue", + "name": "onyx", + "value": "onyx", + "valueType": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + }, + { + "$id": "872", + "kind": "enumvalue", + "name": "nova", + "value": "nova", + "valueType": { + "$id": "873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + }, + { + "$id": "874", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "862" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "876", + "kind": "enum", + "name": "CreateSpeechRequestResponseFormat", + "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", + "valueType": { + "$id": "877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "878", + "kind": "enumvalue", + "name": "mp3", + "value": "mp3", + "valueType": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + }, + { + "$id": "880", + "kind": "enumvalue", + "name": "opus", + "value": "opus", + "valueType": { + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + }, + { + "$id": "882", + "kind": "enumvalue", + "name": "aac", + "value": "aac", + "valueType": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + }, + { + "$id": "884", + "kind": "enumvalue", + "name": "flac", + "value": "flac", + "valueType": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + }, + { + "$id": "886", + "kind": "enumvalue", + "name": "wav", + "value": "wav", + "valueType": { + "$id": "887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + }, + { + "$id": "888", + "kind": "enumvalue", + "name": "pcm", + "value": "pcm", + "valueType": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "876" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "890", + "kind": "enum", + "name": "CreateTranscriptionRequestModel", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", + "valueType": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "892", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "890" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "894", + "kind": "enum", + "name": "CreateTranscriptionRequestResponseFormat1", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", + "valueType": { + "$id": "895", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "896", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "894" + }, + "decorators": [] + }, + { + "$id": "898", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "894" + }, + "decorators": [] + }, + { + "$id": "900", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "894" + }, + "decorators": [] + }, + { + "$id": "902", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "894" + }, + "decorators": [] + }, + { + "$id": "904", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "894" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "906", + "kind": "enum", + "name": "CreateTranscriptionRequestTimestampGranularity", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", + "valueType": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "908", + "kind": "enumvalue", + "name": "word", + "value": "word", + "valueType": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "906" + }, + "decorators": [] + }, + { + "$id": "910", + "kind": "enumvalue", + "name": "segment", + "value": "segment", + "valueType": { + "$id": "911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "906" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "912", + "kind": "enum", + "name": "CreateTranscriptionResponseVerboseJson_task", + "valueType": { + "$id": "913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "914", + "kind": "enumvalue", + "name": "transcribe", + "value": "transcribe", + "description": "transcribe", + "valueType": { + "$ref": "913" + }, + "enumType": { + "$ref": "912" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranscriptionResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "915", + "kind": "enum", + "name": "CreateTranslationRequestModel", + "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", + "valueType": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "917", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "915" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "919", + "kind": "enum", + "name": "CreateTranslationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", + "valueType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "921", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "919" + }, + "decorators": [] + }, + { + "$id": "923", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "919" + }, + "decorators": [] + }, + { + "$id": "925", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "926", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "919" + }, + "decorators": [] + }, + { + "$id": "927", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "919" + }, + "decorators": [] + }, + { + "$id": "929", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "919" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "931", + "kind": "enum", + "name": "CreateTranslationResponseVerboseJson_task", + "valueType": { + "$id": "932", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "933", + "kind": "enumvalue", + "name": "translate", + "value": "translate", + "description": "translate", + "valueType": { + "$ref": "932" + }, + "enumType": { + "$ref": "931" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranslationResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "934", + "kind": "enum", + "name": "BatchRequestInput_method", + "valueType": { + "$id": "935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "936", + "kind": "enumvalue", + "name": "POST", + "value": "POST", + "description": "POST", + "valueType": { + "$ref": "935" + }, + "enumType": { + "$ref": "934" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchRequestInput_method", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "937", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "939", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + }, + { + "$id": "941", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + }, + { + "$id": "943", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + }, + { + "$id": "945", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "947", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponse_object", + "valueType": { + "$id": "948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "949", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "948" + }, + "enumType": { + "$ref": "947" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionFunctionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "950", + "kind": "enum", + "name": "ChatCompletionMessageToolCallChunk_type", + "valueType": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "952", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "951" + }, + "enumType": { + "$ref": "950" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCallChunk_type", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "953", + "kind": "enum", + "name": "ChatCompletionStreamResponseDeltaRole", + "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", + "valueType": { + "$id": "954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "955", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "953" + }, + "decorators": [] + }, + { + "$id": "957", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "953" + }, + "decorators": [] + }, + { + "$id": "959", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "953" + }, + "decorators": [] + }, + { + "$id": "961", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "953" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "963", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "965", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "963" + }, + "decorators": [] + }, + { + "$id": "967", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "963" + }, + "decorators": [] + }, + { + "$id": "969", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "963" + }, + "decorators": [] + }, + { + "$id": "971", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "963" + }, + "decorators": [] + }, + { + "$id": "973", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "963" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "975", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", + "valueType": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "977", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "975" + }, + "decorators": [] + }, + { + "$id": "979", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "975" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "981", + "kind": "enum", + "name": "CreateChatCompletionStreamResponse_object", + "valueType": { + "$id": "982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "983", + "kind": "enumvalue", + "name": "chat.completion.chunk", + "value": "chat.completion.chunk", + "description": "chat.completion.chunk", + "valueType": { + "$ref": "982" + }, + "enumType": { + "$ref": "981" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionStreamResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "984", + "kind": "enum", + "name": "MessageDeltaContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "986", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "984" + }, + "decorators": [] + }, + { + "$id": "988", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "984" + }, + "decorators": [] + }, + { + "$id": "990", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "984" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "992", + "kind": "enum", + "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "994", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "992" + }, + "decorators": [] + }, + { + "$id": "996", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "992" + }, + "decorators": [] + }, + { + "$id": "998", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "992" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1000", + "kind": "enum", + "name": "MessageContentImageFileObject_type", + "valueType": { + "$id": "1001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1002", + "kind": "enumvalue", + "name": "image_file", + "value": "image_file", + "description": "image_file", + "valueType": { + "$ref": "1001" + }, + "enumType": { + "$ref": "1000" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageFileObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1003", + "kind": "enum", + "name": "MessageContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1005", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1003" + }, + "decorators": [] + }, + { + "$id": "1007", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1003" + }, + "decorators": [] + }, + { + "$id": "1009", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1003" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1011", + "kind": "enum", + "name": "MessageContentTextObject_type", + "valueType": { + "$id": "1012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1013", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1012" + }, + "enumType": { + "$ref": "1011" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1014", + "kind": "enum", + "name": "MessageContentRefusalObject_type", + "valueType": { + "$id": "1015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1016", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "1015" + }, + "enumType": { + "$ref": "1014" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentRefusalObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1017", + "kind": "enum", + "name": "MessageContentImageUrlObject_type", + "valueType": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1019", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "1018" + }, + "enumType": { + "$ref": "1017" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageUrlObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1020", + "kind": "enum", + "name": "MessageContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1022", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1020" + }, + "decorators": [] + }, + { + "$id": "1024", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1020" + }, + "decorators": [] + }, + { + "$id": "1026", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1020" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1028", + "kind": "enum", + "name": "MessageDeltaObject_object", + "valueType": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1030", + "kind": "enumvalue", + "name": "thread.message.delta", + "value": "thread.message.delta", + "description": "thread.message.delta", + "valueType": { + "$ref": "1029" + }, + "enumType": { + "$ref": "1028" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1031", + "kind": "enum", + "name": "MessageDeltaObjectDeltaRole", + "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", + "valueType": { + "$id": "1032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1033", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1031" + }, + "decorators": [] + }, + { + "$id": "1035", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1031" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1037", + "kind": "enum", + "name": "MessageRequestContentTextObject_type", + "valueType": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1039", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1038" + }, + "enumType": { + "$ref": "1037" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageRequestContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1040", + "kind": "enum", + "name": "RunStepDeltaObject_object", + "valueType": { + "$id": "1041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1042", + "kind": "enumvalue", + "name": "thread.run.step.delta", + "value": "thread.run.step.delta", + "description": "thread.run.step.delta", + "valueType": { + "$ref": "1041" + }, + "enumType": { + "$ref": "1040" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1043", + "kind": "enum", + "name": "ListThreadsResponse_object", + "valueType": { + "$id": "1044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1045", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1044" + }, + "enumType": { + "$ref": "1043" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListThreadsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1046", + "kind": "enum", + "name": "ChatCompletionRole", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", + "valueType": { + "$id": "1047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1048", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1046" + }, + "decorators": [] + }, + { + "$id": "1050", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1046" + }, + "decorators": [] + }, + { + "$id": "1052", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1046" + }, + "decorators": [] + }, + { + "$id": "1054", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1046" + }, + "decorators": [] + }, + { + "$id": "1056", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "1057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1046" + }, + "decorators": [] + } + ], + "access": "public", + "description": "The role of the author of a message", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + } + ], + "Models": [ + { + "$id": "1058", + "kind": "model", + "name": "CreateUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1059", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to upload.", + "type": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" + }, + { + "$id": "1061", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" + }, + { + "$id": "1062", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The number of bytes in the file you are uploading.", + "type": { + "$id": "1063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" + }, + { + "$id": "1064", + "kind": "property", + "name": "mime_type", + "serializedName": "mime_type", + "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", + "type": { + "$id": "1065", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" + } + ] + }, + { + "$id": "1066", + "kind": "model", + "name": "Upload", + "crossLanguageDefinitionId": "OpenAI.Upload", + "usage": "Output,Json", + "description": "The Upload object can accept byte chunks in the form of Parts.", + "decorators": [], + "properties": [ + { + "$id": "1067", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The Upload unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.id" + }, + { + "$id": "1069", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1070", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1071", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.created_at" + }, + { + "$id": "1072", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to be uploaded.", + "type": { + "$id": "1073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.filename" + }, + { + "$id": "1074", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The intended number of bytes to be uploaded.", + "type": { + "$id": "1075", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.bytes" + }, + { + "$id": "1076", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", + "type": { + "$id": "1077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.purpose" + }, + { + "$id": "1078", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the Upload.", + "type": { + "$ref": "12" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.status" + }, + { + "$id": "1079", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1080", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1081", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" + }, + { + "$id": "1082", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"upload\".", + "type": { + "$id": "1083", + "kind": "constant", + "valueType": { + "$ref": "22" + }, + "value": "upload", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.object" + }, + { + "$id": "1084", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The ready File object after the Upload is completed.", + "type": { + "$id": "1085", + "kind": "nullable", + "type": { + "$id": "1086", + "kind": "model", + "name": "OpenAIFile", + "crossLanguageDefinitionId": "OpenAI.OpenAIFile", + "usage": "Output,Json", + "description": "The `File` object represents a document that has been uploaded to OpenAI.", + "decorators": [], + "properties": [ + { + "$id": "1087", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The file identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" + }, + { + "$id": "1089", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The size of the file, in bytes.", + "type": { + "$id": "1090", + "kind": "nullable", + "type": { + "$id": "1091", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" + }, + { + "$id": "1092", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the file was created.", + "type": { + "$id": "1093", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1094", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" + }, + { + "$id": "1095", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file.", + "type": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" + }, + { + "$id": "1097", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `file`.", + "type": { + "$id": "1098", + "kind": "constant", + "valueType": { + "$ref": "25" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" + }, + { + "$id": "1099", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", + "type": { + "$ref": "28" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" + }, + { + "$id": "1100", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" + }, + { + "$id": "1101", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", + "type": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.file" + } + ] + }, + { + "$ref": "1086" + }, + { + "$id": "1103", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "OpenAI.ErrorResponse", + "usage": "Output,Error,Json", + "decorators": [], + "properties": [ + { + "$id": "1104", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "1105", + "kind": "model", + "name": "Error", + "crossLanguageDefinitionId": "OpenAI.Error", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1106", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "1107", + "kind": "nullable", + "type": { + "$id": "1108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.code" + }, + { + "$id": "1109", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "1110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.message" + }, + { + "$id": "1111", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "1112", + "kind": "nullable", + "type": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.param" + }, + { + "$id": "1114", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.type" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" + } + ] + }, + { + "$ref": "1105" + }, + { + "$id": "1116", + "kind": "model", + "name": "AddUploadPartRequest", + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "1117", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The chunk of bytes for this Part.", + "type": { + "$id": "1118", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" + } + ] + }, + { + "$id": "1119", + "kind": "model", + "name": "UploadPart", + "crossLanguageDefinitionId": "OpenAI.UploadPart", + "usage": "Output,Json", + "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", + "decorators": [], + "properties": [ + { + "$id": "1120", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The upload Part unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.id" + }, + { + "$id": "1122", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Part was created.", + "type": { + "$id": "1123", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1124", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" + }, + { + "$id": "1125", + "kind": "property", + "name": "upload_id", + "serializedName": "upload_id", + "description": "The ID of the Upload object that this Part was added to.", + "type": { + "$id": "1126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" + }, + { + "$id": "1127", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `upload.part`.", + "type": { + "$id": "1128", + "kind": "constant", + "valueType": { + "$ref": "52" + }, + "value": "upload.part", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.object" + } + ] + }, + { + "$id": "1129", + "kind": "model", + "name": "CompleteUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1130", + "kind": "property", + "name": "part_ids", + "serializedName": "part_ids", + "description": "The ordered list of Part IDs.", + "type": { + "$id": "1131", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" + }, + { + "$id": "1133", + "kind": "property", + "name": "md5", + "serializedName": "md5", + "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", + "type": { + "$id": "1134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" + } + ] + }, + { + "$id": "1135", + "kind": "model", + "name": "ListVectorStoresResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1136", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1137", + "kind": "constant", + "valueType": { + "$ref": "61" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" + }, + { + "$id": "1138", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1139", + "kind": "array", + "name": "ArrayVectorStoreObject", + "valueType": { + "$id": "1140", + "kind": "model", + "name": "VectorStoreObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", + "usage": "Output,Json", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", + "decorators": [], + "properties": [ + { + "$id": "1141", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" + }, + { + "$id": "1143", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store`.", + "type": { + "$id": "1144", + "kind": "constant", + "valueType": { + "$ref": "64" + }, + "value": "vector_store", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" + }, + { + "$id": "1145", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store was created.", + "type": { + "$id": "1146", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1147", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" + }, + { + "$id": "1148", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" + }, + { + "$id": "1150", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total number of bytes used by the files in the vector store.", + "type": { + "$id": "1151", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" + }, + { + "$id": "1152", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1153", + "kind": "model", + "name": "VectorStoreObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1154", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1155", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1156", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been successfully processed.", + "type": { + "$id": "1157", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" + }, + { + "$id": "1158", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1159", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" + }, + { + "$id": "1160", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that were cancelled.", + "type": { + "$id": "1161", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1162", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1163", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" + }, + { + "$id": "1164", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", + "type": { + "$ref": "67" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" + }, + { + "$id": "1165", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1166", + "kind": "model", + "name": "VectorStoreExpirationAfter", + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", + "usage": "Input,Output,Json", + "description": "The expiration policy for a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1167", + "kind": "property", + "name": "anchor", + "serializedName": "anchor", + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", + "type": { + "$id": "1168", + "kind": "constant", + "valueType": { + "$ref": "75" + }, + "value": "last_active_at", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" + }, + { + "$id": "1169", + "kind": "property", + "name": "days", + "serializedName": "days", + "description": "The number of days after the anchor time that the vector store will expire.", + "type": { + "$id": "1170", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" + }, + { + "$id": "1171", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", + "type": { + "$id": "1172", + "kind": "nullable", + "type": { + "$id": "1173", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1174", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" + }, + { + "$id": "1175", + "kind": "property", + "name": "last_active_at", + "serializedName": "last_active_at", + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", + "type": { + "$id": "1176", + "kind": "nullable", + "type": { + "$id": "1177", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1178", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" + }, + { + "$id": "1179", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1180", + "kind": "nullable", + "type": { + "$id": "1181", + "kind": "dict", + "keyType": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" + }, + { + "$id": "1184", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" + }, + { + "$id": "1186", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" + }, + { + "$id": "1188", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1189", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" + } + ] + }, + { + "$ref": "1140" + }, + { + "$ref": "1153" + }, + { + "$ref": "1166" + }, + { + "$id": "1190", + "kind": "model", + "name": "CreateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1191", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1192", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" + }, + { + "$id": "1194", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" + }, + { + "$id": "1196", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$ref": "1166" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" + }, + { + "$id": "1197", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1198", + "kind": "union", + "name": "CreateVectorStoreRequestChunkingStrategy", + "variantTypes": [ + { + "$id": "1199", + "kind": "model", + "name": "AutoChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", + "usage": "Input,Json", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$id": "1200", + "kind": "model", + "name": "FileChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1201", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" + }, + "properties": [ + { + "$ref": "1201" + } + ], + "discriminatedSubtypes": { + "$id": "1203", + "auto": { + "$ref": "1199" + }, + "static": { + "$id": "1204", + "kind": "model", + "name": "StaticChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", + "usage": "Input,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$ref": "1200" + }, + "properties": [ + { + "$id": "1205", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1206", + "kind": "constant", + "valueType": { + "$id": "1207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" + }, + { + "$id": "1208", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$id": "1209", + "kind": "model", + "name": "StaticChunkingStrategy", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1210", + "kind": "property", + "name": "max_chunk_size_tokens", + "serializedName": "max_chunk_size_tokens", + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", + "type": { + "$id": "1211", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" + }, + { + "$id": "1212", + "kind": "property", + "name": "chunk_overlap_tokens", + "serializedName": "chunk_overlap_tokens", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", + "type": { + "$id": "1213", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" + } + ] + } + } + }, + "properties": [ + { + "$id": "1214", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `auto`.", + "type": { + "$id": "1215", + "kind": "constant", + "valueType": { + "$id": "1216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" + } + ] + }, + { + "$ref": "1204" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" + }, + { + "$id": "1217", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1218", + "kind": "nullable", + "type": { + "$id": "1219", + "kind": "dict", + "keyType": { + "$id": "1220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" + } + ] + }, + { + "$ref": "1199" + }, + { + "$ref": "1200" + }, + { + "$ref": "1204" + }, + { + "$ref": "1209" + }, + { + "$id": "1222", + "kind": "model", + "name": "UpdateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1223", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1224", + "kind": "nullable", + "type": { + "$id": "1225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" + }, + { + "$id": "1226", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1227", + "kind": "nullable", + "type": { + "$ref": "1166" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" + }, + { + "$id": "1228", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1229", + "kind": "nullable", + "type": { + "$id": "1230", + "kind": "dict", + "keyType": { + "$id": "1231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" + } + ] + }, + { + "$id": "1233", + "kind": "model", + "name": "DeleteVectorStoreResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1234", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" + }, + { + "$id": "1236", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1237", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" + }, + { + "$id": "1238", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1239", + "kind": "constant", + "valueType": { + "$ref": "78" + }, + "value": "vector_store.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" + } + ] + }, + { + "$id": "1240", + "kind": "model", + "name": "ListVectorStoreFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1241", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1242", + "kind": "constant", + "valueType": { + "$ref": "97" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" + }, + { + "$id": "1243", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1244", + "kind": "array", + "name": "ArrayVectorStoreFileObject", + "valueType": { + "$id": "1245", + "kind": "model", + "name": "VectorStoreFileObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", + "usage": "Output,Json", + "description": "A list of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1246", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" + }, + { + "$id": "1248", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file`.", + "type": { + "$id": "1249", + "kind": "constant", + "valueType": { + "$ref": "100" + }, + "value": "vector_store.file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" + }, + { + "$id": "1250", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", + "type": { + "$id": "1251", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" + }, + { + "$id": "1252", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", + "type": { + "$id": "1253", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1254", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" + }, + { + "$id": "1255", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" + }, + { + "$id": "1257", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", + "type": { + "$ref": "103" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" + }, + { + "$id": "1258", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", + "type": { + "$id": "1259", + "kind": "nullable", + "type": { + "$id": "1260", + "kind": "model", + "name": "VectorStoreFileObjectLastError", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1261", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "113" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" + }, + { + "$id": "1262", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" + }, + { + "$id": "1264", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The strategy used to chunk the file.", + "type": { + "$id": "1265", + "kind": "union", + "name": "VectorStoreFileObjectChunkingStrategy", + "variantTypes": [ + { + "$id": "1266", + "kind": "model", + "name": "StaticChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$id": "1267", + "kind": "model", + "name": "FileChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1268", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" + }, + "properties": [ + { + "$ref": "1268" + } + ], + "discriminatedSubtypes": { + "$id": "1270", + "static": { + "$ref": "1266" + }, + "other": { + "$id": "1271", + "kind": "model", + "name": "OtherChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", + "discriminatorValue": "other", + "decorators": [], + "baseModel": { + "$ref": "1267" + }, + "properties": [ + { + "$id": "1272", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `other`.", + "type": { + "$id": "1273", + "kind": "constant", + "valueType": { + "$id": "1274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "other", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" + } + ] + }, + "auto": { + "$id": "1275", + "kind": "model", + "name": "AutoChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$ref": "1267" + }, + "properties": [ + { + "$id": "1276", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1277", + "kind": "constant", + "valueType": { + "$id": "1278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" + } + ] + } + } + }, + "properties": [ + { + "$id": "1279", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1280", + "kind": "constant", + "valueType": { + "$id": "1281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" + }, + { + "$id": "1282", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$ref": "1209" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" + } + ] + }, + { + "$ref": "1271" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" + }, + { + "$id": "1283", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" + }, + { + "$id": "1285", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" + }, + { + "$id": "1287", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1288", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" + } + ] + }, + { + "$ref": "1245" + }, + { + "$ref": "1260" + }, + { + "$ref": "1266" + }, + { + "$ref": "1267" + }, + { + "$ref": "1271" + }, + { + "$ref": "1275" + }, + { + "$id": "1289", + "kind": "model", + "name": "CreateVectorStoreFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1290", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" + }, + { + "$id": "1292", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1293", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1199" + }, + { + "$ref": "1204" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" + } + ] + }, + { + "$id": "1294", + "kind": "model", + "name": "DeleteVectorStoreFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1295", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" + }, + { + "$id": "1297", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1298", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" + }, + { + "$id": "1299", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1300", + "kind": "constant", + "valueType": { + "$ref": "121" + }, + "value": "vector_store.file.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" + } + ] + }, + { + "$id": "1301", + "kind": "model", + "name": "CreateVectorStoreFileBatchRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1302", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1303", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" + }, + { + "$id": "1305", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1306", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1199" + }, + { + "$ref": "1204" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" + } + ] + }, + { + "$id": "1307", + "kind": "model", + "name": "VectorStoreFileBatchObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", + "usage": "Output,Json", + "description": "A batch of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1308", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" + }, + { + "$id": "1310", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file_batch`.", + "type": { + "$id": "1311", + "kind": "constant", + "valueType": { + "$ref": "124" + }, + "value": "vector_store.files_batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" + }, + { + "$id": "1312", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", + "type": { + "$id": "1313", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1314", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" + }, + { + "$id": "1315", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" + }, + { + "$id": "1317", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", + "type": { + "$ref": "127" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" + }, + { + "$id": "1318", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1319", + "kind": "model", + "name": "VectorStoreFileBatchObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1320", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1321", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1322", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been processed.", + "type": { + "$id": "1323", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" + }, + { + "$id": "1324", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1325", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" + }, + { + "$id": "1326", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that where cancelled.", + "type": { + "$id": "1327", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1328", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1329", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" + } + ] + }, + { + "$ref": "1319" + }, + { + "$id": "1330", + "kind": "model", + "name": "CreateThreadAndRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1331", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" + }, + { + "$id": "1333", + "kind": "property", + "name": "thread", + "serializedName": "thread", + "description": "If no thread is provided, an empty thread will be created.", + "type": { + "$id": "1334", + "kind": "model", + "name": "CreateThreadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1335", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "type": { + "$id": "1336", + "kind": "array", + "name": "ArrayCreateMessageRequest", + "valueType": { + "$id": "1337", + "kind": "model", + "name": "CreateMessageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1338", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", + "type": { + "$ref": "143" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" + }, + { + "$id": "1339", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "1340", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$id": "1341", + "kind": "model", + "name": "MessageContent", + "crossLanguageDefinitionId": "OpenAI.MessageContent", + "access": "public", + "usage": "Input,Output,Json", + "description": "Represents a single piece of content in an Assistants API message.", + "decorators": [], + "properties": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" + }, + { + "$id": "1342", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they should be added to.", + "type": { + "$id": "1343", + "kind": "nullable", + "type": { + "$id": "1344", + "kind": "array", + "name": "CreateMessageRequestAttachments", + "valueType": { + "$id": "1345", + "kind": "model", + "name": "CreateMessageRequestAttachment", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1346", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "1347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" + }, + { + "$id": "1348", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "1349", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1350", + "kind": "union", + "name": "CreateMessageRequestAttachmentTool", + "variantTypes": [ + { + "$id": "1351", + "kind": "model", + "name": "AssistantToolsCode", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", + "usage": "Input,Output,Json", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$id": "1352", + "kind": "model", + "name": "AssistantToolDefinition", + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1353", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" + }, + "properties": [ + { + "$ref": "1353" + } + ], + "discriminatedSubtypes": { + "$id": "1355", + "code_interpreter": { + "$ref": "1351" + }, + "file_search": { + "$id": "1356", + "kind": "model", + "name": "AssistantToolsFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", + "usage": "Input,Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1352" + }, + "properties": [ + { + "$id": "1357", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1358", + "kind": "constant", + "valueType": { + "$id": "1359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" + }, + { + "$id": "1360", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "Overrides for the file search tool.", + "type": { + "$id": "1361", + "kind": "model", + "name": "AssistantToolsFileSearchFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1362", + "kind": "property", + "name": "max_num_results", + "serializedName": "max_num_results", + "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "type": { + "$id": "1363", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" + }, + { + "$id": "1364", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1365", + "kind": "model", + "name": "FileSearchRankingOptions", + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", + "usage": "Input,Output,Json", + "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "decorators": [], + "properties": [ + { + "$id": "1366", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", + "type": { + "$ref": "149" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" + }, + { + "$id": "1367", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1368", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" + } + ] + }, + "function": { + "$id": "1369", + "kind": "model", + "name": "AssistantToolsFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", + "usage": "Input,Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1352" + }, + "properties": [ + { + "$id": "1370", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `function`", + "type": { + "$id": "1371", + "kind": "constant", + "valueType": { + "$id": "1372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" + }, + { + "$id": "1373", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1374", + "kind": "model", + "name": "FunctionObject", + "crossLanguageDefinitionId": "OpenAI.FunctionObject", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1375", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" + }, + { + "$id": "1377", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" + }, + { + "$id": "1379", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "1380", + "kind": "model", + "name": "FunctionParameters", + "crossLanguageDefinitionId": "OpenAI.FunctionParameters", + "usage": "Input,Output,Json", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", + "decorators": [], + "additionalProperties": { + "$id": "1381", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" + }, + { + "$id": "1382", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", + "type": { + "$id": "1383", + "kind": "nullable", + "type": { + "$id": "1384", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" + } + ] + } + } + }, + "properties": [ + { + "$id": "1385", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `code_interpreter`", + "type": { + "$id": "1386", + "kind": "constant", + "valueType": { + "$id": "1387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" + } + ] + }, + { + "$id": "1388", + "kind": "model", + "name": "AssistantToolsFileSearchTypeOnly", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1389", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1390", + "kind": "constant", + "valueType": { + "$ref": "155" + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" + }, + { + "$id": "1391", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1392", + "kind": "nullable", + "type": { + "$id": "1393", + "kind": "dict", + "keyType": { + "$id": "1394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" + }, + { + "$id": "1396", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1397", + "kind": "nullable", + "type": { + "$id": "1398", + "kind": "model", + "name": "CreateThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1399", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1400", + "kind": "model", + "name": "CreateThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1401", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1402", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1404", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1405", + "kind": "model", + "name": "ToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1406", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1407", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" + }, + { + "$id": "1409", + "kind": "property", + "name": "vector_stores", + "serializedName": "vector_stores", + "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", + "type": { + "$id": "1410", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1411", + "kind": "model", + "name": "ToolResourcesFileSearchVectorStore", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1412", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", + "type": { + "$id": "1413", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" + }, + { + "$id": "1415", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1416", + "kind": "union", + "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", + "variantTypes": [ + { + "$ref": "1199" + }, + { + "$ref": "1204" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" + }, + { + "$id": "1417", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1418", + "kind": "dict", + "keyType": { + "$id": "1419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" + }, + { + "$id": "1421", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1422", + "kind": "nullable", + "type": { + "$id": "1423", + "kind": "dict", + "keyType": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" + }, + { + "$id": "1426", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1427", + "kind": "nullable", + "type": { + "$ref": "158" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" + }, + { + "$id": "1428", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1429", + "kind": "nullable", + "type": { + "$id": "1430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" + }, + { + "$id": "1431", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1432", + "kind": "nullable", + "type": { + "$id": "1433", + "kind": "array", + "name": "CreateThreadAndRunRequestTools", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" + }, + { + "$id": "1434", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1435", + "kind": "nullable", + "type": { + "$id": "1436", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1437", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1438", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1439", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1440", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1442", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1443", + "kind": "model", + "name": "ToolResourcesFileSearchIdsOnly", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1444", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1445", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1446", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" + }, + { + "$id": "1447", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1448", + "kind": "nullable", + "type": { + "$id": "1449", + "kind": "dict", + "keyType": { + "$id": "1450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" + }, + { + "$id": "1452", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1453", + "kind": "nullable", + "type": { + "$id": "1454", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" + }, + { + "$id": "1455", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1456", + "kind": "nullable", + "type": { + "$id": "1457", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" + }, + { + "$id": "1458", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1459", + "kind": "nullable", + "type": { + "$id": "1460", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" + }, + { + "$id": "1461", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1462", + "kind": "nullable", + "type": { + "$id": "1463", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" + }, + { + "$id": "1464", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1465", + "kind": "nullable", + "type": { + "$id": "1466", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" + }, + { + "$id": "1467", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1468", + "kind": "nullable", + "type": { + "$id": "1469", + "kind": "model", + "name": "TruncationObject", + "crossLanguageDefinitionId": "OpenAI.TruncationObject", + "usage": "Input,Output,Json", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", + "decorators": [], + "properties": [ + { + "$id": "1470", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "type": { + "$ref": "206" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" + }, + { + "$id": "1471", + "kind": "property", + "name": "last_messages", + "serializedName": "last_messages", + "description": "The number of most recent messages from the thread when constructing the context for the run.", + "type": { + "$id": "1472", + "kind": "nullable", + "type": { + "$id": "1473", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" + }, + { + "$id": "1474", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1475", + "kind": "nullable", + "type": { + "$id": "1476", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$id": "1477", + "kind": "model", + "name": "AssistantsNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", + "usage": "Input,Output,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", + "decorators": [], + "properties": [ + { + "$id": "1478", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. If type is `function`, the function name must be set", + "type": { + "$ref": "220" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" + }, + { + "$id": "1479", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1480", + "kind": "model", + "name": "AssistantsNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1481", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "1482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" + }, + { + "$id": "1483", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1484", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" + }, + { + "$id": "1485", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1486", + "kind": "nullable", + "type": { + "$id": "1487", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1488", + "kind": "constant", + "valueType": { + "$id": "1489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "1490", + "kind": "model", + "name": "ResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", + "usage": "Input,Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$id": "1491", + "kind": "model", + "name": "OmniTypedResponseFormat", + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1492", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" + }, + "properties": [ + { + "$ref": "1492" + } + ], + "discriminatedSubtypes": { + "$id": "1494", + "text": { + "$ref": "1490" + }, + "json_object": { + "$id": "1495", + "kind": "model", + "name": "ResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", + "usage": "Input,Output,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "1491" + }, + "properties": [ + { + "$id": "1496", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "1497", + "kind": "constant", + "valueType": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "1499", + "kind": "model", + "name": "ResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", + "usage": "Input,Output,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "1491" + }, + "properties": [ + { + "$id": "1500", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "1501", + "kind": "constant", + "valueType": { + "$id": "1502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" + }, + { + "$id": "1503", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$id": "1504", + "kind": "model", + "name": "ResponseFormatJsonSchemaJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1505", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", + "type": { + "$id": "1506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" + }, + { + "$id": "1507", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" + }, + { + "$id": "1509", + "kind": "property", + "name": "schema", + "serializedName": "schema", + "type": { + "$id": "1510", + "kind": "model", + "name": "ResponseFormatJsonSchemaSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", + "usage": "Input,Output,Json", + "description": "The schema for the response format, described as a JSON Schema object.", + "decorators": [], + "additionalProperties": { + "$id": "1511", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" + }, + { + "$id": "1512", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", + "type": { + "$id": "1513", + "kind": "nullable", + "type": { + "$id": "1514", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "properties": [ + { + "$id": "1515", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "1516", + "kind": "constant", + "valueType": { + "$id": "1517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" + } + ] + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" + } + ] + }, + { + "$ref": "1334" + }, + { + "$ref": "1337" + }, + { + "$ref": "1341" + }, + { + "$ref": "1345" + }, + { + "$ref": "1351" + }, + { + "$ref": "1352" + }, + { + "$ref": "1356" + }, + { + "$ref": "1361" + }, + { + "$ref": "1365" + }, + { + "$ref": "1369" + }, + { + "$ref": "1374" + }, + { + "$ref": "1380" + }, + { + "$ref": "1388" + }, + { + "$ref": "1398" + }, + { + "$ref": "1400" + }, + { + "$ref": "1405" + }, + { + "$ref": "1411" + }, + { + "$ref": "1436" + }, + { + "$ref": "1438" + }, + { + "$ref": "1443" + }, + { + "$ref": "1469" + }, + { + "$ref": "1477" + }, + { + "$ref": "1480" + }, + { + "$ref": "1490" + }, + { + "$ref": "1491" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + }, + { + "$ref": "1504" + }, + { + "$ref": "1510" + }, + { + "$id": "1518", + "kind": "model", + "name": "RunObject", + "crossLanguageDefinitionId": "OpenAI.RunObject", + "usage": "Output,Json", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "1519", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.id" + }, + { + "$id": "1521", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run`.", + "type": { + "$id": "1522", + "kind": "constant", + "valueType": { + "$ref": "228" + }, + "value": "thread.run", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.object" + }, + { + "$id": "1523", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": { + "$id": "1524", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1525", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" + }, + { + "$id": "1526", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": { + "$id": "1527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" + }, + { + "$id": "1528", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "type": { + "$id": "1529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" + }, + { + "$id": "1530", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", + "type": { + "$ref": "231" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.status" + }, + { + "$id": "1531", + "kind": "property", + "name": "required_action", + "serializedName": "required_action", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "type": { + "$id": "1532", + "kind": "nullable", + "type": { + "$id": "1533", + "kind": "model", + "name": "RunObjectRequiredAction", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1534", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "For now, this is always `submit_tool_outputs`.", + "type": { + "$id": "1535", + "kind": "constant", + "valueType": { + "$ref": "251" + }, + "value": "submit_tool_outputs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" + }, + { + "$id": "1536", + "kind": "property", + "name": "submit_tool_outputs", + "serializedName": "submit_tool_outputs", + "description": "Details on the tool outputs needed for this run to continue.", + "type": { + "$id": "1537", + "kind": "model", + "name": "RunObjectRequiredActionSubmitToolOutputs", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1538", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "A list of the relevant tool calls.", + "type": { + "$id": "1539", + "kind": "array", + "name": "ArrayRunToolCallObject", + "valueType": { + "$id": "1540", + "kind": "model", + "name": "RunToolCallObject", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", + "usage": "Output,Json", + "description": "Tool call objects", + "decorators": [], + "properties": [ + { + "$id": "1541", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", + "type": { + "$id": "1542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" + }, + { + "$id": "1543", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "type": { + "$id": "1544", + "kind": "constant", + "valueType": { + "$ref": "254" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" + }, + { + "$id": "1545", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function definition.", + "type": { + "$id": "1546", + "kind": "model", + "name": "RunToolCallObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1547", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" + }, + { + "$id": "1549", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments that the model expects you to pass to the function.", + "type": { + "$id": "1550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" + }, + { + "$id": "1551", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "type": { + "$id": "1552", + "kind": "nullable", + "type": { + "$id": "1553", + "kind": "model", + "name": "RunObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1554", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", + "type": { + "$ref": "257" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" + }, + { + "$id": "1555", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" + }, + { + "$id": "1557", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": { + "$id": "1558", + "kind": "nullable", + "type": { + "$id": "1559", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1560", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" + }, + { + "$id": "1561", + "kind": "property", + "name": "started_at", + "serializedName": "started_at", + "description": "The Unix timestamp (in seconds) for when the run was started.", + "type": { + "$id": "1562", + "kind": "nullable", + "type": { + "$id": "1563", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1564", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" + }, + { + "$id": "1565", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "type": { + "$id": "1566", + "kind": "nullable", + "type": { + "$id": "1567", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1568", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" + }, + { + "$id": "1569", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run failed.", + "type": { + "$id": "1570", + "kind": "nullable", + "type": { + "$id": "1571", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1572", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" + }, + { + "$id": "1573", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "type": { + "$id": "1574", + "kind": "nullable", + "type": { + "$id": "1575", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1576", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" + }, + { + "$id": "1577", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", + "type": { + "$id": "1578", + "kind": "nullable", + "type": { + "$id": "1579", + "kind": "model", + "name": "RunObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1580", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", + "type": { + "$ref": "265" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" + }, + { + "$id": "1581", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.model" + }, + { + "$id": "1583", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" + }, + { + "$id": "1585", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1586", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tools" + }, + { + "$id": "1587", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1588", + "kind": "nullable", + "type": { + "$id": "1589", + "kind": "dict", + "keyType": { + "$id": "1590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" + }, + { + "$id": "1592", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "1593", + "kind": "nullable", + "type": { + "$id": "1594", + "kind": "model", + "name": "RunCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", + "decorators": [], + "properties": [ + { + "$id": "1595", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run.", + "type": { + "$id": "1596", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" + }, + { + "$id": "1597", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run.", + "type": { + "$id": "1598", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" + }, + { + "$id": "1599", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "1600", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.usage" + }, + { + "$id": "1601", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "type": { + "$id": "1602", + "kind": "nullable", + "type": { + "$id": "1603", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" + }, + { + "$id": "1604", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "type": { + "$id": "1605", + "kind": "nullable", + "type": { + "$id": "1606", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" + }, + { + "$id": "1607", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", + "type": { + "$id": "1608", + "kind": "nullable", + "type": { + "$id": "1609", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" + }, + { + "$id": "1610", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens specified to have been used over the course of the run.", + "type": { + "$id": "1611", + "kind": "nullable", + "type": { + "$id": "1612", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" + }, + { + "$id": "1613", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1614", + "kind": "nullable", + "type": { + "$ref": "1469" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" + }, + { + "$id": "1615", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1616", + "kind": "nullable", + "type": { + "$id": "1617", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1477" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" + }, + { + "$id": "1618", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1619", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" + }, + { + "$id": "1620", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1621", + "kind": "nullable", + "type": { + "$id": "1622", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1623", + "kind": "constant", + "valueType": { + "$id": "1624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1490" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" + } + ] + }, + { + "$ref": "1533" + }, + { + "$ref": "1537" + }, + { + "$ref": "1540" + }, + { + "$ref": "1546" + }, + { + "$ref": "1553" + }, + { + "$ref": "1579" + }, + { + "$ref": "1594" + }, + { + "$id": "1625", + "kind": "model", + "name": "CreateRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1626", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" + }, + { + "$id": "1628", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1629", + "kind": "nullable", + "type": { + "$ref": "271" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" + }, + { + "$id": "1630", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1631", + "kind": "nullable", + "type": { + "$id": "1632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" + }, + { + "$id": "1633", + "kind": "property", + "name": "additional_instructions", + "serializedName": "additional_instructions", + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "type": { + "$id": "1634", + "kind": "nullable", + "type": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" + }, + { + "$id": "1636", + "kind": "property", + "name": "additional_messages", + "serializedName": "additional_messages", + "description": "Adds additional messages to the thread before creating the run.", + "type": { + "$id": "1637", + "kind": "nullable", + "type": { + "$id": "1638", + "kind": "array", + "name": "CreateRunRequestAdditional_messages", + "valueType": { + "$ref": "1337" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" + }, + { + "$id": "1639", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1640", + "kind": "nullable", + "type": { + "$id": "1641", + "kind": "array", + "name": "CreateRunRequestTools", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" + }, + { + "$id": "1642", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1643", + "kind": "nullable", + "type": { + "$id": "1644", + "kind": "dict", + "keyType": { + "$id": "1645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" + }, + { + "$id": "1647", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1648", + "kind": "nullable", + "type": { + "$id": "1649", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" + }, + { + "$id": "1650", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1651", + "kind": "nullable", + "type": { + "$id": "1652", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" + }, + { + "$id": "1653", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1654", + "kind": "nullable", + "type": { + "$id": "1655", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" + }, + { + "$id": "1656", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1657", + "kind": "nullable", + "type": { + "$id": "1658", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" + }, + { + "$id": "1659", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1660", + "kind": "nullable", + "type": { + "$id": "1661", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" + }, + { + "$id": "1662", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1663", + "kind": "nullable", + "type": { + "$ref": "1469" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" + }, + { + "$id": "1664", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1665", + "kind": "nullable", + "type": { + "$id": "1666", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1477" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" + }, + { + "$id": "1667", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1668", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" + }, + { + "$id": "1669", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1670", + "kind": "nullable", + "type": { + "$id": "1671", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1672", + "kind": "constant", + "valueType": { + "$id": "1673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1490" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" + } + ] + }, + { + "$id": "1674", + "kind": "model", + "name": "ListRunsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1675", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1676", + "kind": "constant", + "valueType": { + "$ref": "325" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" + }, + { + "$id": "1677", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1678", + "kind": "array", + "name": "ArrayRunObject", + "valueType": { + "$ref": "1518" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" + }, + { + "$id": "1679", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" + }, + { + "$id": "1681", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" + }, + { + "$id": "1683", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1684", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" + } + ] + }, + { + "$id": "1685", + "kind": "model", + "name": "ModifyRunRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1686", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1687", + "kind": "nullable", + "type": { + "$id": "1688", + "kind": "dict", + "keyType": { + "$id": "1689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" + } + ] + }, + { + "$id": "1691", + "kind": "model", + "name": "SubmitToolOutputsRunRequest", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1692", + "kind": "property", + "name": "tool_outputs", + "serializedName": "tool_outputs", + "description": "A list of tools for which the outputs are being submitted.", + "type": { + "$id": "1693", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1694", + "kind": "model", + "name": "SubmitToolOutputsRunRequestToolOutput", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1695", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", + "type": { + "$id": "1696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" + }, + { + "$id": "1697", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the tool call to be submitted to continue the run.", + "type": { + "$id": "1698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" + }, + { + "$id": "1699", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1700", + "kind": "nullable", + "type": { + "$id": "1701", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" + } + ] + }, + { + "$ref": "1694" + }, + { + "$id": "1702", + "kind": "model", + "name": "ListRunStepsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1703", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1704", + "kind": "constant", + "valueType": { + "$ref": "334" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" + }, + { + "$id": "1705", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1706", + "kind": "array", + "name": "ArrayRunStepObject", + "valueType": { + "$id": "1707", + "kind": "model", + "name": "RunStepObject", + "crossLanguageDefinitionId": "OpenAI.RunStepObject", + "usage": "Output,Json", + "description": "Represents a step in execution of a run.", + "decorators": [], + "properties": [ + { + "$id": "1708", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "1709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" + }, + { + "$id": "1710", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step`.", + "type": { + "$id": "1711", + "kind": "constant", + "valueType": { + "$ref": "337" + }, + "value": "thread.run.step", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" + }, + { + "$id": "1712", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": { + "$id": "1713", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1714", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" + }, + { + "$id": "1715", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": { + "$id": "1716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" + }, + { + "$id": "1717", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": { + "$id": "1718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" + }, + { + "$id": "1719", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", + "type": { + "$id": "1720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" + }, + { + "$id": "1721", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", + "type": { + "$ref": "340" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" + }, + { + "$id": "1722", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": { + "$ref": "346" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" + }, + { + "$id": "1723", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$id": "1724", + "kind": "model", + "name": "RunStepObjectStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", + "usage": "Output,Json", + "description": "Abstractly represents a run step details object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1725", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" + }, + "properties": [ + { + "$ref": "1725" + } + ], + "discriminatedSubtypes": { + "$id": "1727", + "message_creation": { + "$id": "1728", + "kind": "model", + "name": "RunStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", + "usage": "Output,Json", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "1724" + }, + "properties": [ + { + "$id": "1729", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "1730", + "kind": "constant", + "valueType": { + "$id": "1731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" + }, + { + "$id": "1732", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "1733", + "kind": "model", + "name": "RunStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1734", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "1735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "1736", + "kind": "model", + "name": "RunStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", + "usage": "Output,Json", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "1724" + }, + "properties": [ + { + "$id": "1737", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "1738", + "kind": "constant", + "valueType": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" + }, + { + "$id": "1740", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "1741", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "1742", + "kind": "model", + "name": "RunStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1743", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "1743" + } + ], + "discriminatedSubtypes": { + "$id": "1745", + "code_interpreter": { + "$id": "1746", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", + "usage": "Output,Json", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "1742" + }, + "properties": [ + { + "$id": "1747", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "1748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "1749", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "1750", + "kind": "constant", + "valueType": { + "$id": "1751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "1752", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "1753", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1754", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "1755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "1756", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "1757", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "1758", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "1759", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "1759" + } + ], + "discriminatedSubtypes": { + "$id": "1761", + "logs": { + "$id": "1762", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", + "usage": "Output,Json", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "1758" + }, + "properties": [ + { + "$id": "1763", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "1764", + "kind": "constant", + "valueType": { + "$id": "1765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "1766", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "1767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "1768", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", + "usage": "Output,Json", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "1758" + }, + "properties": [ + { + "$id": "1769", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "1770", + "kind": "constant", + "valueType": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "1772", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "1773", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1774", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "1775", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "1776", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", + "usage": "Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1742" + }, + "properties": [ + { + "$id": "1777", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "1779", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "1780", + "kind": "constant", + "valueType": { + "$id": "1781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "1782", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "1783", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1784", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1785", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "usage": "Output,Json", + "description": "The ranking options for the file search.", + "decorators": [], + "properties": [ + { + "$id": "1786", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker used for the file search.", + "type": { + "$id": "1787", + "kind": "constant", + "valueType": { + "$ref": "358" + }, + "value": "default_2024_08_21", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" + }, + { + "$id": "1788", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1789", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" + }, + { + "$id": "1790", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "The results of the file search.", + "type": { + "$id": "1791", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", + "valueType": { + "$id": "1792", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", + "usage": "Output,Json", + "description": "A result instance of the file search.", + "decorators": [], + "properties": [ + { + "$id": "1793", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that result was found in.", + "type": { + "$id": "1794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" + }, + { + "$id": "1795", + "kind": "property", + "name": "file_name", + "serializedName": "file_name", + "description": "The name of the file that result was found in.", + "type": { + "$id": "1796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" + }, + { + "$id": "1797", + "kind": "property", + "name": "score", + "serializedName": "score", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1798", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" + }, + { + "$id": "1799", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", + "type": { + "$id": "1800", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1801", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1802", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content.", + "type": { + "$id": "1803", + "kind": "constant", + "valueType": { + "$ref": "361" + }, + "value": "text", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" + }, + { + "$id": "1804", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content of the file.", + "type": { + "$id": "1805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "1806", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", + "usage": "Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1742" + }, + "properties": [ + { + "$id": "1807", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "1809", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "1810", + "kind": "constant", + "valueType": { + "$id": "1811", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "1812", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "1813", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1814", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "1815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "1816", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "1817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "1818", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "1819", + "kind": "nullable", + "type": { + "$id": "1820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" + }, + { + "$id": "1821", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "type": { + "$id": "1822", + "kind": "nullable", + "type": { + "$id": "1823", + "kind": "model", + "name": "RunStepObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1824", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "364" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" + }, + { + "$id": "1825", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" + }, + { + "$id": "1827", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "type": { + "$id": "1828", + "kind": "nullable", + "type": { + "$id": "1829", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1830", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" + }, + { + "$id": "1831", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "type": { + "$id": "1832", + "kind": "nullable", + "type": { + "$id": "1833", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1834", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" + }, + { + "$id": "1835", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "type": { + "$id": "1836", + "kind": "nullable", + "type": { + "$id": "1837", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1838", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" + }, + { + "$id": "1839", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "type": { + "$id": "1840", + "kind": "nullable", + "type": { + "$id": "1841", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1842", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" + }, + { + "$id": "1843", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1844", + "kind": "nullable", + "type": { + "$id": "1845", + "kind": "dict", + "keyType": { + "$id": "1846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" + }, + { + "$id": "1848", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "1849", + "kind": "nullable", + "type": { + "$id": "1850", + "kind": "model", + "name": "RunStepCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", + "decorators": [], + "properties": [ + { + "$id": "1851", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run step.", + "type": { + "$id": "1852", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" + }, + { + "$id": "1853", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run step.", + "type": { + "$id": "1854", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" + }, + { + "$id": "1855", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "1856", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" + }, + { + "$id": "1857", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" + }, + { + "$id": "1859", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1860", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" + }, + { + "$id": "1861", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1862", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" + } + ] + }, + { + "$ref": "1707" + }, + { + "$ref": "1724" + }, + { + "$ref": "1728" + }, + { + "$ref": "1733" + }, + { + "$ref": "1736" + }, + { + "$ref": "1742" + }, + { + "$ref": "1746" + }, + { + "$ref": "1753" + }, + { + "$ref": "1758" + }, + { + "$ref": "1762" + }, + { + "$ref": "1768" + }, + { + "$ref": "1773" + }, + { + "$ref": "1776" + }, + { + "$ref": "1783" + }, + { + "$ref": "1785" + }, + { + "$ref": "1792" + }, + { + "$ref": "1801" + }, + { + "$ref": "1806" + }, + { + "$ref": "1813" + }, + { + "$ref": "1823" + }, + { + "$ref": "1850" + }, + { + "$id": "1863", + "kind": "model", + "name": "ThreadObject", + "crossLanguageDefinitionId": "OpenAI.ThreadObject", + "usage": "Output,Json", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "decorators": [], + "properties": [ + { + "$id": "1864", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" + }, + { + "$id": "1866", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread`.", + "type": { + "$id": "1867", + "kind": "constant", + "valueType": { + "$ref": "370" + }, + "value": "thread", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" + }, + { + "$id": "1868", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": { + "$id": "1869", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1870", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" + }, + { + "$id": "1871", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1872", + "kind": "nullable", + "type": { + "$id": "1873", + "kind": "model", + "name": "ThreadObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1874", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1875", + "kind": "model", + "name": "ThreadObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1876", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1877", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1879", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1880", + "kind": "model", + "name": "ThreadObjectToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1881", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", + "type": { + "$id": "1882", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" + }, + { + "$id": "1884", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1885", + "kind": "nullable", + "type": { + "$id": "1886", + "kind": "dict", + "keyType": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" + } + ] + }, + { + "$ref": "1873" + }, + { + "$ref": "1875" + }, + { + "$ref": "1880" + }, + { + "$id": "1889", + "kind": "model", + "name": "ModifyThreadRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1890", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1891", + "kind": "nullable", + "type": { + "$id": "1892", + "kind": "model", + "name": "ModifyThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1893", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1894", + "kind": "model", + "name": "ModifyThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1895", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1896", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1898", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1443" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" + }, + { + "$id": "1899", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1900", + "kind": "nullable", + "type": { + "$id": "1901", + "kind": "dict", + "keyType": { + "$id": "1902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" + } + ] + }, + { + "$ref": "1892" + }, + { + "$ref": "1894" + }, + { + "$id": "1904", + "kind": "model", + "name": "DeleteThreadResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1905", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" + }, + { + "$id": "1907", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1908", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" + }, + { + "$id": "1909", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1910", + "kind": "constant", + "valueType": { + "$ref": "373" + }, + "value": "thread.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" + } + ] + }, + { + "$id": "1911", + "kind": "model", + "name": "CreateModerationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1912", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input text to classify", + "type": { + "$id": "1913", + "kind": "union", + "name": "CreateModerationRequestInput", + "variantTypes": [ + { + "$id": "1914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "1915", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" + }, + { + "$id": "1917", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", + "type": { + "$ref": "376" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" + } + ] + }, + { + "$id": "1918", + "kind": "model", + "name": "CreateModerationResponse", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", + "usage": "Output,Json", + "description": "Represents if a given text input is potentially harmful.", + "decorators": [], + "properties": [ + { + "$id": "1919", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The unique identifier for the moderation request.", + "type": { + "$id": "1920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" + }, + { + "$id": "1921", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used to generate the moderation results.", + "type": { + "$id": "1922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" + }, + { + "$id": "1923", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "A list of moderation objects.", + "type": { + "$id": "1924", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1925", + "kind": "model", + "name": "CreateModerationResponseResult", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1926", + "kind": "property", + "name": "flagged", + "serializedName": "flagged", + "description": "Whether any of the below categories are flagged.", + "type": { + "$id": "1927", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" + }, + { + "$id": "1928", + "kind": "property", + "name": "categories", + "serializedName": "categories", + "description": "A list of the categories, and whether they are flagged or not.", + "type": { + "$id": "1929", + "kind": "model", + "name": "CreateModerationResponseResultCategories", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1930", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", + "type": { + "$id": "1931", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" + }, + { + "$id": "1932", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", + "type": { + "$id": "1933", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" + }, + { + "$id": "1934", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "Content that expresses, incites, or promotes harassing language towards any target.", + "type": { + "$id": "1935", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" + }, + { + "$id": "1936", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "Harassment content that also includes violence or serious harm towards any target.", + "type": { + "$id": "1937", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" + }, + { + "$id": "1938", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "1939", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" + }, + { + "$id": "1940", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "1941", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" + }, + { + "$id": "1942", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", + "type": { + "$id": "1943", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" + }, + { + "$id": "1944", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", + "type": { + "$id": "1945", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" + }, + { + "$id": "1946", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "Sexual content that includes an individual who is under 18 years old.", + "type": { + "$id": "1947", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" + }, + { + "$id": "1948", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "Content that depicts death, violence, or physical injury.", + "type": { + "$id": "1949", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" + }, + { + "$id": "1950", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "Content that depicts death, violence, or physical injury in graphic detail.", + "type": { + "$id": "1951", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" + }, + { + "$id": "1952", + "kind": "property", + "name": "category_scores", + "serializedName": "category_scores", + "description": "A list of the categories along with their scores as predicted by model.", + "type": { + "$id": "1953", + "kind": "model", + "name": "CreateModerationResponseResultCategoryScores", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1954", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "The score for the category 'hate'.", + "type": { + "$id": "1955", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" + }, + { + "$id": "1956", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "The score for the category 'hate/threatening'.", + "type": { + "$id": "1957", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" + }, + { + "$id": "1958", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "The score for the category 'harassment'.", + "type": { + "$id": "1959", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" + }, + { + "$id": "1960", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "The score for the category 'harassment/threatening'.", + "type": { + "$id": "1961", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" + }, + { + "$id": "1962", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "The score for the category 'self-harm'.", + "type": { + "$id": "1963", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" + }, + { + "$id": "1964", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "The score for the category 'self-harm/intent'.", + "type": { + "$id": "1965", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" + }, + { + "$id": "1966", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "The score for the category 'self-harm/instructions'.", + "type": { + "$id": "1967", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" + }, + { + "$id": "1968", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "The score for the category 'sexual'.", + "type": { + "$id": "1969", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" + }, + { + "$id": "1970", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "The score for the category 'sexual/minors'.", + "type": { + "$id": "1971", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" + }, + { + "$id": "1972", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "The score for the category 'violence'.", + "type": { + "$id": "1973", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" + }, + { + "$id": "1974", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "The score for the category 'violence/graphic'.", + "type": { + "$id": "1975", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" + } + ] + }, + { + "$ref": "1925" + }, + { + "$ref": "1929" + }, + { + "$ref": "1953" + }, + { + "$id": "1976", + "kind": "model", + "name": "ListModelsResponse", + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1977", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1978", + "kind": "constant", + "valueType": { + "$ref": "382" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" + }, + { + "$id": "1979", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1980", + "kind": "array", + "name": "ArrayModel", + "valueType": { + "$id": "1981", + "kind": "model", + "name": "Model", + "crossLanguageDefinitionId": "OpenAI.Model", + "usage": "Output,Json", + "description": "Describes an OpenAI model offering that can be used with the API.", + "decorators": [], + "properties": [ + { + "$id": "1982", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The model identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "1983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.id" + }, + { + "$id": "1984", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) when the model was created.", + "type": { + "$id": "1985", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1986", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.created" + }, + { + "$id": "1987", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"model\".", + "type": { + "$id": "1988", + "kind": "constant", + "valueType": { + "$ref": "385" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.object" + }, + { + "$id": "1989", + "kind": "property", + "name": "owned_by", + "serializedName": "owned_by", + "description": "The organization that owns the model.", + "type": { + "$id": "1990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.owned_by" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" + } + ] + }, + { + "$ref": "1981" + }, + { + "$id": "1991", + "kind": "model", + "name": "DeleteModelResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1992", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" + }, + { + "$id": "1994", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1995", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" + }, + { + "$id": "1996", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1997", + "kind": "constant", + "valueType": { + "$ref": "388" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" + } + ] + }, + { + "$id": "1998", + "kind": "model", + "name": "MessageObject", + "crossLanguageDefinitionId": "OpenAI.MessageObject", + "usage": "Output,Json", + "description": "Represents a message within a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "1999", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.id" + }, + { + "$id": "2001", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message`.", + "type": { + "$id": "2002", + "kind": "constant", + "valueType": { + "$ref": "391" + }, + "value": "thread.message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.object" + }, + { + "$id": "2003", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the message was created.", + "type": { + "$id": "2004", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2005", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" + }, + { + "$id": "2006", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", + "type": { + "$id": "2007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" + }, + { + "$id": "2008", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", + "type": { + "$ref": "394" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.status" + }, + { + "$id": "2009", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "On an incomplete message, details about why the message is incomplete.", + "type": { + "$id": "2010", + "kind": "nullable", + "type": { + "$id": "2011", + "kind": "model", + "name": "MessageObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2012", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason the message is incomplete.", + "type": { + "$ref": "402" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" + }, + { + "$id": "2013", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the message was completed.", + "type": { + "$id": "2014", + "kind": "nullable", + "type": { + "$id": "2015", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2016", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" + }, + { + "$id": "2017", + "kind": "property", + "name": "incomplete_at", + "serializedName": "incomplete_at", + "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", + "type": { + "$id": "2018", + "kind": "nullable", + "type": { + "$id": "2019", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2020", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" + }, + { + "$id": "2021", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.role" + }, + { + "$id": "2022", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "2023", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$ref": "1341" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.content" + }, + { + "$id": "2024", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", + "type": { + "$id": "2025", + "kind": "nullable", + "type": { + "$id": "2026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" + }, + { + "$id": "2027", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", + "type": { + "$id": "2028", + "kind": "nullable", + "type": { + "$id": "2029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" + }, + { + "$id": "2030", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they were added to.", + "type": { + "$id": "2031", + "kind": "nullable", + "type": { + "$id": "2032", + "kind": "array", + "name": "MessageObjectAttachments", + "valueType": { + "$id": "2033", + "kind": "model", + "name": "MessageObjectAttachment", + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2034", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "2035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" + }, + { + "$id": "2036", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "2037", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2038", + "kind": "union", + "name": "MessageObjectAttachmentTool", + "variantTypes": [ + { + "$ref": "1351" + }, + { + "$ref": "1388" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" + }, + { + "$id": "2039", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2040", + "kind": "nullable", + "type": { + "$id": "2041", + "kind": "dict", + "keyType": { + "$id": "2042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" + } + ] + }, + { + "$ref": "2011" + }, + { + "$ref": "2033" + }, + { + "$id": "2044", + "kind": "model", + "name": "ListMessagesResponse", + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2045", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2046", + "kind": "constant", + "valueType": { + "$ref": "426" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" + }, + { + "$id": "2047", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2048", + "kind": "array", + "name": "ArrayMessageObject", + "valueType": { + "$ref": "1998" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" + }, + { + "$id": "2049", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" + }, + { + "$id": "2051", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" + }, + { + "$id": "2053", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2054", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" + } + ] + }, + { + "$id": "2055", + "kind": "model", + "name": "ModifyMessageRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2056", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2057", + "kind": "nullable", + "type": { + "$id": "2058", + "kind": "dict", + "keyType": { + "$id": "2059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" + } + ] + }, + { + "$id": "2061", + "kind": "model", + "name": "DeleteMessageResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2062", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2063", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" + }, + { + "$id": "2064", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2065", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" + }, + { + "$id": "2066", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2067", + "kind": "constant", + "valueType": { + "$ref": "429" + }, + "value": "thread.message.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" + } + ] + }, + { + "$id": "2068", + "kind": "model", + "name": "CreateImageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2069", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", + "type": { + "$id": "2070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" + }, + { + "$id": "2071", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation.", + "type": { + "$id": "2072", + "kind": "nullable", + "type": { + "$ref": "432" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" + }, + { + "$id": "2073", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2074", + "kind": "nullable", + "type": { + "$id": "2075", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" + }, + { + "$id": "2076", + "kind": "property", + "name": "quality", + "serializedName": "quality", + "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", + "type": { + "$ref": "438" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" + }, + { + "$id": "2077", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2078", + "kind": "nullable", + "type": { + "$ref": "444" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" + }, + { + "$id": "2079", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", + "type": { + "$id": "2080", + "kind": "nullable", + "type": { + "$ref": "450" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" + }, + { + "$id": "2081", + "kind": "property", + "name": "style", + "serializedName": "style", + "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", + "type": { + "$id": "2082", + "kind": "nullable", + "type": { + "$ref": "462" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" + }, + { + "$id": "2083", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" + } + ] + }, + { + "$id": "2085", + "kind": "model", + "name": "ImagesResponse", + "crossLanguageDefinitionId": "OpenAI.ImagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2086", + "kind": "property", + "name": "created", + "serializedName": "created", + "type": { + "$id": "2087", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2088", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" + }, + { + "$id": "2089", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2090", + "kind": "array", + "name": "ArrayImage", + "valueType": { + "$id": "2091", + "kind": "model", + "name": "Image", + "crossLanguageDefinitionId": "OpenAI.Image", + "usage": "Output,Json", + "description": "Represents the url or the content of an image generated by the OpenAI API.", + "decorators": [], + "properties": [ + { + "$id": "2092", + "kind": "property", + "name": "b64_json", + "serializedName": "b64_json", + "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", + "type": { + "$id": "2093", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.b64_json" + }, + { + "$id": "2094", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the generated image, if `response_format` is `url` (default).", + "type": { + "$id": "2095", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.url" + }, + { + "$id": "2096", + "kind": "property", + "name": "revised_prompt", + "serializedName": "revised_prompt", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", + "type": { + "$id": "2097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" + } + ] + }, + { + "$ref": "2091" + }, + { + "$id": "2098", + "kind": "model", + "name": "CreateImageEditRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2099", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", + "type": { + "$id": "2100", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" + }, + { + "$id": "2101", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters.", + "type": { + "$id": "2102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" + }, + { + "$id": "2103", + "kind": "property", + "name": "mask", + "serializedName": "mask", + "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", + "type": { + "$id": "2104", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" + }, + { + "$id": "2105", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2106", + "kind": "nullable", + "type": { + "$ref": "468" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" + }, + { + "$id": "2107", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10.", + "type": { + "$id": "2108", + "kind": "nullable", + "type": { + "$id": "2109", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" + }, + { + "$id": "2110", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2111", + "kind": "nullable", + "type": { + "$ref": "472" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" + }, + { + "$id": "2112", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2113", + "kind": "nullable", + "type": { + "$ref": "480" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" + }, + { + "$id": "2114", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" + } + ] + }, + { + "$id": "2116", + "kind": "model", + "name": "CreateImageVariationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2117", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", + "type": { + "$id": "2118", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" + }, + { + "$id": "2119", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2120", + "kind": "nullable", + "type": { + "$ref": "486" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" + }, + { + "$id": "2121", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2122", + "kind": "nullable", + "type": { + "$id": "2123", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" + }, + { + "$id": "2124", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2125", + "kind": "nullable", + "type": { + "$ref": "490" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" + }, + { + "$id": "2126", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2127", + "kind": "nullable", + "type": { + "$ref": "496" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" + }, + { + "$id": "2128", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" + } + ] + }, + { + "$id": "2130", + "kind": "model", + "name": "CreateFineTuningJobRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2131", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", + "type": { + "$ref": "504" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" + }, + { + "$id": "2132", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" + }, + { + "$id": "2134", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job.", + "type": { + "$id": "2135", + "kind": "model", + "name": "CreateFineTuningJobRequestHyperparameters", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2136", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "2137", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "514" + }, + { + "$id": "2138", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" + }, + { + "$id": "2139", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "2140", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "518" + }, + { + "$id": "2141", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" + }, + { + "$id": "2142", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "2143", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "522" + }, + { + "$id": "2144", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" + }, + { + "$id": "2145", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", + "type": { + "$id": "2146", + "kind": "nullable", + "type": { + "$id": "2147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" + }, + { + "$id": "2148", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2149", + "kind": "nullable", + "type": { + "$id": "2150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" + }, + { + "$id": "2151", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for your fine-tuning job.", + "type": { + "$id": "2152", + "kind": "nullable", + "type": { + "$id": "2153", + "kind": "array", + "name": "CreateFineTuningJobRequestIntegrations", + "valueType": { + "$id": "2154", + "kind": "model", + "name": "CreateFineTuningJobRequestIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2155", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" + }, + "properties": [ + { + "$ref": "2155" + } + ], + "discriminatedSubtypes": { + "$id": "2157", + "wandb": { + "$id": "2158", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", + "usage": "Input,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "2154" + }, + "properties": [ + { + "$id": "2159", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2160", + "kind": "constant", + "valueType": { + "$id": "2161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" + }, + { + "$id": "2162", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "type": { + "$id": "2163", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2164", + "kind": "property", + "name": "project", + "serializedName": "project", + "type": { + "$id": "2165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" + }, + { + "$id": "2166", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2167", + "kind": "nullable", + "type": { + "$id": "2168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" + }, + { + "$id": "2169", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "type": { + "$id": "2170", + "kind": "nullable", + "type": { + "$id": "2171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" + }, + { + "$id": "2172", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "type": { + "$id": "2173", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" + }, + { + "$id": "2175", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", + "type": { + "$id": "2176", + "kind": "nullable", + "type": { + "$id": "2177", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" + } + ] + }, + { + "$ref": "2135" + }, + { + "$ref": "2154" + }, + { + "$ref": "2158" + }, + { + "$ref": "2163" + }, + { + "$id": "2178", + "kind": "model", + "name": "FineTuningJob", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob", + "usage": "Output,Json", + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", + "decorators": [], + "properties": [ + { + "$id": "2179", + "kind": "property", + "name": "user_provided_suffix", + "serializedName": "user_provided_suffix", + "description": "The descriptive suffix applied to the job, as specified in the job creation request.", + "type": { + "$id": "2180", + "kind": "nullable", + "type": { + "$id": "2181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" + }, + { + "$id": "2182", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The object identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" + }, + { + "$id": "2184", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", + "type": { + "$id": "2185", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2186", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" + }, + { + "$id": "2187", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", + "type": { + "$id": "2188", + "kind": "nullable", + "type": { + "$id": "2189", + "kind": "model", + "name": "FineTuningJobError", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2190", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "2191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" + }, + { + "$id": "2192", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "2193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" + }, + { + "$id": "2194", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", + "type": { + "$id": "2195", + "kind": "nullable", + "type": { + "$id": "2196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" + }, + { + "$id": "2197", + "kind": "property", + "name": "fine_tuned_model", + "serializedName": "fine_tuned_model", + "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "2198", + "kind": "nullable", + "type": { + "$id": "2199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" + }, + { + "$id": "2200", + "kind": "property", + "name": "finished_at", + "serializedName": "finished_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "2201", + "kind": "nullable", + "type": { + "$id": "2202", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2203", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" + }, + { + "$id": "2204", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2205", + "kind": "model", + "name": "FineTuningJobHyperparameters", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2206", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "2207", + "kind": "union", + "name": "FineTuningJobHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "526" + }, + { + "$id": "2208", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" + }, + { + "$id": "2209", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "2210", + "kind": "union", + "name": "FineTuningJobHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "530" + }, + { + "$id": "2211", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" + }, + { + "$id": "2212", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "2213", + "kind": "union", + "name": "FineTuningJobHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "534" + }, + { + "$id": "2214", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" + }, + { + "$id": "2215", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The base model that is being fine-tuned.", + "type": { + "$id": "2216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" + }, + { + "$id": "2217", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job\".", + "type": { + "$id": "2218", + "kind": "constant", + "valueType": { + "$ref": "538" + }, + "value": "fine_tuning.job", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" + }, + { + "$id": "2219", + "kind": "property", + "name": "organization_id", + "serializedName": "organization_id", + "description": "The organization that owns the fine-tuning job.", + "type": { + "$id": "2220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" + }, + { + "$id": "2221", + "kind": "property", + "name": "result_files", + "serializedName": "result_files", + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "2222", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" + }, + { + "$id": "2224", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" + }, + { + "$id": "2225", + "kind": "property", + "name": "trained_tokens", + "serializedName": "trained_tokens", + "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "2226", + "kind": "nullable", + "type": { + "$id": "2227", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" + }, + { + "$id": "2228", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "2229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" + }, + { + "$id": "2230", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "2231", + "kind": "nullable", + "type": { + "$id": "2232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" + }, + { + "$id": "2233", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for this fine-tuning job.", + "type": { + "$id": "2234", + "kind": "nullable", + "type": { + "$id": "2235", + "kind": "array", + "name": "FineTuningJobIntegrations", + "valueType": { + "$id": "2236", + "kind": "model", + "name": "FineTuningIntegration", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2237", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" + }, + "properties": [ + { + "$ref": "2237" + } + ], + "discriminatedSubtypes": { + "$id": "2239", + "wandb": { + "$id": "2240", + "kind": "model", + "name": "FineTuningIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", + "usage": "Output,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "2236" + }, + "properties": [ + { + "$id": "2241", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the integration being enabled for the fine-tuning job", + "type": { + "$id": "2242", + "kind": "constant", + "valueType": { + "$id": "2243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" + }, + { + "$id": "2244", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", + "type": { + "$id": "2245", + "kind": "model", + "name": "FineTuningIntegrationWandbWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2246", + "kind": "property", + "name": "project", + "serializedName": "project", + "description": "The name of the project that the new run will be created under.", + "type": { + "$id": "2247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" + }, + { + "$id": "2248", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", + "type": { + "$id": "2249", + "kind": "nullable", + "type": { + "$id": "2250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" + }, + { + "$id": "2251", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", + "type": { + "$id": "2252", + "kind": "nullable", + "type": { + "$id": "2253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" + }, + { + "$id": "2254", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", + "type": { + "$id": "2255", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" + }, + { + "$id": "2257", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed used for the fine-tuning job.", + "type": { + "$id": "2258", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" + }, + { + "$id": "2259", + "kind": "property", + "name": "estimated_finish", + "serializedName": "estimated_finish", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", + "type": { + "$id": "2260", + "kind": "nullable", + "type": { + "$id": "2261", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2262", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" + } + ] + }, + { + "$ref": "2189" + }, + { + "$ref": "2205" + }, + { + "$ref": "2236" + }, + { + "$ref": "2240" + }, + { + "$ref": "2245" + }, + { + "$id": "2263", + "kind": "model", + "name": "ListPaginatedFineTuningJobsResponse", + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2264", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2265", + "kind": "array", + "name": "ArrayFineTuningJob", + "valueType": { + "$ref": "2178" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" + }, + { + "$id": "2266", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2267", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" + }, + { + "$id": "2268", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2269", + "kind": "constant", + "valueType": { + "$ref": "555" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" + } + ] + }, + { + "$id": "2270", + "kind": "model", + "name": "ListFineTuningJobCheckpointsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2271", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2272", + "kind": "array", + "name": "ArrayFineTuningJobCheckpoint", + "valueType": { + "$id": "2273", + "kind": "model", + "name": "FineTuningJobCheckpoint", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", + "usage": "Output,Json", + "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", + "decorators": [], + "properties": [ + { + "$id": "2274", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The checkpoint identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" + }, + { + "$id": "2276", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", + "type": { + "$id": "2277", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2278", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" + }, + { + "$id": "2279", + "kind": "property", + "name": "fine_tuned_model_checkpoint", + "serializedName": "fine_tuned_model_checkpoint", + "description": "The name of the fine-tuned checkpoint model that is created.", + "type": { + "$id": "2280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" + }, + { + "$id": "2281", + "kind": "property", + "name": "step_number", + "serializedName": "step_number", + "description": "The step number that the checkpoint was created at.", + "type": { + "$id": "2282", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" + }, + { + "$id": "2283", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "description": "Metrics at the step number during the fine-tuning job.", + "type": { + "$id": "2284", + "kind": "model", + "name": "FineTuningJobCheckpointMetrics", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2285", + "kind": "property", + "name": "step", + "serializedName": "step", + "type": { + "$id": "2286", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" + }, + { + "$id": "2287", + "kind": "property", + "name": "train_loss", + "serializedName": "train_loss", + "type": { + "$id": "2288", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" + }, + { + "$id": "2289", + "kind": "property", + "name": "train_mean_token_accuracy", + "serializedName": "train_mean_token_accuracy", + "type": { + "$id": "2290", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" + }, + { + "$id": "2291", + "kind": "property", + "name": "valid_loss", + "serializedName": "valid_loss", + "type": { + "$id": "2292", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" + }, + { + "$id": "2293", + "kind": "property", + "name": "valid_mean_token_accuracy", + "serializedName": "valid_mean_token_accuracy", + "type": { + "$id": "2294", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" + }, + { + "$id": "2295", + "kind": "property", + "name": "full_valid_loss", + "serializedName": "full_valid_loss", + "type": { + "$id": "2296", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" + }, + { + "$id": "2297", + "kind": "property", + "name": "full_valid_mean_token_accuracy", + "serializedName": "full_valid_mean_token_accuracy", + "type": { + "$id": "2298", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" + }, + { + "$id": "2299", + "kind": "property", + "name": "fine_tuning_job_id", + "serializedName": "fine_tuning_job_id", + "description": "The name of the fine-tuning job that this checkpoint was created from.", + "type": { + "$id": "2300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" + }, + { + "$id": "2301", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", + "type": { + "$id": "2302", + "kind": "constant", + "valueType": { + "$ref": "558" + }, + "value": "fine_tuning.job.checkpoint", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" + }, + { + "$id": "2303", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2304", + "kind": "constant", + "valueType": { + "$ref": "561" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" + }, + { + "$id": "2305", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2306", + "kind": "nullable", + "type": { + "$id": "2307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" + }, + { + "$id": "2308", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2309", + "kind": "nullable", + "type": { + "$id": "2310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" + }, + { + "$id": "2311", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2312", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" + } + ] + }, + { + "$ref": "2273" + }, + { + "$ref": "2284" + }, + { + "$id": "2313", + "kind": "model", + "name": "ListFineTuningJobEventsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2314", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2315", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" + }, + { + "$id": "2316", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2317", + "kind": "array", + "name": "ArrayFineTuningJobEvent", + "valueType": { + "$id": "2318", + "kind": "model", + "name": "FineTuningJobEvent", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", + "usage": "Output,Json", + "description": "Fine-tuning job event object", + "decorators": [], + "properties": [ + { + "$id": "2319", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" + }, + { + "$id": "2321", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "type": { + "$id": "2322", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2323", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" + }, + { + "$id": "2324", + "kind": "property", + "name": "level", + "serializedName": "level", + "type": { + "$ref": "564" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" + }, + { + "$id": "2325", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" + }, + { + "$id": "2327", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2328", + "kind": "constant", + "valueType": { + "$ref": "572" + }, + "value": "fine_tuning.job.event", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" + }, + { + "$id": "2329", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2330", + "kind": "constant", + "valueType": { + "$ref": "575" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" + } + ] + }, + { + "$ref": "2318" + }, + { + "$id": "2331", + "kind": "model", + "name": "CreateFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2332", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The File object (not file name) to be uploaded.", + "type": { + "$id": "2333", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" + }, + { + "$id": "2334", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", + "type": { + "$ref": "578" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" + } + ] + }, + { + "$id": "2335", + "kind": "model", + "name": "ListFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2336", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2337", + "kind": "array", + "name": "ArrayOpenAiFile", + "valueType": { + "$ref": "1086" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" + }, + { + "$id": "2338", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2339", + "kind": "constant", + "valueType": { + "$ref": "588" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" + } + ] + }, + { + "$id": "2340", + "kind": "model", + "name": "DeleteFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2341", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" + }, + { + "$id": "2343", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2344", + "kind": "constant", + "valueType": { + "$ref": "591" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" + }, + { + "$id": "2345", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2346", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" + } + ] + }, + { + "$id": "2347", + "kind": "model", + "name": "CreateEmbeddingRequest", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2348", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "2349", + "kind": "union", + "name": "CreateEmbeddingRequestInput", + "variantTypes": [ + { + "$id": "2350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2351", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "2353", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2354", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "2355", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "2356", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2357", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" + }, + { + "$id": "2358", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "594" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" + }, + { + "$id": "2359", + "kind": "property", + "name": "encoding_format", + "serializedName": "encoding_format", + "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", + "type": { + "$ref": "602" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" + }, + { + "$id": "2360", + "kind": "property", + "name": "dimensions", + "serializedName": "dimensions", + "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", + "type": { + "$id": "2361", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" + }, + { + "$id": "2362", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" + } + ] + }, + { + "$id": "2364", + "kind": "model", + "name": "CreateEmbeddingResponse", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2365", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The list of embeddings generated by the model.", + "type": { + "$id": "2366", + "kind": "array", + "name": "ArrayEmbedding", + "valueType": { + "$id": "2367", + "kind": "model", + "name": "Embedding", + "crossLanguageDefinitionId": "OpenAI.Embedding", + "usage": "Output,Json", + "description": "Represents an embedding vector returned by embedding endpoint.", + "decorators": [], + "properties": [ + { + "$id": "2368", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the embedding in the list of embeddings.", + "type": { + "$id": "2369", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.index" + }, + { + "$id": "2370", + "kind": "property", + "name": "embedding", + "serializedName": "embedding", + "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", + "type": { + "$id": "2371", + "kind": "union", + "name": "EmbeddingEmbedding", + "variantTypes": [ + { + "$id": "2372", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2373", + "kind": "float", + "name": "float", + "crossLanguageDefinitionId": "TypeSpec.float", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "2374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" + }, + { + "$id": "2375", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"embedding\".", + "type": { + "$id": "2376", + "kind": "constant", + "valueType": { + "$ref": "608" + }, + "value": "embedding", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" + }, + { + "$id": "2377", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model used to generate the embedding.", + "type": { + "$id": "2378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" + }, + { + "$id": "2379", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"list\".", + "type": { + "$id": "2380", + "kind": "constant", + "valueType": { + "$ref": "611" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" + }, + { + "$id": "2381", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "The usage information for the request.", + "type": { + "$id": "2382", + "kind": "model", + "name": "CreateEmbeddingResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2383", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "The number of tokens used by the prompt.", + "type": { + "$id": "2384", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "2385", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "The total number of tokens used by the request.", + "type": { + "$id": "2386", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" + } + ] + }, + { + "$ref": "2367" + }, + { + "$ref": "2382" + }, + { + "$id": "2387", + "kind": "model", + "name": "CreateCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2388", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "614" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" + }, + { + "$id": "2389", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", + "type": { + "$id": "2390", + "kind": "nullable", + "type": { + "$id": "2391", + "kind": "union", + "name": "CreateCompletionRequestPrompt", + "variantTypes": [ + { + "$id": "2392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2393", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "2395", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2396", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "2397", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "2398", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2399", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" + }, + { + "$id": "2400", + "kind": "property", + "name": "best_of", + "serializedName": "best_of", + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "2401", + "kind": "nullable", + "type": { + "$id": "2402", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" + }, + { + "$id": "2403", + "kind": "property", + "name": "echo", + "serializedName": "echo", + "description": "Echo back the prompt in addition to the completion", + "type": { + "$id": "2404", + "kind": "nullable", + "type": { + "$id": "2405", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" + }, + { + "$id": "2406", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "2407", + "kind": "nullable", + "type": { + "$id": "2408", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" + }, + { + "$id": "2409", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", + "type": { + "$id": "2410", + "kind": "nullable", + "type": { + "$id": "2411", + "kind": "dict", + "keyType": { + "$id": "2412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2413", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" + }, + { + "$id": "2414", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", + "type": { + "$id": "2415", + "kind": "nullable", + "type": { + "$id": "2416", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" + }, + { + "$id": "2417", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "2418", + "kind": "nullable", + "type": { + "$id": "2419", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" + }, + { + "$id": "2420", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "2421", + "kind": "nullable", + "type": { + "$id": "2422", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" + }, + { + "$id": "2423", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "2424", + "kind": "nullable", + "type": { + "$id": "2425", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" + }, + { + "$id": "2426", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "2427", + "kind": "nullable", + "type": { + "$id": "2428", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" + }, + { + "$id": "2429", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", + "type": { + "$id": "2430", + "kind": "nullable", + "type": { + "$id": "2431", + "kind": "union", + "name": "CreateCompletionRequestStop", + "variantTypes": [ + { + "$id": "2432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2433", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" + }, + { + "$id": "2435", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "2436", + "kind": "nullable", + "type": { + "$id": "2437", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" + }, + { + "$id": "2438", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "2439", + "kind": "nullable", + "type": { + "$id": "2440", + "kind": "model", + "name": "ChatCompletionStreamOptions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", + "usage": "Input,Json", + "description": "Options for streaming response. Only set this when you set `stream: true`.", + "decorators": [], + "properties": [ + { + "$id": "2441", + "kind": "property", + "name": "include_usage", + "serializedName": "include_usage", + "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", + "type": { + "$id": "2442", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" + }, + { + "$id": "2443", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", + "type": { + "$id": "2444", + "kind": "nullable", + "type": { + "$id": "2445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" + }, + { + "$id": "2446", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "2447", + "kind": "nullable", + "type": { + "$id": "2448", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" + }, + { + "$id": "2449", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "2450", + "kind": "nullable", + "type": { + "$id": "2451", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" + }, + { + "$id": "2452", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" + } + ] + }, + { + "$ref": "2440" + }, + { + "$id": "2454", + "kind": "model", + "name": "CreateCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", + "usage": "Output,Json", + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", + "decorators": [], + "properties": [ + { + "$id": "2455", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the completion.", + "type": { + "$id": "2456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" + }, + { + "$id": "2457", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "The list of completion choices the model generated for the input prompt.", + "type": { + "$id": "2458", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2459", + "kind": "model", + "name": "CreateCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2460", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", + "type": { + "$ref": "622" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "2461", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "2462", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" + }, + { + "$id": "2463", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "type": { + "$id": "2464", + "kind": "nullable", + "type": { + "$id": "2465", + "kind": "model", + "name": "CreateCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2466", + "kind": "property", + "name": "text_offset", + "serializedName": "text_offset", + "type": { + "$id": "2467", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2468", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" + }, + { + "$id": "2469", + "kind": "property", + "name": "token_logprobs", + "serializedName": "token_logprobs", + "type": { + "$id": "2470", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2471", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" + }, + { + "$id": "2472", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "type": { + "$id": "2473", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" + }, + { + "$id": "2475", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "type": { + "$id": "2476", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "2477", + "kind": "dict", + "keyType": { + "$id": "2478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2479", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" + }, + { + "$id": "2480", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" + }, + { + "$id": "2482", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the completion was created.", + "type": { + "$id": "2483", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2484", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" + }, + { + "$id": "2485", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for completion.", + "type": { + "$id": "2486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" + }, + { + "$id": "2487", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "2488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" + }, + { + "$id": "2489", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"text_completion\"", + "type": { + "$id": "2490", + "kind": "constant", + "valueType": { + "$ref": "630" + }, + "value": "text_completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" + }, + { + "$id": "2491", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2492", + "kind": "model", + "name": "CompletionUsage", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics for the completion request.", + "decorators": [], + "properties": [ + { + "$id": "2493", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "2494", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" + }, + { + "$id": "2495", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "2496", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" + }, + { + "$id": "2497", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "2498", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" + }, + { + "$id": "2499", + "kind": "property", + "name": "completion_tokens_details", + "serializedName": "completion_tokens_details", + "description": "Breakdown of tokens used in a completion.", + "type": { + "$id": "2500", + "kind": "model", + "name": "CompletionUsageCompletionTokensDetails", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2501", + "kind": "property", + "name": "reasoning_tokens", + "serializedName": "reasoning_tokens", + "description": "Tokens generated by the model for reasoning.", + "type": { + "$id": "2502", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" + } + ] + }, + { + "$ref": "2459" + }, + { + "$ref": "2465" + }, + { + "$ref": "2492" + }, + { + "$ref": "2500" + }, + { + "$id": "2503", + "kind": "model", + "name": "CreateChatCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2504", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", + "type": { + "$id": "2505", + "kind": "array", + "name": "ArrayChatCompletionRequestMessage", + "valueType": { + "$id": "2506", + "kind": "model", + "name": "ChatCompletionRequestMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2507", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "2508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" + }, + "properties": [ + { + "$ref": "2507" + } + ], + "discriminatedSubtypes": { + "$id": "2509", + "system": { + "$id": "2510", + "kind": "model", + "name": "ChatCompletionRequestSystemMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "2506" + }, + "properties": [ + { + "$id": "2511", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the system message.", + "type": { + "$id": "2512", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContent", + "variantTypes": [ + { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2514", + "kind": "array", + "name": "ArrayChatCompletionRequestSystemMessageContentPart", + "valueType": { + "$id": "2515", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContentPart", + "variantTypes": [ + { + "$id": "2516", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartText", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2517", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "2518", + "kind": "constant", + "valueType": { + "$ref": "633" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" + }, + { + "$id": "2519", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content.", + "type": { + "$id": "2520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" + }, + { + "$id": "2521", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `system`.", + "type": { + "$id": "2522", + "kind": "constant", + "valueType": { + "$id": "2523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" + }, + { + "$id": "2524", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "2525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" + } + ] + }, + "user": { + "$id": "2526", + "kind": "model", + "name": "ChatCompletionRequestUserMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "2506" + }, + "properties": [ + { + "$id": "2527", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the user message.", + "type": { + "$id": "2528", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContent", + "variantTypes": [ + { + "$id": "2529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2530", + "kind": "array", + "name": "ArrayChatCompletionRequestUserMessageContentPart", + "valueType": { + "$id": "2531", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContentPart", + "variantTypes": [ + { + "$ref": "2516" + }, + { + "$id": "2532", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2533", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "2534", + "kind": "constant", + "valueType": { + "$ref": "636" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" + }, + { + "$id": "2535", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "2536", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImageImageUrl", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2537", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "Either a URL of the image or the base64 encoded image data.", + "type": { + "$id": "2538", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" + }, + { + "$id": "2539", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", + "type": { + "$ref": "639" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" + }, + { + "$id": "2540", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `user`.", + "type": { + "$id": "2541", + "kind": "constant", + "valueType": { + "$id": "2542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" + }, + { + "$id": "2543", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "2544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" + } + ] + }, + "assistant": { + "$id": "2545", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "2506" + }, + "properties": [ + { + "$id": "2546", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", + "type": { + "$id": "2547", + "kind": "nullable", + "type": { + "$id": "2548", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContent", + "variantTypes": [ + { + "$id": "2549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2550", + "kind": "array", + "name": "ArrayChatCompletionRequestAssistantMessageContentPart", + "valueType": { + "$id": "2551", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContentPart", + "variantTypes": [ + { + "$ref": "2516" + }, + { + "$id": "2552", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartRefusal", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2553", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "2554", + "kind": "constant", + "valueType": { + "$ref": "647" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" + }, + { + "$id": "2555", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "2556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" + }, + { + "$id": "2557", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message by the assistant.", + "type": { + "$id": "2558", + "kind": "nullable", + "type": { + "$id": "2559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" + }, + { + "$id": "2560", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `assistant`.", + "type": { + "$id": "2561", + "kind": "constant", + "valueType": { + "$id": "2562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" + }, + { + "$id": "2563", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "2564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" + }, + { + "$id": "2565", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "2566", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$id": "2567", + "kind": "model", + "name": "ChatCompletionMessageToolCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2568", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "2569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" + }, + { + "$id": "2570", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "2571", + "kind": "constant", + "valueType": { + "$ref": "650" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" + }, + { + "$id": "2572", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function that the model called.", + "type": { + "$id": "2573", + "kind": "model", + "name": "ChatCompletionMessageToolCallFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2574", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" + }, + { + "$id": "2576", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "2577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" + }, + { + "$id": "2578", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "2579", + "kind": "nullable", + "type": { + "$id": "2580", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2581", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "2582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" + }, + { + "$id": "2583", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" + } + ] + }, + "tool": { + "$id": "2585", + "kind": "model", + "name": "ChatCompletionRequestToolMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", + "usage": "Input,Json", + "discriminatorValue": "tool", + "decorators": [], + "baseModel": { + "$ref": "2506" + }, + "properties": [ + { + "$id": "2586", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `tool`.", + "type": { + "$id": "2587", + "kind": "constant", + "valueType": { + "$id": "2588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" + }, + { + "$id": "2589", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the tool message.", + "type": { + "$id": "2590", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContent", + "variantTypes": [ + { + "$id": "2591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2592", + "kind": "array", + "name": "ArrayChatCompletionRequestToolMessageContentPart", + "valueType": { + "$id": "2593", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContentPart", + "variantTypes": [ + { + "$ref": "2516" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" + }, + { + "$id": "2594", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "Tool call that this message is responding to.", + "type": { + "$id": "2595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" + } + ] + }, + "function": { + "$id": "2596", + "kind": "model", + "name": "ChatCompletionRequestFunctionMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2506" + }, + "properties": [ + { + "$id": "2597", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `function`.", + "type": { + "$id": "2598", + "kind": "constant", + "valueType": { + "$id": "2599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" + }, + { + "$id": "2600", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the function message.", + "type": { + "$id": "2601", + "kind": "nullable", + "type": { + "$id": "2602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" + }, + { + "$id": "2603", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" + }, + { + "$id": "2605", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", + "type": { + "$ref": "653" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" + }, + { + "$id": "2606", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "2607", + "kind": "nullable", + "type": { + "$id": "2608", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" + }, + { + "$id": "2609", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", + "type": { + "$id": "2610", + "kind": "nullable", + "type": { + "$id": "2611", + "kind": "dict", + "keyType": { + "$id": "2612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2613", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" + }, + { + "$id": "2614", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", + "type": { + "$id": "2615", + "kind": "nullable", + "type": { + "$id": "2616", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" + }, + { + "$id": "2617", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", + "type": { + "$id": "2618", + "kind": "nullable", + "type": { + "$id": "2619", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" + }, + { + "$id": "2620", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", + "type": { + "$id": "2621", + "kind": "nullable", + "type": { + "$id": "2622", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" + }, + { + "$id": "2623", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", + "type": { + "$id": "2624", + "kind": "nullable", + "type": { + "$id": "2625", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" + }, + { + "$id": "2626", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", + "type": { + "$id": "2627", + "kind": "nullable", + "type": { + "$id": "2628", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" + }, + { + "$id": "2629", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "2630", + "kind": "nullable", + "type": { + "$id": "2631", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" + }, + { + "$id": "2632", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", + "type": { + "$id": "2633", + "kind": "model", + "name": "ChatResponseFormat", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2634", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" + }, + "properties": [ + { + "$ref": "2634" + } + ], + "discriminatedSubtypes": { + "$id": "2636", + "text": { + "$id": "2637", + "kind": "model", + "name": "ChatResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", + "usage": "Input,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "2633" + }, + "properties": [ + { + "$id": "2638", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "2639", + "kind": "constant", + "valueType": { + "$id": "2640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "2641", + "kind": "model", + "name": "ChatResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", + "usage": "Input,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "2633" + }, + "properties": [ + { + "$id": "2642", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "2643", + "kind": "constant", + "valueType": { + "$id": "2644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "2645", + "kind": "model", + "name": "ChatResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", + "access": "public", + "usage": "Input,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "2633" + }, + "properties": [ + { + "$id": "2646", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "2647", + "kind": "constant", + "valueType": { + "$id": "2648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" + }, + { + "$id": "2649", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1504" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" + }, + { + "$id": "2650", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "2651", + "kind": "nullable", + "type": { + "$id": "2652", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" + }, + { + "$id": "2653", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", + "type": { + "$id": "2654", + "kind": "nullable", + "type": { + "$ref": "713" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" + }, + { + "$id": "2655", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "type": { + "$id": "2656", + "kind": "nullable", + "type": { + "$id": "2657", + "kind": "union", + "name": "CreateChatCompletionRequestStop", + "variantTypes": [ + { + "$id": "2658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2659", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" + }, + { + "$id": "2661", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "2662", + "kind": "nullable", + "type": { + "$id": "2663", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" + }, + { + "$id": "2664", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "2665", + "kind": "nullable", + "type": { + "$ref": "2440" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" + }, + { + "$id": "2666", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "2667", + "kind": "nullable", + "type": { + "$id": "2668", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" + }, + { + "$id": "2669", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "2670", + "kind": "nullable", + "type": { + "$id": "2671", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" + }, + { + "$id": "2672", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", + "type": { + "$id": "2673", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$id": "2674", + "kind": "model", + "name": "ChatCompletionTool", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2675", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "2676", + "kind": "constant", + "valueType": { + "$ref": "719" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" + }, + { + "$id": "2677", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$ref": "1374" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" + }, + { + "$id": "2678", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2679", + "kind": "union", + "name": "ChatCompletionToolChoiceOption", + "variantTypes": [ + { + "$ref": "722" + }, + { + "$id": "2680", + "kind": "model", + "name": "ChatCompletionNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", + "usage": "Input,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", + "decorators": [], + "properties": [ + { + "$id": "2681", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "2682", + "kind": "constant", + "valueType": { + "$ref": "730" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" + }, + { + "$id": "2683", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "2684", + "kind": "model", + "name": "ChatCompletionNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2685", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" + }, + { + "$id": "2687", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "2688", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" + }, + { + "$id": "2689", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" + }, + { + "$id": "2691", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", + "type": { + "$id": "2692", + "kind": "union", + "name": "CreateChatCompletionRequestFunctionCall", + "variantTypes": [ + { + "$id": "2693", + "kind": "constant", + "valueType": { + "$id": "2694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "none", + "decorators": [] + }, + { + "$id": "2695", + "kind": "constant", + "valueType": { + "$id": "2696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "2697", + "kind": "model", + "name": "ChatCompletionFunctionCallOption", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", + "usage": "Input,Json", + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", + "decorators": [], + "properties": [ + { + "$id": "2698", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" + }, + { + "$id": "2700", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", + "type": { + "$id": "2701", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$id": "2702", + "kind": "model", + "name": "ChatCompletionFunctions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "decorators": [], + "properties": [ + { + "$id": "2703", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "2704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" + }, + { + "$id": "2705", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "2706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" + }, + { + "$id": "2707", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$ref": "1380" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" + } + ] + }, + { + "$ref": "2506" + }, + { + "$ref": "2510" + }, + { + "$ref": "2516" + }, + { + "$ref": "2526" + }, + { + "$ref": "2532" + }, + { + "$ref": "2536" + }, + { + "$ref": "2545" + }, + { + "$ref": "2552" + }, + { + "$ref": "2567" + }, + { + "$ref": "2573" + }, + { + "$ref": "2580" + }, + { + "$ref": "2585" + }, + { + "$ref": "2596" + }, + { + "$ref": "2633" + }, + { + "$ref": "2637" + }, + { + "$ref": "2641" + }, + { + "$ref": "2645" + }, + { + "$ref": "2674" + }, + { + "$ref": "2680" + }, + { + "$ref": "2684" + }, + { + "$ref": "2697" + }, + { + "$ref": "2702" + }, + { + "$id": "2708", + "kind": "model", + "name": "CreateChatCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", + "usage": "Output,Json", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "2709", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "2710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" + }, + { + "$id": "2711", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "2712", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2713", + "kind": "model", + "name": "CreateChatCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2714", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$ref": "733" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "2715", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "2716", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" + }, + { + "$id": "2717", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2718", + "kind": "model", + "name": "ChatCompletionResponseMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", + "usage": "Output,Json", + "description": "A chat completion message generated by the model.", + "decorators": [], + "properties": [ + { + "$id": "2719", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the message.", + "type": { + "$id": "2720", + "kind": "nullable", + "type": { + "$id": "2721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" + }, + { + "$id": "2722", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "2723", + "kind": "nullable", + "type": { + "$id": "2724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" + }, + { + "$id": "2725", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "2726", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$ref": "2567" + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" + }, + { + "$id": "2727", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "2728", + "kind": "constant", + "valueType": { + "$ref": "745" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" + }, + { + "$id": "2729", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "2730", + "kind": "model", + "name": "ChatCompletionResponseMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2731", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "2732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" + }, + { + "$id": "2733", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "2734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" + }, + { + "$id": "2735", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "2736", + "kind": "nullable", + "type": { + "$id": "2737", + "kind": "model", + "name": "CreateChatCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2738", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "2739", + "kind": "nullable", + "type": { + "$id": "2740", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$id": "2741", + "kind": "model", + "name": "ChatCompletionTokenLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2742", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "2743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" + }, + { + "$id": "2744", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "2745", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" + }, + { + "$id": "2746", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "2747", + "kind": "nullable", + "type": { + "$id": "2748", + "kind": "array", + "name": "ChatCompletionTokenLogprobBytes", + "valueType": { + "$id": "2749", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" + }, + { + "$id": "2750", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", + "type": { + "$id": "2751", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2752", + "kind": "model", + "name": "ChatCompletionTokenLogprobTopLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2753", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "2754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" + }, + { + "$id": "2755", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "2756", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" + }, + { + "$id": "2757", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "2758", + "kind": "nullable", + "type": { + "$id": "2759", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2760", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "2761", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "2762", + "kind": "nullable", + "type": { + "$id": "2763", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "2741" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" + }, + { + "$id": "2764", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "2765", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2766", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" + }, + { + "$id": "2767", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "2768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" + }, + { + "$id": "2769", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "2770", + "kind": "nullable", + "type": { + "$ref": "748" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" + }, + { + "$id": "2771", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "2772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" + }, + { + "$id": "2773", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "2774", + "kind": "constant", + "valueType": { + "$ref": "754" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" + }, + { + "$id": "2775", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "2492" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" + } + ] + }, + { + "$ref": "2713" + }, + { + "$ref": "2718" + }, + { + "$ref": "2730" + }, + { + "$ref": "2737" + }, + { + "$ref": "2741" + }, + { + "$ref": "2752" + }, + { + "$id": "2776", + "kind": "model", + "name": "CreateBatchRequest", + "crossLanguageDefinitionId": "createBatch.Request.anonymous", + "usage": "Spread,Json", + "decorators": [], + "properties": [ + { + "$id": "2777", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", + "type": { + "$id": "2778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" + }, + { + "$id": "2779", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", + "type": { + "$ref": "757" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" + }, + { + "$id": "2780", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", + "type": { + "$id": "2781", + "kind": "constant", + "valueType": { + "$ref": "763" + }, + "value": "24h", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" + }, + { + "$id": "2782", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Optional custom metadata for the batch.", + "type": { + "$id": "2783", + "kind": "nullable", + "type": { + "$id": "2784", + "kind": "dict", + "keyType": { + "$id": "2785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" + } + ] + }, + { + "$id": "2787", + "kind": "model", + "name": "Batch", + "crossLanguageDefinitionId": "OpenAI.Batch", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2788", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.id" + }, + { + "$id": "2790", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `batch`.", + "type": { + "$id": "2791", + "kind": "constant", + "valueType": { + "$ref": "766" + }, + "value": "batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.object" + }, + { + "$id": "2792", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The OpenAI API endpoint used by the batch.", + "type": { + "$id": "2793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" + }, + { + "$id": "2794", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "type": { + "$id": "2795", + "kind": "model", + "name": "BatchErrors", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2796", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `list`.", + "type": { + "$id": "2797", + "kind": "constant", + "valueType": { + "$ref": "769" + }, + "value": "list", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" + }, + { + "$id": "2798", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2799", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2800", + "kind": "model", + "name": "BatchErrorsDatum", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2801", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "An error code identifying the error type.", + "type": { + "$id": "2802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" + }, + { + "$id": "2803", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable message providing more details about the error.", + "type": { + "$id": "2804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" + }, + { + "$id": "2805", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The name of the parameter that caused the error, if applicable.", + "type": { + "$id": "2806", + "kind": "nullable", + "type": { + "$id": "2807", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" + }, + { + "$id": "2808", + "kind": "property", + "name": "line", + "serializedName": "line", + "description": "The line number of the input file where the error occurred, if applicable.", + "type": { + "$id": "2809", + "kind": "nullable", + "type": { + "$id": "2810", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors" + }, + { + "$id": "2811", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of the input file for the batch.", + "type": { + "$id": "2812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" + }, + { + "$id": "2813", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed.", + "type": { + "$id": "2814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" + }, + { + "$id": "2815", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the batch.", + "type": { + "$ref": "772" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.status" + }, + { + "$id": "2816", + "kind": "property", + "name": "output_file_id", + "serializedName": "output_file_id", + "description": "The ID of the file containing the outputs of successfully executed requests.", + "type": { + "$id": "2817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" + }, + { + "$id": "2818", + "kind": "property", + "name": "error_file_id", + "serializedName": "error_file_id", + "description": "The ID of the file containing the outputs of requests with errors.", + "type": { + "$id": "2819", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" + }, + { + "$id": "2820", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the batch was created.", + "type": { + "$id": "2821", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2822", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.created_at" + }, + { + "$id": "2823", + "kind": "property", + "name": "in_progress_at", + "serializedName": "in_progress_at", + "description": "The Unix timestamp (in seconds) for when the batch started processing.", + "type": { + "$id": "2824", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2825", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" + }, + { + "$id": "2826", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the batch will expire.", + "type": { + "$id": "2827", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2828", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" + }, + { + "$id": "2829", + "kind": "property", + "name": "finalizing_at", + "serializedName": "finalizing_at", + "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", + "type": { + "$id": "2830", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2831", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" + }, + { + "$id": "2832", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the batch was completed.", + "type": { + "$id": "2833", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2834", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" + }, + { + "$id": "2835", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the batch failed.", + "type": { + "$id": "2836", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2837", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" + }, + { + "$id": "2838", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the batch expired.", + "type": { + "$id": "2839", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2840", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" + }, + { + "$id": "2841", + "kind": "property", + "name": "cancelling_at", + "serializedName": "cancelling_at", + "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", + "type": { + "$id": "2842", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2843", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" + }, + { + "$id": "2844", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", + "type": { + "$id": "2845", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2846", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" + }, + { + "$id": "2847", + "kind": "property", + "name": "request_counts", + "serializedName": "request_counts", + "description": "The request counts for different statuses within the batch.", + "type": { + "$id": "2848", + "kind": "model", + "name": "BatchRequestCounts", + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2849", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "Total number of requests in the batch.", + "type": { + "$id": "2850", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" + }, + { + "$id": "2851", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "Number of requests that have been completed successfully.", + "type": { + "$id": "2852", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" + }, + { + "$id": "2853", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "Number of requests that have failed.", + "type": { + "$id": "2854", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" + }, + { + "$id": "2855", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2856", + "kind": "nullable", + "type": { + "$id": "2857", + "kind": "dict", + "keyType": { + "$id": "2858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.metadata" + } + ] + }, + { + "$ref": "2795" + }, + { + "$ref": "2800" + }, + { + "$ref": "2848" + }, + { + "$id": "2860", + "kind": "model", + "name": "ListBatchesResponse", + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2861", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2862", + "kind": "array", + "name": "ArrayBatch", + "valueType": { + "$ref": "2787" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" + }, + { + "$id": "2863", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" + }, + { + "$id": "2865", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2866", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" + }, + { + "$id": "2867", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2868", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" + }, + { + "$id": "2869", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2870", + "kind": "constant", + "valueType": { + "$ref": "790" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" + } + ] + }, + { + "$id": "2871", + "kind": "model", + "name": "CreateAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2872", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "793" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" + }, + { + "$id": "2873", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "2874", + "kind": "nullable", + "type": { + "$id": "2875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" + }, + { + "$id": "2876", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "2877", + "kind": "nullable", + "type": { + "$id": "2878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" + }, + { + "$id": "2879", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "2880", + "kind": "nullable", + "type": { + "$id": "2881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" + }, + { + "$id": "2882", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "2883", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" + }, + { + "$id": "2884", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2885", + "kind": "nullable", + "type": { + "$id": "2886", + "kind": "model", + "name": "CreateAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2887", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2888", + "kind": "model", + "name": "CreateAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2889", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2890", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2892", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1405" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" + }, + { + "$id": "2893", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2894", + "kind": "nullable", + "type": { + "$id": "2895", + "kind": "dict", + "keyType": { + "$id": "2896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" + }, + { + "$id": "2898", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "2899", + "kind": "nullable", + "type": { + "$id": "2900", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" + }, + { + "$id": "2901", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "2902", + "kind": "nullable", + "type": { + "$id": "2903", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" + }, + { + "$id": "2904", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "2905", + "kind": "nullable", + "type": { + "$id": "2906", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "2907", + "kind": "constant", + "valueType": { + "$id": "2908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1490" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" + } + ] + }, + { + "$ref": "2886" + }, + { + "$ref": "2888" + }, + { + "$id": "2909", + "kind": "model", + "name": "AssistantObject", + "crossLanguageDefinitionId": "OpenAI.AssistantObject", + "usage": "Output,Json", + "description": "Represents an `assistant` that can call the model and use tools.", + "decorators": [], + "properties": [ + { + "$id": "2910", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" + }, + { + "$id": "2912", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `assistant`.", + "type": { + "$id": "2913", + "kind": "constant", + "valueType": { + "$ref": "841" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" + }, + { + "$id": "2914", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the assistant was created.", + "type": { + "$id": "2915", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2916", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" + }, + { + "$id": "2917", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "2918", + "kind": "nullable", + "type": { + "$id": "2919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" + }, + { + "$id": "2920", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "2921", + "kind": "nullable", + "type": { + "$id": "2922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" + }, + { + "$id": "2923", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "2924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" + }, + { + "$id": "2925", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "2926", + "kind": "nullable", + "type": { + "$id": "2927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" + }, + { + "$id": "2928", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "2929", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" + }, + { + "$id": "2930", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2931", + "kind": "nullable", + "type": { + "$id": "2932", + "kind": "model", + "name": "AssistantObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2933", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2934", + "kind": "model", + "name": "AssistantObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2935", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2936", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2938", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1443" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" + }, + { + "$id": "2939", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2940", + "kind": "nullable", + "type": { + "$id": "2941", + "kind": "dict", + "keyType": { + "$id": "2942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" + }, + { + "$id": "2944", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "2945", + "kind": "nullable", + "type": { + "$id": "2946", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" + }, + { + "$id": "2947", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "2948", + "kind": "nullable", + "type": { + "$id": "2949", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" + }, + { + "$id": "2950", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "2951", + "kind": "nullable", + "type": { + "$id": "2952", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "2953", + "kind": "constant", + "valueType": { + "$id": "2954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1490" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" + } + ] + }, + { + "$ref": "2932" + }, + { + "$ref": "2934" + }, + { + "$id": "2955", + "kind": "model", + "name": "ListAssistantsResponse", + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2956", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2957", + "kind": "constant", + "valueType": { + "$ref": "850" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" + }, + { + "$id": "2958", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2959", + "kind": "array", + "name": "ArrayAssistantObject", + "valueType": { + "$ref": "2909" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" + }, + { + "$id": "2960", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" + }, + { + "$id": "2962", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" + }, + { + "$id": "2964", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2965", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" + } + ] + }, + { + "$id": "2966", + "kind": "model", + "name": "ModifyAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2967", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "2968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" + }, + { + "$id": "2969", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "2970", + "kind": "nullable", + "type": { + "$id": "2971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" + }, + { + "$id": "2972", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "2973", + "kind": "nullable", + "type": { + "$id": "2974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" + }, + { + "$id": "2975", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "2976", + "kind": "nullable", + "type": { + "$id": "2977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" + }, + { + "$id": "2978", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "2979", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1352" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" + }, + { + "$id": "2980", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2981", + "kind": "nullable", + "type": { + "$id": "2982", + "kind": "model", + "name": "ModifyAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2983", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2984", + "kind": "model", + "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2985", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2986", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2988", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1443" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" + }, + { + "$id": "2989", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2990", + "kind": "nullable", + "type": { + "$id": "2991", + "kind": "dict", + "keyType": { + "$id": "2992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" + }, + { + "$id": "2994", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "2995", + "kind": "nullable", + "type": { + "$id": "2996", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" + }, + { + "$id": "2997", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "2998", + "kind": "nullable", + "type": { + "$id": "2999", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" + }, + { + "$id": "3000", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3001", + "kind": "nullable", + "type": { + "$id": "3002", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3003", + "kind": "constant", + "valueType": { + "$id": "3004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1490" + }, + { + "$ref": "1495" + }, + { + "$ref": "1499" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" + } + ] + }, + { + "$ref": "2982" + }, + { + "$ref": "2984" + }, + { + "$id": "3005", + "kind": "model", + "name": "DeleteAssistantResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3006", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" + }, + { + "$id": "3008", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "3009", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" + }, + { + "$id": "3010", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3011", + "kind": "constant", + "valueType": { + "$ref": "853" + }, + "value": "assistant.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" + } + ] + }, + { + "$id": "3012", + "kind": "model", + "name": "CreateSpeechRequest", + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3013", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", + "type": { + "$ref": "856" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" + }, + { + "$id": "3014", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The text to generate audio for. The maximum length is 4096 characters.", + "type": { + "$id": "3015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" + }, + { + "$id": "3016", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", + "type": { + "$ref": "862" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" + }, + { + "$id": "3017", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", + "type": { + "$ref": "876" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" + }, + { + "$id": "3018", + "kind": "property", + "name": "speed", + "serializedName": "speed", + "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", + "type": { + "$id": "3019", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" + } + ] + }, + { + "$id": "3020", + "kind": "model", + "name": "CreateTranscriptionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3021", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3022", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" + }, + { + "$id": "3023", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "890" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" + }, + { + "$id": "3024", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", + "type": { + "$id": "3025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" + }, + { + "$id": "3026", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", + "type": { + "$id": "3027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" + }, + { + "$id": "3028", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "894" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" + }, + { + "$id": "3029", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3030", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" + }, + { + "$id": "3031", + "kind": "property", + "name": "timestamp_granularities", + "serializedName": "timestamp_granularities", + "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", + "type": { + "$id": "3032", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "906" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" + } + ] + }, + { + "$id": "3033", + "kind": "model", + "name": "CreateTranscriptionResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", + "usage": "Output,Json", + "description": "Represents a verbose json transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3034", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3035", + "kind": "constant", + "valueType": { + "$ref": "912" + }, + "value": "transcribe", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" + }, + { + "$id": "3036", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio.", + "type": { + "$id": "3037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" + }, + { + "$id": "3038", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3039", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3040", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" + }, + { + "$id": "3041", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" + }, + { + "$id": "3043", + "kind": "property", + "name": "words", + "serializedName": "words", + "description": "Extracted words and their corresponding timestamps.", + "type": { + "$id": "3044", + "kind": "array", + "name": "ArrayTranscriptionWord", + "valueType": { + "$id": "3045", + "kind": "model", + "name": "TranscriptionWord", + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3046", + "kind": "property", + "name": "word", + "serializedName": "word", + "description": "The text content of the word.", + "type": { + "$id": "3047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" + }, + { + "$id": "3048", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the word in seconds.", + "type": { + "$id": "3049", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3050", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" + }, + { + "$id": "3051", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the word in seconds.", + "type": { + "$id": "3052", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3053", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" + }, + { + "$id": "3054", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the transcribed text and their corresponding details.", + "type": { + "$id": "3055", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$id": "3056", + "kind": "model", + "name": "TranscriptionSegment", + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3057", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Unique identifier of the segment.", + "type": { + "$id": "3058", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" + }, + { + "$id": "3059", + "kind": "property", + "name": "seek", + "serializedName": "seek", + "description": "Seek offset of the segment.", + "type": { + "$id": "3060", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" + }, + { + "$id": "3061", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the segment in seconds.", + "type": { + "$id": "3062", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3063", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" + }, + { + "$id": "3064", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the segment in seconds.", + "type": { + "$id": "3065", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3066", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" + }, + { + "$id": "3067", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content of the segment.", + "type": { + "$id": "3068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" + }, + { + "$id": "3069", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "description": "Array of token IDs for the text content.", + "type": { + "$id": "3070", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3071", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" + }, + { + "$id": "3072", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "Temperature parameter used for generating the segment.", + "type": { + "$id": "3073", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" + }, + { + "$id": "3074", + "kind": "property", + "name": "avg_logprob", + "serializedName": "avg_logprob", + "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", + "type": { + "$id": "3075", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" + }, + { + "$id": "3076", + "kind": "property", + "name": "compression_ratio", + "serializedName": "compression_ratio", + "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", + "type": { + "$id": "3077", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" + }, + { + "$id": "3078", + "kind": "property", + "name": "no_speech_prob", + "serializedName": "no_speech_prob", + "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", + "type": { + "$id": "3079", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" + } + ] + }, + { + "$ref": "3045" + }, + { + "$ref": "3056" + }, + { + "$id": "3080", + "kind": "model", + "name": "CreateTranscriptionResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", + "usage": "Output,Json", + "description": "Represents a transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3081", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" + } + ] + }, + { + "$id": "3083", + "kind": "model", + "name": "CreateTranslationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3084", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3085", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" + }, + { + "$id": "3086", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "915" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" + }, + { + "$id": "3087", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", + "type": { + "$id": "3088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" + }, + { + "$id": "3089", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "919" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" + }, + { + "$id": "3090", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3091", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" + } + ] + }, + { + "$id": "3092", + "kind": "model", + "name": "CreateTranslationResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3093", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3094", + "kind": "constant", + "valueType": { + "$ref": "931" + }, + "value": "translate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" + }, + { + "$id": "3095", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the output translation (always `english`).", + "type": { + "$id": "3096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" + }, + { + "$id": "3097", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3098", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3099", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" + }, + { + "$id": "3100", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The translated text.", + "type": { + "$id": "3101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" + }, + { + "$id": "3102", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the translated text and their corresponding details.", + "type": { + "$id": "3103", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$ref": "3056" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" + } + ] + }, + { + "$id": "3104", + "kind": "model", + "name": "CreateTranslationResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3105", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" + } + ] + }, + { + "$id": "3107", + "kind": "model", + "name": "AssistantResponseFormat", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", + "access": "public", + "usage": "Input", + "decorators": [], + "discriminatorProperty": { + "$id": "3108", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" + }, + "properties": [ + { + "$ref": "3108" + } + ], + "discriminatedSubtypes": { + "$id": "3110", + "text": { + "$id": "3111", + "kind": "model", + "name": "AssistantResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", + "usage": "Input", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3107" + }, + "properties": [ + { + "$id": "3112", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "3113", + "kind": "constant", + "valueType": { + "$id": "3114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "3115", + "kind": "model", + "name": "AssistantResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", + "usage": "Input", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "3107" + }, + "properties": [ + { + "$id": "3116", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "3117", + "kind": "constant", + "valueType": { + "$id": "3118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "3119", + "kind": "model", + "name": "AssistantResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", + "usage": "Input", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "3107" + }, + "properties": [ + { + "$id": "3120", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "3121", + "kind": "constant", + "valueType": { + "$id": "3122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" + }, + { + "$id": "3123", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1504" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + { + "$ref": "3111" + }, + { + "$ref": "3115" + }, + { + "$ref": "3119" + }, + { + "$id": "3124", + "kind": "model", + "name": "BatchRequestInput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line object of the batch input file", + "decorators": [], + "properties": [ + { + "$id": "3125", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", + "type": { + "$id": "3126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" + }, + { + "$id": "3127", + "kind": "property", + "name": "method", + "serializedName": "method", + "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", + "type": { + "$id": "3128", + "kind": "constant", + "valueType": { + "$ref": "934" + }, + "value": "POST", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" + }, + { + "$id": "3129", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", + "type": { + "$id": "3130", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" + } + ] + }, + { + "$id": "3131", + "kind": "model", + "name": "BatchRequestOutput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", + "access": "public", + "usage": "Output", + "description": "The per-line object of the batch output and error files", + "decorators": [], + "properties": [ + { + "$id": "3132", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" + }, + { + "$id": "3134", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs.", + "type": { + "$id": "3135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" + }, + { + "$id": "3136", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "3137", + "kind": "nullable", + "type": { + "$id": "3138", + "kind": "model", + "name": "BatchRequestOutputResponse", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3139", + "kind": "property", + "name": "status_code", + "serializedName": "status_code", + "description": "The HTTP status code of the response", + "type": { + "$id": "3140", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" + }, + { + "$id": "3141", + "kind": "property", + "name": "request_id", + "serializedName": "request_id", + "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", + "type": { + "$id": "3142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" + }, + { + "$id": "3143", + "kind": "property", + "name": "body", + "serializedName": "body", + "description": "The JSON body of the response", + "type": { + "$id": "3144", + "kind": "dict", + "keyType": { + "$id": "3145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3146", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" + }, + { + "$id": "3147", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", + "type": { + "$id": "3148", + "kind": "nullable", + "type": { + "$id": "3149", + "kind": "model", + "name": "BatchRequestOutputError", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3150", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "3151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" + }, + { + "$id": "3152", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "3153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" + } + ] + }, + { + "$ref": "3138" + }, + { + "$ref": "3149" + }, + { + "$id": "3154", + "kind": "model", + "name": "ChatCompletionFunctionChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3155", + "kind": "model", + "name": "ChatCompletionToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3156", + "kind": "model", + "name": "ChatMessageContentPart", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3157", + "kind": "model", + "name": "CreateChatCompletionFunctionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", + "access": "public", + "usage": "Output", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3158", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "3159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" + }, + { + "$id": "3160", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "3161", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3162", + "kind": "model", + "name": "CreateChatCompletionFunctionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3163", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", + "type": { + "$ref": "937" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3164", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3165", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" + }, + { + "$id": "3166", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$ref": "2718" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" + }, + { + "$id": "3167", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "3168", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3169", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" + }, + { + "$id": "3170", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "3171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" + }, + { + "$id": "3172", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" + }, + { + "$id": "3174", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "3175", + "kind": "constant", + "valueType": { + "$ref": "947" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" + }, + { + "$id": "3176", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "2492" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" + } + ] + }, + { + "$ref": "3162" + }, + { + "$id": "3177", + "kind": "model", + "name": "ChatCompletionStreamResponseDelta", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", + "usage": "Output", + "description": "A chat completion delta generated by streamed model responses.", + "decorators": [], + "properties": [ + { + "$id": "3178", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the chunk message.", + "type": { + "$id": "3179", + "kind": "nullable", + "type": { + "$id": "3180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" + }, + { + "$id": "3181", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3182", + "kind": "model", + "name": "ChatCompletionStreamResponseDeltaFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3183", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" + }, + { + "$id": "3185", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" + }, + { + "$id": "3187", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3188", + "kind": "array", + "name": "ArrayChatCompletionMessageToolCallChunk", + "valueType": { + "$id": "3189", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunk", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3190", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "3191", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" + }, + { + "$id": "3192", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" + }, + { + "$id": "3194", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3195", + "kind": "constant", + "valueType": { + "$ref": "950" + }, + "value": "function", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" + }, + { + "$id": "3196", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "3197", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunkFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3198", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" + }, + { + "$id": "3200", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" + }, + { + "$id": "3202", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$ref": "953" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" + }, + { + "$id": "3203", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "3204", + "kind": "nullable", + "type": { + "$id": "3205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" + } + ] + }, + { + "$ref": "3182" + }, + { + "$ref": "3189" + }, + { + "$ref": "3197" + }, + { + "$id": "3206", + "kind": "model", + "name": "CreateChatCompletionStreamResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", + "access": "public", + "usage": "Output", + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3207", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion. Each chunk has the same ID.", + "type": { + "$id": "3208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" + }, + { + "$id": "3209", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", + "type": { + "$id": "3210", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3211", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3212", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$ref": "3177" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" + }, + { + "$id": "3213", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "3214", + "kind": "nullable", + "type": { + "$id": "3215", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3216", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "3217", + "kind": "nullable", + "type": { + "$id": "3218", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "2741" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "3219", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "3220", + "kind": "nullable", + "type": { + "$id": "3221", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "2741" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" + }, + { + "$id": "3222", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$id": "3223", + "kind": "nullable", + "type": { + "$ref": "963" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3224", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3225", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" + }, + { + "$id": "3226", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", + "type": { + "$id": "3227", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3228", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" + }, + { + "$id": "3229", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to generate the completion.", + "type": { + "$id": "3230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" + }, + { + "$id": "3231", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "3232", + "kind": "nullable", + "type": { + "$ref": "975" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" + }, + { + "$id": "3233", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" + }, + { + "$id": "3235", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion.chunk`.", + "type": { + "$id": "3236", + "kind": "constant", + "valueType": { + "$ref": "981" + }, + "value": "chat.completion.chunk", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" + }, + { + "$id": "3237", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", + "type": { + "$id": "3238", + "kind": "model", + "name": "CreateChatCompletionStreamResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3239", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "3240", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" + }, + { + "$id": "3241", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "3242", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "3243", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "3244", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" + } + ] + }, + { + "$ref": "3211" + }, + { + "$ref": "3215" + }, + { + "$ref": "3238" + }, + { + "$id": "3245", + "kind": "model", + "name": "FinetuneChatRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for chat models", + "decorators": [], + "properties": [ + { + "$id": "3246", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "type": { + "$id": "3247", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3248", + "kind": "union", + "name": "FinetuneChatRequestInputMessage", + "variantTypes": [ + { + "$ref": "2510" + }, + { + "$ref": "2526" + }, + { + "$id": "3249", + "kind": "model", + "name": "FineTuneChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", + "usage": "Input", + "decorators": [], + "baseModel": { + "$ref": "2545" + }, + "properties": [] + }, + { + "$ref": "2585" + }, + { + "$ref": "2596" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" + }, + { + "$id": "3250", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may generate JSON inputs for.", + "type": { + "$id": "3251", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$ref": "2674" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" + }, + { + "$id": "3252", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "3253", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" + }, + { + "$id": "3254", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "A list of functions the model may generate JSON inputs for.", + "type": { + "$id": "3255", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$ref": "2702" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" + } + ] + }, + { + "$ref": "3249" + }, + { + "$id": "3256", + "kind": "model", + "name": "FinetuneCompletionRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for completions models", + "decorators": [], + "properties": [ + { + "$id": "3257", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The input prompt for this training example.", + "type": { + "$id": "3258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" + }, + { + "$id": "3259", + "kind": "property", + "name": "completion", + "serializedName": "completion", + "description": "The desired completion for this training example.", + "type": { + "$id": "3260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" + } + ] + }, + { + "$id": "3261", + "kind": "model", + "name": "MessageContentTextObjectAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "discriminatorProperty": { + "$id": "3262", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "3263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" + }, + "properties": [ + { + "$ref": "3262" + } + ], + "discriminatedSubtypes": { + "$id": "3264", + "file_citation": { + "$id": "3265", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Input,Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "3261" + }, + "properties": [ + { + "$id": "3266", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "3267", + "kind": "constant", + "valueType": { + "$id": "3268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "3269", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "3270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "3271", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "3272", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "3273", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "3274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "3275", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "3276", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "3277", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "3278", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "3279", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Input,Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "3261" + }, + "properties": [ + { + "$id": "3280", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "3281", + "kind": "constant", + "valueType": { + "$id": "3282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "3283", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "3284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "3285", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "3286", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "3287", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "3288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "3289", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "3290", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "3291", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "3292", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + { + "$ref": "3265" + }, + { + "$ref": "3272" + }, + { + "$ref": "3279" + }, + { + "$ref": "3286" + }, + { + "$id": "3293", + "kind": "model", + "name": "MessageDeltaContent", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", + "access": "public", + "usage": "Output", + "description": "Represents a single piece of incremental content in an Assistants API streaming response.", + "decorators": [], + "discriminatorProperty": { + "$id": "3294", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "3295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" + }, + "properties": [ + { + "$ref": "3294" + } + ], + "discriminatedSubtypes": { + "$id": "3296", + "image_file": { + "$id": "3297", + "kind": "model", + "name": "MessageDeltaContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", + "access": "public", + "usage": "Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "discriminatorValue": "image_file", + "decorators": [], + "baseModel": { + "$ref": "3293" + }, + "properties": [ + { + "$id": "3298", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "3299", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" + }, + { + "$id": "3300", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "3301", + "kind": "constant", + "valueType": { + "$id": "3302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" + }, + { + "$id": "3303", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "3304", + "kind": "model", + "name": "MessageDeltaContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3305", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "3306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "3307", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "984" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" + } + ] + }, + "image_url": { + "$id": "3308", + "kind": "model", + "name": "MessageDeltaContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", + "access": "public", + "usage": "Output", + "description": "References an image URL in the content of a message.", + "discriminatorValue": "image_url", + "decorators": [], + "baseModel": { + "$ref": "3293" + }, + "properties": [ + { + "$id": "3309", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "3310", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" + }, + { + "$id": "3311", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_url`.", + "type": { + "$id": "3312", + "kind": "constant", + "valueType": { + "$id": "3313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" + }, + { + "$id": "3314", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "3315", + "kind": "model", + "name": "MessageDeltaContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3316", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "3317", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "3318", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "992" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" + } + ] + }, + "text": { + "$id": "3319", + "kind": "model", + "name": "MessageDeltaContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", + "access": "public", + "usage": "Output", + "description": "The text content that is part of a message.", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3293" + }, + "properties": [ + { + "$id": "3320", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "3321", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" + }, + { + "$id": "3322", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "3323", + "kind": "constant", + "valueType": { + "$id": "3324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" + }, + { + "$id": "3325", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3326", + "kind": "model", + "name": "MessageDeltaContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3327", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "3328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" + }, + { + "$id": "3329", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "3330", + "kind": "array", + "name": "ArrayMessageDeltaTextContentAnnotation", + "valueType": { + "$id": "3331", + "kind": "model", + "name": "MessageDeltaTextContentAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", + "access": "public", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "3332", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "3333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" + }, + "properties": [ + { + "$ref": "3332" + } + ], + "discriminatedSubtypes": { + "$id": "3334", + "file_citation": { + "$id": "3335", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "3331" + }, + "properties": [ + { + "$id": "3336", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "3337", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" + }, + { + "$id": "3338", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "3339", + "kind": "constant", + "valueType": { + "$id": "3340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "3341", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "3342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "3343", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "3344", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3345", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "3346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + }, + { + "$id": "3347", + "kind": "property", + "name": "quote", + "serializedName": "quote", + "description": "The specific quote in the file.", + "type": { + "$id": "3348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "3349", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "3350", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "3351", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "3352", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "3353", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "3331" + }, + "properties": [ + { + "$id": "3354", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "3355", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" + }, + { + "$id": "3356", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "3357", + "kind": "constant", + "valueType": { + "$id": "3358", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "3359", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "3360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "3361", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "3362", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3363", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "3364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "3365", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "3366", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "3367", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "3368", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" + } + ] + }, + "refusal": { + "$id": "3369", + "kind": "model", + "name": "MessageDeltaContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", + "usage": "Output", + "description": "The refusal content that is part of a message.", + "discriminatorValue": "refusal", + "decorators": [], + "baseModel": { + "$ref": "3293" + }, + "properties": [ + { + "$id": "3370", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the refusal part in the message.", + "type": { + "$id": "3371", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" + }, + { + "$id": "3372", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "3373", + "kind": "constant", + "valueType": { + "$id": "3374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" + }, + { + "$id": "3375", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "3376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" + } + ] + } + } + }, + { + "$ref": "3297" + }, + { + "$ref": "3304" + }, + { + "$ref": "3308" + }, + { + "$ref": "3315" + }, + { + "$ref": "3319" + }, + { + "$ref": "3326" + }, + { + "$ref": "3331" + }, + { + "$ref": "3335" + }, + { + "$ref": "3344" + }, + { + "$ref": "3353" + }, + { + "$ref": "3362" + }, + { + "$ref": "3369" + }, + { + "$id": "3377", + "kind": "model", + "name": "MessageContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1341" + }, + "properties": [ + { + "$id": "3378", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "3379", + "kind": "constant", + "valueType": { + "$ref": "1000" + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" + }, + { + "$id": "3380", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "3381", + "kind": "model", + "name": "MessageContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "3382", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "3383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "3384", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1003" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" + } + ] + }, + { + "$ref": "3381" + }, + { + "$id": "3385", + "kind": "model", + "name": "MessageContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1341" + }, + "properties": [ + { + "$id": "3386", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "3387", + "kind": "constant", + "valueType": { + "$ref": "1011" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" + }, + { + "$id": "3388", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3389", + "kind": "model", + "name": "MessageContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "3390", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "3391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" + }, + { + "$id": "3392", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "3393", + "kind": "array", + "name": "ArrayMessageContentTextObjectAnnotation", + "valueType": { + "$ref": "3261" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" + } + ] + }, + { + "$ref": "3389" + }, + { + "$id": "3394", + "kind": "model", + "name": "MessageContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", + "access": "public", + "usage": "Input,Output", + "description": "The refusal content generated by the assistant.", + "decorators": [], + "baseModel": { + "$ref": "1341" + }, + "properties": [ + { + "$id": "3395", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "3396", + "kind": "constant", + "valueType": { + "$ref": "1014" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" + }, + { + "$id": "3397", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "3398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" + } + ] + }, + { + "$id": "3399", + "kind": "model", + "name": "MessageContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image URL in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1341" + }, + "properties": [ + { + "$id": "3400", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3401", + "kind": "constant", + "valueType": { + "$ref": "1017" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" + }, + { + "$id": "3402", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "3403", + "kind": "model", + "name": "MessageContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "3404", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "3405", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "3406", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", + "type": { + "$ref": "1020" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" + } + ] + }, + { + "$ref": "3403" + }, + { + "$id": "3407", + "kind": "model", + "name": "MessageDeltaObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a message delta i.e. any changed fields on a message during streaming.", + "decorators": [], + "properties": [ + { + "$id": "3408", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the message, which can be referenced in API endpoints.", + "type": { + "$id": "3409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" + }, + { + "$id": "3410", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message.delta`.", + "type": { + "$id": "3411", + "kind": "constant", + "valueType": { + "$ref": "1028" + }, + "value": "thread.message.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" + }, + { + "$id": "3412", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the Message.", + "type": { + "$id": "3413", + "kind": "model", + "name": "MessageDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3414", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "1031" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" + }, + { + "$id": "3415", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "3416", + "kind": "array", + "name": "ArrayMessageDeltaContent", + "valueType": { + "$ref": "3293" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" + } + ] + }, + { + "$ref": "3413" + }, + { + "$id": "3417", + "kind": "model", + "name": "MessageRequestContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1341" + }, + "properties": [ + { + "$id": "3418", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "3419", + "kind": "constant", + "valueType": { + "$ref": "1037" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" + }, + { + "$id": "3420", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content to be sent to the model", + "type": { + "$id": "3421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" + } + ] + }, + { + "$id": "3422", + "kind": "model", + "name": "RunStepDeltaStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "3423", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "3424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" + }, + "properties": [ + { + "$ref": "3423" + } + ], + "discriminatedSubtypes": { + "$id": "3425", + "message_creation": { + "$id": "3426", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", + "access": "public", + "usage": "Output", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "3422" + }, + "properties": [ + { + "$id": "3427", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "3428", + "kind": "constant", + "valueType": { + "$id": "3429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" + }, + { + "$id": "3430", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "3431", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3432", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "3433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "3434", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", + "access": "public", + "usage": "Output", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "3422" + }, + "properties": [ + { + "$id": "3435", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "3436", + "kind": "constant", + "valueType": { + "$id": "3437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" + }, + { + "$id": "3438", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3439", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "3440", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "3441", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "3442", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "3441" + } + ], + "discriminatedSubtypes": { + "$id": "3443", + "code_interpreter": { + "$id": "3444", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", + "access": "public", + "usage": "Output", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "3440" + }, + "properties": [ + { + "$id": "3445", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "3446", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" + }, + { + "$id": "3447", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "3449", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "3450", + "kind": "constant", + "valueType": { + "$id": "3451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "3452", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "3453", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3454", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "3455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "3456", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "3457", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "3458", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "3459", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "3460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "3459" + } + ], + "discriminatedSubtypes": { + "$id": "3461", + "logs": { + "$id": "3462", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "access": "public", + "usage": "Output", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "3458" + }, + "properties": [ + { + "$id": "3463", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "3464", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" + }, + { + "$id": "3465", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "3466", + "kind": "constant", + "valueType": { + "$id": "3467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "3468", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "3469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "3470", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "3458" + }, + "properties": [ + { + "$id": "3471", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "3472", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" + }, + { + "$id": "3473", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "3474", + "kind": "constant", + "valueType": { + "$id": "3475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "3476", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "3477", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3478", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "3479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "3480", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "3440" + }, + "properties": [ + { + "$id": "3481", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "3482", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" + }, + { + "$id": "3483", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "3484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "3485", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "3486", + "kind": "constant", + "valueType": { + "$id": "3487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "3488", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "3489", + "kind": "dict", + "keyType": { + "$id": "3490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3491", + "kind": "any", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "3492", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "3440" + }, + "properties": [ + { + "$id": "3493", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "3494", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" + }, + { + "$id": "3495", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "3496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "3497", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "3498", + "kind": "constant", + "valueType": { + "$id": "3499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "3500", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "3501", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3502", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "3503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "3504", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "3505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "3506", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "3507", + "kind": "nullable", + "type": { + "$id": "3508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + { + "$ref": "3426" + }, + { + "$ref": "3431" + }, + { + "$ref": "3434" + }, + { + "$ref": "3440" + }, + { + "$ref": "3444" + }, + { + "$ref": "3453" + }, + { + "$ref": "3458" + }, + { + "$ref": "3462" + }, + { + "$ref": "3470" + }, + { + "$ref": "3477" + }, + { + "$ref": "3480" + }, + { + "$ref": "3492" + }, + { + "$ref": "3501" + }, + { + "$id": "3509", + "kind": "model", + "name": "RunStepDeltaObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", + "decorators": [], + "properties": [ + { + "$id": "3510", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "3511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" + }, + { + "$id": "3512", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step.delta`.", + "type": { + "$id": "3513", + "kind": "constant", + "valueType": { + "$ref": "1040" + }, + "value": "thread.run.step.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" + }, + { + "$id": "3514", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the run step.", + "type": { + "$id": "3515", + "kind": "model", + "name": "RunStepDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3516", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$ref": "3422" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" + } + ] + }, + { + "$ref": "3515" + }, + { + "$id": "3517", + "kind": "model", + "name": "CreateThreadRequestToolResourcesFileSearchBase", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3518", + "kind": "model", + "name": "ListThreadsResponse", + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", + "access": "public", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3519", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3520", + "kind": "constant", + "valueType": { + "$ref": "1043" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" + }, + { + "$id": "3521", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3522", + "kind": "array", + "name": "ArrayThreadObject", + "valueType": { + "$ref": "1863" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" + }, + { + "$id": "3523", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" + }, + { + "$id": "3525", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" + }, + { + "$id": "3527", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3528", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" + } + ] + } + ], + "Clients": [ + { + "$id": "3529", + "Name": "OpenAIClient", + "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", + "Operations": [], + "Protocol": { + "$id": "3530" + }, + "Parameters": [ + { + "$id": "3531", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3532", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3533", + "Type": { + "$id": "3534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + } + ], + "Decorators": [] + }, + { + "$id": "3535", + "Name": "Audio", + "Operations": [ + { + "$id": "3536", + "Name": "createSpeech", + "ResourceName": "Audio", + "Summary": "Generates audio from the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3537", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3538", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3539", + "Type": { + "$id": "3540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3541", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3542", + "kind": "constant", + "valueType": { + "$id": "3543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3544", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3545", + "kind": "constant", + "valueType": { + "$id": "3546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3547", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3012" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3548", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "3549", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "3550", + "Name": "transferEncoding", + "NameInResponse": "Transfer-Encoding", + "Description": "chunked", + "Type": { + "$id": "3551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3552", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "3553", + "kind": "constant", + "valueType": { + "$id": "3554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/octet-stream" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/speech", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", + "Decorators": [] + }, + { + "$id": "3555", + "Name": "createTranscription", + "ResourceName": "Audio", + "Summary": "Transcribes audio into the input language.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3537" + }, + { + "$id": "3556", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3557", + "kind": "constant", + "valueType": { + "$id": "3558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3559", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "3560", + "kind": "constant", + "valueType": { + "$id": "3561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3562", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3020" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3563", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "3564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "3565", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "3566", + "kind": "constant", + "valueType": { + "$id": "3567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/transcriptions", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", + "Decorators": [] + }, + { + "$id": "3568", + "Name": "createTranslation", + "ResourceName": "Audio", + "Summary": "Translates audio into English..", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3537" + }, + { + "$id": "3569", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3570", + "kind": "constant", + "valueType": { + "$id": "3571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3572", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "3573", + "kind": "constant", + "valueType": { + "$id": "3574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3575", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3083" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3576", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "3577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "3578", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "3579", + "kind": "constant", + "valueType": { + "$id": "3580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/translations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3581" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3537" + } + ], + "Decorators": [] + }, + { + "$id": "3582", + "Name": "Assistants", + "Operations": [ + { + "$id": "3583", + "Name": "createAssistant", + "ResourceName": "Assistants", + "Summary": "Create an assistant with a model and instructions.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3584", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3585", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3586", + "Type": { + "$id": "3587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3588", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3589", + "kind": "constant", + "valueType": { + "$id": "3590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3591", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3592", + "kind": "constant", + "valueType": { + "$id": "3593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3594", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2871" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3595", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2909" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", + "Decorators": [] + }, + { + "$id": "3596", + "Name": "listAssistants", + "ResourceName": "Assistants", + "Summary": "Returns a list of assistants.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3584" + }, + { + "$id": "3597", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3598", + "kind": "constant", + "valueType": { + "$id": "3599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3600", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "3601", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3602", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "844" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3603", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "3604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3605", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "3606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3607", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2955" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", + "Decorators": [] + }, + { + "$id": "3608", + "Name": "getAssistant", + "ResourceName": "Assistants", + "Summary": "Retrieves an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3584" + }, + { + "$id": "3609", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3610", + "kind": "constant", + "valueType": { + "$id": "3611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3612", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to retrieve.", + "Type": { + "$id": "3613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3614", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2909" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", + "Decorators": [] + }, + { + "$id": "3615", + "Name": "modifyAssistant", + "ResourceName": "Assistants", + "Summary": "Modifies an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3584" + }, + { + "$id": "3616", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3617", + "kind": "constant", + "valueType": { + "$id": "3618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3619", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to modify.", + "Type": { + "$id": "3620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3621", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3622", + "kind": "constant", + "valueType": { + "$id": "3623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3624", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2966" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3625", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2909" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", + "Decorators": [] + }, + { + "$id": "3626", + "Name": "deleteAssistant", + "ResourceName": "Assistants", + "Summary": "Delete an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3584" + }, + { + "$id": "3627", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3628", + "kind": "constant", + "valueType": { + "$id": "3629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3630", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to delete.", + "Type": { + "$id": "3631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3632", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3005" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3633" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3584" + } + ], + "Decorators": [] + }, + { + "$id": "3634", + "Name": "Batches", + "Operations": [ + { + "$id": "3635", + "Name": "createBatch", + "ResourceName": "Batches", + "Summary": "Creates and executes a batch from an uploaded file of requests", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3636", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3637", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3638", + "Type": { + "$id": "3639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3640", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3641", + "kind": "constant", + "valueType": { + "$id": "3642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3643", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3644", + "kind": "constant", + "valueType": { + "$id": "3645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3646", + "Name": "createBatchRequest", + "NameInRequest": "createBatchRequest", + "Type": { + "$ref": "2776" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Spread", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3647", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2787" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", + "Decorators": [] + }, + { + "$id": "3648", + "Name": "listBatches", + "ResourceName": "Batches", + "Summary": "List your organization's batches.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3636" + }, + { + "$id": "3649", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3650", + "kind": "constant", + "valueType": { + "$id": "3651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3652", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "3653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3654", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "3655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3656", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2860" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", + "Decorators": [] + }, + { + "$id": "3657", + "Name": "retrieveBatch", + "ResourceName": "Batches", + "Summary": "Retrieves a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3636" + }, + { + "$id": "3658", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3659", + "kind": "constant", + "valueType": { + "$id": "3660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3661", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to retrieve.", + "Type": { + "$id": "3662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3663", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2787" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", + "Decorators": [] + }, + { + "$id": "3664", + "Name": "cancelBatch", + "ResourceName": "Batches", + "Summary": "Cancels an in-progress batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3636" + }, + { + "$id": "3665", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3666", + "kind": "constant", + "valueType": { + "$id": "3667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3668", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to cancel.", + "Type": { + "$id": "3669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3670", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2787" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3671" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3636" + } + ], + "Decorators": [] + }, + { + "$id": "3672", + "Name": "Chat", + "Operations": [ + { + "$id": "3673", + "Name": "createChatCompletion", + "ResourceName": "Chat", + "Summary": "Creates a model response for the given chat conversation.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3674", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3675", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3676", + "Type": { + "$id": "3677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3678", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3679", + "kind": "constant", + "valueType": { + "$id": "3680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3681", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3682", + "kind": "constant", + "valueType": { + "$id": "3683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3684", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2503" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3685", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2708" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/chat/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3686" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3674" + } + ], + "Decorators": [] + }, + { + "$id": "3687", + "Name": "Completions", + "Operations": [ + { + "$id": "3688", + "Name": "createCompletion", + "ResourceName": "Completions", + "Summary": "Creates a completion for the provided prompt and parameters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3689", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3690", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3691", + "Type": { + "$id": "3692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3693", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3694", + "kind": "constant", + "valueType": { + "$id": "3695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3696", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3697", + "kind": "constant", + "valueType": { + "$id": "3698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3699", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2387" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3700", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2454" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3701" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3689" + } + ], + "Decorators": [] + }, + { + "$id": "3702", + "Name": "Embeddings", + "Operations": [ + { + "$id": "3703", + "Name": "createEmbedding", + "ResourceName": "Embeddings", + "Summary": "Creates an embedding vector representing the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3704", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3705", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3706", + "Type": { + "$id": "3707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3708", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3709", + "kind": "constant", + "valueType": { + "$id": "3710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3711", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3712", + "kind": "constant", + "valueType": { + "$id": "3713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3714", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2347" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3715", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2364" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/embeddings", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3716" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3704" + } + ], + "Decorators": [] + }, + { + "$id": "3717", + "Name": "Files", + "Operations": [ + { + "$id": "3718", + "Name": "createFile", + "ResourceName": "Files", + "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3719", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3720", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3721", + "Type": { + "$id": "3722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3723", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3724", + "kind": "constant", + "valueType": { + "$id": "3725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3726", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "3727", + "kind": "constant", + "valueType": { + "$id": "3728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3729", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2331" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3730", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1086" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/files", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.createFile", + "Decorators": [] + }, + { + "$id": "3731", + "Name": "listFiles", + "ResourceName": "Files", + "Summary": "Returns a list of files that belong to the user's organization.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3719" + }, + { + "$id": "3732", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3733", + "kind": "constant", + "valueType": { + "$id": "3734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3735", + "Name": "purpose", + "NameInRequest": "purpose", + "Description": "Only return files with the given purpose.", + "Type": { + "$id": "3736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3737", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2335" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", + "Decorators": [] + }, + { + "$id": "3738", + "Name": "retrieveFile", + "ResourceName": "Files", + "Summary": "Returns information about a specific file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3719" + }, + { + "$id": "3739", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3740", + "kind": "constant", + "valueType": { + "$id": "3741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3742", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "3743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3744", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1086" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", + "Decorators": [] + }, + { + "$id": "3745", + "Name": "deleteFile", + "ResourceName": "Files", + "Summary": "Delete a file", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3719" + }, + { + "$id": "3746", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3747", + "kind": "constant", + "valueType": { + "$id": "3748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3749", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "3750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3751", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2340" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", + "Decorators": [] + }, + { + "$id": "3752", + "Name": "downloadFile", + "ResourceName": "Files", + "Summary": "Returns the contents of the specified file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3719" + }, + { + "$id": "3753", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3754", + "kind": "constant", + "valueType": { + "$id": "3755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3756", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "3757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3758", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "3759", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}/content", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3760" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3719" + } + ], + "Decorators": [] + }, + { + "$id": "3761", + "Name": "FineTuning", + "Operations": [ + { + "$id": "3762", + "Name": "createFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3763", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3764", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3765", + "Type": { + "$id": "3766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3767", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3768", + "kind": "constant", + "valueType": { + "$id": "3769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3770", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3771", + "kind": "constant", + "valueType": { + "$id": "3772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3773", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2130" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3774", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2178" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", + "Decorators": [] + }, + { + "$id": "3775", + "Name": "listPaginatedFineTuningJobs", + "ResourceName": "FineTuning", + "Summary": "List your organization's fine-tuning jobs", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3763" + }, + { + "$id": "3776", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3777", + "kind": "constant", + "valueType": { + "$id": "3778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3779", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last job from the previous pagination request.", + "Type": { + "$id": "3780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3781", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of fine-tuning jobs to retrieve.", + "Type": { + "$id": "3782", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3783", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2263" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", + "Decorators": [] + }, + { + "$id": "3784", + "Name": "retrieveFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3763" + }, + { + "$id": "3785", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3786", + "kind": "constant", + "valueType": { + "$id": "3787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3788", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job.", + "Type": { + "$id": "3789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3790", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2178" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", + "Decorators": [] + }, + { + "$id": "3791", + "Name": "cancelFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Immediately cancel a fine-tune job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3763" + }, + { + "$id": "3792", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3793", + "kind": "constant", + "valueType": { + "$id": "3794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3795", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to cancel.", + "Type": { + "$id": "3796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3797", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2178" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", + "Decorators": [] + }, + { + "$id": "3798", + "Name": "listFineTuningJobCheckpoints", + "ResourceName": "FineTuning", + "Summary": "List the checkpoints for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3763" + }, + { + "$id": "3799", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3800", + "kind": "constant", + "valueType": { + "$id": "3801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3802", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get checkpoints for.", + "Type": { + "$id": "3803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3804", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last checkpoint ID from the previous pagination request.", + "Type": { + "$id": "3805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3806", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of checkpoints to retrieve.", + "Type": { + "$id": "3807", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3808", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2270" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", + "Decorators": [] + }, + { + "$id": "3809", + "Name": "listFineTuningEvents", + "ResourceName": "FineTuning", + "Summary": "Get status updates for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3763" + }, + { + "$id": "3810", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3811", + "kind": "constant", + "valueType": { + "$id": "3812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3813", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get events for.", + "Type": { + "$id": "3814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3815", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last event from the previous pagination request.", + "Type": { + "$id": "3816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3817", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of events to retrieve.", + "Type": { + "$id": "3818", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3819", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2313" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3820" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3763" + } + ], + "Decorators": [] + }, + { + "$id": "3821", + "Name": "Images", + "Operations": [ + { + "$id": "3822", + "Name": "createImage", + "ResourceName": "Images", + "Summary": "Creates an image given a prompt", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3823", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3824", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3825", + "Type": { + "$id": "3826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3827", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3828", + "kind": "constant", + "valueType": { + "$id": "3829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3830", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3831", + "kind": "constant", + "valueType": { + "$id": "3832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3833", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2068" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3834", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2085" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/generations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImage", + "Decorators": [] + }, + { + "$id": "3835", + "Name": "createImageEdit", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3823" + }, + { + "$id": "3836", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3837", + "kind": "constant", + "valueType": { + "$id": "3838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3839", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "3840", + "kind": "constant", + "valueType": { + "$id": "3841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3842", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2098" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3843", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2085" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/edits", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", + "Decorators": [] + }, + { + "$id": "3844", + "Name": "createImageVariation", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3823" + }, + { + "$id": "3845", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3846", + "kind": "constant", + "valueType": { + "$id": "3847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3848", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "3849", + "kind": "constant", + "valueType": { + "$id": "3850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3851", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2116" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3852", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2085" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/variations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3853" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3823" + } + ], + "Decorators": [] + }, + { + "$id": "3854", + "Name": "Messages", + "Operations": [ + { + "$id": "3855", + "Name": "createMessage", + "ResourceName": "Messages", + "Summary": "Create a message.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3856", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3857", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3858", + "Type": { + "$id": "3859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3860", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3861", + "kind": "constant", + "valueType": { + "$id": "3862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3863", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", + "Type": { + "$id": "3864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3865", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3866", + "kind": "constant", + "valueType": { + "$id": "3867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3868", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1337" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3869", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1998" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", + "Decorators": [] + }, + { + "$id": "3870", + "Name": "listMessages", + "ResourceName": "Messages", + "Summary": "Returns a list of messages for a given thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3856" + }, + { + "$id": "3871", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3872", + "kind": "constant", + "valueType": { + "$id": "3873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3874", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", + "Type": { + "$id": "3875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3876", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "3877", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3878", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "420" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3879", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "3880", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3881", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "3882", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3883", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2044" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", + "Decorators": [] + }, + { + "$id": "3884", + "Name": "getMessage", + "ResourceName": "Messages", + "Summary": "Retrieve a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3856" + }, + { + "$id": "3885", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3886", + "kind": "constant", + "valueType": { + "$id": "3887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3888", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", + "Type": { + "$id": "3889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3890", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to retrieve.", + "Type": { + "$id": "3891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3892", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1998" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", + "Decorators": [] + }, + { + "$id": "3893", + "Name": "modifyMessage", + "ResourceName": "Messages", + "Summary": "Modifies a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3856" + }, + { + "$id": "3894", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3895", + "kind": "constant", + "valueType": { + "$id": "3896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3897", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "3898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3899", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to modify.", + "Type": { + "$id": "3900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3901", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3902", + "kind": "constant", + "valueType": { + "$id": "3903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3904", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2055" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3905", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1998" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", + "Decorators": [] + }, + { + "$id": "3906", + "Name": "deleteMessage", + "ResourceName": "Messages", + "Summary": "Deletes a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3856" + }, + { + "$id": "3907", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3908", + "kind": "constant", + "valueType": { + "$id": "3909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3910", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "3911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3912", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to delete.", + "Type": { + "$id": "3913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3914", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2061" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3915" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3856" + } + ], + "Decorators": [] + }, + { + "$id": "3916", + "Name": "ModelsOps", + "Operations": [ + { + "$id": "3917", + "Name": "listModels", + "ResourceName": "Models", + "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3918", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3919", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3920", + "Type": { + "$id": "3921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3922", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3923", + "kind": "constant", + "valueType": { + "$id": "3924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3925", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1976" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.listModels", + "Decorators": [] + }, + { + "$id": "3926", + "Name": "retrieveModel", + "ResourceName": "Models", + "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3918" + }, + { + "$id": "3927", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3928", + "kind": "constant", + "valueType": { + "$id": "3929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3930", + "Name": "model", + "NameInRequest": "model", + "Description": "The ID of the model to use for this request.", + "Type": { + "$id": "3931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3932", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1981" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", + "Decorators": [] + }, + { + "$id": "3933", + "Name": "deleteModel", + "ResourceName": "Models", + "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3918" + }, + { + "$id": "3934", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3935", + "kind": "constant", + "valueType": { + "$id": "3936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3937", + "Name": "model", + "NameInRequest": "model", + "Description": "The model to delete", + "Type": { + "$id": "3938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3939", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1991" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3940" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3918" + } + ], + "Decorators": [] + }, + { + "$id": "3941", + "Name": "Moderations", + "Operations": [ + { + "$id": "3942", + "Name": "createModeration", + "ResourceName": "Moderations", + "Summary": "Classifies if text is potentially harmful.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3943", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3944", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3945", + "Type": { + "$id": "3946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3947", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3948", + "kind": "constant", + "valueType": { + "$id": "3949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3950", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3951", + "kind": "constant", + "valueType": { + "$id": "3952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3953", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1911" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3954", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1918" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/moderations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3955" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3943" + } + ], + "Decorators": [] + }, + { + "$id": "3956", + "Name": "Threads", + "Operations": [ + { + "$id": "3957", + "Name": "createThread", + "ResourceName": "Threads", + "Summary": "Create a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3958", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3959", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3960", + "Type": { + "$id": "3961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "3962", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3963", + "kind": "constant", + "valueType": { + "$id": "3964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3965", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3966", + "kind": "constant", + "valueType": { + "$id": "3967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3968", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1334" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3969", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1863" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", + "Decorators": [] + }, + { + "$id": "3970", + "Name": "getThread", + "ResourceName": "Threads", + "Summary": "Retrieves a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3958" + }, + { + "$id": "3971", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3972", + "kind": "constant", + "valueType": { + "$id": "3973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3974", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to retrieve.", + "Type": { + "$id": "3975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3976", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1863" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", + "Decorators": [] + }, + { + "$id": "3977", + "Name": "modifyThread", + "ResourceName": "Threads", + "Summary": "Modifies a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3958" + }, + { + "$id": "3978", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3979", + "kind": "constant", + "valueType": { + "$id": "3980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3981", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", + "Type": { + "$id": "3982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3983", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3984", + "kind": "constant", + "valueType": { + "$id": "3985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3986", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1889" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3987", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1863" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", + "Decorators": [] + }, + { + "$id": "3988", + "Name": "deleteThread", + "ResourceName": "Threads", + "Summary": "Delete a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3958" + }, + { + "$id": "3989", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3990", + "kind": "constant", + "valueType": { + "$id": "3991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3992", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to delete.", + "Type": { + "$id": "3993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3994", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1904" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", + "Decorators": [] + } + ], + "Protocol": { + "$id": "3995" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3958" + } + ], + "Decorators": [] + }, + { + "$id": "3996", + "Name": "Runs", + "Operations": [ + { + "$id": "3997", + "Name": "createThreadAndRun", + "ResourceName": "Runs", + "Summary": "Create a thread and run it in one request.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3998", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3999", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4000", + "Type": { + "$id": "4001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4002", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4003", + "kind": "constant", + "valueType": { + "$id": "4004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4005", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4006", + "kind": "constant", + "valueType": { + "$id": "4007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4008", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1330" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4009", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", + "Decorators": [] + }, + { + "$id": "4010", + "Name": "createRun", + "ResourceName": "Runs", + "Summary": "Create a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4011", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4012", + "kind": "constant", + "valueType": { + "$id": "4013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4014", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to run.", + "Type": { + "$id": "4015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4016", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4017", + "kind": "constant", + "valueType": { + "$id": "4018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4019", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1625" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4020", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", + "Decorators": [] + }, + { + "$id": "4021", + "Name": "listRuns", + "ResourceName": "Runs", + "Summary": "Returns a list of runs belonging to a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4022", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4023", + "kind": "constant", + "valueType": { + "$id": "4024", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4025", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run belongs to.", + "Type": { + "$id": "4026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4027", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4028", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4029", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "319" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4030", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4032", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4034", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1674" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", + "Decorators": [] + }, + { + "$id": "4035", + "Name": "getRun", + "ResourceName": "Runs", + "Summary": "Retrieves a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4036", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4037", + "kind": "constant", + "valueType": { + "$id": "4038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4039", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4041", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to retrieve.", + "Type": { + "$id": "4042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4043", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", + "Decorators": [] + }, + { + "$id": "4044", + "Name": "modifyRun", + "ResourceName": "Runs", + "Summary": "Modifies a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4045", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4046", + "kind": "constant", + "valueType": { + "$id": "4047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4048", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4050", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to modify.", + "Type": { + "$id": "4051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4052", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4053", + "kind": "constant", + "valueType": { + "$id": "4054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4055", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1685" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4056", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", + "Decorators": [] + }, + { + "$id": "4057", + "Name": "cancelRun", + "ResourceName": "Runs", + "Summary": "Cancels a run that is `in_progress`.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4058", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4059", + "kind": "constant", + "valueType": { + "$id": "4060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4061", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this run belongs.", + "Type": { + "$id": "4062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4063", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to cancel.", + "Type": { + "$id": "4064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4065", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", + "Decorators": [] + }, + { + "$id": "4066", + "Name": "submitToolOutputsToRun", + "ResourceName": "Runs", + "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4067", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4068", + "kind": "constant", + "valueType": { + "$id": "4069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4070", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", + "Type": { + "$id": "4071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4072", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run that requires the tool output submission.", + "Type": { + "$id": "4073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4074", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4075", + "kind": "constant", + "valueType": { + "$id": "4076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4077", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1691" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4078", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1518" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", + "Decorators": [] + }, + { + "$id": "4079", + "Name": "listRunSteps", + "ResourceName": "Runs", + "Summary": "Returns a list of run steps belonging to a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4080", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4081", + "kind": "constant", + "valueType": { + "$id": "4082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4083", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run and run steps belong to.", + "Type": { + "$id": "4084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4085", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run the run steps belong to.", + "Type": { + "$id": "4086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4087", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4088", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4089", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "328" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4090", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4092", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4094", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1702" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", + "Decorators": [] + }, + { + "$id": "4095", + "Name": "getRunStep", + "ResourceName": "Runs", + "Summary": "Retrieves a run step.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "3998" + }, + { + "$id": "4096", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4097", + "kind": "constant", + "valueType": { + "$id": "4098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4099", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which the run and run step belongs.", + "Type": { + "$id": "4100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4101", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to which the run step belongs.", + "Type": { + "$id": "4102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4103", + "Name": "step_id", + "NameInRequest": "step_id", + "Description": "The ID of the run step to retrieve.", + "Type": { + "$id": "4104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4105", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4106" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "3998" + } + ], + "Decorators": [] + }, + { + "$id": "4107", + "Name": "VectorStores", + "Operations": [ + { + "$id": "4108", + "Name": "listVectorStores", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector-stores.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4109", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "4110", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4111", + "Type": { + "$id": "4112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4113", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4114", + "kind": "constant", + "valueType": { + "$id": "4115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4116", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4117", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4118", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "55" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4119", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4121", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4123", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1135" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", + "Decorators": [] + }, + { + "$id": "4124", + "Name": "createVectorStore", + "ResourceName": "VectorStores", + "Summary": "Creates a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4125", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4126", + "kind": "constant", + "valueType": { + "$id": "4127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4128", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4129", + "kind": "constant", + "valueType": { + "$id": "4130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4131", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1190" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4132", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", + "Decorators": [] + }, + { + "$id": "4133", + "Name": "getVectorStore", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4134", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4135", + "kind": "constant", + "valueType": { + "$id": "4136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4137", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to retrieve.", + "Type": { + "$id": "4138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4139", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", + "Decorators": [] + }, + { + "$id": "4140", + "Name": "modifyVectorStore", + "ResourceName": "VectorStores", + "Summary": "Modifies a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4141", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4142", + "kind": "constant", + "valueType": { + "$id": "4143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4144", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to modify.", + "Type": { + "$id": "4145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4146", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4147", + "kind": "constant", + "valueType": { + "$id": "4148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4149", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1222" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4150", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", + "Decorators": [] + }, + { + "$id": "4151", + "Name": "deleteVectorStore", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4152", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4153", + "kind": "constant", + "valueType": { + "$id": "4154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4155", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to delete.", + "Type": { + "$id": "4156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4157", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1233" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", + "Decorators": [] + }, + { + "$id": "4158", + "Name": "listVectorStoreFiles", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4159", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4160", + "kind": "constant", + "valueType": { + "$id": "4161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4162", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the files belong to.", + "Type": { + "$id": "4163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4164", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4165", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4166", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "81" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4167", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4169", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4171", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4172", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1240" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", + "Decorators": [] + }, + { + "$id": "4173", + "Name": "createVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4174", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4175", + "kind": "constant", + "valueType": { + "$id": "4176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4177", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a File.", + "Type": { + "$id": "4178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4179", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4180", + "kind": "constant", + "valueType": { + "$id": "4181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4182", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1289" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4183", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1245" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", + "Decorators": [] + }, + { + "$id": "4184", + "Name": "getVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4185", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4186", + "kind": "constant", + "valueType": { + "$id": "4187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4188", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "4189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4190", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file being retrieved.", + "Type": { + "$id": "4191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4192", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1245" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", + "Decorators": [] + }, + { + "$id": "4193", + "Name": "deleteVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4194", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4195", + "kind": "constant", + "valueType": { + "$id": "4196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4197", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "4198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4199", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to delete.", + "Type": { + "$id": "4200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4201", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1294" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", + "Decorators": [] + }, + { + "$id": "4202", + "Name": "createVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4203", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4204", + "kind": "constant", + "valueType": { + "$id": "4205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4206", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a file batch.", + "Type": { + "$id": "4207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4208", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4209", + "kind": "constant", + "valueType": { + "$id": "4210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4211", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1301" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4212", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1307" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "4213", + "Name": "getVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4214", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4215", + "kind": "constant", + "valueType": { + "$id": "4216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4217", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "4218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4219", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch being retrieved.", + "Type": { + "$id": "4220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4221", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1307" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "4222", + "Name": "cancelVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4223", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4224", + "kind": "constant", + "valueType": { + "$id": "4225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4226", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "4227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4228", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch to cancel.", + "Type": { + "$id": "4229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4230", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1307" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "4231", + "Name": "listFilesInVectorStoreBatch", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files in a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4109" + }, + { + "$id": "4232", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4233", + "kind": "constant", + "valueType": { + "$id": "4234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4235", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "4236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4237", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch that the files belong to.", + "Type": { + "$id": "4238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4239", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4240", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4241", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "137" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4242", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4244", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4246", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4247", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1240" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4248" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4109" + } + ], + "Decorators": [] + }, + { + "$id": "4249", + "Name": "Uploads", + "Operations": [ + { + "$id": "4250", + "Name": "createUpload", + "ResourceName": "Uploads", + "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4251", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "4252", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4253", + "Type": { + "$id": "4254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4255", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4256", + "kind": "constant", + "valueType": { + "$id": "4257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4258", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4259", + "kind": "constant", + "valueType": { + "$id": "4260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4261", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1058" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4262", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1066" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", + "Decorators": [] + }, + { + "$id": "4263", + "Name": "addUploadPart", + "ResourceName": "Uploads", + "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4251" + }, + { + "$id": "4264", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4265", + "kind": "constant", + "valueType": { + "$id": "4266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4267", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4268", + "kind": "constant", + "valueType": { + "$id": "4269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4270", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "4271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4272", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1116" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4273", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1119" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/parts", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", + "Decorators": [] + }, + { + "$id": "4274", + "Name": "completeUpload", + "ResourceName": "Uploads", + "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4251" + }, + { + "$id": "4275", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4276", + "kind": "constant", + "valueType": { + "$id": "4277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4278", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "4279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4280", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4281", + "kind": "constant", + "valueType": { + "$id": "4282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4283", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1129" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4284", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1066" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/complete", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", + "Decorators": [] + }, + { + "$id": "4285", + "Name": "cancelUpload", + "ResourceName": "Uploads", + "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4251" + }, + { + "$id": "4286", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4287", + "kind": "constant", + "valueType": { + "$id": "4288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4289", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "4290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4291", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1066" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4292" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4251" + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "4293", + "ApiKey": { + "$id": "4294", + "Name": "Authorization", + "Prefix": "Bearer" + } + } +} diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index d67f64f1c..bfc7cc62a 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -5292,7 +5292,6 @@ components: file: type: string format: binary - description: The File object (not file name) to be uploaded. purpose: type: string enum: @@ -5478,14 +5477,12 @@ components: image: type: string format: binary - description: The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. prompt: type: string description: A text description of the desired image(s). The maximum length is 1000 characters. mask: type: string format: binary - description: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. model: anyOf: - type: string @@ -6239,8 +6236,6 @@ components: file: type: string format: binary - description: 'The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.' - x-oaiTypeLabel: file model: anyOf: - type: string @@ -6334,8 +6329,6 @@ components: file: type: string format: binary - description: 'The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.' - x-oaiTypeLabel: file model: anyOf: - type: string diff --git a/.typespec/audio/models.tsp b/.typespec/audio/models.tsp index 46d50d08a..4feecedb6 100644 --- a/.typespec/audio/models.tsp +++ b/.typespec/audio/models.tsp @@ -40,7 +40,6 @@ model CreateTranscriptionRequest { // Tool customization: binary payloads are encoded bytes /** The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. */ @extension("x-oaiTypeLabel", "file") - @encode("binary") file: bytes; @doc(""" @@ -76,7 +75,6 @@ model CreateTranslationRequest { // Tool customization: binary payloads are encoded bytes /** The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. */ @extension("x-oaiTypeLabel", "file") - @encode("binary") file: bytes; @doc(""" diff --git a/.typespec/audio/operations.tsp b/.typespec/audio/operations.tsp index ff55e6c17..8dd221ec0 100644 --- a/.typespec/audio/operations.tsp +++ b/.typespec/audio/operations.tsp @@ -23,7 +23,7 @@ interface Audio { /** chunked */ @header("Transfer-Encoding") transferEncoding?: string; @header contentType: "application/octet-stream"; - @body @encode("binary") responseBody: bytes; + @body responseBody: bytes; }; @route("transcriptions") diff --git a/.typespec/files/models.tsp b/.typespec/files/models.tsp index ba684dd3a..69de3927d 100644 --- a/.typespec/files/models.tsp +++ b/.typespec/files/models.tsp @@ -10,7 +10,6 @@ namespace OpenAI; model CreateFileRequest { // Tool customization: binary payloads are encoded bytes /** The File object (not file name) to be uploaded. */ - @encode("binary") file: bytes; /** diff --git a/.typespec/images/models.tsp b/.typespec/images/models.tsp index 6121f821f..8649231c6 100644 --- a/.typespec/images/models.tsp +++ b/.typespec/images/models.tsp @@ -57,7 +57,6 @@ model CreateImageRequest { model CreateImageEditRequest { // Tool customization: binary payloads are encoded bytes /** The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. */ - @encode("binary") image: bytes; /** A text description of the desired image(s). The maximum length is 1000 characters. */ @@ -67,7 +66,6 @@ model CreateImageEditRequest { @doc(""" An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. """) - @encode("binary") mask?: bytes; @doc(""" diff --git a/.typespec/tspconfig.yaml b/.typespec/tspconfig.yaml index 59c3efcfd..3a544fed6 100644 --- a/.typespec/tspconfig.yaml +++ b/.typespec/tspconfig.yaml @@ -1,12 +1,13 @@ emit: - "@typespec/openapi3" - - "@azure-tools/typespec-csharp" + - "@typespec/http-client-csharp" options: "@typespec/openapi3": output-file: "{project-root}/../.openapi3/openapi3-openai.yaml" - "@azure-tools/typespec-csharp": - emitter-output-dir: "{project-root}/../.dotnet/src" + "@typespec/http-client-csharp": + emitter-output-dir: "{project-root}/../.dotnet" unreferenced-types-handling: keepAll disable-xml-docs: true enable-internal-raw-data: true + save-inputs: true generate-model-factory: false diff --git a/package-lock.json b/package-lock.json index 504914b95..f566255b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,9 @@ "name": "openai-tsp", "version": "0.1.0", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240904.1", - "@azure-tools/typespec-csharp": "0.2.0-beta.20240904.1", - "@typespec/openapi3": "^0.60.0" + "@typespec/http-client-csharp": "0.1.9-alpha.20240923.1", + "@typespec/openapi3": "^0.60.0", + "openai-tsp": "file:" } }, "node_modules/@apidevtools/swagger-methods": { @@ -18,30 +18,6 @@ "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" }, - "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240904.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240904.1.tgz", - "integrity": "sha512-fS5W+dQS0hMR/ubLN7L5VL834LzAJh26LkJSb4BLy2cWargem9T8xZf5GEwTKfVWosX7JC1sd/k5nX2z2Do+fg==" - }, - "node_modules/@azure-tools/typespec-autorest": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.46.0.tgz", - "integrity": "sha512-LCIvxQgjczWUq/wi6fzKBqYHWJYD0hRLA8wBPzFasriHdBDHjpZ6vgTPmApzt0H5ArZX92Ar53Q5+ZXD9ktMUg==", - "peer": true, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.46.0", - "@azure-tools/typespec-azure-resource-manager": "~0.46.0", - "@azure-tools/typespec-client-generator-core": "~0.46.0", - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/openapi": "~0.60.0", - "@typespec/rest": "~0.60.0", - "@typespec/versioning": "~0.60.0" - } - }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.46.0", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.46.0.tgz", @@ -56,42 +32,6 @@ "@typespec/rest": "~0.60.0" } }, - "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.46.0.tgz", - "integrity": "sha512-ileS/0OMp0pmtWU3k0g2ZGfA957nOiEHtFJzAILsYYBFeBWgWuEuCPcKaGYScvlYTTK4Pyplpb7u00RBZBBObQ==", - "peer": true, - "dependencies": { - "change-case": "~5.4.4", - "pluralize": "^8.0.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.46.0", - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/openapi": "~0.60.0", - "@typespec/rest": "~0.60.0", - "@typespec/versioning": "~0.60.0" - } - }, - "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.46.0.tgz", - "integrity": "sha512-HssO+0ARHbnuLhRiT/7l5DF2hV91Jf/MmsSPdOsDMbVZG26YsB8JD1MiBqs9VJZjB+1xn2DiimYrgqF4n9aDvw==", - "peer": true, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.46.0", - "@azure-tools/typespec-azure-resource-manager": "~0.46.0", - "@azure-tools/typespec-client-generator-core": "~0.46.0", - "@typespec/compiler": "~0.60.0" - } - }, "node_modules/@azure-tools/typespec-client-generator-core": { "version": "0.46.0", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.0.tgz", @@ -113,29 +53,6 @@ "@typespec/versioning": "~0.60.0" } }, - "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240904.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240904.1.tgz", - "integrity": "sha512-l2v37Cds7kahSpVBaaC26CDlxgTl6Pye8U78zYFmppVc20644BhR+To74oKkxdExr/uBYhXlq9KDjxXRUCU8Xg==", - "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240904.1", - "@typespec/http-client-csharp": "0.1.9-alpha.20240902.1", - "json-serialize-refs": "0.1.0-0" - }, - "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.42.1 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", - "@typespec/compiler": ">=0.50.0 <1.0.0", - "@typespec/http": ">=0.50.0 <1.0.0", - "@typespec/openapi": ">=0.50.0 <1.0.0", - "@typespec/rest": ">=0.50.0 <1.0.0", - "@typespec/versioning": ">=0.50.0 <1.0.0", - "@typespec/xml": ">=0.50.0 <1.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -412,9 +329,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240902.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240902.1.tgz", - "integrity": "sha512-aXHD3TBZQ4g4x6QokqT8Fq6ty1mnqyI7MBBd8pDnta0XOTWy1ueqLIbzFFuy0Rtl5G7UOEjocaa1AwQJHuujZw==", + "version": "0.1.9-alpha.20240923.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240923.1.tgz", + "integrity": "sha512-9px9+z/S1h+Hw8y/sYgOXcx5uI2cr9SngC2yGEabfBt4QSYaOXODwxRQCJW0Gkezai+On9HxUGVfVu1hK3HYPw==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -487,18 +404,6 @@ "@typespec/compiler": "~0.60.0" } }, - "node_modules/@typespec/xml": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.60.0.tgz", - "integrity": "sha512-Cr1Vih4ovB1OKHJNrXf23Bq4IiVNGlf7F6kN5Yfc7UDqxy+hiCfuwXfjlu3ida/bYTalGPd4/KL9EAx+m41Bxw==", - "peer": true, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.60.0" - } - }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -889,6 +794,10 @@ "mustache": "bin/mustache" } }, + "node_modules/openai-tsp": { + "resolved": "", + "link": true + }, "node_modules/openapi-types": { "version": "12.1.3", "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", diff --git a/package.json b/package.json index c4d7ea98b..584e4b84a 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "type": "module", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240904.1", - "@azure-tools/typespec-csharp": "0.2.0-beta.20240904.1", - "@typespec/openapi3": "^0.60.0" + "@typespec/http-client-csharp": "0.1.9-alpha.20240923.1", + "@typespec/openapi3": "^0.60.0", + "openai-tsp": "file:" }, "private": true } From 4a27cdc228872a34b310815e8ddd84fad9a78669 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 1 Oct 2024 10:19:30 -0700 Subject: [PATCH 02/54] update --- .dotnet/src/Custom/Chat/ChatFunctionChoice.cs | 2 +- .dotnet/tspCodeModel.json | 8 ++--- package-lock.json | 34 +++++++++---------- package.json | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.dotnet/src/Custom/Chat/ChatFunctionChoice.cs b/.dotnet/src/Custom/Chat/ChatFunctionChoice.cs index 1439f88aa..c964234c8 100644 --- a/.dotnet/src/Custom/Chat/ChatFunctionChoice.cs +++ b/.dotnet/src/Custom/Chat/ChatFunctionChoice.cs @@ -43,7 +43,7 @@ internal ChatFunctionChoice(string functionName, IDictionary _function = new(functionName); _isPlainString = false; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; } // CUSTOM: Added custom public constructor to handle the object representation. diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index 85ce5e49c..c8d9f6831 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -12739,7 +12739,7 @@ "decorators": [], "additionalProperties": { "$id": "1381", - "kind": "any", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -13914,7 +13914,7 @@ "decorators": [], "additionalProperties": { "$id": "1511", - "kind": "any", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -29285,7 +29285,7 @@ }, "valueType": { "$id": "3146", - "kind": "any", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -32804,7 +32804,7 @@ }, "valueType": { "$id": "3491", - "kind": "any", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] diff --git a/package-lock.json b/package-lock.json index f566255b4..f98567fbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "openai-tsp", "version": "0.1.0", "dependencies": { - "@typespec/http-client-csharp": "0.1.9-alpha.20240923.1", + "@typespec/http-client-csharp": "latest", "@typespec/openapi3": "^0.60.0", "openai-tsp": "file:" } @@ -33,9 +33,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.0.tgz", - "integrity": "sha512-Ss0dNcOeTyc9CBsNFV6OToLV7OOKidAfeewmKePtY2qAHW+CqWZnVvUHunpFt2jFs6CqjFpgU9g+1wPbLCFj9A==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.2.tgz", + "integrity": "sha512-/HKeehCNDeylouOHMe7IwpcDcGJHRAuEy3a5FBnSY51m4EpMq4VMQzW9tka/8brFO2m5LLj7tyhOL/xnzi2fLg==", "peer": true, "dependencies": { "change-case": "~5.4.4", @@ -288,9 +288,9 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@typespec/compiler": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.0.tgz", - "integrity": "sha512-qAS99tJv6RvxSescfxRVal4QWSfdf3BzIOgE8+Az6emL68aTE/W8zQ0Ijpgmhax7sC2AnLTxCK1tM9kj1YguRw==", + "version": "0.60.1", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.1.tgz", + "integrity": "sha512-I6Vcpvd7mBP7SI5vCBh9rZGXAtVy95BKhAd33Enw32psswiSzRpA7zdyZhOMekTOGVXNS/+E5l2PGGCzQddB4w==", "peer": true, "dependencies": { "@babel/code-frame": "~7.24.7", @@ -329,20 +329,20 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240923.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240923.1.tgz", - "integrity": "sha512-9px9+z/S1h+Hw8y/sYgOXcx5uI2cr9SngC2yGEabfBt4QSYaOXODwxRQCJW0Gkezai+On9HxUGVfVu1hK3HYPw==", + "version": "0.1.9-alpha.20240925.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240925.2.tgz", + "integrity": "sha512-36OfvNFDzDs2895KNTWrWR9fYj2TAIVuM1BzKUuRMVb3UE9RAx3XQ1+DZOtT51ROaKpRBcHDkMJqyyh7jmepbQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", - "@typespec/compiler": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/http": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/openapi": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/rest": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/versioning": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0" + "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0" } }, "node_modules/@typespec/openapi": { diff --git a/package.json b/package.json index 584e4b84a..b0edbcbce 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "type": "module", "dependencies": { - "@typespec/http-client-csharp": "0.1.9-alpha.20240923.1", + "@typespec/http-client-csharp": "latest", "@typespec/openapi3": "^0.60.0", "openai-tsp": "file:" }, From c4e3ef09d29f7f6b267919c648ff65a0cf785aa9 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 2 Oct 2024 11:43:39 -0700 Subject: [PATCH 03/54] regen --- .dotnet/src/Custom/Batch/BatchClient.cs | 4 +- .../src/Custom/Files/FileClient.Protocol.cs | 12 +- .../Generated/AssistantClient.RestClient.cs | 12 +- .dotnet/src/Generated/AssistantClient.cs | 67 --- .../src/Generated/BatchClient.RestClient.cs | 8 +- .dotnet/src/Generated/BatchClient.cs | 52 -- .../src/Generated/FileClient.RestClient.cs | 12 +- .../Generated/FineTuningClient.RestClient.cs | 16 +- .dotnet/src/Generated/FineTuningClient.cs | 48 +- .../Internal/ClientPipelineExtensions.cs | 26 - ...ternalAssistantMessageClient.RestClient.cs | 26 +- .../InternalAssistantMessageClient.cs | 98 +--- .../InternalAssistantRunClient.RestClient.cs | 46 +- .../Generated/InternalAssistantRunClient.cs | 186 +------ ...nternalAssistantThreadClient.RestClient.cs | 12 +- .../InternalAssistantThreadClient.cs | 68 --- .../InternalUploadsClient.RestClient.cs | 12 +- .../src/Generated/InternalUploadsClient.cs | 60 +-- .../Models/Assistant.Serialization.cs | 61 +-- .dotnet/src/Generated/Models/Assistant.cs | 10 +- .../AssistantChatMessage.Serialization.cs | 54 +- .../Generated/Models/AssistantChatMessage.cs | 5 +- .../AssistantCreationOptions.Serialization.cs | 142 +++-- .../Models/AssistantCreationOptions.cs | 9 +- .../AssistantDeletionResult.Serialization.cs | 20 +- .../Models/AssistantDeletionResult.cs | 9 +- ...istantModificationOptions.Serialization.cs | 150 +++--- .../Models/AssistantModificationOptions.cs | 11 +- .../AssistantResponseFormat.Serialization.cs | 42 +- .../Models/AssistantThread.Serialization.cs | 44 +- .../src/Generated/Models/AssistantThread.cs | 9 +- .../AudioTranscription.Serialization.cs | 29 +- .../Generated/Models/AudioTranscription.cs | 7 +- ...AudioTranscriptionOptions.Serialization.cs | 51 +- .../Models/AudioTranscriptionOptions.cs | 5 +- .../Models/AudioTranslation.Serialization.cs | 26 +- .../src/Generated/Models/AudioTranslation.cs | 7 +- .../AudioTranslationOptions.Serialization.cs | 24 +- .../Models/AudioTranslationOptions.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 74 +-- .../src/Generated/Models/ChatCompletion.cs | 15 +- .../ChatCompletionOptions.Serialization.cs | 494 ++++++++---------- .../Generated/Models/ChatCompletionOptions.cs | 32 +- .../Models/ChatFunction.Serialization.cs | 36 +- .dotnet/src/Generated/Models/ChatFunction.cs | 8 +- .../Models/ChatFunctionCall.Serialization.cs | 20 +- .../src/Generated/Models/ChatFunctionCall.cs | 6 +- .../ChatFunctionChoice.Serialization.cs | 31 +- .../Models/ChatMessage.Serialization.cs | 9 +- .dotnet/src/Generated/Models/ChatMessage.cs | 4 +- .../ChatMessageContentPart.Serialization.cs | 31 +- ...atOutputTokenUsageDetails.Serialization.cs | 14 +- .../Models/ChatOutputTokenUsageDetails.cs | 4 +- .../ChatResponseFormat.Serialization.cs | 7 - ...okenLogProbabilityDetails.Serialization.cs | 29 +- .../Models/ChatTokenLogProbabilityDetails.cs | 16 +- ...nTopLogProbabilityDetails.Serialization.cs | 21 +- .../ChatTokenTopLogProbabilityDetails.cs | 13 +- .../Models/ChatTokenUsage.Serialization.cs | 29 +- .../src/Generated/Models/ChatTokenUsage.cs | 18 +- .../Models/ChatTool.Serialization.cs | 16 +- .dotnet/src/Generated/Models/ChatTool.cs | 12 +- .../Models/ChatToolCall.Serialization.cs | 16 +- .dotnet/src/Generated/Models/ChatToolCall.cs | 15 +- .../Models/ChatToolChoice.Serialization.cs | 31 +- ...InterpreterToolDefinition.Serialization.cs | 7 - ...eInterpreterToolResources.Serialization.cs | 39 +- .../Models/CodeInterpreterToolResources.cs | 3 +- .../Models/Embedding.Serialization.cs | 25 +- .dotnet/src/Generated/Models/Embedding.cs | 11 + .../EmbeddingCollection.Serialization.cs | 71 +-- .../Generated/Models/EmbeddingCollection.cs | 10 +- ...mbeddingGenerationOptions.Serialization.cs | 60 +-- .../Models/EmbeddingGenerationOptions.cs | 7 +- .../EmbeddingTokenUsage.Serialization.cs | 16 +- .../Generated/Models/EmbeddingTokenUsage.cs | 8 +- .../FileDeletionResult.Serialization.cs | 26 +- .../Generated/Models/FileDeletionResult.cs | 11 +- ...ileFromStoreRemovalResult.Serialization.cs | 18 +- .../Models/FileFromStoreRemovalResult.cs | 13 +- .../FileSearchRankingOptions.Serialization.cs | 10 +- .../Models/FileSearchRankingOptions.cs | 3 +- .../FileSearchToolDefinition.Serialization.cs | 7 - .../FileSearchToolResources.Serialization.cs | 14 +- .../Models/FileSearchToolResources.cs | 4 +- ...ningIntegrationWandbWandb.Serialization.cs | 2 +- .../Models/FineTuningJob.Serialization.cs | 4 +- ...eTuningJobHyperparameters.Serialization.cs | 51 +- .../Models/FineTuningJobHyperparameters.cs | 10 +- .../Models/FineTuningOptions.Serialization.cs | 2 +- .../FunctionChatMessage.Serialization.cs | 19 +- .../Generated/Models/FunctionChatMessage.cs | 4 +- .../FunctionToolDefinition.Serialization.cs | 7 - .../Models/GeneratedImage.Serialization.cs | 40 +- .../src/Generated/Models/GeneratedImage.cs | 6 +- .../GeneratedImageCollection.Serialization.cs | 57 +- .../Models/GeneratedImageCollection.cs | 4 +- .../Models/ImageEditOptions.Serialization.cs | 114 +--- .../src/Generated/Models/ImageEditOptions.cs | 9 +- .../ImageGenerationOptions.Serialization.cs | 72 +-- .../Models/ImageGenerationOptions.cs | 7 +- .../ImageVariationOptions.Serialization.cs | 100 +--- .../Generated/Models/ImageVariationOptions.cs | 9 +- ...ToolsFileSearchFileSearch.Serialization.cs | 26 +- ...ernalAssistantToolsFileSearchFileSearch.cs | 4 +- .../InternalBatchErrors.Serialization.cs | 2 +- ...eContentPartImageImageUrl.Serialization.cs | 18 +- ...nRequestMessageContentPartImageImageUrl.cs | 4 +- ...CompletionResponseMessage.Serialization.cs | 120 +---- .../InternalChatCompletionResponseMessage.cs | 10 +- ...letionStreamResponseDelta.Serialization.cs | 137 +---- ...ternalChatCompletionStreamResponseDelta.cs | 6 +- ...tResponseFormatJsonObject.Serialization.cs | 7 - ...tResponseFormatJsonSchema.Serialization.cs | 7 - ...nalChatResponseFormatText.Serialization.cs | 7 - ...rnalCompleteUploadRequest.Serialization.cs | 2 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...ompletionFunctionResponse.Serialization.cs | 2 +- ...ionResponseChoiceLogprobs.Serialization.cs | 4 +- ...etionStreamResponseChoice.Serialization.cs | 71 +-- ...reateChatCompletionStreamResponseChoice.cs | 8 +- ...eamResponseChoiceLogprobs.Serialization.cs | 4 +- ...lCreateCompletionResponse.Serialization.cs | 2 +- ...ionResponseChoiceLogprobs.Serialization.cs | 8 +- ...uestWandbIntegrationWandb.Serialization.cs | 20 +- ...neTuningJobRequestWandbIntegrationWandb.cs | 6 +- ...CreateThreadAndRunRequest.Serialization.cs | 112 +--- .../InternalCreateThreadAndRunRequest.cs | 6 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...ctorStoreFileBatchRequest.Serialization.cs | 2 +- ...ateVectorStoreFileRequest.Serialization.cs | 14 +- .../InternalCreateVectorStoreFileRequest.cs | 2 +- ...InternalFileUploadOptions.Serialization.cs | 18 +- .../Models/InternalFileUploadOptions.cs | 13 +- ...onRequestAssistantMessage.Serialization.cs | 27 +- ...neChatCompletionRequestAssistantMessage.cs | 4 +- ...lFinetuneChatRequestInput.Serialization.cs | 6 +- ...nalListAssistantsResponse.Serialization.cs | 2 +- ...ternalListBatchesResponse.Serialization.cs | 2 +- ...ingJobCheckpointsResponse.Serialization.cs | 2 +- ...neTuningJobEventsResponse.Serialization.cs | 2 +- ...ernalListMessagesResponse.Serialization.cs | 2 +- ...tedFineTuningJobsResponse.Serialization.cs | 2 +- ...ernalListRunStepsResponse.Serialization.cs | 2 +- .../InternalListRunsResponse.Serialization.cs | 2 +- ...ternalListThreadsResponse.Serialization.cs | 2 +- ...tVectorStoreFilesResponse.Serialization.cs | 2 +- ...lListVectorStoresResponse.Serialization.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 11 +- ...nalMessageContentImageUrlObjectImageUrl.cs | 2 +- ...ntItemFileObjectImageFile.Serialization.cs | 11 +- ...alMessageContentItemFileObjectImageFile.cs | 2 +- ...sageContentTextObjectText.Serialization.cs | 2 +- ...tImageFileObjectImageFile.Serialization.cs | 11 +- ...ageDeltaContentImageFileObjectImageFile.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 11 +- ...ssageDeltaContentImageUrlObjectImageUrl.cs | 2 +- ...eltaContentTextObjectText.Serialization.cs | 2 +- ...alMessageDeltaObjectDelta.Serialization.cs | 32 +- .../Models/InternalMessageDeltaObjectDelta.cs | 4 +- ...alMessageImageFileContent.Serialization.cs | 7 - ...nalMessageImageUrlContent.Serialization.cs | 7 - ...alMessageObjectAttachment.Serialization.cs | 2 +- ...rnalMessageRefusalContent.Serialization.cs | 15 +- .../Models/InternalMessageRefusalContent.cs | 10 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 15 +- .../InternalRequestMessageTextContent.cs | 10 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 25 +- ...ernalResponseFormatJsonSchemaJsonSchema.cs | 4 +- ...esponseMessageTextContent.Serialization.cs | 7 - ...edActionSubmitToolOutputs.Serialization.cs | 2 +- ...pCodeInterpreterLogOutput.Serialization.cs | 8 +- ...InternalRunStepCodeInterpreterLogOutput.cs | 8 +- ...CodeObjectCodeInterpreter.Serialization.cs | 2 +- ...CallsCodeOutputLogsObject.Serialization.cs | 15 +- ...tepDetailsToolCallsCodeOutputLogsObject.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...CodeObjectCodeInterpreter.Serialization.cs | 2 +- ...ileSearchObjectFileSearch.Serialization.cs | 35 +- ...ailsToolCallsFileSearchObjectFileSearch.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 10 +- .../InternalRunStepDetailsToolCallsObject.cs | 8 +- ...bmitToolOutputsRunRequest.Serialization.cs | 2 +- ...lResourcesCodeInterpreter.Serialization.cs | 2 +- ...ctToolResourcesFileSearch.Serialization.cs | 2 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 2 +- ...wnAssistantResponseFormat.Serialization.cs | 4 +- ...nternalUnknownChatMessage.Serialization.cs | 11 +- .../Models/InternalUnknownChatMessage.cs | 2 +- ...UnknownChatResponseFormat.Serialization.cs | 7 - .../Models/MessageContent.Serialization.cs | 31 +- ...MessageCreationAttachment.Serialization.cs | 29 +- .../Models/MessageCreationAttachment.cs | 4 +- .../MessageCreationOptions.Serialization.cs | 56 +- .../Models/MessageCreationOptions.cs | 6 +- .../MessageDeletionResult.Serialization.cs | 20 +- .../Generated/Models/MessageDeletionResult.cs | 9 +- .../ModelDeletionResult.Serialization.cs | 20 +- .../Generated/Models/ModelDeletionResult.cs | 9 +- .../ModerationCollection.Serialization.cs | 61 +-- .../Generated/Models/ModerationCollection.cs | 9 +- .../Models/ModerationOptions.Serialization.cs | 33 +- .../src/Generated/Models/ModerationOptions.cs | 4 +- .../Models/OpenAIFileInfo.Serialization.cs | 59 +-- .../src/Generated/Models/OpenAIFileInfo.cs | 12 +- .../OpenAIFileInfoCollection.Serialization.cs | 57 +- .../Models/OpenAIFileInfoCollection.cs | 4 +- .../Models/OpenAIModelInfo.Serialization.cs | 24 +- .../src/Generated/Models/OpenAIModelInfo.cs | 9 +- ...OpenAIModelInfoCollection.Serialization.cs | 57 +- .../Models/OpenAIModelInfoCollection.cs | 4 +- .../RunCreationOptions.Serialization.cs | 359 ++++--------- .../Generated/Models/RunCreationOptions.cs | 23 +- .../Generated/Models/RunStep.Serialization.cs | 36 +- .dotnet/src/Generated/Models/RunStep.cs | 11 +- .../RunStepFileSearchResult.Serialization.cs | 6 +- .../Models/RunStepFileSearchResult.cs | 2 +- .../SpeechGenerationOptions.Serialization.cs | 52 +- .../Models/SpeechGenerationOptions.cs | 6 +- ...amingChatCompletionUpdate.Serialization.cs | 103 ++-- .../Models/StreamingChatCompletionUpdate.cs | 15 +- ...ingChatFunctionCallUpdate.Serialization.cs | 36 +- .../Models/StreamingChatFunctionCallUpdate.cs | 6 +- ...reamingChatToolCallUpdate.Serialization.cs | 21 +- .../Models/StreamingChatToolCallUpdate.cs | 4 +- .../Models/SystemChatMessage.Serialization.cs | 26 +- .../src/Generated/Models/SystemChatMessage.cs | 6 +- .../ThreadCreationOptions.Serialization.cs | 87 ++- .../Generated/Models/ThreadCreationOptions.cs | 8 +- .../ThreadDeletionResult.Serialization.cs | 20 +- .../Generated/Models/ThreadDeletionResult.cs | 9 +- .../Models/ThreadMessage.Serialization.cs | 69 +-- .dotnet/src/Generated/Models/ThreadMessage.cs | 13 +- ...ThreadModificationOptions.Serialization.cs | 47 +- .../Models/ThreadModificationOptions.cs | 4 +- .../Models/ThreadRun.Serialization.cs | 123 ++--- .dotnet/src/Generated/Models/ThreadRun.cs | 17 +- .../Models/ToolChatMessage.Serialization.cs | 11 +- .../src/Generated/Models/ToolChatMessage.cs | 4 +- .../Models/ToolConstraint.Serialization.cs | 54 +- .../Models/ToolDefinition.Serialization.cs | 7 - .../Models/ToolResources.Serialization.cs | 34 +- .dotnet/src/Generated/Models/ToolResources.cs | 4 +- .../TranscribedSegment.Serialization.cs | 88 ++-- .../Generated/Models/TranscribedSegment.cs | 28 +- .../Models/TranscribedWord.Serialization.cs | 14 +- .../src/Generated/Models/TranscribedWord.cs | 12 +- ...wnAssistantToolDefinition.Serialization.cs | 7 - .../Models/UserChatMessage.Serialization.cs | 26 +- .../src/Generated/Models/UserChatMessage.cs | 6 +- .../Models/VectorStore.Serialization.cs | 51 +- .dotnet/src/Generated/Models/VectorStore.cs | 9 +- .../VectorStoreBatchFileJob.Serialization.cs | 21 +- .../Models/VectorStoreBatchFileJob.cs | 10 +- ...VectorStoreCreationHelper.Serialization.cs | 43 +- .../Models/VectorStoreCreationHelper.cs | 5 +- ...ectorStoreCreationOptions.Serialization.cs | 75 ++- .../Models/VectorStoreCreationOptions.cs | 6 +- ...VectorStoreDeletionResult.Serialization.cs | 20 +- .../Models/VectorStoreDeletionResult.cs | 9 +- ...ctorStoreExpirationPolicy.Serialization.cs | 18 +- .../Models/VectorStoreExpirationPolicy.cs | 5 + ...ectorStoreFileAssociation.Serialization.cs | 68 ++- .../Models/VectorStoreFileAssociation.cs | 15 +- ...rStoreModificationOptions.Serialization.cs | 47 +- .../Models/VectorStoreModificationOptions.cs | 4 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 479 +++++++---------- .../Generated/VectorStoreClient.RestClient.cs | 54 +- .dotnet/src/Generated/VectorStoreClient.cs | 122 +---- 272 files changed, 2323 insertions(+), 5061 deletions(-) diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index a36e28474..259264c38 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -14,8 +14,8 @@ namespace OpenAI.Batch; [Experimental("OPENAI001")] [CodeGenClient("Batches")] [CodeGenSuppress("BatchClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IReadOnlyDictionary))] -[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IReadOnlyDictionary))] +[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] +[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] [CodeGenSuppress("RetrieveBatch", typeof(string))] [CodeGenSuppress("RetrieveBatchAsync", typeof(string))] [CodeGenSuppress("CancelBatch", typeof(string))] diff --git a/.dotnet/src/Custom/Files/FileClient.Protocol.cs b/.dotnet/src/Custom/Files/FileClient.Protocol.cs index 54f2d342b..60782b490 100644 --- a/.dotnet/src/Custom/Files/FileClient.Protocol.cs +++ b/.dotnet/src/Custom/Files/FileClient.Protocol.cs @@ -248,7 +248,7 @@ public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions o /// The ID of the upload. /// The content to send as the body of the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. @@ -265,7 +265,7 @@ public virtual async Task AddUploadPartAsync(string uploadId, Bina /// The ID of the upload. /// The content to send as the body of the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. @@ -281,7 +281,7 @@ public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content /// The ID of the upload. /// The content to send as the body of the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. @@ -297,7 +297,7 @@ public virtual async Task CompleteUploadAsync(string uploadId, Bin /// The ID of the upload. /// The content to send as the body of the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. @@ -312,7 +312,7 @@ public virtual ClientResult CompleteUpload(string uploadId, BinaryContent conten /// /// The ID of the upload. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. @@ -327,7 +327,7 @@ public virtual async Task CancelUploadAsync(string uploadId, Reque /// /// The ID of the upload. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. diff --git a/.dotnet/src/Generated/AssistantClient.RestClient.cs b/.dotnet/src/Generated/AssistantClient.RestClient.cs index ad8a4aec9..3605f5103 100644 --- a/.dotnet/src/Generated/AssistantClient.RestClient.cs +++ b/.dotnet/src/Generated/AssistantClient.RestClient.cs @@ -69,7 +69,7 @@ internal PipelineMessage CreateListAssistantsRequest(int? limit, string order, s return message; } - internal PipelineMessage CreateGetAssistantRequest(string assistant_id, RequestOptions options) + internal PipelineMessage CreateGetAssistantRequest(string assistantId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -78,14 +78,14 @@ internal PipelineMessage CreateGetAssistantRequest(string assistant_id, RequestO ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistant_id, true); + uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateModifyAssistantRequest(string assistant_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateModifyAssistantRequest(string assistantId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -94,7 +94,7 @@ internal PipelineMessage CreateModifyAssistantRequest(string assistant_id, Binar ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistant_id, true); + uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -103,7 +103,7 @@ internal PipelineMessage CreateModifyAssistantRequest(string assistant_id, Binar return message; } - internal PipelineMessage CreateDeleteAssistantRequest(string assistant_id, RequestOptions options) + internal PipelineMessage CreateDeleteAssistantRequest(string assistantId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -112,7 +112,7 @@ internal PipelineMessage CreateDeleteAssistantRequest(string assistant_id, Reque ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistant_id, true); + uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index 73d04ec25..a967b2221 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -6,7 +6,6 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; -using OpenAI; namespace OpenAI.Assistants { @@ -23,22 +22,6 @@ protected AssistantClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateAssistant(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateAssistantRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CreateAssistantAsync(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateAssistantRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - public virtual ClientResult ListAssistants(int? limit, string order, string after, string before, RequestOptions options) { using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); @@ -62,55 +45,5 @@ public virtual async Task> ListAssi ClientResult result = await ListAssistantsAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListAssistantsResponse)result, result.GetRawResponse()); } - - public virtual ClientResult GetAssistant(string assistant_id, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - - using PipelineMessage message = CreateGetAssistantRequest(assistant_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetAssistantAsync(string assistant_id, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - - using PipelineMessage message = CreateGetAssistantRequest(assistant_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ModifyAssistant(string assistant_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyAssistantRequest(assistant_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ModifyAssistantAsync(string assistant_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyAssistantRequest(assistant_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult DeleteAssistant(string assistant_id, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - - using PipelineMessage message = CreateDeleteAssistantRequest(assistant_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task DeleteAssistantAsync(string assistant_id, RequestOptions options) - { - Argument.AssertNotNull(assistant_id, nameof(assistant_id)); - - using PipelineMessage message = CreateDeleteAssistantRequest(assistant_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/BatchClient.RestClient.cs b/.dotnet/src/Generated/BatchClient.RestClient.cs index 943199e65..131930cde 100644 --- a/.dotnet/src/Generated/BatchClient.RestClient.cs +++ b/.dotnet/src/Generated/BatchClient.RestClient.cs @@ -61,7 +61,7 @@ internal PipelineMessage CreateListBatchesRequest(string after, int? limit, Requ return message; } - internal PipelineMessage CreateRetrieveBatchRequest(string batch_id, RequestOptions options) + internal PipelineMessage CreateRetrieveBatchRequest(string batchId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -70,14 +70,14 @@ internal PipelineMessage CreateRetrieveBatchRequest(string batch_id, RequestOpti ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches/", false); - uri.AppendPath(batch_id, true); + uri.AppendPath(batchId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateCancelBatchRequest(string batch_id, RequestOptions options) + internal PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -86,7 +86,7 @@ internal PipelineMessage CreateCancelBatchRequest(string batch_id, RequestOption ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches/", false); - uri.AppendPath(batch_id, true); + uri.AppendPath(batchId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index baf053b4b..a491c4a50 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -5,9 +5,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Threading.Tasks; -using OpenAI; namespace OpenAI.Batch { @@ -24,40 +22,6 @@ protected BatchClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateBatch(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateBatchRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CreateBatchAsync(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateBatchRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult CreateBatch(string input_file_id, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completion_window, IDictionary metadata = default) - { - Argument.AssertNotNull(input_file_id, nameof(input_file_id)); - - InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); - ClientResult result = CreateBatch(spreadModel, null); - return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); - } - - public virtual async Task> CreateBatchAsync(string input_file_id, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completion_window, IDictionary metadata = default) - { - Argument.AssertNotNull(input_file_id, nameof(input_file_id)); - - InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); - ClientResult result = await CreateBatchAsync(spreadModel, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); - } - public virtual ClientResult ListBatches(string after, int? limit, RequestOptions options) { using PipelineMessage message = CreateListBatchesRequest(after, limit, options); @@ -81,21 +45,5 @@ public virtual async Task> ListBatches ClientResult result = await ListBatchesAsync(after, limit, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListBatchesResponse)result, result.GetRawResponse()); } - - public virtual ClientResult CancelBatch(string batch_id, RequestOptions options) - { - Argument.AssertNotNull(batch_id, nameof(batch_id)); - - using PipelineMessage message = CreateCancelBatchRequest(batch_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CancelBatchAsync(string batch_id, RequestOptions options) - { - Argument.AssertNotNull(batch_id, nameof(batch_id)); - - using PipelineMessage message = CreateCancelBatchRequest(batch_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/FileClient.RestClient.cs b/.dotnet/src/Generated/FileClient.RestClient.cs index 1c8b50180..a409b53c4 100644 --- a/.dotnet/src/Generated/FileClient.RestClient.cs +++ b/.dotnet/src/Generated/FileClient.RestClient.cs @@ -57,7 +57,7 @@ internal PipelineMessage CreateListFilesRequest(string purpose, RequestOptions o return message; } - internal PipelineMessage CreateRetrieveFileRequest(string file_id, RequestOptions options) + internal PipelineMessage CreateRetrieveFileRequest(string fileId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -66,14 +66,14 @@ internal PipelineMessage CreateRetrieveFileRequest(string file_id, RequestOption ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); - uri.AppendPath(file_id, true); + uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateDeleteFileRequest(string file_id, RequestOptions options) + internal PipelineMessage CreateDeleteFileRequest(string fileId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -82,14 +82,14 @@ internal PipelineMessage CreateDeleteFileRequest(string file_id, RequestOptions ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); - uri.AppendPath(file_id, true); + uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateDownloadFileRequest(string file_id, RequestOptions options) + internal PipelineMessage CreateDownloadFileRequest(string fileId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -98,7 +98,7 @@ internal PipelineMessage CreateDownloadFileRequest(string file_id, RequestOption ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); - uri.AppendPath(file_id, true); + uri.AppendPath(fileId, true); uri.AppendPath("/content", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/FineTuningClient.RestClient.cs b/.dotnet/src/Generated/FineTuningClient.RestClient.cs index af37ceff2..1f10b48d1 100644 --- a/.dotnet/src/Generated/FineTuningClient.RestClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.RestClient.cs @@ -61,7 +61,7 @@ internal PipelineMessage CreateListPaginatedFineTuningJobsRequest(string after, return message; } - internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fine_tuning_job_id, RequestOptions options) + internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -70,14 +70,14 @@ internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fine_tuning_j ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath(fineTuningJobId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateCancelFineTuningJobRequest(string fine_tuning_job_id, RequestOptions options) + internal PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -86,7 +86,7 @@ internal PipelineMessage CreateCancelFineTuningJobRequest(string fine_tuning_job ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -94,7 +94,7 @@ internal PipelineMessage CreateCancelFineTuningJobRequest(string fine_tuning_job return message; } - internal PipelineMessage CreateListFineTuningJobCheckpointsRequest(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + internal PipelineMessage CreateListFineTuningJobCheckpointsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -103,7 +103,7 @@ internal PipelineMessage CreateListFineTuningJobCheckpointsRequest(string fine_t ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/checkpoints", false); if (after != null) { @@ -119,7 +119,7 @@ internal PipelineMessage CreateListFineTuningJobCheckpointsRequest(string fine_t return message; } - internal PipelineMessage CreateListFineTuningEventsRequest(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + internal PipelineMessage CreateListFineTuningEventsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -128,7 +128,7 @@ internal PipelineMessage CreateListFineTuningEventsRequest(string fine_tuning_jo ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fine_tuning_job_id, true); + uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/events", false); if (after != null) { diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index e8dff71b5..fcc634a7b 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -47,67 +47,67 @@ public virtual async Task ListFineTuningJobCheckpointsAsync(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + public virtual async Task ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fine_tuning_job_id, after, limit, options); + using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fineTuningJobId, after, limit, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListFineTuningJobCheckpoints(string fine_tuning_job_id, string after, int? limit) + public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - ClientResult result = ListFineTuningJobCheckpoints(fine_tuning_job_id, after, limit, null); + ClientResult result = ListFineTuningJobCheckpoints(fineTuningJobId, after, limit, null); return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); } - public virtual async Task> ListFineTuningJobCheckpointsAsync(string fine_tuning_job_id, string after, int? limit) + public virtual async Task> ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - ClientResult result = await ListFineTuningJobCheckpointsAsync(fine_tuning_job_id, after, limit, null).ConfigureAwait(false); + ClientResult result = await ListFineTuningJobCheckpointsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); } - public virtual ClientResult ListFineTuningEvents(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit, RequestOptions options) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - using PipelineMessage message = CreateListFineTuningEventsRequest(fine_tuning_job_id, after, limit, options); + using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListFineTuningEventsAsync(string fine_tuning_job_id, string after, int? limit, RequestOptions options) + public virtual async Task ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - using PipelineMessage message = CreateListFineTuningEventsRequest(fine_tuning_job_id, after, limit, options); + using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListFineTuningEvents(string fine_tuning_job_id, string after, int? limit) + public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - ClientResult result = ListFineTuningEvents(fine_tuning_job_id, after, limit, null); + ClientResult result = ListFineTuningEvents(fineTuningJobId, after, limit, null); return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); } - public virtual async Task> ListFineTuningEventsAsync(string fine_tuning_job_id, string after, int? limit) + public virtual async Task> ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit) { - Argument.AssertNotNull(fine_tuning_job_id, nameof(fine_tuning_job_id)); + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - ClientResult result = await ListFineTuningEventsAsync(fine_tuning_job_id, after, limit, null).ConfigureAwait(false); + ClientResult result = await ListFineTuningEventsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); } } diff --git a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs index e40808d3a..c51dd675b 100644 --- a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs +++ b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs @@ -10,32 +10,6 @@ namespace OpenAI { internal static partial class ClientPipelineExtensions { - public static async ValueTask ProcessMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) - { - await pipeline.SendAsync(message).ConfigureAwait(false); - - if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) - { - throw await ClientResultException.CreateAsync(message.Response).ConfigureAwait(false); - } - - PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); - return response; - } - - public static PipelineResponse ProcessMessage(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) - { - pipeline.Send(message); - - if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) - { - throw new ClientResultException(message.Response); - } - - PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); - return response; - } - public static async ValueTask> ProcessHeadAsBoolMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) { PipelineResponse response = await pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs index bff4ad6f2..4d386f450 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -21,7 +21,7 @@ public partial class InternalAssistantMessageClient private static OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx(); - internal PipelineMessage CreateCreateMessageRequest(string thread_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCreateMessageRequest(string threadId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -30,7 +30,7 @@ internal PipelineMessage CreateCreateMessageRequest(string thread_id, BinaryCont ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -40,7 +40,7 @@ internal PipelineMessage CreateCreateMessageRequest(string thread_id, BinaryCont return message; } - internal PipelineMessage CreateListMessagesRequest(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateListMessagesRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -49,7 +49,7 @@ internal PipelineMessage CreateListMessagesRequest(string thread_id, int? limit, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); if (limit != null) { @@ -73,7 +73,7 @@ internal PipelineMessage CreateListMessagesRequest(string thread_id, int? limit, return message; } - internal PipelineMessage CreateGetMessageRequest(string thread_id, string message_id, RequestOptions options) + internal PipelineMessage CreateGetMessageRequest(string threadId, string messageId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -82,16 +82,16 @@ internal PipelineMessage CreateGetMessageRequest(string thread_id, string messag ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); - uri.AppendPath(message_id, true); + uri.AppendPath(messageId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateModifyMessageRequest(string thread_id, string message_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateModifyMessageRequest(string threadId, string messageId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -100,9 +100,9 @@ internal PipelineMessage CreateModifyMessageRequest(string thread_id, string mes ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); - uri.AppendPath(message_id, true); + uri.AppendPath(messageId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -111,7 +111,7 @@ internal PipelineMessage CreateModifyMessageRequest(string thread_id, string mes return message; } - internal PipelineMessage CreateDeleteMessageRequest(string thread_id, string message_id, RequestOptions options) + internal PipelineMessage CreateDeleteMessageRequest(string threadId, string messageId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -120,9 +120,9 @@ internal PipelineMessage CreateDeleteMessageRequest(string thread_id, string mes ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); - uri.AppendPath(message_id, true); + uri.AppendPath(messageId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index 34f6a4631..5ea481bdb 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -23,110 +23,36 @@ protected InternalAssistantMessageClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateMessage(string thread_id, BinaryContent content, RequestOptions options) + public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateCreateMessageRequest(thread_id, content, options); + using PipelineMessage message = CreateListMessagesRequest(threadId, limit, order, after, before, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateMessageAsync(string thread_id, BinaryContent content, RequestOptions options) + public virtual async Task ListMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateCreateMessageRequest(thread_id, content, options); + using PipelineMessage message = CreateListMessagesRequest(threadId, limit, order, after, before, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListMessages(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListMessages(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateListMessagesRequest(thread_id, limit, order, after, before, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListMessagesAsync(string thread_id, int? limit, string order, string after, string before, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateListMessagesRequest(thread_id, limit, order, after, before, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListMessages(string thread_id, int? limit, MessageCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - ClientResult result = ListMessages(thread_id, limit, order.ToString(), after, before, null); + ClientResult result = ListMessages(threadId, limit, order.ToString(), after, before, null); return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); } - public virtual async Task> ListMessagesAsync(string thread_id, int? limit, MessageCollectionOrder? order, string after, string before) + public virtual async Task> ListMessagesAsync(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(threadId, nameof(threadId)); - ClientResult result = await ListMessagesAsync(thread_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + ClientResult result = await ListMessagesAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); } - - public virtual ClientResult GetMessage(string thread_id, string message_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - - using PipelineMessage message = CreateGetMessageRequest(thread_id, message_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetMessageAsync(string thread_id, string message_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - - using PipelineMessage message = CreateGetMessageRequest(thread_id, message_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ModifyMessage(string thread_id, string message_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyMessageRequest(thread_id, message_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ModifyMessageAsync(string thread_id, string message_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyMessageRequest(thread_id, message_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult DeleteMessage(string thread_id, string message_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - - using PipelineMessage message = CreateDeleteMessageRequest(thread_id, message_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task DeleteMessageAsync(string thread_id, string message_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(message_id, nameof(message_id)); - - using PipelineMessage message = CreateDeleteMessageRequest(thread_id, message_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs index 49a64fa98..2f8db1bd7 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -38,7 +38,7 @@ internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, return message; } - internal PipelineMessage CreateCreateRunRequest(string thread_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCreateRunRequest(string threadId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -47,7 +47,7 @@ internal PipelineMessage CreateCreateRunRequest(string thread_id, BinaryContent ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -57,7 +57,7 @@ internal PipelineMessage CreateCreateRunRequest(string thread_id, BinaryContent return message; } - internal PipelineMessage CreateListRunsRequest(string thread_id, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateListRunsRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -66,7 +66,7 @@ internal PipelineMessage CreateListRunsRequest(string thread_id, int? limit, str ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs", false); if (limit != null) { @@ -90,7 +90,7 @@ internal PipelineMessage CreateListRunsRequest(string thread_id, int? limit, str return message; } - internal PipelineMessage CreateGetRunRequest(string thread_id, string run_id, RequestOptions options) + internal PipelineMessage CreateGetRunRequest(string threadId, string runId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -99,16 +99,16 @@ internal PipelineMessage CreateGetRunRequest(string thread_id, string run_id, Re ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateModifyRunRequest(string thread_id, string run_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateModifyRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -117,9 +117,9 @@ internal PipelineMessage CreateModifyRunRequest(string thread_id, string run_id, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -128,7 +128,7 @@ internal PipelineMessage CreateModifyRunRequest(string thread_id, string run_id, return message; } - internal PipelineMessage CreateCancelRunRequest(string thread_id, string run_id, RequestOptions options) + internal PipelineMessage CreateCancelRunRequest(string threadId, string runId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -137,9 +137,9 @@ internal PipelineMessage CreateCancelRunRequest(string thread_id, string run_id, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -147,7 +147,7 @@ internal PipelineMessage CreateCancelRunRequest(string thread_id, string run_id, return message; } - internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string thread_id, string run_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -156,9 +156,9 @@ internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string thread_id, s ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); uri.AppendPath("/submit_tool_outputs", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -168,7 +168,7 @@ internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string thread_id, s return message; } - internal PipelineMessage CreateListRunStepsRequest(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateListRunStepsRequest(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -177,9 +177,9 @@ internal PipelineMessage CreateListRunStepsRequest(string thread_id, string run_ ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); uri.AppendPath("/steps", false); if (limit != null) { @@ -203,7 +203,7 @@ internal PipelineMessage CreateListRunStepsRequest(string thread_id, string run_ return message; } - internal PipelineMessage CreateGetRunStepRequest(string thread_id, string run_id, string step_id, RequestOptions options) + internal PipelineMessage CreateGetRunStepRequest(string threadId, string runId, string stepId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -212,11 +212,11 @@ internal PipelineMessage CreateGetRunStepRequest(string thread_id, string run_id ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); - uri.AppendPath(run_id, true); + uri.AppendPath(runId, true); uri.AppendPath("/steps/", false); - uri.AppendPath(step_id, true); + uri.AppendPath(stepId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index 4f3eab202..812ae8b35 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -23,202 +23,72 @@ protected InternalAssistantRunClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateThreadAndRun(BinaryContent content, RequestOptions options) + public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateCreateThreadAndRunRequest(content, options); + using PipelineMessage message = CreateListRunsRequest(threadId, limit, order, after, before, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateThreadAndRunAsync(BinaryContent content, RequestOptions options) + public virtual async Task ListRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateCreateThreadAndRunRequest(content, options); + using PipelineMessage message = CreateListRunsRequest(threadId, limit, order, after, before, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CreateRun(string thread_id, BinaryContent content, RequestOptions options) + public virtual ClientResult ListRuns(string threadId, int? limit, RunCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateCreateRunRequest(thread_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CreateRunAsync(string thread_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateRunRequest(thread_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListRuns(string thread_id, int? limit, string order, string after, string before, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateListRunsRequest(thread_id, limit, order, after, before, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListRunsAsync(string thread_id, int? limit, string order, string after, string before, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateListRunsRequest(thread_id, limit, order, after, before, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListRuns(string thread_id, int? limit, RunCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - ClientResult result = ListRuns(thread_id, limit, order.ToString(), after, before, null); + ClientResult result = ListRuns(threadId, limit, order.ToString(), after, before, null); return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); } - public virtual async Task> ListRunsAsync(string thread_id, int? limit, RunCollectionOrder? order, string after, string before) + public virtual async Task> ListRunsAsync(string threadId, int? limit, RunCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); + Argument.AssertNotNull(threadId, nameof(threadId)); - ClientResult result = await ListRunsAsync(thread_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + ClientResult result = await ListRunsAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); } - public virtual ClientResult GetRun(string thread_id, string run_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateGetRunRequest(thread_id, run_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetRunAsync(string thread_id, string run_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateGetRunRequest(thread_id, run_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ModifyRun(string thread_id, string run_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyRunRequest(thread_id, run_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ModifyRunAsync(string thread_id, string run_id, BinaryContent content, RequestOptions options) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - using PipelineMessage message = CreateModifyRunRequest(thread_id, run_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult CancelRun(string thread_id, string run_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateCancelRunRequest(thread_id, run_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CancelRunAsync(string thread_id, string run_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateCancelRunRequest(thread_id, run_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult SubmitToolOutputsToRun(string thread_id, string run_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateSubmitToolOutputsToRunRequest(thread_id, run_id, content, options); + using PipelineMessage message = CreateListRunStepsRequest(threadId, runId, limit, order, after, before, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task SubmitToolOutputsToRunAsync(string thread_id, string run_id, BinaryContent content, RequestOptions options) + public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - using PipelineMessage message = CreateSubmitToolOutputsToRunRequest(thread_id, run_id, content, options); + using PipelineMessage message = CreateListRunStepsRequest(threadId, runId, limit, order, after, before, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListRunSteps(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateListRunStepsRequest(thread_id, run_id, limit, order, after, before, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - public virtual async Task ListRunStepsAsync(string thread_id, string run_id, int? limit, string order, string after, string before, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - using PipelineMessage message = CreateListRunStepsRequest(thread_id, run_id, limit, order, after, before, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListRunSteps(string thread_id, string run_id, int? limit, RunStepCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - - ClientResult result = ListRunSteps(thread_id, run_id, limit, order.ToString(), after, before, null); + ClientResult result = ListRunSteps(threadId, runId, limit, order.ToString(), after, before, null); return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - public virtual async Task> ListRunStepsAsync(string thread_id, string run_id, int? limit, RunStepCollectionOrder? order, string after, string before) + public virtual async Task> ListRunStepsAsync(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - ClientResult result = await ListRunStepsAsync(thread_id, run_id, limit, order.ToString(), after, before, null).ConfigureAwait(false); + ClientResult result = await ListRunStepsAsync(threadId, runId, limit, order.ToString(), after, before, null).ConfigureAwait(false); return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - - public virtual ClientResult GetRunStep(string thread_id, string run_id, string step_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(step_id, nameof(step_id)); - - using PipelineMessage message = CreateGetRunStepRequest(thread_id, run_id, step_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetRunStepAsync(string thread_id, string run_id, string step_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(run_id, nameof(run_id)); - Argument.AssertNotNull(step_id, nameof(step_id)); - - using PipelineMessage message = CreateGetRunStepRequest(thread_id, run_id, step_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs index d0da72842..47f08cf50 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -38,7 +38,7 @@ internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, Reques return message; } - internal PipelineMessage CreateGetThreadRequest(string thread_id, RequestOptions options) + internal PipelineMessage CreateGetThreadRequest(string threadId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -47,14 +47,14 @@ internal PipelineMessage CreateGetThreadRequest(string thread_id, RequestOptions ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateModifyThreadRequest(string thread_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateModifyThreadRequest(string threadId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -63,7 +63,7 @@ internal PipelineMessage CreateModifyThreadRequest(string thread_id, BinaryConte ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -72,7 +72,7 @@ internal PipelineMessage CreateModifyThreadRequest(string thread_id, BinaryConte return message; } - internal PipelineMessage CreateDeleteThreadRequest(string thread_id, RequestOptions options) + internal PipelineMessage CreateDeleteThreadRequest(string threadId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -81,7 +81,7 @@ internal PipelineMessage CreateDeleteThreadRequest(string thread_id, RequestOpti ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); - uri.AppendPath(thread_id, true); + uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.cs index 9e2be75f9..cff0d3242 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.cs @@ -5,8 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; -using OpenAI; namespace OpenAI.Assistants { @@ -22,71 +20,5 @@ protected InternalAssistantThreadClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult CreateThread(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateThreadRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task CreateThreadAsync(BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateCreateThreadRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult GetThread(string thread_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateGetThreadRequest(thread_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetThreadAsync(string thread_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateGetThreadRequest(thread_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ModifyThread(string thread_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyThreadRequest(thread_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ModifyThreadAsync(string thread_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyThreadRequest(thread_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult DeleteThread(string thread_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateDeleteThreadRequest(thread_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task DeleteThreadAsync(string thread_id, RequestOptions options) - { - Argument.AssertNotNull(thread_id, nameof(thread_id)); - - using PipelineMessage message = CreateDeleteThreadRequest(thread_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs index 185cf6fa3..e612aff22 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs @@ -38,7 +38,7 @@ internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, Reques return message; } - internal PipelineMessage CreateAddUploadPartRequest(string upload_id, BinaryContent content, string contentType, RequestOptions options) + internal PipelineMessage CreateAddUploadPartRequest(string uploadId, BinaryContent content, string contentType, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -47,7 +47,7 @@ internal PipelineMessage CreateAddUploadPartRequest(string upload_id, BinaryCont ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); - uri.AppendPath(upload_id, true); + uri.AppendPath(uploadId, true); uri.AppendPath("/parts", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -57,7 +57,7 @@ internal PipelineMessage CreateAddUploadPartRequest(string upload_id, BinaryCont return message; } - internal PipelineMessage CreateCompleteUploadRequest(string upload_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCompleteUploadRequest(string uploadId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -66,7 +66,7 @@ internal PipelineMessage CreateCompleteUploadRequest(string upload_id, BinaryCon ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); - uri.AppendPath(upload_id, true); + uri.AppendPath(uploadId, true); uri.AppendPath("/complete", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -76,7 +76,7 @@ internal PipelineMessage CreateCompleteUploadRequest(string upload_id, BinaryCon return message; } - internal PipelineMessage CreateCancelUploadRequest(string upload_id, RequestOptions options) + internal PipelineMessage CreateCancelUploadRequest(string uploadId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -85,7 +85,7 @@ internal PipelineMessage CreateCancelUploadRequest(string upload_id, RequestOpti ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); - uri.AppendPath(upload_id, true); + uri.AppendPath(uploadId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index be55fd772..ac2cb2561 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -55,89 +55,89 @@ public virtual async Task> CreateUploadAsync(Intern return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult AddUploadPart(string upload_id, BinaryContent content, string contentType, RequestOptions options) + public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAddUploadPartRequest(upload_id, content, contentType, options); + using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task AddUploadPartAsync(string upload_id, BinaryContent content, string contentType, RequestOptions options) + public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAddUploadPartRequest(upload_id, content, contentType, options); + using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CompleteUpload(string upload_id, BinaryContent content, RequestOptions options) + public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCompleteUploadRequest(upload_id, content, options); + using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CompleteUploadAsync(string upload_id, BinaryContent content, RequestOptions options) + public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCompleteUploadRequest(upload_id, content, options); + using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CompleteUpload(string upload_id, InternalCompleteUploadRequest requestBody) + public virtual ClientResult CompleteUpload(string uploadId, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CompleteUpload(upload_id, requestBody, null); + ClientResult result = CompleteUpload(uploadId, requestBody, null); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task> CompleteUploadAsync(string upload_id, InternalCompleteUploadRequest requestBody) + public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CompleteUploadAsync(upload_id, requestBody, null).ConfigureAwait(false); + ClientResult result = await CompleteUploadAsync(uploadId, requestBody, null).ConfigureAwait(false); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult CancelUpload(string upload_id, RequestOptions options) + public virtual ClientResult CancelUpload(string uploadId, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); - using PipelineMessage message = CreateCancelUploadRequest(upload_id, options); + using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CancelUploadAsync(string upload_id, RequestOptions options) + public virtual async Task CancelUploadAsync(string uploadId, RequestOptions options) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); - using PipelineMessage message = CreateCancelUploadRequest(upload_id, options); + using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CancelUpload(string upload_id) + public virtual ClientResult CancelUpload(string uploadId) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); - ClientResult result = CancelUpload(upload_id, null); + ClientResult result = CancelUpload(uploadId, null); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task> CancelUploadAsync(string upload_id) + public virtual async Task> CancelUploadAsync(string uploadId) { - Argument.AssertNotNull(upload_id, nameof(upload_id)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); - ClientResult result = await CancelUploadAsync(upload_id, null).ConfigureAwait(false); + ClientResult result = await CancelUploadAsync(uploadId, null).ConfigureAwait(false); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } } diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index 4cd55867e..35d6d095f 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -33,8 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); if (Name != null) @@ -68,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ToolDefinition item in Tools) { writer.WriteObjectValue(item, options); } @@ -117,37 +115,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (Optional.IsDefined(NucleusSamplingFactor)) { - if (TopP != null) + if (NucleusSamplingFactor != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WriteNumberValue(NucleusSamplingFactor.Value); } else { writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("responseFormat"u8); - } - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -185,7 +166,6 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW return null; } string id = default; - InternalAssistantObjectObject @object = default; DateTimeOffset createdAt = default; string name = default; string description = default; @@ -195,8 +175,8 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW ToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; + InternalAssistantObjectObject @object = default; + float? nucleusSamplingFactor = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -205,11 +185,6 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalAssistantObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -302,24 +277,19 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("top_p"u8)) + if (prop.NameEquals("object"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = prop.Value.GetSingle(); + @object = InternalAssistantObjectObject.DeserializeInternalAssistantObjectObject(prop.Value, options); continue; } - if (prop.NameEquals("response_format"u8)) + if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; + nucleusSamplingFactor = null; continue; } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } if (options.Format != "W") @@ -329,7 +299,6 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW } return new Assistant( id, - @object, createdAt, name, description, @@ -339,8 +308,8 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW toolResources, metadata, temperature, - topP, - responseFormat, + @object, + nucleusSamplingFactor, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index cf8b97ab3..5ab6b958e 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -12,7 +12,7 @@ public partial class Assistant { private protected IDictionary _additionalBinaryDataProperties; - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata, InternalAssistantObjectObject @object) { Id = id; CreatedAt = createdAt; @@ -22,12 +22,12 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Instructions = instructions; Tools = tools.ToList(); Metadata = metadata; + Object = @object; } - internal Assistant(string id, InternalAssistantObjectObject @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; Name = name; Description = description; @@ -37,8 +37,8 @@ internal Assistant(string id, InternalAssistantObjectObject @object, DateTimeOff ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - TopP = topP; - ResponseFormat = responseFormat; + Object = @object; + NucleusSamplingFactor = nucleusSamplingFactor; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index faef5f50b..957e79a40 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -59,33 +52,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("refusal"u8); } } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(ParticipantName)) { writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(ParticipantName); } if (Optional.IsCollectionDefined(ToolCalls)) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (ChatToolCall item in ToolCalls) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsDefined(FunctionCall)) - { - if (FunctionCall != null) - { - writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionCall, options); - } - else - { - writer.WriteNull("functionCall"u8); - } - } } AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AssistantChatMessage)JsonModelCreateCore(ref reader, options); @@ -109,10 +90,9 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } BinaryData content = default; string refusal = default; - string name = default; + string participantName = default; IList toolCalls = default; - ChatFunctionCall functionCall = default; - string role = "assistant"; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -138,12 +118,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = prop.Value.GetString(); + participantName = prop.Value.GetString(); continue; } if (prop.NameEquals("tool_calls"u8)) @@ -160,19 +135,9 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement toolCalls = array; continue; } - if (prop.NameEquals("function_call"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); - continue; - } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") @@ -183,9 +148,8 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement return new AssistantChatMessage( content, refusal, - name, + participantName, toolCalls ?? new ChangeTrackingList(), - functionCall, role, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index 6c21e666b..d1226707e 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -9,13 +9,12 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(BinaryData content, string refusal, string name, IList toolCalls, ChatFunctionCall functionCall, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal AssistantChatMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; Refusal = refusal; - Name = name; + ParticipantName = participantName; ToolCalls = toolCalls; - FunctionCall = functionCall; } public BinaryData Content { get; set; } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index a06ca5dfe..146eea92f 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -27,8 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantCreationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(Name)) { if (Name != null) @@ -65,28 +63,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -122,16 +98,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsCollectionDefined(Tools)) { - if (TopP != null) + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ToolDefinition item in Tools) { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ToolResources)) + { + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("topP"u8); + writer.WriteNull("toolResources"u8); } } if (Optional.IsDefined(ResponseFormat)) @@ -139,20 +125,25 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ResponseFormat, options); } else { writer.WriteNull("responseFormat"u8); } } + if (Optional.IsDefined(NucleusSamplingFactor)) + { + if (NucleusSamplingFactor != null) + { + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(NucleusSamplingFactor.Value); + } + else + { + writer.WriteNull("topP"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -189,24 +180,18 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso { return null; } - InternalCreateAssistantRequestModel model = default; string name = default; string description = default; string instructions = default; - IList tools = default; - InternalCreateAssistantRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; + IList tools = default; + ToolResources toolResources = default; + AssistantResponseFormat responseFormat = default; + float? nucleusSamplingFactor = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("model"u8)) - { - model = new InternalCreateAssistantRequestModel(prop.Value.GetString()); - continue; - } if (prop.NameEquals("name"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -237,30 +222,6 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso instructions = prop.Value.GetString(); continue; } - if (prop.NameEquals("tools"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (prop.NameEquals("tool_resources"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = InternalCreateAssistantRequestToolResources.DeserializeInternalCreateAssistantRequestToolResources(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -292,24 +253,46 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("top_p"u8)) + if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; continue; } - topP = prop.Value.GetSingle(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("tool_resources"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } + if (prop.NameEquals("top_p"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + nucleusSamplingFactor = null; + continue; + } + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } if (options.Format != "W") @@ -318,16 +301,15 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso } } return new AssistantCreationOptions( - model, name, description, instructions, - tools ?? new ChangeTrackingList(), - toolResources, metadata ?? new ChangeTrackingDictionary(), temperature, - topP, + tools ?? new ChangeTrackingList(), + toolResources, responseFormat, + nucleusSamplingFactor, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs index 107648c45..6a2321033 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs @@ -11,18 +11,17 @@ public partial class AssistantCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantCreationOptions(InternalCreateAssistantRequestModel model, string name, string description, string instructions, IList tools, InternalCreateAssistantRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal AssistantCreationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, IList tools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { - Model = model; Name = name; Description = description; Instructions = instructions; - Tools = tools; - ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - TopP = topP; + Tools = tools; + ToolResources = toolResources; ResponseFormat = responseFormat; + NucleusSamplingFactor = nucleusSamplingFactor; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index b5b2519e6..ef080775e 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -31,12 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(AssistantId); writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE { return null; } - string id = default; bool deleted = default; + string assistantId = default; InternalDeleteAssistantResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("deleted"u8)) { - id = prop.Value.GetString(); + deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("deleted"u8)) + if (prop.NameEquals("id"u8)) { - deleted = prop.Value.GetBoolean(); + assistantId = prop.Value.GetString(); continue; } if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); + @object = InternalDeleteAssistantResponseObject.DeserializeInternalDeleteAssistantResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AssistantDeletionResult(id, deleted, @object, additionalBinaryDataProperties); + return new AssistantDeletionResult(deleted, assistantId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index baf7eebd7..94f7790a4 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -11,16 +11,17 @@ public partial class AssistantDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantDeletionResult(string id, bool deleted) + internal AssistantDeletionResult(bool deleted, string assistantId, InternalDeleteAssistantResponseObject @object) { - Id = id; Deleted = deleted; + AssistantId = assistantId; + Object = @object; } - internal AssistantDeletionResult(string id, bool deleted, InternalDeleteAssistantResponseObject @object, IDictionary additionalBinaryDataProperties) + internal AssistantDeletionResult(bool deleted, string assistantId, InternalDeleteAssistantResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; Deleted = deleted; + AssistantId = assistantId; Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index b388b2b01..ea4bc3571 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -27,11 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } if (Optional.IsDefined(Name)) { if (Name != null) @@ -68,28 +63,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -125,16 +98,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsCollectionDefined(DefaultTools)) { - if (TopP != null) + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ToolDefinition item in DefaultTools) { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ToolResources)) + { + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); } else { - writer.WriteNull("topP"u8); + writer.WriteNull("toolResources"u8); } } if (Optional.IsDefined(ResponseFormat)) @@ -142,20 +125,25 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ResponseFormat, options); } else { writer.WriteNull("responseFormat"u8); } } + if (Optional.IsDefined(NucleusSamplingFactor)) + { + if (NucleusSamplingFactor != null) + { + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(NucleusSamplingFactor.Value); + } + else + { + writer.WriteNull("topP"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -192,29 +180,18 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt { return null; } - string model = default; string name = default; string description = default; string instructions = default; - IList tools = default; - InternalModifyAssistantRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; + IList defaultTools = default; + ToolResources toolResources = default; + AssistantResponseFormat responseFormat = default; + float? nucleusSamplingFactor = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = prop.Value.GetString(); - continue; - } if (prop.NameEquals("name"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -245,30 +222,6 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt instructions = prop.Value.GetString(); continue; } - if (prop.NameEquals("tools"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (prop.NameEquals("tool_resources"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = InternalModifyAssistantRequestToolResources.DeserializeInternalModifyAssistantRequestToolResources(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -300,24 +253,46 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("top_p"u8)) + if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; continue; } - topP = prop.Value.GetSingle(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); + } + defaultTools = array; + continue; + } + if (prop.NameEquals("tool_resources"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } + if (prop.NameEquals("top_p"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + nucleusSamplingFactor = null; + continue; + } + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } if (options.Format != "W") @@ -326,16 +301,15 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt } } return new AssistantModificationOptions( - model, name, description, instructions, - tools ?? new ChangeTrackingList(), - toolResources, metadata ?? new ChangeTrackingDictionary(), temperature, - topP, + defaultTools ?? new ChangeTrackingList(), + toolResources, responseFormat, + nucleusSamplingFactor, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs index 654e6df69..689275227 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs @@ -14,22 +14,21 @@ public partial class AssistantModificationOptions public AssistantModificationOptions() { - Tools = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); + DefaultTools = new ChangeTrackingList(); } - internal AssistantModificationOptions(string model, string name, string description, string instructions, IList tools, InternalModifyAssistantRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal AssistantModificationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, IList defaultTools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { - Model = model; Name = name; Description = description; Instructions = instructions; - Tools = tools; - ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - TopP = topP; + DefaultTools = defaultTools; + ToolResources = toolResources; ResponseFormat = responseFormat; + NucleusSamplingFactor = nucleusSamplingFactor; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index 8e1e1a07f..3b21f55d3 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -17,13 +17,6 @@ internal AssistantResponseFormat() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -50,8 +43,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -60,32 +51,9 @@ protected virtual AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAssistantResponseFormat(document.RootElement, options); - } - - internal static AssistantResponseFormat DeserializeAssistantResponseFormat(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "text": - return InternalAssistantResponseFormatText.DeserializeInternalAssistantResponseFormatText(element, options); - case "json_object": - return InternalAssistantResponseFormatJsonObject.DeserializeInternalAssistantResponseFormatJsonObject(element, options); - case "json_schema": - return InternalAssistantResponseFormatJsonSchema.DeserializeInternalAssistantResponseFormatJsonSchema(element, options); - } - } - return InternalUnknownAssistantResponseFormat.DeserializeInternalUnknownAssistantResponseFormat(element, options); + return AssistantResponseFormat.DeserializeAssistantResponseFormat(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -98,8 +66,6 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -108,15 +74,13 @@ protected virtual AssistantResponseFormat PersistableModelCreateCore(BinaryData case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeAssistantResponseFormat(document.RootElement, options); + return AssistantResponseFormat.DeserializeAssistantResponseFormat(document.RootElement, options); } default: throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(AssistantResponseFormat assistantResponseFormat) { return BinaryContent.Create(assistantResponseFormat, ModelSerializationExtensions.WireOptions); @@ -126,7 +90,7 @@ public static explicit operator AssistantResponseFormat(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeAssistantResponseFormat(document.RootElement, ModelSerializationExtensions.WireOptions); + return AssistantResponseFormat.DeserializeAssistantResponseFormat(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 36d83fec1..7b2fa4c57 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -33,19 +33,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -66,6 +55,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("metadata"u8); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -103,10 +94,9 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, return null; } string id = default; - InternalThreadObjectObject @object = default; DateTimeOffset createdAt = default; - InternalThreadObjectToolResources toolResources = default; IDictionary metadata = default; + InternalThreadObjectObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -115,26 +105,11 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalThreadObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (prop.NameEquals("tool_resources"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = InternalThreadObjectToolResources.DeserializeInternalThreadObjectToolResources(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -157,18 +132,17 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, metadata = dictionary; continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalThreadObjectObject.DeserializeInternalThreadObjectObject(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AssistantThread( - id, - @object, - createdAt, - toolResources, - metadata, - additionalBinaryDataProperties); + return new AssistantThread(id, createdAt, metadata, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index a26a1116f..c649e6985 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -11,21 +11,20 @@ public partial class AssistantThread { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantThread(string id, DateTimeOffset createdAt, InternalThreadObjectToolResources toolResources, IDictionary metadata) + internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object) { Id = id; CreatedAt = createdAt; - ToolResources = toolResources; Metadata = metadata; + Object = @object; } - internal AssistantThread(string id, InternalThreadObjectObject @object, DateTimeOffset createdAt, InternalThreadObjectToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; - ToolResources = toolResources; Metadata = metadata; + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index 53e722ed7..b4c6045d6 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -31,19 +31,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranscription)} does not support writing '{format}' format."); } - writer.WritePropertyName("task"u8); - writer.WriteStringValue(Task.ToString()); writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); - writer.WritePropertyName("duration"u8); - writer.WriteNumberValue(Convert.ToDouble(Duration.ToString("s\\.FFF"))); writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); if (Optional.IsCollectionDefined(Words)) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); - foreach (var item in Words) + foreach (TranscribedWord item in Words) { writer.WriteObjectValue(item, options); } @@ -53,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); - foreach (var item in Segments) + foreach (TranscribedSegment item in Segments) { writer.WriteObjectValue(item, options); } @@ -95,30 +91,18 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele { return null; } - InternalCreateTranscriptionResponseVerboseJsonTask task = default; string language = default; - TimeSpan duration = default; string text = default; IList words = default; IList segments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("task"u8)) - { - task = new InternalCreateTranscriptionResponseVerboseJsonTask(prop.Value.GetString()); - continue; - } if (prop.NameEquals("language"u8)) { language = prop.Value.GetString(); continue; } - if (prop.NameEquals("duration"u8)) - { - duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); - continue; - } if (prop.NameEquals("text"u8)) { text = prop.Value.GetString(); @@ -157,14 +141,7 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranscription( - task, - language, - duration, - text, - words ?? new ChangeTrackingList(), - segments ?? new ChangeTrackingList(), - additionalBinaryDataProperties); + return new AudioTranscription(language, text, words ?? new ChangeTrackingList(), segments ?? new ChangeTrackingList(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index 6d6609582..7743fd6d9 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -12,20 +12,17 @@ public partial class AudioTranscription { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscription(string language, TimeSpan duration, string text) + internal AudioTranscription(string language, string text) { Language = language; - Duration = duration; Text = text; Words = new ChangeTrackingList(); Segments = new ChangeTrackingList(); } - internal AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask task, string language, TimeSpan duration, string text, IList words, IList segments, IDictionary additionalBinaryDataProperties) + internal AudioTranscription(string language, string text, IList words, IList segments, IDictionary additionalBinaryDataProperties) { - Task = task; Language = language; - Duration = duration; Text = text; Words = words; Segments = segments; diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index cb00dc804..579130bf2 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -27,10 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("file"u8); - writer.WriteBase64StringValue(File.ToArray(), "D"); - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(Language)) { writer.WritePropertyName("language"u8); @@ -51,16 +47,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (Optional.IsCollectionDefined(TimestampGranularities)) - { - writer.WritePropertyName("timestamp_granularities"u8); - writer.WriteStartArray(); - foreach (var item in TimestampGranularities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -97,26 +83,13 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J { return null; } - BinaryData @file = default; - InternalCreateTranscriptionRequestModel model = default; string language = default; string prompt = default; Audio.AudioTranscriptionFormat? responseFormat = default; float? temperature = default; - IList timestampGranularities = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("file"u8)) - { - @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("model"u8)) - { - model = new InternalCreateTranscriptionRequestModel(prop.Value.GetString()); - continue; - } if (prop.NameEquals("language"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -157,34 +130,12 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("timestamp_granularities"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new InternalCreateTranscriptionRequestTimestampGranularity(item.GetString())); - } - timestampGranularities = array; - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranscriptionOptions( - @file, - model, - language, - prompt, - responseFormat, - temperature, - timestampGranularities ?? new ChangeTrackingList(), - additionalBinaryDataProperties); + return new AudioTranscriptionOptions(language, prompt, responseFormat, temperature, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index 2b6d79bc7..babbdfe04 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -11,15 +11,12 @@ public partial class AudioTranscriptionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscriptionOptions(BinaryData @file, InternalCreateTranscriptionRequestModel model, string language, string prompt, Audio.AudioTranscriptionFormat? responseFormat, float? temperature, IList timestampGranularities, IDictionary additionalBinaryDataProperties) + internal AudioTranscriptionOptions(string language, string prompt, Audio.AudioTranscriptionFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) { - File = @file; - Model = model; Language = language; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; - TimestampGranularities = timestampGranularities; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index 7b293d8bc..5f1e1e0bc 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -31,19 +31,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranslation)} does not support writing '{format}' format."); } - writer.WritePropertyName("task"u8); - writer.WriteStringValue(Task.ToString()); writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); - writer.WritePropertyName("duration"u8); - writer.WriteNumberValue(Convert.ToDouble(Duration.ToString("s\\.FFF"))); writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); if (Optional.IsCollectionDefined(Segments)) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); - foreach (var item in Segments) + foreach (TranscribedSegment item in Segments) { writer.WriteObjectValue(item, options); } @@ -85,29 +81,17 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element { return null; } - InternalCreateTranslationResponseVerboseJsonTask task = default; string language = default; - TimeSpan duration = default; string text = default; IList segments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("task"u8)) - { - task = new InternalCreateTranslationResponseVerboseJsonTask(prop.Value.GetString()); - continue; - } if (prop.NameEquals("language"u8)) { language = prop.Value.GetString(); continue; } - if (prop.NameEquals("duration"u8)) - { - duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); - continue; - } if (prop.NameEquals("text"u8)) { text = prop.Value.GetString(); @@ -132,13 +116,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranslation( - task, - language, - duration, - text, - segments ?? new ChangeTrackingList(), - additionalBinaryDataProperties); + return new AudioTranslation(language, text, segments ?? new ChangeTrackingList(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index 1189cdf8a..2efda3340 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -12,19 +12,16 @@ public partial class AudioTranslation { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslation(string language, TimeSpan duration, string text) + internal AudioTranslation(string language, string text) { Language = language; - Duration = duration; Text = text; Segments = new ChangeTrackingList(); } - internal AudioTranslation(InternalCreateTranslationResponseVerboseJsonTask task, string language, TimeSpan duration, string text, IList segments, IDictionary additionalBinaryDataProperties) + internal AudioTranslation(string language, string text, IList segments, IDictionary additionalBinaryDataProperties) { - Task = task; Language = language; - Duration = duration; Text = text; Segments = segments; _additionalBinaryDataProperties = additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index a78a8af02..bad4bc80c 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -27,10 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("file"u8); - writer.WriteBase64StringValue(File.ToArray(), "D"); - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); @@ -82,24 +78,12 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE { return null; } - BinaryData @file = default; - InternalCreateTranslationRequestModel model = default; string prompt = default; Audio.AudioTranslationFormat? responseFormat = default; float? temperature = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("file"u8)) - { - @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("model"u8)) - { - model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); - continue; - } if (prop.NameEquals("prompt"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -135,13 +119,7 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranslationOptions( - @file, - model, - prompt, - responseFormat, - temperature, - additionalBinaryDataProperties); + return new AudioTranslationOptions(prompt, responseFormat, temperature, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index 16dd90f8e..74df8f61c 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -11,10 +11,8 @@ public partial class AudioTranslationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslationOptions(BinaryData @file, InternalCreateTranslationRequestModel model, string prompt, Audio.AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) + internal AudioTranslationOptions(string prompt, Audio.AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) { - File = @file; - Model = model; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 571f6d545..2968d1e2a 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -33,15 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); if (Optional.IsDefined(ServiceTier)) @@ -61,13 +52,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionResponseChoice item in Choices) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -105,13 +105,13 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo return null; } string id = default; - IList choices = default; - DateTimeOffset created = default; string model = default; InternalCreateChatCompletionResponseServiceTier? serviceTier = default; string systemFingerprint = default; - InternalCreateChatCompletionResponseObject @object = default; ChatTokenUsage usage = default; + InternalCreateChatCompletionResponseObject @object = default; + IReadOnlyList choices = default; + DateTimeOffset createdAt = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -120,21 +120,6 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo id = prop.Value.GetString(); continue; } - if (prop.NameEquals("choices"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(InternalCreateChatCompletionResponseChoice.DeserializeInternalCreateChatCompletionResponseChoice(item, options)); - } - choices = array; - continue; - } - if (prop.NameEquals("created"u8)) - { - created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); - continue; - } if (prop.NameEquals("model"u8)) { model = prop.Value.GetString(); @@ -160,11 +145,6 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo systemFingerprint = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalCreateChatCompletionResponseObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("usage"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -175,6 +155,26 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalCreateChatCompletionResponseObject.DeserializeInternalCreateChatCompletionResponseObject(prop.Value, options); + continue; + } + if (prop.NameEquals("choices"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InternalCreateChatCompletionResponseChoice.DeserializeInternalCreateChatCompletionResponseChoice(item, options)); + } + choices = array; + continue; + } + if (prop.NameEquals("created"u8)) + { + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -182,13 +182,13 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo } return new ChatCompletion( id, - choices, - created, model, serviceTier, systemFingerprint, - @object, usage, + @object, + choices, + createdAt, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 10171010b..8bd82d1c5 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -12,24 +12,25 @@ public partial class ChatCompletion { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletion(string id, IEnumerable choices, DateTimeOffset created, string model) + internal ChatCompletion(string id, string model, InternalCreateChatCompletionResponseObject @object, IEnumerable choices, DateTimeOffset createdAt) { Id = id; - Choices = choices.ToList(); - Created = created; Model = model; + Object = @object; + Choices = choices.ToList(); + CreatedAt = createdAt; } - internal ChatCompletion(string id, IList choices, DateTimeOffset created, string model, InternalCreateChatCompletionResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionResponseObject @object, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) + internal ChatCompletion(string id, string model, InternalCreateChatCompletionResponseServiceTier? serviceTier, string systemFingerprint, ChatTokenUsage usage, InternalCreateChatCompletionResponseObject @object, IReadOnlyList choices, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; - Choices = choices; - Created = created; Model = model; ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; - Object = @object; Usage = usage; + Object = @object; + Choices = choices; + CreatedAt = createdAt; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index d892fca30..338a67023 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -27,15 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("messages"u8); - writer.WriteStartArray(); - foreach (var item in Messages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(FrequencyPenalty)) { if (FrequencyPenalty != null) @@ -48,72 +39,78 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("frequencyPenalty"u8); } } - if (Optional.IsCollectionDefined(LogitBias)) + if (Optional.IsDefined(PresencePenalty)) { - if (LogitBias != null) + if (PresencePenalty != null) { - writer.WritePropertyName("logit_bias"u8); - writer.WriteStartObject(); - foreach (var item in LogitBias) - { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); - } - writer.WriteEndObject(); + writer.WritePropertyName("presence_penalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); } else { - writer.WriteNull("logitBias"u8); + writer.WriteNull("presencePenalty"u8); } } - if (Optional.IsDefined(Logprobs)) + if (Optional.IsDefined(ResponseFormat)) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + if (Optional.IsDefined(ServiceTier)) { - if (Logprobs != null) + if (ServiceTier != null) { - writer.WritePropertyName("logprobs"u8); - writer.WriteBooleanValue(Logprobs.Value); + writer.WritePropertyName("service_tier"u8); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { - writer.WriteNull("logprobs"u8); + writer.WriteNull("serviceTier"u8); } } - if (Optional.IsDefined(TopLogprobs)) + if (Optional.IsDefined(Temperature)) { - if (TopLogprobs != null) + if (Temperature != null) { - writer.WritePropertyName("top_logprobs"u8); - writer.WriteNumberValue(TopLogprobs.Value); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); } else { - writer.WriteNull("topLogprobs"u8); + writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(MaxTokens)) + if (Optional.IsDefined(TopP)) { - if (MaxTokens != null) + if (TopP != null) { - writer.WritePropertyName("max_tokens"u8); - writer.WriteNumberValue(MaxTokens.Value); + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("maxTokens"u8); + writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(MaxCompletionTokens)) + if (Optional.IsCollectionDefined(Tools)) { - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ChatTool item in Tools) { - writer.WriteNull("maxCompletionTokens"u8); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); } + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (ChatMessage item in Messages) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); if (Optional.IsDefined(N)) { if (N != null) @@ -126,66 +123,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(PresencePenalty)) - { - if (PresencePenalty != null) - { - writer.WritePropertyName("presence_penalty"u8); - writer.WriteNumberValue(PresencePenalty.Value); - } - else - { - writer.WriteNull("presencePenalty"u8); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); - } - if (Optional.IsDefined(Seed)) - { - if (Seed != null) - { - writer.WritePropertyName("seed"u8); - writer.WriteNumberValue(Seed.Value); - } - else - { - writer.WriteNull("seed"u8); - } - } - if (Optional.IsDefined(ServiceTier)) - { - if (ServiceTier != null) - { - writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(ServiceTier.Value.ToString()); - } - else - { - writer.WriteNull("serviceTier"u8); - } - } - if (Optional.IsDefined(Stop)) - { - if (Stop != null) - { - writer.WritePropertyName("stop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Stop); -#else - using (JsonDocument document = JsonDocument.Parse(Stop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("stop"u8); - } - } if (Optional.IsDefined(Stream)) { if (Stream != null) @@ -210,83 +147,113 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("streamOptions"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(IncludeLogProbabilities)) { - if (Temperature != null) + if (IncludeLogProbabilities != null) { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); + writer.WritePropertyName("logprobs"u8); + writer.WriteBooleanValue(IncludeLogProbabilities.Value); } else { - writer.WriteNull("temperature"u8); + writer.WriteNull("logprobs"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopLogProbabilityCount)) { - if (TopP != null) + if (TopLogProbabilityCount != null) { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WritePropertyName("top_logprobs"u8); + writer.WriteNumberValue(TopLogProbabilityCount.Value); } else { - writer.WriteNull("topP"u8); + writer.WriteNull("topLogprobs"u8); } } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(StopSequences)) { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) + if (StopSequences != null) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("stop"u8); + writer.WriteStartArray(); + foreach (string item in StopSequences) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("stop"u8); } - writer.WriteEndArray(); } - if (Optional.IsDefined(ToolChoice)) + if (Optional.IsCollectionDefined(LogitBiases)) { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + if (LogitBiases != null) { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WritePropertyName("logit_bias"u8); + writer.WriteStartObject(); + foreach (var item in LogitBiases) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("logitBias"u8); } -#endif } - if (Optional.IsDefined(ParallelToolCalls)) + if (Optional.IsDefined(ToolChoice)) + { + writer.WritePropertyName("tool_choice"u8); + writer.WriteObjectValue(ToolChoice, options); + } + if (Optional.IsDefined(FunctionChoice)) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionChoice, options); + } + if (Optional.IsDefined(ParallelToolCallsEnabled)) { writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls.Value); + writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(User); + writer.WriteStringValue(EndUserId); } - if (Optional.IsDefined(FunctionCall)) + if (Optional.IsDefined(_deprecatedMaxTokens)) { - writer.WritePropertyName("function_call"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(FunctionCall); -#else - using (JsonDocument document = JsonDocument.Parse(FunctionCall)) + if (_deprecatedMaxTokens != null) { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WritePropertyName("max_tokens"u8); + writer.WriteNumberValue(_deprecatedMaxTokens.Value); + } + else + { + writer.WriteNull("maxTokens"u8); } -#endif } - if (Optional.IsCollectionDefined(Functions)) + if (Optional.IsDefined(MaxOutputTokenCount)) { - writer.WritePropertyName("functions"u8); - writer.WriteStartArray(); - foreach (var item in Functions) + if (MaxOutputTokenCount != null) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("max_completion_tokens"u8); + writer.WriteNumberValue(MaxOutputTokenCount.Value); + } + else + { + writer.WriteNull("maxCompletionTokens"u8); } - writer.WriteEndArray(); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -324,48 +291,31 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { return null; } - IList messages = default; - InternalCreateChatCompletionRequestModel model = default; float? frequencyPenalty = default; - IDictionary logitBias = default; - bool? logprobs = default; - int? topLogprobs = default; - int? maxTokens = default; - int? maxCompletionTokens = default; - int? n = default; float? presencePenalty = default; ChatResponseFormat responseFormat = default; - long? seed = default; InternalCreateChatCompletionRequestServiceTier? serviceTier = default; - BinaryData stop = default; - bool? stream = default; - InternalChatCompletionStreamOptions streamOptions = default; float? temperature = default; float? topP = default; IList tools = default; - BinaryData toolChoice = default; - bool? parallelToolCalls = default; - string user = default; - BinaryData functionCall = default; - IList functions = default; + IList messages = default; + InternalCreateChatCompletionRequestModel model = default; + int? n = default; + bool? stream = default; + InternalChatCompletionStreamOptions streamOptions = default; + bool? includeLogProbabilities = default; + int? topLogProbabilityCount = default; + IList stopSequences = default; + IDictionary logitBiases = default; + ChatToolChoice toolChoice = default; + ChatFunctionChoice functionChoice = default; + bool? parallelToolCallsEnabled = default; + string endUserId = default; + int? deprecatedMaxTokens = default; + int? maxOutputTokenCount = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("messages"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ChatMessage.DeserializeChatMessage(item, options)); - } - messages = array; - continue; - } - if (prop.NameEquals("model"u8)) - { - model = new InternalCreateChatCompletionRequestModel(prop.Value.GetString()); - continue; - } if (prop.NameEquals("frequency_penalty"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -376,118 +326,93 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme frequencyPenalty = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("logit_bias"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var prop0 in prop.Value.EnumerateObject()) - { - dictionary.Add(prop0.Name, prop0.Value.GetInt32()); - } - logitBias = dictionary; - continue; - } - if (prop.NameEquals("logprobs"u8)) + if (prop.NameEquals("presence_penalty"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - logprobs = null; + presencePenalty = null; continue; } - logprobs = prop.Value.GetBoolean(); + presencePenalty = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("top_logprobs"u8)) + if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - topLogprobs = null; + responseFormat = null; continue; } - topLogprobs = prop.Value.GetInt32(); + responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); continue; } - if (prop.NameEquals("max_tokens"u8)) + if (prop.NameEquals("service_tier"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxTokens = null; + serviceTier = null; continue; } - maxTokens = prop.Value.GetInt32(); + serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (prop.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("temperature"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxCompletionTokens = null; + temperature = null; continue; } - maxCompletionTokens = prop.Value.GetInt32(); + temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("n"u8)) + if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - n = null; + topP = null; continue; } - n = prop.Value.GetInt32(); + topP = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("presence_penalty"u8)) + if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - presencePenalty = null; continue; } - presencePenalty = prop.Value.GetSingle(); - continue; - } - if (prop.NameEquals("response_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - responseFormat = null; - continue; + array.Add(ChatTool.DeserializeChatTool(item, options)); } - responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); + tools = array; continue; } - if (prop.NameEquals("seed"u8)) + if (prop.NameEquals("messages"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - seed = null; - continue; + array.Add(ChatMessage.DeserializeChatMessage(item, options)); } - seed = prop.Value.GetInt64(); + messages = array; continue; } - if (prop.NameEquals("service_tier"u8)) + if (prop.NameEquals("model"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - serviceTier = null; - continue; - } - serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); + model = InternalCreateChatCompletionRequestModel.DeserializeInternalCreateChatCompletionRequestModel(prop.Value, options); continue; } - if (prop.NameEquals("stop"u8)) + if (prop.NameEquals("n"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - stop = null; + n = null; continue; } - stop = BinaryData.FromString(prop.Value.GetRawText()); + n = prop.Value.GetInt32(); continue; } if (prop.NameEquals("stream"u8)) @@ -504,98 +429,117 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - streamOptions = null; continue; } streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(prop.Value, options); continue; } - if (prop.NameEquals("temperature"u8)) + if (prop.NameEquals("logprobs"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; + includeLogProbabilities = null; continue; } - temperature = prop.Value.GetSingle(); + includeLogProbabilities = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("top_p"u8)) + if (prop.NameEquals("top_logprobs"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; + topLogProbabilityCount = null; continue; } - topP = prop.Value.GetSingle(); + topLogProbabilityCount = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("tools"u8)) + if (prop.NameEquals("stop"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(ChatTool.DeserializeChatTool(item, options)); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } - tools = array; + stopSequences = array; continue; } - if (prop.NameEquals("tool_choice"u8)) + if (prop.NameEquals("logit_bias"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; continue; } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, prop0.Value.GetInt32()); + } + logitBiases = dictionary; continue; } - if (prop.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - parallelToolCalls = null; continue; } - parallelToolCalls = prop.Value.GetBoolean(); + toolChoice = ChatToolChoice.DeserializeChatToolChoice(prop.Value, options); continue; } - if (prop.NameEquals("user"u8)) + if (prop.NameEquals("function_call"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - user = null; continue; } - user = prop.Value.GetString(); + functionChoice = ChatFunctionChoice.DeserializeChatFunctionChoice(prop.Value, options); continue; } - if (prop.NameEquals("function_call"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - functionCall = null; + parallelToolCallsEnabled = null; continue; } - functionCall = BinaryData.FromString(prop.Value.GetRawText()); + parallelToolCallsEnabled = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("functions"u8)) + if (prop.NameEquals("user"u8)) + { + endUserId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("max_tokens"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + deprecatedMaxTokens = null; continue; } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) + deprecatedMaxTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("max_completion_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { - array.Add(ChatFunction.DeserializeChatFunction(item, options)); + maxOutputTokenCount = null; + continue; } - functions = array; + maxOutputTokenCount = prop.Value.GetInt32(); continue; } if (options.Format != "W") @@ -604,30 +548,28 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } } return new ChatCompletionOptions( - messages, - model, frequencyPenalty, - logitBias ?? new ChangeTrackingDictionary(), - logprobs, - topLogprobs, - maxTokens, - maxCompletionTokens, - n, presencePenalty, responseFormat, - seed, serviceTier, - stop, - stream, - streamOptions, temperature, topP, tools ?? new ChangeTrackingList(), + messages, + model, + n, + stream, + streamOptions, + includeLogProbabilities, + topLogProbabilityCount, + stopSequences ?? new ChangeTrackingList(), + logitBiases ?? new ChangeTrackingDictionary(), toolChoice, - parallelToolCalls, - user, - functionCall, - functions ?? new ChangeTrackingList(), + functionChoice, + parallelToolCallsEnabled, + endUserId, + deprecatedMaxTokens, + maxOutputTokenCount, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index a5fa430d4..0674ef7d8 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -11,32 +11,30 @@ public partial class ChatCompletionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(IList messages, InternalCreateChatCompletionRequestModel model, float? frequencyPenalty, IDictionary logitBias, bool? logprobs, int? topLogprobs, int? maxTokens, int? maxCompletionTokens, int? n, float? presencePenalty, ChatResponseFormat responseFormat, long? seed, InternalCreateChatCompletionRequestServiceTier? serviceTier, BinaryData stop, bool? stream, InternalChatCompletionStreamOptions streamOptions, float? temperature, float? topP, IList tools, BinaryData toolChoice, bool? parallelToolCalls, string user, BinaryData functionCall, IList functions, IDictionary additionalBinaryDataProperties) + internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, InternalCreateChatCompletionRequestServiceTier? serviceTier, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? parallelToolCallsEnabled, string endUserId, int? deprecatedMaxTokens, int? maxOutputTokenCount, IDictionary additionalBinaryDataProperties) { - Messages = messages; - Model = model; FrequencyPenalty = frequencyPenalty; - LogitBias = logitBias; - Logprobs = logprobs; - TopLogprobs = topLogprobs; - MaxTokens = maxTokens; - MaxCompletionTokens = maxCompletionTokens; - N = n; PresencePenalty = presencePenalty; ResponseFormat = responseFormat; - Seed = seed; ServiceTier = serviceTier; - Stop = stop; - Stream = stream; - StreamOptions = streamOptions; Temperature = temperature; TopP = topP; Tools = tools; + Messages = messages; + Model = model; + N = n; + Stream = stream; + StreamOptions = streamOptions; + IncludeLogProbabilities = includeLogProbabilities; + TopLogProbabilityCount = topLogProbabilityCount; + StopSequences = stopSequences; + LogitBiases = logitBiases; ToolChoice = toolChoice; - ParallelToolCalls = parallelToolCalls; - User = user; - FunctionCall = functionCall; - Functions = functions; + FunctionChoice = functionChoice; + ParallelToolCallsEnabled = parallelToolCallsEnabled; + EndUserId = endUserId; + _deprecatedMaxTokens = deprecatedMaxTokens; + MaxOutputTokenCount = maxOutputTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index 20c5a896e..2aaa6f575 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -31,17 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunction)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Description)) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); + if (Optional.IsDefined(FunctionDescription)) { writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WriteStringValue(FunctionDescription); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Parameters)) + if (Optional.IsDefined(FunctionParameters)) { writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(Parameters, options); + writer.WriteObjectValue(FunctionParameters, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -79,35 +79,29 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR { return null; } - string description = default; - string name = default; - InternalFunctionParameters parameters = default; + string functionName = default; + string functionDescription = default; + BinaryData functionParameters = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("description"u8)) + if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = prop.Value.GetString(); + functionName = prop.Value.GetString(); continue; } - if (prop.NameEquals("name"u8)) + if (prop.NameEquals("description"u8)) { - name = prop.Value.GetString(); + functionDescription = prop.Value.GetString(); continue; } if (prop.NameEquals("parameters"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - parameters = null; continue; } - parameters = InternalFunctionParameters.DeserializeInternalFunctionParameters(prop.Value, options); + functionParameters = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } if (options.Format != "W") @@ -115,7 +109,7 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatFunction(description, name, parameters, additionalBinaryDataProperties); + return new ChatFunction(functionName, functionDescription, functionParameters, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatFunction.cs b/.dotnet/src/Generated/Models/ChatFunction.cs index bc7cc08d9..87b61ec98 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.cs @@ -11,11 +11,11 @@ public partial class ChatFunction { private protected IDictionary _additionalBinaryDataProperties; - internal ChatFunction(string description, string name, InternalFunctionParameters parameters, IDictionary additionalBinaryDataProperties) + internal ChatFunction(string functionName, string functionDescription, BinaryData functionParameters, IDictionary additionalBinaryDataProperties) { - Description = description; - Name = name; - Parameters = parameters; + FunctionName = functionName; + FunctionDescription = functionDescription; + FunctionParameters = functionParameters; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index cf0c99b37..7fb6b5421 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -31,10 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(FunctionName); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(FunctionArguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,19 +71,19 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element { return null; } - string arguments = default; - string name = default; + string functionName = default; + string functionArguments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("arguments"u8)) + if (prop.NameEquals("name"u8)) { - arguments = prop.Value.GetString(); + functionName = prop.Value.GetString(); continue; } - if (prop.NameEquals("name"u8)) + if (prop.NameEquals("arguments"u8)) { - name = prop.Value.GetString(); + functionArguments = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -91,7 +91,7 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatFunctionCall(arguments, name, additionalBinaryDataProperties); + return new ChatFunctionCall(functionName, functionArguments, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.cs index 511289fe0..4be2bc191 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.cs @@ -11,10 +11,10 @@ public partial class ChatFunctionCall { private protected IDictionary _additionalBinaryDataProperties; - internal ChatFunctionCall(string arguments, string name, IDictionary additionalBinaryDataProperties) + internal ChatFunctionCall(string functionName, string functionArguments, IDictionary additionalBinaryDataProperties) { - Arguments = arguments; - Name = name; + FunctionName = functionName; + FunctionArguments = functionArguments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index 24fc11423..5de77dcc0 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Chat { public partial class ChatFunctionChoice : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -54,24 +46,7 @@ protected virtual ChatFunctionChoice JsonModelCreateCore(ref Utf8JsonReader read throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatFunctionChoice(document.RootElement, options); - } - - internal static ChatFunctionChoice DeserializeChatFunctionChoice(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ChatFunctionChoice(additionalBinaryDataProperties); + return ChatFunctionChoice.DeserializeChatFunctionChoice(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -98,7 +73,7 @@ protected virtual ChatFunctionChoice PersistableModelCreateCore(BinaryData data, case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeChatFunctionChoice(document.RootElement, options); + return ChatFunctionChoice.DeserializeChatFunctionChoice(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support reading '{options.Format}' format."); @@ -116,7 +91,7 @@ public static explicit operator ChatFunctionChoice(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeChatFunctionChoice(document.RootElement, ModelSerializationExtensions.WireOptions); + return ChatFunctionChoice.DeserializeChatFunctionChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 985972ece..3d99718a8 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Chat [PersistableModelProxy(typeof(InternalUnknownChatMessage))] public abstract partial class ChatMessage : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -28,7 +21,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role); + writer.WriteNumberValue((int)Role); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 5f65ad64b..64cd1cbb8 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -11,12 +11,12 @@ public abstract partial class ChatMessage { private protected IDictionary _additionalBinaryDataProperties; - private protected ChatMessage(string role) + private protected ChatMessage(Chat.ChatMessageRole role) { Role = role; } - internal ChatMessage(string role, IDictionary additionalBinaryDataProperties) + internal ChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) { Role = role; _additionalBinaryDataProperties = additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index de1bedc0b..a92216e44 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Chat { public partial class ChatMessageContentPart : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -54,24 +46,7 @@ protected virtual ChatMessageContentPart JsonModelCreateCore(ref Utf8JsonReader throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatMessageContentPart(document.RootElement, options); - } - - internal static ChatMessageContentPart DeserializeChatMessageContentPart(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ChatMessageContentPart(additionalBinaryDataProperties); + return ChatMessageContentPart.DeserializeChatMessageContentPart(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -98,7 +73,7 @@ protected virtual ChatMessageContentPart PersistableModelCreateCore(BinaryData d case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeChatMessageContentPart(document.RootElement, options); + return ChatMessageContentPart.DeserializeChatMessageContentPart(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support reading '{options.Format}' format."); @@ -116,7 +91,7 @@ public static explicit operator ChatMessageContentPart(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeChatMessageContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + return ChatMessageContentPart.DeserializeChatMessageContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 0cd89f94f..72efaee65 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -27,11 +27,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatOutputTokenUsageDetails)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ReasoningTokens)) - { - writer.WritePropertyName("reasoning_tokens"u8); - writer.WriteNumberValue(ReasoningTokens.Value); - } + writer.WritePropertyName("reasoning_tokens"u8); + writer.WriteNumberValue(ReasoningTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -68,7 +65,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai { return null; } - int? reasoningTokens = default; + int reasoningTokenCount = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -76,10 +73,9 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai { if (prop.Value.ValueKind == JsonValueKind.Null) { - reasoningTokens = null; continue; } - reasoningTokens = prop.Value.GetInt32(); + reasoningTokenCount = prop.Value.GetInt32(); continue; } if (options.Format != "W") @@ -87,7 +83,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatOutputTokenUsageDetails(reasoningTokens, additionalBinaryDataProperties); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs index ccb4c5f40..aa8406b2a 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs @@ -15,9 +15,9 @@ internal ChatOutputTokenUsageDetails() { } - internal ChatOutputTokenUsageDetails(int? reasoningTokens, IDictionary additionalBinaryDataProperties) + internal ChatOutputTokenUsageDetails(int reasoningTokenCount, IDictionary additionalBinaryDataProperties) { - ReasoningTokens = reasoningTokens; + ReasoningTokenCount = reasoningTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 941ff0e8d..3a73aa0e1 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -17,13 +17,6 @@ internal ChatResponseFormat() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 1c411b863..0d291c3ad 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -34,12 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("token"u8); writer.WriteStringValue(Token); writer.WritePropertyName("logprob"u8); - writer.WriteNumberValue(Logprob); - if (Bytes != null && Optional.IsCollectionDefined(Bytes)) + writer.WriteNumberValue(LogProbability); + if (Utf8Bytes != null) { writer.WritePropertyName("bytes"u8); writer.WriteStartArray(); - foreach (var item in Bytes) + foreach (byte item in Utf8Bytes.Value.Span) { writer.WriteNumberValue(item); } @@ -51,9 +51,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); - foreach (var item in TopLogprobs) + foreach (ChatTokenTopLogProbabilityDetails item in TopLogProbabilities) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -93,9 +93,9 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit return null; } string token = default; - float logprob = default; - IList bytes = default; - IList topLogprobs = default; + float logProbability = default; + ReadOnlyMemory? utf8Bytes = default; + IReadOnlyList topLogProbabilities = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -106,22 +106,21 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit } if (prop.NameEquals("logprob"u8)) { - logprob = prop.Value.GetSingle(); + logProbability = prop.Value.GetSingle(); continue; } if (prop.NameEquals("bytes"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - bytes = new ChangeTrackingList(); continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetInt32()); + array.Add(item.GetByte()); } - bytes = array; + utf8Bytes = array; continue; } if (prop.NameEquals("top_logprobs"u8)) @@ -131,7 +130,7 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit { array.Add(ChatTokenTopLogProbabilityDetails.DeserializeChatTokenTopLogProbabilityDetails(item, options)); } - topLogprobs = array; + topLogProbabilities = array; continue; } if (options.Format != "W") @@ -139,7 +138,7 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatTokenLogProbabilityDetails(token, logprob, bytes, topLogprobs, additionalBinaryDataProperties); + return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes, topLogProbabilities, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs index c54c3538e..6267472f6 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs @@ -12,20 +12,20 @@ public partial class ChatTokenLogProbabilityDetails { private protected IDictionary _additionalBinaryDataProperties; - internal ChatTokenLogProbabilityDetails(string token, float logprob, IEnumerable bytes, IEnumerable topLogprobs) + internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IEnumerable topLogProbabilities) { Token = token; - Logprob = logprob; - Bytes = bytes?.ToList(); - TopLogprobs = topLogprobs.ToList(); + LogProbability = logProbability; + Utf8Bytes = utf8Bytes; + TopLogProbabilities = topLogProbabilities.ToList(); } - internal ChatTokenLogProbabilityDetails(string token, float logprob, IList bytes, IList topLogprobs, IDictionary additionalBinaryDataProperties) + internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IReadOnlyList topLogProbabilities, IDictionary additionalBinaryDataProperties) { Token = token; - Logprob = logprob; - Bytes = bytes; - TopLogprobs = topLogprobs; + LogProbability = logProbability; + Utf8Bytes = utf8Bytes; + TopLogProbabilities = topLogProbabilities; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 8154ecc04..510710bc5 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -34,12 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("token"u8); writer.WriteStringValue(Token); writer.WritePropertyName("logprob"u8); - writer.WriteNumberValue(Logprob); - if (Bytes != null && Optional.IsCollectionDefined(Bytes)) + writer.WriteNumberValue(LogProbability); + if (Utf8Bytes != null) { writer.WritePropertyName("bytes"u8); writer.WriteStartArray(); - foreach (var item in Bytes) + foreach (byte item in Utf8Bytes.Value.Span) { writer.WriteNumberValue(item); } @@ -86,8 +86,8 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb return null; } string token = default; - float logprob = default; - IList bytes = default; + float logProbability = default; + ReadOnlyMemory? utf8Bytes = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -98,22 +98,21 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb } if (prop.NameEquals("logprob"u8)) { - logprob = prop.Value.GetSingle(); + logProbability = prop.Value.GetSingle(); continue; } if (prop.NameEquals("bytes"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - bytes = new ChangeTrackingList(); continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetInt32()); + array.Add(item.GetByte()); } - bytes = array; + utf8Bytes = array; continue; } if (options.Format != "W") @@ -121,7 +120,7 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatTokenTopLogProbabilityDetails(token, logprob, bytes, additionalBinaryDataProperties); + return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs index 5fe132edf..e4b6370e0 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace OpenAI.Chat { @@ -12,18 +11,18 @@ public partial class ChatTokenTopLogProbabilityDetails { private protected IDictionary _additionalBinaryDataProperties; - internal ChatTokenTopLogProbabilityDetails(string token, float logprob, IEnumerable bytes) + internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes) { Token = token; - Logprob = logprob; - Bytes = bytes?.ToList(); + LogProbability = logProbability; + Utf8Bytes = utf8Bytes; } - internal ChatTokenTopLogProbabilityDetails(string token, float logprob, IList bytes, IDictionary additionalBinaryDataProperties) + internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IDictionary additionalBinaryDataProperties) { Token = token; - Logprob = logprob; - Bytes = bytes; + LogProbability = logProbability; + Utf8Bytes = utf8Bytes; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index c7843a6ec..af500c3fc 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -32,15 +32,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ChatTokenUsage)} does not support writing '{format}' format."); } writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); + writer.WriteNumberValue(OutputTokenCount); writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); + writer.WriteNumberValue(InputTokenCount); writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - if (Optional.IsDefined(CompletionTokensDetails)) + writer.WriteNumberValue(TotalTokenCount); + if (Optional.IsDefined(OutputTokenDetails)) { writer.WritePropertyName("completion_tokens_details"u8); - writer.WriteObjectValue(CompletionTokensDetails, options); + writer.WriteObjectValue(OutputTokenDetails, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -78,36 +78,35 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo { return null; } - int completionTokens = default; - int promptTokens = default; - int totalTokens = default; - ChatOutputTokenUsageDetails completionTokensDetails = default; + int outputTokenCount = default; + int inputTokenCount = default; + int totalTokenCount = default; + ChatOutputTokenUsageDetails outputTokenDetails = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = prop.Value.GetInt32(); + outputTokenCount = prop.Value.GetInt32(); continue; } if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = prop.Value.GetInt32(); + inputTokenCount = prop.Value.GetInt32(); continue; } if (prop.NameEquals("total_tokens"u8)) { - totalTokens = prop.Value.GetInt32(); + totalTokenCount = prop.Value.GetInt32(); continue; } if (prop.NameEquals("completion_tokens_details"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - completionTokensDetails = null; continue; } - completionTokensDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); + outputTokenDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); continue; } if (options.Format != "W") @@ -115,7 +114,7 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatTokenUsage(completionTokens, promptTokens, totalTokens, completionTokensDetails, additionalBinaryDataProperties); + return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.cs index 45798fd0c..cbd96783b 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.cs @@ -11,19 +11,19 @@ public partial class ChatTokenUsage { private protected IDictionary _additionalBinaryDataProperties; - internal ChatTokenUsage(int completionTokens, int promptTokens, int totalTokens) + internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; + OutputTokenCount = outputTokenCount; + InputTokenCount = inputTokenCount; + TotalTokenCount = totalTokenCount; } - internal ChatTokenUsage(int completionTokens, int promptTokens, int totalTokens, ChatOutputTokenUsageDetails completionTokensDetails, IDictionary additionalBinaryDataProperties) + internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails, IDictionary additionalBinaryDataProperties) { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; - CompletionTokensDetails = completionTokensDetails; + OutputTokenCount = outputTokenCount; + InputTokenCount = inputTokenCount; + TotalTokenCount = totalTokenCount; + OutputTokenDetails = outputTokenDetails; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index c934886bc..07c119e37 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -31,10 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatTool)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); + writer.WritePropertyName("type"u8); + writer.WriteObjectValue(Kind, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,19 +71,19 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri { return null; } - ChatToolKind @type = default; InternalFunctionDefinition function = default; + ChatToolKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - @type = new ChatToolKind(prop.Value.GetString()); + function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } - if (prop.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); + kind = ChatToolKind.DeserializeChatToolKind(prop.Value, options); continue; } if (options.Format != "W") @@ -91,7 +91,7 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatTool(@type, function, additionalBinaryDataProperties); + return new ChatTool(function, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index 59e47d93c..1d097c149 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -12,10 +12,18 @@ public partial class ChatTool { private protected IDictionary _additionalBinaryDataProperties; - internal ChatTool(ChatToolKind @type, InternalFunctionDefinition function, IDictionary additionalBinaryDataProperties) + public ChatTool(InternalFunctionDefinition function, ChatToolKind kind) + { + Argument.AssertNotNull(function, nameof(function)); + + Function = function; + Kind = kind; + } + + internal ChatTool(InternalFunctionDefinition function, ChatToolKind kind, IDictionary additionalBinaryDataProperties) { - Type = @type; Function = function; + Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 5c28fa4a1..54cc0feec 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -33,10 +33,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); + writer.WritePropertyName("type"u8); + writer.WriteObjectValue(Kind, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,8 +74,8 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR return null; } string id = default; - ChatToolCallKind @type = default; InternalChatCompletionMessageToolCallFunction function = default; + ChatToolCallKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -84,14 +84,14 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR id = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - @type = new ChatToolCallKind(prop.Value.GetString()); + function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(prop.Value, options); continue; } - if (prop.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(prop.Value, options); + kind = ChatToolCallKind.DeserializeChatToolCallKind(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatToolCall(id, @type, function, additionalBinaryDataProperties); + return new ChatToolCall(id, function, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index b768ace4e..d95960a06 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { @@ -11,11 +12,21 @@ public partial class ChatToolCall { private protected IDictionary _additionalBinaryDataProperties; - internal ChatToolCall(string id, ChatToolCallKind @type, InternalChatCompletionMessageToolCallFunction function, IDictionary additionalBinaryDataProperties) + public ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, ChatToolCallKind kind) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(function, nameof(function)); + + Id = id; + Function = function; + Kind = kind; + } + + internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { Id = id; - Type = @type; Function = function; + Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index 7e7e75895..aae1ac21e 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Chat { public partial class ChatToolChoice : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -54,24 +46,7 @@ protected virtual ChatToolChoice JsonModelCreateCore(ref Utf8JsonReader reader, throw new FormatException($"The model {nameof(ChatToolChoice)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatToolChoice(document.RootElement, options); - } - - internal static ChatToolChoice DeserializeChatToolChoice(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ChatToolChoice(additionalBinaryDataProperties); + return ChatToolChoice.DeserializeChatToolChoice(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -98,7 +73,7 @@ protected virtual ChatToolChoice PersistableModelCreateCore(BinaryData data, Mod case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeChatToolChoice(document.RootElement, options); + return ChatToolChoice.DeserializeChatToolChoice(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ChatToolChoice)} does not support reading '{options.Format}' format."); @@ -116,7 +91,7 @@ public static explicit operator ChatToolChoice(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeChatToolChoice(document.RootElement, ModelSerializationExtensions.WireOptions); + return ChatToolChoice.DeserializeChatToolChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs index c66be97ed..08eddb8f6 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Assistants { public partial class CodeInterpreterToolDefinition : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 43ccab118..4b88b9f80 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -27,21 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(CodeInterpreterToolResources)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -78,37 +63,15 @@ internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResou { return null; } - IList fileIds = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("file_ids"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetString()); - } - } - fileIds = array; - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new CodeInterpreterToolResources(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new CodeInterpreterToolResources(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs index 4c5e382c9..ae3565d48 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs @@ -11,9 +11,8 @@ public partial class CodeInterpreterToolResources { private protected IDictionary _additionalBinaryDataProperties; - internal CodeInterpreterToolResources(IList fileIds, IDictionary additionalBinaryDataProperties) + internal CodeInterpreterToolResources(IDictionary additionalBinaryDataProperties) { - FileIds = fileIds; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/Embedding.Serialization.cs b/.dotnet/src/Generated/Models/Embedding.Serialization.cs index a85c31e86..6d2fc9ed6 100644 --- a/.dotnet/src/Generated/Models/Embedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/Embedding.Serialization.cs @@ -33,17 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("index"u8); writer.WriteNumberValue(Index); - writer.WritePropertyName("embedding"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Embedding); -#else - using (JsonDocument document = JsonDocument.Parse(Embedding)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -81,8 +70,6 @@ internal static Embedding DeserializeEmbedding(JsonElement element, ModelReaderW return null; } int index = default; - BinaryData embedding = default; - InternalEmbeddingObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -91,22 +78,12 @@ internal static Embedding DeserializeEmbedding(JsonElement element, ModelReaderW index = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("embedding"u8)) - { - embedding = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("object"u8)) - { - @object = new InternalEmbeddingObject(prop.Value.GetString()); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new Embedding(index, embedding, @object, additionalBinaryDataProperties); + return new Embedding(index, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/Embedding.cs b/.dotnet/src/Generated/Models/Embedding.cs index 7225eee4c..3c4831592 100644 --- a/.dotnet/src/Generated/Models/Embedding.cs +++ b/.dotnet/src/Generated/Models/Embedding.cs @@ -11,6 +11,17 @@ public partial class Embedding { private protected IDictionary _additionalBinaryDataProperties; + internal Embedding(int index) + { + Index = index; + } + + internal Embedding(int index, IDictionary additionalBinaryDataProperties) + { + Index = index; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs index 8aefb6a4e..5ed4de085 100644 --- a/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingCollection.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Embeddings { public partial class EmbeddingCollection : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -27,19 +19,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -67,53 +52,7 @@ protected virtual EmbeddingCollection JsonModelCreateCore(ref Utf8JsonReader rea throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEmbeddingCollection(document.RootElement, options); - } - - internal static EmbeddingCollection DeserializeEmbeddingCollection(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList data = default; - string model = default; - InternalCreateEmbeddingResponseObject @object = default; - EmbeddingTokenUsage usage = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(Embedding.DeserializeEmbedding(item, options)); - } - data = array; - continue; - } - if (prop.NameEquals("model"u8)) - { - model = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("object"u8)) - { - @object = new InternalCreateEmbeddingResponseObject(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("usage"u8)) - { - usage = EmbeddingTokenUsage.DeserializeEmbeddingTokenUsage(prop.Value, options); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new EmbeddingCollection(data, model, @object, usage, additionalBinaryDataProperties); + return EmbeddingCollection.DeserializeEmbeddingCollection(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -140,7 +79,7 @@ protected virtual EmbeddingCollection PersistableModelCreateCore(BinaryData data case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeEmbeddingCollection(document.RootElement, options); + return EmbeddingCollection.DeserializeEmbeddingCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(EmbeddingCollection)} does not support reading '{options.Format}' format."); @@ -158,7 +97,7 @@ public static explicit operator EmbeddingCollection(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeEmbeddingCollection(document.RootElement, ModelSerializationExtensions.WireOptions); + return EmbeddingCollection.DeserializeEmbeddingCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingCollection.cs b/.dotnet/src/Generated/Models/EmbeddingCollection.cs index 12888211a..8ce62aab4 100644 --- a/.dotnet/src/Generated/Models/EmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/EmbeddingCollection.cs @@ -11,12 +11,18 @@ public partial class EmbeddingCollection { private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingCollection(IList data, string model, InternalCreateEmbeddingResponseObject @object, EmbeddingTokenUsage usage, IDictionary additionalBinaryDataProperties) + internal EmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object) { - Data = data; Model = model; + Usage = usage; Object = @object; + } + + internal EmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object, IDictionary additionalBinaryDataProperties) + { + Model = model; Usage = usage; + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 6a1a641cb..76259c08e 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -27,31 +27,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(EmbeddingGenerationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("input"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Input); -#else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - if (Optional.IsDefined(EncodingFormat)) - { - writer.WritePropertyName("encoding_format"u8); - writer.WriteStringValue(EncodingFormat.Value.ToString()); - } if (Optional.IsDefined(Dimensions)) { writer.WritePropertyName("dimensions"u8); writer.WriteNumberValue(Dimensions.Value); } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(User); + writer.WriteStringValue(EndUserId); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -89,34 +73,11 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions { return null; } - BinaryData input = default; - InternalCreateEmbeddingRequestModel model = default; - InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default; int? dimensions = default; - string user = default; + string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("input"u8)) - { - input = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("model"u8)) - { - model = new InternalCreateEmbeddingRequestModel(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("encoding_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - encodingFormat = null; - continue; - } - encodingFormat = new InternalCreateEmbeddingRequestEncodingFormat(prop.Value.GetString()); - continue; - } if (prop.NameEquals("dimensions"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -129,12 +90,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - user = null; - continue; - } - user = prop.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -142,13 +98,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new EmbeddingGenerationOptions( - input, - model, - encodingFormat, - dimensions, - user, - additionalBinaryDataProperties); + return new EmbeddingGenerationOptions(dimensions, endUserId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index f8117cb9c..012ffd763 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -11,13 +11,10 @@ public partial class EmbeddingGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingGenerationOptions(BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, int? dimensions, string user, IDictionary additionalBinaryDataProperties) + internal EmbeddingGenerationOptions(int? dimensions, string endUserId, IDictionary additionalBinaryDataProperties) { - Input = input; - Model = model; - EncodingFormat = encodingFormat; Dimensions = dimensions; - User = user; + EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index bbba1628f..05d4b6902 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -31,10 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokens); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,19 +71,19 @@ internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement e { return null; } - int promptTokens = default; int totalTokens = default; + int inputTokens = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - promptTokens = prop.Value.GetInt32(); + totalTokens = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("total_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - totalTokens = prop.Value.GetInt32(); + inputTokens = prop.Value.GetInt32(); continue; } if (options.Format != "W") @@ -91,7 +91,7 @@ internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement e additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new EmbeddingTokenUsage(promptTokens, totalTokens, additionalBinaryDataProperties); + return new EmbeddingTokenUsage(totalTokens, inputTokens, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs index 403e9b087..114d3cd97 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs @@ -11,16 +11,16 @@ public partial class EmbeddingTokenUsage { private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingTokenUsage(int promptTokens, int totalTokens) + internal EmbeddingTokenUsage(int totalTokens, int inputTokens) { - PromptTokens = promptTokens; TotalTokens = totalTokens; + InputTokens = inputTokens; } - internal EmbeddingTokenUsage(int promptTokens, int totalTokens, IDictionary additionalBinaryDataProperties) + internal EmbeddingTokenUsage(int totalTokens, int inputTokens, IDictionary additionalBinaryDataProperties) { - PromptTokens = promptTokens; TotalTokens = totalTokens; + InputTokens = inputTokens; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index 7efd2ffaf..b879c359b 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -31,12 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(FileId); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele { return null; } - string id = default; - InternalDeleteFileResponseObject @object = default; bool deleted = default; + string fileId = default; + InternalDeleteFileResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("deleted"u8)) { - id = prop.Value.GetString(); + deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("id"u8)) { - @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); + fileId = prop.Value.GetString(); continue; } - if (prop.NameEquals("deleted"u8)) + if (prop.NameEquals("object"u8)) { - deleted = prop.Value.GetBoolean(); + @object = InternalDeleteFileResponseObject.DeserializeInternalDeleteFileResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileDeletionResult(id, @object, deleted, additionalBinaryDataProperties); + return new FileDeletionResult(deleted, fileId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index 0194d13f2..f08b22a18 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -11,17 +11,18 @@ public partial class FileDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal FileDeletionResult(string id, bool deleted) + internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileResponseObject @object) { - Id = id; Deleted = deleted; + FileId = fileId; + Object = @object; } - internal FileDeletionResult(string id, InternalDeleteFileResponseObject @object, bool deleted, IDictionary additionalBinaryDataProperties) + internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; - Object = @object; Deleted = deleted; + FileId = fileId; + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index 642e7cfae..2b933fc23 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -32,11 +32,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FileFromStoreRemovalResult)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WriteStringValue(FileId); writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); + writer.WriteBooleanValue(Removed); writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult { return null; } - string id = default; - bool deleted = default; + string fileId = default; + bool removed = default; InternalDeleteVectorStoreFileResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("id"u8)) { - id = prop.Value.GetString(); + fileId = prop.Value.GetString(); continue; } if (prop.NameEquals("deleted"u8)) { - deleted = prop.Value.GetBoolean(); + removed = prop.Value.GetBoolean(); continue; } if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); + @object = InternalDeleteVectorStoreFileResponseObject.DeserializeInternalDeleteVectorStoreFileResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileFromStoreRemovalResult(id, deleted, @object, additionalBinaryDataProperties); + return new FileFromStoreRemovalResult(fileId, removed, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index dd8ecd84f..ae39caa10 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -11,16 +11,17 @@ public partial class FileFromStoreRemovalResult { private protected IDictionary _additionalBinaryDataProperties; - internal FileFromStoreRemovalResult(string id, bool deleted) + internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object) { - Id = id; - Deleted = deleted; + FileId = fileId; + Removed = removed; + Object = @object; } - internal FileFromStoreRemovalResult(string id, bool deleted, InternalDeleteVectorStoreFileResponseObject @object, IDictionary additionalBinaryDataProperties) + internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; - Deleted = deleted; + FileId = fileId; + Removed = removed; Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 30135303e..73aacc5f2 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -32,8 +32,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ranker"u8); writer.WriteStringValue(Ranker.Value.ToString()); } - writer.WritePropertyName("score_threshold"u8); - writer.WriteNumberValue(ScoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,7 +69,6 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso return null; } FileSearchRanker? ranker = default; - float scoreThreshold = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -85,17 +82,12 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso ranker = new FileSearchRanker(prop.Value.GetString()); continue; } - if (prop.NameEquals("score_threshold"u8)) - { - scoreThreshold = prop.Value.GetSingle(); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileSearchRankingOptions(ranker, scoreThreshold, additionalBinaryDataProperties); + return new FileSearchRankingOptions(ranker, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs index 3730d36f9..bd4061f3f 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs @@ -11,10 +11,9 @@ public partial class FileSearchRankingOptions { private protected IDictionary _additionalBinaryDataProperties; - internal FileSearchRankingOptions(FileSearchRanker? ranker, float scoreThreshold, IDictionary additionalBinaryDataProperties) + internal FileSearchRankingOptions(FileSearchRanker? ranker, IDictionary additionalBinaryDataProperties) { Ranker = ranker; - ScoreThreshold = scoreThreshold; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 308a9c003..1c3686881 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Assistants { public partial class FileSearchToolDefinition : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index b3409b905..8b65b745e 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); - foreach (var item in VectorStoreIds) + foreach (string item in VectorStoreIds) { if (item == null) { @@ -42,13 +42,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(VectorStores)) + if (Optional.IsCollectionDefined(NewVectorStores)) { writer.WritePropertyName("vector_stores"u8); writer.WriteStartArray(); - foreach (var item in VectorStores) + foreach (VectorStoreCreationHelper item in NewVectorStores) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -89,7 +89,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE return null; } IList vectorStoreIds = default; - IList vectorStores = default; + IList newVectorStores = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -125,7 +125,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE { array.Add(VectorStoreCreationHelper.DeserializeVectorStoreCreationHelper(item, options)); } - vectorStores = array; + newVectorStores = array; continue; } if (options.Format != "W") @@ -133,7 +133,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileSearchToolResources(vectorStoreIds ?? new ChangeTrackingList(), vectorStores ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new FileSearchToolResources(vectorStoreIds ?? new ChangeTrackingList(), newVectorStores ?? new ChangeTrackingList(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.cs index 88318ee26..de45145bf 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.cs @@ -11,10 +11,10 @@ public partial class FileSearchToolResources { private protected IDictionary _additionalBinaryDataProperties; - internal FileSearchToolResources(IList vectorStoreIds, IList vectorStores, IDictionary additionalBinaryDataProperties) + internal FileSearchToolResources(IList vectorStoreIds, IList newVectorStores, IDictionary additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; - VectorStores = vectorStores; + NewVectorStores = newVectorStores; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index aa604bc57..ddc149555 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); - foreach (var item in Tags) + foreach (string item in Tags) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index c8e7b83f7..fe924e907 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -84,7 +84,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(OrganizationId); writer.WritePropertyName("result_files"u8); writer.WriteStartArray(); - foreach (var item in ResultFiles) + foreach (string item in ResultFiles) { if (item == null) { @@ -122,7 +122,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("integrations"u8); writer.WriteStartArray(); - foreach (var item in Integrations) + foreach (InternalFineTuningIntegration item in Integrations) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index ed6755886..cb9cffa9b 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters : IJsonModel, IJsonModel { - public FineTuningJobHyperparameters() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,33 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningJobHyperparameters)} does not support writing '{format}' format."); } - writer.WritePropertyName("n_epochs"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(NEpochs); -#else - using (JsonDocument document = JsonDocument.Parse(NEpochs)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("batch_size"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(BatchSize); -#else - using (JsonDocument document = JsonDocument.Parse(BatchSize)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("learning_rate_multiplier"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(LearningRateMultiplier); -#else - using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -94,33 +63,15 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame { return null; } - BinaryData nEpochs = default; - BinaryData batchSize = default; - BinaryData learningRateMultiplier = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("n_epochs"u8)) - { - nEpochs = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("batch_size"u8)) - { - batchSize = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("learning_rate_multiplier"u8)) - { - learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FineTuningJobHyperparameters(nEpochs, batchSize, learningRateMultiplier, additionalBinaryDataProperties); + return new FineTuningJobHyperparameters(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 913a36676..2a3242d7a 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -11,18 +11,12 @@ internal readonly partial struct FineTuningJobHyperparameters { private protected IDictionary _additionalBinaryDataProperties; - internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) + internal FineTuningJobHyperparameters() { - NEpochs = nEpochs; - BatchSize = batchSize; - LearningRateMultiplier = learningRateMultiplier; } - internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary additionalBinaryDataProperties) + internal FineTuningJobHyperparameters(IDictionary additionalBinaryDataProperties) { - NEpochs = nEpochs; - BatchSize = batchSize; - LearningRateMultiplier = learningRateMultiplier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index c42d5d5d8..54591c323 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -70,7 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("integrations"u8); writer.WriteStartArray(); - foreach (var item in Integrations) + foreach (FineTuningIntegration item in Integrations) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index ca80e05d4..7f71c939b 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -17,13 +17,6 @@ internal FunctionChatMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -42,7 +35,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("content"u8); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(FunctionName); } FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionChatMessage)JsonModelCreateCore(ref reader, options); @@ -65,8 +58,8 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e return null; } string content = default; - string name = default; - string role = "function"; + string functionName = default; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -82,12 +75,12 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e } if (prop.NameEquals("name"u8)) { - name = prop.Value.GetString(); + functionName = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") @@ -95,7 +88,7 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionChatMessage(content, name, role, additionalBinaryDataProperties); + return new FunctionChatMessage(content, functionName, role, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index 6407c6b04..9fbed4864 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -9,10 +9,10 @@ namespace OpenAI.Chat { public partial class FunctionChatMessage : ChatMessage { - internal FunctionChatMessage(string content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal FunctionChatMessage(string content, string functionName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; - Name = name; + FunctionName = functionName; } public string Content { get; set; } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index f2652b948..b20c91917 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Assistants { public partial class FunctionToolDefinition : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index 59504a5d1..c0febdf22 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -27,20 +27,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(GeneratedImage)} does not support writing '{format}' format."); } - if (Optional.IsDefined(B64Json)) + if (Optional.IsDefined(RevisedPrompt)) { - writer.WritePropertyName("b64_json"u8); - writer.WriteBase64StringValue(B64Json.ToArray(), "D"); + writer.WritePropertyName("revised_prompt"u8); + writer.WriteStringValue(RevisedPrompt); } - if (Optional.IsDefined(Url)) + if (Optional.IsDefined(ImageBytes)) { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); + writer.WritePropertyName("b64_json"u8); + writer.WriteObjectValue(ImageBytes, options); } - if (Optional.IsDefined(RevisedPrompt)) + if (Optional.IsDefined(ImageUri)) { - writer.WritePropertyName("revised_prompt"u8); - writer.WriteStringValue(RevisedPrompt); + writer.WritePropertyName("url"u8); + writer.WriteObjectValue(ImageUri, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -78,40 +78,38 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo { return null; } - BinaryData b64Json = default; - Uri url = default; string revisedPrompt = default; + BinaryData imageBytes = default; + Uri imageUri = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("b64_json"u8)) + if (prop.NameEquals("revised_prompt"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - b64Json = null; + revisedPrompt = null; continue; } - b64Json = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + revisedPrompt = prop.Value.GetString(); continue; } - if (prop.NameEquals("url"u8)) + if (prop.NameEquals("b64_json"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - url = null; continue; } - url = new Uri(prop.Value.GetString()); + imageBytes = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } - if (prop.NameEquals("revised_prompt"u8)) + if (prop.NameEquals("url"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - revisedPrompt = null; continue; } - revisedPrompt = prop.Value.GetString(); + imageUri = Uri.DeserializeUri(prop.Value, options); continue; } if (options.Format != "W") @@ -119,7 +117,7 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new GeneratedImage(b64Json, url, revisedPrompt, additionalBinaryDataProperties); + return new GeneratedImage(revisedPrompt, imageBytes, imageUri, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/GeneratedImage.cs b/.dotnet/src/Generated/Models/GeneratedImage.cs index 71687f810..b977c0267 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.cs @@ -15,11 +15,11 @@ internal GeneratedImage() { } - internal GeneratedImage(BinaryData b64Json, Uri url, string revisedPrompt, IDictionary additionalBinaryDataProperties) + internal GeneratedImage(string revisedPrompt, BinaryData imageBytes, Uri imageUri, IDictionary additionalBinaryDataProperties) { - B64Json = b64Json; - Url = url; RevisedPrompt = revisedPrompt; + ImageBytes = imageBytes; + ImageUri = imageUri; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 527e767eb..31f4d5cc0 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Images { public partial class GeneratedImageCollection : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -27,15 +19,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,41 +46,7 @@ protected virtual GeneratedImageCollection JsonModelCreateCore(ref Utf8JsonReade throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGeneratedImageCollection(document.RootElement, options); - } - - internal static GeneratedImageCollection DeserializeGeneratedImageCollection(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset created = default; - IList data = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("created"u8)) - { - created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); - continue; - } - if (prop.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(GeneratedImage.DeserializeGeneratedImage(item, options)); - } - data = array; - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new GeneratedImageCollection(created, data, additionalBinaryDataProperties); + return GeneratedImageCollection.DeserializeGeneratedImageCollection(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -124,7 +73,7 @@ protected virtual GeneratedImageCollection PersistableModelCreateCore(BinaryData case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeGeneratedImageCollection(document.RootElement, options); + return GeneratedImageCollection.DeserializeGeneratedImageCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support reading '{options.Format}' format."); @@ -142,7 +91,7 @@ public static explicit operator GeneratedImageCollection(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeGeneratedImageCollection(document.RootElement, ModelSerializationExtensions.WireOptions); + return GeneratedImageCollection.DeserializeGeneratedImageCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index 55c74445a..c9ce6b76a 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -11,10 +11,8 @@ public partial class GeneratedImageCollection { private protected IDictionary _additionalBinaryDataProperties; - internal GeneratedImageCollection(DateTimeOffset created, IList data, IDictionary additionalBinaryDataProperties) + internal GeneratedImageCollection(IDictionary additionalBinaryDataProperties) { - Created = created; - Data = data; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index d1e2b40fe..b8a792b46 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -27,45 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("image"u8); - writer.WriteBase64StringValue(Image.ToArray(), "D"); - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - if (Optional.IsDefined(Mask)) - { - writer.WritePropertyName("mask"u8); - writer.WriteBase64StringValue(Mask.ToArray(), "D"); - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"u8); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); - } - else - { - writer.WriteNull("n"u8); - } - } if (Optional.IsDefined(Size)) { if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + writer.WriteObjectValue?>(Size, options); } else { @@ -77,17 +44,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + writer.WriteObjectValue?>(ResponseFormat, options); } else { writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(User); + writer.WriteStringValue(EndUserId); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -125,57 +92,12 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element { return null; } - BinaryData image = default; - string prompt = default; - BinaryData mask = default; - InternalCreateImageEditRequestModel? model = default; - int? n = default; - InternalCreateImageEditRequestSize? size = default; - InternalCreateImageEditRequestResponseFormat? responseFormat = default; - string user = default; + Images.OpenAI.Images.GeneratedImageSize? size = default; + Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("image"u8)) - { - image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("prompt"u8)) - { - prompt = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("mask"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - mask = null; - continue; - } - mask = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageEditRequestModel(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("n"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - n = null; - continue; - } - n = prop.Value.GetInt32(); - continue; - } if (prop.NameEquals("size"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -183,7 +105,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element size = null; continue; } - size = new InternalCreateImageEditRequestSize(prop.Value.GetString()); + size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) @@ -193,17 +115,12 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element responseFormat = null; continue; } - responseFormat = new InternalCreateImageEditRequestResponseFormat(prop.Value.GetString()); + responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); continue; } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - user = null; - continue; - } - user = prop.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -211,16 +128,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ImageEditOptions( - image, - prompt, - mask, - model, - n, - size, - responseFormat, - user, - additionalBinaryDataProperties); + return new ImageEditOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index 2b87b6500..7cd25a231 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -11,16 +11,11 @@ public partial class ImageEditOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageEditOptions(BinaryData image, string prompt, BinaryData mask, InternalCreateImageEditRequestModel? model, int? n, InternalCreateImageEditRequestSize? size, InternalCreateImageEditRequestResponseFormat? responseFormat, string user, IDictionary additionalBinaryDataProperties) + internal ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { - Image = image; - Prompt = prompt; - Mask = mask; - Model = model; - N = n; Size = size; ResponseFormat = responseFormat; - User = user; + EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index adddd2580..20b0b75bc 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -27,32 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"u8); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); - } - else - { - writer.WriteNull("n"u8); - } - } if (Optional.IsDefined(Quality)) { writer.WritePropertyName("quality"u8); @@ -94,10 +68,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("style"u8); } } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(User); + writer.WriteStringValue(EndUserId); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -135,42 +109,14 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle { return null; } - string prompt = default; - InternalCreateImageRequestModel? model = default; - int? n = default; Images.GeneratedImageQuality? quality = default; Images.GeneratedImageFormat? responseFormat = default; GeneratedImageSize? size = default; Images.GeneratedImageStyle? style = default; - string user = default; + string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("prompt"u8)) - { - prompt = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageRequestModel(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("n"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - n = null; - continue; - } - n = prop.Value.GetInt32(); - continue; - } if (prop.NameEquals("quality"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -213,12 +159,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - user = null; - continue; - } - user = prop.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -227,14 +168,11 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle } } return new ImageGenerationOptions( - prompt, - model, - n, quality, responseFormat, size, style, - user, + endUserId, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index 4802454a1..24ef4046d 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -11,16 +11,13 @@ public partial class ImageGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageGenerationOptions(string prompt, InternalCreateImageRequestModel? model, int? n, Images.GeneratedImageQuality? quality, Images.GeneratedImageFormat? responseFormat, GeneratedImageSize? size, Images.GeneratedImageStyle? style, string user, IDictionary additionalBinaryDataProperties) + internal ImageGenerationOptions(Images.GeneratedImageQuality? quality, Images.GeneratedImageFormat? responseFormat, GeneratedImageSize? size, Images.GeneratedImageStyle? style, string endUserId, IDictionary additionalBinaryDataProperties) { - Prompt = prompt; - Model = model; - N = n; Quality = quality; ResponseFormat = responseFormat; Size = size; Style = style; - User = user; + EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index d71bff04c..86b1e9422 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -27,30 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("image"u8); - writer.WriteBase64StringValue(Image.ToArray(), "D"); - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"u8); - } - } - if (Optional.IsDefined(N)) + if (Optional.IsDefined(Size)) { - if (N != null) + if (Size != null) { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); + writer.WritePropertyName("size"u8); + writer.WriteObjectValue?>(Size, options); } else { - writer.WriteNull("n"u8); + writer.WriteNull("size"u8); } } if (Optional.IsDefined(ResponseFormat)) @@ -58,29 +44,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + writer.WriteObjectValue?>(ResponseFormat, options); } else { writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(Size)) - { - if (Size != null) - { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); - } - else - { - writer.WriteNull("size"u8); - } - } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); - writer.WriteStringValue(User); + writer.WriteStringValue(EndUserId); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -118,38 +92,20 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme { return null; } - BinaryData image = default; - InternalCreateImageVariationRequestModel? model = default; - int? n = default; - InternalCreateImageVariationRequestResponseFormat? responseFormat = default; - InternalCreateImageVariationRequestSize? size = default; - string user = default; + Images.OpenAI.Images.GeneratedImageSize? size = default; + Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("image"u8)) - { - image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageVariationRequestModel(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("n"u8)) + if (prop.NameEquals("size"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - n = null; + size = null; continue; } - n = prop.Value.GetInt32(); + size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) @@ -159,27 +115,12 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme responseFormat = null; continue; } - responseFormat = new InternalCreateImageVariationRequestResponseFormat(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("size"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - size = null; - continue; - } - size = new InternalCreateImageVariationRequestSize(prop.Value.GetString()); + responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); continue; } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - user = null; - continue; - } - user = prop.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -187,14 +128,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ImageVariationOptions( - image, - model, - n, - responseFormat, - size, - user, - additionalBinaryDataProperties); + return new ImageVariationOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 928143eb3..87a2f7ee7 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -11,14 +11,11 @@ public partial class ImageVariationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageVariationOptions(BinaryData image, InternalCreateImageVariationRequestModel? model, int? n, InternalCreateImageVariationRequestResponseFormat? responseFormat, InternalCreateImageVariationRequestSize? size, string user, IDictionary additionalBinaryDataProperties) + internal ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { - Image = image; - Model = model; - N = n; - ResponseFormat = responseFormat; Size = size; - User = user; + ResponseFormat = responseFormat; + EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index 7e56790ed..93171a47d 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -27,16 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchFileSearch)} does not support writing '{format}' format."); } - if (Optional.IsDefined(MaxNumResults)) - { - writer.WritePropertyName("max_num_results"u8); - writer.WriteNumberValue(MaxNumResults.Value); - } if (Optional.IsDefined(RankingOptions)) { writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } + if (Optional.IsDefined(InternalMaxNumResults)) + { + writer.WritePropertyName("max_num_results"u8); + writer.WriteNumberValue(InternalMaxNumResults.Value); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,29 +73,29 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs { return null; } - int? maxNumResults = default; FileSearchRankingOptions rankingOptions = default; + int? internalMaxNumResults = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("max_num_results"u8)) + if (prop.NameEquals("ranking_options"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxNumResults = null; + rankingOptions = null; continue; } - maxNumResults = prop.Value.GetInt32(); + rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); continue; } - if (prop.NameEquals("ranking_options"u8)) + if (prop.NameEquals("max_num_results"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - rankingOptions = null; + internalMaxNumResults = null; continue; } - rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); + internalMaxNumResults = prop.Value.GetInt32(); continue; } if (options.Format != "W") @@ -103,7 +103,7 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalAssistantToolsFileSearchFileSearch(maxNumResults, rankingOptions, additionalBinaryDataProperties); + return new InternalAssistantToolsFileSearchFileSearch(rankingOptions, internalMaxNumResults, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs index a6adb045f..3ba4d07b8 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs @@ -15,10 +15,10 @@ public InternalAssistantToolsFileSearchFileSearch() { } - internal InternalAssistantToolsFileSearchFileSearch(int? maxNumResults, FileSearchRankingOptions rankingOptions, IDictionary additionalBinaryDataProperties) + internal InternalAssistantToolsFileSearchFileSearch(FileSearchRankingOptions rankingOptions, int? internalMaxNumResults, IDictionary additionalBinaryDataProperties) { - MaxNumResults = maxNumResults; RankingOptions = rankingOptions; + InternalMaxNumResults = internalMaxNumResults; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index a9c8cc293..a3f6bdd20 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (InternalBatchError item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index 0b9982266..a16e46147 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -31,13 +31,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImageImageUrl)} does not support writing '{format}' format."); } - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail.Value.ToString()); } + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,16 +74,11 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des { return null; } - Uri url = default; ChatImageDetailLevel? detail = default; + string url = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("url"u8)) - { - url = new Uri(prop.Value.GetString()); - continue; - } if (prop.NameEquals("detail"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -94,12 +89,17 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des detail = new ChatImageDetailLevel(prop.Value.GetString()); continue; } + if (prop.NameEquals("url"u8)) + { + url = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalChatCompletionRequestMessageContentPartImageImageUrl(url, detail, additionalBinaryDataProperties); + return new InternalChatCompletionRequestMessageContentPartImageImageUrl(detail, url, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index 1e13d3f53..bfbabcbf1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -11,10 +11,10 @@ internal partial class InternalChatCompletionRequestMessageContentPartImageImage { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionRequestMessageContentPartImageImageUrl(Uri url, ChatImageDetailLevel? detail, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageDetailLevel? detail, string url, IDictionary additionalBinaryDataProperties) { - Url = url; Detail = detail; + Url = url; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index a7d973a28..e3ec71a0c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -17,13 +16,6 @@ internal InternalChatCompletionResponseMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -31,15 +23,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support writing '{format}' format."); } - if (Content != null) - { - writer.WritePropertyName("content"u8); - writer.WriteStringValue(Content); - } - else - { - writer.WriteNull("content"u8); - } if (Refusal != null) { writer.WritePropertyName("refusal"u8); @@ -53,18 +36,32 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (ChatToolCall item in ToolCalls) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); + writer.WriteNumberValue((int)Role); + if (Content != null && Optional.IsCollectionDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ChatMessageContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("content"u8); + } if (Optional.IsDefined(FunctionCall)) { writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionCall, options); + writer.WriteObjectValue(FunctionCall, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -93,84 +90,7 @@ protected virtual InternalChatCompletionResponseMessage JsonModelCreateCore(ref throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); - } - - internal static InternalChatCompletionResponseMessage DeserializeInternalChatCompletionResponseMessage(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string content = default; - string refusal = default; - IList toolCalls = default; - InternalChatCompletionResponseMessageRole role = default; - InternalChatCompletionResponseMessageFunctionCall functionCall = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("content"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("refusal"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - refusal = null; - continue; - } - refusal = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("tool_calls"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); - } - toolCalls = array; - continue; - } - if (prop.NameEquals("role"u8)) - { - role = new InternalChatCompletionResponseMessageRole(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("function_call"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = InternalChatCompletionResponseMessageFunctionCall.DeserializeInternalChatCompletionResponseMessageFunctionCall(prop.Value, options); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new InternalChatCompletionResponseMessage( - content, - refusal, - toolCalls ?? new ChangeTrackingList(), - role, - functionCall, - additionalBinaryDataProperties); + return InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -197,7 +117,7 @@ protected virtual InternalChatCompletionResponseMessage PersistableModelCreateCo case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); + return InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support reading '{options.Format}' format."); @@ -215,7 +135,7 @@ public static explicit operator InternalChatCompletionResponseMessage(ClientResu { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionResponseMessage(document.RootElement, ModelSerializationExtensions.WireOptions); + return InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index 4ba554ee7..deb08db26 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.Linq; using OpenAI; namespace OpenAI.Chat @@ -12,19 +13,20 @@ internal partial class InternalChatCompletionResponseMessage { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionResponseMessage(string content, string refusal) + internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageRole role, IEnumerable content) { - Content = content; Refusal = refusal; ToolCalls = new ChangeTrackingList(); + Role = role; + Content = content.ToList(); } - internal InternalChatCompletionResponseMessage(string content, string refusal, IList toolCalls, InternalChatCompletionResponseMessageRole role, InternalChatCompletionResponseMessageFunctionCall functionCall, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionResponseMessage(string refusal, IList toolCalls, Chat.ChatMessageRole role, IReadOnlyList content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) { - Content = content; Refusal = refusal; ToolCalls = toolCalls; Role = role; + Content = content; FunctionCall = functionCall; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index d3c4e5592..663b039b4 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -27,18 +19,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Content)) - { - if (Content != null) - { - writer.WritePropertyName("content"u8); - writer.WriteStringValue(Content); - } - else - { - writer.WriteNull("content"u8); - } - } if (Optional.IsDefined(FunctionCall)) { writer.WritePropertyName("function_call"u8); @@ -48,17 +28,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (StreamingChatToolCallUpdate item in ToolCalls) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsDefined(Role)) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.Value.ToString()); - } if (Optional.IsDefined(Refusal)) { if (Refusal != null) @@ -71,6 +46,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteObjectValue?>(Role, options); + } + if (Optional.IsCollectionDefined(Content)) + { + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ChatMessageContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("content"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -98,89 +95,7 @@ protected virtual InternalChatCompletionStreamResponseDelta JsonModelCreateCore( throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); - } - - internal static InternalChatCompletionStreamResponseDelta DeserializeInternalChatCompletionStreamResponseDelta(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string content = default; - StreamingChatFunctionCallUpdate functionCall = default; - IList toolCalls = default; - InternalChatCompletionStreamResponseDeltaRole? role = default; - string refusal = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("content"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("function_call"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = StreamingChatFunctionCallUpdate.DeserializeStreamingChatFunctionCallUpdate(prop.Value, options); - continue; - } - if (prop.NameEquals("tool_calls"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(StreamingChatToolCallUpdate.DeserializeStreamingChatToolCallUpdate(item, options)); - } - toolCalls = array; - continue; - } - if (prop.NameEquals("role"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - role = null; - continue; - } - role = new InternalChatCompletionStreamResponseDeltaRole(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("refusal"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - refusal = null; - continue; - } - refusal = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new InternalChatCompletionStreamResponseDelta( - content, - functionCall, - toolCalls ?? new ChangeTrackingList(), - role, - refusal, - additionalBinaryDataProperties); + return InternalChatCompletionStreamResponseDelta.DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -207,7 +122,7 @@ protected virtual InternalChatCompletionStreamResponseDelta PersistableModelCrea case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); + return InternalChatCompletionStreamResponseDelta.DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support reading '{options.Format}' format."); @@ -225,7 +140,7 @@ public static explicit operator InternalChatCompletionStreamResponseDelta(Client { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, ModelSerializationExtensions.WireOptions); + return InternalChatCompletionStreamResponseDelta.DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index b59d87446..2e3f31f05 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -11,13 +11,13 @@ internal partial class InternalChatCompletionStreamResponseDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(string content, StreamingChatFunctionCallUpdate functionCall, IList toolCalls, InternalChatCompletionStreamResponseDeltaRole? role, string refusal, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.OpenAI.Chat.ChatMessageRole? role, IReadOnlyList content, IDictionary additionalBinaryDataProperties) { - Content = content; FunctionCall = functionCall; ToolCalls = toolCalls; - Role = role; Refusal = refusal; + Role = role; + Content = content; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs index d381876ce..0275cf204 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Chat { internal partial class InternalChatResponseFormatJsonObject : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index 3cec3b5f7..e00b62743 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -18,13 +18,6 @@ internal InternalChatResponseFormatJsonSchema() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs index ecb3fc794..a4983c162 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs @@ -13,13 +13,6 @@ namespace OpenAI.Chat { internal partial class InternalChatResponseFormatText : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 06bb16bc6..0bd05ceb6 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("part_ids"u8); writer.WriteStartArray(); - foreach (var item in PartIds) + foreach (string item in PartIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index d956be368..8a598e7ca 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index b69a021a6..2ca5130ed 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Id); writer.WritePropertyName("choices"u8); writer.WriteStartArray(); - foreach (var item in Choices) + foreach (InternalCreateChatCompletionFunctionResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 22345c13a..0328c85bb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("content"u8); writer.WriteStartArray(); - foreach (var item in Content) + foreach (ChatTokenLogProbabilityDetails item in Content) { writer.WriteObjectValue(item, options); } @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("refusal"u8); writer.WriteStartArray(); - foreach (var item in Refusal) + foreach (ChatTokenLogProbabilityDetails item in Refusal) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 3658458e5..38e10b6b8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -17,13 +16,6 @@ internal InternalCreateChatCompletionStreamResponseChoice() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -45,17 +37,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); if (FinishReason != null) { writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.Value.ToString()); + writer.WriteObjectValue?>(FinishReason, options); } else { writer.WriteNull("finishReason"u8); } - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -83,58 +75,7 @@ protected virtual InternalCreateChatCompletionStreamResponseChoice JsonModelCrea throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); - } - - internal static InternalCreateChatCompletionStreamResponseChoice DeserializeInternalCreateChatCompletionStreamResponseChoice(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalChatCompletionStreamResponseDelta delta = default; - InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs = default; - InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason = default; - int index = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("delta"u8)) - { - delta = InternalChatCompletionStreamResponseDelta.DeserializeInternalChatCompletionStreamResponseDelta(prop.Value, options); - continue; - } - if (prop.NameEquals("logprobs"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - logprobs = null; - continue; - } - logprobs = InternalCreateChatCompletionStreamResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionStreamResponseChoiceLogprobs(prop.Value, options); - continue; - } - if (prop.NameEquals("finish_reason"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - finishReason = null; - continue; - } - finishReason = new InternalCreateChatCompletionStreamResponseChoiceFinishReason(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("index"u8)) - { - index = prop.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new InternalCreateChatCompletionStreamResponseChoice(delta, logprobs, finishReason, index, additionalBinaryDataProperties); + return InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -161,7 +102,7 @@ protected virtual InternalCreateChatCompletionStreamResponseChoice PersistableMo case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); + return InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support reading '{options.Format}' format."); @@ -179,7 +120,7 @@ public static explicit operator InternalCreateChatCompletionStreamResponseChoice { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); + return InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index bc65d3ce5..35477fe01 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -11,19 +11,19 @@ internal partial class InternalCreateChatCompletionStreamResponseChoice { private protected IDictionary _additionalBinaryDataProperties; - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason, int index) + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, int index, Chat.OpenAI.Chat.ChatFinishReason? finishReason) { Delta = delta; - FinishReason = finishReason; Index = index; + FinishReason = finishReason; } - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, InternalCreateChatCompletionStreamResponseChoiceFinishReason? finishReason, int index, IDictionary additionalBinaryDataProperties) + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, int index, Chat.OpenAI.Chat.ChatFinishReason? finishReason, IDictionary additionalBinaryDataProperties) { Delta = delta; Logprobs = logprobs; - FinishReason = finishReason; Index = index; + FinishReason = finishReason; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index 579c528b8..e412b626c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("content"u8); writer.WriteStartArray(); - foreach (var item in Content) + foreach (ChatTokenLogProbabilityDetails item in Content) { writer.WriteObjectValue(item, options); } @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("refusal"u8); writer.WriteStartArray(); - foreach (var item in Refusal) + foreach (ChatTokenLogProbabilityDetails item in Refusal) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index daec946cb..11a4f7db3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Id); writer.WritePropertyName("choices"u8); writer.WriteStartArray(); - foreach (var item in Choices) + foreach (InternalCreateCompletionResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index 9cfcf0ddc..1f06d96ad 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("text_offset"u8); writer.WriteStartArray(); - foreach (var item in TextOffset) + foreach (int item in TextOffset) { writer.WriteNumberValue(item); } @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("token_logprobs"u8); writer.WriteStartArray(); - foreach (var item in TokenLogprobs) + foreach (float item in TokenLogprobs) { writer.WriteNumberValue(item); } @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tokens"u8); writer.WriteStartArray(); - foreach (var item in Tokens) + foreach (string item in Tokens) { if (item == null) { @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); - foreach (var item in TopLogprobs) + foreach (IDictionary item in TopLogprobs) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index de75f193c..3041306fb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -31,8 +31,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateFineTuningJobRequestWandbIntegrationWandb)} does not support writing '{format}' format."); } - writer.WritePropertyName("project"u8); - writer.WriteStringValue(Project); if (Optional.IsDefined(Name)) { if (Name != null) @@ -61,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); - foreach (var item in Tags) + foreach (string item in Tags) { if (item == null) { @@ -72,6 +70,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + writer.WritePropertyName("project"u8); + writer.WriteStringValue(Project); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -108,18 +108,13 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial { return null; } - string project = default; string name = default; string entity = default; IList tags = default; + string project = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("project"u8)) - { - project = prop.Value.GetString(); - continue; - } if (prop.NameEquals("name"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -161,12 +156,17 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial tags = array; continue; } + if (prop.NameEquals("project"u8)) + { + project = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalCreateFineTuningJobRequestWandbIntegrationWandb(project, name, entity, tags ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new InternalCreateFineTuningJobRequestWandbIntegrationWandb(name, entity, tags ?? new ChangeTrackingList(), project, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs index e00c5d6a4..568ca49ae 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs @@ -16,16 +16,16 @@ public InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project) { Argument.AssertNotNull(project, nameof(project)); - Project = project; Tags = new ChangeTrackingList(); + Project = project; } - internal InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project, string name, string entity, IList tags, IDictionary additionalBinaryDataProperties) + internal InternalCreateFineTuningJobRequestWandbIntegrationWandb(string name, string entity, IList tags, string project, IDictionary additionalBinaryDataProperties) { - Project = project; Name = name; Entity = entity; Tags = tags; + Project = project; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index ea4404bcf..a14cba4f2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -38,18 +38,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("thread"u8); writer.WriteObjectValue(Thread, options); } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"u8); - } - } if (Optional.IsDefined(Instructions)) { if (Instructions != null) @@ -68,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ToolDefinition item in Tools) { writer.WriteObjectValue(item, options); } @@ -79,18 +67,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("tools"u8); } } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -186,49 +162,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("truncationStrategy"u8); } } - if (Optional.IsDefined(ToolChoice)) - { - if (ToolChoice != null) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("toolChoice"u8); - } - } if (Optional.IsDefined(ParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("responseFormat"u8); - } - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -267,10 +205,8 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea } string assistantId = default; ThreadCreationOptions thread = default; - InternalCreateThreadAndRunRequestModel? model = default; string instructions = default; IList tools = default; - InternalCreateThreadAndRunRequestToolResources toolResources = default; IDictionary metadata = default; float? temperature = default; float? topP = default; @@ -278,9 +214,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea int? maxPromptTokens = default; int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - BinaryData toolChoice = default; bool? parallelToolCalls = default; - BinaryData responseFormat = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -299,16 +233,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea thread = ThreadCreationOptions.DeserializeThreadCreationOptions(prop.Value, options); continue; } - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateThreadAndRunRequestModel(prop.Value.GetString()); - continue; - } if (prop.NameEquals("instructions"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -333,16 +257,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea tools = array; continue; } - if (prop.NameEquals("tool_resources"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = InternalCreateThreadAndRunRequestToolResources.DeserializeInternalCreateThreadAndRunRequestToolResources(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -424,16 +338,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } - if (prop.NameEquals("tool_choice"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolChoice = null; - continue; - } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("parallel_tool_calls"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -444,16 +348,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea parallelToolCalls = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("response_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -462,10 +356,8 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea return new InternalCreateThreadAndRunRequest( assistantId, thread, - model, instructions, tools ?? new ChangeTrackingList(), - toolResources, metadata ?? new ChangeTrackingDictionary(), temperature, topP, @@ -473,9 +365,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea maxPromptTokens, maxCompletionTokens, truncationStrategy, - toolChoice, parallelToolCalls, - responseFormat, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index b110bb6b3..c6ef37c23 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -21,14 +21,12 @@ public InternalCreateThreadAndRunRequest(string assistantId) Metadata = new ChangeTrackingDictionary(); } - internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, InternalCreateThreadAndRunRequestModel? model, string instructions, IList tools, InternalCreateThreadAndRunRequestToolResources toolResources, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool? parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, string instructions, IList tools, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, bool? parallelToolCalls, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Thread = thread; - Model = model; Instructions = instructions; Tools = tools; - ToolResources = toolResources; Metadata = metadata; Temperature = temperature; TopP = topP; @@ -36,9 +34,7 @@ internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOpt MaxPromptTokens = maxPromptTokens; MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; ParallelToolCalls = parallelToolCalls; - ResponseFormat = responseFormat; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index 5888fe951..75aa1d8af 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index ee9c58f2b..98e9a1599 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index cfd16ec43..914da26ad 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index 721bd1455..e3bbd91b5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -36,14 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ChunkingStrategy); -#else - using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ChunkingStrategy, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -82,7 +75,7 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe return null; } string fileId = default; - BinaryData chunkingStrategy = default; + FileChunkingStrategy chunkingStrategy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -95,10 +88,9 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } - chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); + chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs index 89126b85e..a5f1f6226 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs @@ -19,7 +19,7 @@ public InternalCreateVectorStoreFileRequest(string fileId) FileId = fileId; } - internal InternalCreateVectorStoreFileRequest(string fileId, BinaryData chunkingStrategy, IDictionary additionalBinaryDataProperties) + internal InternalCreateVectorStoreFileRequest(string fileId, FileChunkingStrategy chunkingStrategy, IDictionary additionalBinaryDataProperties) { FileId = fileId; ChunkingStrategy = chunkingStrategy; diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index 497da99c0..1824fdfe7 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -27,10 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("file"u8); - writer.WriteBase64StringValue(File.ToArray(), "D"); - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -67,27 +63,15 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J { return null; } - BinaryData @file = default; - FileUploadPurpose purpose = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("file"u8)) - { - @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } - if (prop.NameEquals("purpose"u8)) - { - purpose = new FileUploadPurpose(prop.Value.GetString()); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalFileUploadOptions(@file, purpose, additionalBinaryDataProperties); + return new InternalFileUploadOptions(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs index 2c81f60fd..2909fd343 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Files { @@ -12,18 +11,8 @@ internal partial class InternalFileUploadOptions { private protected IDictionary _additionalBinaryDataProperties; - public InternalFileUploadOptions(BinaryData @file, FileUploadPurpose purpose) + internal InternalFileUploadOptions(IDictionary additionalBinaryDataProperties) { - Argument.AssertNotNull(@file, nameof(@file)); - - File = @file; - Purpose = purpose; - } - - internal InternalFileUploadOptions(BinaryData @file, FileUploadPurpose purpose, IDictionary additionalBinaryDataProperties) - { - File = @file; - Purpose = purpose; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 38f52c029..f472ace9c 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -67,10 +67,9 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } BinaryData content = default; string refusal = default; - string name = default; + string participantName = default; IList toolCalls = default; - ChatFunctionCall functionCall = default; - string role = default; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); IDictionary additionalBinaryDataProperties0 = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -97,12 +96,7 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = prop.Value.GetString(); + participantName = prop.Value.GetString(); continue; } if (prop.NameEquals("tool_calls"u8)) @@ -119,19 +113,9 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ toolCalls = array; continue; } - if (prop.NameEquals("function_call"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); - continue; - } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") @@ -142,9 +126,8 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ return new InternalFineTuneChatCompletionRequestAssistantMessage( content, refusal, - name, + participantName, toolCalls ?? new ChangeTrackingList(), - functionCall, role, additionalBinaryDataProperties, additionalBinaryDataProperties0); diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index cdf147da8..b34062bc1 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -12,11 +12,11 @@ internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : A { private protected IDictionary _additionalBinaryDataProperties; - public InternalFineTuneChatCompletionRequestAssistantMessage() : base(role) + public InternalFineTuneChatCompletionRequestAssistantMessage() { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string name, IList toolCalls, ChatFunctionCall functionCall, string role, IDictionary additionalBinaryDataProperties, IDictionary additionalBinaryDataProperties0) : base(content, refusal, name, toolCalls, functionCall, role, additionalBinaryDataProperties) + internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties, IDictionary additionalBinaryDataProperties0) : base(content, refusal, participantName, toolCalls, role, additionalBinaryDataProperties) { _additionalBinaryDataProperties = additionalBinaryDataProperties0; } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index d42148adb..83e6764c0 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("messages"u8); writer.WriteStartArray(); - foreach (var item in Messages) + foreach (BinaryData item in Messages) { if (item == null) { @@ -54,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ChatTool item in Tools) { writer.WriteObjectValue(item, options); } @@ -69,7 +69,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("functions"u8); writer.WriteStartArray(); - foreach (var item in Functions) + foreach (ChatFunction item in Functions) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 3ec4dbc0a..1328d3fd8 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (Assistant item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index ae0a62742..98a26e94f 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (InternalBatchJob item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index 33a3a2ca8..1ff1d860d 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (InternalFineTuningJobCheckpoint item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index 31628537b..c2385d401 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteBooleanValue(HasMore); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (FineTuningJobEvent item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index b7556b5ea..baeb183b9 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (ThreadMessage item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index 88cbf4cc8..209ba2718 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (FineTuningJob item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index a53ebc660..964b6be92 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (RunStep item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index 68b86ed99..f268e5882 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (ThreadRun item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index 4262c1de5..ff4a75e3f 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (AssistantThread item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index dc7b67fdc..f54962d94 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (VectorStoreFileAssociation item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 8b465c0cd..23381a54e 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("data"u8); writer.WriteStartArray(); - foreach (var item in Data) + foreach (VectorStore item in Data) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 10ab39f88..71d4719a2 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.Value.ToString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -75,7 +75,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal return null; } Uri url = default; - InternalMessageContentImageUrlObjectImageUrlDetail? detail = default; + string detail = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -86,12 +86,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } - detail = new InternalMessageContentImageUrlObjectImageUrlDetail(prop.Value.GetString()); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs index bc12d334c..0c3e23295 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs @@ -19,7 +19,7 @@ public InternalMessageContentImageUrlObjectImageUrl(Uri url) Url = url; } - internal InternalMessageContentImageUrlObjectImageUrl(Uri url, InternalMessageContentImageUrlObjectImageUrlDetail? detail, IDictionary additionalBinaryDataProperties) + internal InternalMessageContentImageUrlObjectImageUrl(Uri url, string detail, IDictionary additionalBinaryDataProperties) { Url = url; Detail = detail; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index 5e0aa57da..3c411ce98 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.Value.ToString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -75,7 +75,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna return null; } string fileId = default; - InternalMessageContentImageFileObjectImageFileDetail? detail = default; + string detail = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -86,12 +86,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } - detail = new InternalMessageContentImageFileObjectImageFileDetail(prop.Value.GetString()); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs index 260af5630..4398808b6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs @@ -19,7 +19,7 @@ public InternalMessageContentItemFileObjectImageFile(string fileId) FileId = fileId; } - internal InternalMessageContentItemFileObjectImageFile(string fileId, InternalMessageContentImageFileObjectImageFileDetail? detail, IDictionary additionalBinaryDataProperties) + internal InternalMessageContentItemFileObjectImageFile(string fileId, string detail, IDictionary additionalBinaryDataProperties) { FileId = fileId; Detail = detail; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index 8d4d20cd4..bb48956a4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Value); writer.WritePropertyName("annotations"u8); writer.WriteStartArray(); - foreach (var item in Annotations) + foreach (InternalMessageContentTextObjectAnnotation item in Annotations) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index 77188771e..40a9c09d1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.Value.ToString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -74,7 +74,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI return null; } string fileId = default; - InternalMessageDeltaContentImageFileObjectImageFileDetail? detail = default; + string detail = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -90,12 +90,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } - detail = new InternalMessageDeltaContentImageFileObjectImageFileDetail(prop.Value.GetString()); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs index fc9e82e19..2e9f78c0d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs @@ -15,7 +15,7 @@ internal InternalMessageDeltaContentImageFileObjectImageFile() { } - internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, InternalMessageDeltaContentImageFileObjectImageFileDetail? detail, IDictionary additionalBinaryDataProperties) + internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, string detail, IDictionary additionalBinaryDataProperties) { FileId = fileId; Detail = detail; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index d3ec7cc11..e7d64dbfc 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.Value.ToString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -74,7 +74,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt return null; } Uri url = default; - InternalMessageDeltaContentImageUrlObjectImageUrlDetail? detail = default; + string detail = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -90,12 +90,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } - detail = new InternalMessageDeltaContentImageUrlObjectImageUrlDetail(prop.Value.GetString()); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs index 357b1c8e9..1a90cc599 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs @@ -15,7 +15,7 @@ internal InternalMessageDeltaContentImageUrlObjectImageUrl() { } - internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, InternalMessageDeltaContentImageUrlObjectImageUrlDetail? detail, IDictionary additionalBinaryDataProperties) + internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, string detail, IDictionary additionalBinaryDataProperties) { Url = url; Detail = detail; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index f529d860c..31417bfda 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("annotations"u8); writer.WriteStartArray(); - foreach (var item in Annotations) + foreach (InternalMessageDeltaTextContentAnnotation item in Annotations) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 3de207fe1..968216ef4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -27,21 +27,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaObjectDelta)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Role)) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.Value.ToString()); - } if (Optional.IsCollectionDefined(Content)) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); - foreach (var item in Content) + foreach (InternalMessageDeltaContent item in Content) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } + writer.WritePropertyName("role"u8); + writer.WriteNumberValue((int)Role); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -78,21 +75,11 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO { return null; } - InternalMessageDeltaObjectDeltaRole? role = default; IList content = default; + Assistants.MessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("role"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - role = null; - continue; - } - role = new InternalMessageDeltaObjectDeltaRole(prop.Value.GetString()); - continue; - } if (prop.NameEquals("content"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -107,12 +94,21 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO content = array; continue; } + if (prop.NameEquals("role"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = prop.Value.GetInt32().ToMessageRole(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageDeltaObjectDelta(role, content ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new InternalMessageDeltaObjectDelta(content ?? new ChangeTrackingList(), role, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs index 81d78e734..ebb1796b6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs @@ -17,10 +17,10 @@ internal InternalMessageDeltaObjectDelta() Content = new ChangeTrackingList(); } - internal InternalMessageDeltaObjectDelta(InternalMessageDeltaObjectDeltaRole? role, IList content, IDictionary additionalBinaryDataProperties) + internal InternalMessageDeltaObjectDelta(IList content, Assistants.MessageRole role, IDictionary additionalBinaryDataProperties) { - Role = role; Content = content; + Role = role; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index de0ab8bc4..60381217c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -17,13 +17,6 @@ internal InternalMessageImageFileContent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 09a3210aa..e8f0375b4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -17,13 +17,6 @@ internal InternalMessageImageUrlContent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index 43d243c00..3d15406a5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (BinaryData item in Tools) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index b9fad5e55..bddc5dc33 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -17,13 +17,6 @@ internal InternalMessageRefusalContent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -35,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); + writer.WriteStringValue(InternalRefusal); } InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)JsonModelCreateCore(ref reader, options); @@ -58,7 +51,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC return null; } InternalMessageContentRefusalObjectType @type = default; - string refusal = default; + string internalRefusal = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -69,7 +62,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC } if (prop.NameEquals("refusal"u8)) { - refusal = prop.Value.GetString(); + internalRefusal = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -77,7 +70,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageRefusalContent(@type, refusal, additionalBinaryDataProperties); + return new InternalMessageRefusalContent(@type, internalRefusal, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index e72470bb7..f43d556d4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -10,17 +10,17 @@ namespace OpenAI.Assistants { internal partial class InternalMessageRefusalContent : MessageContent { - public InternalMessageRefusalContent(string refusal) + public InternalMessageRefusalContent(string internalRefusal) { - Argument.AssertNotNull(refusal, nameof(refusal)); + Argument.AssertNotNull(internalRefusal, nameof(internalRefusal)); - Refusal = refusal; + InternalRefusal = internalRefusal; } - internal InternalMessageRefusalContent(InternalMessageContentRefusalObjectType @type, string refusal, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalMessageRefusalContent(InternalMessageContentRefusalObjectType @type, string internalRefusal, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { Type = @type; - Refusal = refusal; + InternalRefusal = internalRefusal; } public InternalMessageContentRefusalObjectType Type { get; } = "refusal"; diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 972ebccb2..b42b7646d 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 9051b64a1..250936ecf 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index 2b865f814..a69267188 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -17,13 +17,6 @@ internal InternalRequestMessageTextContent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -35,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); + writer.WriteStringValue(InternalText); } InternalRequestMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRequestMessageTextContent)JsonModelCreateCore(ref reader, options); @@ -58,7 +51,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess return null; } InternalMessageRequestContentTextObjectType @type = default; - string text = default; + string internalText = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -69,7 +62,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess } if (prop.NameEquals("text"u8)) { - text = prop.Value.GetString(); + internalText = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -77,7 +70,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRequestMessageTextContent(@type, text, additionalBinaryDataProperties); + return new InternalRequestMessageTextContent(@type, internalText, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs index 0aa4e93aa..8d2bedfea 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs @@ -10,17 +10,17 @@ namespace OpenAI.Assistants { internal partial class InternalRequestMessageTextContent : MessageContent { - public InternalRequestMessageTextContent(string text) + public InternalRequestMessageTextContent(string internalText) { - Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(internalText, nameof(internalText)); - Text = text; + InternalText = internalText; } - internal InternalRequestMessageTextContent(InternalMessageRequestContentTextObjectType @type, string text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalRequestMessageTextContent(InternalMessageRequestContentTextObjectType @type, string internalText, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { Type = @type; - Text = text; + InternalText = internalText; } public InternalMessageRequestContentTextObjectType Type { get; } = "text"; diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 897823b52..13fe9131c 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -38,11 +38,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - writer.WriteObjectValue(Schema, options); - } if (Optional.IsDefined(Strict)) { if (Strict != null) @@ -55,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("strict"u8); } } + if (Optional.IsDefined(Schema)) + { + writer.WritePropertyName("schema"u8); + writer.WriteObjectValue(Schema, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -93,8 +93,8 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe } string description = default; string name = default; - InternalResponseFormatJsonSchemaSchema schema = default; bool? strict = default; + BinaryData schema = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -113,24 +113,23 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe name = prop.Value.GetString(); continue; } - if (prop.NameEquals("schema"u8)) + if (prop.NameEquals("strict"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - schema = null; + strict = null; continue; } - schema = InternalResponseFormatJsonSchemaSchema.DeserializeInternalResponseFormatJsonSchemaSchema(prop.Value, options); + strict = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("strict"u8)) + if (prop.NameEquals("schema"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - strict = null; continue; } - strict = prop.Value.GetBoolean(); + schema = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } if (options.Format != "W") @@ -138,7 +137,7 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalResponseFormatJsonSchemaJsonSchema(description, name, schema, strict, additionalBinaryDataProperties); + return new InternalResponseFormatJsonSchemaJsonSchema(description, name, strict, schema, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs index bd600d65c..ac1ea74d1 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs @@ -19,12 +19,12 @@ public InternalResponseFormatJsonSchemaJsonSchema(string name) Name = name; } - internal InternalResponseFormatJsonSchemaJsonSchema(string description, string name, InternalResponseFormatJsonSchemaSchema schema, bool? strict, IDictionary additionalBinaryDataProperties) + internal InternalResponseFormatJsonSchemaJsonSchema(string description, string name, bool? strict, BinaryData schema, IDictionary additionalBinaryDataProperties) { Description = description; Name = name; - Schema = schema; Strict = strict; + Schema = schema; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 48e162679..242af7557 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -17,13 +17,6 @@ internal InternalResponseMessageTextContent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 94322ef51..3fc045fce 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (InternalRequiredFunctionToolCall item in ToolCalls) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 1f8741634..03cebc1e0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("logs"u8); - writer.WriteStringValue(Logs); + writer.WriteStringValue(InternalLogs); } InternalRunStepCodeInterpreterLogOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterLogOutput)JsonModelCreateCore(ref reader, options); @@ -55,14 +55,14 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt { return null; } - string logs = default; + string internalLogs = default; string @type = "logs"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("logs"u8)) { - logs = prop.Value.GetString(); + internalLogs = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -75,7 +75,7 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepCodeInterpreterLogOutput(logs, @type, additionalBinaryDataProperties); + return new InternalRunStepCodeInterpreterLogOutput(internalLogs, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs index 39b6d5068..90cb5af09 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs @@ -9,14 +9,14 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepCodeInterpreterLogOutput : RunStepCodeInterpreterOutput { - internal InternalRunStepCodeInterpreterLogOutput(string logs) : base("logs") + internal InternalRunStepCodeInterpreterLogOutput(string internalLogs) : base("logs") { - Logs = logs; + InternalLogs = internalLogs; } - internal InternalRunStepCodeInterpreterLogOutput(string logs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepCodeInterpreterLogOutput(string internalLogs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - Logs = logs; + InternalLogs = internalLogs; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 5f20df761..8dd0b3c18 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); - foreach (var item in Outputs) + foreach (RunStepUpdateCodeInterpreterOutput item in Outputs) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 0c30ab39c..124ec7adb 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -34,10 +34,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("index"u8); writer.WriteNumberValue(Index); - if (Optional.IsDefined(Logs)) + if (Optional.IsDefined(InternalLogs)) { writer.WritePropertyName("logs"u8); - writer.WriteStringValue(Logs); + writer.WriteStringValue(InternalLogs); } } @@ -61,7 +61,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des return null; } int index = default; - string logs = default; + string internalLogs = default; string @type = "logs"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -73,12 +73,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des } if (prop.NameEquals("logs"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - logs = null; - continue; - } - logs = prop.Value.GetString(); + internalLogs = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -91,7 +86,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(index, logs, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(index, internalLogs, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs index fc0aeea53..edccc1acd 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs @@ -14,10 +14,10 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index) Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index, string logs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index, string internalLogs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Index = index; - Logs = logs; + InternalLogs = internalLogs; } public int Index { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index 2ebe14a78..5f7ff0bdd 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject item in ToolCalls) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index db725a0a7..cc8acc6a6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Input); writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); - foreach (var item in Outputs) + foreach (RunStepCodeInterpreterOutput item in Outputs) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index 417ab03ce..4a049e7ff 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,21 +27,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (Optional.IsDefined(RankingOptions)) - { - writer.WritePropertyName("ranking_options"u8); - writer.WriteObjectValue(RankingOptions, options); - } if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); - foreach (var item in Results) + foreach (RunStepFileSearchResult item in Results) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } + if (Optional.IsDefined(RankingOptions)) + { + writer.WritePropertyName("ranking_options"u8); + writer.WriteObjectValue(RankingOptions, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -78,21 +78,11 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri { return null; } - InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject rankingOptions = default; IList results = default; + FileSearchRankingOptions rankingOptions = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("ranking_options"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - rankingOptions = null; - continue; - } - rankingOptions = InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.DeserializeInternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(prop.Value, options); - continue; - } if (prop.NameEquals("results"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -107,12 +97,21 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri results = array; continue; } + if (prop.NameEquals("ranking_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(rankingOptions, results ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(results ?? new ChangeTrackingList(), rankingOptions, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs index 4c0feca55..c0dec727f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs @@ -17,10 +17,10 @@ internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch() Results = new ChangeTrackingList(); } - internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject rankingOptions, IList results, IDictionary additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(IList results, FileSearchRankingOptions rankingOptions, IDictionary additionalBinaryDataProperties) { - RankingOptions = rankingOptions; Results = results; + RankingOptions = rankingOptions; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index fa35444d9..b071a45a5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -34,9 +34,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (RunStepToolCall item in InternalToolCalls) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -60,7 +60,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep { return null; } - IList toolCalls = default; + IReadOnlyList internalToolCalls = default; string @type = "tool_calls"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -72,7 +72,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep { array.Add(RunStepToolCall.DeserializeRunStepToolCall(item, options)); } - toolCalls = array; + internalToolCalls = array; continue; } if (prop.NameEquals("type"u8)) @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDetailsToolCallsObject(toolCalls, @type, additionalBinaryDataProperties); + return new InternalRunStepDetailsToolCallsObject(internalToolCalls, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs index 26284fd2c..f6777cc4a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs @@ -10,14 +10,14 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsObject : RunStepDetails { - internal InternalRunStepDetailsToolCallsObject(IEnumerable toolCalls) : base("tool_calls") + internal InternalRunStepDetailsToolCallsObject(IEnumerable internalToolCalls) : base("tool_calls") { - ToolCalls = toolCalls.ToList(); + InternalToolCalls = internalToolCalls.ToList(); } - internal InternalRunStepDetailsToolCallsObject(IList toolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsObject(IReadOnlyList internalToolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - ToolCalls = toolCalls; + InternalToolCalls = internalToolCalls; } } } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index f6fa79b13..80b07a77f 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("tool_outputs"u8); writer.WriteStartArray(); - foreach (var item in ToolOutputs) + foreach (ToolOutput item in ToolOutputs) { writer.WriteObjectValue(item, options); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index 0d9655eaa..cd91747ac 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index c6092042d..ccca06fe8 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); - foreach (var item in VectorStoreIds) + foreach (string item in VectorStoreIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index 36bc40894..36e560ba7 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); - foreach (var item in VectorStoreIds) + foreach (string item in VectorStoreIds) { if (item == null) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index 33adabc30..934a19410 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -43,7 +43,7 @@ protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReade throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAssistantResponseFormat(document.RootElement, options); + return AssistantResponseFormat.DeserializeAssistantResponseFormat(document.RootElement, options); } internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknownAssistantResponseFormat(JsonElement element, ModelReaderWriterOptions options) @@ -93,7 +93,7 @@ protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeAssistantResponseFormat(document.RootElement, options); + return AssistantResponseFormat.DeserializeAssistantResponseFormat(document.RootElement, options); } default: throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support reading '{options.Format}' format."); diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index b65767b6d..11c461633 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -16,13 +16,6 @@ internal InternalUnknownChatMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -52,13 +45,13 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage { return null; } - string role = "unknown"; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs index da7cc80be..4586cc4c8 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : ChatMessage { - internal InternalUnknownChatMessage(string role, IDictionary additionalBinaryDataProperties) : base(role ?? "unknown", additionalBinaryDataProperties) + internal InternalUnknownChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index 1bccde8fa..f1fc0e16e 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -16,13 +16,6 @@ internal InternalUnknownChatResponseFormat() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index cad1bfab9..6c37c4898 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Assistants { public partial class MessageContent : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -54,24 +46,7 @@ protected virtual MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, throw new FormatException($"The model {nameof(MessageContent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageContent(document.RootElement, options); - } - - internal static MessageContent DeserializeMessageContent(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new MessageContent(additionalBinaryDataProperties); + return MessageContent.DeserializeMessageContent(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -98,7 +73,7 @@ protected virtual MessageContent PersistableModelCreateCore(BinaryData data, Mod case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeMessageContent(document.RootElement, options); + return MessageContent.DeserializeMessageContent(document.RootElement, options); } default: throw new FormatException($"The model {nameof(MessageContent)} does not support reading '{options.Format}' format."); @@ -116,7 +91,7 @@ public static explicit operator MessageContent(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); + return MessageContent.DeserializeMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index b74a2498c..2780afb19 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -35,21 +35,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(FileId); writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ToolDefinition item in Tools) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -89,7 +77,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J return null; } string fileId = default; - IList tools = default; + IReadOnlyList tools = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -100,17 +88,10 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J } if (prop.NameEquals("tools"u8)) { - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } + array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 1111c7e6a..8777d1298 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -13,7 +13,7 @@ public partial class MessageCreationAttachment { private protected IDictionary _additionalBinaryDataProperties; - public MessageCreationAttachment(string fileId, IEnumerable tools) + public MessageCreationAttachment(string fileId, IEnumerable tools) { Argument.AssertNotNull(fileId, nameof(fileId)); Argument.AssertNotNull(tools, nameof(tools)); @@ -22,7 +22,7 @@ public MessageCreationAttachment(string fileId, IEnumerable tools) Tools = tools.ToList(); } - internal MessageCreationAttachment(string fileId, IList tools, IDictionary additionalBinaryDataProperties) + internal MessageCreationAttachment(string fileId, IReadOnlyList tools, IDictionary additionalBinaryDataProperties) { FileId = fileId; Tools = tools; diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index a9f4a14f5..d22c0f4d6 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -27,22 +27,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageCreationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (Optional.IsCollectionDefined(Attachments)) { if (Attachments != null) { writer.WritePropertyName("attachments"u8); writer.WriteStartArray(); - foreach (var item in Attachments) + foreach (MessageCreationAttachment item in Attachments) { writer.WriteObjectValue(item, options); } @@ -76,6 +67,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } + writer.WritePropertyName("role"u8); + writer.WriteNumberValue((int)Role); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (MessageContent item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -112,28 +112,13 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle { return null; } - Assistants.MessageRole role = default; - IList content = default; IList attachments = default; IDictionary metadata = default; + Assistants.MessageRole role = default; + IList content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("role"u8)) - { - role = prop.Value.GetString().ToMessageRole(); - continue; - } - if (prop.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(MessageContent.DeserializeMessageContent(item, options)); - } - content = array; - continue; - } if (prop.NameEquals("attachments"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -169,12 +154,27 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle metadata = dictionary; continue; } + if (prop.NameEquals("role"u8)) + { + role = prop.Value.GetInt32().ToMessageRole(); + continue; + } + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(MessageContent.DeserializeMessageContent(item, options)); + } + content = array; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MessageCreationOptions(role, content, attachments ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + return new MessageCreationOptions(attachments ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.cs index 7136d31d1..a39dd78c0 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.cs @@ -11,12 +11,12 @@ public partial class MessageCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal MessageCreationOptions(Assistants.MessageRole role, IList content, IList attachments, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal MessageCreationOptions(IList attachments, IDictionary metadata, Assistants.MessageRole role, IList content, IDictionary additionalBinaryDataProperties) { - Role = role; - Content = content; Attachments = attachments; Metadata = metadata; + Role = role; + Content = content; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index 54f35b89b..a17792db1 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -31,12 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(MessageId); writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme { return null; } - string id = default; bool deleted = default; + string messageId = default; InternalDeleteMessageResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("deleted"u8)) { - id = prop.Value.GetString(); + deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("deleted"u8)) + if (prop.NameEquals("id"u8)) { - deleted = prop.Value.GetBoolean(); + messageId = prop.Value.GetString(); continue; } if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); + @object = InternalDeleteMessageResponseObject.DeserializeInternalDeleteMessageResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MessageDeletionResult(id, deleted, @object, additionalBinaryDataProperties); + return new MessageDeletionResult(deleted, messageId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index f26bb6eaa..bf83c8127 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -11,16 +11,17 @@ public partial class MessageDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal MessageDeletionResult(string id, bool deleted) + internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMessageResponseObject @object) { - Id = id; Deleted = deleted; + MessageId = messageId; + Object = @object; } - internal MessageDeletionResult(string id, bool deleted, InternalDeleteMessageResponseObject @object, IDictionary additionalBinaryDataProperties) + internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMessageResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; Deleted = deleted; + MessageId = messageId; Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 4f5bfb611..586181b81 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -31,12 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModelDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(ModelId); writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e { return null; } - string id = default; bool deleted = default; + string modelId = default; InternalDeleteModelResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("deleted"u8)) { - id = prop.Value.GetString(); + deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("deleted"u8)) + if (prop.NameEquals("id"u8)) { - deleted = prop.Value.GetBoolean(); + modelId = prop.Value.GetString(); continue; } if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); + @object = InternalDeleteModelResponseObject.DeserializeInternalDeleteModelResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ModelDeletionResult(id, deleted, @object, additionalBinaryDataProperties); + return new ModelDeletionResult(deleted, modelId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index 4afd6ea42..4d76c6cea 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -11,16 +11,17 @@ public partial class ModelDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal ModelDeletionResult(string id, bool deleted) + internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelResponseObject @object) { - Id = id; Deleted = deleted; + ModelId = modelId; + Object = @object; } - internal ModelDeletionResult(string id, bool deleted, InternalDeleteModelResponseObject @object, IDictionary additionalBinaryDataProperties) + internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; Deleted = deleted; + ModelId = modelId; Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs index 53949e507..f4d50888e 100644 --- a/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationCollection.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Moderations { public partial class ModerationCollection : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -31,13 +23,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Id); writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); - writer.WritePropertyName("results"u8); - writer.WriteStartArray(); - foreach (var item in Results) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -65,47 +50,7 @@ protected virtual ModerationCollection JsonModelCreateCore(ref Utf8JsonReader re throw new FormatException($"The model {nameof(ModerationCollection)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeModerationCollection(document.RootElement, options); - } - - internal static ModerationCollection DeserializeModerationCollection(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string model = default; - IList results = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("model"u8)) - { - model = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("results"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ModerationResult.DeserializeModerationResult(item, options)); - } - results = array; - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ModerationCollection(id, model, results, additionalBinaryDataProperties); + return ModerationCollection.DeserializeModerationCollection(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -132,7 +77,7 @@ protected virtual ModerationCollection PersistableModelCreateCore(BinaryData dat case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeModerationCollection(document.RootElement, options); + return ModerationCollection.DeserializeModerationCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ModerationCollection)} does not support reading '{options.Format}' format."); @@ -150,7 +95,7 @@ public static explicit operator ModerationCollection(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeModerationCollection(document.RootElement, ModelSerializationExtensions.WireOptions); + return ModerationCollection.DeserializeModerationCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationCollection.cs b/.dotnet/src/Generated/Models/ModerationCollection.cs index 2b1e8256b..0e19b3c5d 100644 --- a/.dotnet/src/Generated/Models/ModerationCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationCollection.cs @@ -11,11 +11,16 @@ public partial class ModerationCollection { private protected IDictionary _additionalBinaryDataProperties; - internal ModerationCollection(string id, string model, IList results, IDictionary additionalBinaryDataProperties) + internal ModerationCollection(string id, string model) + { + Id = id; + Model = model; + } + + internal ModerationCollection(string id, string model, IDictionary additionalBinaryDataProperties) { Id = id; Model = model; - Results = results; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 91397d1cc..ea437f5e6 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -27,20 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModerationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("input"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Input); -#else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -77,32 +63,15 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme { return null; } - BinaryData input = default; - InternalCreateModerationRequestModel? model = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("input"u8)) - { - input = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("model"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateModerationRequestModel(prop.Value.GetString()); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ModerationOptions(input, model, additionalBinaryDataProperties); + return new ModerationOptions(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index 1739b2dcc..1f4e822d2 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -11,10 +11,8 @@ internal partial class ModerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) + internal ModerationOptions(IDictionary additionalBinaryDataProperties) { - Input = input; - Model = model; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs index 0493c58c3..eee56b871 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfo.Serialization.cs @@ -33,29 +33,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - if (Bytes != null) - { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(Bytes.Value); - } - else - { - writer.WriteNull("bytes"u8); - } writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("filename"u8); writer.WriteStringValue(Filename); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToString()); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(StatusDetails)) + if (SizeInBytes != null) { - writer.WritePropertyName("status_details"u8); - writer.WriteStringValue(StatusDetails); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(SizeInBytes.Value); + } + else + { + writer.WriteNull("bytes"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -94,13 +85,10 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo return null; } string id = default; - int? bytes = default; DateTimeOffset createdAt = default; string filename = default; - InternalOpenAIFileObject @object = default; OpenAIFilePurpose purpose = default; - OpenAIFileStatus status = default; - string statusDetails = default; + int? sizeInBytes = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -109,16 +97,6 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo id = prop.Value.GetString(); continue; } - if (prop.NameEquals("bytes"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - bytes = null; - continue; - } - bytes = prop.Value.GetInt32(); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -129,29 +107,19 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo filename = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalOpenAIFileObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("purpose"u8)) { purpose = new OpenAIFilePurpose(prop.Value.GetString()); continue; } - if (prop.NameEquals("status"u8)) - { - status = new OpenAIFileStatus(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("status_details"u8)) + if (prop.NameEquals("bytes"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - statusDetails = null; + sizeInBytes = null; continue; } - statusDetails = prop.Value.GetString(); + sizeInBytes = prop.Value.GetInt32(); continue; } if (options.Format != "W") @@ -161,13 +129,10 @@ internal static OpenAIFileInfo DeserializeOpenAIFileInfo(JsonElement element, Mo } return new OpenAIFileInfo( id, - bytes, createdAt, filename, - @object, purpose, - status, - statusDetails, + sizeInBytes, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfo.cs b/.dotnet/src/Generated/Models/OpenAIFileInfo.cs index fe9e1fdfd..fb72fb98d 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfo.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfo.cs @@ -11,26 +11,22 @@ public partial class OpenAIFileInfo { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFileInfo(string id, int? bytes, DateTimeOffset createdAt, string filename, OpenAIFilePurpose purpose, OpenAIFileStatus status) + internal OpenAIFileInfo(string id, DateTimeOffset createdAt, string filename, OpenAIFilePurpose purpose, int? sizeInBytes) { Id = id; - Bytes = bytes; CreatedAt = createdAt; Filename = filename; Purpose = purpose; - Status = status; + SizeInBytes = sizeInBytes; } - internal OpenAIFileInfo(string id, int? bytes, DateTimeOffset createdAt, string filename, InternalOpenAIFileObject @object, OpenAIFilePurpose purpose, OpenAIFileStatus status, string statusDetails, IDictionary additionalBinaryDataProperties) + internal OpenAIFileInfo(string id, DateTimeOffset createdAt, string filename, OpenAIFilePurpose purpose, int? sizeInBytes, IDictionary additionalBinaryDataProperties) { Id = id; - Bytes = bytes; CreatedAt = createdAt; Filename = filename; - Object = @object; Purpose = purpose; - Status = status; - StatusDetails = statusDetails; + SizeInBytes = sizeInBytes; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs index 1d251806b..2a1bce883 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Files { public partial class OpenAIFileInfoCollection : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -27,15 +19,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,41 +46,7 @@ protected virtual OpenAIFileInfoCollection JsonModelCreateCore(ref Utf8JsonReade throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIFileInfoCollection(document.RootElement, options); - } - - internal static OpenAIFileInfoCollection DeserializeOpenAIFileInfoCollection(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList data = default; - InternalListFilesResponseObject @object = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(OpenAIFileInfo.DeserializeOpenAIFileInfo(item, options)); - } - data = array; - continue; - } - if (prop.NameEquals("object"u8)) - { - @object = new InternalListFilesResponseObject(prop.Value.GetString()); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new OpenAIFileInfoCollection(data, @object, additionalBinaryDataProperties); + return OpenAIFileInfoCollection.DeserializeOpenAIFileInfoCollection(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -124,7 +73,7 @@ protected virtual OpenAIFileInfoCollection PersistableModelCreateCore(BinaryData case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeOpenAIFileInfoCollection(document.RootElement, options); + return OpenAIFileInfoCollection.DeserializeOpenAIFileInfoCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(OpenAIFileInfoCollection)} does not support reading '{options.Format}' format."); @@ -142,7 +91,7 @@ public static explicit operator OpenAIFileInfoCollection(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIFileInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); + return OpenAIFileInfoCollection.DeserializeOpenAIFileInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs index 1617f0b65..5854aaa14 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileInfoCollection.cs @@ -11,10 +11,8 @@ public partial class OpenAIFileInfoCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFileInfoCollection(IList data, InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) + internal OpenAIFileInfoCollection(IDictionary additionalBinaryDataProperties) { - Data = data; - Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs index c3adeaedb..f4aba48a3 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfo.Serialization.cs @@ -33,12 +33,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("owned_by"u8); writer.WriteStringValue(OwnedBy); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -76,9 +74,8 @@ internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, return null; } string id = default; - DateTimeOffset created = default; - InternalModelObject @object = default; string ownedBy = default; + DateTimeOffset createdAt = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -87,19 +84,14 @@ internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, id = prop.Value.GetString(); continue; } - if (prop.NameEquals("created"u8)) - { - created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); - continue; - } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("owned_by"u8)) { - @object = new InternalModelObject(prop.Value.GetString()); + ownedBy = prop.Value.GetString(); continue; } - if (prop.NameEquals("owned_by"u8)) + if (prop.NameEquals("created"u8)) { - ownedBy = prop.Value.GetString(); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } if (options.Format != "W") @@ -107,7 +99,7 @@ internal static OpenAIModelInfo DeserializeOpenAIModelInfo(JsonElement element, additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OpenAIModelInfo(id, created, @object, ownedBy, additionalBinaryDataProperties); + return new OpenAIModelInfo(id, ownedBy, createdAt, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfo.cs b/.dotnet/src/Generated/Models/OpenAIModelInfo.cs index ee9379975..883cccc95 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfo.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfo.cs @@ -11,19 +11,18 @@ public partial class OpenAIModelInfo { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModelInfo(string id, DateTimeOffset created, string ownedBy) + internal OpenAIModelInfo(string id, string ownedBy, DateTimeOffset createdAt) { Id = id; - Created = created; OwnedBy = ownedBy; + CreatedAt = createdAt; } - internal OpenAIModelInfo(string id, DateTimeOffset created, InternalModelObject @object, string ownedBy, IDictionary additionalBinaryDataProperties) + internal OpenAIModelInfo(string id, string ownedBy, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; - Created = created; - Object = @object; OwnedBy = ownedBy; + CreatedAt = createdAt; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs index d15d307e4..7b25ebf0c 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -13,13 +12,6 @@ namespace OpenAI.Models { public partial class OpenAIModelInfoCollection : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -27,15 +19,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,41 +46,7 @@ protected virtual OpenAIModelInfoCollection JsonModelCreateCore(ref Utf8JsonRead throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIModelInfoCollection(document.RootElement, options); - } - - internal static OpenAIModelInfoCollection DeserializeOpenAIModelInfoCollection(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalListModelsResponseObject @object = default; - IList data = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("object"u8)) - { - @object = new InternalListModelsResponseObject(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(OpenAIModelInfo.DeserializeOpenAIModelInfo(item, options)); - } - data = array; - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new OpenAIModelInfoCollection(@object, data, additionalBinaryDataProperties); + return OpenAIModelInfoCollection.DeserializeOpenAIModelInfoCollection(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -124,7 +73,7 @@ protected virtual OpenAIModelInfoCollection PersistableModelCreateCore(BinaryDat case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeOpenAIModelInfoCollection(document.RootElement, options); + return OpenAIModelInfoCollection.DeserializeOpenAIModelInfoCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(OpenAIModelInfoCollection)} does not support reading '{options.Format}' format."); @@ -142,7 +91,7 @@ public static explicit operator OpenAIModelInfoCollection(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIModelInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); + return OpenAIModelInfoCollection.DeserializeOpenAIModelInfoCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs index 09239bfd7..857883c45 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelInfoCollection.cs @@ -11,10 +11,8 @@ public partial class OpenAIModelInfoCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModelInfoCollection(InternalListModelsResponseObject @object, IList data, IDictionary additionalBinaryDataProperties) + internal OpenAIModelInfoCollection(IDictionary additionalBinaryDataProperties) { - Object = @object; - Data = data; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 64c919c13..2a623ecf0 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -29,24 +29,48 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("assistant_id"u8); writer.WriteStringValue(AssistantId); - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Stream)) + { + if (Stream != null) + { + writer.WritePropertyName("stream"u8); + writer.WriteBooleanValue(Stream.Value); + } + else + { + writer.WriteNull("stream"u8); + } + } + if (Optional.IsDefined(ResponseFormat)) + { + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } + } + if (Optional.IsDefined(ModelOverride)) { - if (Model != null) + if (ModelOverride != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); + writer.WriteStringValue(ModelOverride); } else { writer.WriteNull("model"u8); } } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(InstructionsOverride)) { - if (Instructions != null) + if (InstructionsOverride != null) { writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); + writer.WriteStringValue(InstructionsOverride); } else { @@ -65,15 +89,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalInstructions"u8); } } - if (Optional.IsCollectionDefined(AdditionalMessages)) + if (Optional.IsCollectionDefined(InternalMessages)) { - if (AdditionalMessages != null) + if (InternalMessages != null) { writer.WritePropertyName("additional_messages"u8); writer.WriteStartArray(); - foreach (var item in AdditionalMessages) + foreach (MessageCreationOptions item in InternalMessages) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -82,15 +106,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalMessages"u8); } } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsDefined(ParallelToolCallsEnabled)) { - if (Tools != null) + writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); + } + if (Optional.IsCollectionDefined(ToolsOverride)) + { + if (ToolsOverride != null) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ToolDefinition item in ToolsOverride) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -99,144 +128,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("tools"u8); } } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"u8); - } - } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(NucleusSamplingFactor)) { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"u8); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) + if (NucleusSamplingFactor != null) { writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WriteNumberValue(NucleusSamplingFactor.Value); } else { writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(Stream)) - { - if (Stream != null) - { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); - } - else - { - writer.WriteNull("stream"u8); - } - } - if (Optional.IsDefined(MaxPromptTokens)) - { - if (MaxPromptTokens != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxPromptTokens.Value); - } - else - { - writer.WriteNull("maxPromptTokens"u8); - } - } - if (Optional.IsDefined(MaxCompletionTokens)) - { - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else - { - writer.WriteNull("maxCompletionTokens"u8); - } - } - if (Optional.IsDefined(TruncationStrategy)) + if (Optional.IsDefined(ToolConstraint)) { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncationStrategy"u8); - } - } - if (Optional.IsDefined(ToolChoice)) - { - if (ToolChoice != null) + if (ToolConstraint != null) { writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ToolConstraint, options); } else { writer.WriteNull("toolChoice"u8); } } - if (Optional.IsDefined(ParallelToolCalls)) - { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls.Value); - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("responseFormat"u8); - } - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -274,21 +189,16 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele return null; } string assistantId = default; - InternalCreateRunRequestModel? model = default; - string instructions = default; - string additionalInstructions = default; - IList additionalMessages = default; - IList tools = default; - IDictionary metadata = default; - float? temperature = default; - float? topP = default; bool? stream = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; - RunTruncationStrategy truncationStrategy = default; - BinaryData toolChoice = default; - bool? parallelToolCalls = default; - BinaryData responseFormat = default; + AssistantResponseFormat responseFormat = default; + string modelOverride = default; + string instructionsOverride = default; + string additionalInstructions = default; + IList internalMessages = default; + bool? parallelToolCallsEnabled = default; + IList toolsOverride = default; + float? nucleusSamplingFactor = default; + ToolConstraint toolConstraint = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -297,33 +207,37 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele assistantId = prop.Value.GetString(); continue; } - if (prop.NameEquals("model"u8)) + if (prop.NameEquals("stream"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - model = null; + stream = null; continue; } - model = new InternalCreateRunRequestModel(prop.Value.GetString()); + stream = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("instructions"u8)) + if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - instructions = null; continue; } - instructions = prop.Value.GetString(); + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } + if (prop.NameEquals("model"u8)) + { + modelOverride = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("instructions"u8)) + { + instructionsOverride = prop.Value.GetString(); continue; } if (prop.NameEquals("additional_instructions"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - additionalInstructions = null; - continue; - } additionalInstructions = prop.Value.GetString(); continue; } @@ -338,132 +252,50 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele { array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } - additionalMessages = array; + internalMessages = array; continue; } - if (prop.NameEquals("tools"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + parallelToolCallsEnabled = null; continue; } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; + parallelToolCallsEnabled = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("metadata"u8)) + if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); - foreach (var prop0 in prop.Value.EnumerateObject()) - { - if (prop0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(prop0.Name, null); - } - else - { - dictionary.Add(prop0.Name, prop0.Value.GetString()); - } - } - metadata = dictionary; - continue; - } - if (prop.NameEquals("temperature"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - temperature = null; - continue; + array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } - temperature = prop.Value.GetSingle(); + toolsOverride = array; continue; } if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; - continue; - } - topP = prop.Value.GetSingle(); - continue; - } - if (prop.NameEquals("stream"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - stream = null; - continue; - } - stream = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("max_prompt_tokens"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - maxPromptTokens = null; - continue; - } - maxPromptTokens = prop.Value.GetInt32(); - continue; - } - if (prop.NameEquals("max_completion_tokens"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - maxCompletionTokens = null; + nucleusSamplingFactor = null; continue; } - maxCompletionTokens = prop.Value.GetInt32(); - continue; - } - if (prop.NameEquals("truncation_strategy"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - truncationStrategy = null; - continue; - } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; continue; } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("parallel_tool_calls"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - parallelToolCalls = null; - continue; - } - parallelToolCalls = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("response_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); + toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } if (options.Format != "W") @@ -473,21 +305,16 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele } return new RunCreationOptions( assistantId, - model, - instructions, - additionalInstructions, - additionalMessages ?? new ChangeTrackingList(), - tools ?? new ChangeTrackingList(), - metadata ?? new ChangeTrackingDictionary(), - temperature, - topP, stream, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - parallelToolCalls, responseFormat, + modelOverride, + instructionsOverride, + additionalInstructions, + internalMessages ?? new ChangeTrackingList(), + parallelToolCallsEnabled, + toolsOverride ?? new ChangeTrackingList(), + nucleusSamplingFactor, + toolConstraint, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index b81192ee9..1cde5ef0b 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -11,24 +11,19 @@ public partial class RunCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, InternalCreateRunRequestModel? model, string instructions, string additionalInstructions, IList additionalMessages, IList tools, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool? parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? parallelToolCallsEnabled, IList toolsOverride, float? nucleusSamplingFactor, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; - Model = model; - Instructions = instructions; - AdditionalInstructions = additionalInstructions; - AdditionalMessages = additionalMessages; - Tools = tools; - Metadata = metadata; - Temperature = temperature; - TopP = topP; Stream = stream; - MaxPromptTokens = maxPromptTokens; - MaxCompletionTokens = maxCompletionTokens; - TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ParallelToolCalls = parallelToolCalls; ResponseFormat = responseFormat; + ModelOverride = modelOverride; + InstructionsOverride = instructionsOverride; + AdditionalInstructions = additionalInstructions; + InternalMessages = internalMessages; + ParallelToolCallsEnabled = parallelToolCallsEnabled; + ToolsOverride = toolsOverride; + NucleusSamplingFactor = nucleusSamplingFactor; + ToolConstraint = toolConstraint; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index b99bf3500..28fa82d73 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -33,8 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("assistant_id"u8); @@ -47,8 +45,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("step_details"u8); - writer.WriteObjectValue(StepDetails, options); if (LastError != null) { writer.WritePropertyName("last_error"u8); @@ -123,6 +119,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("usage"u8); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + writer.WritePropertyName("step_details"u8); + writer.WriteObjectValue(Details, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -160,14 +160,12 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite return null; } string id = default; - InternalRunStepObjectObject @object = default; DateTimeOffset createdAt = default; string assistantId = default; string threadId = default; string runId = default; RunStepType @type = default; RunStepStatus status = default; - RunStepDetails stepDetails = default; RunStepError lastError = default; DateTimeOffset? expiredAt = default; DateTimeOffset? cancelledAt = default; @@ -175,6 +173,8 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite DateTimeOffset? completedAt = default; IDictionary metadata = default; RunStepTokenUsage usage = default; + InternalRunStepObjectObject @object = default; + RunStepDetails details = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -183,11 +183,6 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalRunStepObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -218,11 +213,6 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite status = new RunStepStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("step_details"u8)) - { - stepDetails = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); - continue; - } if (prop.NameEquals("last_error"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -305,6 +295,16 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite usage = RunStepTokenUsage.DeserializeRunStepTokenUsage(prop.Value, options); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalRunStepObjectObject.DeserializeInternalRunStepObjectObject(prop.Value, options); + continue; + } + if (prop.NameEquals("step_details"u8)) + { + details = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -312,14 +312,12 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite } return new RunStep( id, - @object, createdAt, assistantId, threadId, runId, @type, status, - stepDetails, lastError, expiredAt, cancelledAt, @@ -327,6 +325,8 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite completedAt, metadata, usage, + @object, + details, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index 00baad621..0c8f4a4a5 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -11,7 +11,7 @@ public partial class RunStep { private protected IDictionary _additionalBinaryDataProperties; - internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage) + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, InternalRunStepObjectObject @object, RunStepDetails details) { Id = id; CreatedAt = createdAt; @@ -20,7 +20,6 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string RunId = runId; Type = @type; Status = status; - StepDetails = stepDetails; LastError = lastError; ExpiredAt = expiredAt; CancelledAt = cancelledAt; @@ -28,19 +27,19 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string CompletedAt = completedAt; Metadata = metadata; Usage = usage; + Object = @object; + Details = details; } - internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, IDictionary additionalBinaryDataProperties) + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, InternalRunStepObjectObject @object, RunStepDetails details, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; AssistantId = assistantId; ThreadId = threadId; RunId = runId; Type = @type; Status = status; - StepDetails = stepDetails; LastError = lastError; ExpiredAt = expiredAt; CancelledAt = cancelledAt; @@ -48,6 +47,8 @@ internal RunStep(string id, InternalRunStepObjectObject @object, DateTimeOffset CompletedAt = completedAt; Metadata = metadata; Usage = usage; + Object = @object; + Details = details; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index dafc695d6..375efa1ef 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -41,9 +41,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("content"u8); writer.WriteStartArray(); - foreach (var item in Content) + foreach (InternalRunStepDetailsToolCallsFileSearchResultObjectContent item in Content) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -86,7 +86,7 @@ internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonE string fileId = default; string fileName = default; float score = default; - IList content = default; + IReadOnlyList content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs index 4ee10b25c..cb50ecc81 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs @@ -20,7 +20,7 @@ internal RunStepFileSearchResult(string fileId, string fileName, float score) Content = new ChangeTrackingList(); } - internal RunStepFileSearchResult(string fileId, string fileName, float score, IList content, IDictionary additionalBinaryDataProperties) + internal RunStepFileSearchResult(string fileId, string fileName, float score, IReadOnlyList content, IDictionary additionalBinaryDataProperties) { FileId = fileId; FileName = fileName; diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index 560ed40e7..eb5b48d79 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -27,21 +27,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(SpeechGenerationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - writer.WritePropertyName("input"u8); - writer.WriteStringValue(Input); - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.ToString()); if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (Optional.IsDefined(Speed)) + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); + writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); + writer.WritePropertyName("voice"u8); + writer.WriteObjectValue(Voice, options); + if (Optional.IsDefined(SpeedRatio)) { writer.WritePropertyName("speed"u8); - writer.WriteNumberValue(Speed.Value); + writer.WriteNumberValue(SpeedRatio.Value); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -79,17 +79,27 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE { return null; } + GeneratedSpeechFormat? responseFormat = default; InternalCreateSpeechRequestModel model = default; string input = default; GeneratedSpeechVoice voice = default; - GeneratedSpeechFormat? responseFormat = default; - float? speed = default; + float? speedRatio = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("response_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + responseFormat = null; + continue; + } + responseFormat = new GeneratedSpeechFormat(prop.Value.GetString()); + continue; + } if (prop.NameEquals("model"u8)) { - model = new InternalCreateSpeechRequestModel(prop.Value.GetString()); + model = InternalCreateSpeechRequestModel.DeserializeInternalCreateSpeechRequestModel(prop.Value, options); continue; } if (prop.NameEquals("input"u8)) @@ -99,27 +109,17 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE } if (prop.NameEquals("voice"u8)) { - voice = new GeneratedSpeechVoice(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("response_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = new GeneratedSpeechFormat(prop.Value.GetString()); + voice = GeneratedSpeechVoice.DeserializeGeneratedSpeechVoice(prop.Value, options); continue; } if (prop.NameEquals("speed"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - speed = null; + speedRatio = null; continue; } - speed = prop.Value.GetSingle(); + speedRatio = prop.Value.GetSingle(); continue; } if (options.Format != "W") @@ -128,11 +128,11 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE } } return new SpeechGenerationOptions( + responseFormat, model, input, voice, - responseFormat, - speed, + speedRatio, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs index 45ed2ca12..4c250e255 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs @@ -11,13 +11,13 @@ public partial class SpeechGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal SpeechGenerationOptions(InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, GeneratedSpeechFormat? responseFormat, float? speed, IDictionary additionalBinaryDataProperties) + internal SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat, InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, float? speedRatio, IDictionary additionalBinaryDataProperties) { + ResponseFormat = responseFormat; Model = model; Input = input; Voice = voice; - ResponseFormat = responseFormat; - Speed = speed; + SpeedRatio = speedRatio; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index ee90761ec..d2ea36db8 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -33,41 +33,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(SystemFingerprint)) + { + writer.WritePropertyName("system_fingerprint"u8); + writer.WriteStringValue(SystemFingerprint); + } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); writer.WritePropertyName("choices"u8); writer.WriteStartArray(); - foreach (var item in Choices) + foreach (InternalCreateChatCompletionStreamResponseChoice item in Choices) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); writer.WritePropertyName("created"u8); - writer.WriteNumberValue(Created, "U"); - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteNumberValue(CreatedAt, "U"); + if (Optional.IsDefined(Usage)) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } if (Optional.IsDefined(ServiceTier)) { if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(ServiceTier.Value.ToString()); + writer.WriteObjectValue?>(ServiceTier, options); } else { writer.WriteNull("serviceTier"u8); } } - if (Optional.IsDefined(SystemFingerprint)) - { - writer.WritePropertyName("system_fingerprint"u8); - writer.WriteStringValue(SystemFingerprint); - } - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); - if (Optional.IsDefined(Usage)) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -105,13 +105,13 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion return null; } string id = default; - IList choices = default; - DateTimeOffset created = default; string model = default; - InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; string systemFingerprint = default; InternalCreateChatCompletionStreamResponseObject @object = default; - InternalCreateChatCompletionStreamResponseUsage usage = default; + IReadOnlyList choices = default; + DateTimeOffset createdAt = default; + ChatTokenUsage usage = default; + Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -120,59 +120,58 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion id = prop.Value.GetString(); continue; } - if (prop.NameEquals("choices"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(item, options)); - } - choices = array; - continue; - } - if (prop.NameEquals("created"u8)) - { - created = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); - continue; - } if (prop.NameEquals("model"u8)) { model = prop.Value.GetString(); continue; } - if (prop.NameEquals("service_tier"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - serviceTier = null; + systemFingerprint = null; continue; } - serviceTier = new InternalCreateChatCompletionStreamResponseServiceTier(prop.Value.GetString()); + systemFingerprint = prop.Value.GetString(); continue; } - if (prop.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("object"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) + @object = InternalCreateChatCompletionStreamResponseObject.DeserializeInternalCreateChatCompletionStreamResponseObject(prop.Value, options); + continue; + } + if (prop.NameEquals("choices"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - systemFingerprint = null; - continue; + array.Add(InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(item, options)); } - systemFingerprint = prop.Value.GetString(); + choices = array; continue; } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("created"u8)) { - @object = new InternalCreateChatCompletionStreamResponseObject(prop.Value.GetString()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } if (prop.NameEquals("usage"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - usage = null; continue; } - usage = InternalCreateChatCompletionStreamResponseUsage.DeserializeInternalCreateChatCompletionStreamResponseUsage(prop.Value, options); + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); + continue; + } + if (prop.NameEquals("service_tier"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + serviceTier = null; + continue; + } + serviceTier = Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier?.DeserializeOpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier(prop.Value, options); continue; } if (options.Format != "W") @@ -182,13 +181,13 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion } return new StreamingChatCompletionUpdate( id, - choices, - created, model, - serviceTier, systemFingerprint, @object, + choices, + createdAt, usage, + serviceTier, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index 69e90321a..242bba757 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -12,24 +12,25 @@ public partial class StreamingChatCompletionUpdate { private protected IDictionary _additionalBinaryDataProperties; - internal StreamingChatCompletionUpdate(string id, IEnumerable choices, DateTimeOffset created, string model) + internal StreamingChatCompletionUpdate(string id, string model, InternalCreateChatCompletionStreamResponseObject @object, IEnumerable choices, DateTimeOffset createdAt) { Id = id; - Choices = choices.ToList(); - Created = created; Model = model; + Object = @object; + Choices = choices.ToList(); + CreatedAt = createdAt; } - internal StreamingChatCompletionUpdate(string id, IList choices, DateTimeOffset created, string model, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, InternalCreateChatCompletionStreamResponseUsage usage, IDictionary additionalBinaryDataProperties) + internal StreamingChatCompletionUpdate(string id, string model, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, IReadOnlyList choices, DateTimeOffset createdAt, ChatTokenUsage usage, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) { Id = id; - Choices = choices; - Created = created; Model = model; - ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; Object = @object; + Choices = choices; + CreatedAt = createdAt; Usage = usage; + ServiceTier = serviceTier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index c9d438328..7c84a31ae 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -27,15 +27,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Arguments)) + if (Optional.IsDefined(FunctionName)) { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(FunctionArgumentsUpdate)) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(FunctionArgumentsUpdate); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -73,29 +73,19 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction { return null; } - string arguments = default; - string name = default; + string functionName = default; + string functionArgumentsUpdate = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("arguments"u8)) + if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - arguments = null; - continue; - } - arguments = prop.Value.GetString(); + functionName = prop.Value.GetString(); continue; } - if (prop.NameEquals("name"u8)) + if (prop.NameEquals("arguments"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = prop.Value.GetString(); + functionArgumentsUpdate = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -103,7 +93,7 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new StreamingChatFunctionCallUpdate(arguments, name, additionalBinaryDataProperties); + return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs index 3d191c22f..8e6e981fa 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs @@ -15,10 +15,10 @@ internal StreamingChatFunctionCallUpdate() { } - internal StreamingChatFunctionCallUpdate(string arguments, string name, IDictionary additionalBinaryDataProperties) + internal StreamingChatFunctionCallUpdate(string functionName, string functionArgumentsUpdate, IDictionary additionalBinaryDataProperties) { - Arguments = arguments; - Name = name; + FunctionName = functionName; + FunctionArgumentsUpdate = functionArgumentsUpdate; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 17568c4d8..97449e20a 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -38,16 +38,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.Value.ToString()); - } if (Optional.IsDefined(Function)) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } + writer.WritePropertyName("type"u8); + writer.WriteObjectValue(Kind, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -86,8 +83,8 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda } int index = default; string id = default; - InternalChatCompletionMessageToolCallChunkType? @type = default; InternalChatCompletionMessageToolCallChunkFunction function = default; + ChatToolCallKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -106,24 +103,22 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda id = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - @type = null; continue; } - @type = new InternalChatCompletionMessageToolCallChunkType(prop.Value.GetString()); + function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); continue; } - if (prop.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - function = null; continue; } - function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); + kind = ChatToolCallKind.DeserializeChatToolCallKind(prop.Value, options); continue; } if (options.Format != "W") @@ -131,7 +126,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new StreamingChatToolCallUpdate(index, id, @type, function, additionalBinaryDataProperties); + return new StreamingChatToolCallUpdate(index, id, function, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs index 3f1f49137..313b8a92b 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs @@ -11,12 +11,12 @@ public partial class StreamingChatToolCallUpdate { private protected IDictionary _additionalBinaryDataProperties; - internal StreamingChatToolCallUpdate(int index, string id, InternalChatCompletionMessageToolCallChunkType? @type, InternalChatCompletionMessageToolCallChunkFunction function, IDictionary additionalBinaryDataProperties) + internal StreamingChatToolCallUpdate(int index, string id, InternalChatCompletionMessageToolCallChunkFunction function, ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { Index = index; Id = id; - Type = @type; Function = function; + Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index 93e20532f..910d6c972 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -17,13 +17,6 @@ internal SystemChatMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -41,10 +34,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri JsonSerializer.Serialize(writer, document.RootElement); } #endif - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(ParticipantName)) { writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(ParticipantName); } } @@ -68,8 +61,8 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme return null; } BinaryData content = default; - string name = default; - string role = "system"; + string participantName = default; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -80,17 +73,12 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = prop.Value.GetString(); + participantName = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") @@ -98,7 +86,7 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new SystemChatMessage(content, name, role, additionalBinaryDataProperties); + return new SystemChatMessage(content, participantName, role, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index 82ea3e06c..e52728cff 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -10,17 +10,17 @@ namespace OpenAI.Chat { public partial class SystemChatMessage : ChatMessage { - public SystemChatMessage(BinaryData content) : base("system") + public SystemChatMessage(BinaryData content) { Argument.AssertNotNull(content, nameof(content)); Content = content; } - internal SystemChatMessage(BinaryData content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal SystemChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; - Name = name; + ParticipantName = participantName; } public BinaryData Content { get; set; } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index 1acbfe5fc..438a920fc 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -27,28 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadCreationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Messages)) - { - writer.WritePropertyName("messages"u8); - writer.WriteStartArray(); - foreach (var item in Messages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -72,6 +50,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } + if (Optional.IsDefined(ToolResources)) + { + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); + } + else + { + writer.WriteNull("toolResources"u8); + } + } + if (Optional.IsCollectionDefined(InternalMessages)) + { + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (MessageCreationOptions item in InternalMessages) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -108,55 +108,54 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme { return null; } - IList messages = default; - InternalCreateThreadRequestToolResources toolResources = default; IDictionary metadata = default; + ToolResources toolResources = default; + IList internalMessages = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("messages"u8)) + if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) { - array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } - messages = array; + metadata = dictionary; continue; } if (prop.NameEquals("tool_resources"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolResources = null; continue; } - toolResources = InternalCreateThreadRequestToolResources.DeserializeInternalCreateThreadRequestToolResources(prop.Value, options); + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (prop.NameEquals("metadata"u8)) + if (prop.NameEquals("messages"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); - foreach (var prop0 in prop.Value.EnumerateObject()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - if (prop0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(prop0.Name, null); - } - else - { - dictionary.Add(prop0.Name, prop0.Value.GetString()); - } + array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } - metadata = dictionary; + internalMessages = array; continue; } if (options.Format != "W") @@ -164,7 +163,7 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ThreadCreationOptions(messages ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + return new ThreadCreationOptions(metadata ?? new ChangeTrackingDictionary(), toolResources, internalMessages ?? new ChangeTrackingList(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs index 0127b1be3..3898940b3 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs @@ -14,15 +14,15 @@ public partial class ThreadCreationOptions public ThreadCreationOptions() { - Messages = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); + InternalMessages = new ChangeTrackingList(); } - internal ThreadCreationOptions(IList messages, InternalCreateThreadRequestToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal ThreadCreationOptions(IDictionary metadata, ToolResources toolResources, IList internalMessages, IDictionary additionalBinaryDataProperties) { - Messages = messages; - ToolResources = toolResources; Metadata = metadata; + ToolResources = toolResources; + InternalMessages = internalMessages; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index 3aeffe70f..f8aa6ca97 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -31,12 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(ThreadId); writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +73,25 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement { return null; } - string id = default; bool deleted = default; + string threadId = default; InternalDeleteThreadResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("deleted"u8)) { - id = prop.Value.GetString(); + deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("deleted"u8)) + if (prop.NameEquals("id"u8)) { - deleted = prop.Value.GetBoolean(); + threadId = prop.Value.GetString(); continue; } if (prop.NameEquals("object"u8)) { - @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); + @object = InternalDeleteThreadResponseObject.DeserializeInternalDeleteThreadResponseObject(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ThreadDeletionResult(id, deleted, @object, additionalBinaryDataProperties); + return new ThreadDeletionResult(deleted, threadId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index e386d3b69..d48b1c9f2 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -11,16 +11,17 @@ public partial class ThreadDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadDeletionResult(string id, bool deleted) + internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThreadResponseObject @object) { - Id = id; Deleted = deleted; + ThreadId = threadId; + Object = @object; } - internal ThreadDeletionResult(string id, bool deleted, InternalDeleteThreadResponseObject @object, IDictionary additionalBinaryDataProperties) + internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThreadResponseObject @object, IDictionary additionalBinaryDataProperties) { - Id = id; Deleted = deleted; + ThreadId = threadId; Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index bdef82033..d8a24b966 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -33,8 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("thread_id"u8); @@ -68,11 +66,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("incompleteAt"u8); } - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); writer.WritePropertyName("content"u8); writer.WriteStartArray(); - foreach (var item in Content) + foreach (MessageContent item in Content) { writer.WriteObjectValue(item, options); } @@ -95,20 +91,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("runId"u8); } - if (Attachments != null && Optional.IsCollectionDefined(Attachments)) - { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (var item in Attachments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"u8); - } if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -129,6 +111,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("metadata"u8); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + writer.WritePropertyName("role"u8); + writer.WriteNumberValue((int)Role); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -166,19 +152,18 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode return null; } string id = default; - InternalMessageObjectObject @object = default; DateTimeOffset createdAt = default; string threadId = default; MessageStatus status = default; MessageFailureDetails incompleteDetails = default; DateTimeOffset? completedAt = default; DateTimeOffset? incompleteAt = default; - InternalMessageObjectRole role = default; IList content = default; string assistantId = default; string runId = default; - IList attachments = default; IDictionary metadata = default; + InternalMessageObjectObject @object = default; + Assistants.MessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -187,11 +172,6 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalMessageObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -237,11 +217,6 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode incompleteAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (prop.NameEquals("role"u8)) - { - role = new InternalMessageObjectRole(prop.Value.GetString()); - continue; - } if (prop.NameEquals("content"u8)) { List array = new List(); @@ -272,21 +247,6 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode runId = prop.Value.GetString(); continue; } - if (prop.NameEquals("attachments"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - attachments = new ChangeTrackingList(); - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(InternalMessageObjectAttachment.DeserializeInternalMessageObjectAttachment(item, options)); - } - attachments = array; - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -309,6 +269,16 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode metadata = dictionary; continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalMessageObjectObject.DeserializeInternalMessageObjectObject(prop.Value, options); + continue; + } + if (prop.NameEquals("role"u8)) + { + role = prop.Value.GetInt32().ToMessageRole(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -316,19 +286,18 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode } return new ThreadMessage( id, - @object, createdAt, threadId, status, incompleteDetails, completedAt, incompleteAt, - role, content, assistantId, runId, - attachments, metadata, + @object, + role, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 2d9a1cb80..76b6ff196 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -12,7 +12,7 @@ public partial class ThreadMessage { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, InternalMessageObjectRole role, IEnumerable content, string assistantId, string runId, IEnumerable attachments, IDictionary metadata) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role) { Id = id; CreatedAt = createdAt; @@ -21,30 +21,29 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes IncompleteDetails = incompleteDetails; CompletedAt = completedAt; IncompleteAt = incompleteAt; - Role = role; Content = content.ToList(); AssistantId = assistantId; RunId = runId; - Attachments = attachments?.ToList(); Metadata = metadata; + Object = @object; + Role = role; } - internal ThreadMessage(string id, InternalMessageObjectObject @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, InternalMessageObjectRole role, IList content, string assistantId, string runId, IList attachments, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IList content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; ThreadId = threadId; Status = status; IncompleteDetails = incompleteDetails; CompletedAt = completedAt; IncompleteAt = incompleteAt; - Role = role; Content = content; AssistantId = assistantId; RunId = runId; - Attachments = attachments; Metadata = metadata; + Object = @object; + Role = role; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index e1ee0f782..e391ae723 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -27,18 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("toolResources"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -62,6 +50,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } + if (Optional.IsDefined(ToolResources)) + { + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); + } + else + { + writer.WriteNull("toolResources"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -98,21 +98,11 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J { return null; } - InternalModifyThreadRequestToolResources toolResources = default; IDictionary metadata = default; + ToolResources toolResources = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("tool_resources"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = InternalModifyThreadRequestToolResources.DeserializeInternalModifyThreadRequestToolResources(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -134,12 +124,21 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J metadata = dictionary; continue; } + if (prop.NameEquals("tool_resources"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ThreadModificationOptions(toolResources, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + return new ThreadModificationOptions(metadata ?? new ChangeTrackingDictionary(), toolResources, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs index 0b1c3bc45..993243366 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs @@ -17,10 +17,10 @@ public ThreadModificationOptions() Metadata = new ChangeTrackingDictionary(); } - internal ThreadModificationOptions(InternalModifyThreadRequestToolResources toolResources, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal ThreadModificationOptions(IDictionary metadata, ToolResources toolResources, IDictionary additionalBinaryDataProperties) { - ToolResources = toolResources; Metadata = metadata; + ToolResources = toolResources; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index d5967c8a3..3df8ffd1d 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -33,8 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("thread_id"u8); @@ -121,7 +119,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Instructions); writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in Tools) + foreach (ToolDefinition item in Tools) { writer.WriteObjectValue(item, options); } @@ -167,18 +165,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("topP"u8); - } - } if (MaxPromptTokens != null) { writer.WritePropertyName("max_prompt_tokens"u8); @@ -206,40 +192,40 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("truncationStrategy"u8); } - if (ToolChoice != null) + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } + if (ToolConstraint != null) { writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ToolConstraint, options); } else { writer.WriteNull("toolChoice"u8); } - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls); - if (ResponseFormat != null) + if (Optional.IsDefined(NucleusSamplingFactor)) { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat)) + if (NucleusSamplingFactor != null) { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(NucleusSamplingFactor.Value); + } + else + { + writer.WriteNull("topP"u8); } -#endif - } - else - { - writer.WriteNull("responseFormat"u8); } + writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(ParallelToolCallsEnabled.Value); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -277,7 +263,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW return null; } string id = default; - InternalRunObjectObject @object = default; DateTimeOffset createdAt = default; string threadId = default; string assistantId = default; @@ -296,13 +281,14 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW IDictionary metadata = default; RunTokenUsage usage = default; float? temperature = default; - float? topP = default; int? maxPromptTokens = default; int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - BinaryData toolChoice = default; - bool parallelToolCalls = default; - BinaryData responseFormat = default; + InternalRunObjectObject @object = default; + AssistantResponseFormat responseFormat = default; + ToolConstraint toolConstraint = default; + float? nucleusSamplingFactor = default; + bool? parallelToolCallsEnabled = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -311,11 +297,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalRunObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -478,16 +459,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("top_p"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = prop.Value.GetSingle(); - continue; - } if (prop.NameEquals("max_prompt_tokens"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -518,29 +489,39 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalRunObjectObject.DeserializeInternalRunObjectObject(prop.Value, options); + continue; + } + if (prop.NameEquals("response_format"u8)) + { + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } if (prop.NameEquals("tool_choice"u8)) + { + toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); + continue; + } + if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; + nucleusSamplingFactor = null; continue; } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } if (prop.NameEquals("parallel_tool_calls"u8)) - { - parallelToolCalls = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; + parallelToolCallsEnabled = null; continue; } - responseFormat = BinaryData.FromString(prop.Value.GetRawText()); + parallelToolCallsEnabled = prop.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -550,7 +531,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } return new ThreadRun( id, - @object, createdAt, threadId, assistantId, @@ -569,13 +549,14 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW metadata, usage, temperature, - topP, maxPromptTokens, maxCompletionTokens, truncationStrategy, - toolChoice, - parallelToolCalls, + @object, responseFormat, + toolConstraint, + nucleusSamplingFactor, + parallelToolCallsEnabled, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index caf65a10a..3ef4f5b04 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -12,7 +12,7 @@ public partial class ThreadRun { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool parallelToolCalls, BinaryData responseFormat) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? parallelToolCallsEnabled) { Id = id; CreatedAt = createdAt; @@ -35,15 +35,15 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string MaxPromptTokens = maxPromptTokens; MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ParallelToolCalls = parallelToolCalls; + Object = @object; ResponseFormat = responseFormat; + ToolConstraint = toolConstraint; + ParallelToolCallsEnabled = parallelToolCallsEnabled; } - internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, BinaryData toolChoice, bool parallelToolCalls, BinaryData responseFormat, IDictionary additionalBinaryDataProperties) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? parallelToolCallsEnabled, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; ThreadId = threadId; AssistantId = assistantId; @@ -62,13 +62,14 @@ internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset cr Metadata = metadata; Usage = usage; Temperature = temperature; - TopP = topP; MaxPromptTokens = maxPromptTokens; MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ParallelToolCalls = parallelToolCalls; + Object = @object; ResponseFormat = responseFormat; + ToolConstraint = toolConstraint; + NucleusSamplingFactor = nucleusSamplingFactor; + ParallelToolCallsEnabled = parallelToolCallsEnabled; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 4871fd85f..39717f3ea 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -17,13 +17,6 @@ internal ToolChatMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -66,7 +59,7 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, } BinaryData content = default; string toolCallId = default; - string role = "tool"; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -82,7 +75,7 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index 4ec3d8af2..9d23b5d39 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ToolChatMessage : ChatMessage { - public ToolChatMessage(BinaryData content, string toolCallId) : base("tool") + public ToolChatMessage(BinaryData content, string toolCallId) { Argument.AssertNotNull(content, nameof(content)); Argument.AssertNotNull(toolCallId, nameof(toolCallId)); @@ -19,7 +19,7 @@ public ToolChatMessage(BinaryData content, string toolCallId) : base("tool") ToolCallId = toolCallId; } - internal ToolChatMessage(BinaryData content, string toolCallId, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal ToolChatMessage(BinaryData content, string toolCallId, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; ToolCallId = toolCallId; diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 23c742669..088265b9b 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; @@ -17,13 +16,6 @@ internal ToolConstraint() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -55,8 +47,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ToolConstraint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual ToolConstraint JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -65,45 +55,9 @@ protected virtual ToolConstraint JsonModelCreateCore(ref Utf8JsonReader reader, throw new FormatException($"The model {nameof(ToolConstraint)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolConstraint(document.RootElement, options); + return ToolConstraint.DeserializeToolConstraint(document.RootElement, options); } - internal static ToolConstraint DeserializeToolConstraint(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalAssistantsNamedToolChoiceType @type = default; - InternalAssistantsNamedToolChoiceFunction function = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("type"u8)) - { - @type = new InternalAssistantsNamedToolChoiceType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("function"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - function = null; - continue; - } - function = InternalAssistantsNamedToolChoiceFunction.DeserializeInternalAssistantsNamedToolChoiceFunction(prop.Value, options); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ToolConstraint(@type, function, additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -116,8 +70,6 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ToolConstraint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual ToolConstraint PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,7 +78,7 @@ protected virtual ToolConstraint PersistableModelCreateCore(BinaryData data, Mod case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeToolConstraint(document.RootElement, options); + return ToolConstraint.DeserializeToolConstraint(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ToolConstraint)} does not support reading '{options.Format}' format."); @@ -144,7 +96,7 @@ public static explicit operator ToolConstraint(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeToolConstraint(document.RootElement, ModelSerializationExtensions.WireOptions); + return ToolConstraint.DeserializeToolConstraint(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index a90069c3b..7edf19e74 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -17,13 +17,6 @@ internal ToolDefinition() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 3e390109f..b42cd83d5 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -27,16 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); - } - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,37 +63,15 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode { return null; } - CodeInterpreterToolResources codeInterpreter = default; - InternalToolResourcesFileSearchIdsOnly fileSearch = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("code_interpreter"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - codeInterpreter = null; - continue; - } - codeInterpreter = CodeInterpreterToolResources.DeserializeCodeInterpreterToolResources(prop.Value, options); - continue; - } - if (prop.NameEquals("file_search"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileSearch = null; - continue; - } - fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); + return new ToolResources(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ToolResources.cs b/.dotnet/src/Generated/Models/ToolResources.cs index 64e52dab5..5805618c9 100644 --- a/.dotnet/src/Generated/Models/ToolResources.cs +++ b/.dotnet/src/Generated/Models/ToolResources.cs @@ -11,10 +11,8 @@ public partial class ToolResources { private protected IDictionary _additionalBinaryDataProperties; - internal ToolResources(CodeInterpreterToolResources codeInterpreter, InternalToolResourcesFileSearchIdsOnly fileSearch, IDictionary additionalBinaryDataProperties) + internal ToolResources(IDictionary additionalBinaryDataProperties) { - CodeInterpreter = codeInterpreter; - FileSearch = fileSearch; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index e0ec3fdba..5bc9df26a 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -33,29 +33,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteNumberValue(Id); - writer.WritePropertyName("seek"u8); - writer.WriteNumberValue(Seek); - writer.WritePropertyName("start"u8); - writer.WriteNumberValue(Convert.ToDouble(Start.ToString("s\\.FFF"))); - writer.WritePropertyName("end"u8); - writer.WriteNumberValue(Convert.ToDouble(End.ToString("s\\.FFF"))); writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); + writer.WritePropertyName("compression_ratio"u8); + writer.WriteNumberValue(CompressionRatio); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); + writer.WritePropertyName("seek"u8); + writer.WriteNumberValue(SeekOffset); writer.WritePropertyName("tokens"u8); writer.WriteStartArray(); - foreach (var item in Tokens) + foreach (int item in TokenIds) { writer.WriteNumberValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature); writer.WritePropertyName("avg_logprob"u8); - writer.WriteNumberValue(AvgLogprob); - writer.WritePropertyName("compression_ratio"u8); - writer.WriteNumberValue(CompressionRatio); + writer.WriteNumberValue(AverageLogProbability); writer.WritePropertyName("no_speech_prob"u8); - writer.WriteNumberValue(NoSpeechProb); + writer.WriteNumberValue(NoSpeechProbability); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -93,15 +93,15 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele return null; } int id = default; - int seek = default; - TimeSpan start = default; - TimeSpan end = default; string text = default; - IList tokens = default; float temperature = default; - float avgLogprob = default; float compressionRatio = default; - float noSpeechProb = default; + TimeSpan startTime = default; + TimeSpan endTime = default; + int seekOffset = default; + IReadOnlyList tokenIds = default; + float averageLogProbability = default; + float noSpeechProbability = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -110,24 +110,34 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele id = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("seek"u8)) + if (prop.NameEquals("text"u8)) + { + text = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("temperature"u8)) + { + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("compression_ratio"u8)) { - seek = prop.Value.GetInt32(); + compressionRatio = prop.Value.GetSingle(); continue; } if (prop.NameEquals("start"u8)) { - start = TimeSpan.FromSeconds(prop.Value.GetDouble()); + startTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } if (prop.NameEquals("end"u8)) { - end = TimeSpan.FromSeconds(prop.Value.GetDouble()); + endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (prop.NameEquals("text"u8)) + if (prop.NameEquals("seek"u8)) { - text = prop.Value.GetString(); + seekOffset = prop.Value.GetInt32(); continue; } if (prop.NameEquals("tokens"u8)) @@ -137,27 +147,17 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele { array.Add(item.GetInt32()); } - tokens = array; - continue; - } - if (prop.NameEquals("temperature"u8)) - { - temperature = prop.Value.GetSingle(); + tokenIds = array; continue; } if (prop.NameEquals("avg_logprob"u8)) { - avgLogprob = prop.Value.GetSingle(); - continue; - } - if (prop.NameEquals("compression_ratio"u8)) - { - compressionRatio = prop.Value.GetSingle(); + averageLogProbability = prop.Value.GetSingle(); continue; } if (prop.NameEquals("no_speech_prob"u8)) { - noSpeechProb = prop.Value.GetSingle(); + noSpeechProbability = prop.Value.GetSingle(); continue; } if (options.Format != "W") @@ -167,15 +167,15 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele } return new TranscribedSegment( id, - seek, - start, - end, text, - tokens, temperature, - avgLogprob, compressionRatio, - noSpeechProb, + startTime, + endTime, + seekOffset, + tokenIds, + averageLogProbability, + noSpeechProbability, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index e5e59f136..1e2a181b3 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -12,32 +12,32 @@ public readonly partial struct TranscribedSegment { private protected IDictionary _additionalBinaryDataProperties; - internal TranscribedSegment(int id, int seek, TimeSpan start, TimeSpan end, string text, IEnumerable tokens, float temperature, float avgLogprob, float compressionRatio, float noSpeechProb) + internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, IEnumerable tokenIds, float averageLogProbability, float noSpeechProbability) { Id = id; - Seek = seek; - Start = start; - End = end; Text = text; - Tokens = tokens.ToList(); Temperature = temperature; - AvgLogprob = avgLogprob; CompressionRatio = compressionRatio; - NoSpeechProb = noSpeechProb; + StartTime = startTime; + EndTime = endTime; + SeekOffset = seekOffset; + TokenIds = tokenIds.ToList(); + AverageLogProbability = averageLogProbability; + NoSpeechProbability = noSpeechProbability; } - internal TranscribedSegment(int id, int seek, TimeSpan start, TimeSpan end, string text, IList tokens, float temperature, float avgLogprob, float compressionRatio, float noSpeechProb, IDictionary additionalBinaryDataProperties) + internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, IReadOnlyList tokenIds, float averageLogProbability, float noSpeechProbability, IDictionary additionalBinaryDataProperties) { Id = id; - Seek = seek; - Start = start; - End = end; Text = text; - Tokens = tokens; Temperature = temperature; - AvgLogprob = avgLogprob; CompressionRatio = compressionRatio; - NoSpeechProb = noSpeechProb; + StartTime = startTime; + EndTime = endTime; + SeekOffset = seekOffset; + TokenIds = tokenIds; + AverageLogProbability = averageLogProbability; + NoSpeechProbability = noSpeechProbability; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index b25b3f64a..a9d89d89c 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -34,9 +34,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("word"u8); writer.WriteStringValue(Word); writer.WritePropertyName("start"u8); - writer.WriteNumberValue(Convert.ToDouble(Start.ToString("s\\.FFF"))); + writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); writer.WritePropertyName("end"u8); - writer.WriteNumberValue(Convert.ToDouble(End.ToString("s\\.FFF"))); + writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,8 +74,8 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, return null; } string word = default; - TimeSpan start = default; - TimeSpan end = default; + TimeSpan startTime = default; + TimeSpan endTime = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -86,12 +86,12 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, } if (prop.NameEquals("start"u8)) { - start = TimeSpan.FromSeconds(prop.Value.GetDouble()); + startTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } if (prop.NameEquals("end"u8)) { - end = TimeSpan.FromSeconds(prop.Value.GetDouble()); + endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new TranscribedWord(word, start, end, additionalBinaryDataProperties); + return new TranscribedWord(word, startTime, endTime, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index 629efadca..e00aa0377 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -11,18 +11,18 @@ public readonly partial struct TranscribedWord { private protected IDictionary _additionalBinaryDataProperties; - internal TranscribedWord(string word, TimeSpan start, TimeSpan end) + internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime) { Word = word; - Start = start; - End = end; + StartTime = startTime; + EndTime = endTime; } - internal TranscribedWord(string word, TimeSpan start, TimeSpan end, IDictionary additionalBinaryDataProperties) + internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime, IDictionary additionalBinaryDataProperties) { Word = word; - Start = start; - End = end; + StartTime = startTime; + EndTime = endTime; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index 4742e3180..2ef5f7920 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -16,13 +16,6 @@ internal UnknownAssistantToolDefinition() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index fa0d22eae..6fddf6e08 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -17,13 +17,6 @@ internal UserChatMessage() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -41,10 +34,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri JsonSerializer.Serialize(writer, document.RootElement); } #endif - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(ParticipantName)) { writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(ParticipantName); } } @@ -68,8 +61,8 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, return null; } BinaryData content = default; - string name = default; - string role = "user"; + string participantName = default; + Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -80,17 +73,12 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = prop.Value.GetString(); + participantName = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetString(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (options.Format != "W") @@ -98,7 +86,7 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UserChatMessage(content, name, role, additionalBinaryDataProperties); + return new UserChatMessage(content, participantName, role, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index 7d728c37a..1c28a187d 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -10,17 +10,17 @@ namespace OpenAI.Chat { public partial class UserChatMessage : ChatMessage { - public UserChatMessage(BinaryData content) : base("user") + public UserChatMessage(BinaryData content) { Argument.AssertNotNull(content, nameof(content)); Content = content; } - internal UserChatMessage(BinaryData content, string name, string role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal UserChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; - Name = name; + ParticipantName = participantName; } public BinaryData Content { get; set; } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 2ce1db2fe..2c336d4bc 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -33,8 +33,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("name"u8); @@ -45,11 +43,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(FileCounts, options); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToSerialString()); - if (Optional.IsDefined(ExpiresAfter)) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } if (Optional.IsDefined(ExpiresAt)) { if (ExpiresAt != null) @@ -91,6 +84,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("metadata"u8); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (Optional.IsDefined(ExpirationPolicy)) + { + writer.WritePropertyName("expires_after"u8); + writer.WriteObjectValue(ExpirationPolicy, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -128,16 +128,16 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea return null; } string id = default; - InternalVectorStoreObjectObject @object = default; DateTimeOffset createdAt = default; string name = default; int usageBytes = default; VectorStoreFileCounts fileCounts = default; VectorStores.VectorStoreStatus status = default; - VectorStoreExpirationPolicy expiresAfter = default; DateTimeOffset? expiresAt = default; DateTimeOffset? lastActiveAt = default; IDictionary metadata = default; + InternalVectorStoreObjectObject @object = default; + VectorStoreExpirationPolicy expirationPolicy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -146,11 +146,6 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) - { - @object = new InternalVectorStoreObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -176,16 +171,6 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea status = prop.Value.GetString().ToVectorStoreStatus(); continue; } - if (prop.NameEquals("expires_after"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - expiresAfter = null; - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); - continue; - } if (prop.NameEquals("expires_at"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -228,6 +213,20 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea metadata = dictionary; continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalVectorStoreObjectObject.DeserializeInternalVectorStoreObjectObject(prop.Value, options); + continue; + } + if (prop.NameEquals("expires_after"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -235,16 +234,16 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea } return new VectorStore( id, - @object, createdAt, name, usageBytes, fileCounts, status, - expiresAfter, expiresAt, lastActiveAt, metadata, + @object, + expirationPolicy, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index d5aad500d..b5825722e 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -11,7 +11,7 @@ public partial class VectorStore { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object) { Id = id; CreatedAt = createdAt; @@ -21,21 +21,22 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage Status = status; LastActiveAt = lastActiveAt; Metadata = metadata; + Object = @object; } - internal VectorStore(string id, InternalVectorStoreObjectObject @object, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, VectorStoreExpirationPolicy expiresAfter, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; CreatedAt = createdAt; Name = name; UsageBytes = usageBytes; FileCounts = fileCounts; Status = status; - ExpiresAfter = expiresAfter; ExpiresAt = expiresAt; LastActiveAt = lastActiveAt; Metadata = metadata; + Object = @object; + ExpirationPolicy = expirationPolicy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 6a5eafc2d..0f50899cf 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -31,8 +31,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreBatchFileJob)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); @@ -41,8 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(VectorStoreId); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("file_counts"u8); - writer.WriteObjectValue(FileCounts, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(BatchId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -79,20 +77,14 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE { return null; } - string id = default; InternalVectorStoreFileBatchObjectObject @object = default; DateTimeOffset createdAt = default; string vectorStoreId = default; VectorStoreBatchFileJobStatus status = default; - InternalVectorStoreFileBatchObjectFileCounts fileCounts = default; + string batchId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } if (prop.NameEquals("object"u8)) { @object = new InternalVectorStoreFileBatchObjectObject(prop.Value.GetString()); @@ -113,9 +105,9 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE status = new VectorStoreBatchFileJobStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("file_counts"u8)) + if (prop.NameEquals("id"u8)) { - fileCounts = InternalVectorStoreFileBatchObjectFileCounts.DeserializeInternalVectorStoreFileBatchObjectFileCounts(prop.Value, options); + batchId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -124,12 +116,11 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE } } return new VectorStoreBatchFileJob( - id, @object, createdAt, vectorStoreId, status, - fileCounts, + batchId, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index f7d5d2e3c..1dd7f3786 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -11,23 +11,21 @@ public partial class VectorStoreBatchFileJob { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreBatchFileJob(string id, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, InternalVectorStoreFileBatchObjectFileCounts fileCounts) + internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId) { - Id = id; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; - FileCounts = fileCounts; + BatchId = batchId; } - internal VectorStoreBatchFileJob(string id, InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, InternalVectorStoreFileBatchObjectFileCounts fileCounts, IDictionary additionalBinaryDataProperties) + internal VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, IDictionary additionalBinaryDataProperties) { - Id = id; Object = @object; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; - FileCounts = fileCounts; + BatchId = batchId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index 348a1bfe0..bed62ab22 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.Text.Json; using OpenAI; +using OpenAI.VectorStores; namespace OpenAI.Assistants { @@ -31,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { @@ -42,18 +43,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ChunkingStrategy); -#else - using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -70,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsDefined(ChunkingStrategy)) + { + writer.WritePropertyName("chunking_strategy"u8); + writer.WriteObjectValue(ChunkingStrategy, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -107,8 +101,8 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J return null; } IList fileIds = default; - BinaryData chunkingStrategy = default; IDictionary metadata = default; + FileChunkingStrategy chunkingStrategy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -133,16 +127,6 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J fileIds = array; continue; } - if (prop.NameEquals("chunking_strategy"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - chunkingStrategy = null; - continue; - } - chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -164,12 +148,21 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J metadata = dictionary; continue; } + if (prop.NameEquals("chunking_strategy"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreCreationHelper(fileIds ?? new ChangeTrackingList(), chunkingStrategy, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + return new VectorStoreCreationHelper(fileIds ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), chunkingStrategy, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs index c88f9d2bb..ff16c7626 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using OpenAI; +using OpenAI.VectorStores; namespace OpenAI.Assistants { @@ -18,11 +19,11 @@ public VectorStoreCreationHelper() Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreCreationHelper(IList fileIds, BinaryData chunkingStrategy, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal VectorStoreCreationHelper(IList fileIds, IDictionary metadata, FileChunkingStrategy chunkingStrategy, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; - ChunkingStrategy = chunkingStrategy; Metadata = metadata; + ChunkingStrategy = chunkingStrategy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 3c97355a6..74531a83e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); - foreach (var item in FileIds) + foreach (string item in FileIds) { if (item == null) { @@ -47,23 +47,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(ExpiresAfter)) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } - if (Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ChunkingStrategy); -#else - using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -87,6 +70,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } + if (Optional.IsDefined(ExpirationPolicy)) + { + writer.WritePropertyName("expires_after"u8); + writer.WriteObjectValue(ExpirationPolicy, options); + } + if (Optional.IsDefined(ChunkingStrategy)) + { + writer.WritePropertyName("chunking_strategy"u8); + writer.WriteObjectValue(ChunkingStrategy, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -125,9 +118,9 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions } IList fileIds = default; string name = default; - VectorStoreExpirationPolicy expiresAfter = default; - BinaryData chunkingStrategy = default; IDictionary metadata = default; + VectorStoreExpirationPolicy expirationPolicy = default; + FileChunkingStrategy chunkingStrategy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -162,26 +155,6 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions name = prop.Value.GetString(); continue; } - if (prop.NameEquals("expires_after"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - expiresAfter = null; - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); - continue; - } - if (prop.NameEquals("chunking_strategy"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - chunkingStrategy = null; - continue; - } - chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -203,6 +176,24 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions metadata = dictionary; continue; } + if (prop.NameEquals("expires_after"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); + continue; + } + if (prop.NameEquals("chunking_strategy"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -211,9 +202,9 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions return new VectorStoreCreationOptions( fileIds ?? new ChangeTrackingList(), name, - expiresAfter, - chunkingStrategy, metadata ?? new ChangeTrackingDictionary(), + expirationPolicy, + chunkingStrategy, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs index edd44a70f..56d8442e7 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs @@ -18,13 +18,13 @@ public VectorStoreCreationOptions() Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreCreationOptions(IList fileIds, string name, VectorStoreExpirationPolicy expiresAfter, BinaryData chunkingStrategy, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal VectorStoreCreationOptions(IList fileIds, string name, IDictionary metadata, VectorStoreExpirationPolicy expirationPolicy, FileChunkingStrategy chunkingStrategy, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; Name = name; - ExpiresAfter = expiresAfter; - ChunkingStrategy = chunkingStrategy; Metadata = metadata; + ExpirationPolicy = expirationPolicy; + ChunkingStrategy = chunkingStrategy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 8713d93c6..9b1968baf 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -31,12 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(VectorStoreId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,25 +71,19 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J { return null; } - string id = default; bool deleted = default; - InternalDeleteVectorStoreResponseObject @object = default; + string vectorStoreId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } if (prop.NameEquals("deleted"u8)) { deleted = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("id"u8)) { - @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); + vectorStoreId = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -99,7 +91,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreDeletionResult(id, deleted, @object, additionalBinaryDataProperties); + return new VectorStoreDeletionResult(deleted, vectorStoreId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 99824e833..873954b84 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -11,17 +11,16 @@ public partial class VectorStoreDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreDeletionResult(string id, bool deleted) + internal VectorStoreDeletionResult(bool deleted, string vectorStoreId) { - Id = id; Deleted = deleted; + VectorStoreId = vectorStoreId; } - internal VectorStoreDeletionResult(string id, bool deleted, InternalDeleteVectorStoreResponseObject @object, IDictionary additionalBinaryDataProperties) + internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, IDictionary additionalBinaryDataProperties) { - Id = id; Deleted = deleted; - Object = @object; + VectorStoreId = vectorStoreId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index fc46d1dad..f979aa7e3 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -27,10 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); } - writer.WritePropertyName("anchor"u8); - writer.WriteStringValue(Anchor.ToSerialString()); - writer.WritePropertyName("days"u8); - writer.WriteNumberValue(Days); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -67,27 +63,15 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli { return null; } - VectorStores.VectorStoreExpirationAnchor anchor = default; - int days = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("anchor"u8)) - { - anchor = prop.Value.GetString().ToVectorStoreExpirationAnchor(); - continue; - } - if (prop.NameEquals("days"u8)) - { - days = prop.Value.GetInt32(); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreExpirationPolicy(anchor, days, additionalBinaryDataProperties); + return new VectorStoreExpirationPolicy(additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs index af60e2adc..c47689180 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs @@ -10,5 +10,10 @@ namespace OpenAI.VectorStores public partial class VectorStoreExpirationPolicy { private protected IDictionary _additionalBinaryDataProperties; + + internal VectorStoreExpirationPolicy(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index 430df6499..0ad53f177 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -31,12 +31,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreFileAssociation)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(object.ToString()); - writer.WritePropertyName("usage_bytes"u8); - writer.WriteNumberValue(UsageBytes); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("vector_store_id"u8); @@ -52,17 +46,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("lastError"u8); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(FileId); + writer.WritePropertyName("usage_bytes"u8); + writer.WriteNumberValue(Size); if (Optional.IsDefined(ChunkingStrategy)) { writer.WritePropertyName("chunking_strategy"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ChunkingStrategy); -#else - using (JsonDocument document = JsonDocument.Parse(ChunkingStrategy)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ChunkingStrategy, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -100,32 +93,17 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation { return null; } - string id = default; - InternalVectorStoreFileObjectObject @object = default; - int usageBytes = default; DateTimeOffset createdAt = default; string vectorStoreId = default; VectorStores.VectorStoreFileAssociationStatus status = default; VectorStoreFileAssociationError lastError = default; - BinaryData chunkingStrategy = default; + InternalVectorStoreFileObjectObject @object = default; + string fileId = default; + int size = default; + FileChunkingStrategy chunkingStrategy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("object"u8)) - { - @object = new InternalVectorStoreFileObjectObject(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("usage_bytes"u8)) - { - usageBytes = prop.Value.GetInt32(); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -151,14 +129,28 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation lastError = VectorStoreFileAssociationError.DeserializeVectorStoreFileAssociationError(prop.Value, options); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalVectorStoreFileObjectObject.DeserializeInternalVectorStoreFileObjectObject(prop.Value, options); + continue; + } + if (prop.NameEquals("id"u8)) + { + fileId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("usage_bytes"u8)) + { + size = prop.Value.GetInt32(); + continue; + } if (prop.NameEquals("chunking_strategy"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } - chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); + chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } if (options.Format != "W") @@ -167,13 +159,13 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation } } return new VectorStoreFileAssociation( - id, - @object, - usageBytes, createdAt, vectorStoreId, status, lastError, + @object, + fileId, + size, chunkingStrategy, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index 084197083..cfec2c075 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -11,25 +11,26 @@ public partial class VectorStoreFileAssociation { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreFileAssociation(string id, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError) + internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, InternalVectorStoreFileObjectObject @object, string fileId, int size) { - Id = id; - UsageBytes = usageBytes; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; LastError = lastError; + Object = @object; + FileId = fileId; + Size = size; } - internal VectorStoreFileAssociation(string id, InternalVectorStoreFileObjectObject @object, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, BinaryData chunkingStrategy, IDictionary additionalBinaryDataProperties) + internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, InternalVectorStoreFileObjectObject @object, string fileId, int size, FileChunkingStrategy chunkingStrategy, IDictionary additionalBinaryDataProperties) { - Id = id; - Object = @object; - UsageBytes = usageBytes; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; LastError = lastError; + Object = @object; + FileId = fileId; + Size = size; ChunkingStrategy = chunkingStrategy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index 851fe450b..be19bf4c8 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -39,18 +39,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsDefined(ExpiresAfter)) - { - if (ExpiresAfter != null) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } - else - { - writer.WriteNull("expiresAfter"u8); - } - } if (Optional.IsCollectionDefined(Metadata)) { if (Metadata != null) @@ -74,6 +62,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } + if (Optional.IsDefined(ExpirationPolicy)) + { + if (ExpirationPolicy != null) + { + writer.WritePropertyName("expires_after"u8); + writer.WriteObjectValue(ExpirationPolicy, options); + } + else + { + writer.WriteNull("expiresAfter"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -111,8 +111,8 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio return null; } string name = default; - VectorStoreExpirationPolicy expiresAfter = default; IDictionary metadata = default; + VectorStoreExpirationPolicy expirationPolicy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -126,16 +126,6 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio name = prop.Value.GetString(); continue; } - if (prop.NameEquals("expires_after"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - expiresAfter = null; - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); - continue; - } if (prop.NameEquals("metadata"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -157,12 +147,21 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio metadata = dictionary; continue; } + if (prop.NameEquals("expires_after"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreModificationOptions(name, expiresAfter, metadata ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + return new VectorStoreModificationOptions(name, metadata ?? new ChangeTrackingDictionary(), expirationPolicy, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs index 80056a7ad..d10693f4c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs @@ -17,11 +17,11 @@ public VectorStoreModificationOptions() Metadata = new ChangeTrackingDictionary(); } - internal VectorStoreModificationOptions(string name, VectorStoreExpirationPolicy expiresAfter, IDictionary metadata, IDictionary additionalBinaryDataProperties) + internal VectorStoreModificationOptions(string name, IDictionary metadata, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) { Name = name; - ExpiresAfter = expiresAfter; Metadata = metadata; + ExpirationPolicy = expirationPolicy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 0c709bfaa..39d70f03c 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -19,37 +19,34 @@ namespace OpenAI { public static partial class OpenAIModelFactory { - public static OpenAIFileInfo OpenAIFileInfo(string id = default, int? bytes = default, DateTimeOffset createdAt = default, string filename = default, InternalOpenAIFileObject @object = default, OpenAIFilePurpose purpose = default, OpenAIFileStatus status = default, string statusDetails = default) + public static OpenAIFileInfo OpenAIFileInfo(string id = default, DateTimeOffset createdAt = default, string filename = default, OpenAIFilePurpose purpose = default, int? sizeInBytes = default) { return new OpenAIFileInfo( id, - bytes, createdAt, filename, - @object, purpose, - status, - statusDetails, + sizeInBytes, null); } - public static VectorStore VectorStore(string id = default, InternalVectorStoreObjectObject @object = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default) + public static VectorStore VectorStore(string id = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default, InternalVectorStoreObjectObject @object = default, VectorStoreExpirationPolicy expirationPolicy = default) { metadata ??= new ChangeTrackingDictionary(); return new VectorStore( id, - @object, createdAt, name, usageBytes, fileCounts, status, - expiresAfter, expiresAt, lastActiveAt, metadata, + @object, + expirationPolicy, null); } @@ -65,13 +62,13 @@ public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = defau null); } - public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy(VectorStores.VectorStoreExpirationAnchor anchor = default, int days = default) + public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy() { - return new VectorStoreExpirationPolicy(anchor, days, null); + return new VectorStoreExpirationPolicy(null); } - public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, VectorStoreExpirationPolicy expiresAfter = default, BinaryData chunkingStrategy = default, IDictionary metadata = default) + public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default, FileChunkingStrategy chunkingStrategy = default) { fileIds ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -79,36 +76,36 @@ public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable< return new VectorStoreCreationOptions( fileIds?.ToList(), name, - expiresAfter, - chunkingStrategy, metadata, + expirationPolicy, + chunkingStrategy, null); } - public static VectorStoreModificationOptions VectorStoreModificationOptions(string name = default, VectorStoreExpirationPolicy expiresAfter = default, IDictionary metadata = default) + public static VectorStoreModificationOptions VectorStoreModificationOptions(string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default) { metadata ??= new ChangeTrackingDictionary(); - return new VectorStoreModificationOptions(name, expiresAfter, metadata, null); + return new VectorStoreModificationOptions(name, metadata, expirationPolicy, null); } - public static VectorStoreDeletionResult VectorStoreDeletionResult(string id = default, bool deleted = default, InternalDeleteVectorStoreResponseObject @object = default) + public static VectorStoreDeletionResult VectorStoreDeletionResult(bool deleted = default, string vectorStoreId = default) { - return new VectorStoreDeletionResult(id, deleted, @object, null); + return new VectorStoreDeletionResult(deleted, vectorStoreId, null); } - public static VectorStoreFileAssociation VectorStoreFileAssociation(string id = default, InternalVectorStoreFileObjectObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, BinaryData chunkingStrategy = default) + public static VectorStoreFileAssociation VectorStoreFileAssociation(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, InternalVectorStoreFileObjectObject @object = default, string fileId = default, int size = default, FileChunkingStrategy chunkingStrategy = default) { return new VectorStoreFileAssociation( - id, - @object, - usageBytes, createdAt, vectorStoreId, status, lastError, + @object, + fileId, + size, chunkingStrategy, null); } @@ -131,40 +128,39 @@ public static FileChunkingStrategy FileChunkingStrategy(string @type = default) return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, null); } - public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string id = default, bool deleted = default, InternalDeleteVectorStoreFileResponseObject @object = default) + public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string fileId = default, bool removed = default, InternalDeleteVectorStoreFileResponseObject @object = default) { - return new FileFromStoreRemovalResult(id, deleted, @object, null); + return new FileFromStoreRemovalResult(fileId, removed, @object, null); } - public static VectorStoreBatchFileJob VectorStoreBatchFileJob(string id = default, InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, InternalVectorStoreFileBatchObjectFileCounts fileCounts = default) + public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default) { return new VectorStoreBatchFileJob( - id, @object, createdAt, vectorStoreId, status, - fileCounts, + batchId, null); } - public static ThreadCreationOptions ThreadCreationOptions(IEnumerable messages = default, InternalCreateThreadRequestToolResources toolResources = default, IDictionary metadata = default) + public static ThreadCreationOptions ThreadCreationOptions(IDictionary metadata = default, ToolResources toolResources = default, IEnumerable internalMessages = default) { - messages ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); + internalMessages ??= new ChangeTrackingList(); - return new ThreadCreationOptions(messages?.ToList(), toolResources, metadata, null); + return new ThreadCreationOptions(metadata, toolResources, internalMessages?.ToList(), null); } - public static MessageCreationOptions MessageCreationOptions(Assistants.MessageRole role = default, IEnumerable content = default, IEnumerable attachments = default, IDictionary metadata = default) + public static MessageCreationOptions MessageCreationOptions(IEnumerable attachments = default, IDictionary metadata = default, Assistants.MessageRole role = default, IEnumerable content = default) { - content ??= new ChangeTrackingList(); attachments ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); + content ??= new ChangeTrackingList(); - return new MessageCreationOptions(role, content?.ToList(), attachments?.ToList(), metadata, null); + return new MessageCreationOptions(attachments?.ToList(), metadata, role, content?.ToList(), null); } public static MessageContent MessageContent() @@ -173,9 +169,9 @@ public static MessageContent MessageContent() return new MessageContent(null); } - public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) + public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) { - tools ??= new ChangeTrackingList(); + tools ??= new ChangeTrackingList(); return new MessageCreationAttachment(fileId, tools?.ToList(), null); } @@ -198,10 +194,10 @@ public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistan return new FileSearchToolDefinition(fileSearch, "file_search", null); } - public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default, float scoreThreshold = default) + public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default) { - return new FileSearchRankingOptions(ranker, scoreThreshold, null); + return new FileSearchRankingOptions(ranker, null); } public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition function = default) @@ -210,20 +206,20 @@ public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefi return new FunctionToolDefinition(function, "function", null); } - public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable vectorStores = default) + public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable newVectorStores = default) { vectorStoreIds ??= new ChangeTrackingList(); - vectorStores ??= new ChangeTrackingList(); + newVectorStores ??= new ChangeTrackingList(); - return new FileSearchToolResources(vectorStoreIds?.ToList(), vectorStores?.ToList(), null); + return new FileSearchToolResources(vectorStoreIds?.ToList(), newVectorStores?.ToList(), null); } - public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable fileIds = default, BinaryData chunkingStrategy = default, IDictionary metadata = default) + public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable fileIds = default, IDictionary metadata = default, FileChunkingStrategy chunkingStrategy = default) { fileIds ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); - return new VectorStoreCreationHelper(fileIds?.ToList(), chunkingStrategy, metadata, null); + return new VectorStoreCreationHelper(fileIds?.ToList(), metadata, chunkingStrategy, null); } public static RunTruncationStrategy RunTruncationStrategy(InternalTruncationObjectType @type = default, int? lastMessages = default) @@ -238,14 +234,13 @@ public static ToolConstraint ToolConstraint(InternalAssistantsNamedToolChoiceTyp return new ToolConstraint(@type, function, null); } - public static ThreadRun ThreadRun(string id = default, InternalRunObjectObject @object = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, InternalRunRequiredAction requiredAction = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, float? topP = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, RunTruncationStrategy truncationStrategy = default, BinaryData toolChoice = default, bool parallelToolCalls = default, BinaryData responseFormat = default) + public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, InternalRunRequiredAction requiredAction = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? parallelToolCallsEnabled = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); return new ThreadRun( id, - @object, createdAt, threadId, assistantId, @@ -264,13 +259,14 @@ public static ThreadRun ThreadRun(string id = default, InternalRunObjectObject @ metadata, usage, temperature, - topP, maxPromptTokens, maxCompletionTokens, truncationStrategy, - toolChoice, - parallelToolCalls, + @object, responseFormat, + toolConstraint, + nucleusSamplingFactor, + parallelToolCallsEnabled, null); } @@ -292,29 +288,23 @@ public static RunTokenUsage RunTokenUsage(int completionTokens = default, int pr return new RunTokenUsage(completionTokens, promptTokens, totalTokens, null); } - public static RunCreationOptions RunCreationOptions(string assistantId = default, InternalCreateRunRequestModel? model = default, string instructions = default, string additionalInstructions = default, IEnumerable additionalMessages = default, IEnumerable tools = default, IDictionary metadata = default, float? temperature = default, float? topP = default, bool? stream = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, RunTruncationStrategy truncationStrategy = default, BinaryData toolChoice = default, bool? parallelToolCalls = default, BinaryData responseFormat = default) + public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? parallelToolCallsEnabled = default, IEnumerable toolsOverride = default, float? nucleusSamplingFactor = default, ToolConstraint toolConstraint = default) { - additionalMessages ??= new ChangeTrackingList(); - tools ??= new ChangeTrackingList(); - metadata ??= new ChangeTrackingDictionary(); + internalMessages ??= new ChangeTrackingList(); + toolsOverride ??= new ChangeTrackingList(); return new RunCreationOptions( assistantId, - model, - instructions, - additionalInstructions, - additionalMessages?.ToList(), - tools?.ToList(), - metadata, - temperature, - topP, stream, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - parallelToolCalls, responseFormat, + modelOverride, + instructionsOverride, + additionalInstructions, + internalMessages?.ToList(), + parallelToolCallsEnabled, + toolsOverride?.ToList(), + nucleusSamplingFactor, + toolConstraint, null); } @@ -331,20 +321,18 @@ public static ToolOutput ToolOutput(string toolCallId = default, string output = return new ToolOutput(toolCallId, output, null); } - public static RunStep RunStep(string id = default, InternalRunStepObjectObject @object = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepDetails stepDetails = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default) + public static RunStep RunStep(string id = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default, InternalRunStepObjectObject @object = default, RunStepDetails details = default) { metadata ??= new ChangeTrackingDictionary(); return new RunStep( id, - @object, createdAt, assistantId, threadId, runId, @type, status, - stepDetails, lastError, expiredAt, cancelledAt, @@ -352,6 +340,8 @@ public static RunStep RunStep(string id = default, InternalRunStepObjectObject @ completedAt, metadata, usage, + @object, + details, null); } @@ -392,37 +382,30 @@ public static RunStepTokenUsage RunStepTokenUsage(int completionTokens = default return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, null); } - public static AssistantThread AssistantThread(string id = default, InternalThreadObjectObject @object = default, DateTimeOffset createdAt = default, InternalThreadObjectToolResources toolResources = default, IDictionary metadata = default) + public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IDictionary metadata = default, InternalThreadObjectObject @object = default) { metadata ??= new ChangeTrackingDictionary(); - return new AssistantThread( - id, - @object, - createdAt, - toolResources, - metadata, - null); + return new AssistantThread(id, createdAt, metadata, @object, null); } - public static ThreadModificationOptions ThreadModificationOptions(InternalModifyThreadRequestToolResources toolResources = default, IDictionary metadata = default) + public static ThreadModificationOptions ThreadModificationOptions(IDictionary metadata = default, ToolResources toolResources = default) { metadata ??= new ChangeTrackingDictionary(); - return new ThreadModificationOptions(toolResources, metadata, null); + return new ThreadModificationOptions(metadata, toolResources, null); } - public static ThreadDeletionResult ThreadDeletionResult(string id = default, bool deleted = default, InternalDeleteThreadResponseObject @object = default) + public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, string threadId = default, InternalDeleteThreadResponseObject @object = default) { - return new ThreadDeletionResult(id, deleted, @object, null); + return new ThreadDeletionResult(deleted, threadId, @object, null); } - public static ModerationCollection ModerationCollection(string id = default, string model = default, IEnumerable results = default) + public static ModerationCollection ModerationCollection(string id = default, string model = default) { - results ??= new ChangeTrackingList(); - return new ModerationCollection(id, model, results?.ToList(), null); + return new ModerationCollection(id, model, null); } public static ModerationResult ModerationResult(bool flagged = default, ModerationCategories categories = default, ModerationCategoryScores categoryScores = default) @@ -467,46 +450,43 @@ public static ModerationCategoryScores ModerationCategoryScores(float hate = def null); } - public static OpenAIModelInfoCollection OpenAIModelInfoCollection(InternalListModelsResponseObject @object = default, IEnumerable data = default) + public static OpenAIModelInfoCollection OpenAIModelInfoCollection() { - data ??= new ChangeTrackingList(); - return new OpenAIModelInfoCollection(@object, data?.ToList(), null); + return new OpenAIModelInfoCollection(null); } - public static OpenAIModelInfo OpenAIModelInfo(string id = default, DateTimeOffset created = default, InternalModelObject @object = default, string ownedBy = default) + public static OpenAIModelInfo OpenAIModelInfo(string id = default, string ownedBy = default, DateTimeOffset createdAt = default) { - return new OpenAIModelInfo(id, created, @object, ownedBy, null); + return new OpenAIModelInfo(id, ownedBy, createdAt, null); } - public static ModelDeletionResult ModelDeletionResult(string id = default, bool deleted = default, InternalDeleteModelResponseObject @object = default) + public static ModelDeletionResult ModelDeletionResult(bool deleted = default, string modelId = default, InternalDeleteModelResponseObject @object = default) { - return new ModelDeletionResult(id, deleted, @object, null); + return new ModelDeletionResult(deleted, modelId, @object, null); } - public static ThreadMessage ThreadMessage(string id = default, InternalMessageObjectObject @object = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, InternalMessageObjectRole role = default, IEnumerable content = default, string assistantId = default, string runId = default, IEnumerable attachments = default, IDictionary metadata = default) + public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default) { content ??= new ChangeTrackingList(); - attachments ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); return new ThreadMessage( id, - @object, createdAt, threadId, status, incompleteDetails, completedAt, incompleteAt, - role, content?.ToList(), assistantId, runId, - attachments?.ToList(), metadata, + @object, + role, null); } @@ -523,213 +503,182 @@ public static MessageModificationOptions MessageModificationOptions(IDictionary< return new MessageModificationOptions(metadata, null); } - public static MessageDeletionResult MessageDeletionResult(string id = default, bool deleted = default, InternalDeleteMessageResponseObject @object = default) + public static MessageDeletionResult MessageDeletionResult(bool deleted = default, string messageId = default, InternalDeleteMessageResponseObject @object = default) { - return new MessageDeletionResult(id, deleted, @object, null); + return new MessageDeletionResult(deleted, messageId, @object, null); } - public static ImageGenerationOptions ImageGenerationOptions(string prompt = default, InternalCreateImageRequestModel? model = default, int? n = default, Images.GeneratedImageQuality? quality = default, Images.GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, Images.GeneratedImageStyle? style = default, string user = default) + public static ImageGenerationOptions ImageGenerationOptions(Images.GeneratedImageQuality? quality = default, Images.GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, Images.GeneratedImageStyle? style = default, string endUserId = default) { return new ImageGenerationOptions( - prompt, - model, - n, quality, responseFormat, size, style, - user, + endUserId, null); } - public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset created = default, IEnumerable data = default) + public static GeneratedImageCollection GeneratedImageCollection() { - data ??= new ChangeTrackingList(); - return new GeneratedImageCollection(created, data?.ToList(), null); + return new GeneratedImageCollection(null); } - public static GeneratedImage GeneratedImage(BinaryData b64Json = default, Uri url = default, string revisedPrompt = default) + public static GeneratedImage GeneratedImage(string revisedPrompt = default, BinaryData imageBytes = default, Uri imageUri = default) { - return new GeneratedImage(b64Json, url, revisedPrompt, null); + return new GeneratedImage(revisedPrompt, imageBytes, imageUri, null); } - public static ImageEditOptions ImageEditOptions(BinaryData image = default, string prompt = default, BinaryData mask = default, InternalCreateImageEditRequestModel? model = default, int? n = default, InternalCreateImageEditRequestSize? size = default, InternalCreateImageEditRequestResponseFormat? responseFormat = default, string user = default) + public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) { - return new ImageEditOptions( - image, - prompt, - mask, - model, - n, - size, - responseFormat, - user, - null); + return new ImageEditOptions(size, responseFormat, endUserId, null); } - public static ImageVariationOptions ImageVariationOptions(BinaryData image = default, InternalCreateImageVariationRequestModel? model = default, int? n = default, InternalCreateImageVariationRequestResponseFormat? responseFormat = default, InternalCreateImageVariationRequestSize? size = default, string user = default) + public static ImageVariationOptions ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) { - return new ImageVariationOptions( - image, - model, - n, - responseFormat, - size, - user, - null); + return new ImageVariationOptions(size, responseFormat, endUserId, null); } - public static OpenAIFileInfoCollection OpenAIFileInfoCollection(IEnumerable data = default, InternalListFilesResponseObject @object = default) + public static OpenAIFileInfoCollection OpenAIFileInfoCollection() { - data ??= new ChangeTrackingList(); - return new OpenAIFileInfoCollection(data?.ToList(), @object, null); + return new OpenAIFileInfoCollection(null); } - public static FileDeletionResult FileDeletionResult(string id = default, InternalDeleteFileResponseObject @object = default, bool deleted = default) + public static FileDeletionResult FileDeletionResult(bool deleted = default, string fileId = default, InternalDeleteFileResponseObject @object = default) { - return new FileDeletionResult(id, @object, deleted, null); + return new FileDeletionResult(deleted, fileId, @object, null); } - public static EmbeddingGenerationOptions EmbeddingGenerationOptions(BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, int? dimensions = default, string user = default) + public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, string endUserId = default) { - return new EmbeddingGenerationOptions( - input, - model, - encodingFormat, - dimensions, - user, - null); + return new EmbeddingGenerationOptions(dimensions, endUserId, null); } - public static EmbeddingCollection EmbeddingCollection(IEnumerable data = default, string model = default, InternalCreateEmbeddingResponseObject @object = default, EmbeddingTokenUsage usage = default) + public static EmbeddingCollection EmbeddingCollection(string model = default, EmbeddingTokenUsage usage = default, InternalCreateEmbeddingResponseObject @object = default) { - data ??= new ChangeTrackingList(); - return new EmbeddingCollection(data?.ToList(), model, @object, usage, null); + return new EmbeddingCollection(model, usage, @object, null); } - public static Embedding Embedding(int index = default, BinaryData embedding = default, InternalEmbeddingObject @object = default) + public static Embedding Embedding(int index = default) { - return new Embedding(index, embedding, @object, null); + return new Embedding(index, null); } - public static EmbeddingTokenUsage EmbeddingTokenUsage(int promptTokens = default, int totalTokens = default) + public static EmbeddingTokenUsage EmbeddingTokenUsage(int totalTokens = default, int inputTokens = default) { - return new EmbeddingTokenUsage(promptTokens, totalTokens, null); + return new EmbeddingTokenUsage(totalTokens, inputTokens, null); } - public static ChatTokenUsage ChatTokenUsage(int completionTokens = default, int promptTokens = default, int totalTokens = default, ChatOutputTokenUsageDetails completionTokensDetails = default) + public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = default) { - return new ChatTokenUsage(completionTokens, promptTokens, totalTokens, completionTokensDetails, null); + return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, null); } - public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int? reasoningTokens = default) + public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default) { - return new ChatOutputTokenUsageDetails(reasoningTokens, null); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, null); } - public static ChatCompletionOptions ChatCompletionOptions(IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, float? frequencyPenalty = default, IDictionary logitBias = default, bool? logprobs = default, int? topLogprobs = default, int? maxTokens = default, int? maxCompletionTokens = default, int? n = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, long? seed = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, BinaryData stop = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, float? temperature = default, float? topP = default, IEnumerable tools = default, BinaryData toolChoice = default, bool? parallelToolCalls = default, string user = default, BinaryData functionCall = default, IEnumerable functions = default) + public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? parallelToolCallsEnabled = default, string endUserId = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default) { - messages ??= new ChangeTrackingList(); - logitBias ??= new ChangeTrackingDictionary(); tools ??= new ChangeTrackingList(); - functions ??= new ChangeTrackingList(); + messages ??= new ChangeTrackingList(); + stopSequences ??= new ChangeTrackingList(); + logitBiases ??= new ChangeTrackingDictionary(); return new ChatCompletionOptions( - messages?.ToList(), - model, frequencyPenalty, - logitBias, - logprobs, - topLogprobs, - maxTokens, - maxCompletionTokens, - n, presencePenalty, responseFormat, - seed, serviceTier, - stop, - stream, - streamOptions, temperature, topP, tools?.ToList(), + messages?.ToList(), + model, + n, + stream, + streamOptions, + includeLogProbabilities, + topLogProbabilityCount, + stopSequences?.ToList(), + logitBiases, toolChoice, - parallelToolCalls, - user, - functionCall, - functions?.ToList(), + functionChoice, + parallelToolCallsEnabled, + endUserId, + deprecatedMaxTokens, + maxOutputTokenCount, null); } - public static ChatMessage ChatMessage(string role = default) + public static ChatMessage ChatMessage(Chat.ChatMessageRole role = default) { return new InternalUnknownChatMessage(role, null); } - public static SystemChatMessage SystemChatMessage(BinaryData content = default, string name = default) + public static SystemChatMessage SystemChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) { - return new SystemChatMessage(content, name, "system", null); + return new SystemChatMessage(content, participantName, role, null); } - public static UserChatMessage UserChatMessage(BinaryData content = default, string name = default) + public static UserChatMessage UserChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) { - return new UserChatMessage(content, name, "user", null); + return new UserChatMessage(content, participantName, role, null); } - public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string name = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default) + public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, Chat.ChatMessageRole role = default) { toolCalls ??= new ChangeTrackingList(); return new AssistantChatMessage( content, refusal, - name, + participantName, toolCalls?.ToList(), - functionCall, - "assistant", + role, null); } - public static ChatToolCall ChatToolCall(string id = default, ChatToolCallKind @type = default, InternalChatCompletionMessageToolCallFunction function = default) + public static ChatToolCall ChatToolCall(string id = default, InternalChatCompletionMessageToolCallFunction function = default, ChatToolCallKind kind = default) { - return new ChatToolCall(id, @type, function, null); + return new ChatToolCall(id, function, kind, null); } - public static ChatFunctionCall ChatFunctionCall(string arguments = default, string name = default) + public static ChatFunctionCall ChatFunctionCall(string functionName = default, string functionArguments = default) { - return new ChatFunctionCall(arguments, name, null); + return new ChatFunctionCall(functionName, functionArguments, null); } - public static ToolChatMessage ToolChatMessage(BinaryData content = default, string toolCallId = default) + public static ToolChatMessage ToolChatMessage(BinaryData content = default, string toolCallId = default, Chat.ChatMessageRole role = default) { - return new ToolChatMessage(content, toolCallId, "tool", null); + return new ToolChatMessage(content, toolCallId, role, null); } - public static FunctionChatMessage FunctionChatMessage(string content = default, string name = default) + public static FunctionChatMessage FunctionChatMessage(string content = default, string functionName = default, Chat.ChatMessageRole role = default) { - return new FunctionChatMessage(content, name, "function", null); + return new FunctionChatMessage(content, functionName, role, null); } public static ChatResponseFormat ChatResponseFormat(string @type = default) @@ -738,76 +687,74 @@ public static ChatResponseFormat ChatResponseFormat(string @type = default) return new InternalUnknownChatResponseFormat(@type, null); } - public static ChatTool ChatTool(ChatToolKind @type = default, InternalFunctionDefinition function = default) + public static ChatTool ChatTool(InternalFunctionDefinition function = default, ChatToolKind kind = default) { - return new ChatTool(@type, function, null); + return new ChatTool(function, kind, null); } - public static ChatFunction ChatFunction(string description = default, string name = default, InternalFunctionParameters parameters = default) + public static ChatFunction ChatFunction(string functionName = default, string functionDescription = default, BinaryData functionParameters = default) { - return new ChatFunction(description, name, parameters, null); + return new ChatFunction(functionName, functionDescription, functionParameters, null); } - public static ChatCompletion ChatCompletion(string id = default, IEnumerable choices = default, DateTimeOffset created = default, string model = default, InternalCreateChatCompletionResponseServiceTier? serviceTier = default, string systemFingerprint = default, InternalCreateChatCompletionResponseObject @object = default, ChatTokenUsage usage = default) + public static ChatCompletion ChatCompletion(string id = default, string model = default, InternalCreateChatCompletionResponseServiceTier? serviceTier = default, string systemFingerprint = default, ChatTokenUsage usage = default, InternalCreateChatCompletionResponseObject @object = default, IEnumerable choices = default, DateTimeOffset createdAt = default) { choices ??= new ChangeTrackingList(); return new ChatCompletion( id, - choices?.ToList(), - created, model, serviceTier, systemFingerprint, - @object, usage, + @object, + choices?.ToList(), + createdAt, null); } - public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logprob = default, IEnumerable bytes = default, IEnumerable topLogprobs = default) + public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default, IEnumerable topLogProbabilities = default) { - bytes ??= new ChangeTrackingList(); - topLogprobs ??= new ChangeTrackingList(); + utf8Bytes ??= new ReadOnlyMemory(); + topLogProbabilities ??= new ChangeTrackingList(); - return new ChatTokenLogProbabilityDetails(token, logprob, bytes?.ToList(), topLogprobs?.ToList(), null); + return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), topLogProbabilities?.ToList(), null); } - public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logprob = default, IEnumerable bytes = default) + public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default) { - bytes ??= new ChangeTrackingList(); + utf8Bytes ??= new ReadOnlyMemory(); - return new ChatTokenTopLogProbabilityDetails(token, logprob, bytes?.ToList(), null); + return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); } - public static AssistantCreationOptions AssistantCreationOptions(InternalCreateAssistantRequestModel model = default, string name = default, string description = default, string instructions = default, IEnumerable tools = default, InternalCreateAssistantRequestToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) + public static AssistantCreationOptions AssistantCreationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable tools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { - tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); + tools ??= new ChangeTrackingList(); return new AssistantCreationOptions( - model, name, description, instructions, - tools?.ToList(), - toolResources, metadata, temperature, - topP, + tools?.ToList(), + toolResources, responseFormat, + nucleusSamplingFactor, null); } - public static Assistant Assistant(string id = default, InternalAssistantObjectObject @object = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) + public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, float? nucleusSamplingFactor = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); return new Assistant( id, - @object, createdAt, name, description, @@ -817,138 +764,108 @@ public static Assistant Assistant(string id = default, InternalAssistantObjectOb toolResources, metadata, temperature, - topP, - responseFormat, + @object, + nucleusSamplingFactor, null); } - public static ToolResources ToolResources(CodeInterpreterToolResources codeInterpreter = default, InternalToolResourcesFileSearchIdsOnly fileSearch = default) + public static ToolResources ToolResources() { - return new ToolResources(codeInterpreter, fileSearch, null); + return new ToolResources(null); } - public static CodeInterpreterToolResources CodeInterpreterToolResources(IEnumerable fileIds = default) + public static CodeInterpreterToolResources CodeInterpreterToolResources() { - fileIds ??= new ChangeTrackingList(); - return new CodeInterpreterToolResources(fileIds?.ToList(), null); + return new CodeInterpreterToolResources(null); } - public static AssistantModificationOptions AssistantModificationOptions(string model = default, string name = default, string description = default, string instructions = default, IEnumerable tools = default, InternalModifyAssistantRequestToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default) + public static AssistantModificationOptions AssistantModificationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable defaultTools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { - tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); + defaultTools ??= new ChangeTrackingList(); return new AssistantModificationOptions( - model, name, description, instructions, - tools?.ToList(), - toolResources, metadata, temperature, - topP, + defaultTools?.ToList(), + toolResources, responseFormat, + nucleusSamplingFactor, null); } - public static AssistantDeletionResult AssistantDeletionResult(string id = default, bool deleted = default, InternalDeleteAssistantResponseObject @object = default) + public static AssistantDeletionResult AssistantDeletionResult(bool deleted = default, string assistantId = default, InternalDeleteAssistantResponseObject @object = default) { - return new AssistantDeletionResult(id, deleted, @object, null); + return new AssistantDeletionResult(deleted, assistantId, @object, null); } - public static SpeechGenerationOptions SpeechGenerationOptions(InternalCreateSpeechRequestModel model = default, string input = default, GeneratedSpeechVoice voice = default, GeneratedSpeechFormat? responseFormat = default, float? speed = default) + public static SpeechGenerationOptions SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat = default, InternalCreateSpeechRequestModel model = default, string input = default, GeneratedSpeechVoice voice = default, float? speedRatio = default) { return new SpeechGenerationOptions( + responseFormat, model, input, voice, - responseFormat, - speed, + speedRatio, null); } - public static AudioTranscriptionOptions AudioTranscriptionOptions(BinaryData @file = default, InternalCreateTranscriptionRequestModel model = default, string language = default, string prompt = default, Audio.AudioTranscriptionFormat? responseFormat = default, float? temperature = default, IEnumerable timestampGranularities = default) + public static AudioTranscriptionOptions AudioTranscriptionOptions(string language = default, string prompt = default, Audio.AudioTranscriptionFormat? responseFormat = default, float? temperature = default) { - timestampGranularities ??= new ChangeTrackingList(); - return new AudioTranscriptionOptions( - @file, - model, - language, - prompt, - responseFormat, - temperature, - timestampGranularities?.ToList(), - null); + return new AudioTranscriptionOptions(language, prompt, responseFormat, temperature, null); } - public static AudioTranscription AudioTranscription(InternalCreateTranscriptionResponseVerboseJsonTask task = default, string language = default, TimeSpan duration = default, string text = default, IEnumerable words = default, IEnumerable segments = default) + public static AudioTranscription AudioTranscription(string language = default, string text = default, IEnumerable words = default, IEnumerable segments = default) { words ??= new ChangeTrackingList(); segments ??= new ChangeTrackingList(); - return new AudioTranscription( - task, - language, - duration, - text, - words?.ToList(), - segments?.ToList(), - null); + return new AudioTranscription(language, text, words?.ToList(), segments?.ToList(), null); } - public static TranscribedWord TranscribedWord(string word = default, TimeSpan start = default, TimeSpan end = default) + public static TranscribedWord TranscribedWord(string word = default, TimeSpan startTime = default, TimeSpan endTime = default) { - return new TranscribedWord(word, start, end, null); + return new TranscribedWord(word, startTime, endTime, null); } - public static TranscribedSegment TranscribedSegment(int id = default, int seek = default, TimeSpan start = default, TimeSpan end = default, string text = default, IEnumerable tokens = default, float temperature = default, float avgLogprob = default, float compressionRatio = default, float noSpeechProb = default) + public static TranscribedSegment TranscribedSegment(int id = default, string text = default, float temperature = default, float compressionRatio = default, TimeSpan startTime = default, TimeSpan endTime = default, int seekOffset = default, IEnumerable tokenIds = default, float averageLogProbability = default, float noSpeechProbability = default) { - tokens ??= new ChangeTrackingList(); + tokenIds ??= new ChangeTrackingList(); return new TranscribedSegment( id, - seek, - start, - end, text, - tokens?.ToList(), temperature, - avgLogprob, compressionRatio, - noSpeechProb, + startTime, + endTime, + seekOffset, + tokenIds?.ToList(), + averageLogProbability, + noSpeechProbability, null); } - public static AudioTranslationOptions AudioTranslationOptions(BinaryData @file = default, InternalCreateTranslationRequestModel model = default, string prompt = default, Audio.AudioTranslationFormat? responseFormat = default, float? temperature = default) + public static AudioTranslationOptions AudioTranslationOptions(string prompt = default, Audio.AudioTranslationFormat? responseFormat = default, float? temperature = default) { - return new AudioTranslationOptions( - @file, - model, - prompt, - responseFormat, - temperature, - null); + return new AudioTranslationOptions(prompt, responseFormat, temperature, null); } - public static AudioTranslation AudioTranslation(InternalCreateTranslationResponseVerboseJsonTask task = default, string language = default, TimeSpan duration = default, string text = default, IEnumerable segments = default) + public static AudioTranslation AudioTranslation(string language = default, string text = default, IEnumerable segments = default) { segments ??= new ChangeTrackingList(); - return new AudioTranslation( - task, - language, - duration, - text, - segments?.ToList(), - null); + return new AudioTranslation(language, text, segments?.ToList(), null); } public static AssistantResponseFormat AssistantResponseFormat(string @type = default) @@ -975,31 +892,31 @@ public static ChatMessageContentPart ChatMessageContentPart() return new ChatMessageContentPart(null); } - public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string arguments = default, string name = default) + public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = default, string functionArgumentsUpdate = default) { - return new StreamingChatFunctionCallUpdate(arguments, name, null); + return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, null); } - public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = default, string id = default, InternalChatCompletionMessageToolCallChunkType? @type = default, InternalChatCompletionMessageToolCallChunkFunction function = default) + public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = default, string id = default, InternalChatCompletionMessageToolCallChunkFunction function = default, ChatToolCallKind kind = default) { - return new StreamingChatToolCallUpdate(index, id, @type, function, null); + return new StreamingChatToolCallUpdate(index, id, function, kind, null); } - public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string id = default, IEnumerable choices = default, DateTimeOffset created = default, string model = default, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, InternalCreateChatCompletionStreamResponseUsage usage = default) + public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string id = default, string model = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, IEnumerable choices = default, DateTimeOffset createdAt = default, ChatTokenUsage usage = default, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default) { choices ??= new ChangeTrackingList(); return new StreamingChatCompletionUpdate( id, - choices?.ToList(), - created, model, - serviceTier, systemFingerprint, @object, + choices?.ToList(), + createdAt, usage, + serviceTier, null); } diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs index 2ee523bbf..f97680882 100644 --- a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -69,7 +69,7 @@ internal PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, R return message; } - internal PipelineMessage CreateGetVectorStoreRequest(string vector_store_id, RequestOptions options) + internal PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -78,14 +78,14 @@ internal PipelineMessage CreateGetVectorStoreRequest(string vector_store_id, Req ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateModifyVectorStoreRequest(string vector_store_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -94,7 +94,7 @@ internal PipelineMessage CreateModifyVectorStoreRequest(string vector_store_id, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -103,7 +103,7 @@ internal PipelineMessage CreateModifyVectorStoreRequest(string vector_store_id, return message; } - internal PipelineMessage CreateDeleteVectorStoreRequest(string vector_store_id, RequestOptions options) + internal PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -112,14 +112,14 @@ internal PipelineMessage CreateDeleteVectorStoreRequest(string vector_store_id, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateListVectorStoreFilesRequest(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + internal PipelineMessage CreateListVectorStoreFilesRequest(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -128,7 +128,7 @@ internal PipelineMessage CreateListVectorStoreFilesRequest(string vector_store_i ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); if (limit != null) { @@ -156,7 +156,7 @@ internal PipelineMessage CreateListVectorStoreFilesRequest(string vector_store_i return message; } - internal PipelineMessage CreateCreateVectorStoreFileRequest(string vector_store_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -165,7 +165,7 @@ internal PipelineMessage CreateCreateVectorStoreFileRequest(string vector_store_ ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -175,7 +175,7 @@ internal PipelineMessage CreateCreateVectorStoreFileRequest(string vector_store_ return message; } - internal PipelineMessage CreateGetVectorStoreFileRequest(string vector_store_id, string file_id, RequestOptions options) + internal PipelineMessage CreateGetVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -184,16 +184,16 @@ internal PipelineMessage CreateGetVectorStoreFileRequest(string vector_store_id, ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); - uri.AppendPath(file_id, true); + uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vector_store_id, string file_id, RequestOptions options) + internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -202,16 +202,16 @@ internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vector_store_ ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); - uri.AppendPath(file_id, true); + uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vector_store_id, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -220,7 +220,7 @@ internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vector_s ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -230,7 +230,7 @@ internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vector_s return message; } - internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vector_store_id, string batch_id, RequestOptions options) + internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -239,16 +239,16 @@ internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vector_stor ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); - uri.AppendPath(batch_id, true); + uri.AppendPath(batchId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vector_store_id, string batch_id, RequestOptions options) + internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -257,9 +257,9 @@ internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vector_s ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); - uri.AppendPath(batch_id, true); + uri.AppendPath(batchId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -267,7 +267,7 @@ internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vector_s return message; } - internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; @@ -276,9 +276,9 @@ internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vector_ ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vector_store_id, true); + uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); - uri.AppendPath(batch_id, true); + uri.AppendPath(batchId, true); uri.AppendPath("/files", false); if (limit != null) { diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 21b6a8988..79805ead6 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -47,137 +47,71 @@ public virtual async Task> ListVe return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); } - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) + public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); + using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options) + public virtual async Task ListVectorStoreFilesAsync(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); + using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult GetVectorStore(string vector_store_id, RequestOptions options) + public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - using PipelineMessage message = CreateGetVectorStoreRequest(vector_store_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetVectorStoreAsync(string vector_store_id, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - using PipelineMessage message = CreateGetVectorStoreRequest(vector_store_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ModifyVectorStore(string vector_store_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyVectorStoreRequest(vector_store_id, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ModifyVectorStoreAsync(string vector_store_id, BinaryContent content, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(content, nameof(content)); - - using PipelineMessage message = CreateModifyVectorStoreRequest(vector_store_id, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult DeleteVectorStore(string vector_store_id, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - using PipelineMessage message = CreateDeleteVectorStoreRequest(vector_store_id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task DeleteVectorStoreAsync(string vector_store_id, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - using PipelineMessage message = CreateDeleteVectorStoreRequest(vector_store_id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListVectorStoreFiles(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - using PipelineMessage message = CreateListVectorStoreFilesRequest(vector_store_id, limit, order, after, before, filter, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListVectorStoreFilesAsync(string vector_store_id, int? limit, string order, string after, string before, string filter, RequestOptions options) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - using PipelineMessage message = CreateListVectorStoreFilesRequest(vector_store_id, limit, order, after, before, filter, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListVectorStoreFiles(string vector_store_id, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) - { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - - ClientResult result = ListVectorStoreFiles(vector_store_id, limit, order.ToString(), after, before, filter.ToString(), null); + ClientResult result = ListVectorStoreFiles(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null); return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - public virtual async Task> ListVectorStoreFilesAsync(string vector_store_id, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual async Task> ListVectorStoreFilesAsync(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - ClientResult result = await ListVectorStoreFilesAsync(vector_store_id, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + ClientResult result = await ListVectorStoreFilesAsync(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - public virtual ClientResult ListFilesInVectorStoreBatch(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(batch_id, nameof(batch_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vector_store_id, batch_id, limit, order, after, before, filter, options); + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListFilesInVectorStoreBatchAsync(string vector_store_id, string batch_id, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual async Task ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(batch_id, nameof(batch_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vector_store_id, batch_id, limit, order, after, before, filter, options); + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListFilesInVectorStoreBatch(string vector_store_id, string batch_id, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(batch_id, nameof(batch_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); - ClientResult result = ListFilesInVectorStoreBatch(vector_store_id, batch_id, limit, order.ToString(), after, before, filter.ToString(), null); + ClientResult result = ListFilesInVectorStoreBatch(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null); return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } - public virtual async Task> ListFilesInVectorStoreBatchAsync(string vector_store_id, string batch_id, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual async Task> ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) { - Argument.AssertNotNull(vector_store_id, nameof(vector_store_id)); - Argument.AssertNotNull(batch_id, nameof(batch_id)); + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); - ClientResult result = await ListFilesInVectorStoreBatchAsync(vector_store_id, batch_id, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + ClientResult result = await ListFilesInVectorStoreBatchAsync(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); } } From 17da7d65886b2eef2461dbe5b45b7d7b6f3b8f25 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 2 Oct 2024 13:23:29 -0700 Subject: [PATCH 04/54] regen --- .../src/Custom/Assistants/AssistantClient.cs | 2 +- .../src/Custom/Audio/AudioClient.Protocol.cs | 12 +- .dotnet/src/Custom/Audio/AudioClient.cs | 14 +- .dotnet/src/Custom/Batch/BatchClient.cs | 2 +- .dotnet/src/Custom/Files/OpenAIFileClient.cs | 9 +- .../src/Custom/FineTuning/FineTuningClient.cs | 2 +- .../src/Custom/Models/OpenAIModelClient.cs | 8 +- .../Custom/VectorStores/VectorStoreClient.cs | 2 +- .dotnet/src/Generated/AssistantClient.cs | 4 - .dotnet/src/Generated/AudioClient.cs | 2 - .../src/Generated/BatchClient.RestClient.cs | 51 - .dotnet/src/Generated/BatchClient.cs | 24 +- .dotnet/src/Generated/ChatClient.cs | 5 - .dotnet/src/Generated/EmbeddingClient.cs | 5 - .../Generated/FineTuningClient.RestClient.cs | 34 - .dotnet/src/Generated/FineTuningClient.cs | 143 +- .dotnet/src/Generated/ImageClient.cs | 60 +- .../InternalAssistantMessageClient.cs | 134 +- .../Generated/InternalAssistantRunClient.cs | 250 +- .../InternalAssistantThreadClient.cs | 78 +- .../src/Generated/InternalUploadsClient.cs | 198 +- .../src/Generated/LegacyCompletionClient.cs | 59 +- .../AssistantChatMessage.Serialization.cs | 168 +- .../Generated/Models/AssistantChatMessage.cs | 6 +- .../Models/AudioTranscriptionFormat.cs | 20 +- ...AudioTranscriptionOptions.Serialization.cs | 233 +- .../Models/AudioTranscriptionOptions.cs | 12 +- .../Models/AudioTranslationFormat.cs | 20 +- .../AudioTranslationOptions.Serialization.cs | 176 +- .../Models/AudioTranslationOptions.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 213 +- .../src/Generated/Models/ChatCompletion.cs | 36 +- .../ChatCompletionOptions.Serialization.cs | 579 +- .../Generated/Models/ChatCompletionOptions.cs | 43 +- .../Models/ChatFunctionCall.Serialization.cs | 104 +- .../src/Generated/Models/ChatFunctionCall.cs | 12 +- .dotnet/src/Generated/Models/ChatMessage.cs | 9 +- .../Generated/Models/ChatMessageContent.cs | 12 - .../ChatResponseFormat.Serialization.cs | 4 - .../Generated/Models/ChatResponseFormat.cs | 15 +- .../Models/ChatTool.Serialization.cs | 102 +- .dotnet/src/Generated/Models/ChatTool.cs | 4 +- .../Models/ChatToolCall.Serialization.cs | 113 +- .dotnet/src/Generated/Models/ChatToolCall.cs | 4 +- .../Models/ChatToolCallKind.Serialization.cs | 11 +- .../Models/ChatToolKind.Serialization.cs | 11 +- ...versationAudioDeltaUpdate.Serialization.cs | 219 - .../Models/ConversationAudioDeltaUpdate.cs | 45 - ...nversationAudioDoneUpdate.Serialization.cs | 219 - .../Models/ConversationAudioDoneUpdate.cs | 44 - .../Models/ConversationAudioFormat.cs | 38 - .../ConversationContentPart.Serialization.cs | 126 - .../Models/ConversationContentPart.cs | 23 - ...ContentPartFinishedUpdate.Serialization.cs | 219 - .../ConversationContentPartFinishedUpdate.cs | 44 - .../Models/ConversationContentPartKind.cs | 40 - ...nContentPartStartedUpdate.Serialization.cs | 219 - .../ConversationContentPartStartedUpdate.cs | 44 - .../ConversationErrorUpdate.Serialization.cs | 167 - .../Models/ConversationErrorUpdate.cs | 29 - ...nCallArgumentsDeltaUpdate.Serialization.cs | 219 - ...rsationFunctionCallArgumentsDeltaUpdate.cs | 46 - ...onCallArgumentsDoneUpdate.Serialization.cs | 231 - ...ersationFunctionCallArgumentsDoneUpdate.cs | 50 - .../ConversationFunctionTool.Serialization.cs | 177 - .../Models/ConversationFunctionTool.cs | 13 - ...tAudioBufferClearedUpdate.Serialization.cs | 156 - ...nversationInputAudioBufferClearedUpdate.cs | 25 - ...udioBufferCommittedUpdate.Serialization.cs | 178 - ...ersationInputAudioBufferCommittedUpdate.cs | 33 - ...InputSpeechFinishedUpdate.Serialization.cs | 178 - .../ConversationInputSpeechFinishedUpdate.cs | 34 - ...nInputSpeechStartedUpdate.Serialization.cs | 178 - .../ConversationInputSpeechStartedUpdate.cs | 34 - ...ionInputTokenUsageDetails.Serialization.cs | 155 - .../ConversationInputTokenUsageDetails.cs | 36 - ...TranscriptionFailedUpdate.Serialization.cs | 195 - ...versationInputTranscriptionFailedUpdate.cs | 37 - ...anscriptionFinishedUpdate.Serialization.cs | 195 - ...rsationInputTranscriptionFinishedUpdate.cs | 38 - ...InputTranscriptionOptions.Serialization.cs | 137 - .../ConversationInputTranscriptionOptions.cs | 25 - .../Models/ConversationItem.Serialization.cs | 133 - .../src/Generated/Models/ConversationItem.cs | 27 - ...ionItemAcknowledgedUpdate.Serialization.cs | 167 - .../ConversationItemAcknowledgedUpdate.cs | 29 - ...ersationItemDeletedUpdate.Serialization.cs | 167 - .../Models/ConversationItemDeletedUpdate.cs | 31 - ...rsationItemFinishedUpdate.Serialization.cs | 195 - .../Models/ConversationItemFinishedUpdate.cs | 37 - ...ersationItemStartedUpdate.Serialization.cs | 195 - .../Models/ConversationItemStartedUpdate.cs | 37 - .../Models/ConversationItemStatus.cs | 38 - ...sationItemTruncatedUpdate.Serialization.cs | 195 - .../Models/ConversationItemTruncatedUpdate.cs | 37 - .../Models/ConversationMessageRole.cs | 38 - ...onOutputTokenUsageDetails.Serialization.cs | 144 - .../ConversationOutputTokenUsageDetails.cs | 33 - ...tTranscriptionDeltaUpdate.Serialization.cs | 219 - ...versationOutputTranscriptionDeltaUpdate.cs | 45 - ...anscriptionFinishedUpdate.Serialization.cs | 207 - ...sationOutputTranscriptionFinishedUpdate.cs | 41 - ...ationRateLimitDetailsItem.Serialization.cs | 166 - .../ConversationRateLimitDetailsItem.cs | 41 - ...onRateLimitsUpdatedUpdate.Serialization.cs | 177 - .../ConversationRateLimitsUpdatedUpdate.cs | 32 - ...ionResponseFinishedUpdate.Serialization.cs | 167 - .../ConversationResponseFinishedUpdate.cs | 29 - ...tionResponseStartedUpdate.Serialization.cs | 167 - .../ConversationResponseStartedUpdate.cs | 29 - ...onSessionConfiguredUpdate.Serialization.cs | 167 - .../ConversationSessionConfiguredUpdate.cs | 29 - ...onversationSessionOptions.Serialization.cs | 341 - .../Models/ConversationSessionOptions.cs | 42 - ...ationSessionStartedUpdate.Serialization.cs | 167 - .../ConversationSessionStartedUpdate.cs | 29 - .../Generated/Models/ConversationStatus.cs | 42 - ...nversationTextDeltaUpdate.Serialization.cs | 219 - .../Models/ConversationTextDeltaUpdate.cs | 45 - ...onversationTextDoneUpdate.Serialization.cs | 219 - .../Models/ConversationTextDoneUpdate.cs | 45 - .../ConversationTokenUsage.Serialization.cs | 183 - .../Models/ConversationTokenUsage.cs | 45 - .../Models/ConversationTool.Serialization.cs | 123 - .../src/Generated/Models/ConversationTool.cs | 23 - ...onversationToolChoiceKind.Serialization.cs | 27 - .../Generated/Models/ConversationToolKind.cs | 34 - .../Models/ConversationTranscriptionModel.cs | 34 - ...ersationTurnDetectionKind.Serialization.cs | 23 - ...ationTurnDetectionOptions.Serialization.cs | 105 - .../ConversationTurnDetectionOptions.cs | 23 - .../ConversationUpdate.Serialization.cs | 161 - .../Generated/Models/ConversationUpdate.cs | 30 - .../ConversationUpdateKind.Serialization.cs | 75 - .../src/Generated/Models/ConversationVoice.cs | 38 - .../EmbeddingTokenUsage.Serialization.cs | 104 +- .../Generated/Models/EmbeddingTokenUsage.cs | 11 +- .../Models/FilePurpose.Serialization.cs | 53 +- .../Models/FileStatus.Serialization.cs | 25 +- .../FunctionChatMessage.Serialization.cs | 101 +- .../Generated/Models/FunctionChatMessage.cs | 7 +- .../Generated/Models/GeneratedImageFormat.cs | 14 +- .../Generated/Models/GeneratedImageQuality.cs | 16 +- .../Generated/Models/GeneratedImageStyle.cs | 17 +- .../Models/ImageEditOptions.Serialization.cs | 278 +- .../src/Generated/Models/ImageEditOptions.cs | 2 +- .../ImageGenerationOptions.Serialization.cs | 183 +- .../Models/ImageGenerationOptions.cs | 8 +- .../ImageVariationOptions.Serialization.cs | 244 +- .../Generated/Models/ImageVariationOptions.cs | 2 +- ...sageToolCallChunkFunction.Serialization.cs | 96 +- ...tCompletionMessageToolCallChunkFunction.cs | 10 +- ...onMessageToolCallFunction.Serialization.cs | 100 +- ...alChatCompletionMessageToolCallFunction.cs | 17 +- ...CompletionResponseMessage.Serialization.cs | 162 +- .../InternalChatCompletionResponseMessage.cs | 23 +- ...sponseMessageFunctionCall.Serialization.cs | 102 +- ...atCompletionResponseMessageFunctionCall.cs | 23 +- ...letionStreamResponseDelta.Serialization.cs | 172 +- ...ternalChatCompletionStreamResponseDelta.cs | 19 +- ...onRequestAssistantMessage.Serialization.cs | 187 +- ...neChatCompletionRequestAssistantMessage.cs | 5 +- ...ernalModerationCategories.Serialization.cs | 201 +- .../Models/InternalModerationCategories.cs | 41 +- ...lModerationCategoryScores.Serialization.cs | 201 +- .../InternalModerationCategoryScores.cs | 41 +- ...questAssistantMessageItem.Serialization.cs | 197 - ...rnalRealtimeRequestAssistantMessageItem.cs | 30 - ...meRequestAudioContentPart.Serialization.cs | 144 - ...InternalRealtimeRequestAudioContentPart.cs | 24 - ...nalRealtimeRequestCommand.Serialization.cs | 136 - .../Models/InternalRealtimeRequestCommand.cs | 27 - .../InternalRealtimeRequestCommandType.cs | 50 - ...meRequestFunctionCallItem.Serialization.cs | 199 - ...InternalRealtimeRequestFunctionCallItem.cs | 41 - ...estFunctionCallOutputItem.Serialization.cs | 166 - ...alRealtimeRequestFunctionCallOutputItem.cs | 35 - ...tAudioBufferAppendCommand.Serialization.cs | 155 - ...imeRequestInputAudioBufferAppendCommand.cs | 31 - ...utAudioBufferClearCommand.Serialization.cs | 144 - ...timeRequestInputAudioBufferClearCommand.cs | 21 - ...tAudioBufferCommitCommand.Serialization.cs | 144 - ...imeRequestInputAudioBufferCommitCommand.cs | 21 - ...eRequestItemCreateCommand.Serialization.cs | 166 - ...nternalRealtimeRequestItemCreateCommand.cs | 33 - ...eRequestItemDeleteCommand.Serialization.cs | 155 - ...nternalRealtimeRequestItemDeleteCommand.cs | 31 - ...equestItemTruncateCommand.Serialization.cs | 183 - ...ernalRealtimeRequestItemTruncateCommand.cs | 37 - .../Models/InternalRealtimeRequestItemType.cs | 38 - ...ealtimeRequestMessageItem.Serialization.cs | 179 - .../InternalRealtimeRequestMessageItem.cs | 26 - .../Models/InternalRealtimeRequestModel.cs | 34 - ...uestResponseCancelCommand.Serialization.cs | 144 - ...nalRealtimeRequestResponseCancelCommand.cs | 21 - ...uestResponseCreateCommand.Serialization.cs | 159 - ...nalRealtimeRequestResponseCreateCommand.cs | 24 - ...onseCreateCommandResponse.Serialization.cs | 365 - ...imeRequestResponseCreateCommandResponse.cs | 57 - ...questSessionUpdateCommand.Serialization.cs | 155 - ...rnalRealtimeRequestSessionUpdateCommand.cs | 31 - ...uestSessionUpdateCommandSessionModality.cs | 36 - ...eRequestSystemMessageItem.Serialization.cs | 197 - ...nternalRealtimeRequestSystemMessageItem.cs | 30 - ...imeRequestTextContentPart.Serialization.cs | 144 - .../InternalRealtimeRequestTextContentPart.cs | 31 - ...imeRequestUserMessageItem.Serialization.cs | 197 - .../InternalRealtimeRequestUserMessageItem.cs | 22 - .../InternalRealtimeResponse.Serialization.cs | 217 - .../Models/InternalRealtimeResponse.cs | 49 - ...lRealtimeResponseApiError.Serialization.cs | 166 - .../InternalRealtimeResponseApiError.cs | 40 - ...eResponseAudioContentPart.Serialization.cs | 156 - ...nternalRealtimeResponseAudioContentPart.cs | 29 - ...nseCancelledStatusDetails.Serialization.cs | 144 - ...lRealtimeResponseCancelledStatusDetails.cs | 29 - ...imeResponseCancelledStatusDetailsReason.cs | 36 - ...rnalRealtimeResponseError.Serialization.cs | 183 - .../Models/InternalRealtimeResponseError.cs | 42 - ...eResponseFunctionCallItem.Serialization.cs | 219 - ...nternalRealtimeResponseFunctionCallItem.cs | 42 - ...nseFunctionCallOutputItem.Serialization.cs | 195 - ...lRealtimeResponseFunctionCallOutputItem.cs | 35 - ...seIncompleteStatusDetails.Serialization.cs | 144 - ...RealtimeResponseIncompleteStatusDetails.cs | 29 - ...meResponseIncompleteStatusDetailsReason.cs | 36 - ...ernalRealtimeResponseItem.Serialization.cs | 142 - .../Models/InternalRealtimeResponseItem.cs | 35 - .../InternalRealtimeResponseItemObject.cs | 34 - ...altimeResponseMessageItem.Serialization.cs | 217 - .../InternalRealtimeResponseMessageItem.cs | 36 - .../Models/InternalRealtimeResponseObject.cs | 34 - ...alRealtimeResponseSession.Serialization.cs | 349 - .../Models/InternalRealtimeResponseSession.cs | 77 - .../InternalRealtimeResponseSessionObject.cs | 34 - ...timeResponseStatusDetails.Serialization.cs | 125 - .../InternalRealtimeResponseStatusDetails.cs | 25 - ...meResponseTextContentPart.Serialization.cs | 144 - ...InternalRealtimeResponseTextContentPart.cs | 31 - ...imeServerVadTurnDetection.Serialization.cs | 170 - .../InternalRealtimeServerVadTurnDetection.cs | 28 - ...eToolChoiceFunctionObject.Serialization.cs | 144 - ...nternalRealtimeToolChoiceFunctionObject.cs | 31 - ...iceFunctionObjectFunction.Serialization.cs | 133 - ...ealtimeToolChoiceFunctionObjectFunction.cs | 32 - ...lRealtimeToolChoiceObject.Serialization.cs | 123 - .../InternalRealtimeToolChoiceObject.cs | 25 - ...nternalUnknownChatMessage.Serialization.cs | 80 +- .../Models/InternalUnknownChatMessage.cs | 6 +- .../Models/InternalUpload.Serialization.cs | 180 +- .../src/Generated/Models/InternalUpload.cs | 41 +- .../Models/ModerationResult.Serialization.cs | 65 +- .../src/Generated/Models/ModerationResult.cs | 15 +- ...oderationResultCollection.Serialization.cs | 67 +- .../Models/ModerationResultCollection.cs | 25 +- .../Models/OpenAIEmbedding.Serialization.cs | 120 +- .../src/Generated/Models/OpenAIEmbedding.cs | 9 +- ...OpenAIEmbeddingCollection.Serialization.cs | 69 +- .../Models/OpenAIEmbeddingCollection.cs | 26 +- .../Models/OpenAIFile.Serialization.cs | 191 +- .dotnet/src/Generated/Models/OpenAIFile.cs | 32 +- .../OpenAIFileCollection.Serialization.cs | 63 +- .../Generated/Models/OpenAIFileCollection.cs | 11 +- .../Models/OpenAIModel.Serialization.cs | 124 +- .dotnet/src/Generated/Models/OpenAIModel.cs | 25 +- .../OpenAIModelCollection.Serialization.cs | 63 +- .../Generated/Models/OpenAIModelCollection.cs | 11 +- ...sponseFailedStatusDetails.Serialization.cs | 151 - .../RealtimeResponseFailedStatusDetails.cs | 31 - .../RunCreationOptions.Serialization.cs | 411 +- .../Generated/Models/RunCreationOptions.cs | 15 +- .../Generated/Models/RunIncompleteReason.cs | 14 +- .../Models/RunStepTokenUsage.Serialization.cs | 117 +- .../src/Generated/Models/RunStepTokenUsage.cs | 11 +- .../Models/RunTokenUsage.Serialization.cs | 117 +- .dotnet/src/Generated/Models/RunTokenUsage.cs | 11 +- ...amingChatCompletionUpdate.Serialization.cs | 196 +- .../Models/StreamingChatCompletionUpdate.cs | 32 +- ...ingChatFunctionCallUpdate.Serialization.cs | 96 +- .../Models/StreamingChatFunctionCallUpdate.cs | 7 +- ...reamingChatToolCallUpdate.Serialization.cs | 130 +- .../Models/StreamingChatToolCallUpdate.cs | 16 +- .../Models/SystemChatMessage.Serialization.cs | 99 +- .../src/Generated/Models/SystemChatMessage.cs | 13 +- .../Models/ThreadRun.Serialization.cs | 600 +- .dotnet/src/Generated/Models/ThreadRun.cs | 106 +- .../Models/ToolChatMessage.Serialization.cs | 94 +- .../src/Generated/Models/ToolChatMessage.cs | 15 +- .../TranscribedSegment.Serialization.cs | 272 +- .../Generated/Models/TranscribedSegment.cs | 39 +- ...nknownRealtimeContentPart.Serialization.cs | 133 - .../Models/UnknownRealtimeContentPart.cs | 20 - ...ownRealtimeRequestCommand.Serialization.cs | 144 - .../Models/UnknownRealtimeRequestCommand.cs | 20 - ...nknownRealtimeRequestItem.Serialization.cs | 144 - .../Models/UnknownRealtimeRequestItem.cs | 20 - ...wnRealtimeResponseCommand.Serialization.cs | 156 - .../Models/UnknownRealtimeResponseCommand.cs | 20 - ...knownRealtimeResponseItem.Serialization.cs | 167 - .../Models/UnknownRealtimeResponseItem.cs | 20 - ...timeResponseStatusDetails.Serialization.cs | 133 - .../UnknownRealtimeResponseStatusDetails.cs | 20 - .../UnknownRealtimeTool.Serialization.cs | 133 - .../Generated/Models/UnknownRealtimeTool.cs | 20 - ...nRealtimeToolChoiceObject.Serialization.cs | 133 - .../Models/UnknownRealtimeToolChoiceObject.cs | 20 - ...nownRealtimeTurnDetection.Serialization.cs | 133 - .../Models/UnknownRealtimeTurnDetection.cs | 20 - .../Models/UserChatMessage.Serialization.cs | 99 +- .../src/Generated/Models/UserChatMessage.cs | 13 +- .dotnet/src/Generated/ModerationClient.cs | 26 +- .dotnet/src/Generated/OpenAIClient.cs | 102 +- ...ient.cs => OpenAIFileClient.RestClient.cs} | 6 +- .dotnet/src/Generated/OpenAIFileClient.cs | 92 +- ...ent.cs => OpenAIModelClient.RestClient.cs} | 6 +- .dotnet/src/Generated/OpenAIModelClient.cs | 58 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 894 +- .../Generated/RealtimeConversationClient.cs | 38 - .../Generated/VectorStoreClient.RestClient.cs | 179 - .dotnet/src/Generated/VectorStoreClient.cs | 110 +- .dotnet/tspCodeModel.json | 33988 ++++++++++------ package-lock.json | 32 +- 322 files changed, 26004 insertions(+), 37143 deletions(-) delete mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationAudioFormat.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPartKind.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationErrorUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationFunctionTool.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItem.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemStatus.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationMessageRole.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionOptions.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationStatus.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTokenUsage.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTool.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTool.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationToolKind.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTranscriptionModel.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationUpdate.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/ConversationVoice.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponse.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseError.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs delete mode 100644 .dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTool.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs rename .dotnet/src/Generated/{FileClient.RestClient.cs => OpenAIFileClient.RestClient.cs} (93%) rename .dotnet/src/Generated/{ModelClient.RestClient.cs => OpenAIModelClient.RestClient.cs} (90%) delete mode 100644 .dotnet/src/Generated/RealtimeConversationClient.cs diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 257c547ec..d1662dee0 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -75,7 +75,7 @@ public AssistantClient(ApiKeyCredential credential, OpenAIClientOptions options) Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); _messageSubClient = new(_pipeline, options); _runSubClient = new(_pipeline, options); diff --git a/.dotnet/src/Custom/Audio/AudioClient.Protocol.cs b/.dotnet/src/Custom/Audio/AudioClient.Protocol.cs index 0fd68c698..32e71831d 100644 --- a/.dotnet/src/Custom/Audio/AudioClient.Protocol.cs +++ b/.dotnet/src/Custom/Audio/AudioClient.Protocol.cs @@ -32,7 +32,7 @@ public virtual async Task GenerateSpeechAsync(BinaryContent conten Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateSpeechRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -53,7 +53,7 @@ public virtual ClientResult GenerateSpeech(BinaryContent content, RequestOptions Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateSpeechRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } // CUSTOM: @@ -78,7 +78,7 @@ public virtual async Task TranscribeAudioAsync(BinaryContent conte Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateTranscriptionRequest(content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -103,7 +103,7 @@ public virtual ClientResult TranscribeAudio(BinaryContent content, string conten Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateTranscriptionRequest(content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } // CUSTOM: @@ -127,7 +127,7 @@ public virtual async Task TranslateAudioAsync(BinaryContent conten Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateTranslationRequest(content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -151,6 +151,6 @@ public virtual ClientResult TranslateAudio(BinaryContent content, string content Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateTranslationRequest(content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Audio/AudioClient.cs b/.dotnet/src/Custom/Audio/AudioClient.cs index b8b2dceda..be7fbaffb 100644 --- a/.dotnet/src/Custom/Audio/AudioClient.cs +++ b/.dotnet/src/Custom/Audio/AudioClient.cs @@ -24,12 +24,6 @@ public partial class AudioClient { private readonly string _model; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . @@ -81,7 +75,7 @@ public AudioClient(string model, ApiKeyCredential credential, OpenAIClientOption options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -103,7 +97,7 @@ protected internal AudioClient(ClientPipeline pipeline, string model, OpenAIClie options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } @@ -127,7 +121,7 @@ public virtual async Task> GenerateSpeechAsync(string t options ??= new(); CreateSpeechGenerationOptions(text, voice, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await GenerateSpeechAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } @@ -150,7 +144,7 @@ public virtual ClientResult GenerateSpeech(string text, GeneratedSpe options ??= new(); CreateSpeechGenerationOptions(text, voice, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateSpeech(content, cancellationToken.ToRequestOptions()); ; return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index c2309f8ee..10bdd99d4 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -62,7 +62,7 @@ public BatchClient(string apiKey, OpenAIClientOptions options) : this(new ApiKey } /// - /// Initializes a new instance of that will use an API key when authenticating. + /// Initializes a new instance of that will use an API key when authenticating. /// /// The API key used to authenticate with the service endpoint. /// Additional options to customize the client. diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.cs index aec05abea..d671893d5 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.cs @@ -34,8 +34,7 @@ public partial class OpenAIFileClient public ClientPipeline Pipeline => _pipeline; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -46,7 +45,7 @@ public partial class OpenAIFileClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public OpenAIFileClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -56,7 +55,7 @@ public partial class OpenAIFileClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -74,7 +73,7 @@ public OpenAIFileClient(ApiKeyCredential credential, OpenAIClientOptions options // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index 0b18c96fd..d15a8b7b4 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -61,7 +61,7 @@ public FineTuningClient(string apiKey, OpenAIClientOptions options) : this(new A } /// - /// Initializes a new instance of that will use an API key when authenticating. + /// Initializes a new instance of that will use an API key when authenticating. /// /// The API key used to authenticate with the service endpoint. /// Additional options to customize the client. diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.cs index 96269e6d3..ca2ec515d 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.cs @@ -29,7 +29,7 @@ public partial class OpenAIModelClient public ClientPipeline Pipeline => _pipeline; // CUSTOM: Added as a convenience. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public OpenAIModelClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) @@ -39,7 +39,7 @@ public partial class OpenAIModelClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// is null. public OpenAIModelClient(ApiKeyCredential credential) : this(credential, new OpenAIClientOptions()) @@ -49,7 +49,7 @@ public partial class OpenAIModelClient // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The API key to authenticate with the service. /// The options to configure the client. /// is null. @@ -66,7 +66,7 @@ public OpenAIModelClient(ApiKeyCredential credential, OpenAIClientOptions option // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. // - Made protected. - /// Initializes a new instance of . + /// Initializes a new instance of . /// The HTTP pipeline to send and receive REST requests and responses. /// The options to configure the client. /// is null. diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index c1ae9975e..24d1bd0ec 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -77,7 +77,7 @@ public VectorStoreClient(string apiKey, OpenAIClientOptions options) : this(new } /// - /// Initializes a new instance of that will use an API key when authenticating. + /// Initializes a new instance of that will use an API key when authenticating. /// /// The API key used to authenticate with the service endpoint. /// Additional options to customize the client. diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index fd6c3eb5c..25e74633f 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -15,15 +15,11 @@ public partial class AssistantClient private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected AssistantClient() { } - public ClientPipeline Pipeline { get; } - public virtual ClientResult ListAssistants(int? limit, string order, string after, string before, RequestOptions options) { using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); diff --git a/.dotnet/src/Generated/AudioClient.cs b/.dotnet/src/Generated/AudioClient.cs index 31ddbc285..1815a1756 100644 --- a/.dotnet/src/Generated/AudioClient.cs +++ b/.dotnet/src/Generated/AudioClient.cs @@ -14,8 +14,6 @@ public partial class AudioClient private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected AudioClient() { diff --git a/.dotnet/src/Generated/BatchClient.RestClient.cs b/.dotnet/src/Generated/BatchClient.RestClient.cs index 131930cde..df8f7cd69 100644 --- a/.dotnet/src/Generated/BatchClient.RestClient.cs +++ b/.dotnet/src/Generated/BatchClient.RestClient.cs @@ -3,7 +3,6 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using OpenAI; @@ -21,23 +20,6 @@ public partial class BatchClient private static OpenAI.BatchClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.BatchClient.Classifier2xxAnd4xx(); - internal PipelineMessage CreateCreateBatchRequest(BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - internal PipelineMessage CreateListBatchesRequest(string after, int? limit, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); @@ -61,39 +43,6 @@ internal PipelineMessage CreateListBatchesRequest(string after, int? limit, Requ return message; } - internal PipelineMessage CreateRetrieveBatchRequest(string batchId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches/", false); - uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - private class Classifier2xxAnd4xx : PipelineMessageClassifier { public override bool TryClassify(PipelineMessage message, out bool isError) diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index ea2e82b55..cb2c8c817 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -7,26 +7,38 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Batch { - // Data plane generated sub-client. public partial class BatchClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected BatchClient() { } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual ClientResult CreateBatch(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IDictionary metadata = default) + { + Argument.AssertNotNull(inputFileId, nameof(inputFileId)); + + InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); + ClientResult result = this.CreateBatch(spreadModel, null); + return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); + } + + public virtual async Task> CreateBatchAsync(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IDictionary metadata = default) + { + Argument.AssertNotNull(inputFileId, nameof(inputFileId)); - public ClientPipeline Pipeline { get; } + InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); + ClientResult result = await this.CreateBatchAsync(spreadModel, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); + } public virtual ClientResult ListBatches(string after, int? limit, RequestOptions options) { diff --git a/.dotnet/src/Generated/ChatClient.cs b/.dotnet/src/Generated/ChatClient.cs index 2cd1913b5..8bc6baf3d 100644 --- a/.dotnet/src/Generated/ChatClient.cs +++ b/.dotnet/src/Generated/ChatClient.cs @@ -4,7 +4,6 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; namespace OpenAI.Chat { @@ -14,13 +13,9 @@ public partial class ChatClient private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected ChatClient() { } - - public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/EmbeddingClient.cs b/.dotnet/src/Generated/EmbeddingClient.cs index 82ada3ace..2b97b2558 100644 --- a/.dotnet/src/Generated/EmbeddingClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.cs @@ -4,7 +4,6 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; namespace OpenAI.Embeddings { @@ -14,13 +13,9 @@ public partial class EmbeddingClient private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected EmbeddingClient() { } - - public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/FineTuningClient.RestClient.cs b/.dotnet/src/Generated/FineTuningClient.RestClient.cs index 1f10b48d1..7d8ad9a96 100644 --- a/.dotnet/src/Generated/FineTuningClient.RestClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.RestClient.cs @@ -3,7 +3,6 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using OpenAI; @@ -21,23 +20,6 @@ public partial class FineTuningClient private static OpenAI.FineTuningClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.FineTuningClient.Classifier2xxAnd4xx(); - internal PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - internal PipelineMessage CreateListPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); @@ -61,22 +43,6 @@ internal PipelineMessage CreateListPaginatedFineTuningJobsRequest(string after, return message; } - internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJobId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - internal PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index 5f7d520c1..be0834b8a 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -6,90 +6,107 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.FineTuning { - // Data plane generated sub-client. public partial class FineTuningClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected FineTuningClient() { } - internal PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId, RequestOptions options) + public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit, RequestOptions options) + { + using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListPaginatedFineTuningJobsAsync(string after, int? limit, RequestOptions options) + { + using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit) + { + ClientResult result = ListPaginatedFineTuningJobs(after, limit, null); + return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListPaginatedFineTuningJobsAsync(string after, int? limit) + { + ClientResult result = await ListPaginatedFineTuningJobsAsync(after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit, RequestOptions options) + { + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fineTuningJobId, after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) + { + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fineTuningJobId, after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit) + { + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + ClientResult result = ListFineTuningJobCheckpoints(fineTuningJobId, after, limit, null); + return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit) + { + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + ClientResult result = await ListFineTuningJobCheckpointsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) + public virtual async Task ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/checkpoints", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) + public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/fine_tuning/jobs/", false); - uri.AppendPath(fineTuningJobId, true); - uri.AppendPath("/events", false); - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + ClientResult result = ListFineTuningEvents(fineTuningJobId, after, limit, null); + return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task> ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit) + { + Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); + + ClientResult result = await ListFineTuningEventsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/ImageClient.cs b/.dotnet/src/Generated/ImageClient.cs index a92809a82..56d152802 100644 --- a/.dotnet/src/Generated/ImageClient.cs +++ b/.dotnet/src/Generated/ImageClient.cs @@ -4,76 +4,18 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Images { - // Data plane generated sub-client. public partial class ImageClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected ImageClient() { } - - internal PipelineMessage CreateCreateImageRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/generations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateImageEditRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/edits", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateImageVariationRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/images/variations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index daee4b083..f980bd94e 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -6,147 +6,51 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantMessageClient + public partial class InternalAssistantMessageClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected InternalAssistantMessageClient() { } - public virtual async Task GetMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetMessagesRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateListMessagesRequest(threadId, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult GetMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ListMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetMessagesRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); - } - - internal PipelineMessage CreateCreateMessageRequest(string threadId, BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + using PipelineMessage message = CreateListMessagesRequest(threadId, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListMessages(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); - internal PipelineMessage CreateGetMessageRequest(string threadId, string messageId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListMessages(threadId, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateModifyMessageRequest(string threadId, string messageId, BinaryContent content, RequestOptions options) + public virtual async Task> ListMessagesAsync(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); - internal PipelineMessage CreateDeleteMessageRequest(string threadId, string messageId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await ListMessagesAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index 34c15623f..435f28095 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -6,259 +6,87 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantRunClient + public partial class InternalAssistantRunClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected InternalAssistantRunClient() { } - public virtual async Task GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetRunsRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateListRunsRequest(threadId, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ListRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetRunsRequest(threadId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateListRunsRequest(threadId, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListRuns(string threadId, int? limit, RunCollectionOrder? order, string after, string before) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetRunStepsRequest(threadId, runId, limit, order, after, before, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + ClientResult result = ListRuns(threadId, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); } - public virtual ClientResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task> ListRunsAsync(string threadId, int? limit, RunCollectionOrder? order, string after, string before) { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(threadId, nameof(threadId)); - using PipelineMessage message = CreateGetRunStepsRequest(threadId, runId, limit, order, after, before, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + ClientResult result = await ListRunsAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, RequestOptions options) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/runs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - internal PipelineMessage CreateCreateRunRequest(string threadId, BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetRunsRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListRunStepsRequest(threadId, runId, limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateGetRunRequest(string threadId, string runId, RequestOptions options) + public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - internal PipelineMessage CreateModifyRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + using PipelineMessage message = CreateListRunStepsRequest(threadId, runId, limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateCancelRunRequest(string threadId, string runId, RequestOptions options) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/submit_tool_outputs", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; + ClientResult result = ListRunSteps(threadId, runId, limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateGetRunStepsRequest(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task> ListRunStepsAsync(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps", false); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(runId, nameof(runId)); - internal PipelineMessage CreateGetRunStepRequest(string threadId, string runId, string stepId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps/", false); - uri.AppendPath(stepId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await ListRunStepsAsync(threadId, runId, limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.cs index 8c7c5d69d..17d57ccdf 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.cs @@ -4,92 +4,18 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Assistants { - // Data plane generated sub-client. - internal partial class InternalAssistantThreadClient + public partial class InternalAssistantThreadClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected InternalAssistantThreadClient() { } - - internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetThreadRequest(string threadId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateModifyThreadRequest(string threadId, BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateDeleteThreadRequest(string threadId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index afa20147c..65cc1fb33 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -6,237 +6,137 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Files { - // Data plane generated sub-client. - internal partial class InternalUploadsClient + public partial class InternalUploadsClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected InternalUploadsClient() { } - public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CreateUploadAsync(content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual ClientResult CreateUpload(InternalCreateUploadRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CreateUpload(content, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options = null) + public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateUploadRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateUploadRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task> AddUploadPartAsync(string uploadId, InternalAddUploadPartRequest requestBody) + public virtual ClientResult CreateUpload(InternalCreateUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - using MultipartFormDataBinaryContent content = requestBody.ToMultipartBinaryBody(); - ClientResult result = await AddUploadPartAsync(uploadId, content, content.ContentType, (RequestOptions)null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUploadPart.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = CreateUpload(requestBody, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult AddUploadPart(string uploadId, InternalAddUploadPartRequest requestBody) + public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - using MultipartFormDataBinaryContent content = requestBody.ToMultipartBinaryBody(); - ClientResult result = AddUploadPart(uploadId, content, content.ContentType, (RequestOptions)null); - return ClientResult.FromValue(InternalUploadPart.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = await CreateUploadAsync(requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) + public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) + public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateAddUploadPartRequest(uploadId, content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); - } - - public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody) - { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CompleteUploadAsync(uploadId, content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CompleteUpload(string uploadId, InternalCompleteUploadRequest requestBody) + public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CompleteUpload(uploadId, content, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options = null) - { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options = null) + public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCompleteUploadRequest(uploadId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual async Task> CancelUploadAsync(string uploadId) + public virtual ClientResult CompleteUpload(string uploadId, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CancelUploadAsync(uploadId, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = CompleteUpload(uploadId, requestBody, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult CancelUpload(string uploadId) + public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CancelUpload(uploadId, null); - return ClientResult.FromValue(InternalUpload.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + ClientResult result = await CompleteUploadAsync(uploadId, requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task CancelUploadAsync(string uploadId, RequestOptions options) + public virtual ClientResult CancelUpload(string uploadId, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CancelUpload(string uploadId, RequestOptions options) + public virtual async Task CancelUploadAsync(string uploadId, RequestOptions options) { - Argument.AssertNotNullOrEmpty(uploadId, nameof(uploadId)); + Argument.AssertNotNull(uploadId, nameof(uploadId)); using PipelineMessage message = CreateCancelUploadRequest(uploadId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, RequestOptions options) + public virtual ClientResult CancelUpload(string uploadId) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(uploadId, nameof(uploadId)); - internal PipelineMessage CreateAddUploadPartRequest(string uploadId, BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/parts", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; + ClientResult result = CancelUpload(uploadId, null); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - internal PipelineMessage CreateCompleteUploadRequest(string uploadId, BinaryContent content, RequestOptions options) + public virtual async Task> CancelUploadAsync(string uploadId) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/complete", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(uploadId, nameof(uploadId)); - internal PipelineMessage CreateCancelUploadRequest(string uploadId, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/uploads/", false); - uri.AppendPath(uploadId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await CancelUploadAsync(uploadId, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index 6ce310404..14652e6e9 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -6,74 +6,51 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.LegacyCompletions { - // Data plane generated sub-client. - internal partial class LegacyCompletionClient + public partial class LegacyCompletionClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected LegacyCompletionClient() { } - public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody) - { - Argument.AssertNotNull(requestBody, nameof(requestBody)); - - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = await CreateCompletionAsync(content, null).ConfigureAwait(false); - return ClientResult.FromValue(InternalCreateCompletionResponse.FromResponse(result.GetRawResponse()), result.GetRawResponse()); - } - - public virtual ClientResult CreateCompletion(InternalCreateCompletionRequest requestBody) + public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options) { - Argument.AssertNotNull(requestBody, nameof(requestBody)); + Argument.AssertNotNull(content, nameof(content)); - using BinaryContent content = requestBody.ToBinaryContent(); - ClientResult result = CreateCompletion(content, null); - return ClientResult.FromValue(InternalCreateCompletionResponse.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + using PipelineMessage message = CreateCreateCompletionRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateCompletionRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options = null) + public virtual ClientResult CreateCompletion(InternalCreateCompletionRequest requestBody) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(requestBody, nameof(requestBody)); - using PipelineMessage message = CreateCreateCompletionRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + ClientResult result = CreateCompletion(requestBody, null); + return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); } - internal PipelineMessage CreateCreateCompletionRequest(BinaryContent content, RequestOptions options) + public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/completions", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } + Argument.AssertNotNull(requestBody, nameof(requestBody)); - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + ClientResult result = await CreateCompletionAsync(requestBody, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 2f58514e9..957e79a40 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -7,112 +7,158 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class AssistantChatMessage : IJsonModel { - AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Content)) + { + if (Content != null) + { + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + else + { + writer.WriteNull("content"u8); + } + } + if (Optional.IsDefined(Refusal)) + { + if (Refusal != null) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + } + else + { + writer.WriteNull("refusal"u8); + } + } + if (Optional.IsDefined(ParticipantName)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(ParticipantName); + } + if (Optional.IsCollectionDefined(ToolCalls)) + { + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (ChatToolCall item in ToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AssistantChatMessage)JsonModelCreateCore(ref reader, options); + + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAssistantChatMessage(document.RootElement, options); } - internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string refusal = default; - string name = default; + string participantName = default; IList toolCalls = default; - ChatFunctionCall functionCall = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("refusal"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = null; continue; } - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + participantName = prop.Value.GetString(); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("role"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(property.Value, options); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (property.NameEquals("role"u8)) + if (options.Format != "W") { - role = property.Value.GetString().ToChatMessageRole(); - continue; - } - if (property.NameEquals("content"u8)) - { - DeserializeContentValue(property, ref content); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. return new AssistantChatMessage( - role, - content ?? new ChatMessageContent(), - serializedAdditionalRawData, + content, refusal, - name, + participantName, toolCalls ?? new ChangeTrackingList(), - functionCall); + role, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +168,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - AssistantChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AssistantChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (AssistantChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAssistantChatMessage(document.RootElement, options); } default: @@ -140,15 +187,16 @@ AssistantChatMessage IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new AssistantChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AssistantChatMessage assistantChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAssistantChatMessage(document.RootElement); + return BinaryContent.Create(assistantChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator AssistantChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAssistantChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index b87f78891..d1226707e 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -9,14 +9,16 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, serializedAdditionalRawData) + internal AssistantChatMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; Refusal = refusal; ParticipantName = participantName; ToolCalls = toolCalls; - FunctionCall = functionCall; } + public BinaryData Content { get; set; } + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs index 7903416bc..67de01fbb 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs @@ -4,33 +4,39 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { public readonly partial struct AudioTranscriptionFormat : IEquatable { private readonly string _value; + private const string JsonValue = "json"; + private const string TextValue = "text"; + private const string SrtValue = "srt"; + private const string VerboseJsonValue = "verbose_json"; + private const string VttValue = "vtt"; public AudioTranscriptionFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string SimpleValue = "json"; - private const string TextValue = "text"; - private const string SrtValue = "srt"; - private const string VerboseValue = "verbose_json"; - private const string VttValue = "vtt"; public static bool operator ==(AudioTranscriptionFormat left, AudioTranscriptionFormat right) => left.Equals(right); + public static bool operator !=(AudioTranscriptionFormat left, AudioTranscriptionFormat right) => !left.Equals(right); + public static implicit operator AudioTranscriptionFormat(string value) => new AudioTranscriptionFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AudioTranscriptionFormat other && Equals(other); + public bool Equals(AudioTranscriptionFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 0c168a6d5..0608ce549 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { @@ -15,83 +15,55 @@ public partial class AudioTranscriptionOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file") != true) - { - writer.WritePropertyName("file"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(File); -#else - using (JsonDocument document = JsonDocument.Parse(File)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("language") != true && Optional.IsDefined(Language)) + if (Optional.IsDefined(Language)) { writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true && Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (SerializedAdditionalRawData?.ContainsKey("timestamp_granularities") != true && Optional.IsCollectionDefined(InternalTimestampGranularities)) + if (Optional.IsCollectionDefined(InternalTimestampGranularities)) { writer.WritePropertyName("timestamp_granularities"u8); writer.WriteStartArray(); - foreach (var item in InternalTimestampGranularities) + foreach (BinaryData item in InternalTimestampGranularities) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -100,187 +72,127 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - AudioTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranscriptionOptions(document.RootElement, options); } - internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData file = default; - InternalCreateTranscriptionRequestModel model = default; string language = default; string prompt = default; AudioTranscriptionFormat? responseFormat = default; float? temperature = default; - IList timestampGranularities = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IList internalTimestampGranularities = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file"u8)) - { - file = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("language"u8)) { - model = new InternalCreateTranscriptionRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("language"u8)) - { - language = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + language = null; + continue; + } + language = prop.Value.GetString(); continue; } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prompt = null; + continue; + } + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new AudioTranscriptionFormat(property.Value.GetString()); + responseFormat = new AudioTranscriptionFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("timestamp_granularities"u8)) + if (prop.NameEquals("timestamp_granularities"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } + array.Add(BinaryData.DeserializeBinaryData(item, options)); } - timestampGranularities = array; + internalTimestampGranularities = array; continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AudioTranscriptionOptions( - file, - model, language, prompt, responseFormat, temperature, - timestampGranularities ?? new ChangeTrackingList(), - serializedAdditionalRawData); + internalTimestampGranularities ?? new ChangeTrackingList(), + additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file"); - content.Add(Model.ToString(), "model"); - if (Optional.IsDefined(Language)) - { - content.Add(Language, "language"); - } - if (Optional.IsDefined(Prompt)) - { - content.Add(Prompt, "prompt"); - } - if (Optional.IsDefined(ResponseFormat)) - { - content.Add(ResponseFormat.Value.ToString(), "response_format"); - } - if (Optional.IsDefined(Temperature)) - { - content.Add(Temperature.Value, "temperature"); - } - if (Optional.IsCollectionDefined(InternalTimestampGranularities)) - { - foreach (BinaryData item in InternalTimestampGranularities) - { - content.Add(item, "timestamp_granularities", "timestamp_granularities"); - } - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{options.Format}' format."); } } - AudioTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranscriptionOptions(document.RootElement, options); } default: @@ -288,17 +200,18 @@ AudioTranscriptionOptions IPersistableModel.Create(Bi } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AudioTranscriptionOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AudioTranscriptionOptions audioTranscriptionOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranscriptionOptions(document.RootElement); + return BinaryContent.Create(audioTranscriptionOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AudioTranscriptionOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranscriptionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index 041086b2f..3ec1e5c4c 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -9,22 +9,24 @@ namespace OpenAI.Audio { public partial class AudioTranscriptionOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscriptionOptions(BinaryData file, InternalCreateTranscriptionRequestModel model, string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, IList internalTimestampGranularities, IDictionary serializedAdditionalRawData) + internal AudioTranscriptionOptions(string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, IList internalTimestampGranularities, IDictionary additionalBinaryDataProperties) { - File = file; - Model = model; Language = language; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; InternalTimestampGranularities = internalTimestampGranularities; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string Language { get; set; } + public string Prompt { get; set; } + public AudioTranscriptionFormat? ResponseFormat { get; set; } + public float? Temperature { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationFormat.cs b/.dotnet/src/Generated/Models/AudioTranslationFormat.cs index bcd682ce2..8cc47153c 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationFormat.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationFormat.cs @@ -4,33 +4,39 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Audio { public readonly partial struct AudioTranslationFormat : IEquatable { private readonly string _value; + private const string JsonValue = "json"; + private const string TextValue = "text"; + private const string SrtValue = "srt"; + private const string VerboseJsonValue = "verbose_json"; + private const string VttValue = "vtt"; public AudioTranslationFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string SimpleValue = "json"; - private const string TextValue = "text"; - private const string SrtValue = "srt"; - private const string VerboseValue = "verbose_json"; - private const string VttValue = "vtt"; public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right) => left.Equals(right); + public static bool operator !=(AudioTranslationFormat left, AudioTranslationFormat right) => !left.Equals(right); + public static implicit operator AudioTranslationFormat(string value) => new AudioTranslationFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AudioTranslationFormat other && Equals(other); + public bool Equals(AudioTranslationFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index e2dc13746..059c223f8 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { @@ -15,56 +15,40 @@ public partial class AudioTranslationOptions : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("file") != true) - { - writer.WritePropertyName("file"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(File); -#else - using (JsonDocument document = JsonDocument.Parse(File)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true && Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt)) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -73,146 +57,95 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } - AudioTranslationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AudioTranslationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual AudioTranslationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAudioTranslationOptions(document.RootElement, options); } - internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData file = default; - InternalCreateTranslationRequestModel model = default; string prompt = default; AudioTranslationFormat? responseFormat = default; float? temperature = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("file"u8)) - { - file = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("model"u8)) - { - model = new InternalCreateTranslationRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("prompt"u8)) + if (prop.NameEquals("prompt"u8)) { - prompt = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prompt = null; + continue; + } + prompt = prop.Value.GetString(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new AudioTranslationFormat(property.Value.GetString()); + responseFormat = new AudioTranslationFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AudioTranslationOptions( - file, - model, - prompt, - responseFormat, - temperature, - serializedAdditionalRawData); - } - - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } + return new AudioTranslationOptions(prompt, responseFormat, temperature, additionalBinaryDataProperties); } - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file"); - content.Add(Model.ToString(), "model"); - if (Optional.IsDefined(Prompt)) - { - content.Add(Prompt, "prompt"); - } - if (Optional.IsDefined(ResponseFormat)) - { - content.Add(ResponseFormat.Value.ToString(), "response_format"); - } - if (Optional.IsDefined(Temperature)) - { - content.Add(Temperature.Value, "temperature"); - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{options.Format}' format."); } } - AudioTranslationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + AudioTranslationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual AudioTranslationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeAudioTranslationOptions(document.RootElement, options); } default: @@ -220,17 +153,18 @@ AudioTranslationOptions IPersistableModel.Create(Binary } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static AudioTranslationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(AudioTranslationOptions audioTranslationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranslationOptions(document.RootElement); + return BinaryContent.Create(audioTranslationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator AudioTranslationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeAudioTranslationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index 74df8f61c..015ba8022 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -11,7 +11,7 @@ public partial class AudioTranslationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslationOptions(string prompt, Audio.AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) + internal AudioTranslationOptions(string prompt, AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) { Prompt = prompt; ResponseFormat = responseFormat; @@ -21,7 +21,7 @@ internal AudioTranslationOptions(string prompt, Audio.AudioTranslationFormat? re public string Prompt { get; set; } - public Audio.AudioTranslationFormat? ResponseFormat { get; set; } + public AudioTranslationFormat? ResponseFormat { get; set; } public float? Temperature { get; set; } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 5b586ea35..dd208c966 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -7,83 +7,74 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatCompletion : IJsonModel { + internal ChatCompletion() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletion)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(SystemFingerprint)) { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("system_fingerprint"u8); + writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + if (Optional.IsDefined(Usage)) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(ServiceTier)) + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (Optional.IsDefined(ServiceTier)) { if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(ServiceTier.Value.ToString()); + writer.WriteObjectValue?>(ServiceTier, options); } else { - writer.WriteNull("service_tier"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionResponseChoice item in Choices) { - writer.WritePropertyName("system_fingerprint"u8); - writer.WriteStringValue(SystemFingerprint); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,118 +83,120 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - ChatCompletion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatCompletion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatCompletion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletion)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatCompletion(document.RootElement, options); } - internal static ChatCompletion DeserializeChatCompletion(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatCompletion DeserializeChatCompletion(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - IReadOnlyList choices = default; - DateTimeOffset created = default; string model = default; - InternalCreateChatCompletionResponseServiceTier? serviceTier = default; string systemFingerprint = default; - InternalCreateChatCompletionResponseObject @object = default; ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalCreateChatCompletionResponseObject @object = default; + Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier = default; + IReadOnlyList choices = default; + DateTimeOffset createdAt = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("model"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("system_fingerprint"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { - array.Add(InternalCreateChatCompletionResponseChoice.DeserializeInternalCreateChatCompletionResponseChoice(item, options)); + systemFingerprint = null; + continue; } - choices = array; + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("usage"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + usage = null; + continue; + } + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("object"u8)) { - model = property.Value.GetString(); + @object = InternalCreateChatCompletionResponseObject.DeserializeInternalCreateChatCompletionResponseObject(prop.Value, options); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { serviceTier = null; continue; } - serviceTier = new InternalCreateChatCompletionResponseServiceTier(property.Value.GetString()); + serviceTier = Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier?.DeserializeOpenAI.Chat.InternalCreateChatCompletionResponseServiceTier(prop.Value, options); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("choices"u8)) { - systemFingerprint = property.Value.GetString(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalCreateChatCompletionResponseObject(property.Value.GetString()); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InternalCreateChatCompletionResponseChoice.DeserializeInternalCreateChatCompletionResponseChoice(item, options)); + } + choices = array; continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("created"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ChatCompletion( id, - choices, - created, model, - serviceTier, systemFingerprint, - @object, usage, - serializedAdditionalRawData); + @object, + serviceTier, + choices, + createdAt, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -213,15 +206,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - ChatCompletion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatCompletion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatCompletion(document.RootElement, options); } default: @@ -231,15 +225,16 @@ ChatCompletion IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatCompletion FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatCompletion chatCompletion) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatCompletion(document.RootElement); + return BinaryContent.Create(chatCompletion, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatCompletion(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatCompletion(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index e4a852ec6..88157c46e 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -10,40 +10,36 @@ namespace OpenAI.Chat { public partial class ChatCompletion { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ChatCompletion(string id, IEnumerable choices, DateTimeOffset createdAt, string model) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); + private protected IDictionary _additionalBinaryDataProperties; + internal ChatCompletion(string id, string model, InternalCreateChatCompletionResponseObject @object, IEnumerable choices, DateTimeOffset createdAt) + { Id = id; + Model = model; + Object = @object; Choices = choices.ToList(); CreatedAt = createdAt; - Model = model; } - internal ChatCompletion(string id, IReadOnlyList choices, DateTimeOffset createdAt, string model, InternalCreateChatCompletionResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal ChatCompletion(string id, string model, string systemFingerprint, ChatTokenUsage usage, InternalCreateChatCompletionResponseObject @object, Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; - Choices = choices; - CreatedAt = createdAt; Model = model; - ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; - Object = @object; Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; + Object = @object; + ServiceTier = serviceTier; + Choices = choices; + CreatedAt = createdAt; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ChatCompletion() - { - } + public string Id { get; set; } + + public string Model { get; set; } - public string Id { get; } - public string Model { get; } - public string SystemFingerprint { get; } + public string SystemFingerprint { get; set; } - public ChatTokenUsage Usage { get; } + public ChatTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 66e35c7fe..384ef302e 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,24 +15,19 @@ public partial class ChatCompletionOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("messages") != true) - { - writer.WritePropertyName("messages"u8); - SerializeMessagesValue(writer, options); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("frequency_penalty") != true && Optional.IsDefined(FrequencyPenalty)) + if (Optional.IsDefined(FrequencyPenalty)) { if (FrequencyPenalty != null) { @@ -40,233 +36,232 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } else { - writer.WriteNull("frequency_penalty"); + writer.WriteNull("frequencyPenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("logit_bias") != true && Optional.IsCollectionDefined(LogitBiases)) + if (Optional.IsDefined(PresencePenalty)) { - if (LogitBiases != null) - { - writer.WritePropertyName("logit_bias"u8); - SerializeLogitBiasesValue(writer, options); - } - else - { - writer.WriteNull("logit_bias"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("logprobs") != true && Optional.IsDefined(IncludeLogProbabilities)) - { - if (IncludeLogProbabilities != null) + if (PresencePenalty != null) { - writer.WritePropertyName("logprobs"u8); - writer.WriteBooleanValue(IncludeLogProbabilities.Value); + writer.WritePropertyName("presence_penalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); } else { - writer.WriteNull("logprobs"); + writer.WriteNull("presencePenalty"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_logprobs") != true && Optional.IsDefined(TopLogProbabilityCount)) + if (Optional.IsDefined(ResponseFormat)) { - if (TopLogProbabilityCount != null) - { - writer.WritePropertyName("top_logprobs"u8); - writer.WriteNumberValue(TopLogProbabilityCount.Value); - } - else - { - writer.WriteNull("top_logprobs"); - } + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); } - if (SerializedAdditionalRawData?.ContainsKey("max_tokens") != true && Optional.IsDefined(_deprecatedMaxTokens)) + if (Optional.IsDefined(ServiceTier)) { - if (_deprecatedMaxTokens != null) + if (ServiceTier != null) { - writer.WritePropertyName("max_tokens"u8); - writer.WriteNumberValue(_deprecatedMaxTokens.Value); + writer.WritePropertyName("service_tier"u8); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { - writer.WriteNull("max_tokens"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true && Optional.IsDefined(MaxOutputTokenCount)) + if (Optional.IsDefined(Temperature)) { - if (MaxOutputTokenCount != null) + if (Temperature != null) { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxOutputTokenCount.Value); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); } else { - writer.WriteNull("max_completion_tokens"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(TopP)) { - if (N != null) + if (TopP != null) { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(TopP.Value); } else { - writer.WriteNull("n"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("presence_penalty") != true && Optional.IsDefined(PresencePenalty)) + if (Optional.IsCollectionDefined(Tools)) { - if (PresencePenalty != null) - { - writer.WritePropertyName("presence_penalty"u8); - writer.WriteNumberValue(PresencePenalty.Value); - } - else + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ChatTool item in Tools) { - writer.WriteNull("presence_penalty"); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (ChatMessage item in Messages) { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("seed") != true && Optional.IsDefined(Seed)) + writer.WriteEndArray(); + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); + if (Optional.IsDefined(N)) { - if (Seed != null) + if (N != null) { - writer.WritePropertyName("seed"u8); - writer.WriteNumberValue(Seed.Value); + writer.WritePropertyName("n"u8); + writer.WriteNumberValue(N.Value); } else { - writer.WriteNull("seed"); + writer.WriteNull("n"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(_serviceTier)) + if (Optional.IsDefined(Stream)) { - if (_serviceTier != null) + if (Stream != null) { - writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(_serviceTier.Value.ToString()); + writer.WritePropertyName("stream"u8); + writer.WriteBooleanValue(Stream.Value); } else { - writer.WriteNull("service_tier"); + writer.WriteNull("stream"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stop") != true && Optional.IsCollectionDefined(StopSequences)) + if (Optional.IsDefined(StreamOptions)) { - if (StopSequences != null) + if (StreamOptions != null) { - writer.WritePropertyName("stop"u8); - SerializeStopSequencesValue(writer, options); + writer.WritePropertyName("stream_options"u8); + writer.WriteObjectValue(StreamOptions, options); } else { - writer.WriteNull("stop"); + writer.WriteNull("streamOptions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) + if (Optional.IsDefined(IncludeLogProbabilities)) { - if (Stream != null) + if (IncludeLogProbabilities != null) { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); + writer.WritePropertyName("logprobs"u8); + writer.WriteBooleanValue(IncludeLogProbabilities.Value); } else { - writer.WriteNull("stream"); + writer.WriteNull("logprobs"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("stream_options") != true && Optional.IsDefined(StreamOptions)) + if (Optional.IsDefined(TopLogProbabilityCount)) { - if (StreamOptions != null) + if (TopLogProbabilityCount != null) { - writer.WritePropertyName("stream_options"u8); - writer.WriteObjectValue(StreamOptions, options); + writer.WritePropertyName("top_logprobs"u8); + writer.WriteNumberValue(TopLogProbabilityCount.Value); } else { - writer.WriteNull("stream_options"); + writer.WriteNull("topLogprobs"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsCollectionDefined(StopSequences)) { - if (Temperature != null) + if (StopSequences != null) { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); + writer.WritePropertyName("stop"u8); + writer.WriteStartArray(); + foreach (string item in StopSequences) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } else { - writer.WriteNull("temperature"); + writer.WriteNull("stop"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(TopP)) + if (Optional.IsCollectionDefined(LogitBiases)) { - if (TopP != null) + if (LogitBiases != null) { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); + writer.WritePropertyName("logit_bias"u8); + writer.WriteStartObject(); + foreach (var item in LogitBiases) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("top_p"); + writer.WriteNull("logitBias"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice)) { writer.WritePropertyName("tool_choice"u8); writer.WriteObjectValue(ToolChoice, options); } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(AllowParallelToolCalls)) + if (Optional.IsDefined(FunctionChoice)) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionChoice, options); + } + if (Optional.IsDefined(AllowParallelToolCalls)) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(AllowParallelToolCalls.Value); } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionChoice)) + if (Optional.IsDefined(_deprecatedMaxTokens)) { - writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionChoice, options); + if (_deprecatedMaxTokens != null) + { + writer.WritePropertyName("max_tokens"u8); + writer.WriteNumberValue(_deprecatedMaxTokens.Value); + } + else + { + writer.WriteNull("maxTokens"u8); + } } - if (SerializedAdditionalRawData?.ContainsKey("functions") != true && Optional.IsCollectionDefined(Functions)) + if (Optional.IsDefined(MaxOutputTokenCount)) { - writer.WritePropertyName("functions"u8); - writer.WriteStartArray(); - foreach (var item in Functions) + if (MaxOutputTokenCount != null) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("max_completion_tokens"u8); + writer.WriteNumberValue(MaxOutputTokenCount.Value); + } + else + { + writer.WriteNull("maxCompletionTokens"u8); } - writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -275,320 +270,314 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - ChatCompletionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatCompletionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatCompletionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatCompletionOptions(document.RootElement, options); } - internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IList messages = default; - InternalCreateChatCompletionRequestModel model = default; float? frequencyPenalty = default; - IDictionary logitBias = default; - bool? logprobs = default; - int? topLogprobs = default; - int? maxTokens = default; - int? maxCompletionTokens = default; - int? n = default; float? presencePenalty = default; ChatResponseFormat responseFormat = default; - long? seed = default; InternalCreateChatCompletionRequestServiceTier? serviceTier = default; - IList stop = default; - bool? stream = default; - InternalChatCompletionStreamOptions streamOptions = default; float? temperature = default; float? topP = default; IList tools = default; + IList messages = default; + InternalCreateChatCompletionRequestModel model = default; + int? n = default; + bool? stream = default; + InternalChatCompletionStreamOptions streamOptions = default; + bool? includeLogProbabilities = default; + int? topLogProbabilityCount = default; + IList stopSequences = default; + IDictionary logitBiases = default; ChatToolChoice toolChoice = default; - bool? parallelToolCalls = default; - string user = default; - ChatFunctionChoice functionCall = default; - IList functions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + ChatFunctionChoice functionChoice = default; + bool? allowParallelToolCalls = default; + string endUserId = default; + int? deprecatedMaxTokens = default; + int? maxOutputTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("messages"u8)) + if (prop.NameEquals("frequency_penalty"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (prop.Value.ValueKind == JsonValueKind.Null) { - array.Add(ChatMessage.DeserializeChatMessage(item, options)); + frequencyPenalty = null; + continue; } - messages = array; + frequencyPenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("presence_penalty"u8)) { - model = new InternalCreateChatCompletionRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("frequency_penalty"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - frequencyPenalty = null; + presencePenalty = null; continue; } - frequencyPenalty = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("logit_bias"u8)) - { - DeserializeLogitBiasesValue(property, ref logitBias); + presencePenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("logprobs"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - logprobs = null; + responseFormat = null; continue; } - logprobs = property.Value.GetBoolean(); + responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); continue; } - if (property.NameEquals("top_logprobs"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - topLogprobs = null; + serviceTier = null; continue; } - topLogprobs = property.Value.GetInt32(); + serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (property.NameEquals("max_tokens"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - maxTokens = null; + temperature = null; continue; } - maxTokens = property.Value.GetInt32(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - maxCompletionTokens = null; + topP = null; continue; } - maxCompletionTokens = property.Value.GetInt32(); + topP = prop.Value.GetSingle(); continue; } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - n = null; continue; } - n = property.Value.GetInt32(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ChatTool.DeserializeChatTool(item, options)); + } + tools = array; continue; } - if (property.NameEquals("presence_penalty"u8)) + if (prop.NameEquals("messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - presencePenalty = null; - continue; + array.Add(ChatMessage.DeserializeChatMessage(item, options)); } - presencePenalty = property.Value.GetSingle(); + messages = array; continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(property.Value, options); + model = InternalCreateChatCompletionRequestModel.DeserializeInternalCreateChatCompletionRequestModel(prop.Value, options); continue; } - if (property.NameEquals("seed"u8)) + if (prop.NameEquals("n"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - seed = null; + n = null; continue; } - seed = property.Value.GetInt64(); + n = prop.Value.GetInt32(); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - serviceTier = null; + stream = null; continue; } - serviceTier = new InternalCreateChatCompletionRequestServiceTier(property.Value.GetString()); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("stop"u8)) + if (prop.NameEquals("stream_options"u8)) { - DeserializeStopSequencesValue(property, ref stop); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(prop.Value, options); continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - stream = null; + includeLogProbabilities = null; continue; } - stream = property.Value.GetBoolean(); + includeLogProbabilities = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("stream_options"u8)) + if (prop.NameEquals("top_logprobs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - streamOptions = null; + topLogProbabilityCount = null; continue; } - streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(property.Value, options); + topLogProbabilityCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("stop"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } - temperature = property.Value.GetSingle(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + stopSequences = array; continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("logit_bias"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; continue; } - topP = property.Value.GetSingle(); + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, prop0.Value.GetInt32()); + } + logitBiases = dictionary; continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ChatTool.DeserializeChatTool(item, options)); - } - tools = array; + toolChoice = ChatToolChoice.DeserializeChatToolChoice(prop.Value, options); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("function_call"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - toolChoice = ChatToolChoice.DeserializeChatToolChoice(property.Value, options); + functionChoice = ChatFunctionChoice.DeserializeChatFunctionChoice(prop.Value, options); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + allowParallelToolCalls = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + allowParallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("max_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + deprecatedMaxTokens = null; continue; } - functionCall = ChatFunctionChoice.DeserializeChatFunctionChoice(property.Value, options); + deprecatedMaxTokens = prop.Value.GetInt32(); continue; } - if (property.NameEquals("functions"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + maxOutputTokenCount = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ChatFunction.DeserializeChatFunction(item, options)); - } - functions = array; + maxOutputTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ChatCompletionOptions( - messages, - model, frequencyPenalty, - logitBias ?? new ChangeTrackingDictionary(), - logprobs, - topLogprobs, - maxTokens, - maxCompletionTokens, - n, presencePenalty, responseFormat, - seed, serviceTier, - stop ?? new ChangeTrackingList(), - stream, - streamOptions, temperature, topP, tools ?? new ChangeTrackingList(), + messages, + model, + n, + stream, + streamOptions, + includeLogProbabilities, + topLogProbabilityCount, + stopSequences ?? new ChangeTrackingList(), + logitBiases ?? new ChangeTrackingDictionary(), toolChoice, - parallelToolCalls, - user, - functionCall, - functions ?? new ChangeTrackingList(), - serializedAdditionalRawData); + functionChoice, + allowParallelToolCalls, + endUserId, + deprecatedMaxTokens, + maxOutputTokenCount, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -598,15 +587,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - ChatCompletionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatCompletionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatCompletionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatCompletionOptions(document.RootElement, options); } default: @@ -616,15 +606,16 @@ ChatCompletionOptions IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatCompletionOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatCompletionOptions chatCompletionOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatCompletionOptions(document.RootElement); + return BinaryContent.Create(chatCompletionOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatCompletionOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatCompletionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index 342461bbd..2d97be274 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -4,47 +4,52 @@ using System; using System.Collections.Generic; -using System.Linq; namespace OpenAI.Chat { public partial class ChatCompletionOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(IList messages, InternalCreateChatCompletionRequestModel model, float? frequencyPenalty, IDictionary logitBiases, bool? includeLogProbabilities, int? topLogProbabilityCount, int? deprecatedMaxTokens, int? maxOutputTokenCount, int? n, float? presencePenalty, ChatResponseFormat responseFormat, long? seed, InternalCreateChatCompletionRequestServiceTier? serviceTier, IList stopSequences, bool? stream, InternalChatCompletionStreamOptions streamOptions, float? temperature, float? topP, IList tools, ChatToolChoice toolChoice, bool? allowParallelToolCalls, string endUserId, ChatFunctionChoice functionChoice, IList functions, IDictionary serializedAdditionalRawData) + internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, InternalCreateChatCompletionRequestServiceTier? serviceTier, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, int? deprecatedMaxTokens, int? maxOutputTokenCount, IDictionary additionalBinaryDataProperties) { - Messages = messages; - Model = model; FrequencyPenalty = frequencyPenalty; - LogitBiases = logitBiases; - IncludeLogProbabilities = includeLogProbabilities; - TopLogProbabilityCount = topLogProbabilityCount; - _deprecatedMaxTokens = deprecatedMaxTokens; - MaxOutputTokenCount = maxOutputTokenCount; - N = n; PresencePenalty = presencePenalty; ResponseFormat = responseFormat; - Seed = seed; - _serviceTier = serviceTier; - StopSequences = stopSequences; - Stream = stream; - StreamOptions = streamOptions; + ServiceTier = serviceTier; Temperature = temperature; TopP = topP; Tools = tools; + Messages = messages; + Model = model; + N = n; + Stream = stream; + StreamOptions = streamOptions; + IncludeLogProbabilities = includeLogProbabilities; + TopLogProbabilityCount = topLogProbabilityCount; + StopSequences = stopSequences; + LogitBiases = logitBiases; ToolChoice = toolChoice; + FunctionChoice = functionChoice; AllowParallelToolCalls = allowParallelToolCalls; EndUserId = endUserId; - FunctionChoice = functionChoice; - Functions = functions; - SerializedAdditionalRawData = serializedAdditionalRawData; + _deprecatedMaxTokens = deprecatedMaxTokens; + MaxOutputTokenCount = maxOutputTokenCount; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public float? FrequencyPenalty { get; set; } + public float? PresencePenalty { get; set; } + public ChatResponseFormat ResponseFormat { get; set; } + + public InternalCreateChatCompletionRequestServiceTier? ServiceTier { get; set; } + public float? Temperature { get; set; } + public float? TopP { get; set; } + public IList Tools { get; } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index a10c604ab..f8ae826da 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatFunctionCall : IJsonModel { + internal ChatFunctionCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(FunctionName); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); + writer.WritePropertyName("arguments"u8); + writer.WriteObjectValue(FunctionArguments, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("arguments"u8); - SerializeFunctionArgumentsValue(writer, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - ChatFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatFunctionCall(document.RootElement, options); } - internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; - BinaryData arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string functionName = default; + BinaryData functionArguments = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + functionName = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - DeserializeFunctionArgumentsValue(property, ref arguments); + functionArguments = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatFunctionCall(name, arguments, serializedAdditionalRawData); + return new ChatFunctionCall(functionName, functionArguments, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - ChatFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatFunctionCall(document.RootElement, options); } default: @@ -130,15 +127,16 @@ ChatFunctionCall IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatFunctionCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatFunctionCall chatFunctionCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatFunctionCall(document.RootElement); + return BinaryContent.Create(chatFunctionCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatFunctionCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatFunctionCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.cs index 23568c824..e3b6b89e8 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class ChatFunctionCall { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public ChatFunctionCall(string functionName, BinaryData functionArguments) { Argument.AssertNotNull(functionName, nameof(functionName)); @@ -19,15 +21,11 @@ public ChatFunctionCall(string functionName, BinaryData functionArguments) FunctionArguments = functionArguments; } - internal ChatFunctionCall(string functionName, BinaryData functionArguments, IDictionary serializedAdditionalRawData) + internal ChatFunctionCall(string functionName, BinaryData functionArguments, IDictionary additionalBinaryDataProperties) { FunctionName = functionName; FunctionArguments = functionArguments; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ChatFunctionCall() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 402d46474..1a1061f8e 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -7,15 +7,14 @@ namespace OpenAI.Chat { - public partial class ChatMessage + public abstract partial class ChatMessage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData) + internal ChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) { Role = role; - Content = content; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.cs b/.dotnet/src/Generated/Models/ChatMessageContent.cs deleted file mode 100644 index 2ec5ca98d..000000000 --- a/.dotnet/src/Generated/Models/ChatMessageContent.cs +++ /dev/null @@ -1,12 +0,0 @@ -// - -#nullable disable - -using System.Collections.ObjectModel; - -namespace OpenAI.Chat -{ - public partial class ChatMessageContent : Collection - { - } -} diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 3a73aa0e1..5aa51b4b1 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Chat [PersistableModelProxy(typeof(InternalUnknownChatResponseFormat))] public abstract partial class ChatResponseFormat : IJsonModel { - internal ChatResponseFormat() - { - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index 45de78574..622c8284d 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -7,14 +7,19 @@ namespace OpenAI.Chat { - public partial class ChatResponseFormat + public abstract partial class ChatResponseFormat { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ChatResponseFormat(string type, IDictionary serializedAdditionalRawData) + private protected ChatResponseFormat(string @type) { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; + Type = @type; + } + + internal ChatResponseFormat(string @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } internal string Type { get; set; } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 462a9c65f..d57cc08c8 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatTool : IJsonModel { + internal ChatTool() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTool)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + writer.WritePropertyName("type"u8); + writer.WriteNumberValue((int)Kind); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - ChatTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatTool)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatTool(document.RootElement, options); } - internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatToolKind type = default; InternalFunctionDefinition function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatToolKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - type = property.Value.GetString().ToChatToolKind(); + function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(property.Value, options); + kind = prop.Value.GetInt32().ToChatToolKind(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatTool(type, function, serializedAdditionalRawData); + return new ChatTool(function, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatTool(document.RootElement, options); } default: @@ -130,15 +127,16 @@ ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOp string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatTool FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatTool chatTool) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatTool(document.RootElement); + return BinaryContent.Create(chatTool, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatTool(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatTool(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index 1d097c149..79c02f726 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -12,7 +12,7 @@ public partial class ChatTool { private protected IDictionary _additionalBinaryDataProperties; - public ChatTool(InternalFunctionDefinition function, ChatToolKind kind) + public ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind) { Argument.AssertNotNull(function, nameof(function)); @@ -20,7 +20,7 @@ public ChatTool(InternalFunctionDefinition function, ChatToolKind kind) Kind = kind; } - internal ChatTool(InternalFunctionDefinition function, ChatToolKind kind, IDictionary additionalBinaryDataProperties) + internal ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind, IDictionary additionalBinaryDataProperties) { Function = function; Kind = kind; diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 19fbfe70d..15d9dbf36 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ChatToolCall : IJsonModel { + internal ChatToolCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatToolCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + writer.WritePropertyName("type"u8); + writer.WriteNumberValue((int)Kind); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } - ChatToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatToolCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatToolCall(document.RootElement, options); } - internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - ChatToolCallKind type = default; InternalChatCompletionMessageToolCallFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatToolCallKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - type = property.Value.GetString().ToChatToolCallKind(); + function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(prop.Value, options); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - function = InternalChatCompletionMessageToolCallFunction.DeserializeInternalChatCompletionMessageToolCallFunction(property.Value, options); + kind = prop.Value.GetInt32().ToChatToolCallKind(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatToolCall(id, type, function, serializedAdditionalRawData); + return new ChatToolCall(id, function, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions option } } - ChatToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatToolCall(document.RootElement, options); } default: @@ -141,15 +135,16 @@ ChatToolCall IPersistableModel.Create(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatToolCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatToolCall chatToolCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatToolCall(document.RootElement); + return BinaryContent.Create(chatToolCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatToolCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatToolCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index d95960a06..d7c2aaedf 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -12,7 +12,7 @@ public partial class ChatToolCall { private protected IDictionary _additionalBinaryDataProperties; - public ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, ChatToolCallKind kind) + public ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(function, nameof(function)); @@ -22,7 +22,7 @@ public ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction fun Kind = kind; } - internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) + internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { Id = id; Function = function; diff --git a/.dotnet/src/Generated/Models/ChatToolCallKind.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCallKind.Serialization.cs index 3e00876f9..e3711a393 100644 --- a/.dotnet/src/Generated/Models/ChatToolCallKind.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCallKind.Serialization.cs @@ -8,15 +8,18 @@ namespace OpenAI.Chat { internal static partial class ChatToolCallKindExtensions { - public static string ToSerialString(this ChatToolCallKind value) => value switch + public static string ToSerialString(this Chat.ChatToolCallKind value) => value switch { - ChatToolCallKind.Function => "function", + Chat.ChatToolCallKind.Function => "function", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolCallKind value.") }; - public static ChatToolCallKind ToChatToolCallKind(this string value) + public static Chat.ChatToolCallKind ToChatToolCallKind(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) return ChatToolCallKind.Function; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) + { + return Chat.ChatToolCallKind.Function; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolCallKind value."); } } diff --git a/.dotnet/src/Generated/Models/ChatToolKind.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolKind.Serialization.cs index 0a04ab836..4191a8230 100644 --- a/.dotnet/src/Generated/Models/ChatToolKind.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolKind.Serialization.cs @@ -8,15 +8,18 @@ namespace OpenAI.Chat { internal static partial class ChatToolKindExtensions { - public static string ToSerialString(this ChatToolKind value) => value switch + public static string ToSerialString(this Chat.ChatToolKind value) => value switch { - ChatToolKind.Function => "function", + Chat.ChatToolKind.Function => "function", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolKind value.") }; - public static ChatToolKind ToChatToolKind(this string value) + public static Chat.ChatToolKind ToChatToolKind(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) return ChatToolKind.Function; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) + { + return Chat.ChatToolKind.Function; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolKind value."); } } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs deleted file mode 100644 index e7b135323..000000000 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationAudioDeltaUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteBase64StringValue(Delta.ToArray(), "D"); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationAudioDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationAudioDeltaUpdate(document.RootElement, options); - } - - internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - BinaryData delta = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationAudioDeltaUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - delta); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationAudioDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationAudioDeltaUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationAudioDeltaUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationAudioDeltaUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs deleted file mode 100644 index 28a01035f..000000000 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationAudioDeltaUpdate : ConversationUpdate - { - internal ConversationAudioDeltaUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(delta, nameof(delta)); - - Kind = ConversationUpdateKind.ResponseAudioDelta; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationAudioDeltaUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationAudioDeltaUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - public BinaryData Delta { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs deleted file mode 100644 index c3f9dba5a..000000000 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationAudioDoneUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationAudioDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationAudioDoneUpdate(document.RootElement, options); - } - - internal static ConversationAudioDoneUpdate DeserializeConversationAudioDoneUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - ConversationUpdateKind type0 = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type0 = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationAudioDoneUpdate( - type0, - eventId, - serializedAdditionalRawData, - type, - responseId, - itemId, - outputIndex, - contentIndex); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationAudioDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationAudioDoneUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationAudioDoneUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationAudioDoneUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs deleted file mode 100644 index b05b2d28f..000000000 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationAudioDoneUpdate : ConversationUpdate - { - internal ConversationAudioDoneUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.ResponseAudioDone; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - } - - internal ConversationAudioDoneUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string type, string responseId, string itemId, int outputIndex, int contentIndex) : base(kind, eventId, serializedAdditionalRawData) - { - Type = type; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - } - - internal ConversationAudioDoneUpdate() - { - } - - internal string Type { get; set; } = "response.audio.done"; - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationAudioFormat.cs b/.dotnet/src/Generated/Models/ConversationAudioFormat.cs deleted file mode 100644 index 0af6d2cbd..000000000 --- a/.dotnet/src/Generated/Models/ConversationAudioFormat.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationAudioFormat : IEquatable - { - private readonly string _value; - - public ConversationAudioFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Pcm16Value = "pcm16"; - private const string G711UlawValue = "g711_ulaw"; - private const string G711AlawValue = "g711_alaw"; - - public static ConversationAudioFormat Pcm16 { get; } = new ConversationAudioFormat(Pcm16Value); - public static ConversationAudioFormat G711Ulaw { get; } = new ConversationAudioFormat(G711UlawValue); - public static ConversationAudioFormat G711Alaw { get; } = new ConversationAudioFormat(G711AlawValue); - public static bool operator ==(ConversationAudioFormat left, ConversationAudioFormat right) => left.Equals(right); - public static bool operator !=(ConversationAudioFormat left, ConversationAudioFormat right) => !left.Equals(right); - public static implicit operator ConversationAudioFormat(string value) => new ConversationAudioFormat(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationAudioFormat other && Equals(other); - public bool Equals(ConversationAudioFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs deleted file mode 100644 index 94b9103b2..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeContentPart))] - public partial class ConversationContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationContentPart(document.RootElement, options); - } - - internal static ConversationContentPart DeserializeConversationContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "audio": return InternalRealtimeResponseAudioContentPart.DeserializeInternalRealtimeResponseAudioContentPart(element, options); - case "input_audio": return InternalRealtimeRequestAudioContentPart.DeserializeInternalRealtimeRequestAudioContentPart(element, options); - case "input_text": return InternalRealtimeRequestTextContentPart.DeserializeInternalRealtimeRequestTextContentPart(element, options); - case "text": return InternalRealtimeResponseTextContentPart.DeserializeInternalRealtimeResponseTextContentPart(element, options); - } - } - return UnknownRealtimeContentPart.DeserializeUnknownRealtimeContentPart(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{options.Format}' format."); - } - } - - ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationContentPart(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs deleted file mode 100644 index 1ee1dc7ea..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public abstract partial class ConversationContentPart - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationContentPart() - { - } - - internal ConversationContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData) - { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs deleted file mode 100644 index fec22b678..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationContentPartFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("part") != true) - { - writer.WritePropertyName("part"u8); - writer.WriteObjectValue(_internalContentPart, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationContentPartFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationContentPartFinishedUpdate(document.RootElement, options); - } - - internal static ConversationContentPartFinishedUpdate DeserializeConversationContentPartFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - ConversationContentPart part = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("part"u8)) - { - part = ConversationContentPart.DeserializeConversationContentPart(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationContentPartFinishedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - part); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationContentPartFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationContentPartFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationContentPartFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationContentPartFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs deleted file mode 100644 index 56640f237..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationContentPartFinishedUpdate : ConversationUpdate - { - internal ConversationContentPartFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(internalContentPart, nameof(internalContentPart)); - - Kind = ConversationUpdateKind.ContentPartFinished; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - _internalContentPart = internalContentPart; - } - - internal ConversationContentPartFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - _internalContentPart = internalContentPart; - } - - internal ConversationContentPartFinishedUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs deleted file mode 100644 index a0052ae37..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationContentPartKind : IEquatable - { - private readonly string _value; - - public ConversationContentPartKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InputTextValue = "input_text"; - private const string InputAudioValue = "input_audio"; - private const string TextValue = "text"; - private const string AudioValue = "audio"; - - public static ConversationContentPartKind InputText { get; } = new ConversationContentPartKind(InputTextValue); - public static ConversationContentPartKind InputAudio { get; } = new ConversationContentPartKind(InputAudioValue); - public static ConversationContentPartKind Text { get; } = new ConversationContentPartKind(TextValue); - public static ConversationContentPartKind Audio { get; } = new ConversationContentPartKind(AudioValue); - public static bool operator ==(ConversationContentPartKind left, ConversationContentPartKind right) => left.Equals(right); - public static bool operator !=(ConversationContentPartKind left, ConversationContentPartKind right) => !left.Equals(right); - public static implicit operator ConversationContentPartKind(string value) => new ConversationContentPartKind(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationContentPartKind other && Equals(other); - public bool Equals(ConversationContentPartKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs deleted file mode 100644 index 413f4e78a..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationContentPartStartedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("part") != true) - { - writer.WritePropertyName("part"u8); - writer.WriteObjectValue(_internalContentPart, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationContentPartStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationContentPartStartedUpdate(document.RootElement, options); - } - - internal static ConversationContentPartStartedUpdate DeserializeConversationContentPartStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - ConversationContentPart part = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("part"u8)) - { - part = ConversationContentPart.DeserializeConversationContentPart(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationContentPartStartedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - part); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationContentPartStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationContentPartStartedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationContentPartStartedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationContentPartStartedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs deleted file mode 100644 index e72b371ae..000000000 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs +++ /dev/null @@ -1,44 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationContentPartStartedUpdate : ConversationUpdate - { - internal ConversationContentPartStartedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(internalContentPart, nameof(internalContentPart)); - - Kind = ConversationUpdateKind.ContentPartStarted; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - _internalContentPart = internalContentPart; - } - - internal ConversationContentPartStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - _internalContentPart = internalContentPart; - } - - internal ConversationContentPartStartedUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs deleted file mode 100644 index cf0ff1418..000000000 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationErrorUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("error") != true) - { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(_error, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationErrorUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationErrorUpdate(document.RootElement, options); - } - - internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseError error = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error"u8)) - { - error = InternalRealtimeResponseError.DeserializeInternalRealtimeResponseError(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationErrorUpdate(type, eventId, serializedAdditionalRawData, error); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationErrorUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationErrorUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationErrorUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationErrorUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs deleted file mode 100644 index 1040232ff..000000000 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationErrorUpdate : ConversationUpdate - { - internal ConversationErrorUpdate(string eventId, InternalRealtimeResponseError error) : base(eventId) - { - Argument.AssertNotNull(error, nameof(error)); - - Kind = ConversationUpdateKind.Error; - _error = error; - } - - internal ConversationErrorUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeResponseError error) : base(kind, eventId, serializedAdditionalRawData) - { - _error = error; - } - - internal ConversationErrorUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs deleted file mode 100644 index 23e7058f6..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionCallArgumentsDeltaUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteStringValue(Delta); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationFunctionCallArgumentsDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, options); - } - - internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversationFunctionCallArgumentsDeltaUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - string callId = default; - string delta = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationFunctionCallArgumentsDeltaUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - callId, - delta); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationFunctionCallArgumentsDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationFunctionCallArgumentsDeltaUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs deleted file mode 100644 index b3e1fa0a6..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs +++ /dev/null @@ -1,46 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionCallArgumentsDeltaUpdate : ConversationUpdate - { - internal ConversationFunctionCallArgumentsDeltaUpdate(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(delta, nameof(delta)); - - Kind = ConversationUpdateKind.ResponseFunctionCallArgumentsDelta; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - CallId = callId; - Delta = delta; - } - - internal ConversationFunctionCallArgumentsDeltaUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, string callId, string delta) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - CallId = callId; - Delta = delta; - } - - internal ConversationFunctionCallArgumentsDeltaUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public string CallId { get; } - public string Delta { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs deleted file mode 100644 index 2c9da9915..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs +++ /dev/null @@ -1,231 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionCallArgumentsDoneUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationFunctionCallArgumentsDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, options); - } - - internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversationFunctionCallArgumentsDoneUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - string callId = default; - string name = default; - string arguments = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationFunctionCallArgumentsDoneUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - callId, - name, - arguments); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationFunctionCallArgumentsDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationFunctionCallArgumentsDoneUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs deleted file mode 100644 index ba4684c6f..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionCallArgumentsDoneUpdate : ConversationUpdate - { - internal ConversationFunctionCallArgumentsDoneUpdate(string eventId, string responseId, string itemId, int outputIndex, string callId, string name, string arguments) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); - - Kind = ConversationUpdateKind.ResponseFunctionCallArgumentsDone; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - CallId = callId; - Name = name; - Arguments = arguments; - } - - internal ConversationFunctionCallArgumentsDoneUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, string callId, string name, string arguments) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - CallId = callId; - Name = name; - Arguments = arguments; - } - - internal ConversationFunctionCallArgumentsDoneUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public string CallId { get; } - public string Name { get; } - public string Arguments { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs deleted file mode 100644 index 8f7408123..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionTool : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(_name); - } - if (SerializedAdditionalRawData?.ContainsKey("description") != true && Optional.IsDefined(_description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(_description); - } - if (SerializedAdditionalRawData?.ContainsKey("parameters") != true && Optional.IsDefined(_parameters)) - { - writer.WritePropertyName("parameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_parameters); -#else - using (JsonDocument document = JsonDocument.Parse(_parameters)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationFunctionTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationFunctionTool(document.RootElement, options); - } - - internal static ConversationFunctionTool DeserializeConversationFunctionTool(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string description = default; - BinaryData parameters = default; - ConversationToolKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationToolKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationFunctionTool(type, serializedAdditionalRawData, name, description, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support writing '{options.Format}' format."); - } - } - - ConversationFunctionTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationFunctionTool(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationFunctionTool FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationFunctionTool(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs deleted file mode 100644 index e8fd7186c..000000000 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs +++ /dev/null @@ -1,13 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationFunctionTool : ConversationTool - { - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs deleted file mode 100644 index 94d7c421c..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputAudioBufferClearedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputAudioBufferClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, options); - } - - internal static ConversationInputAudioBufferClearedUpdate DeserializeConversationInputAudioBufferClearedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputAudioBufferClearedUpdate(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputAudioBufferClearedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputAudioBufferClearedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs deleted file mode 100644 index f185bbba7..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputAudioBufferClearedUpdate : ConversationUpdate - { - internal ConversationInputAudioBufferClearedUpdate(string eventId) : base(eventId) - { - Kind = ConversationUpdateKind.InputAudioBufferCleared; - } - - internal ConversationInputAudioBufferClearedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - - internal ConversationInputAudioBufferClearedUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs deleted file mode 100644 index 591b40f5c..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputAudioBufferCommittedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("previous_item_id") != true && Optional.IsDefined(PreviousItemId)) - { - writer.WritePropertyName("previous_item_id"u8); - writer.WriteStringValue(PreviousItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputAudioBufferCommittedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); - } - - internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversationInputAudioBufferCommittedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - string previousItemId = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("previous_item_id"u8)) - { - previousItemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputAudioBufferCommittedUpdate(type, eventId, serializedAdditionalRawData, itemId, previousItemId); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputAudioBufferCommittedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputAudioBufferCommittedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs deleted file mode 100644 index 255ee74e2..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputAudioBufferCommittedUpdate : ConversationUpdate - { - internal ConversationInputAudioBufferCommittedUpdate(string eventId, string itemId) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioBufferCommitted; - ItemId = itemId; - } - - internal ConversationInputAudioBufferCommittedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, string previousItemId) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - PreviousItemId = previousItemId; - } - - internal ConversationInputAudioBufferCommittedUpdate() - { - } - - public string ItemId { get; } - public string PreviousItemId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs deleted file mode 100644 index 17563841e..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputSpeechFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("audio_end_ms") != true) - { - writer.WritePropertyName("audio_end_ms"u8); - writer.WriteNumberValue(AudioEndMs); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputSpeechFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement, options); - } - - internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInputSpeechFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int audioEndMs = default; - string itemId = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("audio_end_ms"u8)) - { - audioEndMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputSpeechFinishedUpdate(type, eventId, serializedAdditionalRawData, audioEndMs, itemId); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputSpeechFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputSpeechFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs deleted file mode 100644 index 890260322..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate - { - internal ConversationInputSpeechFinishedUpdate(string eventId, int audioEndMs, string itemId) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioBufferSpeechStopped; - AudioEndMs = audioEndMs; - ItemId = itemId; - } - - internal ConversationInputSpeechFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, int audioEndMs, string itemId) : base(kind, eventId, serializedAdditionalRawData) - { - AudioEndMs = audioEndMs; - ItemId = itemId; - } - - internal ConversationInputSpeechFinishedUpdate() - { - } - - public int AudioEndMs { get; } - public string ItemId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs deleted file mode 100644 index 14fe6656e..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputSpeechStartedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("audio_start_ms") != true) - { - writer.WritePropertyName("audio_start_ms"u8); - writer.WriteNumberValue(AudioStartMs); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputSpeechStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputSpeechStartedUpdate(document.RootElement, options); - } - - internal static ConversationInputSpeechStartedUpdate DeserializeConversationInputSpeechStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int audioStartMs = default; - string itemId = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("audio_start_ms"u8)) - { - audioStartMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputSpeechStartedUpdate(type, eventId, serializedAdditionalRawData, audioStartMs, itemId); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputSpeechStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputSpeechStartedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputSpeechStartedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputSpeechStartedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs deleted file mode 100644 index 8cf4492f3..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate - { - internal ConversationInputSpeechStartedUpdate(string eventId, int audioStartMs, string itemId) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioBufferSpeechStarted; - AudioStartMs = audioStartMs; - ItemId = itemId; - } - - internal ConversationInputSpeechStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, int audioStartMs, string itemId) : base(kind, eventId, serializedAdditionalRawData) - { - AudioStartMs = audioStartMs; - ItemId = itemId; - } - - internal ConversationInputSpeechStartedUpdate() - { - } - - public int AudioStartMs { get; } - public string ItemId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs deleted file mode 100644 index f4a29a5b6..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTokenUsageDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("cached_tokens") != true) - { - writer.WritePropertyName("cached_tokens"u8); - writer.WriteNumberValue(CachedTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("text_tokens") != true) - { - writer.WritePropertyName("text_tokens"u8); - writer.WriteNumberValue(TextTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("audio_tokens") != true) - { - writer.WritePropertyName("audio_tokens"u8); - writer.WriteNumberValue(AudioTokens); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputTokenUsageDetails(document.RootElement, options); - } - - internal static ConversationInputTokenUsageDetails DeserializeConversationInputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int cachedTokens = default; - int textTokens = default; - int audioTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("cached_tokens"u8)) - { - cachedTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("text_tokens"u8)) - { - textTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("audio_tokens"u8)) - { - audioTokens = property.Value.GetInt32(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputTokenUsageDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationInputTokenUsageDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputTokenUsageDetails(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs deleted file mode 100644 index 72bee755f..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTokenUsageDetails - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens) - { - CachedTokens = cachedTokens; - TextTokens = textTokens; - AudioTokens = audioTokens; - } - - internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens, IDictionary serializedAdditionalRawData) - { - CachedTokens = cachedTokens; - TextTokens = textTokens; - AudioTokens = audioTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationInputTokenUsageDetails() - { - } - - public int CachedTokens { get; } - public int TextTokens { get; } - public int AudioTokens { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs deleted file mode 100644 index d9d89b35b..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionFailedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("error") != true) - { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(_error, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputTranscriptionFailedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement, options); - } - - internal static ConversationInputTranscriptionFailedUpdate DeserializeConversationInputTranscriptionFailedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - int contentIndex = default; - InternalRealtimeResponseApiError error = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("error"u8)) - { - error = InternalRealtimeResponseApiError.DeserializeInternalRealtimeResponseApiError(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputTranscriptionFailedUpdate( - type, - eventId, - serializedAdditionalRawData, - itemId, - contentIndex, - error); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputTranscriptionFailedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputTranscriptionFailedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs deleted file mode 100644 index 824472383..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate - { - internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeResponseApiError error) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(error, nameof(error)); - - Kind = ConversationUpdateKind.ItemInputAudioTranscriptionFailed; - ItemId = itemId; - ContentIndex = contentIndex; - _error = error; - } - - internal ConversationInputTranscriptionFailedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, int contentIndex, InternalRealtimeResponseApiError error) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - ContentIndex = contentIndex; - _error = error; - } - - internal ConversationInputTranscriptionFailedUpdate() - { - } - - public string ItemId { get; } - public int ContentIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs deleted file mode 100644 index 4a6c1ea65..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("transcript") != true) - { - writer.WritePropertyName("transcript"u8); - writer.WriteStringValue(Transcript); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement, options); - } - - internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversationInputTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - int contentIndex = default; - string transcript = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("transcript"u8)) - { - transcript = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputTranscriptionFinishedUpdate( - type, - eventId, - serializedAdditionalRawData, - itemId, - contentIndex, - transcript); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationInputTranscriptionFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs deleted file mode 100644 index 0960c8032..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate - { - internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(transcript, nameof(transcript)); - - Kind = ConversationUpdateKind.ItemInputAudioTranscriptionCompleted; - ItemId = itemId; - ContentIndex = contentIndex; - Transcript = transcript; - } - - internal ConversationInputTranscriptionFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, int contentIndex, string transcript) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - ContentIndex = contentIndex; - Transcript = transcript; - } - - internal ConversationInputTranscriptionFinishedUpdate() - { - } - - public string ItemId { get; } - public int ContentIndex { get; } - public string Transcript { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs deleted file mode 100644 index d16f29d9d..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionOptions : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationInputTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputTranscriptionOptions(document.RootElement, options); - } - - internal static ConversationInputTranscriptionOptions DeserializeConversationInputTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationTranscriptionModel? model = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - model = new ConversationTranscriptionModel(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputTranscriptionOptions(model, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support writing '{options.Format}' format."); - } - } - - ConversationInputTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputTranscriptionOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationInputTranscriptionOptions FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputTranscriptionOptions(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs deleted file mode 100644 index 33797601d..000000000 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationInputTranscriptionOptions - { - internal IDictionary SerializedAdditionalRawData { get; set; } - public ConversationInputTranscriptionOptions() - { - } - - internal ConversationInputTranscriptionOptions(ConversationTranscriptionModel? model, IDictionary serializedAdditionalRawData) - { - Model = model; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - public ConversationTranscriptionModel? Model { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs deleted file mode 100644 index 91a947606..000000000 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeRequestItem))] - public partial class ConversationItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItem(document.RootElement, options); - } - - internal static ConversationItem DeserializeConversationItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "assistant": return InternalRealtimeRequestAssistantMessageItem.DeserializeInternalRealtimeRequestAssistantMessageItem(element, options); - case "function_call": return InternalRealtimeRequestFunctionCallItem.DeserializeInternalRealtimeRequestFunctionCallItem(element, options); - case "function_call_output": return InternalRealtimeRequestFunctionCallOutputItem.DeserializeInternalRealtimeRequestFunctionCallOutputItem(element, options); - case "message": return InternalRealtimeRequestMessageItem.DeserializeInternalRealtimeRequestMessageItem(element, options); - case "system": return InternalRealtimeRequestSystemMessageItem.DeserializeInternalRealtimeRequestSystemMessageItem(element, options); - case "user": return InternalRealtimeRequestUserMessageItem.DeserializeInternalRealtimeRequestUserMessageItem(element, options); - } - } - return UnknownRealtimeRequestItem.DeserializeUnknownRealtimeRequestItem(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{options.Format}' format."); - } - } - - ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItem(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItem.cs b/.dotnet/src/Generated/Models/ConversationItem.cs deleted file mode 100644 index dd157049a..000000000 --- a/.dotnet/src/Generated/Models/ConversationItem.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public abstract partial class ConversationItem - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationItem() - { - } - - internal ConversationItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData) - { - Type = type; - Id = id; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeRequestItemType Type { get; set; } - public string Id { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs deleted file mode 100644 index 4cbe4f2d4..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemAcknowledgedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item") != true) - { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(Item, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemAcknowledgedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); - } - - internal static ConversationItemAcknowledgedUpdate DeserializeConversationItemAcknowledgedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationItem item = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item"u8)) - { - item = ConversationItem.DeserializeConversationItem(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemAcknowledgedUpdate(type, eventId, serializedAdditionalRawData, item); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemAcknowledgedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemAcknowledgedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs deleted file mode 100644 index 64894df82..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemAcknowledgedUpdate : ConversationUpdate - { - internal ConversationItemAcknowledgedUpdate(string eventId, ConversationItem item) : base(eventId) - { - Argument.AssertNotNull(item, nameof(item)); - - Kind = ConversationUpdateKind.ItemAcknowledged; - Item = item; - } - - internal ConversationItemAcknowledgedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, ConversationItem item) : base(kind, eventId, serializedAdditionalRawData) - { - Item = item; - } - - internal ConversationItemAcknowledgedUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs deleted file mode 100644 index 671ea9883..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemDeletedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemDeletedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemDeletedUpdate(document.RootElement, options); - } - - internal static ConversationItemDeletedUpdate DeserializeConversationItemDeletedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemDeletedUpdate(type, eventId, serializedAdditionalRawData, itemId); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemDeletedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemDeletedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemDeletedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemDeletedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs deleted file mode 100644 index e178d7fee..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemDeletedUpdate : ConversationUpdate - { - internal ConversationItemDeletedUpdate(string eventId, string itemId) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.ItemDeleted; - ItemId = itemId; - } - - internal ConversationItemDeletedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string itemId) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - } - - internal ConversationItemDeletedUpdate() - { - } - - public string ItemId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs deleted file mode 100644 index 3000ba990..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("item") != true) - { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(_internalItem, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemFinishedUpdate(document.RootElement, options); - } - - internal static ConversationItemFinishedUpdate DeserializeConversationItemFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - int outputIndex = default; - InternalRealtimeResponseItem item = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("item"u8)) - { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemFinishedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - outputIndex, - item); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs deleted file mode 100644 index 009eb2e40..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemFinishedUpdate : ConversationUpdate - { - internal ConversationItemFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(internalItem, nameof(internalItem)); - - Kind = ConversationUpdateKind.ItemFinished; - ResponseId = responseId; - OutputIndex = outputIndex; - _internalItem = internalItem; - } - - internal ConversationItemFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - OutputIndex = outputIndex; - _internalItem = internalItem; - } - - internal ConversationItemFinishedUpdate() - { - } - - public string ResponseId { get; } - public int OutputIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs deleted file mode 100644 index c4495f964..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemStartedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("item") != true) - { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(_internalItem, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemStartedUpdate(document.RootElement, options); - } - - internal static ConversationItemStartedUpdate DeserializeConversationItemStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - int outputIndex = default; - InternalRealtimeResponseItem item = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("item"u8)) - { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemStartedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - outputIndex, - item); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemStartedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemStartedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemStartedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs deleted file mode 100644 index 7c28d6671..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemStartedUpdate : ConversationUpdate - { - internal ConversationItemStartedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(internalItem, nameof(internalItem)); - - Kind = ConversationUpdateKind.ItemStarted; - ResponseId = responseId; - OutputIndex = outputIndex; - _internalItem = internalItem; - } - - internal ConversationItemStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - OutputIndex = outputIndex; - _internalItem = internalItem; - } - - internal ConversationItemStartedUpdate() - { - } - - public string ResponseId { get; } - public int OutputIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemStatus.cs b/.dotnet/src/Generated/Models/ConversationItemStatus.cs deleted file mode 100644 index c99155d0b..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemStatus.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationItemStatus : IEquatable - { - private readonly string _value; - - public ConversationItemStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string IncompleteValue = "incomplete"; - - public static ConversationItemStatus InProgress { get; } = new ConversationItemStatus(InProgressValue); - public static ConversationItemStatus Completed { get; } = new ConversationItemStatus(CompletedValue); - public static ConversationItemStatus Incomplete { get; } = new ConversationItemStatus(IncompleteValue); - public static bool operator ==(ConversationItemStatus left, ConversationItemStatus right) => left.Equals(right); - public static bool operator !=(ConversationItemStatus left, ConversationItemStatus right) => !left.Equals(right); - public static implicit operator ConversationItemStatus(string value) => new ConversationItemStatus(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationItemStatus other && Equals(other); - public bool Equals(ConversationItemStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs deleted file mode 100644 index 8836e7489..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemTruncatedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("audio_end_ms") != true) - { - writer.WritePropertyName("audio_end_ms"u8); - writer.WriteNumberValue(AudioEndMs); - } - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemTruncatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemTruncatedUpdate(document.RootElement, options); - } - - internal static ConversationItemTruncatedUpdate DeserializeConversationItemTruncatedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - int audioEndMs = default; - int index = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("audio_end_ms"u8)) - { - audioEndMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemTruncatedUpdate( - type, - eventId, - serializedAdditionalRawData, - itemId, - audioEndMs, - index); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemTruncatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemTruncatedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemTruncatedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemTruncatedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs deleted file mode 100644 index 2f24d6834..000000000 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemTruncatedUpdate : ConversationUpdate - { - internal ConversationItemTruncatedUpdate(string eventId, string itemId, int audioEndMs, int index) : base(eventId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.ItemTruncated; - ItemId = itemId; - AudioEndMs = audioEndMs; - Index = index; - } - - internal ConversationItemTruncatedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, int audioEndMs, int index) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - AudioEndMs = audioEndMs; - Index = index; - } - - internal ConversationItemTruncatedUpdate() - { - } - - public string ItemId { get; } - public int AudioEndMs { get; } - public int Index { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationMessageRole.cs b/.dotnet/src/Generated/Models/ConversationMessageRole.cs deleted file mode 100644 index b5cd90fd4..000000000 --- a/.dotnet/src/Generated/Models/ConversationMessageRole.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationMessageRole : IEquatable - { - private readonly string _value; - - public ConversationMessageRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SystemValue = "system"; - private const string UserValue = "user"; - private const string AssistantValue = "assistant"; - - public static ConversationMessageRole System { get; } = new ConversationMessageRole(SystemValue); - public static ConversationMessageRole User { get; } = new ConversationMessageRole(UserValue); - public static ConversationMessageRole Assistant { get; } = new ConversationMessageRole(AssistantValue); - public static bool operator ==(ConversationMessageRole left, ConversationMessageRole right) => left.Equals(right); - public static bool operator !=(ConversationMessageRole left, ConversationMessageRole right) => !left.Equals(right); - public static implicit operator ConversationMessageRole(string value) => new ConversationMessageRole(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationMessageRole other && Equals(other); - public bool Equals(ConversationMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs deleted file mode 100644 index 7aa592b03..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTokenUsageDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text_tokens") != true) - { - writer.WritePropertyName("text_tokens"u8); - writer.WriteNumberValue(TextTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("audio_tokens") != true) - { - writer.WritePropertyName("audio_tokens"u8); - writer.WriteNumberValue(AudioTokens); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationOutputTokenUsageDetails(document.RootElement, options); - } - - internal static ConversationOutputTokenUsageDetails DeserializeConversationOutputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int textTokens = default; - int audioTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text_tokens"u8)) - { - textTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("audio_tokens"u8)) - { - audioTokens = property.Value.GetInt32(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support writing '{options.Format}' format."); - } - } - - ConversationOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationOutputTokenUsageDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationOutputTokenUsageDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationOutputTokenUsageDetails(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs deleted file mode 100644 index e6c4b4172..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTokenUsageDetails - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens) - { - TextTokens = textTokens; - AudioTokens = audioTokens; - } - - internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens, IDictionary serializedAdditionalRawData) - { - TextTokens = textTokens; - AudioTokens = audioTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationOutputTokenUsageDetails() - { - } - - public int TextTokens { get; } - public int AudioTokens { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs deleted file mode 100644 index e8bc14ac3..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTranscriptionDeltaUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteStringValue(Delta); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationOutputTranscriptionDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, options); - } - - internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversationOutputTranscriptionDeltaUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - string delta = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationOutputTranscriptionDeltaUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - delta); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationOutputTranscriptionDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationOutputTranscriptionDeltaUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs deleted file mode 100644 index 56ed591c4..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTranscriptionDeltaUpdate : ConversationUpdate - { - internal ConversationOutputTranscriptionDeltaUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(delta, nameof(delta)); - - Kind = ConversationUpdateKind.ResponseAudioTranscriptDelta; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationOutputTranscriptionDeltaUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationOutputTranscriptionDeltaUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - public string Delta { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs deleted file mode 100644 index b94744341..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTranscriptionFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationOutputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); - } - - internal static ConversationOutputTranscriptionFinishedUpdate DeserializeConversationOutputTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationOutputTranscriptionFinishedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationOutputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationOutputTranscriptionFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs deleted file mode 100644 index 066dc2f39..000000000 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationOutputTranscriptionFinishedUpdate : ConversationUpdate - { - internal ConversationOutputTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.ResponseAudioTranscriptDone; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - } - - internal ConversationOutputTranscriptionFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - } - - internal ConversationOutputTranscriptionFinishedUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs deleted file mode 100644 index 83d8e6d67..000000000 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationRateLimitDetailsItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("limit") != true) - { - writer.WritePropertyName("limit"u8); - writer.WriteNumberValue(Limit); - } - if (SerializedAdditionalRawData?.ContainsKey("remaining") != true) - { - writer.WritePropertyName("remaining"u8); - writer.WriteNumberValue(Remaining); - } - if (SerializedAdditionalRawData?.ContainsKey("reset_seconds") != true) - { - writer.WritePropertyName("reset_seconds"u8); - writer.WriteNumberValue(ResetSeconds); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationRateLimitDetailsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationRateLimitDetailsItem(document.RootElement, options); - } - - internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimitDetailsItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - int limit = default; - int remaining = default; - float resetSeconds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("limit"u8)) - { - limit = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("remaining"u8)) - { - remaining = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("reset_seconds"u8)) - { - resetSeconds = property.Value.GetSingle(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support writing '{options.Format}' format."); - } - } - - ConversationRateLimitDetailsItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationRateLimitDetailsItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationRateLimitDetailsItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationRateLimitDetailsItem(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs deleted file mode 100644 index f3f4235b4..000000000 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationRateLimitDetailsItem - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - Limit = limit; - Remaining = remaining; - ResetSeconds = resetSeconds; - } - - internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds, IDictionary serializedAdditionalRawData) - { - Name = name; - Limit = limit; - Remaining = remaining; - ResetSeconds = resetSeconds; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationRateLimitDetailsItem() - { - } - - public string Name { get; } - public int Limit { get; } - public int Remaining { get; } - public float ResetSeconds { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs deleted file mode 100644 index c8fae2d6b..000000000 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationRateLimitsUpdatedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("rate_limits") != true) - { - writer.WritePropertyName("rate_limits"u8); - writer.WriteStartArray(); - foreach (var item in RateLimits) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationRateLimitsUpdatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); - } - - internal static ConversationRateLimitsUpdatedUpdate DeserializeConversationRateLimitsUpdatedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList rateLimits = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rate_limits"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationRateLimitDetailsItem.DeserializeConversationRateLimitDetailsItem(item, options)); - } - rateLimits = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationRateLimitsUpdatedUpdate(type, eventId, serializedAdditionalRawData, rateLimits); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationRateLimitsUpdatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationRateLimitsUpdatedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs deleted file mode 100644 index 881a004f5..000000000 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationRateLimitsUpdatedUpdate : ConversationUpdate - { - internal ConversationRateLimitsUpdatedUpdate(string eventId, IEnumerable rateLimits) : base(eventId) - { - Argument.AssertNotNull(rateLimits, nameof(rateLimits)); - - Kind = ConversationUpdateKind.RateLimitsUpdated; - RateLimits = rateLimits.ToList(); - } - - internal ConversationRateLimitsUpdatedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, IReadOnlyList rateLimits) : base(kind, eventId, serializedAdditionalRawData) - { - RateLimits = rateLimits; - } - - internal ConversationRateLimitsUpdatedUpdate() - { - } - - public IReadOnlyList RateLimits { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs deleted file mode 100644 index eeeeb0aad..000000000 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationResponseFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response") != true) - { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(_internalResponse, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationResponseFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationResponseFinishedUpdate(document.RootElement, options); - } - - internal static ConversationResponseFinishedUpdate DeserializeConversationResponseFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponse response = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response"u8)) - { - response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationResponseFinishedUpdate(type, eventId, serializedAdditionalRawData, response); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationResponseFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationResponseFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationResponseFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationResponseFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs deleted file mode 100644 index db3e6422b..000000000 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationResponseFinishedUpdate : ConversationUpdate - { - internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId) - { - Argument.AssertNotNull(internalResponse, nameof(internalResponse)); - - Kind = ConversationUpdateKind.ResponseFinished; - _internalResponse = internalResponse; - } - - internal ConversationResponseFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeResponse internalResponse) : base(kind, eventId, serializedAdditionalRawData) - { - _internalResponse = internalResponse; - } - - internal ConversationResponseFinishedUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs deleted file mode 100644 index 42f6599a3..000000000 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationResponseStartedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response") != true) - { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(_internalResponse, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationResponseStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationResponseStartedUpdate(document.RootElement, options); - } - - internal static ConversationResponseStartedUpdate DeserializeConversationResponseStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponse response = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response"u8)) - { - response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationResponseStartedUpdate(type, eventId, serializedAdditionalRawData, response); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationResponseStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationResponseStartedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationResponseStartedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationResponseStartedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs deleted file mode 100644 index fbd5f476b..000000000 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationResponseStartedUpdate : ConversationUpdate - { - internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId) - { - Argument.AssertNotNull(internalResponse, nameof(internalResponse)); - - Kind = ConversationUpdateKind.ResponseStarted; - _internalResponse = internalResponse; - } - - internal ConversationResponseStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeResponse internalResponse) : base(kind, eventId, serializedAdditionalRawData) - { - _internalResponse = internalResponse; - } - - internal ConversationResponseStartedUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs deleted file mode 100644 index 8e615fd9b..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionConfiguredUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("session") != true) - { - writer.WritePropertyName("session"u8); - writer.WriteObjectValue(_internalSession, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationSessionConfiguredUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationSessionConfiguredUpdate(document.RootElement, options); - } - - internal static ConversationSessionConfiguredUpdate DeserializeConversationSessionConfiguredUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseSession session = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("session"u8)) - { - session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationSessionConfiguredUpdate(type, eventId, serializedAdditionalRawData, session); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationSessionConfiguredUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationSessionConfiguredUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationSessionConfiguredUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationSessionConfiguredUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs deleted file mode 100644 index 81f99fa26..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionConfiguredUpdate : ConversationUpdate - { - internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId) - { - Argument.AssertNotNull(internalSession, nameof(internalSession)); - - Kind = ConversationUpdateKind.SessionConfigured; - _internalSession = internalSession; - } - - internal ConversationSessionConfiguredUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeResponseSession internalSession) : base(kind, eventId, serializedAdditionalRawData) - { - _internalSession = internalSession; - } - - internal ConversationSessionConfiguredUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs deleted file mode 100644 index 9f00e93a1..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ /dev/null @@ -1,341 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionOptions : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (SerializedAdditionalRawData?.ContainsKey("modalities") != true && Optional.IsCollectionDefined(_internalModalities)) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (var item in _internalModalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("voice") != true && Optional.IsDefined(Voice)) - { - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(Instructions)) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - if (SerializedAdditionalRawData?.ContainsKey("input_audio_format") != true && Optional.IsDefined(InputAudioFormat)) - { - writer.WritePropertyName("input_audio_format"u8); - writer.WriteStringValue(InputAudioFormat.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("output_audio_format") != true && Optional.IsDefined(OutputAudioFormat)) - { - writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("input_audio_transcription") != true && Optional.IsDefined(InputTranscriptionOptions)) - { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputTranscriptionOptions, options); - } - if (SerializedAdditionalRawData?.ContainsKey("turn_detection") != true && Optional.IsDefined(TurnDetectionOptions)) - { - writer.WritePropertyName("turn_detection"u8); - writer.WriteObjectValue(TurnDetectionOptions, options); - } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(_internalToolChoice)) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_internalToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(_internalToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (SerializedAdditionalRawData?.ContainsKey("max_response_output_tokens") != true && Optional.IsDefined(_maxResponseOutputTokens)) - { - writer.WritePropertyName("max_response_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_maxResponseOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationSessionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationSessionOptions(document.RootElement, options); - } - - internal static ConversationSessionOptions DeserializeConversationSessionOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string model = default; - IList modalities = default; - ConversationVoice? voice = default; - string instructions = default; - ConversationAudioFormat? inputAudioFormat = default; - ConversationAudioFormat? outputAudioFormat = default; - ConversationInputTranscriptionOptions inputAudioTranscription = default; - ConversationTurnDetectionOptions turnDetection = default; - IList tools = default; - BinaryData toolChoice = default; - float? temperature = default; - BinaryData maxResponseOutputTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("modalities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); - } - modalities = array; - continue; - } - if (property.NameEquals("voice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - voice = new ConversationVoice(property.Value.GetString()); - continue; - } - if (property.NameEquals("instructions"u8)) - { - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("input_audio_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioFormat = new ConversationAudioFormat(property.Value.GetString()); - continue; - } - if (property.NameEquals("output_audio_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputAudioFormat = new ConversationAudioFormat(property.Value.GetString()); - continue; - } - if (property.NameEquals("input_audio_transcription"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioTranscription = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(property.Value, options); - continue; - } - if (property.NameEquals("turn_detection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - turnDetection = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(property.Value, options); - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationTool.DeserializeConversationTool(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_response_output_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxResponseOutputTokens = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationSessionOptions( - model, - modalities ?? new ChangeTrackingList(), - voice, - instructions, - inputAudioFormat, - outputAudioFormat, - inputAudioTranscription, - turnDetection, - tools ?? new ChangeTrackingList(), - toolChoice, - temperature, - maxResponseOutputTokens, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{options.Format}' format."); - } - } - - ConversationSessionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationSessionOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationSessionOptions FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationSessionOptions(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs deleted file mode 100644 index e5e5d1ad8..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionOptions - { - internal IDictionary SerializedAdditionalRawData { get; set; } - public ConversationSessionOptions() - { - _internalModalities = new ChangeTrackingList(); - Tools = new ChangeTrackingList(); - } - - internal ConversationSessionOptions(string model, IList internalModalities, ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, ConversationInputTranscriptionOptions inputTranscriptionOptions, ConversationTurnDetectionOptions turnDetectionOptions, IList tools, BinaryData internalToolChoice, float? temperature, BinaryData maxResponseOutputTokens, IDictionary serializedAdditionalRawData) - { - Model = model; - _internalModalities = internalModalities; - Voice = voice; - Instructions = instructions; - InputAudioFormat = inputAudioFormat; - OutputAudioFormat = outputAudioFormat; - InputTranscriptionOptions = inputTranscriptionOptions; - TurnDetectionOptions = turnDetectionOptions; - Tools = tools; - _internalToolChoice = internalToolChoice; - Temperature = temperature; - _maxResponseOutputTokens = maxResponseOutputTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - public ConversationVoice? Voice { get; set; } - public string Instructions { get; set; } - public ConversationAudioFormat? InputAudioFormat { get; set; } - public ConversationAudioFormat? OutputAudioFormat { get; set; } - public IList Tools { get; } - public float? Temperature { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs deleted file mode 100644 index 118d79383..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionStartedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("session") != true) - { - writer.WritePropertyName("session"u8); - writer.WriteObjectValue(_internalSession, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationSessionStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationSessionStartedUpdate(document.RootElement, options); - } - - internal static ConversationSessionStartedUpdate DeserializeConversationSessionStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseSession session = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("session"u8)) - { - session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationSessionStartedUpdate(type, eventId, serializedAdditionalRawData, session); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationSessionStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationSessionStartedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationSessionStartedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationSessionStartedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs deleted file mode 100644 index 400466995..000000000 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationSessionStartedUpdate : ConversationUpdate - { - internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId) - { - Argument.AssertNotNull(internalSession, nameof(internalSession)); - - Kind = ConversationUpdateKind.SessionStarted; - _internalSession = internalSession; - } - - internal ConversationSessionStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeResponseSession internalSession) : base(kind, eventId, serializedAdditionalRawData) - { - _internalSession = internalSession; - } - - internal ConversationSessionStartedUpdate() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationStatus.cs b/.dotnet/src/Generated/Models/ConversationStatus.cs deleted file mode 100644 index 7de858fc2..000000000 --- a/.dotnet/src/Generated/Models/ConversationStatus.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationStatus : IEquatable - { - private readonly string _value; - - public ConversationStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string CancelledValue = "cancelled"; - private const string IncompleteValue = "incomplete"; - private const string FailedValue = "failed"; - - public static ConversationStatus InProgress { get; } = new ConversationStatus(InProgressValue); - public static ConversationStatus Completed { get; } = new ConversationStatus(CompletedValue); - public static ConversationStatus Cancelled { get; } = new ConversationStatus(CancelledValue); - public static ConversationStatus Incomplete { get; } = new ConversationStatus(IncompleteValue); - public static ConversationStatus Failed { get; } = new ConversationStatus(FailedValue); - public static bool operator ==(ConversationStatus left, ConversationStatus right) => left.Equals(right); - public static bool operator !=(ConversationStatus left, ConversationStatus right) => !left.Equals(right); - public static implicit operator ConversationStatus(string value) => new ConversationStatus(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationStatus other && Equals(other); - public bool Equals(ConversationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs deleted file mode 100644 index fd954c5d1..000000000 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTextDeltaUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("delta") != true) - { - writer.WritePropertyName("delta"u8); - writer.WriteStringValue(Delta); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTextDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTextDeltaUpdate(document.RootElement, options); - } - - internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - string delta = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationTextDeltaUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - delta); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationTextDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTextDeltaUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationTextDeltaUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTextDeltaUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs deleted file mode 100644 index 70deec37a..000000000 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTextDeltaUpdate : ConversationUpdate - { - internal ConversationTextDeltaUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(delta, nameof(delta)); - - Kind = ConversationUpdateKind.ResponseTextDelta; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationTextDeltaUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Delta = delta; - } - - internal ConversationTextDeltaUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - public string Delta { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs deleted file mode 100644 index 0c3fc276b..000000000 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTextDoneUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("value") != true) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTextDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTextDoneUpdate(document.RootElement, options); - } - - internal static ConversationTextDoneUpdate DeserializeConversationTextDoneUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - string itemId = default; - int outputIndex = default; - int contentIndex = default; - string value = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationTextDoneUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - itemId, - outputIndex, - contentIndex, - value); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationTextDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTextDoneUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationTextDoneUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTextDoneUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs deleted file mode 100644 index 8761a3b61..000000000 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTextDoneUpdate : ConversationUpdate - { - internal ConversationTextDoneUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string value) : base(eventId) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(value, nameof(value)); - - Kind = ConversationUpdateKind.ResponseTextDone; - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Value = value; - } - - internal ConversationTextDoneUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, string value) : base(kind, eventId, serializedAdditionalRawData) - { - ResponseId = responseId; - ItemId = itemId; - OutputIndex = outputIndex; - ContentIndex = contentIndex; - Value = value; - } - - internal ConversationTextDoneUpdate() - { - } - - public string ResponseId { get; } - public string ItemId { get; } - public int OutputIndex { get; } - public int ContentIndex { get; } - public string Value { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs deleted file mode 100644 index 4485af275..000000000 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTokenUsage : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("input_tokens") != true) - { - writer.WritePropertyName("input_tokens"u8); - writer.WriteNumberValue(InputTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("output_tokens") != true) - { - writer.WritePropertyName("output_tokens"u8); - writer.WriteNumberValue(OutputTokens); - } - if (SerializedAdditionalRawData?.ContainsKey("input_token_details") != true) - { - writer.WritePropertyName("input_token_details"u8); - writer.WriteObjectValue(InputTokenDetails, options); - } - if (SerializedAdditionalRawData?.ContainsKey("output_token_details") != true) - { - writer.WritePropertyName("output_token_details"u8); - writer.WriteObjectValue(OutputTokenDetails, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTokenUsage(document.RootElement, options); - } - - internal static ConversationTokenUsage DeserializeConversationTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int totalTokens = default; - int inputTokens = default; - int outputTokens = default; - ConversationInputTokenUsageDetails inputTokenDetails = default; - ConversationOutputTokenUsageDetails outputTokenDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("total_tokens"u8)) - { - totalTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("input_tokens"u8)) - { - inputTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("output_tokens"u8)) - { - outputTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("input_token_details"u8)) - { - inputTokenDetails = ConversationInputTokenUsageDetails.DeserializeConversationInputTokenUsageDetails(property.Value, options); - continue; - } - if (property.NameEquals("output_token_details"u8)) - { - outputTokenDetails = ConversationOutputTokenUsageDetails.DeserializeConversationOutputTokenUsageDetails(property.Value, options); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationTokenUsage( - totalTokens, - inputTokens, - outputTokens, - inputTokenDetails, - outputTokenDetails, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support writing '{options.Format}' format."); - } - } - - ConversationTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTokenUsage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationTokenUsage FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTokenUsage(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs deleted file mode 100644 index d8047f775..000000000 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs +++ /dev/null @@ -1,45 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationTokenUsage - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails) - { - Argument.AssertNotNull(inputTokenDetails, nameof(inputTokenDetails)); - Argument.AssertNotNull(outputTokenDetails, nameof(outputTokenDetails)); - - TotalTokens = totalTokens; - InputTokens = inputTokens; - OutputTokens = outputTokens; - InputTokenDetails = inputTokenDetails; - OutputTokenDetails = outputTokenDetails; - } - - internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails, IDictionary serializedAdditionalRawData) - { - TotalTokens = totalTokens; - InputTokens = inputTokens; - OutputTokens = outputTokens; - InputTokenDetails = inputTokenDetails; - OutputTokenDetails = outputTokenDetails; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationTokenUsage() - { - } - - public int TotalTokens { get; } - public int InputTokens { get; } - public int OutputTokens { get; } - public ConversationInputTokenUsageDetails InputTokenDetails { get; } - public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs deleted file mode 100644 index c7d7dd0cb..000000000 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeTool))] - public partial class ConversationTool : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTool(document.RootElement, options); - } - - internal static ConversationTool DeserializeConversationTool(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "function": return ConversationFunctionTool.DeserializeConversationFunctionTool(element, options); - } - } - return UnknownRealtimeTool.DeserializeUnknownRealtimeTool(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{options.Format}' format."); - } - } - - ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTool(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationTool FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTool(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTool.cs b/.dotnet/src/Generated/Models/ConversationTool.cs deleted file mode 100644 index fb66af814..000000000 --- a/.dotnet/src/Generated/Models/ConversationTool.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public abstract partial class ConversationTool - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationTool() - { - } - - internal ConversationTool(ConversationToolKind kind, IDictionary serializedAdditionalRawData) - { - Kind = kind; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs deleted file mode 100644 index 880cf9f3c..000000000 --- a/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using System; - -namespace OpenAI.RealtimeConversation -{ - internal static partial class ConversationToolChoiceKindExtensions - { - public static string ToSerialString(this ConversationToolChoiceKind value) => value switch - { - ConversationToolChoiceKind.Auto => "auto", - ConversationToolChoiceKind.None => "none", - ConversationToolChoiceKind.Required => "required", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationToolChoiceKind value.") - }; - - public static ConversationToolChoiceKind ToConversationToolChoiceKind(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "auto")) return ConversationToolChoiceKind.Auto; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "none")) return ConversationToolChoiceKind.None; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "required")) return ConversationToolChoiceKind.Required; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationToolChoiceKind value."); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationToolKind.cs b/.dotnet/src/Generated/Models/ConversationToolKind.cs deleted file mode 100644 index acb65bef4..000000000 --- a/.dotnet/src/Generated/Models/ConversationToolKind.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationToolKind : IEquatable - { - private readonly string _value; - - public ConversationToolKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FunctionValue = "function"; - - public static ConversationToolKind Function { get; } = new ConversationToolKind(FunctionValue); - public static bool operator ==(ConversationToolKind left, ConversationToolKind right) => left.Equals(right); - public static bool operator !=(ConversationToolKind left, ConversationToolKind right) => !left.Equals(right); - public static implicit operator ConversationToolKind(string value) => new ConversationToolKind(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationToolKind other && Equals(other); - public bool Equals(ConversationToolKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs b/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs deleted file mode 100644 index 37d47426a..000000000 --- a/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationTranscriptionModel : IEquatable - { - private readonly string _value; - - public ConversationTranscriptionModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Whisper1Value = "whisper-1"; - - public static ConversationTranscriptionModel Whisper1 { get; } = new ConversationTranscriptionModel(Whisper1Value); - public static bool operator ==(ConversationTranscriptionModel left, ConversationTranscriptionModel right) => left.Equals(right); - public static bool operator !=(ConversationTranscriptionModel left, ConversationTranscriptionModel right) => !left.Equals(right); - public static implicit operator ConversationTranscriptionModel(string value) => new ConversationTranscriptionModel(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationTranscriptionModel other && Equals(other); - public bool Equals(ConversationTranscriptionModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs deleted file mode 100644 index c2efd47d7..000000000 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System; - -namespace OpenAI.RealtimeConversation -{ - internal static partial class ConversationTurnDetectionKindExtensions - { - public static string ToSerialString(this ConversationTurnDetectionKind value) => value switch - { - ConversationTurnDetectionKind.ServerVoiceActivityDetection => "server_vad", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationTurnDetectionKind value.") - }; - - public static ConversationTurnDetectionKind ToConversationTurnDetectionKind(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "server_vad")) return ConversationTurnDetectionKind.ServerVoiceActivityDetection; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationTurnDetectionKind value."); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs deleted file mode 100644 index 649f6f784..000000000 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeTurnDetection))] - public partial class ConversationTurnDetectionOptions : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTurnDetectionOptions(document.RootElement, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{options.Format}' format."); - } - } - - ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTurnDetectionOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationTurnDetectionOptions FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTurnDetectionOptions(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs deleted file mode 100644 index 1349c2772..000000000 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public abstract partial class ConversationTurnDetectionOptions - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationTurnDetectionOptions() - { - } - - internal ConversationTurnDetectionOptions(ConversationTurnDetectionKind kind, IDictionary serializedAdditionalRawData) - { - Kind = kind; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs deleted file mode 100644 index ac5eff099..000000000 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ /dev/null @@ -1,161 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeResponseCommand))] - public partial class ConversationUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationUpdate(document.RootElement, options); - } - - internal static ConversationUpdate DeserializeConversationUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "conversation.item.created": return ConversationItemAcknowledgedUpdate.DeserializeConversationItemAcknowledgedUpdate(element, options); - case "conversation.item.deleted": return ConversationItemDeletedUpdate.DeserializeConversationItemDeletedUpdate(element, options); - case "conversation.item.input_audio_transcription.completed": return ConversationInputTranscriptionFinishedUpdate.DeserializeConversationInputTranscriptionFinishedUpdate(element, options); - case "conversation.item.input_audio_transcription.failed": return ConversationInputTranscriptionFailedUpdate.DeserializeConversationInputTranscriptionFailedUpdate(element, options); - case "conversation.item.truncated": return ConversationItemTruncatedUpdate.DeserializeConversationItemTruncatedUpdate(element, options); - case "error": return ConversationErrorUpdate.DeserializeConversationErrorUpdate(element, options); - case "input_audio_buffer.cleared": return ConversationInputAudioBufferClearedUpdate.DeserializeConversationInputAudioBufferClearedUpdate(element, options); - case "input_audio_buffer.committed": return ConversationInputAudioBufferCommittedUpdate.DeserializeConversationInputAudioBufferCommittedUpdate(element, options); - case "input_audio_buffer.speech_started": return ConversationInputSpeechStartedUpdate.DeserializeConversationInputSpeechStartedUpdate(element, options); - case "input_audio_buffer.speech_stopped": return ConversationInputSpeechFinishedUpdate.DeserializeConversationInputSpeechFinishedUpdate(element, options); - case "rate_limits.updated": return ConversationRateLimitsUpdatedUpdate.DeserializeConversationRateLimitsUpdatedUpdate(element, options); - case "response.audio_transcript.delta": return ConversationOutputTranscriptionDeltaUpdate.DeserializeConversationOutputTranscriptionDeltaUpdate(element, options); - case "response.audio_transcript.done": return ConversationOutputTranscriptionFinishedUpdate.DeserializeConversationOutputTranscriptionFinishedUpdate(element, options); - case "response.audio.delta": return ConversationAudioDeltaUpdate.DeserializeConversationAudioDeltaUpdate(element, options); - case "response.audio.done": return ConversationAudioDoneUpdate.DeserializeConversationAudioDoneUpdate(element, options); - case "response.content_part.added": return ConversationContentPartStartedUpdate.DeserializeConversationContentPartStartedUpdate(element, options); - case "response.content_part.done": return ConversationContentPartFinishedUpdate.DeserializeConversationContentPartFinishedUpdate(element, options); - case "response.created": return ConversationResponseStartedUpdate.DeserializeConversationResponseStartedUpdate(element, options); - case "response.done": return ConversationResponseFinishedUpdate.DeserializeConversationResponseFinishedUpdate(element, options); - case "response.function_call_arguments.delta": return ConversationFunctionCallArgumentsDeltaUpdate.DeserializeConversationFunctionCallArgumentsDeltaUpdate(element, options); - case "response.function_call_arguments.done": return ConversationFunctionCallArgumentsDoneUpdate.DeserializeConversationFunctionCallArgumentsDoneUpdate(element, options); - case "response.output_item.added": return ConversationItemStartedUpdate.DeserializeConversationItemStartedUpdate(element, options); - case "response.output_item.done": return ConversationItemFinishedUpdate.DeserializeConversationItemFinishedUpdate(element, options); - case "response.text.delta": return ConversationTextDeltaUpdate.DeserializeConversationTextDeltaUpdate(element, options); - case "response.text.done": return ConversationTextDoneUpdate.DeserializeConversationTextDoneUpdate(element, options); - case "session.created": return ConversationSessionStartedUpdate.DeserializeConversationSessionStartedUpdate(element, options); - case "session.updated": return ConversationSessionConfiguredUpdate.DeserializeConversationSessionConfiguredUpdate(element, options); - } - } - return UnknownRealtimeResponseCommand.DeserializeUnknownRealtimeResponseCommand(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static ConversationUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationUpdate(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs deleted file mode 100644 index 850f16480..000000000 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - public abstract partial class ConversationUpdate - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationUpdate(string eventId) - { - EventId = eventId; - } - - internal ConversationUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData) - { - Kind = kind; - EventId = eventId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationUpdate() - { - } - public string EventId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs deleted file mode 100644 index 1bffcec88..000000000 --- a/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// - -#nullable disable - -using System; - -namespace OpenAI.RealtimeConversation -{ - internal static partial class ConversationUpdateKindExtensions - { - public static string ToSerialString(this ConversationUpdateKind value) => value switch - { - ConversationUpdateKind.SessionStarted => "session.created", - ConversationUpdateKind.SessionConfigured => "session.updated", - ConversationUpdateKind.ItemAcknowledged => "conversation.item.created", - ConversationUpdateKind.ItemDeleted => "conversation.item.deleted", - ConversationUpdateKind.ItemTruncated => "conversation.item.truncated", - ConversationUpdateKind.ResponseStarted => "response.created", - ConversationUpdateKind.ResponseFinished => "response.done", - ConversationUpdateKind.RateLimitsUpdated => "rate_limits.updated", - ConversationUpdateKind.ItemStarted => "response.output_item.added", - ConversationUpdateKind.ItemFinished => "response.output_item.done", - ConversationUpdateKind.ContentPartStarted => "response.content_part.added", - ConversationUpdateKind.ContentPartFinished => "response.content_part.done", - ConversationUpdateKind.ResponseAudioDelta => "response.audio.delta", - ConversationUpdateKind.ResponseAudioDone => "response.audio.done", - ConversationUpdateKind.ResponseAudioTranscriptDelta => "response.audio_transcript.delta", - ConversationUpdateKind.ResponseAudioTranscriptDone => "response.audio_transcript.done", - ConversationUpdateKind.ResponseTextDelta => "response.text.delta", - ConversationUpdateKind.ResponseTextDone => "response.text.done", - ConversationUpdateKind.ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta", - ConversationUpdateKind.ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done", - ConversationUpdateKind.InputAudioBufferSpeechStarted => "input_audio_buffer.speech_started", - ConversationUpdateKind.InputAudioBufferSpeechStopped => "input_audio_buffer.speech_stopped", - ConversationUpdateKind.ItemInputAudioTranscriptionCompleted => "conversation.item.input_audio_transcription.completed", - ConversationUpdateKind.ItemInputAudioTranscriptionFailed => "conversation.item.input_audio_transcription.failed", - ConversationUpdateKind.InputAudioBufferCommitted => "input_audio_buffer.committed", - ConversationUpdateKind.InputAudioBufferCleared => "input_audio_buffer.cleared", - ConversationUpdateKind.Error => "error", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value.") - }; - - public static ConversationUpdateKind ToConversationUpdateKind(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.created")) return ConversationUpdateKind.SessionStarted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.updated")) return ConversationUpdateKind.SessionConfigured; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.created")) return ConversationUpdateKind.ItemAcknowledged; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.deleted")) return ConversationUpdateKind.ItemDeleted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.truncated")) return ConversationUpdateKind.ItemTruncated; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.created")) return ConversationUpdateKind.ResponseStarted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.done")) return ConversationUpdateKind.ResponseFinished; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "rate_limits.updated")) return ConversationUpdateKind.RateLimitsUpdated; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.added")) return ConversationUpdateKind.ItemStarted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.done")) return ConversationUpdateKind.ItemFinished; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.added")) return ConversationUpdateKind.ContentPartStarted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.done")) return ConversationUpdateKind.ContentPartFinished; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.delta")) return ConversationUpdateKind.ResponseAudioDelta; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.done")) return ConversationUpdateKind.ResponseAudioDone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.delta")) return ConversationUpdateKind.ResponseAudioTranscriptDelta; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.done")) return ConversationUpdateKind.ResponseAudioTranscriptDone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.delta")) return ConversationUpdateKind.ResponseTextDelta; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.done")) return ConversationUpdateKind.ResponseTextDone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.delta")) return ConversationUpdateKind.ResponseFunctionCallArgumentsDelta; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.done")) return ConversationUpdateKind.ResponseFunctionCallArgumentsDone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_started")) return ConversationUpdateKind.InputAudioBufferSpeechStarted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_stopped")) return ConversationUpdateKind.InputAudioBufferSpeechStopped; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.completed")) return ConversationUpdateKind.ItemInputAudioTranscriptionCompleted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.failed")) return ConversationUpdateKind.ItemInputAudioTranscriptionFailed; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.committed")) return ConversationUpdateKind.InputAudioBufferCommitted; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.cleared")) return ConversationUpdateKind.InputAudioBufferCleared; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) return ConversationUpdateKind.Error; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value."); - } - } -} diff --git a/.dotnet/src/Generated/Models/ConversationVoice.cs b/.dotnet/src/Generated/Models/ConversationVoice.cs deleted file mode 100644 index 1c845699c..000000000 --- a/.dotnet/src/Generated/Models/ConversationVoice.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - public readonly partial struct ConversationVoice : IEquatable - { - private readonly string _value; - - public ConversationVoice(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AlloyValue = "alloy"; - private const string ShimmerValue = "shimmer"; - private const string EchoValue = "echo"; - - public static ConversationVoice Alloy { get; } = new ConversationVoice(AlloyValue); - public static ConversationVoice Shimmer { get; } = new ConversationVoice(ShimmerValue); - public static ConversationVoice Echo { get; } = new ConversationVoice(EchoValue); - public static bool operator ==(ConversationVoice left, ConversationVoice right) => left.Equals(right); - public static bool operator !=(ConversationVoice left, ConversationVoice right) => !left.Equals(right); - public static implicit operator ConversationVoice(string value) => new ConversationVoice(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConversationVoice other && Equals(other); - public bool Equals(ConversationVoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index ae3a15612..11854c8e7 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage : IJsonModel { + internal EmbeddingTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(InputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokenCount); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } - EmbeddingTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EmbeddingTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual EmbeddingTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeEmbeddingTokenUsage(document.RootElement, options); } - internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - int promptTokens = default; - int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int inputTokenCount = default; + int totalTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + inputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new EmbeddingTokenUsage(promptTokens, totalTokens, serializedAdditionalRawData); + return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - EmbeddingTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + EmbeddingTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual EmbeddingTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeEmbeddingTokenUsage(document.RootElement, options); } default: @@ -130,15 +127,16 @@ EmbeddingTokenUsage IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static EmbeddingTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(EmbeddingTokenUsage embeddingTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEmbeddingTokenUsage(document.RootElement); + return BinaryContent.Create(embeddingTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator EmbeddingTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs index ab5e300dc..a4fb0d189 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs @@ -9,22 +9,19 @@ namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount) { InputTokenCount = inputTokenCount; TotalTokenCount = totalTokenCount; } - internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount, IDictionary serializedAdditionalRawData) + internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount, IDictionary additionalBinaryDataProperties) { InputTokenCount = inputTokenCount; TotalTokenCount = totalTokenCount; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal EmbeddingTokenUsage() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/FilePurpose.Serialization.cs b/.dotnet/src/Generated/Models/FilePurpose.Serialization.cs index 00250272c..2fed310a1 100644 --- a/.dotnet/src/Generated/Models/FilePurpose.Serialization.cs +++ b/.dotnet/src/Generated/Models/FilePurpose.Serialization.cs @@ -8,27 +8,48 @@ namespace OpenAI.Files { internal static partial class FilePurposeExtensions { - public static string ToSerialString(this FilePurpose value) => value switch + public static string ToSerialString(this Files.FilePurpose value) => value switch { - FilePurpose.Assistants => "assistants", - FilePurpose.AssistantsOutput => "assistants_output", - FilePurpose.Batch => "batch", - FilePurpose.BatchOutput => "batch_output", - FilePurpose.FineTune => "fine-tune", - FilePurpose.FineTuneResults => "fine-tune-results", - FilePurpose.Vision => "vision", + Files.FilePurpose.Assistants => "assistants", + Files.FilePurpose.AssistantsOutput => "assistants_output", + Files.FilePurpose.Batch => "batch", + Files.FilePurpose.BatchOutput => "batch_output", + Files.FilePurpose.FineTune => "fine-tune", + Files.FilePurpose.FineTuneResults => "fine-tune-results", + Files.FilePurpose.Vision => "vision", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FilePurpose value.") }; - public static FilePurpose ToFilePurpose(this string value) + public static Files.FilePurpose ToFilePurpose(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistants")) return FilePurpose.Assistants; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistants_output")) return FilePurpose.AssistantsOutput; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "batch")) return FilePurpose.Batch; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "batch_output")) return FilePurpose.BatchOutput; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "fine-tune")) return FilePurpose.FineTune; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "fine-tune-results")) return FilePurpose.FineTuneResults; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "vision")) return FilePurpose.Vision; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistants")) + { + return Files.FilePurpose.Assistants; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistants_output")) + { + return Files.FilePurpose.AssistantsOutput; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "batch")) + { + return Files.FilePurpose.Batch; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "batch_output")) + { + return Files.FilePurpose.BatchOutput; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "fine-tune")) + { + return Files.FilePurpose.FineTune; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "fine-tune-results")) + { + return Files.FilePurpose.FineTuneResults; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vision")) + { + return Files.FilePurpose.Vision; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FilePurpose value."); } } diff --git a/.dotnet/src/Generated/Models/FileStatus.Serialization.cs b/.dotnet/src/Generated/Models/FileStatus.Serialization.cs index cee9bafed..cf3193c9f 100644 --- a/.dotnet/src/Generated/Models/FileStatus.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileStatus.Serialization.cs @@ -8,19 +8,28 @@ namespace OpenAI.Files { internal static partial class FileStatusExtensions { - public static string ToSerialString(this FileStatus value) => value switch + public static string ToSerialString(this Files.FileStatus value) => value switch { - FileStatus.Uploaded => "uploaded", - FileStatus.Processed => "processed", - FileStatus.Error => "error", + Files.FileStatus.Uploaded => "uploaded", + Files.FileStatus.Processed => "processed", + Files.FileStatus.Error => "error", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FileStatus value.") }; - public static FileStatus ToFileStatus(this string value) + public static Files.FileStatus ToFileStatus(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "uploaded")) return FileStatus.Uploaded; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "processed")) return FileStatus.Processed; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) return FileStatus.Error; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "uploaded")) + { + return Files.FileStatus.Uploaded; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "processed")) + { + return Files.FileStatus.Processed; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) + { + return Files.FileStatus.Error; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FileStatus value."); } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 5ce2dae5b..7f71c939b 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -7,68 +7,95 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class FunctionChatMessage : IJsonModel { - FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal FunctionChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); } + else + { + writer.WriteNull("content"u8); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); + } + FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionChatMessage)JsonModelCreateCore(ref reader, options); + + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeFunctionChatMessage(document.RootElement, options); } - internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string content = default; + string functionName = default; + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = prop.Value.GetString(); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + functionName = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. - return new FunctionChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name); + return new FunctionChatMessage(content, functionName, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -78,15 +105,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - FunctionChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + FunctionChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FunctionChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeFunctionChatMessage(document.RootElement, options); } default: @@ -96,15 +124,16 @@ FunctionChatMessage IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new FunctionChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(FunctionChatMessage functionChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeFunctionChatMessage(document.RootElement); + return BinaryContent.Create(functionChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator FunctionChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFunctionChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index bb9deef10..9fbed4864 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -9,13 +9,12 @@ namespace OpenAI.Chat { public partial class FunctionChatMessage : ChatMessage { - internal FunctionChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string functionName) : base(role, content, serializedAdditionalRawData) + internal FunctionChatMessage(string content, string functionName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; FunctionName = functionName; } - internal FunctionChatMessage() - { - } + public string Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageFormat.cs b/.dotnet/src/Generated/Models/GeneratedImageFormat.cs index ff4ede1c5..8394364de 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageFormat.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageFormat.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { public readonly partial struct GeneratedImageFormat : IEquatable { private readonly string _value; + private const string UrlValue = "url"; + private const string B64JsonValue = "b64_json"; public GeneratedImageFormat(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string UriValue = "url"; - private const string BytesValue = "b64_json"; public static bool operator ==(GeneratedImageFormat left, GeneratedImageFormat right) => left.Equals(right); + public static bool operator !=(GeneratedImageFormat left, GeneratedImageFormat right) => !left.Equals(right); + public static implicit operator GeneratedImageFormat(string value) => new GeneratedImageFormat(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedImageFormat other && Equals(other); + public bool Equals(GeneratedImageFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageQuality.cs b/.dotnet/src/Generated/Models/GeneratedImageQuality.cs index fb53a9853..38cc000d2 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageQuality.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageQuality.cs @@ -4,32 +4,38 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { public readonly partial struct GeneratedImageQuality : IEquatable { private readonly string _value; + private const string StandardValue = "standard"; + private const string HdValue = "hd"; public GeneratedImageQuality(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string StandardValue = "standard"; - private const string HighValue = "hd"; + _value = value; + } public static GeneratedImageQuality Standard { get; } = new GeneratedImageQuality(StandardValue); + public static bool operator ==(GeneratedImageQuality left, GeneratedImageQuality right) => left.Equals(right); + public static bool operator !=(GeneratedImageQuality left, GeneratedImageQuality right) => !left.Equals(right); + public static implicit operator GeneratedImageQuality(string value) => new GeneratedImageQuality(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedImageQuality other && Equals(other); + public bool Equals(GeneratedImageQuality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageStyle.cs b/.dotnet/src/Generated/Models/GeneratedImageStyle.cs index 5a68da2bf..e29353355 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageStyle.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageStyle.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Images { public readonly partial struct GeneratedImageStyle : IEquatable { private readonly string _value; + private const string VividValue = "vivid"; + private const string NaturalValue = "natural"; public GeneratedImageStyle(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string VividValue = "vivid"; - private const string NaturalValue = "natural"; + _value = value; + } public static GeneratedImageStyle Vivid { get; } = new GeneratedImageStyle(VividValue); + public static GeneratedImageStyle Natural { get; } = new GeneratedImageStyle(NaturalValue); + public static bool operator ==(GeneratedImageStyle left, GeneratedImageStyle right) => left.Equals(right); + public static bool operator !=(GeneratedImageStyle left, GeneratedImageStyle right) => !left.Equals(right); + public static implicit operator GeneratedImageStyle(string value) => new GeneratedImageStyle(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is GeneratedImageStyle other && Equals(other); + public bool Equals(GeneratedImageStyle other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index 0595ecc63..766370b4c 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -15,106 +15,54 @@ public partial class ImageEditOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("image") != true) - { - writer.WritePropertyName("image"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Image); -#else - using (JsonDocument document = JsonDocument.Parse(Image)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true) - { - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - } - if (SerializedAdditionalRawData?.ContainsKey("mask") != true && Optional.IsDefined(Mask)) - { - writer.WritePropertyName("mask"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Mask); -#else - using (JsonDocument document = JsonDocument.Parse(Mask)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) - { - if (N != null) - { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); - } - else - { - writer.WriteNull("n"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) + if (Optional.IsDefined(Size)) { if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + writer.WriteObjectValue?>(Size, options); } else { - writer.WriteNull("size"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + writer.WriteObjectValue?>(ResponseFormat, options); } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -123,207 +71,90 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } - ImageEditOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageEditOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageEditOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageEditOptions(document.RootElement, options); } - internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData image = default; - string prompt = default; - BinaryData mask = default; - InternalCreateImageEditRequestModel? model = default; - long? n = default; - GeneratedImageSize? size = default; - GeneratedImageFormat? responseFormat = default; - string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Images.OpenAI.Images.GeneratedImageSize? size = default; + Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + string endUserId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("image"u8)) - { - image = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("prompt"u8)) - { - prompt = property.Value.GetString(); - continue; - } - if (property.NameEquals("mask"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mask = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageEditRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - n = null; - continue; - } - n = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("size"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { size = null; continue; } - size = new GeneratedImageSize(property.Value.GetString()); + size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = new GeneratedImageFormat(property.Value.GetString()); + responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ImageEditOptions( - image, - prompt, - mask, - model, - n, - size, - responseFormat, - user, - serializedAdditionalRawData); + return new ImageEditOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(Image, "image", "image"); - content.Add(Prompt, "prompt"); - if (Optional.IsDefined(Mask)) - { - content.Add(Mask, "mask", "mask"); - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - content.Add(Model.Value.ToString(), "model"); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - content.Add(N.Value, "n"); - } - } - if (Optional.IsDefined(Size)) - { - if (Size != null) - { - content.Add(Size.Value.ToString(), "size"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - content.Add(ResponseFormat.Value.ToString(), "response_format"); - } - } - if (Optional.IsDefined(EndUserId)) - { - content.Add(EndUserId, "user"); - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{options.Format}' format."); } } - ImageEditOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageEditOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageEditOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageEditOptions(document.RootElement, options); } default: @@ -331,17 +162,18 @@ ImageEditOptions IPersistableModel.Create(BinaryData data, Mod } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageEditOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageEditOptions imageEditOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageEditOptions(document.RootElement); + return BinaryContent.Create(imageEditOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageEditOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageEditOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index 7cd25a231..84862bb3d 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -11,7 +11,7 @@ public partial class ImageEditOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Size = size; ResponseFormat = responseFormat; diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index 386ee3b6a..7e7f1d014 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -14,48 +15,24 @@ public partial class ImageGenerationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("prompt") != true) - { - writer.WritePropertyName("prompt"u8); - writer.WriteStringValue(Prompt); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) - { - if (N != null) - { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); - } - else - { - writer.WriteNull("n"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("quality") != true && Optional.IsDefined(Quality)) + if (Optional.IsDefined(Quality)) { writer.WritePropertyName("quality"u8); writer.WriteStringValue(Quality.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { @@ -64,10 +41,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("response_format"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) + if (Optional.IsDefined(Size)) { if (Size != null) { @@ -76,10 +53,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("size"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("style") != true && Optional.IsDefined(Style)) + if (Optional.IsDefined(Style)) { if (Style != null) { @@ -88,25 +65,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } else { - writer.WriteNull("style"); + writer.WriteNull("style"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -115,133 +88,99 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } - ImageGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageGenerationOptions(document.RootElement, options); } - internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string prompt = default; - InternalCreateImageRequestModel? model = default; - long? n = default; GeneratedImageQuality? quality = default; GeneratedImageFormat? responseFormat = default; GeneratedImageSize? size = default; GeneratedImageStyle? style = default; - string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string endUserId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("prompt"u8)) - { - prompt = property.Value.GetString(); - continue; - } - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("n"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - n = null; - continue; - } - n = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("quality"u8)) + if (prop.NameEquals("quality"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + quality = null; continue; } - quality = new GeneratedImageQuality(property.Value.GetString()); + quality = new GeneratedImageQuality(prop.Value.GetString()); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = new GeneratedImageFormat(property.Value.GetString()); + responseFormat = new GeneratedImageFormat(prop.Value.GetString()); continue; } - if (property.NameEquals("size"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { size = null; continue; } - size = new GeneratedImageSize(property.Value.GetString()); + size = new GeneratedImageSize(prop.Value.GetString()); continue; } - if (property.NameEquals("style"u8)) + if (prop.NameEquals("style"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { style = null; continue; } - style = new GeneratedImageStyle(property.Value.GetString()); + style = new GeneratedImageStyle(prop.Value.GetString()); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ImageGenerationOptions( - prompt, - model, - n, quality, responseFormat, size, style, - user, - serializedAdditionalRawData); + endUserId, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -251,15 +190,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - ImageGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageGenerationOptions(document.RootElement, options); } default: @@ -269,15 +209,16 @@ ImageGenerationOptions IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageGenerationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageGenerationOptions imageGenerationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageGenerationOptions(document.RootElement); + return BinaryContent.Create(imageGenerationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageGenerationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageGenerationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index 24ef4046d..3fe9fc4f1 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -11,7 +11,7 @@ public partial class ImageGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageGenerationOptions(Images.GeneratedImageQuality? quality, Images.GeneratedImageFormat? responseFormat, GeneratedImageSize? size, Images.GeneratedImageStyle? style, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, string endUserId, IDictionary additionalBinaryDataProperties) { Quality = quality; ResponseFormat = responseFormat; @@ -21,12 +21,12 @@ internal ImageGenerationOptions(Images.GeneratedImageQuality? quality, Images.Ge _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public Images.GeneratedImageQuality? Quality { get; set; } + public GeneratedImageQuality? Quality { get; set; } - public Images.GeneratedImageFormat? ResponseFormat { get; set; } + public GeneratedImageFormat? ResponseFormat { get; set; } public GeneratedImageSize? Size { get; set; } - public Images.GeneratedImageStyle? Style { get; set; } + public GeneratedImageStyle? Style { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 38d3c0758..2615a1869 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -6,8 +6,8 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; +using OpenAI; namespace OpenAI.Images { @@ -15,89 +15,54 @@ public partial class ImageVariationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("image") != true) - { - writer.WritePropertyName("image"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Image); -#else - using (JsonDocument document = JsonDocument.Parse(Image)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.Value.ToString()); - } - else - { - writer.WriteNull("model"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("n") != true && Optional.IsDefined(N)) + if (Optional.IsDefined(Size)) { - if (N != null) + if (Size != null) { - writer.WritePropertyName("n"u8); - writer.WriteNumberValue(N.Value); + writer.WritePropertyName("size"u8); + writer.WriteObjectValue?>(Size, options); } else { - writer.WriteNull("n"); + writer.WriteNull("size"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); - } - else - { - writer.WriteNull("response_format"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("size") != true && Optional.IsDefined(Size)) - { - if (Size != null) - { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + writer.WriteObjectValue?>(ResponseFormat, options); } else { - writer.WriteNull("size"); + writer.WriteNull("responseFormat"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("user") != true && Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -106,184 +71,90 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } - ImageVariationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImageVariationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ImageVariationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeImageVariationOptions(document.RootElement, options); } - internal static ImageVariationOptions DeserializeImageVariationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImageVariationOptions DeserializeImageVariationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData image = default; - InternalCreateImageVariationRequestModel? model = default; - long? n = default; - GeneratedImageFormat? responseFormat = default; - GeneratedImageSize? size = default; - string user = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Images.OpenAI.Images.GeneratedImageSize? size = default; + Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + string endUserId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("image"u8)) - { - image = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = new InternalCreateImageVariationRequestModel(property.Value.GetString()); - continue; - } - if (property.NameEquals("n"u8)) + if (prop.NameEquals("size"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - n = null; + size = null; continue; } - n = property.Value.GetInt64(); + size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { responseFormat = null; continue; } - responseFormat = new GeneratedImageFormat(property.Value.GetString()); - continue; - } - if (property.NameEquals("size"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - size = null; - continue; - } - size = new GeneratedImageSize(property.Value.GetString()); + responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); continue; } - if (property.NameEquals("user"u8)) + if (prop.NameEquals("user"u8)) { - user = property.Value.GetString(); + endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ImageVariationOptions( - image, - model, - n, - responseFormat, - size, - user, - serializedAdditionalRawData); + return new ImageVariationOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(Image, "image", "image"); - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - content.Add(Model.Value.ToString(), "model"); - } - } - if (Optional.IsDefined(N)) - { - if (N != null) - { - content.Add(N.Value, "n"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - content.Add(ResponseFormat.Value.ToString(), "response_format"); - } - } - if (Optional.IsDefined(Size)) - { - if (Size != null) - { - content.Add(Size.Value.ToString(), "size"); - } - } - if (Optional.IsDefined(EndUserId)) - { - content.Add(EndUserId, "user"); - } - return content; - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{options.Format}' format."); } } - ImageVariationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ImageVariationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ImageVariationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeImageVariationOptions(document.RootElement, options); } default: @@ -291,17 +162,18 @@ ImageVariationOptions IPersistableModel.Create(BinaryData } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ImageVariationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ImageVariationOptions imageVariationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeImageVariationOptions(document.RootElement); + return BinaryContent.Create(imageVariationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ImageVariationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeImageVariationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 87a2f7ee7..ac34eb96f 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -11,7 +11,7 @@ public partial class ImageVariationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Size = size; ResponseFormat = responseFormat; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index df7e5fe73..5028ff4e7 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,34 +15,30 @@ internal partial class InternalChatCompletionMessageToolCallChunkFunction : IJso { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallChunkFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true && Optional.IsDefined(Arguments)) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("arguments"u8); - SerializeArgumentsValue(writer, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +47,54 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } - InternalChatCompletionMessageToolCallChunkFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionMessageToolCallChunkFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionMessageToolCallChunkFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallChunkFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, options); } - internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeInternalChatCompletionMessageToolCallChunkFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeInternalChatCompletionMessageToolCallChunkFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - BinaryData arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("arguments"u8)) - { - DeserializeArgumentsValue(property, ref arguments); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionMessageToolCallChunkFunction(name, arguments, serializedAdditionalRawData); + return new InternalChatCompletionMessageToolCallChunkFunction(name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +104,16 @@ BinaryData IPersistableModel } } - InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionMessageToolCallChunkFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, options); } default: @@ -130,15 +123,16 @@ InternalChatCompletionMessageToolCallChunkFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionMessageToolCallChunkFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallChunkFunction internalChatCompletionMessageToolCallChunkFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement); + return BinaryContent.Create(internalChatCompletionMessageToolCallChunkFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionMessageToolCallChunkFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionMessageToolCallChunkFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index 620712122..327b92396 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -9,18 +9,18 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallChunkFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalChatCompletionMessageToolCallChunkFunction() { } - internal InternalChatCompletionMessageToolCallChunkFunction(string name, BinaryData arguments, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionMessageToolCallChunkFunction(string name, IDictionary additionalBinaryDataProperties) { Name = name; - Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; } + public string Name { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index 3729b14b2..b61646930 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -7,41 +7,39 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction : IJsonModel { + internal InternalChatCompletionMessageToolCallFunction() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallFunction)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - SerializeArgumentsValue(writer, options); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +48,49 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } - InternalChatCompletionMessageToolCallFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionMessageToolCallFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionMessageToolCallFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallFunction)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, options); } - internal static InternalChatCompletionMessageToolCallFunction DeserializeInternalChatCompletionMessageToolCallFunction(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionMessageToolCallFunction DeserializeInternalChatCompletionMessageToolCallFunction(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - BinaryData arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (options.Format != "W") { - DeserializeArgumentsValue(property, ref arguments); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionMessageToolCallFunction(name, arguments, serializedAdditionalRawData); + return new InternalChatCompletionMessageToolCallFunction(name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +100,16 @@ BinaryData IPersistableModel.Writ } } - InternalChatCompletionMessageToolCallFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionMessageToolCallFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionMessageToolCallFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, options); } default: @@ -130,15 +119,16 @@ InternalChatCompletionMessageToolCallFunction IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionMessageToolCallFunction FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallFunction internalChatCompletionMessageToolCallFunction) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement); + return BinaryContent.Create(internalChatCompletionMessageToolCallFunction, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionMessageToolCallFunction(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionMessageToolCallFunction(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs index 88c406cb7..c3f2f0500 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs @@ -4,30 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction { - internal IDictionary SerializedAdditionalRawData { get; set; } - public InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments) + private protected IDictionary _additionalBinaryDataProperties; + + public InternalChatCompletionMessageToolCallFunction(string name) { Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); Name = name; - Arguments = arguments; } - internal InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionMessageToolCallFunction(string name, IDictionary additionalBinaryDataProperties) { Name = name; - Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalChatCompletionMessageToolCallFunction() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Name { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 024a984bc..647fe2493 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -7,75 +7,72 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage : IJsonModel { + internal InternalChatCompletionResponseMessage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) + if (Refusal != null) { - if (Content != null) - { - writer.WritePropertyName("content"u8); - SerializeContentValue(writer, options); - } - else - { - writer.WriteNull("content"); - } + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true) + else { - if (Refusal != null) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); - } - else - { - writer.WriteNull("refusal"); - } + writer.WriteNull("refusal"u8); } - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true && Optional.IsCollectionDefined(ToolCalls)) + if (Optional.IsCollectionDefined(ToolCalls)) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (ChatToolCall item in ToolCalls) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) + writer.WritePropertyName("role"u8); + writer.WriteNumberValue((int)Role); + if (Content != null) { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); + writer.WritePropertyName("content"u8); + writer.WriteObjectValue(Content, options); } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionCall)) + else + { + writer.WriteNull("content"u8); + } + if (Optional.IsDefined(FunctionCall)) { writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -84,102 +81,97 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } - InternalChatCompletionResponseMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionResponseMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionResponseMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } - internal static InternalChatCompletionResponseMessage DeserializeInternalChatCompletionResponseMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionResponseMessage DeserializeInternalChatCompletionResponseMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatMessageContent content = default; string refusal = default; - IReadOnlyList toolCalls = default; - ChatMessageRole role = default; + IList toolCalls = default; + Chat.ChatMessageRole role = default; + Chat.ChatMessageContent content = default; ChatFunctionCall functionCall = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("content"u8)) - { - DeserializeContentValue(property, ref content); - continue; - } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("refusal"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = null; continue; } - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) + { + role = prop.Value.GetInt32().ToChatMessageRole(); + continue; + } + if (prop.NameEquals("content"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + content = Chat.ChatMessageContent.DeserializeChatMessageContent(prop.Value, options); continue; } - if (property.NameEquals("function_call"u8)) + if (prop.NameEquals("function_call"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(property.Value, options); + functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. return new InternalChatCompletionResponseMessage( - content ?? new ChatMessageContent(), refusal, toolCalls ?? new ChangeTrackingList(), role, + content, functionCall, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -189,15 +181,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalChatCompletionResponseMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionResponseMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionResponseMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionResponseMessage(document.RootElement, options); } default: @@ -207,15 +200,16 @@ InternalChatCompletionResponseMessage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionResponseMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionResponseMessage internalChatCompletionResponseMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionResponseMessage(document.RootElement); + return BinaryContent.Create(internalChatCompletionResponseMessage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionResponseMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionResponseMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index 155c73932..a870f2607 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -4,33 +4,34 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalChatCompletionResponseMessage(ChatMessageContent content, string refusal) + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageRole role, Chat.ChatMessageContent content) { - Content = content; Refusal = refusal; ToolCalls = new ChangeTrackingList(); + Role = role; + Content = content; } - internal InternalChatCompletionResponseMessage(ChatMessageContent content, string refusal, IReadOnlyList toolCalls, ChatMessageRole role, ChatFunctionCall functionCall, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionResponseMessage(string refusal, IList toolCalls, Chat.ChatMessageRole role, Chat.ChatMessageContent content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) { - Content = content; Refusal = refusal; ToolCalls = toolCalls; Role = role; + Content = content; FunctionCall = functionCall; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalChatCompletionResponseMessage() - { - } - public string Refusal { get; } - public IReadOnlyList ToolCalls { get; } + public string Refusal { get; set; } + + public IList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index 919dcf8ef..b9fe1e71f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -7,41 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall : IJsonModel { + internal InternalChatCompletionResponseMessageFunctionCall() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +50,55 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } - InternalChatCompletionResponseMessageFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionResponseMessageFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionResponseMessageFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, options); } - internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInternalChatCompletionResponseMessageFunctionCall(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInternalChatCompletionResponseMessageFunctionCall(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; string arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string name = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("arguments"u8)) { - name = property.Value.GetString(); + arguments = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("name"u8)) { - arguments = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalChatCompletionResponseMessageFunctionCall(name, arguments, serializedAdditionalRawData); + return new InternalChatCompletionResponseMessageFunctionCall(arguments, name, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +108,16 @@ BinaryData IPersistableModel. } } - InternalChatCompletionResponseMessageFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionResponseMessageFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionResponseMessageFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, options); } default: @@ -130,15 +127,16 @@ InternalChatCompletionResponseMessageFunctionCall IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionResponseMessageFunctionCall FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionResponseMessageFunctionCall internalChatCompletionResponseMessageFunctionCall) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement); + return BinaryContent.Create(internalChatCompletionResponseMessageFunctionCall, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionResponseMessageFunctionCall(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionResponseMessageFunctionCall(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index 7eaa7f37d..657e6543e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -9,28 +9,23 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); + private protected IDictionary _additionalBinaryDataProperties; - Name = name; + internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name) + { Arguments = arguments; + Name = name; } - internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name, IDictionary additionalBinaryDataProperties) { - Name = name; Arguments = arguments; - SerializedAdditionalRawData = serializedAdditionalRawData; + Name = name; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalChatCompletionResponseMessageFunctionCall() - { - } + public string Arguments { get; set; } - public string Name { get; } - public string Arguments { get; } + public string Name { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index 4925803a5..cb750960b 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,47 +15,34 @@ internal partial class InternalChatCompletionStreamResponseDelta : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - // CUSTOM: Check inner collection is defined. - if (SerializedAdditionalRawData?.ContainsKey("content") != true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined()) - { - if (Content != null) - { - writer.WritePropertyName("content"u8); - SerializeContentValue(writer, options); - } - else - { - writer.WriteNull("content"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionCall)) + if (Optional.IsDefined(FunctionCall)) { writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true && Optional.IsCollectionDefined(ToolCalls)) + if (Optional.IsCollectionDefined(ToolCalls)) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); - foreach (var item in ToolCalls) + foreach (StreamingChatToolCallUpdate item in ToolCalls) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("role") != true && Optional.IsDefined(Role)) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.Value.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true && Optional.IsDefined(Refusal)) + if (Optional.IsDefined(Refusal)) { if (Refusal != null) { @@ -63,20 +51,33 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("refusal"); + writer.WriteNull("refusal"u8); } } - if (SerializedAdditionalRawData != null) + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteObjectValue?>(Role, options); + } + if (Optional.IsDefined(Content)) { - foreach (var item in SerializedAdditionalRawData) + if (Content != null) + { + writer.WritePropertyName("content"u8); + writer.WriteObjectValue(Content, options); + } + else + { + writer.WriteNull("content"u8); + } + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -85,106 +86,107 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } - InternalChatCompletionStreamResponseDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalChatCompletionStreamResponseDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalChatCompletionStreamResponseDelta JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } - internal static InternalChatCompletionStreamResponseDelta DeserializeInternalChatCompletionStreamResponseDelta(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalChatCompletionStreamResponseDelta DeserializeInternalChatCompletionStreamResponseDelta(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatMessageContent content = default; StreamingChatFunctionCallUpdate functionCall = default; - IReadOnlyList toolCalls = default; - ChatMessageRole? role = default; + IList toolCalls = default; string refusal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.OpenAI.Chat.ChatMessageRole? role = default; + Chat.ChatMessageContent content = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("content"u8)) + if (prop.NameEquals("function_call"u8)) { - DeserializeContentValue(property, ref content); - continue; - } - if (property.NameEquals("function_call"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + functionCall = null; continue; } - functionCall = StreamingChatFunctionCallUpdate.DeserializeStreamingChatFunctionCallUpdate(property.Value, options); + functionCall = StreamingChatFunctionCallUpdate.DeserializeStreamingChatFunctionCallUpdate(prop.Value, options); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(StreamingChatToolCallUpdate.DeserializeStreamingChatToolCallUpdate(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("refusal"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + refusal = null; continue; } - role = property.Value.GetString().ToChatMessageRole(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("role"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) + { + role = null; + continue; + } + role = Chat.OpenAI.Chat.ChatMessageRole?.DeserializeOpenAI.Chat.ChatMessageRole(prop.Value, options); + continue; + } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { - refusal = null; continue; } - refusal = property.Value.GetString(); + content = Chat.ChatMessageContent.DeserializeChatMessageContent(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. return new InternalChatCompletionStreamResponseDelta( - content ?? new ChatMessageContent(), functionCall, toolCalls ?? new ChangeTrackingList(), - role, refusal, - serializedAdditionalRawData); + role, + content, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -194,15 +196,16 @@ BinaryData IPersistableModel.Write(Mo } } - InternalChatCompletionStreamResponseDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalChatCompletionStreamResponseDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalChatCompletionStreamResponseDelta PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, options); } default: @@ -212,15 +215,16 @@ InternalChatCompletionStreamResponseDelta IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalChatCompletionStreamResponseDelta FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalChatCompletionStreamResponseDelta internalChatCompletionStreamResponseDelta) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement); + return BinaryContent.Create(internalChatCompletionStreamResponseDelta, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalChatCompletionStreamResponseDelta(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalChatCompletionStreamResponseDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index e2d4ae3ad..bfa229436 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -9,19 +9,22 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(ChatMessageContent content, StreamingChatFunctionCallUpdate functionCall, IReadOnlyList toolCalls, ChatMessageRole? role, string refusal, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.OpenAI.Chat.ChatMessageRole? role, Chat.ChatMessageContent content, IDictionary additionalBinaryDataProperties) { - Content = content; FunctionCall = functionCall; ToolCalls = toolCalls; - Role = role; Refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; + Role = role; + Content = content; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public StreamingChatFunctionCallUpdate FunctionCall { get; } - public IReadOnlyList ToolCalls { get; } - public string Refusal { get; } + + public StreamingChatFunctionCallUpdate FunctionCall { get; set; } + + public IList ToolCalls { get; } + + public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 23c976dc2..f472ace9c 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; using OpenAI.Chat; namespace OpenAI.FineTuning @@ -15,74 +16,26 @@ internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : I { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuneChatCompletionRequestAssistantMessage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("refusal") != true && Optional.IsDefined(Refusal)) - { - if (Refusal != null) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); - } - else - { - writer.WriteNull("refusal"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(ParticipantName)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(ParticipantName); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_calls") != true && Optional.IsCollectionDefined(ToolCalls)) - { - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("function_call") != true && Optional.IsDefined(FunctionCall)) - { - if (FunctionCall != null) - { - writer.WritePropertyName("function_call"u8); - writer.WriteObjectValue(FunctionCall, options); - } - else - { - writer.WriteNull("function_call"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); - } - // CUSTOM: Check inner collection is defined. - if (SerializedAdditionalRawData?.ContainsKey("content") != true && true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined()) - { - writer.WritePropertyName("content"u8); - SerializeContentValue(writer, options); - } - if (SerializedAdditionalRawData != null) + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -91,110 +44,100 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } - InternalFineTuneChatCompletionRequestAssistantMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalFineTuneChatCompletionRequestAssistantMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuneChatCompletionRequestAssistantMessage)JsonModelCreateCore(ref reader, options); + + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalFineTuneChatCompletionRequestAssistantMessage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, options); } - internal static InternalFineTuneChatCompletionRequestAssistantMessage DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalFineTuneChatCompletionRequestAssistantMessage DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string refusal = default; - string name = default; + string participantName = default; IList toolCalls = default; - ChatFunctionCall functionCall = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary additionalBinaryDataProperties0 = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("refusal"u8)) + if (prop.NameEquals("content"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("refusal"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { refusal = null; continue; } - refusal = property.Value.GetString(); + refusal = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + participantName = prop.Value.GetString(); continue; } - if (property.NameEquals("tool_calls"u8)) + if (prop.NameEquals("tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ChatToolCall.DeserializeChatToolCall(item, options)); } toolCalls = array; continue; } - if (property.NameEquals("function_call"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - functionCall = null; - continue; - } - functionCall = ChatFunctionCall.DeserializeChatFunctionCall(property.Value, options); - continue; - } - if (property.NameEquals("role"u8)) - { - role = property.Value.GetString().ToChatMessageRole(); - continue; - } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties0.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. return new InternalFineTuneChatCompletionRequestAssistantMessage( - role, - content ?? new ChatMessageContent(), - serializedAdditionalRawData, + content, refusal, - name, + participantName, toolCalls ?? new ChangeTrackingList(), - functionCall); + role, + additionalBinaryDataProperties, + additionalBinaryDataProperties0); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -204,15 +147,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalFineTuneChatCompletionRequestAssistantMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuneChatCompletionRequestAssistantMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, options); } default: @@ -222,15 +166,16 @@ InternalFineTuneChatCompletionRequestAssistantMessage IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new InternalFineTuneChatCompletionRequestAssistantMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalFineTuneChatCompletionRequestAssistantMessage internalFineTuneChatCompletionRequestAssistantMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement); + return BinaryContent.Create(internalFineTuneChatCompletionRequestAssistantMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator InternalFineTuneChatCompletionRequestAssistantMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalFineTuneChatCompletionRequestAssistantMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index f7041aa39..b34062bc1 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -10,12 +10,15 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : AssistantChatMessage { + private protected IDictionary _additionalBinaryDataProperties; + public InternalFineTuneChatCompletionRequestAssistantMessage() { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, serializedAdditionalRawData, refusal, participantName, toolCalls, functionCall) + internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties, IDictionary additionalBinaryDataProperties0) : base(content, refusal, participantName, toolCalls, role, additionalBinaryDataProperties) { + _additionalBinaryDataProperties = additionalBinaryDataProperties0; } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 1b62ce322..157026a3f 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -7,86 +7,59 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalModerationCategories : IJsonModel { + internal InternalModerationCategories() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModerationCategories)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("hate") != true) - { - writer.WritePropertyName("hate"u8); - writer.WriteBooleanValue(Hate); - } - if (SerializedAdditionalRawData?.ContainsKey("hate/threatening") != true) - { - writer.WritePropertyName("hate/threatening"u8); - writer.WriteBooleanValue(HateThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment") != true) - { - writer.WritePropertyName("harassment"u8); - writer.WriteBooleanValue(Harassment); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment/threatening") != true) - { - writer.WritePropertyName("harassment/threatening"u8); - writer.WriteBooleanValue(HarassmentThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm") != true) - { - writer.WritePropertyName("self-harm"u8); - writer.WriteBooleanValue(SelfHarm); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/intent") != true) - { - writer.WritePropertyName("self-harm/intent"u8); - writer.WriteBooleanValue(SelfHarmIntent); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/instructions") != true) - { - writer.WritePropertyName("self-harm/instructions"u8); - writer.WriteBooleanValue(SelfHarmInstructions); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual") != true) - { - writer.WritePropertyName("sexual"u8); - writer.WriteBooleanValue(Sexual); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual/minors") != true) - { - writer.WritePropertyName("sexual/minors"u8); - writer.WriteBooleanValue(SexualMinors); - } - if (SerializedAdditionalRawData?.ContainsKey("violence") != true) - { - writer.WritePropertyName("violence"u8); - writer.WriteBooleanValue(Violence); - } - if (SerializedAdditionalRawData?.ContainsKey("violence/graphic") != true) - { - writer.WritePropertyName("violence/graphic"u8); - writer.WriteBooleanValue(ViolenceGraphic); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + writer.WritePropertyName("hate"u8); + writer.WriteBooleanValue(Hate); + writer.WritePropertyName("hate/threatening"u8); + writer.WriteBooleanValue(HateThreatening); + writer.WritePropertyName("harassment"u8); + writer.WriteBooleanValue(Harassment); + writer.WritePropertyName("harassment/threatening"u8); + writer.WriteBooleanValue(HarassmentThreatening); + writer.WritePropertyName("self-harm"u8); + writer.WriteBooleanValue(SelfHarm); + writer.WritePropertyName("self-harm/intent"u8); + writer.WriteBooleanValue(SelfHarmIntent); + writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteBooleanValue(SelfHarmInstructions); + writer.WritePropertyName("sexual"u8); + writer.WriteBooleanValue(Sexual); + writer.WritePropertyName("sexual/minors"u8); + writer.WriteBooleanValue(SexualMinors); + writer.WritePropertyName("violence"u8); + writer.WriteBooleanValue(Violence); + writer.WritePropertyName("violence/graphic"u8); + writer.WriteBooleanValue(ViolenceGraphic); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,25 +68,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } - InternalModerationCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModerationCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModerationCategories JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModerationCategories)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModerationCategories(document.RootElement, options); } - internal static InternalModerationCategories DeserializeInternalModerationCategories(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModerationCategories DeserializeInternalModerationCategories(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -129,72 +100,69 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego bool sexualMinors = default; bool violence = default; bool violenceGraphic = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("hate"u8)) + if (prop.NameEquals("hate"u8)) { - hate = property.Value.GetBoolean(); + hate = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("hate/threatening"u8)) + if (prop.NameEquals("hate/threatening"u8)) { - hateThreatening = property.Value.GetBoolean(); + hateThreatening = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("harassment"u8)) + if (prop.NameEquals("harassment"u8)) { - harassment = property.Value.GetBoolean(); + harassment = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("harassment/threatening"u8)) + if (prop.NameEquals("harassment/threatening"u8)) { - harassmentThreatening = property.Value.GetBoolean(); + harassmentThreatening = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm"u8)) + if (prop.NameEquals("self-harm"u8)) { - selfHarm = property.Value.GetBoolean(); + selfHarm = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm/intent"u8)) + if (prop.NameEquals("self-harm/intent"u8)) { - selfHarmIntent = property.Value.GetBoolean(); + selfHarmIntent = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("self-harm/instructions"u8)) + if (prop.NameEquals("self-harm/instructions"u8)) { - selfHarmInstructions = property.Value.GetBoolean(); + selfHarmInstructions = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("sexual"u8)) + if (prop.NameEquals("sexual"u8)) { - sexual = property.Value.GetBoolean(); + sexual = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("sexual/minors"u8)) + if (prop.NameEquals("sexual/minors"u8)) { - sexualMinors = property.Value.GetBoolean(); + sexualMinors = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("violence"u8)) + if (prop.NameEquals("violence"u8)) { - violence = property.Value.GetBoolean(); + violence = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("violence/graphic"u8)) + if (prop.NameEquals("violence/graphic"u8)) { - violenceGraphic = property.Value.GetBoolean(); + violenceGraphic = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalModerationCategories( hate, hateThreatening, @@ -207,13 +175,14 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -223,15 +192,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrit } } - InternalModerationCategories IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModerationCategories IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModerationCategories PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModerationCategories(document.RootElement, options); } default: @@ -241,15 +211,16 @@ InternalModerationCategories IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModerationCategories FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModerationCategories internalModerationCategories) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModerationCategories(document.RootElement); + return BinaryContent.Create(internalModerationCategories, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModerationCategories(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModerationCategories(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.cs index 667823bac..761c97fca 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.cs @@ -9,7 +9,8 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategories { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { Hate = hate; @@ -25,7 +26,7 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara ViolenceGraphic = violenceGraphic; } - internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary serializedAdditionalRawData) + internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -38,23 +39,29 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara SexualMinors = sexualMinors; Violence = violence; ViolenceGraphic = violenceGraphic; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalModerationCategories() - { - } + public bool Hate { get; set; } + + public bool HateThreatening { get; set; } + + public bool Harassment { get; set; } + + public bool HarassmentThreatening { get; set; } + + public bool SelfHarm { get; set; } + + public bool SelfHarmIntent { get; set; } + + public bool SelfHarmInstructions { get; set; } + + public bool Sexual { get; set; } + + public bool SexualMinors { get; set; } + + public bool Violence { get; set; } - public bool Hate { get; } - public bool HateThreatening { get; } - public bool Harassment { get; } - public bool HarassmentThreatening { get; } - public bool SelfHarm { get; } - public bool SelfHarmIntent { get; } - public bool SelfHarmInstructions { get; } - public bool Sexual { get; } - public bool SexualMinors { get; } - public bool Violence { get; } - public bool ViolenceGraphic { get; } + public bool ViolenceGraphic { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index f822d1261..b1898c403 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -7,86 +7,59 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalModerationCategoryScores : IJsonModel { + internal InternalModerationCategoryScores() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModerationCategoryScores)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("hate") != true) - { - writer.WritePropertyName("hate"u8); - writer.WriteNumberValue(Hate); - } - if (SerializedAdditionalRawData?.ContainsKey("hate/threatening") != true) - { - writer.WritePropertyName("hate/threatening"u8); - writer.WriteNumberValue(HateThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment") != true) - { - writer.WritePropertyName("harassment"u8); - writer.WriteNumberValue(Harassment); - } - if (SerializedAdditionalRawData?.ContainsKey("harassment/threatening") != true) - { - writer.WritePropertyName("harassment/threatening"u8); - writer.WriteNumberValue(HarassmentThreatening); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm") != true) - { - writer.WritePropertyName("self-harm"u8); - writer.WriteNumberValue(SelfHarm); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/intent") != true) - { - writer.WritePropertyName("self-harm/intent"u8); - writer.WriteNumberValue(SelfHarmIntent); - } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/instructions") != true) - { - writer.WritePropertyName("self-harm/instructions"u8); - writer.WriteNumberValue(SelfHarmInstructions); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual") != true) - { - writer.WritePropertyName("sexual"u8); - writer.WriteNumberValue(Sexual); - } - if (SerializedAdditionalRawData?.ContainsKey("sexual/minors") != true) - { - writer.WritePropertyName("sexual/minors"u8); - writer.WriteNumberValue(SexualMinors); - } - if (SerializedAdditionalRawData?.ContainsKey("violence") != true) - { - writer.WritePropertyName("violence"u8); - writer.WriteNumberValue(Violence); - } - if (SerializedAdditionalRawData?.ContainsKey("violence/graphic") != true) - { - writer.WritePropertyName("violence/graphic"u8); - writer.WriteNumberValue(ViolenceGraphic); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + writer.WritePropertyName("hate"u8); + writer.WriteNumberValue(Hate); + writer.WritePropertyName("hate/threatening"u8); + writer.WriteNumberValue(HateThreatening); + writer.WritePropertyName("harassment"u8); + writer.WriteNumberValue(Harassment); + writer.WritePropertyName("harassment/threatening"u8); + writer.WriteNumberValue(HarassmentThreatening); + writer.WritePropertyName("self-harm"u8); + writer.WriteNumberValue(SelfHarm); + writer.WritePropertyName("self-harm/intent"u8); + writer.WriteNumberValue(SelfHarmIntent); + writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteNumberValue(SelfHarmInstructions); + writer.WritePropertyName("sexual"u8); + writer.WriteNumberValue(Sexual); + writer.WritePropertyName("sexual/minors"u8); + writer.WriteNumberValue(SexualMinors); + writer.WritePropertyName("violence"u8); + writer.WriteNumberValue(Violence); + writer.WritePropertyName("violence/graphic"u8); + writer.WriteNumberValue(ViolenceGraphic); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,25 +68,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } - InternalModerationCategoryScores IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalModerationCategoryScores IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalModerationCategoryScores JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalModerationCategoryScores)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalModerationCategoryScores(document.RootElement, options); } - internal static InternalModerationCategoryScores DeserializeInternalModerationCategoryScores(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalModerationCategoryScores DeserializeInternalModerationCategoryScores(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -129,72 +100,69 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa float sexualMinors = default; float violence = default; float violenceGraphic = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("hate"u8)) + if (prop.NameEquals("hate"u8)) { - hate = property.Value.GetSingle(); + hate = prop.Value.GetSingle(); continue; } - if (property.NameEquals("hate/threatening"u8)) + if (prop.NameEquals("hate/threatening"u8)) { - hateThreatening = property.Value.GetSingle(); + hateThreatening = prop.Value.GetSingle(); continue; } - if (property.NameEquals("harassment"u8)) + if (prop.NameEquals("harassment"u8)) { - harassment = property.Value.GetSingle(); + harassment = prop.Value.GetSingle(); continue; } - if (property.NameEquals("harassment/threatening"u8)) + if (prop.NameEquals("harassment/threatening"u8)) { - harassmentThreatening = property.Value.GetSingle(); + harassmentThreatening = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm"u8)) + if (prop.NameEquals("self-harm"u8)) { - selfHarm = property.Value.GetSingle(); + selfHarm = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm/intent"u8)) + if (prop.NameEquals("self-harm/intent"u8)) { - selfHarmIntent = property.Value.GetSingle(); + selfHarmIntent = prop.Value.GetSingle(); continue; } - if (property.NameEquals("self-harm/instructions"u8)) + if (prop.NameEquals("self-harm/instructions"u8)) { - selfHarmInstructions = property.Value.GetSingle(); + selfHarmInstructions = prop.Value.GetSingle(); continue; } - if (property.NameEquals("sexual"u8)) + if (prop.NameEquals("sexual"u8)) { - sexual = property.Value.GetSingle(); + sexual = prop.Value.GetSingle(); continue; } - if (property.NameEquals("sexual/minors"u8)) + if (prop.NameEquals("sexual/minors"u8)) { - sexualMinors = property.Value.GetSingle(); + sexualMinors = prop.Value.GetSingle(); continue; } - if (property.NameEquals("violence"u8)) + if (prop.NameEquals("violence"u8)) { - violence = property.Value.GetSingle(); + violence = prop.Value.GetSingle(); continue; } - if (property.NameEquals("violence/graphic"u8)) + if (prop.NameEquals("violence/graphic"u8)) { - violenceGraphic = property.Value.GetSingle(); + violenceGraphic = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalModerationCategoryScores( hate, hateThreatening, @@ -207,13 +175,14 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -223,15 +192,16 @@ BinaryData IPersistableModel.Write(ModelReader } } - InternalModerationCategoryScores IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalModerationCategoryScores IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalModerationCategoryScores PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalModerationCategoryScores(document.RootElement, options); } default: @@ -241,15 +211,16 @@ InternalModerationCategoryScores IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalModerationCategoryScores FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalModerationCategoryScores internalModerationCategoryScores) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalModerationCategoryScores(document.RootElement); + return BinaryContent.Create(internalModerationCategoryScores, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalModerationCategoryScores(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalModerationCategoryScores(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs index 7c4645562..da2eb119c 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs @@ -9,7 +9,8 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategoryScores { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) { Hate = hate; @@ -25,7 +26,7 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo ViolenceGraphic = violenceGraphic; } - internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary serializedAdditionalRawData) + internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -38,23 +39,29 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo SexualMinors = sexualMinors; Violence = violence; ViolenceGraphic = violenceGraphic; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalModerationCategoryScores() - { - } + public float Hate { get; set; } + + public float HateThreatening { get; set; } + + public float Harassment { get; set; } + + public float HarassmentThreatening { get; set; } + + public float SelfHarm { get; set; } + + public float SelfHarmIntent { get; set; } + + public float SelfHarmInstructions { get; set; } + + public float Sexual { get; set; } + + public float SexualMinors { get; set; } + + public float Violence { get; set; } - public float Hate { get; } - public float HateThreatening { get; } - public float Harassment { get; } - public float HarassmentThreatening { get; } - public float SelfHarm { get; } - public float SelfHarmIntent { get; } - public float SelfHarmInstructions { get; } - public float Sexual { get; } - public float SexualMinors { get; } - public float Violence { get; } - public float ViolenceGraphic { get; } + public float ViolenceGraphic { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs deleted file mode 100644 index a06386951..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestAssistantMessageItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestAssistantMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalRealtimeRequestAssistantMessageItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; - continue; - } - if (property.NameEquals("role"u8)) - { - role = new ConversationMessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestAssistantMessageItem( - type, - id, - serializedAdditionalRawData, - role, - status, - content); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestAssistantMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestAssistantMessageItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs deleted file mode 100644 index dd9526ceb..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestAssistantMessageItem : InternalRealtimeRequestMessageItem - { - public InternalRealtimeRequestAssistantMessageItem(IEnumerable content) - { - Argument.AssertNotNull(content, nameof(content)); - - Role = ConversationMessageRole.Assistant; - Content = content.ToList(); - } - - internal InternalRealtimeRequestAssistantMessageItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(type, id, serializedAdditionalRawData, role, status) - { - Content = content; - } - - internal InternalRealtimeRequestAssistantMessageItem() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs deleted file mode 100644 index b70b1c935..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestAudioContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("transcript") != true && Optional.IsDefined(Transcript)) - { - writer.WritePropertyName("transcript"u8); - writer.WriteStringValue(Transcript); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestAudioContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement, options); - } - - internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealtimeRequestAudioContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string transcript = default; - ConversationContentPartKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("transcript"u8)) - { - transcript = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationContentPartKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestAudioContentPart(type, serializedAdditionalRawData, transcript); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestAudioContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestAudioContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs deleted file mode 100644 index 06f2636b2..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestAudioContentPart : ConversationContentPart - { - public InternalRealtimeRequestAudioContentPart() - { - Type = ConversationContentPartKind.InputAudio; - } - - internal InternalRealtimeRequestAudioContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData, string transcript) : base(type, serializedAdditionalRawData) - { - Transcript = transcript; - } - - public string Transcript { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs deleted file mode 100644 index c07105652..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeRequestCommand))] - internal partial class InternalRealtimeRequestCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestCommand DeserializeInternalRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "conversation.item.create": return InternalRealtimeRequestItemCreateCommand.DeserializeInternalRealtimeRequestItemCreateCommand(element, options); - case "conversation.item.delete": return InternalRealtimeRequestItemDeleteCommand.DeserializeInternalRealtimeRequestItemDeleteCommand(element, options); - case "conversation.item.truncate": return InternalRealtimeRequestItemTruncateCommand.DeserializeInternalRealtimeRequestItemTruncateCommand(element, options); - case "input_audio_buffer.append": return InternalRealtimeRequestInputAudioBufferAppendCommand.DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(element, options); - case "input_audio_buffer.clear": return InternalRealtimeRequestInputAudioBufferClearCommand.DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(element, options); - case "input_audio_buffer.commit": return InternalRealtimeRequestInputAudioBufferCommitCommand.DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(element, options); - case "response.cancel": return InternalRealtimeRequestResponseCancelCommand.DeserializeInternalRealtimeRequestResponseCancelCommand(element, options); - case "response.create": return InternalRealtimeRequestResponseCreateCommand.DeserializeInternalRealtimeRequestResponseCreateCommand(element, options); - case "session.update": return InternalRealtimeRequestSessionUpdateCommand.DeserializeInternalRealtimeRequestSessionUpdateCommand(element, options); - } - } - return UnknownRealtimeRequestCommand.DeserializeUnknownRealtimeRequestCommand(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeRequestCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestCommand(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs deleted file mode 100644 index 9fd7fbd6b..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal abstract partial class InternalRealtimeRequestCommand - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRealtimeRequestCommand() - { - } - - internal InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData) - { - Kind = kind; - EventId = eventId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeRequestCommandType Kind { get; set; } - public string EventId { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs deleted file mode 100644 index b6e75ce49..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeRequestCommandType : IEquatable - { - private readonly string _value; - - public InternalRealtimeRequestCommandType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SessionUpdateValue = "session.update"; - private const string InputAudioBufferAppendValue = "input_audio_buffer.append"; - private const string InputAudioBufferCommitValue = "input_audio_buffer.commit"; - private const string InputAudioBufferClearValue = "input_audio_buffer.clear"; - private const string ItemCreateValue = "conversation.item.create"; - private const string ItemDeleteValue = "conversation.item.delete"; - private const string ItemTruncateValue = "conversation.item.truncate"; - private const string ResponseCreateValue = "response.create"; - private const string ResponseCancelValue = "response.cancel"; - - public static InternalRealtimeRequestCommandType SessionUpdate { get; } = new InternalRealtimeRequestCommandType(SessionUpdateValue); - public static InternalRealtimeRequestCommandType InputAudioBufferAppend { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferAppendValue); - public static InternalRealtimeRequestCommandType InputAudioBufferCommit { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferCommitValue); - public static InternalRealtimeRequestCommandType InputAudioBufferClear { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferClearValue); - public static InternalRealtimeRequestCommandType ItemCreate { get; } = new InternalRealtimeRequestCommandType(ItemCreateValue); - public static InternalRealtimeRequestCommandType ItemDelete { get; } = new InternalRealtimeRequestCommandType(ItemDeleteValue); - public static InternalRealtimeRequestCommandType ItemTruncate { get; } = new InternalRealtimeRequestCommandType(ItemTruncateValue); - public static InternalRealtimeRequestCommandType ResponseCreate { get; } = new InternalRealtimeRequestCommandType(ResponseCreateValue); - public static InternalRealtimeRequestCommandType ResponseCancel { get; } = new InternalRealtimeRequestCommandType(ResponseCancelValue); - public static bool operator ==(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => left.Equals(right); - public static bool operator !=(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => !left.Equals(right); - public static implicit operator InternalRealtimeRequestCommandType(string value) => new InternalRealtimeRequestCommandType(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeRequestCommandType other && Equals(other); - public bool Equals(InternalRealtimeRequestCommandType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs deleted file mode 100644 index b51551291..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ /dev/null @@ -1,199 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestFunctionCallItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestFunctionCallItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealtimeRequestFunctionCallItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string callId = default; - string arguments = default; - ConversationItemStatus? status = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestFunctionCallItem( - type, - id, - serializedAdditionalRawData, - name, - callId, - arguments, - status); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestFunctionCallItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestFunctionCallItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs deleted file mode 100644 index 74276e8fe..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs +++ /dev/null @@ -1,41 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestFunctionCallItem : ConversationItem - { - public InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(arguments, nameof(arguments)); - - Type = InternalRealtimeRequestItemType.FunctionCall; - Name = name; - CallId = callId; - Arguments = arguments; - } - - internal InternalRealtimeRequestFunctionCallItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, string name, string callId, string arguments, ConversationItemStatus? status) : base(type, id, serializedAdditionalRawData) - { - Name = name; - CallId = callId; - Arguments = arguments; - Status = status; - } - - internal InternalRealtimeRequestFunctionCallItem() - { - } - - public string Name { get; } - public string CallId { get; } - public string Arguments { get; } - public ConversationItemStatus? Status { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs deleted file mode 100644 index 9ec36d1d1..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestFunctionCallOutputItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("output") != true) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInternalRealtimeRequestFunctionCallOutputItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string callId = default; - string output = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output"u8)) - { - output = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestFunctionCallOutputItem(type, id, serializedAdditionalRawData, callId, output); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestFunctionCallOutputItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestFunctionCallOutputItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs deleted file mode 100644 index 263d8d388..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestFunctionCallOutputItem : ConversationItem - { - public InternalRealtimeRequestFunctionCallOutputItem(string callId, string output) - { - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(output, nameof(output)); - - Type = InternalRealtimeRequestItemType.FunctionCallOutput; - CallId = callId; - Output = output; - } - - internal InternalRealtimeRequestFunctionCallOutputItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, string callId, string output) : base(type, id, serializedAdditionalRawData) - { - CallId = callId; - Output = output; - } - - internal InternalRealtimeRequestFunctionCallOutputItem() - { - } - - public string CallId { get; } - public string Output { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs deleted file mode 100644 index ccf6cdaae..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferAppendCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("audio") != true) - { - writer.WritePropertyName("audio"u8); - writer.WriteBase64StringValue(Audio.ToArray(), "D"); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestInputAudioBufferAppendCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestInputAudioBufferAppendCommand DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BinaryData audio = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("audio"u8)) - { - audio = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestInputAudioBufferAppendCommand(type, eventId, serializedAdditionalRawData, audio); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestInputAudioBufferAppendCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestInputAudioBufferAppendCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs deleted file mode 100644 index 1def2c84c..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferAppendCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestInputAudioBufferAppendCommand(BinaryData audio) - { - Argument.AssertNotNull(audio, nameof(audio)); - - Kind = InternalRealtimeRequestCommandType.InputAudioBufferAppend; - Audio = audio; - } - - internal InternalRealtimeRequestInputAudioBufferAppendCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, BinaryData audio) : base(kind, eventId, serializedAdditionalRawData) - { - Audio = audio; - } - - internal InternalRealtimeRequestInputAudioBufferAppendCommand() - { - } - - public BinaryData Audio { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs deleted file mode 100644 index 62cde6232..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferClearCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestInputAudioBufferClearCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestInputAudioBufferClearCommand(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestInputAudioBufferClearCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestInputAudioBufferClearCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs deleted file mode 100644 index 8502e98a8..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs +++ /dev/null @@ -1,21 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferClearCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestInputAudioBufferClearCommand() - { - Kind = InternalRealtimeRequestCommandType.InputAudioBufferClear; - } - - internal InternalRealtimeRequestInputAudioBufferClearCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs deleted file mode 100644 index eff8f8871..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferCommitCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestInputAudioBufferCommitCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestInputAudioBufferCommitCommand DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestInputAudioBufferCommitCommand(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestInputAudioBufferCommitCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestInputAudioBufferCommitCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs deleted file mode 100644 index 5ed8421a0..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs +++ /dev/null @@ -1,21 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestInputAudioBufferCommitCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestInputAudioBufferCommitCommand() - { - Kind = InternalRealtimeRequestCommandType.InputAudioBufferCommit; - } - - internal InternalRealtimeRequestInputAudioBufferCommitCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs deleted file mode 100644 index 83e8754ba..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemCreateCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("previous_item_id") != true && Optional.IsDefined(PreviousItemId)) - { - writer.WritePropertyName("previous_item_id"u8); - writer.WriteStringValue(PreviousItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("item") != true) - { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(Item, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestItemCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalRealtimeRequestItemCreateCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string previousItemId = default; - ConversationItem item = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("previous_item_id"u8)) - { - previousItemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("item"u8)) - { - item = ConversationItem.DeserializeConversationItem(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestItemCreateCommand(type, eventId, serializedAdditionalRawData, previousItemId, item); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestItemCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestItemCreateCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs deleted file mode 100644 index 0c8650245..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemCreateCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestItemCreateCommand(ConversationItem item) - { - Argument.AssertNotNull(item, nameof(item)); - - Kind = InternalRealtimeRequestCommandType.ItemCreate; - Item = item; - } - - internal InternalRealtimeRequestItemCreateCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, string previousItemId, ConversationItem item) : base(kind, eventId, serializedAdditionalRawData) - { - PreviousItemId = previousItemId; - Item = item; - } - - internal InternalRealtimeRequestItemCreateCommand() - { - } - - public string PreviousItemId { get; set; } - public ConversationItem Item { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs deleted file mode 100644 index a16fa99d5..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemDeleteCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestItemDeleteCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalRealtimeRequestItemDeleteCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestItemDeleteCommand(type, eventId, serializedAdditionalRawData, itemId); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestItemDeleteCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestItemDeleteCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs deleted file mode 100644 index d98685fea..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemDeleteCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestItemDeleteCommand(string itemId) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = InternalRealtimeRequestCommandType.ItemDelete; - ItemId = itemId; - } - - internal InternalRealtimeRequestItemDeleteCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, string itemId) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - } - - internal InternalRealtimeRequestItemDeleteCommand() - { - } - - public string ItemId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs deleted file mode 100644 index 905f64da1..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemTruncateCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) - { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); - } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) - { - writer.WritePropertyName("content_index"u8); - writer.WriteNumberValue(ContentIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("audio_end_ms") != true) - { - writer.WritePropertyName("audio_end_ms"u8); - writer.WriteNumberValue(AudioEndMs); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestItemTruncateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRealtimeRequestItemTruncateCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string itemId = default; - int contentIndex = default; - int audioEndMs = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("item_id"u8)) - { - itemId = property.Value.GetString(); - continue; - } - if (property.NameEquals("content_index"u8)) - { - contentIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("audio_end_ms"u8)) - { - audioEndMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestItemTruncateCommand( - type, - eventId, - serializedAdditionalRawData, - itemId, - contentIndex, - audioEndMs); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestItemTruncateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestItemTruncateCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs deleted file mode 100644 index e867f7c35..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestItemTruncateCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestItemTruncateCommand(string itemId, int contentIndex, int audioEndMs) - { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = InternalRealtimeRequestCommandType.ItemTruncate; - ItemId = itemId; - ContentIndex = contentIndex; - AudioEndMs = audioEndMs; - } - - internal InternalRealtimeRequestItemTruncateCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, int contentIndex, int audioEndMs) : base(kind, eventId, serializedAdditionalRawData) - { - ItemId = itemId; - ContentIndex = contentIndex; - AudioEndMs = audioEndMs; - } - - internal InternalRealtimeRequestItemTruncateCommand() - { - } - - public string ItemId { get; } - public int ContentIndex { get; } - public int AudioEndMs { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs deleted file mode 100644 index 118aab7e3..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeRequestItemType : IEquatable - { - private readonly string _value; - - public InternalRealtimeRequestItemType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MessageValue = "message"; - private const string FunctionCallValue = "function_call"; - private const string FunctionCallOutputValue = "function_call_output"; - - public static InternalRealtimeRequestItemType Message { get; } = new InternalRealtimeRequestItemType(MessageValue); - public static InternalRealtimeRequestItemType FunctionCall { get; } = new InternalRealtimeRequestItemType(FunctionCallValue); - public static InternalRealtimeRequestItemType FunctionCallOutput { get; } = new InternalRealtimeRequestItemType(FunctionCallOutputValue); - public static bool operator ==(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => left.Equals(right); - public static bool operator !=(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => !left.Equals(right); - public static implicit operator InternalRealtimeRequestItemType(string value) => new InternalRealtimeRequestItemType(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeRequestItemType other && Equals(other); - public bool Equals(InternalRealtimeRequestItemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs deleted file mode 100644 index 41b65f714..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ /dev/null @@ -1,179 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestMessageItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRequestMessageItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("role", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "assistant": return InternalRealtimeRequestAssistantMessageItem.DeserializeInternalRealtimeRequestAssistantMessageItem(element, options); - case "system": return InternalRealtimeRequestSystemMessageItem.DeserializeInternalRealtimeRequestSystemMessageItem(element, options); - case "user": return InternalRealtimeRequestUserMessageItem.DeserializeInternalRealtimeRequestUserMessageItem(element, options); - } - } - ConversationMessageRole role = "message"; - ConversationItemStatus? status = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("role"u8)) - { - role = new ConversationMessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestMessageItem(type, id, serializedAdditionalRawData, role, status); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestMessageItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestMessageItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs deleted file mode 100644 index 5bba92cad..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs +++ /dev/null @@ -1,26 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestMessageItem : ConversationItem - { - public InternalRealtimeRequestMessageItem() - { - Role = new ConversationMessageRole("message"); - } - - internal InternalRealtimeRequestMessageItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, ConversationMessageRole role, ConversationItemStatus? status) : base(type, id, serializedAdditionalRawData) - { - Role = role; - Status = status; - } - - internal ConversationMessageRole Role { get; set; } - public ConversationItemStatus? Status { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs deleted file mode 100644 index b7759dca3..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeRequestModel : IEquatable - { - private readonly string _value; - - public InternalRealtimeRequestModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Gpt4oRealtimeValue = "gpt-4o-realtime"; - - public static InternalRealtimeRequestModel Gpt4oRealtime { get; } = new InternalRealtimeRequestModel(Gpt4oRealtimeValue); - public static bool operator ==(InternalRealtimeRequestModel left, InternalRealtimeRequestModel right) => left.Equals(right); - public static bool operator !=(InternalRealtimeRequestModel left, InternalRealtimeRequestModel right) => !left.Equals(right); - public static implicit operator InternalRealtimeRequestModel(string value) => new InternalRealtimeRequestModel(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeRequestModel other && Equals(other); - public bool Equals(InternalRealtimeRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs deleted file mode 100644 index 37f4c8d58..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCancelCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestResponseCancelCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternalRealtimeRequestResponseCancelCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestResponseCancelCommand(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestResponseCancelCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestResponseCancelCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs deleted file mode 100644 index cb8619e25..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs +++ /dev/null @@ -1,21 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCancelCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestResponseCancelCommand() - { - Kind = InternalRealtimeRequestCommandType.ResponseCancel; - } - - internal InternalRealtimeRequestResponseCancelCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs deleted file mode 100644 index 85dbea9cc..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCreateCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response") != true && Optional.IsDefined(Response)) - { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestResponseCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternalRealtimeRequestResponseCreateCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestResponseCreateCommandResponse response = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - response = InternalRealtimeRequestResponseCreateCommandResponse.DeserializeInternalRealtimeRequestResponseCreateCommandResponse(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestResponseCreateCommand(type, eventId, serializedAdditionalRawData, response); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestResponseCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestResponseCreateCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs deleted file mode 100644 index f165b617d..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCreateCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestResponseCreateCommand() - { - Kind = InternalRealtimeRequestCommandType.ResponseCreate; - } - - internal InternalRealtimeRequestResponseCreateCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeRequestResponseCreateCommandResponse response) : base(kind, eventId, serializedAdditionalRawData) - { - Response = response; - } - - public InternalRealtimeRequestResponseCreateCommandResponse Response { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs deleted file mode 100644 index 8c1a8332c..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs +++ /dev/null @@ -1,365 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCreateCommandResponse : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("commit") != true) - { - writer.WritePropertyName("commit"u8); - writer.WriteBooleanValue(Commit); - } - if (SerializedAdditionalRawData?.ContainsKey("cancel_previous") != true) - { - writer.WritePropertyName("cancel_previous"u8); - writer.WriteBooleanValue(CancelPrevious); - } - if (SerializedAdditionalRawData?.ContainsKey("append_input_items") != true && Optional.IsCollectionDefined(AppendInputItems)) - { - writer.WritePropertyName("append_input_items"u8); - writer.WriteStartArray(); - foreach (var item in AppendInputItems) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("input_items") != true && Optional.IsCollectionDefined(InputItems)) - { - writer.WritePropertyName("input_items"u8); - writer.WriteStartArray(); - foreach (var item in InputItems) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(Instructions)) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - if (SerializedAdditionalRawData?.ContainsKey("modalities") != true && Optional.IsCollectionDefined(Modalities)) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (var item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("voice") != true && Optional.IsDefined(Voice)) - { - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (SerializedAdditionalRawData?.ContainsKey("max_output_tokens") != true && Optional.IsDefined(MaxOutputTokens)) - { - if (MaxOutputTokens != null) - { - writer.WritePropertyName("max_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(MaxOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("max_output_tokens"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolChoice)) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("output_audio_format") != true && Optional.IsDefined(OutputAudioFormat)) - { - writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.Value.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestResponseCreateCommandResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, options); - } - - internal static InternalRealtimeRequestResponseCreateCommandResponse DeserializeInternalRealtimeRequestResponseCreateCommandResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool commit = default; - bool cancelPrevious = default; - IList appendInputItems = default; - IList inputItems = default; - string instructions = default; - IList modalities = default; - ConversationVoice? voice = default; - float? temperature = default; - BinaryData maxOutputTokens = default; - IList tools = default; - BinaryData toolChoice = default; - ConversationAudioFormat? outputAudioFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("commit"u8)) - { - commit = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("cancel_previous"u8)) - { - cancelPrevious = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("append_input_items"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationItem.DeserializeConversationItem(item, options)); - } - appendInputItems = array; - continue; - } - if (property.NameEquals("input_items"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationItem.DeserializeConversationItem(item, options)); - } - inputItems = array; - continue; - } - if (property.NameEquals("instructions"u8)) - { - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("modalities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); - } - modalities = array; - continue; - } - if (property.NameEquals("voice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - voice = new ConversationVoice(property.Value.GetString()); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_output_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxOutputTokens = null; - continue; - } - maxOutputTokens = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationTool.DeserializeConversationTool(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("output_audio_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputAudioFormat = new ConversationAudioFormat(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestResponseCreateCommandResponse( - commit, - cancelPrevious, - appendInputItems ?? new ChangeTrackingList(), - inputItems ?? new ChangeTrackingList(), - instructions, - modalities ?? new ChangeTrackingList(), - voice, - temperature, - maxOutputTokens, - tools ?? new ChangeTrackingList(), - toolChoice, - outputAudioFormat, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestResponseCreateCommandResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeRequestResponseCreateCommandResponse FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs deleted file mode 100644 index be05ac0db..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestResponseCreateCommandResponse - { - internal IDictionary SerializedAdditionalRawData { get; set; } - public InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious) - { - Commit = commit; - CancelPrevious = cancelPrevious; - AppendInputItems = new ChangeTrackingList(); - InputItems = new ChangeTrackingList(); - Modalities = new ChangeTrackingList(); - Tools = new ChangeTrackingList(); - } - - internal InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious, IList appendInputItems, IList inputItems, string instructions, IList modalities, ConversationVoice? voice, float? temperature, BinaryData maxOutputTokens, IList tools, BinaryData toolChoice, ConversationAudioFormat? outputAudioFormat, IDictionary serializedAdditionalRawData) - { - Commit = commit; - CancelPrevious = cancelPrevious; - AppendInputItems = appendInputItems; - InputItems = inputItems; - Instructions = instructions; - Modalities = modalities; - Voice = voice; - Temperature = temperature; - MaxOutputTokens = maxOutputTokens; - Tools = tools; - ToolChoice = toolChoice; - OutputAudioFormat = outputAudioFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeRequestResponseCreateCommandResponse() - { - } - - public bool Commit { get; } - public bool CancelPrevious { get; } - public IList AppendInputItems { get; } - public IList InputItems { get; } - public string Instructions { get; set; } - public IList Modalities { get; } - public ConversationVoice? Voice { get; set; } - public float? Temperature { get; set; } - public BinaryData MaxOutputTokens { get; set; } - public IList Tools { get; } - public BinaryData ToolChoice { get; set; } - public ConversationAudioFormat? OutputAudioFormat { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs deleted file mode 100644 index 1b97a5280..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestSessionUpdateCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("session") != true) - { - writer.WritePropertyName("session"u8); - writer.WriteObjectValue(Session, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestSessionUpdateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, options); - } - - internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalRealtimeRequestSessionUpdateCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationSessionOptions session = default; - InternalRealtimeRequestCommandType type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("session"u8)) - { - session = ConversationSessionOptions.DeserializeConversationSessionOptions(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestSessionUpdateCommand(type, eventId, serializedAdditionalRawData, session); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestSessionUpdateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestSessionUpdateCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs deleted file mode 100644 index d014ae106..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestSessionUpdateCommand : InternalRealtimeRequestCommand - { - public InternalRealtimeRequestSessionUpdateCommand(ConversationSessionOptions session) - { - Argument.AssertNotNull(session, nameof(session)); - - Kind = InternalRealtimeRequestCommandType.SessionUpdate; - Session = session; - } - - internal InternalRealtimeRequestSessionUpdateCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData, ConversationSessionOptions session) : base(kind, eventId, serializedAdditionalRawData) - { - Session = session; - } - - internal InternalRealtimeRequestSessionUpdateCommand() - { - } - - public ConversationSessionOptions Session { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs deleted file mode 100644 index 234800a29..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeRequestSessionUpdateCommandSessionModality : IEquatable - { - private readonly string _value; - - public InternalRealtimeRequestSessionUpdateCommandSessionModality(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TextValue = "text"; - private const string AudioValue = "audio"; - - public static InternalRealtimeRequestSessionUpdateCommandSessionModality Text { get; } = new InternalRealtimeRequestSessionUpdateCommandSessionModality(TextValue); - public static InternalRealtimeRequestSessionUpdateCommandSessionModality Audio { get; } = new InternalRealtimeRequestSessionUpdateCommandSessionModality(AudioValue); - public static bool operator ==(InternalRealtimeRequestSessionUpdateCommandSessionModality left, InternalRealtimeRequestSessionUpdateCommandSessionModality right) => left.Equals(right); - public static bool operator !=(InternalRealtimeRequestSessionUpdateCommandSessionModality left, InternalRealtimeRequestSessionUpdateCommandSessionModality right) => !left.Equals(right); - public static implicit operator InternalRealtimeRequestSessionUpdateCommandSessionModality(string value) => new InternalRealtimeRequestSessionUpdateCommandSessionModality(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeRequestSessionUpdateCommandSessionModality other && Equals(other); - public bool Equals(InternalRealtimeRequestSessionUpdateCommandSessionModality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs deleted file mode 100644 index e530bc5da..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestSystemMessageItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestSystemMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalRealtimeRequestSystemMessageItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; - continue; - } - if (property.NameEquals("role"u8)) - { - role = new ConversationMessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestSystemMessageItem( - type, - id, - serializedAdditionalRawData, - role, - status, - content); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestSystemMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestSystemMessageItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs deleted file mode 100644 index f2879fd19..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs +++ /dev/null @@ -1,30 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestSystemMessageItem : InternalRealtimeRequestMessageItem - { - public InternalRealtimeRequestSystemMessageItem(IEnumerable content) - { - Argument.AssertNotNull(content, nameof(content)); - - Role = ConversationMessageRole.System; - Content = content.ToList(); - } - - internal InternalRealtimeRequestSystemMessageItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(type, id, serializedAdditionalRawData, role, status) - { - Content = content; - } - - internal InternalRealtimeRequestSystemMessageItem() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs deleted file mode 100644 index 2398c8964..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestTextContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement, options); - } - - internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealtimeRequestTextContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string text = default; - ConversationContentPartKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationContentPartKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestTextContentPart(type, serializedAdditionalRawData, text); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestTextContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestTextContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs deleted file mode 100644 index 243370e65..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestTextContentPart : ConversationContentPart - { - public InternalRealtimeRequestTextContentPart(string text) - { - Argument.AssertNotNull(text, nameof(text)); - - Type = ConversationContentPartKind.InputText; - Text = text; - } - - internal InternalRealtimeRequestTextContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData, string text) : base(type, serializedAdditionalRawData) - { - Text = text; - } - - internal InternalRealtimeRequestTextContentPart() - { - } - - public string Text { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs deleted file mode 100644 index 42026d8ac..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestUserMessageItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("content") != true) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestUserMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement, options); - } - - internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealtimeRequestUserMessageItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; - continue; - } - if (property.NameEquals("role"u8)) - { - role = new ConversationMessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeRequestUserMessageItem( - type, - id, - serializedAdditionalRawData, - role, - status, - content); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestUserMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeRequestUserMessageItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs deleted file mode 100644 index 9fa213483..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs +++ /dev/null @@ -1,22 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeRequestUserMessageItem : InternalRealtimeRequestMessageItem - { - internal InternalRealtimeRequestUserMessageItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(type, id, serializedAdditionalRawData, role, status) - { - Content = content; - } - - internal InternalRealtimeRequestUserMessageItem() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs deleted file mode 100644 index 8c94b962f..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponse : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status_details") != true) - { - if (StatusDetails != null) - { - writer.WritePropertyName("status_details"u8); - writer.WriteObjectValue(StatusDetails, options); - } - else - { - writer.WriteNull("status_details"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("output") != true) - { - writer.WritePropertyName("output"u8); - writer.WriteStartArray(); - foreach (var item in Output) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponse(document.RootElement, options); - } - - internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseObject @object = default; - string id = default; - ConversationStatus status = default; - InternalRealtimeResponseStatusDetails statusDetails = default; - IReadOnlyList output = default; - ConversationTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new ConversationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("status_details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - statusDetails = null; - continue; - } - statusDetails = InternalRealtimeResponseStatusDetails.DeserializeInternalRealtimeResponseStatusDetails(property.Value, options); - continue; - } - if (property.NameEquals("output"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationItem.DeserializeConversationItem(item, options)); - } - output = array; - continue; - } - if (property.NameEquals("usage"u8)) - { - usage = ConversationTokenUsage.DeserializeConversationTokenUsage(property.Value, options); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponse( - @object, - id, - status, - statusDetails, - output, - usage, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponse FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponse(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs deleted file mode 100644 index 73cd76214..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponse - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalRealtimeResponse(string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, IEnumerable output, ConversationTokenUsage usage) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(output, nameof(output)); - Argument.AssertNotNull(usage, nameof(usage)); - - Id = id; - Status = status; - StatusDetails = statusDetails; - Output = output.ToList(); - Usage = usage; - } - - internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, IReadOnlyList output, ConversationTokenUsage usage, IDictionary serializedAdditionalRawData) - { - Object = @object; - Id = id; - Status = status; - StatusDetails = statusDetails; - Output = output; - Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeResponse() - { - } - - public InternalRealtimeResponseObject Object { get; } = InternalRealtimeResponseObject.RealtimeResponse; - - public string Id { get; } - public ConversationStatus Status { get; } - public InternalRealtimeResponseStatusDetails StatusDetails { get; } - public ConversationTokenUsage Usage { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs deleted file mode 100644 index fc4fc5e8e..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseApiError : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData?.ContainsKey("code") != true && Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData?.ContainsKey("param") != true && Optional.IsDefined(Param)) - { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseApiError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseApiError(document.RootElement, options); - } - - internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResponseApiError(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string code = default; - string message = default; - string param = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("param"u8)) - { - param = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseApiError(type, code, message, param, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseApiError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseApiError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponseApiError FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseApiError(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs deleted file mode 100644 index 337315fb8..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs +++ /dev/null @@ -1,40 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseApiError - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalRealtimeResponseApiError(string type, string message) - { - Argument.AssertNotNull(type, nameof(type)); - Argument.AssertNotNull(message, nameof(message)); - - Type = type; - Message = message; - } - - internal InternalRealtimeResponseApiError(string type, string code, string message, string param, IDictionary serializedAdditionalRawData) - { - Type = type; - Code = code; - Message = message; - Param = param; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeResponseApiError() - { - } - - public string Type { get; } - public string Code { get; } - public string Message { get; } - public string Param { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs deleted file mode 100644 index 8324139d0..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseAudioContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("transcript") != true) - { - if (Transcript != null) - { - writer.WritePropertyName("transcript"u8); - writer.WriteStringValue(Transcript); - } - else - { - writer.WriteNull("transcript"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseAudioContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement, options); - } - - internal static InternalRealtimeResponseAudioContentPart DeserializeInternalRealtimeResponseAudioContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string transcript = default; - ConversationContentPartKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("transcript"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - transcript = null; - continue; - } - transcript = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationContentPartKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseAudioContentPart(type, serializedAdditionalRawData, transcript); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseAudioContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseAudioContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs deleted file mode 100644 index 076fe2b0e..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseAudioContentPart : ConversationContentPart - { - internal InternalRealtimeResponseAudioContentPart(string transcript) - { - Type = ConversationContentPartKind.Audio; - Transcript = transcript; - } - - internal InternalRealtimeResponseAudioContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData, string transcript) : base(type, serializedAdditionalRawData) - { - Transcript = transcript; - } - - internal InternalRealtimeResponseAudioContentPart() - { - } - - public string Transcript { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs deleted file mode 100644 index bd29cb9f7..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseCancelledStatusDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reason") != true) - { - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseCancelledStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, options); - } - - internal static InternalRealtimeResponseCancelledStatusDetails DeserializeInternalRealtimeResponseCancelledStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseCancelledStatusDetailsReason reason = default; - ConversationStatus type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("reason"u8)) - { - reason = new InternalRealtimeResponseCancelledStatusDetailsReason(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationStatus(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseCancelledStatusDetails(type, serializedAdditionalRawData, reason); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseCancelledStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseCancelledStatusDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs deleted file mode 100644 index 054b0e850..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseCancelledStatusDetails : InternalRealtimeResponseStatusDetails - { - internal InternalRealtimeResponseCancelledStatusDetails(InternalRealtimeResponseCancelledStatusDetailsReason reason) - { - Type = ConversationStatus.Cancelled; - Reason = reason; - } - - internal InternalRealtimeResponseCancelledStatusDetails(ConversationStatus type, IDictionary serializedAdditionalRawData, InternalRealtimeResponseCancelledStatusDetailsReason reason) : base(type, serializedAdditionalRawData) - { - Reason = reason; - } - - internal InternalRealtimeResponseCancelledStatusDetails() - { - } - - public InternalRealtimeResponseCancelledStatusDetailsReason Reason { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs deleted file mode 100644 index 00bb14ba5..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeResponseCancelledStatusDetailsReason : IEquatable - { - private readonly string _value; - - public InternalRealtimeResponseCancelledStatusDetailsReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TurnDetectedValue = "turn_detected"; - private const string ClientCancelledValue = "client_cancelled"; - - public static InternalRealtimeResponseCancelledStatusDetailsReason TurnDetected { get; } = new InternalRealtimeResponseCancelledStatusDetailsReason(TurnDetectedValue); - public static InternalRealtimeResponseCancelledStatusDetailsReason ClientCancelled { get; } = new InternalRealtimeResponseCancelledStatusDetailsReason(ClientCancelledValue); - public static bool operator ==(InternalRealtimeResponseCancelledStatusDetailsReason left, InternalRealtimeResponseCancelledStatusDetailsReason right) => left.Equals(right); - public static bool operator !=(InternalRealtimeResponseCancelledStatusDetailsReason left, InternalRealtimeResponseCancelledStatusDetailsReason right) => !left.Equals(right); - public static implicit operator InternalRealtimeResponseCancelledStatusDetailsReason(string value) => new InternalRealtimeResponseCancelledStatusDetailsReason(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeResponseCancelledStatusDetailsReason other && Equals(other); - public bool Equals(InternalRealtimeResponseCancelledStatusDetailsReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs deleted file mode 100644 index 2d2473b76..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseError : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (SerializedAdditionalRawData?.ContainsKey("code") != true && Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - if (SerializedAdditionalRawData?.ContainsKey("message") != true) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (SerializedAdditionalRawData?.ContainsKey("param") != true && Optional.IsDefined(Param)) - { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseError(document.RootElement, options); - } - - internal static InternalRealtimeResponseError DeserializeInternalRealtimeResponseError(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - string code = default; - string message = default; - string param = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("param"u8)) - { - param = property.Value.GetString(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseError( - type, - code, - message, - param, - eventId, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponseError FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseError(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs deleted file mode 100644 index c2fec5fd4..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseError - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalRealtimeResponseError(string type, string message) - { - Argument.AssertNotNull(type, nameof(type)); - Argument.AssertNotNull(message, nameof(message)); - - Type = type; - Message = message; - } - - internal InternalRealtimeResponseError(string type, string code, string message, string param, string eventId, IDictionary serializedAdditionalRawData) - { - Type = type; - Code = code; - Message = message; - Param = param; - EventId = eventId; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeResponseError() - { - } - - public string Type { get; } - public string Code { get; } - public string Message { get; } - public string Param { get; } - public string EventId { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs deleted file mode 100644 index 0f63fd37b..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseFunctionCallItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - if (Id != null) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - else - { - writer.WriteNull("id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseFunctionCallItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement, options); - } - - internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalRealtimeResponseFunctionCallItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string callId = default; - string arguments = default; - ConversationItemStatus status = default; - InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseItemObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseFunctionCallItem( - @object, - type, - id, - serializedAdditionalRawData, - name, - callId, - arguments, - status); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseFunctionCallItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseFunctionCallItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs deleted file mode 100644 index 98a28e33a..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseFunctionCallItem : InternalRealtimeResponseItem - { - internal InternalRealtimeResponseFunctionCallItem(string id, string name, string callId, string arguments, ConversationItemStatus status) : base(id) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(arguments, nameof(arguments)); - - Type = InternalRealtimeRequestItemType.FunctionCall; - Name = name; - CallId = callId; - Arguments = arguments; - Status = status; - } - - internal InternalRealtimeResponseFunctionCallItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, string name, string callId, string arguments, ConversationItemStatus status) : base(@object, type, id, serializedAdditionalRawData) - { - Name = name; - CallId = callId; - Arguments = arguments; - Status = status; - } - - internal InternalRealtimeResponseFunctionCallItem() - { - } - - public string Name { get; } - public string CallId { get; } - public string Arguments { get; } - public ConversationItemStatus Status { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs deleted file mode 100644 index a995663e2..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseFunctionCallOutputItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("call_id") != true) - { - writer.WritePropertyName("call_id"u8); - writer.WriteStringValue(CallId); - } - if (SerializedAdditionalRawData?.ContainsKey("output") != true) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - if (Id != null) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - else - { - writer.WriteNull("id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement, options); - } - - internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeInternalRealtimeResponseFunctionCallOutputItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string callId = default; - string output = default; - InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("call_id"u8)) - { - callId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output"u8)) - { - output = property.Value.GetString(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseItemObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseFunctionCallOutputItem( - @object, - type, - id, - serializedAdditionalRawData, - callId, - output); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseFunctionCallOutputItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseFunctionCallOutputItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs deleted file mode 100644 index ae62c1e28..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseFunctionCallOutputItem : InternalRealtimeResponseItem - { - internal InternalRealtimeResponseFunctionCallOutputItem(string id, string callId, string output) : base(id) - { - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(output, nameof(output)); - - Type = InternalRealtimeRequestItemType.FunctionCallOutput; - CallId = callId; - Output = output; - } - - internal InternalRealtimeResponseFunctionCallOutputItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, string callId, string output) : base(@object, type, id, serializedAdditionalRawData) - { - CallId = callId; - Output = output; - } - - internal InternalRealtimeResponseFunctionCallOutputItem() - { - } - - public string CallId { get; } - public string Output { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs deleted file mode 100644 index f1030c8cb..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseIncompleteStatusDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reason") != true) - { - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseIncompleteStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, options); - } - - internal static InternalRealtimeResponseIncompleteStatusDetails DeserializeInternalRealtimeResponseIncompleteStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseIncompleteStatusDetailsReason reason = default; - ConversationStatus type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("reason"u8)) - { - reason = new InternalRealtimeResponseIncompleteStatusDetailsReason(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationStatus(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseIncompleteStatusDetails(type, serializedAdditionalRawData, reason); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseIncompleteStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseIncompleteStatusDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs deleted file mode 100644 index 24b55f81c..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseIncompleteStatusDetails : InternalRealtimeResponseStatusDetails - { - internal InternalRealtimeResponseIncompleteStatusDetails(InternalRealtimeResponseIncompleteStatusDetailsReason reason) - { - Type = ConversationStatus.Incomplete; - Reason = reason; - } - - internal InternalRealtimeResponseIncompleteStatusDetails(ConversationStatus type, IDictionary serializedAdditionalRawData, InternalRealtimeResponseIncompleteStatusDetailsReason reason) : base(type, serializedAdditionalRawData) - { - Reason = reason; - } - - internal InternalRealtimeResponseIncompleteStatusDetails() - { - } - - public InternalRealtimeResponseIncompleteStatusDetailsReason Reason { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs deleted file mode 100644 index 9bf8c7d63..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeResponseIncompleteStatusDetailsReason : IEquatable - { - private readonly string _value; - - public InternalRealtimeResponseIncompleteStatusDetailsReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MaxOutputTokensValue = "max_output_tokens"; - private const string ContentFilterValue = "content_filter"; - - public static InternalRealtimeResponseIncompleteStatusDetailsReason MaxOutputTokens { get; } = new InternalRealtimeResponseIncompleteStatusDetailsReason(MaxOutputTokensValue); - public static InternalRealtimeResponseIncompleteStatusDetailsReason ContentFilter { get; } = new InternalRealtimeResponseIncompleteStatusDetailsReason(ContentFilterValue); - public static bool operator ==(InternalRealtimeResponseIncompleteStatusDetailsReason left, InternalRealtimeResponseIncompleteStatusDetailsReason right) => left.Equals(right); - public static bool operator !=(InternalRealtimeResponseIncompleteStatusDetailsReason left, InternalRealtimeResponseIncompleteStatusDetailsReason right) => !left.Equals(right); - public static implicit operator InternalRealtimeResponseIncompleteStatusDetailsReason(string value) => new InternalRealtimeResponseIncompleteStatusDetailsReason(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeResponseIncompleteStatusDetailsReason other && Equals(other); - public bool Equals(InternalRealtimeResponseIncompleteStatusDetailsReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs deleted file mode 100644 index 3301880e3..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeResponseItem))] - internal partial class InternalRealtimeResponseItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - if (Id != null) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - else - { - writer.WriteNull("id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseItem(document.RootElement, options); - } - - internal static InternalRealtimeResponseItem DeserializeInternalRealtimeResponseItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "function_call": return InternalRealtimeResponseFunctionCallItem.DeserializeInternalRealtimeResponseFunctionCallItem(element, options); - case "function_call_output": return InternalRealtimeResponseFunctionCallOutputItem.DeserializeInternalRealtimeResponseFunctionCallOutputItem(element, options); - case "message": return InternalRealtimeResponseMessageItem.DeserializeInternalRealtimeResponseMessageItem(element, options); - } - } - return UnknownRealtimeResponseItem.DeserializeUnknownRealtimeResponseItem(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponseItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseItem(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs deleted file mode 100644 index 9a04f907c..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal abstract partial class InternalRealtimeResponseItem - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRealtimeResponseItem(string id) - { - Id = id; - } - - internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData) - { - Object = @object; - Type = type; - Id = id; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeResponseItem() - { - } - - public InternalRealtimeResponseItemObject Object { get; } = InternalRealtimeResponseItemObject.RealtimeItem; - - internal InternalRealtimeRequestItemType Type { get; set; } - public string Id { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs deleted file mode 100644 index fed455fcd..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeResponseItemObject : IEquatable - { - private readonly string _value; - - public InternalRealtimeResponseItemObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RealtimeItemValue = "realtime.item"; - - public static InternalRealtimeResponseItemObject RealtimeItem { get; } = new InternalRealtimeResponseItemObject(RealtimeItemValue); - public static bool operator ==(InternalRealtimeResponseItemObject left, InternalRealtimeResponseItemObject right) => left.Equals(right); - public static bool operator !=(InternalRealtimeResponseItemObject left, InternalRealtimeResponseItemObject right) => !left.Equals(right); - public static implicit operator InternalRealtimeResponseItemObject(string value) => new InternalRealtimeResponseItemObject(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeResponseItemObject other && Equals(other); - public bool Equals(InternalRealtimeResponseItemObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs deleted file mode 100644 index b8feb0ab3..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseMessageItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("role") != true) - { - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("content") != true) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - if (Id != null) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - else - { - writer.WriteNull("id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseMessageItem(document.RootElement, options); - } - - internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeResponseMessageItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationMessageRole role = default; - IReadOnlyList content = default; - ConversationItemStatus status = default; - InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("role"u8)) - { - role = new ConversationMessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; - continue; - } - if (property.NameEquals("status"u8)) - { - status = new ConversationItemStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseItemObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseMessageItem( - @object, - type, - id, - serializedAdditionalRawData, - role, - content, - status); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseMessageItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseMessageItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseMessageItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs deleted file mode 100644 index 510f6505b..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseMessageItem : InternalRealtimeResponseItem - { - internal InternalRealtimeResponseMessageItem(string id, ConversationMessageRole role, IEnumerable content, ConversationItemStatus status) : base(id) - { - Argument.AssertNotNull(content, nameof(content)); - - Type = InternalRealtimeRequestItemType.Message; - Role = role; - Content = content.ToList(); - Status = status; - } - - internal InternalRealtimeResponseMessageItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData, ConversationMessageRole role, IReadOnlyList content, ConversationItemStatus status) : base(@object, type, id, serializedAdditionalRawData) - { - Role = role; - Content = content; - Status = status; - } - - internal InternalRealtimeResponseMessageItem() - { - } - public IReadOnlyList Content { get; } - public ConversationItemStatus Status { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs deleted file mode 100644 index 66f2080fc..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeResponseObject : IEquatable - { - private readonly string _value; - - public InternalRealtimeResponseObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RealtimeResponseValue = "realtime.response"; - - public static InternalRealtimeResponseObject RealtimeResponse { get; } = new InternalRealtimeResponseObject(RealtimeResponseValue); - public static bool operator ==(InternalRealtimeResponseObject left, InternalRealtimeResponseObject right) => left.Equals(right); - public static bool operator !=(InternalRealtimeResponseObject left, InternalRealtimeResponseObject right) => !left.Equals(right); - public static implicit operator InternalRealtimeResponseObject(string value) => new InternalRealtimeResponseObject(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeResponseObject other && Equals(other); - public bool Equals(InternalRealtimeResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs deleted file mode 100644 index 1388cbabc..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ /dev/null @@ -1,349 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseSession : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (SerializedAdditionalRawData?.ContainsKey("modalities") != true) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (var item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - if (SerializedAdditionalRawData?.ContainsKey("voice") != true) - { - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("input_audio_format") != true) - { - writer.WritePropertyName("input_audio_format"u8); - writer.WriteStringValue(InputAudioFormat.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("output_audio_format") != true) - { - writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("input_audio_transcription") != true) - { - if (InputAudioTranscription != null) - { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputAudioTranscription, options); - } - else - { - writer.WriteNull("input_audio_transcription"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("turn_detection") != true) - { - writer.WritePropertyName("turn_detection"u8); - writer.WriteObjectValue(TurnDetection, options); - } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature); - } - if (SerializedAdditionalRawData?.ContainsKey("max_response_output_tokens") != true) - { - if (_maxResponseOutputTokens != null) - { - writer.WritePropertyName("max_response_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_maxResponseOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("max_response_output_tokens"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseSession(document.RootElement, options); - } - - internal static InternalRealtimeResponseSession DeserializeInternalRealtimeResponseSession(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseSessionObject @object = default; - string id = default; - string model = default; - IReadOnlyList modalities = default; - string instructions = default; - ConversationVoice voice = default; - ConversationAudioFormat inputAudioFormat = default; - ConversationAudioFormat outputAudioFormat = default; - ConversationInputTranscriptionOptions inputAudioTranscription = default; - ConversationTurnDetectionOptions turnDetection = default; - IReadOnlyList tools = default; - BinaryData toolChoice = default; - float temperature = default; - BinaryData maxResponseOutputTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseSessionObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("modalities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); - } - modalities = array; - continue; - } - if (property.NameEquals("instructions"u8)) - { - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("voice"u8)) - { - voice = new ConversationVoice(property.Value.GetString()); - continue; - } - if (property.NameEquals("input_audio_format"u8)) - { - inputAudioFormat = new ConversationAudioFormat(property.Value.GetString()); - continue; - } - if (property.NameEquals("output_audio_format"u8)) - { - outputAudioFormat = new ConversationAudioFormat(property.Value.GetString()); - continue; - } - if (property.NameEquals("input_audio_transcription"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - inputAudioTranscription = null; - continue; - } - inputAudioTranscription = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(property.Value, options); - continue; - } - if (property.NameEquals("turn_detection"u8)) - { - turnDetection = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(property.Value, options); - continue; - } - if (property.NameEquals("tools"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationTool.DeserializeConversationTool(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("temperature"u8)) - { - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_response_output_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxResponseOutputTokens = null; - continue; - } - maxResponseOutputTokens = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseSession( - @object, - id, - model, - modalities, - instructions, - voice, - inputAudioFormat, - outputAudioFormat, - inputAudioTranscription, - turnDetection, - tools, - toolChoice, - temperature, - maxResponseOutputTokens, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseSession IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseSession(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponseSession FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseSession(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs deleted file mode 100644 index a35d2544b..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseSession - { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(model, nameof(model)); - Argument.AssertNotNull(modalities, nameof(modalities)); - Argument.AssertNotNull(instructions, nameof(instructions)); - Argument.AssertNotNull(turnDetection, nameof(turnDetection)); - Argument.AssertNotNull(tools, nameof(tools)); - Argument.AssertNotNull(toolChoice, nameof(toolChoice)); - - Id = id; - Model = model; - Modalities = modalities.ToList(); - Instructions = instructions; - Voice = voice; - InputAudioFormat = inputAudioFormat; - OutputAudioFormat = outputAudioFormat; - InputAudioTranscription = inputAudioTranscription; - TurnDetection = turnDetection; - Tools = tools.ToList(); - ToolChoice = toolChoice; - Temperature = temperature; - _maxResponseOutputTokens = maxResponseOutputTokens; - } - - internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IReadOnlyList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IReadOnlyList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary serializedAdditionalRawData) - { - Object = @object; - Id = id; - Model = model; - Modalities = modalities; - Instructions = instructions; - Voice = voice; - InputAudioFormat = inputAudioFormat; - OutputAudioFormat = outputAudioFormat; - InputAudioTranscription = inputAudioTranscription; - TurnDetection = turnDetection; - Tools = tools; - ToolChoice = toolChoice; - Temperature = temperature; - _maxResponseOutputTokens = maxResponseOutputTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeResponseSession() - { - } - - public InternalRealtimeResponseSessionObject Object { get; } = InternalRealtimeResponseSessionObject.RealtimeSession; - - public string Id { get; } - public string Model { get; } - public IReadOnlyList Modalities { get; } - public string Instructions { get; } - public ConversationVoice Voice { get; } - public ConversationAudioFormat InputAudioFormat { get; } - public ConversationAudioFormat OutputAudioFormat { get; } - public ConversationInputTranscriptionOptions InputAudioTranscription { get; } - public ConversationTurnDetectionOptions TurnDetection { get; } - public IReadOnlyList Tools { get; } - public BinaryData ToolChoice { get; } - public float Temperature { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs deleted file mode 100644 index 0ebab772a..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs +++ /dev/null @@ -1,34 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.RealtimeConversation -{ - internal readonly partial struct InternalRealtimeResponseSessionObject : IEquatable - { - private readonly string _value; - - public InternalRealtimeResponseSessionObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RealtimeSessionValue = "realtime.session"; - - public static InternalRealtimeResponseSessionObject RealtimeSession { get; } = new InternalRealtimeResponseSessionObject(RealtimeSessionValue); - public static bool operator ==(InternalRealtimeResponseSessionObject left, InternalRealtimeResponseSessionObject right) => left.Equals(right); - public static bool operator !=(InternalRealtimeResponseSessionObject left, InternalRealtimeResponseSessionObject right) => !left.Equals(right); - public static implicit operator InternalRealtimeResponseSessionObject(string value) => new InternalRealtimeResponseSessionObject(value); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalRealtimeResponseSessionObject other && Equals(other); - public bool Equals(InternalRealtimeResponseSessionObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - public override string ToString() => _value; - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs deleted file mode 100644 index 852c8f9e5..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs +++ /dev/null @@ -1,125 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeResponseStatusDetails))] - internal partial class InternalRealtimeResponseStatusDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); - } - - internal static InternalRealtimeResponseStatusDetails DeserializeInternalRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "cancelled": return InternalRealtimeResponseCancelledStatusDetails.DeserializeInternalRealtimeResponseCancelledStatusDetails(element, options); - case "failed": return RealtimeResponseFailedStatusDetails.DeserializeRealtimeResponseFailedStatusDetails(element, options); - case "incomplete": return InternalRealtimeResponseIncompleteStatusDetails.DeserializeInternalRealtimeResponseIncompleteStatusDetails(element, options); - } - } - return UnknownRealtimeResponseStatusDetails.DeserializeUnknownRealtimeResponseStatusDetails(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeResponseStatusDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs deleted file mode 100644 index fa579305c..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal abstract partial class InternalRealtimeResponseStatusDetails - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRealtimeResponseStatusDetails() - { - } - - internal InternalRealtimeResponseStatusDetails(ConversationStatus type, IDictionary serializedAdditionalRawData) - { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationStatus Type { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs deleted file mode 100644 index 4a728d942..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseTextContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement, options); - } - - internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealtimeResponseTextContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string text = default; - ConversationContentPartKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationContentPartKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeResponseTextContentPart(type, serializedAdditionalRawData, text); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseTextContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeResponseTextContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs deleted file mode 100644 index 063b4f309..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeResponseTextContentPart : ConversationContentPart - { - internal InternalRealtimeResponseTextContentPart(string text) - { - Argument.AssertNotNull(text, nameof(text)); - - Type = ConversationContentPartKind.Text; - Text = text; - } - - internal InternalRealtimeResponseTextContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData, string text) : base(type, serializedAdditionalRawData) - { - Text = text; - } - - internal InternalRealtimeResponseTextContentPart() - { - } - - public string Text { get; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs deleted file mode 100644 index d5daf900e..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeServerVadTurnDetection : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("threshold") != true && Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteNumberValue(Threshold.Value); - } - if (SerializedAdditionalRawData?.ContainsKey("prefix_padding_ms") != true && Optional.IsDefined(PrefixPaddingMs)) - { - writer.WritePropertyName("prefix_padding_ms"u8); - SerializePrefixPaddingMs(writer, options); - } - if (SerializedAdditionalRawData?.ContainsKey("silence_duration_ms") != true && Optional.IsDefined(SilenceDurationMs)) - { - writer.WritePropertyName("silence_duration_ms"u8); - SerializeSilenceDurationMs(writer, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeServerVadTurnDetection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement, options); - } - - internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealtimeServerVadTurnDetection(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - float? threshold = default; - TimeSpan? prefixPaddingMs = default; - TimeSpan? silenceDurationMs = default; - ConversationTurnDetectionKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("prefix_padding_ms"u8)) - { - DeserializeMillisecondDuration(property, ref prefixPaddingMs); - continue; - } - if (property.NameEquals("silence_duration_ms"u8)) - { - DeserializeMillisecondDuration(property, ref silenceDurationMs); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationTurnDetectionKind(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeServerVadTurnDetection(type, serializedAdditionalRawData, threshold, prefixPaddingMs, silenceDurationMs); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeServerVadTurnDetection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeServerVadTurnDetection FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs deleted file mode 100644 index e0ec40082..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeServerVadTurnDetection : ConversationTurnDetectionOptions - { - public InternalRealtimeServerVadTurnDetection() - { - Kind = ConversationTurnDetectionKind.ServerVoiceActivityDetection; - } - - internal InternalRealtimeServerVadTurnDetection(ConversationTurnDetectionKind kind, IDictionary serializedAdditionalRawData, float? threshold, TimeSpan? prefixPaddingMs, TimeSpan? silenceDurationMs) : base(kind, serializedAdditionalRawData) - { - Threshold = threshold; - PrefixPaddingMs = prefixPaddingMs; - SilenceDurationMs = silenceDurationMs; - } - - public float? Threshold { get; set; } - public TimeSpan? PrefixPaddingMs { get; set; } - public TimeSpan? SilenceDurationMs { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs deleted file mode 100644 index 0186db465..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeToolChoiceFunctionObject : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("function") != true) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeToolChoiceFunctionObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement, options); - } - - internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalRealtimeToolChoiceFunctionObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeToolChoiceFunctionObjectFunction function = default; - ConversationToolKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - function = InternalRealtimeToolChoiceFunctionObjectFunction.DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationToolKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeToolChoiceFunctionObject(type, serializedAdditionalRawData, function); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeToolChoiceFunctionObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalRealtimeToolChoiceFunctionObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs deleted file mode 100644 index f072dc3a8..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeToolChoiceFunctionObject : InternalRealtimeToolChoiceObject - { - public InternalRealtimeToolChoiceFunctionObject(InternalRealtimeToolChoiceFunctionObjectFunction function) - { - Argument.AssertNotNull(function, nameof(function)); - - Type = ConversationToolKind.Function; - Function = function; - } - - internal InternalRealtimeToolChoiceFunctionObject(ConversationToolKind type, IDictionary serializedAdditionalRawData, InternalRealtimeToolChoiceFunctionObjectFunction function) : base(type, serializedAdditionalRawData) - { - Function = function; - } - - internal InternalRealtimeToolChoiceFunctionObject() - { - } - - public InternalRealtimeToolChoiceFunctionObjectFunction Function { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs deleted file mode 100644 index cd8398e92..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeToolChoiceFunctionObjectFunction : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeToolChoiceFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement, options); - } - - internal static InternalRealtimeToolChoiceFunctionObjectFunction DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeToolChoiceFunctionObjectFunction(name, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeToolChoiceFunctionObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeToolChoiceFunctionObjectFunction FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs deleted file mode 100644 index 45162c2bb..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs +++ /dev/null @@ -1,32 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class InternalRealtimeToolChoiceFunctionObjectFunction - { - internal IDictionary SerializedAdditionalRawData { get; set; } - public InternalRealtimeToolChoiceFunctionObjectFunction(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - internal InternalRealtimeToolChoiceFunctionObjectFunction(string name, IDictionary serializedAdditionalRawData) - { - Name = name; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal InternalRealtimeToolChoiceFunctionObjectFunction() - { - } - - public string Name { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs deleted file mode 100644 index c7cd2c8df..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - [PersistableModelProxy(typeof(UnknownRealtimeToolChoiceObject))] - internal partial class InternalRealtimeToolChoiceObject : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); - } - - internal static InternalRealtimeToolChoiceObject DeserializeInternalRealtimeToolChoiceObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "function": return InternalRealtimeToolChoiceFunctionObject.DeserializeInternalRealtimeToolChoiceFunctionObject(element, options); - } - } - return UnknownRealtimeToolChoiceObject.DeserializeUnknownRealtimeToolChoiceObject(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static InternalRealtimeToolChoiceObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeToolChoiceObject(document.RootElement); - } - - internal virtual BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs deleted file mode 100644 index b219a7b10..000000000 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal abstract partial class InternalRealtimeToolChoiceObject - { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected InternalRealtimeToolChoiceObject() - { - } - - internal InternalRealtimeToolChoiceObject(ConversationToolKind type, IDictionary serializedAdditionalRawData) - { - Type = type; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal ConversationToolKind Type { get; set; } - } -} diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index d0dd0537f..11c461633 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -3,66 +3,70 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : IJsonModel { - ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal InternalUnknownChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + } + + ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatMessage(document.RootElement, options); } - internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (property.NameEquals("content"u8)) + if (options.Format != "W") { - DeserializeContentValue(property, ref content); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. - return new InternalUnknownChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData); + return new InternalUnknownChatMessage(role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -72,15 +76,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatMessage(document.RootElement, options); } default: @@ -89,16 +94,5 @@ ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWr } string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new InternalUnknownChatMessage FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUnknownChatMessage(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs index 22ec97734..4586cc4c8 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs @@ -9,11 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : ChatMessage { - internal InternalUnknownChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData) : base(role, content, serializedAdditionalRawData) - { - } - - internal InternalUnknownChatMessage() + internal InternalUnknownChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 8f6ce8ce8..e0885529d 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -7,61 +7,50 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { internal partial class InternalUpload : IJsonModel { + internal InternalUpload() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUpload)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("filename") != true) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(Bytes); - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) - { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true && Optional.IsDefined(Object)) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt, "U"); + if (Optional.IsDefined(Object)) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.Value.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("file") != true && Optional.IsDefined(File)) + if (Optional.IsDefined(File)) { if (File != null) { @@ -70,20 +59,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } else { - writer.WriteNull("file"); + writer.WriteNull("file"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,25 +77,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } - InternalUpload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalUpload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalUpload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalUpload)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalUpload(document.RootElement, options); } - internal static InternalUpload DeserializeInternalUpload(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalUpload DeserializeInternalUpload(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -123,72 +106,70 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo InternalUploadStatus status = default; DateTimeOffset expiresAt = default; InternalUploadObject? @object = default; - OpenAIFile file = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + OpenAIFile @file = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("filename"u8)) + if (prop.NameEquals("filename"u8)) { - filename = property.Value.GetString(); + filename = prop.Value.GetString(); continue; } - if (property.NameEquals("bytes"u8)) + if (prop.NameEquals("bytes"u8)) { - bytes = property.Value.GetInt32(); + bytes = prop.Value.GetInt32(); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = property.Value.GetString(); + purpose = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new InternalUploadStatus(property.Value.GetString()); + status = new InternalUploadStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + @object = null; continue; } - @object = new InternalUploadObject(property.Value.GetString()); + @object = new InternalUploadObject(prop.Value.GetString()); continue; } - if (property.NameEquals("file"u8)) + if (prop.NameEquals("file"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - file = null; + @file = null; continue; } - file = OpenAIFile.DeserializeOpenAIFile(property.Value, options); + @file = OpenAIFile.DeserializeOpenAIFile(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalUpload( id, createdAt, @@ -198,14 +179,15 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo status, expiresAt, @object, - file, - serializedAdditionalRawData); + @file, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -215,15 +197,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - InternalUpload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalUpload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalUpload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalUpload(document.RootElement, options); } default: @@ -233,15 +216,16 @@ InternalUpload IPersistableModel.Create(BinaryData data, ModelRe string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalUpload FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalUpload internalUpload) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalUpload(document.RootElement); + return BinaryContent.Create(internalUpload, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalUpload(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalUpload(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalUpload.cs b/.dotnet/src/Generated/Models/InternalUpload.cs index 8e796539d..fb6cfaf2a 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.cs @@ -9,13 +9,10 @@ namespace OpenAI.Files { internal partial class InternalUpload { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt) { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(filename, nameof(filename)); - Argument.AssertNotNull(purpose, nameof(purpose)); - Id = id; CreatedAt = createdAt; Filename = filename; @@ -25,7 +22,7 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in ExpiresAt = expiresAt; } - internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt, InternalUploadObject? @object, OpenAIFile file, IDictionary serializedAdditionalRawData) + internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt, InternalUploadObject? @object, OpenAIFile @file, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -35,22 +32,26 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in Status = status; ExpiresAt = expiresAt; Object = @object; - File = file; - SerializedAdditionalRawData = serializedAdditionalRawData; + File = @file; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalUpload() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string Filename { get; set; } + + public int Bytes { get; set; } + + public string Purpose { get; set; } + + public InternalUploadStatus Status { get; set; } + + public DateTimeOffset ExpiresAt { get; set; } + + public InternalUploadObject? Object { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string Filename { get; } - public int Bytes { get; } - public string Purpose { get; } - public InternalUploadStatus Status { get; } - public DateTimeOffset ExpiresAt { get; } - public InternalUploadObject? Object { get; } - public OpenAIFile File { get; } + public OpenAIFile File { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index f419fc8e6..d19ee24ab 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -6,27 +6,56 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationResult : IJsonModel { - ModerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ModerationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ModerationResult)} does not support writing '{format}' format."); + } + writer.WritePropertyName("flagged"u8); + writer.WriteBooleanValue(Flagged); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ModerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModerationResult)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeModerationResult(document.RootElement, options); + return ModerationResult.DeserializeModerationResult(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,16 +65,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op } } - ModerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeModerationResult(document.RootElement, options); + return ModerationResult.DeserializeModerationResult(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ModerationResult)} does not support reading '{options.Format}' format."); @@ -54,15 +84,16 @@ ModerationResult IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationResult FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationResult moderationResult) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationResult(document.RootElement); + return BinaryContent.Create(moderationResult, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationResult(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return ModerationResult.DeserializeModerationResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationResult.cs b/.dotnet/src/Generated/Models/ModerationResult.cs index 292988ade..695ddc7df 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.cs @@ -9,6 +9,19 @@ namespace OpenAI.Moderations { public partial class ModerationResult { - public bool Flagged { get; } + private protected IDictionary _additionalBinaryDataProperties; + + internal ModerationResult(bool flagged) + { + Flagged = flagged; + } + + internal ModerationResult(bool flagged, IDictionary additionalBinaryDataProperties) + { + Flagged = flagged; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public bool Flagged { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index c0697ccd4..c786806f1 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -6,27 +6,58 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { public partial class ModerationResultCollection : IJsonModel { - ModerationResultCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ModerationResultCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ModerationResultCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + ModerationResultCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ModerationResultCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModerationResultCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeModerationResultCollection(document.RootElement, options); + return ModerationResultCollection.DeserializeModerationResultCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,16 +67,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - ModerationResultCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ModerationResultCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ModerationResultCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeModerationResultCollection(document.RootElement, options); + return ModerationResultCollection.DeserializeModerationResultCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ModerationResultCollection)} does not support reading '{options.Format}' format."); @@ -54,15 +86,16 @@ ModerationResultCollection IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ModerationResultCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ModerationResultCollection moderationResultCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModerationResultCollection(document.RootElement); + return BinaryContent.Create(moderationResultCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ModerationResultCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return ModerationResultCollection.DeserializeModerationResultCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.cs index dd88f801f..336bb11a3 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.cs @@ -2,15 +2,30 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Moderations { - public partial class ModerationResultCollection : ReadOnlyCollection + public partial class ModerationResultCollection { - public string Id { get; } - public string Model { get; } + private protected IDictionary _additionalBinaryDataProperties; + + internal ModerationResultCollection(string id, string model) + { + Id = id; + Model = model; + } + + internal ModerationResultCollection(string id, string model, IDictionary additionalBinaryDataProperties) + { + Id = id; + Model = model; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Id { get; set; } + + public string Model { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 090448d73..83da2aac5 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -7,53 +7,41 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class OpenAIEmbedding : IJsonModel { + internal OpenAIEmbedding() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIEmbedding)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } - if (SerializedAdditionalRawData?.ContainsKey("embedding") != true) - { - writer.WritePropertyName("embedding"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(EmbeddingProperty); -#else - using (JsonDocument document = JsonDocument.Parse(EmbeddingProperty)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + writer.WritePropertyName("embedding"u8); + writer.WriteObjectValue(EmbeddingProperty, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -62,65 +50,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } - OpenAIEmbedding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIEmbedding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIEmbedding JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIEmbedding)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIEmbedding(document.RootElement, options); } - internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; - BinaryData embedding = default; - InternalEmbeddingObject @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData embeddingProperty = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("embedding"u8)) + if (prop.NameEquals("index"u8)) { - embedding = BinaryData.FromString(property.Value.GetRawText()); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("embedding"u8)) { - @object = new InternalEmbeddingObject(property.Value.GetString()); + embeddingProperty = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIEmbedding(index, embedding, @object, serializedAdditionalRawData); + return new OpenAIEmbedding(index, embeddingProperty, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +108,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - OpenAIEmbedding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIEmbedding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIEmbedding PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIEmbedding(document.RootElement, options); } default: @@ -148,15 +127,16 @@ OpenAIEmbedding IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIEmbedding FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIEmbedding openAIEmbedding) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIEmbedding(document.RootElement); + return BinaryContent.Create(openAIEmbedding, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIEmbedding(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIEmbedding(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index a3b0b1aad..2c4ead79b 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -9,12 +9,15 @@ namespace OpenAI.Embeddings { public partial class OpenAIEmbedding { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIEmbedding() + internal OpenAIEmbedding(int index, BinaryData embeddingProperty, IDictionary additionalBinaryDataProperties) { + Index = index; + EmbeddingProperty = embeddingProperty; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int Index { get; } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index f025c25a0..238561b3b 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -6,27 +6,60 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Embeddings { public partial class OpenAIEmbeddingCollection : IJsonModel { - OpenAIEmbeddingCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OpenAIEmbeddingCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIEmbeddingCollection)} does not support writing '{format}' format."); + } + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + OpenAIEmbeddingCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIEmbeddingCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIEmbeddingCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIEmbeddingCollection(document.RootElement, options); + return OpenAIEmbeddingCollection.DeserializeOpenAIEmbeddingCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,16 +69,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - OpenAIEmbeddingCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIEmbeddingCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIEmbeddingCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeOpenAIEmbeddingCollection(document.RootElement, options); + return OpenAIEmbeddingCollection.DeserializeOpenAIEmbeddingCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(OpenAIEmbeddingCollection)} does not support reading '{options.Format}' format."); @@ -54,15 +88,16 @@ OpenAIEmbeddingCollection IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIEmbeddingCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIEmbeddingCollection openAIEmbeddingCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIEmbeddingCollection(document.RootElement); + return BinaryContent.Create(openAIEmbeddingCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIEmbeddingCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return OpenAIEmbeddingCollection.DeserializeOpenAIEmbeddingCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index 50b716a99..53cb19af2 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -2,16 +2,32 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Embeddings { - public partial class OpenAIEmbeddingCollection : ReadOnlyCollection + public partial class OpenAIEmbeddingCollection { - public string Model { get; } + private protected IDictionary _additionalBinaryDataProperties; - public EmbeddingTokenUsage Usage { get; } + internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object) + { + Model = model; + Usage = usage; + Object = @object; + } + + internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object, IDictionary additionalBinaryDataProperties) + { + Model = model; + Usage = usage; + Object = @object; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Model { get; set; } + + public EmbeddingTokenUsage Usage { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 0e3815cd6..6488974cf 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -7,78 +7,54 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { public partial class OpenAIFile : IJsonModel { + internal OpenAIFile() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIFile)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("bytes") != true) - { - if (SizeInBytes != null) - { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(SizeInBytes.Value); - } - else - { - writer.WriteNull("bytes"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) - { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("filename") != true) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("purpose") != true) - { - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToSerialString()); + if (SizeInBytes != null) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToSerialString()); + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(SizeInBytes.Value); } - if (SerializedAdditionalRawData?.ContainsKey("status_details") != true && Optional.IsDefined(StatusDetails)) + else { - writer.WritePropertyName("status_details"u8); - writer.WriteStringValue(StatusDetails); + writer.WriteNull("bytes"u8); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -87,109 +63,84 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } - OpenAIFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIFile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIFile)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIFile(document.RootElement, options); } - internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - int? bytes = default; DateTimeOffset createdAt = default; string filename = default; - InternalOpenAIFileObject @object = default; - FilePurpose purpose = default; - FileStatus status = default; - string statusDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Files.FilePurpose purpose = default; + int? sizeInBytes = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("bytes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - bytes = null; - continue; - } - bytes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("id"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("filename"u8)) + if (prop.NameEquals("created_at"u8)) { - filename = property.Value.GetString(); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("filename"u8)) { - @object = new InternalOpenAIFileObject(property.Value.GetString()); + filename = prop.Value.GetString(); continue; } - if (property.NameEquals("purpose"u8)) + if (prop.NameEquals("purpose"u8)) { - purpose = property.Value.GetString().ToFilePurpose(); + purpose = prop.Value.GetString().ToFilePurpose(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("bytes"u8)) { - status = property.Value.GetString().ToFileStatus(); - continue; - } - if (property.NameEquals("status_details"u8)) - { - statusDetails = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + sizeInBytes = null; + continue; + } + sizeInBytes = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new OpenAIFile( id, - bytes, createdAt, filename, - @object, purpose, - status, - statusDetails, - serializedAdditionalRawData); + sizeInBytes, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -199,15 +150,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - OpenAIFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIFile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIFile(document.RootElement, options); } default: @@ -217,15 +169,16 @@ OpenAIFile IPersistableModel.Create(BinaryData data, ModelReaderWrit string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIFile FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIFile openAIFile) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIFile(document.RootElement); + return BinaryContent.Create(openAIFile, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIFile(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIFile(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index 23577b777..b81b58b97 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -9,41 +9,33 @@ namespace OpenAI.Files { public partial class OpenAIFile { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal OpenAIFile(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, FilePurpose purpose, FileStatus status) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(filename, nameof(filename)); + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes) + { Id = id; - SizeInBytes = sizeInBytes; CreatedAt = createdAt; Filename = filename; Purpose = purpose; - Status = status; + SizeInBytes = sizeInBytes; } - internal OpenAIFile(string id, int? sizeInBytes, DateTimeOffset createdAt, string filename, InternalOpenAIFileObject @object, FilePurpose purpose, FileStatus status, string statusDetails, IDictionary serializedAdditionalRawData) + internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes, IDictionary additionalBinaryDataProperties) { Id = id; - SizeInBytes = sizeInBytes; CreatedAt = createdAt; Filename = filename; - Object = @object; Purpose = purpose; - Status = status; - StatusDetails = statusDetails; - SerializedAdditionalRawData = serializedAdditionalRawData; + SizeInBytes = sizeInBytes; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal OpenAIFile() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } - public string Id { get; } - public DateTimeOffset CreatedAt { get; } - public string Filename { get; } + public string Filename { get; set; } - public FilePurpose Purpose { get; } + public Files.FilePurpose Purpose { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 5ed78de47..22fe922da 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -6,27 +6,54 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Files { public partial class OpenAIFileCollection : IJsonModel { - OpenAIFileCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + OpenAIFileCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIFileCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIFileCollection(document.RootElement, options); + return OpenAIFileCollection.DeserializeOpenAIFileCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,16 +63,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption } } - OpenAIFileCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIFileCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIFileCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeOpenAIFileCollection(document.RootElement, options); + return OpenAIFileCollection.DeserializeOpenAIFileCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support reading '{options.Format}' format."); @@ -54,15 +82,16 @@ OpenAIFileCollection IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIFileCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIFileCollection openAIFileCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIFileCollection(document.RootElement); + return BinaryContent.Create(openAIFileCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIFileCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return OpenAIFileCollection.DeserializeOpenAIFileCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index b868860e4..27e4312a6 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -2,13 +2,18 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Files { - public partial class OpenAIFileCollection : ReadOnlyCollection + public partial class OpenAIFileCollection { + private protected IDictionary _additionalBinaryDataProperties; + + internal OpenAIFileCollection(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index 4d230a105..a19a827d2 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -7,51 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Models { public partial class OpenAIModel : IJsonModel { + internal OpenAIModel() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIModel)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("owned_by") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("owned_by"u8); + writer.WriteStringValue(OwnedBy); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - writer.WritePropertyName("owned_by"u8); - writer.WriteStringValue(OwnedBy); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,71 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } - OpenAIModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIModel JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OpenAIModel)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOpenAIModel(document.RootElement, options); } - internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - DateTimeOffset created = default; - InternalModelObject @object = default; string ownedBy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + DateTimeOffset createdAt = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("owned_by"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + ownedBy = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("created"u8)) { - @object = new InternalModelObject(property.Value.GetString()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("owned_by"u8)) + if (options.Format != "W") { - ownedBy = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIModel(id, created, @object, ownedBy, serializedAdditionalRawData); + return new OpenAIModel(id, ownedBy, createdAt, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -134,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options } } - OpenAIModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeOpenAIModel(document.RootElement, options); } default: @@ -152,15 +135,16 @@ OpenAIModel IPersistableModel.Create(BinaryData data, ModelReaderWr string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIModel FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIModel openAIModel) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIModel(document.RootElement); + return BinaryContent.Create(openAIModel, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIModel(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIModel(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index 390f591ea..92a7136ca 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -9,32 +9,25 @@ namespace OpenAI.Models { public partial class OpenAIModel { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal OpenAIModel(string id, DateTimeOffset createdAt, string ownedBy) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(ownedBy, nameof(ownedBy)); + private protected IDictionary _additionalBinaryDataProperties; + internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt) + { Id = id; - CreatedAt = createdAt; OwnedBy = ownedBy; + CreatedAt = createdAt; } - internal OpenAIModel(string id, DateTimeOffset createdAt, InternalModelObject @object, string ownedBy, IDictionary serializedAdditionalRawData) + internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; - CreatedAt = createdAt; - Object = @object; OwnedBy = ownedBy; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal OpenAIModel() - { + CreatedAt = createdAt; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; } + public string Id { get; set; } - public string OwnedBy { get; } + public string OwnedBy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index 0d8747b09..d0827f745 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -6,27 +6,54 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using OpenAI; namespace OpenAI.Models { public partial class OpenAIModelCollection : IJsonModel { - OpenAIModelCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } + } + OpenAIModelCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual OpenAIModelCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIModelCollection(document.RootElement, options); + return OpenAIModelCollection.DeserializeOpenAIModelCollection(document.RootElement, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -36,16 +63,17 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio } } - OpenAIModelCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + OpenAIModelCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual OpenAIModelCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeOpenAIModelCollection(document.RootElement, options); + return OpenAIModelCollection.DeserializeOpenAIModelCollection(document.RootElement, options); } default: throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support reading '{options.Format}' format."); @@ -54,15 +82,16 @@ OpenAIModelCollection IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static OpenAIModelCollection FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(OpenAIModelCollection openAIModelCollection) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOpenAIModelCollection(document.RootElement); + return BinaryContent.Create(openAIModelCollection, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator OpenAIModelCollection(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return OpenAIModelCollection.DeserializeOpenAIModelCollection(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index 08dc52d83..ad1eb54e4 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -2,13 +2,18 @@ #nullable disable +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; namespace OpenAI.Models { - public partial class OpenAIModelCollection : ReadOnlyCollection + public partial class OpenAIModelCollection { + private protected IDictionary _additionalBinaryDataProperties; + + internal OpenAIModelCollection(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs deleted file mode 100644 index 4bc9d5382..000000000 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class RealtimeResponseFailedStatusDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("error") != true) - { - writer.WritePropertyName("error"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Error); -#else - using (JsonDocument document = JsonDocument.Parse(Error)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - RealtimeResponseFailedStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); - } - - internal static RealtimeResponseFailedStatusDetails DeserializeRealtimeResponseFailedStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BinaryData error = default; - ConversationStatus type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error"u8)) - { - error = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ConversationStatus(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RealtimeResponseFailedStatusDetails(type, serializedAdditionalRawData, error); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - RealtimeResponseFailedStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new RealtimeResponseFailedStatusDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs deleted file mode 100644 index 27d432b59..000000000 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs +++ /dev/null @@ -1,31 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class RealtimeResponseFailedStatusDetails : InternalRealtimeResponseStatusDetails - { - internal RealtimeResponseFailedStatusDetails(BinaryData error) - { - Argument.AssertNotNull(error, nameof(error)); - - Type = ConversationStatus.Failed; - Error = error; - } - - internal RealtimeResponseFailedStatusDetails(ConversationStatus type, IDictionary serializedAdditionalRawData, BinaryData error) : base(type, serializedAdditionalRawData) - { - Error = error; - } - - internal RealtimeResponseFailedStatusDetails() - { - } - - public BinaryData Error { get; } - } -} diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 2b255bd47..67f317073 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { @@ -14,19 +15,45 @@ public partial class RunCreationOptions : IJsonModel { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunCreationOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + if (Optional.IsDefined(Stream)) { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + if (Stream != null) + { + writer.WritePropertyName("stream"u8); + writer.WriteBooleanValue(Stream.Value); + } + else + { + writer.WriteNull("stream"u8); + } } - if (SerializedAdditionalRawData?.ContainsKey("model") != true && Optional.IsDefined(ModelOverride)) + if (Optional.IsDefined(ResponseFormat)) + { + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } + } + if (Optional.IsDefined(ModelOverride)) { if (ModelOverride != null) { @@ -35,10 +62,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("model"); + writer.WriteNull("model"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true && Optional.IsDefined(InstructionsOverride)) + if (Optional.IsDefined(InstructionsOverride)) { if (InstructionsOverride != null) { @@ -47,10 +74,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("instructions"); + writer.WriteNull("instructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("additional_instructions") != true && Optional.IsDefined(AdditionalInstructions)) + if (Optional.IsDefined(AdditionalInstructions)) { if (AdditionalInstructions != null) { @@ -59,74 +86,49 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("additional_instructions"); + writer.WriteNull("additionalInstructions"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("additional_messages") != true && Optional.IsCollectionDefined(InternalMessages)) + if (Optional.IsCollectionDefined(InternalMessages)) { if (InternalMessages != null) { writer.WritePropertyName("additional_messages"u8); writer.WriteStartArray(); - foreach (var item in InternalMessages) + foreach (MessageCreationOptions item in InternalMessages) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } else { - writer.WriteNull("additional_messages"); + writer.WriteNull("additionalMessages"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true && Optional.IsCollectionDefined(ToolsOverride)) + if (Optional.IsDefined(AllowParallelToolCalls)) + { + writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(AllowParallelToolCalls.Value); + } + if (Optional.IsCollectionDefined(ToolsOverride)) { if (ToolsOverride != null) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); - foreach (var item in ToolsOverride) + foreach (ToolDefinition item in ToolsOverride) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } else { - writer.WriteNull("tools"); + writer.WriteNull("tools"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true && Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor)) { if (NucleusSamplingFactor != null) { @@ -135,22 +137,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("top_p"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("stream") != true && Optional.IsDefined(Stream)) - { - if (Stream != null) - { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); - } - else - { - writer.WriteNull("stream"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_prompt_tokens") != true && Optional.IsDefined(MaxInputTokenCount)) + if (Optional.IsDefined(MaxInputTokenCount)) { if (MaxInputTokenCount != null) { @@ -159,10 +149,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("max_prompt_tokens"); + writer.WriteNull("maxPromptTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true && Optional.IsDefined(MaxOutputTokenCount)) + if (Optional.IsDefined(MaxOutputTokenCount)) { if (MaxOutputTokenCount != null) { @@ -171,61 +161,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("max_completion_tokens"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("truncation_strategy") != true && Optional.IsDefined(TruncationStrategy)) - { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); + writer.WriteNull("maxCompletionTokens"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true && Optional.IsDefined(ToolConstraint)) + if (Optional.IsDefined(ToolConstraint)) { if (ToolConstraint != null) { writer.WritePropertyName("tool_choice"u8); - SerializeToolConstraint(writer, options); - } - else - { - writer.WriteNull("tool_choice"); - } - } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true && Optional.IsDefined(AllowParallelToolCalls)) - { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(AllowParallelToolCalls.Value); - } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true && Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + writer.WriteObjectValue(ToolConstraint, options); } else { - writer.WriteNull("response_format"); + writer.WriteNull("toolChoice"u8); } } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -234,246 +191,186 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - RunCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunCreationOptions)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunCreationOptions(document.RootElement, options); } - internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string assistantId = default; - string model = default; - string instructions = default; - string additionalInstructions = default; - IList additionalMessages = default; - IList tools = default; - IDictionary metadata = default; - float? temperature = default; - float? topP = default; bool? stream = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; - RunTruncationStrategy truncationStrategy = default; - ToolConstraint toolChoice = default; - bool? parallelToolCalls = default; AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string modelOverride = default; + string instructionsOverride = default; + string additionalInstructions = default; + IList internalMessages = default; + bool? allowParallelToolCalls = default; + IList toolsOverride = default; + float? nucleusSamplingFactor = default; + int? maxInputTokenCount = default; + int? maxOutputTokenCount = default; + ToolConstraint toolConstraint = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("stream"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - model = null; + stream = null; continue; } - model = property.Value.GetString(); + stream = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - instructions = null; continue; } - instructions = property.Value.GetString(); + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); continue; } - if (property.NameEquals("additional_instructions"u8)) + if (prop.NameEquals("model"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - additionalInstructions = null; - continue; - } - additionalInstructions = property.Value.GetString(); + modelOverride = prop.Value.GetString(); continue; } - if (property.NameEquals("additional_messages"u8)) + if (prop.NameEquals("instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); - } - additionalMessages = array; + instructionsOverride = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("additional_instructions"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; + additionalInstructions = prop.Value.GetString(); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("additional_messages"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - topP = null; - continue; + array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } - topP = property.Value.GetSingle(); + internalMessages = array; continue; } - if (property.NameEquals("stream"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - stream = null; + allowParallelToolCalls = null; continue; } - stream = property.Value.GetBoolean(); + allowParallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("max_prompt_tokens"u8)) + if (prop.NameEquals("tools"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - maxPromptTokens = null; continue; } - maxPromptTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("max_completion_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - maxCompletionTokens = null; - continue; + array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } - maxCompletionTokens = property.Value.GetInt32(); + toolsOverride = array; continue; } - if (property.NameEquals("truncation_strategy"u8)) + if (prop.NameEquals("top_p"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - truncationStrategy = null; + nucleusSamplingFactor = null; continue; } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(property.Value, options); + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("max_prompt_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; + maxInputTokenCount = null; continue; } - toolChoice = Assistants.ToolConstraint.DeserializeToolConstraint(property.Value, options); + maxInputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { + maxOutputTokenCount = null; continue; } - parallelToolCalls = property.Value.GetBoolean(); + maxOutputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new RunCreationOptions( assistantId, - model, - instructions, - additionalInstructions, - additionalMessages ?? new ChangeTrackingList(), - tools ?? new ChangeTrackingList(), - metadata ?? new ChangeTrackingDictionary(), - temperature, - topP, stream, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - parallelToolCalls, responseFormat, - serializedAdditionalRawData); + modelOverride, + instructionsOverride, + additionalInstructions, + internalMessages ?? new ChangeTrackingList(), + allowParallelToolCalls, + toolsOverride ?? new ChangeTrackingList(), + nucleusSamplingFactor, + maxInputTokenCount, + maxOutputTokenCount, + toolConstraint, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -483,15 +380,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - RunCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunCreationOptions(document.RootElement, options); } default: @@ -501,15 +399,16 @@ RunCreationOptions IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunCreationOptions FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunCreationOptions runCreationOptions) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunCreationOptions(document.RootElement); + return BinaryContent.Create(runCreationOptions, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunCreationOptions(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunCreationOptions(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index d0cc33305..be2a9a20a 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -9,27 +9,24 @@ namespace OpenAI.Assistants { public partial class RunCreationOptions { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, bool? stream, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? allowParallelToolCalls, IList toolsOverride, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; + Stream = stream; + ResponseFormat = responseFormat; ModelOverride = modelOverride; InstructionsOverride = instructionsOverride; AdditionalInstructions = additionalInstructions; InternalMessages = internalMessages; + AllowParallelToolCalls = allowParallelToolCalls; ToolsOverride = toolsOverride; - Metadata = metadata; - Temperature = temperature; NucleusSamplingFactor = nucleusSamplingFactor; - Stream = stream; MaxInputTokenCount = maxInputTokenCount; MaxOutputTokenCount = maxOutputTokenCount; - TruncationStrategy = truncationStrategy; ToolConstraint = toolConstraint; - AllowParallelToolCalls = allowParallelToolCalls; - ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/RunIncompleteReason.cs b/.dotnet/src/Generated/Models/RunIncompleteReason.cs index 28cdbd676..d69a9eb78 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteReason.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteReason.cs @@ -4,30 +4,36 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Assistants { public readonly partial struct RunIncompleteReason : IEquatable { private readonly string _value; + private const string MaxCompletionTokensValue = "max_completion_tokens"; + private const string MaxPromptTokensValue = "max_prompt_tokens"; public RunIncompleteReason(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); + Argument.AssertNotNull(value, nameof(value)); + + _value = value; } - private const string MaxOutputTokenCountValue = "max_completion_tokens"; - private const string MaxInputTokenCountValue = "max_prompt_tokens"; public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right) => left.Equals(right); + public static bool operator !=(RunIncompleteReason left, RunIncompleteReason right) => !left.Equals(right); + public static implicit operator RunIncompleteReason(string value) => new RunIncompleteReason(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is RunIncompleteReason other && Equals(other); + public bool Equals(RunIncompleteReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index e3d81cbd0..04644ffff 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunStepTokenUsage : IJsonModel { + internal RunStepTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(OutputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(InputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokenCount); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(OutputTokenCount); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } - RunStepTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunStepTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunStepTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunStepTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunStepTokenUsage(document.RootElement, options); } - internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - int completionTokens = default; - int promptTokens = default; - int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int outputTokenCount = default; + int inputTokenCount = default; + int totalTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + outputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + inputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData); + return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - RunStepTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunStepTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunStepTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunStepTokenUsage(document.RootElement, options); } default: @@ -141,15 +135,16 @@ RunStepTokenUsage IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunStepTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunStepTokenUsage runStepTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunStepTokenUsage(document.RootElement); + return BinaryContent.Create(runStepTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunStepTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunStepTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs index 34e6768b7..f6d94bf2d 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs @@ -9,7 +9,8 @@ namespace OpenAI.Assistants { public partial class RunStepTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { OutputTokenCount = outputTokenCount; @@ -17,16 +18,12 @@ internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalT TotalTokenCount = totalTokenCount; } - internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, IDictionary serializedAdditionalRawData) + internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, IDictionary additionalBinaryDataProperties) { OutputTokenCount = outputTokenCount; InputTokenCount = inputTokenCount; TotalTokenCount = totalTokenCount; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal RunStepTokenUsage() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index bd60e19af..471207955 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -7,46 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class RunTokenUsage : IJsonModel { + internal RunTokenUsage() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTokenUsage)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("completion_tokens") != true) - { - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(OutputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("prompt_tokens") != true) - { - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(InputTokenCount); - } - if (SerializedAdditionalRawData?.ContainsKey("total_tokens") != true) - { - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokenCount); - } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(OutputTokenCount); + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -55,65 +52,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } - RunTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RunTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual RunTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(RunTokenUsage)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeRunTokenUsage(document.RootElement, options); } - internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, ModelReaderWriterOptions options = null) + internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - int completionTokens = default; - int promptTokens = default; - int totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int outputTokenCount = default; + int inputTokenCount = default; + int totalTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("completion_tokens"u8)) + if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + outputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("prompt_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + inputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - totalTokens = property.Value.GetInt32(); + totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RunTokenUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData); + return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +116,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio } } - RunTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + RunTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual RunTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeRunTokenUsage(document.RootElement, options); } default: @@ -141,15 +135,16 @@ RunTokenUsage IPersistableModel.Create(BinaryData data, ModelRead string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static RunTokenUsage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(RunTokenUsage runTokenUsage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRunTokenUsage(document.RootElement); + return BinaryContent.Create(runTokenUsage, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator RunTokenUsage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRunTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.cs b/.dotnet/src/Generated/Models/RunTokenUsage.cs index fce729839..39408ab79 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.cs @@ -9,7 +9,8 @@ namespace OpenAI.Assistants { public partial class RunTokenUsage { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { OutputTokenCount = outputTokenCount; @@ -17,16 +18,12 @@ internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalToken TotalTokenCount = totalTokenCount; } - internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, IDictionary serializedAdditionalRawData) + internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, IDictionary additionalBinaryDataProperties) { OutputTokenCount = outputTokenCount; InputTokenCount = inputTokenCount; TotalTokenCount = totalTokenCount; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal RunTokenUsage() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 016815b5a..1888c1cf9 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -7,83 +7,74 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate : IJsonModel { + internal StreamingChatCompletionUpdate() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatCompletionUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(CompletionId); - } - if (SerializedAdditionalRawData?.ContainsKey("choices") != true) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + if (Optional.IsDefined(SystemFingerprint)) { - writer.WritePropertyName("choices"u8); - writer.WriteStartArray(); - foreach (var item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("created") != true) - { - writer.WritePropertyName("created"u8); - writer.WriteNumberValue(CreatedAt, "U"); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("system_fingerprint"u8); + writer.WriteStringValue(SystemFingerprint); } - if (SerializedAdditionalRawData?.ContainsKey("service_tier") != true && Optional.IsDefined(ServiceTier)) + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(CompletionId); + if (Optional.IsDefined(ServiceTier)) { if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(ServiceTier.Value.ToString()); + writer.WriteObjectValue?>(ServiceTier, options); } else { - writer.WriteNull("service_tier"); + writer.WriteNull("serviceTier"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("system_fingerprint") != true && Optional.IsDefined(SystemFingerprint)) - { - writer.WritePropertyName("system_fingerprint"u8); - writer.WriteStringValue(SystemFingerprint); - } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionStreamResponseChoice item in Choices) { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true && Optional.IsDefined(Usage)) + writer.WriteEndArray(); + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); + if (Optional.IsDefined(Usage)) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -92,118 +83,119 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } - StreamingChatCompletionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatCompletionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatCompletionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatCompletionUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatCompletionUpdate(document.RootElement, options); } - internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletionUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletionUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string id = default; - IReadOnlyList choices = default; - DateTimeOffset created = default; string model = default; - InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; string systemFingerprint = default; InternalCreateChatCompletionStreamResponseObject @object = default; + string completionId = default; + Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; + IReadOnlyList choices = default; + DateTimeOffset createdAt = default; ChatTokenUsage usage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("model"u8)) { - id = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("choices"u8)) + if (prop.NameEquals("system_fingerprint"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (prop.Value.ValueKind == JsonValueKind.Null) { - array.Add(InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(item, options)); + systemFingerprint = null; + continue; } - choices = array; + systemFingerprint = prop.Value.GetString(); continue; } - if (property.NameEquals("created"u8)) + if (prop.NameEquals("object"u8)) { - created = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + @object = InternalCreateChatCompletionStreamResponseObject.DeserializeInternalCreateChatCompletionStreamResponseObject(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("id"u8)) { - model = property.Value.GetString(); + completionId = prop.Value.GetString(); continue; } - if (property.NameEquals("service_tier"u8)) + if (prop.NameEquals("service_tier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { serviceTier = null; continue; } - serviceTier = new InternalCreateChatCompletionStreamResponseServiceTier(property.Value.GetString()); + serviceTier = Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier?.DeserializeOpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier(prop.Value, options); continue; } - if (property.NameEquals("system_fingerprint"u8)) + if (prop.NameEquals("choices"u8)) { - systemFingerprint = property.Value.GetString(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(item, options)); + } + choices = array; continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("created"u8)) { - @object = new InternalCreateChatCompletionStreamResponseObject(property.Value.GetString()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - usage = ChatTokenUsage.DeserializeChatTokenUsage(property.Value, options); + usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new StreamingChatCompletionUpdate( - id, - choices, - created, model, - serviceTier, systemFingerprint, @object, + completionId, + serviceTier, + choices, + createdAt, usage, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -213,15 +205,16 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - StreamingChatCompletionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatCompletionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatCompletionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatCompletionUpdate(document.RootElement, options); } default: @@ -231,15 +224,16 @@ StreamingChatCompletionUpdate IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatCompletionUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatCompletionUpdate streamingChatCompletionUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatCompletionUpdate(document.RootElement); + return BinaryContent.Create(streamingChatCompletionUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatCompletionUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatCompletionUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index 471658517..2776e90de 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -10,36 +10,32 @@ namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal StreamingChatCompletionUpdate(string completionId, IEnumerable choices, DateTimeOffset createdAt, string model) - { - Argument.AssertNotNull(completionId, nameof(completionId)); - Argument.AssertNotNull(choices, nameof(choices)); - Argument.AssertNotNull(model, nameof(model)); + private protected IDictionary _additionalBinaryDataProperties; + internal StreamingChatCompletionUpdate(string model, InternalCreateChatCompletionStreamResponseObject @object, string completionId, IEnumerable choices, DateTimeOffset createdAt) + { + Model = model; + Object = @object; CompletionId = completionId; Choices = choices.ToList(); CreatedAt = createdAt; - Model = model; } - internal StreamingChatCompletionUpdate(string completionId, IReadOnlyList choices, DateTimeOffset createdAt, string model, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, ChatTokenUsage usage, IDictionary serializedAdditionalRawData) + internal StreamingChatCompletionUpdate(string model, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, string completionId, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) { - CompletionId = completionId; - Choices = choices; - CreatedAt = createdAt; Model = model; - ServiceTier = serviceTier; SystemFingerprint = systemFingerprint; Object = @object; + CompletionId = completionId; + ServiceTier = serviceTier; + Choices = choices; + CreatedAt = createdAt; Usage = usage; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal StreamingChatCompletionUpdate() - { - } - public string Model { get; } - public string SystemFingerprint { get; } + public string Model { get; set; } + + public string SystemFingerprint { get; set; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 2a2ce5d6a..7fbf4682a 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,34 +15,35 @@ public partial class StreamingChatFunctionCallUpdate : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("name") != true && Optional.IsDefined(FunctionName)) + if (Optional.IsDefined(FunctionName)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(FunctionName); } - if (SerializedAdditionalRawData?.ContainsKey("arguments") != true && Optional.IsDefined(FunctionArgumentsUpdate)) + if (Optional.IsDefined(FunctionArgumentsUpdate)) { writer.WritePropertyName("arguments"u8); - SerializeFunctionArgumentsUpdateValue(writer, options); + writer.WriteObjectValue(FunctionArgumentsUpdate, options); } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +52,59 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } - StreamingChatFunctionCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatFunctionCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatFunctionCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, options); } - internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunctionCallUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunctionCallUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; - BinaryData arguments = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string functionName = default; + BinaryData functionArgumentsUpdate = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + functionName = prop.Value.GetString(); continue; } - if (property.NameEquals("arguments"u8)) + if (prop.NameEquals("arguments"u8)) { - DeserializeFunctionArgumentsUpdateValue(property, ref arguments); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + functionArgumentsUpdate = BinaryData.DeserializeBinaryData(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new StreamingChatFunctionCallUpdate(name, arguments, serializedAdditionalRawData); + return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +114,16 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - StreamingChatFunctionCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatFunctionCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatFunctionCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, options); } default: @@ -130,15 +133,16 @@ StreamingChatFunctionCallUpdate IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatFunctionCallUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatFunctionCallUpdate streamingChatFunctionCallUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatFunctionCallUpdate(document.RootElement); + return BinaryContent.Create(streamingChatFunctionCallUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatFunctionCallUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatFunctionCallUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs index 2872f9272..103334c50 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs @@ -9,16 +9,17 @@ namespace OpenAI.Chat { public partial class StreamingChatFunctionCallUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal StreamingChatFunctionCallUpdate() { } - internal StreamingChatFunctionCallUpdate(string functionName, BinaryData functionArgumentsUpdate, IDictionary serializedAdditionalRawData) + internal StreamingChatFunctionCallUpdate(string functionName, BinaryData functionArgumentsUpdate, IDictionary additionalBinaryDataProperties) { FunctionName = functionName; FunctionArgumentsUpdate = functionArgumentsUpdate; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index e88d5d247..a6c5958d4 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -7,51 +7,51 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate : IJsonModel { + internal StreamingChatToolCallUpdate() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatToolCallUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("index") != true) + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + if (Optional.IsDefined(Function)) { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(ToolCallId)) + writer.WritePropertyName("type"u8); + writer.WriteNumberValue((int)Kind); + if (Optional.IsDefined(ToolCallId)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(ToolCallId); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("function") != true && Optional.IsDefined(Function)) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - if (SerializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -60,79 +60,75 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } - StreamingChatToolCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StreamingChatToolCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual StreamingChatToolCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(StreamingChatToolCallUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeStreamingChatToolCallUpdate(document.RootElement, options); } - internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int index = default; - string id = default; - ChatToolCallKind type = default; InternalChatCompletionMessageToolCallChunkFunction function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatToolCallKind kind = default; + string toolCallId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("index"u8)) + if (prop.NameEquals("index"u8)) { - index = property.Value.GetInt32(); + index = prop.Value.GetInt32(); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("function"u8)) { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - type = property.Value.GetString().ToChatToolCallKind(); + function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); continue; } - if (property.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(property.Value, options); + kind = prop.Value.GetInt32().ToChatToolCallKind(); + continue; + } + if (prop.NameEquals("id"u8)) + { + toolCallId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new StreamingChatToolCallUpdate(index, id, type, function, serializedAdditionalRawData); + return new StreamingChatToolCallUpdate(index, function, kind, toolCallId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -142,15 +138,16 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - StreamingChatToolCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + StreamingChatToolCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual StreamingChatToolCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeStreamingChatToolCallUpdate(document.RootElement, options); } default: @@ -160,15 +157,16 @@ StreamingChatToolCallUpdate IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static StreamingChatToolCallUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(StreamingChatToolCallUpdate streamingChatToolCallUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeStreamingChatToolCallUpdate(document.RootElement); + return BinaryContent.Create(streamingChatToolCallUpdate, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator StreamingChatToolCallUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeStreamingChatToolCallUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs index b50ad6c72..bd44ff49f 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs @@ -9,21 +9,17 @@ namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal StreamingChatToolCallUpdate(int index, string toolCallId, ChatToolCallKind kind, InternalChatCompletionMessageToolCallChunkFunction function, IDictionary serializedAdditionalRawData) + internal StreamingChatToolCallUpdate(int index, InternalChatCompletionMessageToolCallChunkFunction function, Chat.ChatToolCallKind kind, string toolCallId, IDictionary additionalBinaryDataProperties) { Index = index; - ToolCallId = toolCallId; - Kind = kind; Function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; - } - - internal StreamingChatToolCallUpdate() - { + Kind = kind; + ToolCallId = toolCallId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int Index { get; } + public int Index { get; set; } } } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index a5ca37aaa..910d6c972 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -7,68 +7,93 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class SystemChatMessage : IJsonModel { - SystemChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal SystemChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SystemChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SystemChatMessage)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (Optional.IsDefined(ParticipantName)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(ParticipantName); } + } + + SystemChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SystemChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSystemChatMessage(document.RootElement, options); } - internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData content = default; + string participantName = default; + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + participantName = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. - return new SystemChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name); + return new SystemChatMessage(content, participantName, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -78,15 +103,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - SystemChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + SystemChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SystemChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeSystemChatMessage(document.RootElement, options); } default: @@ -96,15 +122,16 @@ SystemChatMessage IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new SystemChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(SystemChatMessage systemChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSystemChatMessage(document.RootElement); + return BinaryContent.Create(systemChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator SystemChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeSystemChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index dfd6b9afd..e52728cff 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -4,18 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class SystemChatMessage : ChatMessage { - internal SystemChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string participantName) : base(role, content, serializedAdditionalRawData) + public SystemChatMessage(BinaryData content) { - ParticipantName = participantName; + Argument.AssertNotNull(content, nameof(content)); + + Content = content; } - internal SystemChatMessage() + internal SystemChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + ParticipantName = participantName; } + + public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index d5cb1a2ce..56ad8b167 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -7,197 +7,153 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Assistants { public partial class ThreadRun : IJsonModel { + internal ThreadRun() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadRun)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (RequiredAction != null) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("required_action"u8); + writer.WriteObjectValue(RequiredAction, options); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true) + else { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); + writer.WriteNull("requiredAction"u8); } - if (SerializedAdditionalRawData?.ContainsKey("created_at") != true) + if (LastError != null) { - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); } - if (SerializedAdditionalRawData?.ContainsKey("thread_id") != true) + else { - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); + writer.WriteNull("lastError"u8); } - if (SerializedAdditionalRawData?.ContainsKey("assistant_id") != true) + if (ExpiresAt != null) { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("status") != true) + else { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteNull("expiresAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("required_action") != true) + if (StartedAt != null) { - if (_internalRequiredAction != null) - { - writer.WritePropertyName("required_action"u8); - writer.WriteObjectValue(_internalRequiredAction, options); - } - else - { - writer.WriteNull("required_action"); - } + writer.WritePropertyName("started_at"u8); + writer.WriteNumberValue(StartedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("last_error") != true) + else { - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } + writer.WriteNull("startedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("expires_at") != true) + if (CancelledAt != null) { - if (ExpiresAt != null) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt.Value, "U"); - } - else - { - writer.WriteNull("expires_at"); - } + writer.WritePropertyName("cancelled_at"u8); + writer.WriteNumberValue(CancelledAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("started_at") != true) + else { - if (StartedAt != null) - { - writer.WritePropertyName("started_at"u8); - writer.WriteNumberValue(StartedAt.Value, "U"); - } - else - { - writer.WriteNull("started_at"); - } + writer.WriteNull("cancelledAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("cancelled_at") != true) + if (FailedAt != null) { - if (CancelledAt != null) - { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); - } - else - { - writer.WriteNull("cancelled_at"); - } + writer.WritePropertyName("failed_at"u8); + writer.WriteNumberValue(FailedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("failed_at") != true) + else { - if (FailedAt != null) - { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); - } - else - { - writer.WriteNull("failed_at"); - } + writer.WriteNull("failedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("completed_at") != true) + if (CompletedAt != null) { - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (SerializedAdditionalRawData?.ContainsKey("incomplete_details") != true) + else { - if (IncompleteDetails != null) - { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); - } - else - { - writer.WriteNull("incomplete_details"); - } + writer.WriteNull("completedAt"u8); } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) + if (IncompleteDetails != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("incomplete_details"u8); + writer.WriteObjectValue(IncompleteDetails, options); } - if (SerializedAdditionalRawData?.ContainsKey("instructions") != true) + else { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); + writer.WriteNull("incompleteDetails"u8); } - if (SerializedAdditionalRawData?.ContainsKey("tools") != true) + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ToolDefinition item in Tools) { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (SerializedAdditionalRawData?.ContainsKey("metadata") != true) + writer.WriteEndArray(); + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + writer.WritePropertyName(item.Key); + if (item.Value == null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteNullValue(); + continue; } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); + writer.WriteStringValue(item.Value); } + writer.WriteEndObject(); } - if (SerializedAdditionalRawData?.ContainsKey("usage") != true) + else { - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - else - { - writer.WriteNull("usage"); - } + writer.WriteNull("metadata"u8); + } + if (Usage != null) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } + else + { + writer.WriteNull("usage"u8); } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true && Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature)) { if (Temperature != null) { @@ -206,97 +162,77 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("temperature"); + writer.WriteNull("temperature"u8); } } - if (SerializedAdditionalRawData?.ContainsKey("top_p") != true && Optional.IsDefined(NucleusSamplingFactor)) + if (TruncationStrategy != null) { - if (NucleusSamplingFactor != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(NucleusSamplingFactor.Value); - } - else - { - writer.WriteNull("top_p"); - } + writer.WritePropertyName("truncation_strategy"u8); + writer.WriteObjectValue(TruncationStrategy, options); } - if (SerializedAdditionalRawData?.ContainsKey("max_prompt_tokens") != true) + else { - if (MaxInputTokenCount != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxInputTokenCount.Value); - } - else - { - writer.WriteNull("max_prompt_tokens"); - } + writer.WriteNull("truncationStrategy"u8); } - if (SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") != true) + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); + if (ResponseFormat != null) { - if (MaxOutputTokenCount != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxOutputTokenCount.Value); - } - else - { - writer.WriteNull("max_completion_tokens"); - } + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); } - if (SerializedAdditionalRawData?.ContainsKey("truncation_strategy") != true) + else { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); - } + writer.WriteNull("responseFormat"u8); } - if (SerializedAdditionalRawData?.ContainsKey("tool_choice") != true) + if (ToolConstraint != null) { - if (ToolConstraint != null) - { - writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolConstraint, options); - } - else - { - writer.WriteNull("tool_choice"); - } + writer.WritePropertyName("tool_choice"u8); + writer.WriteObjectValue(ToolConstraint, options); } - if (SerializedAdditionalRawData?.ContainsKey("parallel_tool_calls") != true) + else { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(AllowParallelToolCalls.Value); + writer.WriteNull("toolChoice"u8); } - if (SerializedAdditionalRawData?.ContainsKey("response_format") != true) + if (Optional.IsDefined(NucleusSamplingFactor)) { - if (ResponseFormat != null) + if (NucleusSamplingFactor != null) { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + writer.WritePropertyName("top_p"u8); + writer.WriteNumberValue(NucleusSamplingFactor.Value); } else { - writer.WriteNull("response_format"); + writer.WriteNull("topP"u8); } } - if (SerializedAdditionalRawData != null) + writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(AllowParallelToolCalls.Value); + if (MaxInputTokenCount != null) + { + writer.WritePropertyName("max_prompt_tokens"u8); + writer.WriteNumberValue(MaxInputTokenCount.Value); + } + else + { + writer.WriteNull("maxPromptTokens"u8); + } + if (MaxOutputTokenCount != null) + { + writer.WritePropertyName("max_completion_tokens"u8); + writer.WriteNumberValue(MaxOutputTokenCount.Value); + } + else { - foreach (var item in SerializedAdditionalRawData) + writer.WriteNull("maxCompletionTokens"u8); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -305,31 +241,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } - ThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ThreadRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ThreadRun)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeThreadRun(document.RootElement, options); } - internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderWriterOptions options = null) + internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; - InternalRunObjectObject @object = default; DateTimeOffset createdAt = default; string threadId = default; string assistantId = default; @@ -344,261 +277,260 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW RunIncompleteDetails incompleteDetails = default; string model = default; string instructions = default; - IReadOnlyList tools = default; - IReadOnlyDictionary metadata = default; + IList tools = default; + IDictionary metadata = default; RunTokenUsage usage = default; float? temperature = default; - float? topP = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; - ToolConstraint toolChoice = default; - bool? parallelToolCalls = default; + InternalRunObjectObject @object = default; AssistantResponseFormat responseFormat = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + ToolConstraint toolConstraint = default; + float? nucleusSamplingFactor = default; + bool? allowParallelToolCalls = default; + int? maxInputTokenCount = default; + int? maxOutputTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("id"u8)) { - @object = new InternalRunObjectObject(property.Value.GetString()); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("created_at"u8)) + if (prop.NameEquals("created_at"u8)) { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("thread_id"u8)) + if (prop.NameEquals("thread_id"u8)) { - threadId = property.Value.GetString(); + threadId = prop.Value.GetString(); continue; } - if (property.NameEquals("assistant_id"u8)) + if (prop.NameEquals("assistant_id"u8)) { - assistantId = property.Value.GetString(); + assistantId = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = new RunStatus(property.Value.GetString()); + status = new RunStatus(prop.Value.GetString()); continue; } - if (property.NameEquals("required_action"u8)) + if (prop.NameEquals("required_action"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { requiredAction = null; continue; } - requiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(property.Value, options); + requiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } - if (property.NameEquals("last_error"u8)) + if (prop.NameEquals("last_error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { lastError = null; continue; } - lastError = RunError.DeserializeRunError(property.Value, options); + lastError = RunError.DeserializeRunError(prop.Value, options); continue; } - if (property.NameEquals("expires_at"u8)) + if (prop.NameEquals("expires_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { expiresAt = null; continue; } - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("started_at"u8)) + if (prop.NameEquals("started_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { startedAt = null; continue; } - startedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + startedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("cancelled_at"u8)) + if (prop.NameEquals("cancelled_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { cancelledAt = null; continue; } - cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("failed_at"u8)) + if (prop.NameEquals("failed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { failedAt = null; continue; } - failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + failedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("completed_at"u8)) + if (prop.NameEquals("completed_at"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { completedAt = null; continue; } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (property.NameEquals("incomplete_details"u8)) + if (prop.NameEquals("incomplete_details"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { incompleteDetails = null; continue; } - incompleteDetails = RunIncompleteDetails.DeserializeRunIncompleteDetails(property.Value, options); + incompleteDetails = RunIncompleteDetails.DeserializeRunIncompleteDetails(prop.Value, options); continue; } - if (property.NameEquals("model"u8)) + if (prop.NameEquals("model"u8)) { - model = property.Value.GetString(); + model = prop.Value.GetString(); continue; } - if (property.NameEquals("instructions"u8)) + if (prop.NameEquals("instructions"u8)) { - instructions = property.Value.GetString(); + instructions = prop.Value.GetString(); continue; } - if (property.NameEquals("tools"u8)) + if (prop.NameEquals("tools"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); } tools = array; continue; } - if (property.NameEquals("metadata"u8)) + if (prop.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { metadata = new ChangeTrackingDictionary(); continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } metadata = dictionary; continue; } - if (property.NameEquals("usage"u8)) + if (prop.NameEquals("usage"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { usage = null; continue; } - usage = RunTokenUsage.DeserializeRunTokenUsage(property.Value, options); + usage = RunTokenUsage.DeserializeRunTokenUsage(prop.Value, options); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("temperature"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { temperature = null; continue; } - temperature = property.Value.GetSingle(); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("top_p"u8)) + if (prop.NameEquals("truncation_strategy"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - topP = null; + truncationStrategy = null; continue; } - topP = property.Value.GetSingle(); + truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); continue; } - if (property.NameEquals("max_prompt_tokens"u8)) + if (prop.NameEquals("object"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxPromptTokens = null; - continue; - } - maxPromptTokens = property.Value.GetInt32(); + @object = InternalRunObjectObject.DeserializeInternalRunObjectObject(prop.Value, options); continue; } - if (property.NameEquals("max_completion_tokens"u8)) + if (prop.NameEquals("response_format"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxCompletionTokens = null; - continue; - } - maxCompletionTokens = property.Value.GetInt32(); + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); continue; } - if (property.NameEquals("truncation_strategy"u8)) + if (prop.NameEquals("tool_choice"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); + continue; + } + if (prop.NameEquals("top_p"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) { - truncationStrategy = null; + nucleusSamplingFactor = null; continue; } - truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(property.Value, options); + nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (property.NameEquals("tool_choice"u8)) + if (prop.NameEquals("parallel_tool_calls"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; + allowParallelToolCalls = null; continue; } - toolChoice = Assistants.ToolConstraint.DeserializeToolConstraint(property.Value, options); + allowParallelToolCalls = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("parallel_tool_calls"u8)) + if (prop.NameEquals("max_prompt_tokens"u8)) { - parallelToolCalls = property.Value.GetBoolean(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + maxInputTokenCount = null; + continue; + } + maxInputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("response_format"u8)) + if (prop.NameEquals("max_completion_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; + maxOutputTokenCount = null; continue; } - responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(property.Value, options); + maxOutputTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ThreadRun( id, - @object, createdAt, threadId, assistantId, @@ -617,20 +549,22 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW metadata, usage, temperature, - topP, - maxPromptTokens, - maxCompletionTokens, truncationStrategy, - toolChoice, - parallelToolCalls, + @object, responseFormat, - serializedAdditionalRawData); + toolConstraint, + nucleusSamplingFactor, + allowParallelToolCalls, + maxInputTokenCount, + maxOutputTokenCount, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -640,15 +574,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeThreadRun(document.RootElement, options); } default: @@ -658,15 +593,16 @@ ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriter string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ThreadRun FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ThreadRun threadRun) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeThreadRun(document.RootElement); + return BinaryContent.Create(threadRun, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ThreadRun(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeThreadRun(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 65ab7b089..63aeaaa11 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -10,17 +10,45 @@ namespace OpenAI.Assistants { public partial class ThreadRun { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IReadOnlyList tools, IReadOnlyDictionary metadata, RunTokenUsage usage, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat, IDictionary serializedAdditionalRawData) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount) { Id = id; + CreatedAt = createdAt; + ThreadId = threadId; + AssistantId = assistantId; + Status = status; + RequiredAction = requiredAction; + LastError = lastError; + ExpiresAt = expiresAt; + StartedAt = startedAt; + CancelledAt = cancelledAt; + FailedAt = failedAt; + CompletedAt = completedAt; + IncompleteDetails = incompleteDetails; + Model = model; + Instructions = instructions; + Tools = tools.ToList(); + Metadata = metadata; + Usage = usage; + TruncationStrategy = truncationStrategy; Object = @object; + ResponseFormat = responseFormat; + ToolConstraint = toolConstraint; + AllowParallelToolCalls = allowParallelToolCalls; + MaxInputTokenCount = maxInputTokenCount; + MaxOutputTokenCount = maxOutputTokenCount; + } + + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, IDictionary additionalBinaryDataProperties) + { + Id = id; CreatedAt = createdAt; ThreadId = threadId; AssistantId = assistantId; Status = status; - _internalRequiredAction = internalRequiredAction; + RequiredAction = requiredAction; LastError = lastError; ExpiresAt = expiresAt; StartedAt = startedAt; @@ -34,39 +62,55 @@ internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset cr Metadata = metadata; Usage = usage; Temperature = temperature; - NucleusSamplingFactor = nucleusSamplingFactor; - MaxInputTokenCount = maxInputTokenCount; - MaxOutputTokenCount = maxOutputTokenCount; TruncationStrategy = truncationStrategy; + Object = @object; + ResponseFormat = responseFormat; ToolConstraint = toolConstraint; + NucleusSamplingFactor = nucleusSamplingFactor; AllowParallelToolCalls = allowParallelToolCalls; - ResponseFormat = responseFormat; - SerializedAdditionalRawData = serializedAdditionalRawData; + MaxInputTokenCount = maxInputTokenCount; + MaxOutputTokenCount = maxOutputTokenCount; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal ThreadRun() - { - } + public string Id { get; set; } + + public DateTimeOffset CreatedAt { get; set; } + + public string ThreadId { get; set; } + + public string AssistantId { get; set; } + + public RunStatus Status { get; set; } + + public InternalRunRequiredAction RequiredAction { get; set; } + + public RunError LastError { get; set; } + + public DateTimeOffset? ExpiresAt { get; set; } + + public DateTimeOffset? StartedAt { get; set; } + + public DateTimeOffset? CancelledAt { get; set; } + + public DateTimeOffset? FailedAt { get; set; } + + public DateTimeOffset? CompletedAt { get; set; } + + public RunIncompleteDetails IncompleteDetails { get; set; } + + public string Model { get; set; } + + public string Instructions { get; set; } + + public IList Tools { get; } + + public IDictionary Metadata { get; set; } + + public RunTokenUsage Usage { get; set; } + + public float? Temperature { get; set; } - public string Id { get; } - - public DateTimeOffset CreatedAt { get; } - public string ThreadId { get; } - public string AssistantId { get; } - public RunStatus Status { get; } - public RunError LastError { get; } - public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? StartedAt { get; } - public DateTimeOffset? CancelledAt { get; } - public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? CompletedAt { get; } - public RunIncompleteDetails IncompleteDetails { get; } - public string Model { get; } - public string Instructions { get; } - public IReadOnlyList Tools { get; } - public IReadOnlyDictionary Metadata { get; } - public RunTokenUsage Usage { get; } - public float? Temperature { get; } - public RunTruncationStrategy TruncationStrategy { get; } + public RunTruncationStrategy TruncationStrategy { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index ed9101ecb..39717f3ea 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -7,68 +7,90 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class ToolChatMessage : IJsonModel { - ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal ToolChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ToolChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ToolChatMessage)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("tool_call_id"u8); + writer.WriteStringValue(ToolCallId); + } + ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ToolChatMessage)JsonModelCreateCore(ref reader, options); + + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeToolChatMessage(document.RootElement, options); } - internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + BinaryData content = default; string toolCallId = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tool_call_id"u8)) + if (prop.NameEquals("content"u8)) { - toolCallId = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("tool_call_id"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + toolCallId = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. - return new ToolChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, toolCallId); + return new ToolChatMessage(content, toolCallId, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -78,15 +100,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - ToolChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ToolChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ToolChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeToolChatMessage(document.RootElement, options); } default: @@ -96,15 +119,16 @@ ToolChatMessage IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ToolChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ToolChatMessage toolChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeToolChatMessage(document.RootElement); + return BinaryContent.Create(toolChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ToolChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeToolChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index dc9868382..9d23b5d39 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -4,20 +4,29 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class ToolChatMessage : ChatMessage { - internal ToolChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string toolCallId) : base(role, content, serializedAdditionalRawData) + public ToolChatMessage(BinaryData content, string toolCallId) { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(toolCallId, nameof(toolCallId)); + + Content = content; ToolCallId = toolCallId; } - internal ToolChatMessage() + internal ToolChatMessage(BinaryData content, string toolCallId, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + ToolCallId = toolCallId; } - public string ToolCallId { get; } + public BinaryData Content { get; set; } + + public string ToolCallId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index 6af68a9e9..f4e4621c1 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -7,86 +7,62 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Audio { - public partial struct TranscribedSegment : IJsonModel, IJsonModel + public readonly partial struct TranscribedSegment : IJsonModel, IJsonModel { + public TranscribedSegment() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedSegment)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - writer.WritePropertyName("id"u8); - writer.WriteNumberValue(Id); - } - if (SerializedAdditionalRawData?.ContainsKey("seek") != true) - { - writer.WritePropertyName("seek"u8); - writer.WriteNumberValue(SeekOffset); - } - if (SerializedAdditionalRawData?.ContainsKey("start") != true) - { - writer.WritePropertyName("start"u8); - writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("end") != true) - { - writer.WritePropertyName("end"u8); - writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); - } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (SerializedAdditionalRawData?.ContainsKey("tokens") != true) - { - writer.WritePropertyName("tokens"u8); - writer.WriteStartArray(); - foreach (var item in TokenIds.Span) + writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); + writer.WritePropertyName("compression_ratio"u8); + writer.WriteNumberValue(CompressionRatio); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); + writer.WritePropertyName("seek"u8); + writer.WriteNumberValue(SeekOffset); + writer.WritePropertyName("tokens"u8); + writer.WriteStartArray(); + foreach (int item in TokenIds.Span) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("avg_logprob"u8); + writer.WriteNumberValue(AverageLogProbability); + writer.WritePropertyName("no_speech_prob"u8); + writer.WriteNumberValue(NoSpeechProbability); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (SerializedAdditionalRawData?.ContainsKey("temperature") != true) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature); - } - if (SerializedAdditionalRawData?.ContainsKey("avg_logprob") != true) - { - writer.WritePropertyName("avg_logprob"u8); - writer.WriteNumberValue(AverageLogProbability); - } - if (SerializedAdditionalRawData?.ContainsKey("compression_ratio") != true) - { - writer.WritePropertyName("compression_ratio"u8); - writer.WriteNumberValue(CompressionRatio); - } - if (SerializedAdditionalRawData?.ContainsKey("no_speech_prob") != true) - { - writer.WritePropertyName("no_speech_prob"u8); - writer.WriteNumberValue(NoSpeechProbability); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -95,129 +71,123 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } - TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual TranscribedSegment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TranscribedSegment)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeTranscribedSegment(document.RootElement, options); } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); - - object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); - - internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement element, ModelReaderWriterOptions options = null) + internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } int id = default; - int seek = default; - TimeSpan start = default; - TimeSpan end = default; string text = default; - ReadOnlyMemory tokens = default; float temperature = default; - float avgLogprob = default; float compressionRatio = default; - float noSpeechProb = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) + TimeSpan startTime = default; + TimeSpan endTime = default; + int seekOffset = default; + ReadOnlyMemory tokenIds = default; + float averageLogProbability = default; + float noSpeechProbability = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) { - id = property.Value.GetInt32(); + id = prop.Value.GetInt32(); continue; } - if (property.NameEquals("seek"u8)) + if (prop.NameEquals("text"u8)) { - seek = property.Value.GetInt32(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("start"u8)) + if (prop.NameEquals("temperature"u8)) { - start = TimeSpan.FromSeconds(property.Value.GetDouble()); + temperature = prop.Value.GetSingle(); continue; } - if (property.NameEquals("end"u8)) + if (prop.NameEquals("compression_ratio"u8)) { - end = TimeSpan.FromSeconds(property.Value.GetDouble()); + compressionRatio = prop.Value.GetSingle(); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("start"u8)) { - text = property.Value.GetString(); + startTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("tokens"u8)) + if (prop.NameEquals("end"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - int index = 0; - int[] array = new int[property.Value.GetArrayLength()]; - foreach (var item in property.Value.EnumerateArray()) - { - array[index] = item.GetInt32(); - index++; - } - tokens = new ReadOnlyMemory(array); + endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (property.NameEquals("temperature"u8)) + if (prop.NameEquals("seek"u8)) { - temperature = property.Value.GetSingle(); + seekOffset = prop.Value.GetInt32(); continue; } - if (property.NameEquals("avg_logprob"u8)) + if (prop.NameEquals("tokens"u8)) { - avgLogprob = property.Value.GetSingle(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + tokenIds = array; continue; } - if (property.NameEquals("compression_ratio"u8)) + if (prop.NameEquals("avg_logprob"u8)) { - compressionRatio = property.Value.GetSingle(); + averageLogProbability = prop.Value.GetSingle(); continue; } - if (property.NameEquals("no_speech_prob"u8)) + if (prop.NameEquals("no_speech_prob"u8)) { - noSpeechProb = property.Value.GetSingle(); + noSpeechProbability = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new TranscribedSegment( id, - seek, - start, - end, text, - tokens, temperature, - avgLogprob, compressionRatio, - noSpeechProb, - serializedAdditionalRawData); + startTime, + endTime, + seekOffset, + tokenIds, + averageLogProbability, + noSpeechProbability, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -227,15 +197,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - TranscribedSegment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + TranscribedSegment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual TranscribedSegment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeTranscribedSegment(document.RootElement, options); } default: @@ -245,21 +216,26 @@ TranscribedSegment IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); - - object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); - - internal static TranscribedSegment FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(TranscribedSegment transcribedSegment) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTranscribedSegment(document.RootElement); + return BinaryContent.Create(transcribedSegment, ModelSerializationExtensions.WireOptions); } - internal BinaryContent ToBinaryContent() + public static explicit operator TranscribedSegment(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeTranscribedSegment(document.RootElement, ModelSerializationExtensions.WireOptions); } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)this).Write(writer, options); + + object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)this).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ((IPersistableModel)this).Write(options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)this).GetFormatFromOptions(options); + + object IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ((IPersistableModel)this).Create(data, options); } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index fb245f402..c036fbcb6 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -9,44 +9,43 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedSegment { - internal TranscribedSegment(int id, int seekOffset, TimeSpan startTime, TimeSpan endTime, string text, ReadOnlyMemory tokenIds, float temperature, float averageLogProbability, float compressionRatio, float noSpeechProbability) - { - Argument.AssertNotNull(text, nameof(text)); + private protected IDictionary _additionalBinaryDataProperties; + internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, ReadOnlyMemory tokenIds, float averageLogProbability, float noSpeechProbability) + { Id = id; - SeekOffset = seekOffset; + Text = text; + Temperature = temperature; + CompressionRatio = compressionRatio; StartTime = startTime; EndTime = endTime; - Text = text; + SeekOffset = seekOffset; TokenIds = tokenIds; - Temperature = temperature; AverageLogProbability = averageLogProbability; - CompressionRatio = compressionRatio; NoSpeechProbability = noSpeechProbability; } - internal TranscribedSegment(int id, int seekOffset, TimeSpan startTime, TimeSpan endTime, string text, ReadOnlyMemory tokenIds, float temperature, float averageLogProbability, float compressionRatio, float noSpeechProbability, IDictionary serializedAdditionalRawData) + internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, ReadOnlyMemory tokenIds, float averageLogProbability, float noSpeechProbability, IDictionary additionalBinaryDataProperties) { Id = id; - SeekOffset = seekOffset; + Text = text; + Temperature = temperature; + CompressionRatio = compressionRatio; StartTime = startTime; EndTime = endTime; - Text = text; + SeekOffset = seekOffset; TokenIds = tokenIds; - Temperature = temperature; AverageLogProbability = averageLogProbability; - CompressionRatio = compressionRatio; NoSpeechProbability = noSpeechProbability; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public TranscribedSegment() - { - } + public int Id { get; set; } + + public string Text { get; set; } + + public float Temperature { get; set; } - public int Id { get; } - public string Text { get; } - public float Temperature { get; } - public float CompressionRatio { get; } + public float CompressionRatio { get; set; } } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs deleted file mode 100644 index 225ca656a..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeContentPart : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationContentPart(document.RootElement, options); - } - - internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationContentPartKind type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ConversationContentPartKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeContentPart(type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{options.Format}' format."); - } - } - - ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationContentPart(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeContentPart FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeContentPart(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs deleted file mode 100644 index 64cbf4dfc..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeContentPart : ConversationContentPart - { - internal UnknownRealtimeContentPart(ConversationContentPartKind type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeContentPart() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs deleted file mode 100644 index f70bd7c3c..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeRequestCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true && Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); - } - - internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestCommandType type = "Unknown"; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestCommandType(property.Value.GetString()); - continue; - } - if (property.NameEquals("event_id"u8)) - { - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeRequestCommand(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeRequestCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeRequestCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs deleted file mode 100644 index 952508ab8..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeRequestCommand : InternalRealtimeRequestCommand - { - internal UnknownRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeRequestCommand() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs deleted file mode 100644 index 55e8e5dbf..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeRequestItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItem(document.RootElement, options); - } - - internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeRequestItemType type = "Unknown"; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeRequestItem(type, id, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{options.Format}' format."); - } - } - - ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeRequestItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeRequestItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs deleted file mode 100644 index e082a4d7d..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeRequestItem : ConversationItem - { - internal UnknownRealtimeRequestItem(InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData) : base(type, id, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeRequestItem() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs deleted file mode 100644 index 40cda0afb..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseCommand : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationUpdate(document.RootElement, options); - } - - internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeResponseCommand(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeResponseCommand(type, eventId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeResponseCommand FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeResponseCommand(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs deleted file mode 100644 index 83579fbec..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseCommand : ConversationUpdate - { - internal UnknownRealtimeResponseCommand(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeResponseCommand() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs deleted file mode 100644 index 9a7487d9d..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseItem : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("object") != true) - { - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("id") != true) - { - if (Id != null) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - else - { - writer.WriteNull("id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseItem(document.RootElement, options); - } - - internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType type = "Unknown"; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new InternalRealtimeResponseItemObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new InternalRealtimeRequestItemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeResponseItem(@object, type, id, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeResponseItem FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeResponseItem(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs deleted file mode 100644 index cc2edc03d..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseItem : InternalRealtimeResponseItem - { - internal UnknownRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType type, string id, IDictionary serializedAdditionalRawData) : base(@object, type, id, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeResponseItem() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs deleted file mode 100644 index 35bb140ab..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseStatusDetails : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeResponseStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); - } - - internal static UnknownRealtimeResponseStatusDetails DeserializeUnknownRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationStatus type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ConversationStatus(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeResponseStatusDetails(type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeResponseStatusDetails FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeResponseStatusDetails(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs deleted file mode 100644 index 3857576aa..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseStatusDetails : InternalRealtimeResponseStatusDetails - { - internal UnknownRealtimeResponseStatusDetails(ConversationStatus type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeResponseStatusDetails() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs deleted file mode 100644 index 0a570abc1..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeTool : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTool(document.RootElement, options); - } - - internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationToolKind type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ConversationToolKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeTool(type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{options.Format}' format."); - } - } - - ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTool(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeTool FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeTool(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs deleted file mode 100644 index c71d8e5c5..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeTool : ConversationTool - { - internal UnknownRealtimeTool(ConversationToolKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeTool() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs deleted file mode 100644 index 8675b9116..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeToolChoiceObject : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); - } - - internal static UnknownRealtimeToolChoiceObject DeserializeUnknownRealtimeToolChoiceObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationToolKind type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ConversationToolKind(property.Value.GetString()); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeToolChoiceObject(type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeToolChoiceObject FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeToolChoiceObject(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs deleted file mode 100644 index a3fa5eb28..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeToolChoiceObject : InternalRealtimeToolChoiceObject - { - internal UnknownRealtimeToolChoiceObject(ConversationToolKind type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeToolChoiceObject() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs deleted file mode 100644 index 3f2fd3a69..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeTurnDetection : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTurnDetectionOptions(document.RootElement, options); - } - - internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetection(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationTurnDetectionKind type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationTurnDetectionKind(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRealtimeTurnDetection(type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{options.Format}' format."); - } - } - - ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTurnDetectionOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new UnknownRealtimeTurnDetection FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownRealtimeTurnDetection(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs deleted file mode 100644 index 5234828ae..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeTurnDetection : ConversationTurnDetectionOptions - { - internal UnknownRealtimeTurnDetection(ConversationTurnDetectionKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeTurnDetection() - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 172dfb695..6fddf6e08 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -7,68 +7,93 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { public partial class UserChatMessage : IJsonModel { - UserChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal UserChatMessage() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserChatMessage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(UserChatMessage)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Content); +#else + using (JsonDocument document = JsonDocument.Parse(Content)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (Optional.IsDefined(ParticipantName)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(ParticipantName); } + } + + UserChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UserChatMessage)JsonModelCreateCore(ref reader, options); + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserChatMessage)} does not support reading '{format}' format."); + } using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeUserChatMessage(document.RootElement, options); } - internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, ModelReaderWriterOptions options = null) + internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string name = default; - ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + BinaryData content = default; + string participantName = default; + Chat.ChatMessageRole role = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (prop.NameEquals("content"u8)) { - name = property.Value.GetString(); + content = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("name"u8)) { - role = property.Value.GetString().ToChatMessageRole(); + participantName = prop.Value.GetString(); continue; } - if (property.NameEquals("content"u8)) + if (prop.NameEquals("role"u8)) { - DeserializeContentValue(property, ref content); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } - if (true) + if (options.Format != "W") { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - // CUSTOM: Initialize Content collection property. - return new UserChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name); + return new UserChatMessage(content, participantName, role, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -78,15 +103,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - UserChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + UserChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UserChatMessage)PersistableModelCreateCore(data, options); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeUserChatMessage(document.RootElement, options); } default: @@ -96,15 +122,16 @@ UserChatMessage IPersistableModel.Create(BinaryData data, Model string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new UserChatMessage FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(UserChatMessage userChatMessage) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUserChatMessage(document.RootElement); + return BinaryContent.Create(userChatMessage, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator UserChatMessage(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeUserChatMessage(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index 0f01a90ae..1c28a187d 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -4,18 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class UserChatMessage : ChatMessage { - internal UserChatMessage(ChatMessageRole role, ChatMessageContent content, IDictionary serializedAdditionalRawData, string participantName) : base(role, content, serializedAdditionalRawData) + public UserChatMessage(BinaryData content) { - ParticipantName = participantName; + Argument.AssertNotNull(content, nameof(content)); + + Content = content; } - internal UserChatMessage() + internal UserChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { + Content = content; + ParticipantName = participantName; } + + public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/ModerationClient.cs b/.dotnet/src/Generated/ModerationClient.cs index 5cfe31284..667afbd2e 100644 --- a/.dotnet/src/Generated/ModerationClient.cs +++ b/.dotnet/src/Generated/ModerationClient.cs @@ -4,42 +4,18 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Moderations { - // Data plane generated sub-client. public partial class ModerationClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected ModerationClient() { } - - internal PipelineMessage CreateCreateModerationRequest(BinaryContent content, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/moderations", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 706a03969..46f4ca606 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -4,7 +4,6 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; using System.Threading; using OpenAI.Assistants; using OpenAI.Audio; @@ -17,22 +16,115 @@ using OpenAI.LegacyCompletions; using OpenAI.Models; using OpenAI.Moderations; -using OpenAI.RealtimeConversation; using OpenAI.VectorStores; namespace OpenAI { - // Data plane generated client. public partial class OpenAIClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; + private AudioClient _cachedAudioClient; + private AssistantClient _cachedAssistantClient; + private BatchClient _cachedBatchClient; + private ChatClient _cachedChatClient; + private LegacyCompletionClient _cachedLegacyCompletionClient; + private EmbeddingClient _cachedEmbeddingClient; + private OpenAIFileClient _cachedOpenAIFileClient; + private FineTuningClient _cachedFineTuningClient; + private ImageClient _cachedImageClient; + private InternalAssistantMessageClient _cachedInternalAssistantMessageClient; + private OpenAIModelClient _cachedOpenAIModelClient; + private ModerationClient _cachedModerationClient; + private InternalAssistantThreadClient _cachedInternalAssistantThreadClient; + private InternalAssistantRunClient _cachedInternalAssistantRunClient; + private VectorStoreClient _cachedVectorStoreClient; + private InternalUploadsClient _cachedInternalUploadsClient; protected OpenAIClient() { } + + public virtual AudioClient GetAudioClientClient() + { + return Volatile.Read(ref _cachedAudioClient) ?? Interlocked.CompareExchange(ref _cachedAudioClient, new AudioClient(_keyCredential, _endpoint), null) ?? _cachedAudioClient; + } + + public virtual AssistantClient GetAssistantClientClient() + { + return Volatile.Read(ref _cachedAssistantClient) ?? Interlocked.CompareExchange(ref _cachedAssistantClient, new AssistantClient(_keyCredential, _endpoint), null) ?? _cachedAssistantClient; + } + + public virtual BatchClient GetBatchClientClient() + { + return Volatile.Read(ref _cachedBatchClient) ?? Interlocked.CompareExchange(ref _cachedBatchClient, new BatchClient(_keyCredential, _endpoint), null) ?? _cachedBatchClient; + } + + public virtual ChatClient GetChatClientClient() + { + return Volatile.Read(ref _cachedChatClient) ?? Interlocked.CompareExchange(ref _cachedChatClient, new ChatClient(_keyCredential, _endpoint), null) ?? _cachedChatClient; + } + + public virtual LegacyCompletionClient GetLegacyCompletionClientClient() + { + return Volatile.Read(ref _cachedLegacyCompletionClient) ?? Interlocked.CompareExchange(ref _cachedLegacyCompletionClient, new LegacyCompletionClient(_keyCredential, _endpoint), null) ?? _cachedLegacyCompletionClient; + } + + public virtual EmbeddingClient GetEmbeddingClientClient() + { + return Volatile.Read(ref _cachedEmbeddingClient) ?? Interlocked.CompareExchange(ref _cachedEmbeddingClient, new EmbeddingClient(_keyCredential, _endpoint), null) ?? _cachedEmbeddingClient; + } + + public virtual OpenAIFileClient GetOpenAIFileClientClient() + { + return Volatile.Read(ref _cachedOpenAIFileClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIFileClient, new OpenAIFileClient(_keyCredential, _endpoint), null) ?? _cachedOpenAIFileClient; + } + + public virtual FineTuningClient GetFineTuningClientClient() + { + return Volatile.Read(ref _cachedFineTuningClient) ?? Interlocked.CompareExchange(ref _cachedFineTuningClient, new FineTuningClient(_keyCredential, _endpoint), null) ?? _cachedFineTuningClient; + } + + public virtual ImageClient GetImageClientClient() + { + return Volatile.Read(ref _cachedImageClient) ?? Interlocked.CompareExchange(ref _cachedImageClient, new ImageClient(_keyCredential, _endpoint), null) ?? _cachedImageClient; + } + + public virtual InternalAssistantMessageClient GetInternalAssistantMessageClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantMessageClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantMessageClient, new InternalAssistantMessageClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantMessageClient; + } + + public virtual OpenAIModelClient GetOpenAIModelClientClient() + { + return Volatile.Read(ref _cachedOpenAIModelClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIModelClient, new OpenAIModelClient(_keyCredential, _endpoint), null) ?? _cachedOpenAIModelClient; + } + + public virtual ModerationClient GetModerationClientClient() + { + return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(_keyCredential, _endpoint), null) ?? _cachedModerationClient; + } + + public virtual InternalAssistantThreadClient GetInternalAssistantThreadClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; + } + + public virtual InternalAssistantRunClient GetInternalAssistantRunClientClient() + { + return Volatile.Read(ref _cachedInternalAssistantRunClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantRunClient, new InternalAssistantRunClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantRunClient; + } + + public virtual VectorStoreClient GetVectorStoreClientClient() + { + return Volatile.Read(ref _cachedVectorStoreClient) ?? Interlocked.CompareExchange(ref _cachedVectorStoreClient, new VectorStoreClient(_keyCredential, _endpoint), null) ?? _cachedVectorStoreClient; + } + + public virtual InternalUploadsClient GetInternalUploadsClientClient() + { + return Volatile.Read(ref _cachedInternalUploadsClient) ?? Interlocked.CompareExchange(ref _cachedInternalUploadsClient, new InternalUploadsClient(_keyCredential, _endpoint), null) ?? _cachedInternalUploadsClient; + } } } diff --git a/.dotnet/src/Generated/FileClient.RestClient.cs b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs similarity index 93% rename from .dotnet/src/Generated/FileClient.RestClient.cs rename to .dotnet/src/Generated/OpenAIFileClient.RestClient.cs index a409b53c4..ac5561391 100644 --- a/.dotnet/src/Generated/FileClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs @@ -9,17 +9,17 @@ namespace OpenAI.Files { - public partial class FileClient + public partial class OpenAIFileClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.FileClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static OpenAI.OpenAIFileClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.FileClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.FileClient.Classifier2xxAnd4xx(); + private static OpenAI.OpenAIFileClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.OpenAIFileClient.Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string contentType, RequestOptions options) { diff --git a/.dotnet/src/Generated/OpenAIFileClient.cs b/.dotnet/src/Generated/OpenAIFileClient.cs index 8e52efabb..a498cebdc 100644 --- a/.dotnet/src/Generated/OpenAIFileClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.cs @@ -9,105 +9,39 @@ namespace OpenAI.Files { - // Data plane generated sub-client. public partial class OpenAIFileClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected OpenAIFileClient() { } - internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string contentType, RequestOptions options) - { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "POST"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", contentType); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetFilesRequest(string purpose, RequestOptions options) + public virtual ClientResult ListFiles(string purpose, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files", false); - if (purpose != null) - { - uri.AppendQuery("purpose", purpose, true); - } - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListFilesRequest(purpose, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateRetrieveFileRequest(string fileId, RequestOptions options) + public virtual async Task ListFilesAsync(string purpose, RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListFilesRequest(purpose, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteFileRequest(string fileId, RequestOptions options) + public virtual ClientResult ListFiles(string purpose) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListFiles(purpose, null); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } - internal PipelineMessage CreateDownloadFileRequest(string fileId, RequestOptions options) + public virtual async Task> ListFilesAsync(string purpose) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendPath("/content", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = await ListFilesAsync(purpose, null).ConfigureAwait(false); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); } } diff --git a/.dotnet/src/Generated/ModelClient.RestClient.cs b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs similarity index 90% rename from .dotnet/src/Generated/ModelClient.RestClient.cs rename to .dotnet/src/Generated/OpenAIModelClient.RestClient.cs index 7d2de8105..76b4352f2 100644 --- a/.dotnet/src/Generated/ModelClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs @@ -8,17 +8,17 @@ namespace OpenAI.Models { - public partial class ModelClient + public partial class OpenAIModelClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.ModelClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static OpenAI.OpenAIModelClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.ModelClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ModelClient.Classifier2xxAnd4xx(); + private static OpenAI.OpenAIModelClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.OpenAIModelClient.Classifier2xxAnd4xx(); internal PipelineMessage CreateListModelsRequest(RequestOptions options) { diff --git a/.dotnet/src/Generated/OpenAIModelClient.cs b/.dotnet/src/Generated/OpenAIModelClient.cs index 0296874f0..930ebb7cd 100644 --- a/.dotnet/src/Generated/OpenAIModelClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.cs @@ -9,67 +9,39 @@ namespace OpenAI.Models { - // Data plane generated sub-client. public partial class OpenAIModelClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected OpenAIModelClient() { } - internal PipelineMessage CreateGetModelsRequest(RequestOptions options) + public virtual ClientResult ListModels(RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - internal PipelineMessage CreateRetrieveModelRequest(string model, RequestOptions options) + public virtual async Task ListModelsAsync(RequestOptions options) { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "GET"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models/", false); - uri.AppendPath(model, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - internal PipelineMessage CreateDeleteModelRequest(string model, RequestOptions options) + public virtual ClientResult ListModels() { - var message = _pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - var request = message.Request; - request.Method = "DELETE"; - var uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/models/", false); - uri.AppendPath(model, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; + ClientResult result = ListModels(null); + return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task> ListModelsAsync() + { + ClientResult result = await ListModelsAsync(null).ConfigureAwait(false); + return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index ff52fc4c9..ed22c549e 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -9,356 +9,894 @@ using OpenAI.Audio; using OpenAI.Chat; using OpenAI.Embeddings; +using OpenAI.Files; using OpenAI.Images; +using OpenAI.Models; using OpenAI.Moderations; -using OpenAI.RealtimeConversation; using OpenAI.VectorStores; namespace OpenAI { - internal static partial class OpenAIModelFactory + public static partial class OpenAIModelFactory { + public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdAt = default, string filename = default, Files.FilePurpose purpose = default, int? sizeInBytes = default) + { + + return new OpenAIFile( + id, + createdAt, + filename, + purpose, + sizeInBytes, + null); + } + + public static VectorStore VectorStore(string id = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default, InternalVectorStoreObjectObject @object = default, VectorStoreExpirationPolicy expirationPolicy = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStore( + id, + createdAt, + name, + usageBytes, + fileCounts, + status, + expiresAt, + lastActiveAt, + metadata, + @object, + expirationPolicy, + null); + } + public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) { + return new VectorStoreFileCounts( inProgress, completed, failed, cancelled, total, - serializedAdditionalRawData: null); + null); } - public static VectorStoreFileAssociationError VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code = default, string message = null) + public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy() { - return new VectorStoreFileAssociationError(code, message, serializedAdditionalRawData: null); + + return new VectorStoreExpirationPolicy(null); } - public static RunError RunError(RunErrorCode code = default, string message = null) + public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default, FileChunkingStrategy chunkingStrategy = default) { - return new RunError(code, message, serializedAdditionalRawData: null); + fileIds ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreCreationOptions( + fileIds?.ToList(), + name, + metadata, + expirationPolicy, + chunkingStrategy, + null); } - public static RunIncompleteDetails RunIncompleteDetails(RunIncompleteReason? reason = null) + public static VectorStoreModificationOptions VectorStoreModificationOptions(string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default) { - return new RunIncompleteDetails(reason, serializedAdditionalRawData: null); + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreModificationOptions(name, metadata, expirationPolicy, null); } - public static RunTokenUsage RunTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) + public static VectorStoreDeletionResult VectorStoreDeletionResult(bool deleted = default, string vectorStoreId = default) { - return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, serializedAdditionalRawData: null); + + return new VectorStoreDeletionResult(deleted, vectorStoreId, null); } - public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null) + public static VectorStoreFileAssociation VectorStoreFileAssociation(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, InternalVectorStoreFileObjectObject @object = default, string fileId = default, int size = default, FileChunkingStrategy chunkingStrategy = default) { - return new RunStepError(code, message, serializedAdditionalRawData: null); + + return new VectorStoreFileAssociation( + createdAt, + vectorStoreId, + status, + lastError, + @object, + fileId, + size, + chunkingStrategy, + null); } - public static RunStepTokenUsage RunStepTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) + public static VectorStoreFileAssociationError VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code = default, string message = default) { - return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, serializedAdditionalRawData: null); + + return new VectorStoreFileAssociationError(code, message, null); } - public static ConversationUpdate ConversationUpdate(string eventId = null) + public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails @static = default) { - return new UnknownRealtimeResponseCommand(default, eventId, serializedAdditionalRawData: null); + + return new StaticFileChunkingStrategy(@static, "static", null); } - public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(string eventId = null, ConversationItem item = null) + public static FileChunkingStrategy FileChunkingStrategy(string @type = default) { - return new ConversationItemAcknowledgedUpdate(ConversationUpdateKind.ItemAcknowledged, eventId, serializedAdditionalRawData: null, item); + + return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, null); } - public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string eventId = null, string itemId = null) + public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string fileId = default, bool removed = default, InternalDeleteVectorStoreFileResponseObject @object = default) { - return new ConversationItemDeletedUpdate(ConversationUpdateKind.ItemDeleted, eventId, serializedAdditionalRawData: null, itemId); + + return new FileFromStoreRemovalResult(fileId, removed, @object, null); } - public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string eventId = null, string itemId = null, int audioEndMs = default, int index = default) + public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default) { - return new ConversationItemTruncatedUpdate( - ConversationUpdateKind.ItemTruncated, - eventId, - serializedAdditionalRawData: null, - itemId, - audioEndMs, - index); + + return new VectorStoreBatchFileJob( + @object, + createdAt, + vectorStoreId, + status, + batchId, + null); } - public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = null, ConversationOutputTokenUsageDetails outputTokenDetails = null) + public static ThreadCreationOptions ThreadCreationOptions(IDictionary metadata = default, ToolResources toolResources = default, IEnumerable internalMessages = default) { - return new ConversationTokenUsage( - totalTokens, - inputTokens, - outputTokens, - inputTokenDetails, - outputTokenDetails, - serializedAdditionalRawData: null); + metadata ??= new ChangeTrackingDictionary(); + internalMessages ??= new ChangeTrackingList(); + + return new ThreadCreationOptions(metadata, toolResources, internalMessages?.ToList(), null); } - public static ConversationInputTokenUsageDetails ConversationInputTokenUsageDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) + public static MessageCreationOptions MessageCreationOptions(IEnumerable attachments = default, IDictionary metadata = default, Assistants.MessageRole role = default, IEnumerable content = default) { - return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, serializedAdditionalRawData: null); + attachments ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + content ??= new ChangeTrackingList(); + + return new MessageCreationOptions(attachments?.ToList(), metadata, role, content?.ToList(), null); } - public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDetails(int textTokens = default, int audioTokens = default) + public static MessageContent MessageContent() { - return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, serializedAdditionalRawData: null); + + return new MessageContent(null); } - public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(string eventId = null, IEnumerable rateLimits = null) + public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) { - rateLimits ??= new List(); + tools ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdatedUpdate(ConversationUpdateKind.RateLimitsUpdated, eventId, serializedAdditionalRawData: null, rateLimits?.ToList()); + return new MessageCreationAttachment(fileId, tools?.ToList(), null); } - public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = null, int limit = default, int remaining = default, float resetSeconds = default) + public static CodeInterpreterToolDefinition CodeInterpreterToolDefinition() { - return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, serializedAdditionalRawData: null); + + return new CodeInterpreterToolDefinition("code_interpreter", null); } - public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, int contentIndex = default, BinaryData delta = null) + public static ToolDefinition ToolDefinition(string @type = default) { - return new ConversationAudioDeltaUpdate( - ConversationUpdateKind.ResponseAudioDelta, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - contentIndex, - delta); + + return new UnknownAssistantToolDefinition(@type, null); } - public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, int contentIndex = default, string delta = null) + public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch = default) { - return new ConversationOutputTranscriptionDeltaUpdate( - ConversationUpdateKind.ResponseAudioTranscriptDelta, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - contentIndex, - delta); + + return new FileSearchToolDefinition(fileSearch, "file_search", null); } - public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, int contentIndex = default) + public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default) { - return new ConversationOutputTranscriptionFinishedUpdate( - ConversationUpdateKind.ResponseAudioTranscriptDone, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - contentIndex); + + return new FileSearchRankingOptions(ranker, null); } - public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, int contentIndex = default, string delta = null) + public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition function = default) { - return new ConversationTextDeltaUpdate( - ConversationUpdateKind.ResponseTextDelta, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - contentIndex, - delta); + + return new FunctionToolDefinition(function, "function", null); } - public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, int contentIndex = default, string value = null) + public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable newVectorStores = default) { - return new ConversationTextDoneUpdate( - ConversationUpdateKind.ResponseTextDone, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - contentIndex, - value); + vectorStoreIds ??= new ChangeTrackingList(); + newVectorStores ??= new ChangeTrackingList(); + + return new FileSearchToolResources(vectorStoreIds?.ToList(), newVectorStores?.ToList(), null); } - public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, string callId = null, string delta = null) + public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable fileIds = default, IDictionary metadata = default, FileChunkingStrategy chunkingStrategy = default) { - return new ConversationFunctionCallArgumentsDeltaUpdate( - ConversationUpdateKind.ResponseFunctionCallArgumentsDelta, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - callId, - delta); + fileIds ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new VectorStoreCreationHelper(fileIds?.ToList(), metadata, chunkingStrategy, null); } - public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string eventId = null, string responseId = null, string itemId = null, int outputIndex = default, string callId = null, string name = null, string arguments = null) + public static RunTruncationStrategy RunTruncationStrategy(InternalTruncationObjectType @type = default, int? lastMessages = default) { - return new ConversationFunctionCallArgumentsDoneUpdate( - ConversationUpdateKind.ResponseFunctionCallArgumentsDone, - eventId, - serializedAdditionalRawData: null, - responseId, - itemId, - outputIndex, - callId, - name, - arguments); + + return new RunTruncationStrategy(@type, lastMessages, null); } - public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string eventId = null, int audioStartMs = default, string itemId = null) + public static ToolConstraint ToolConstraint(InternalAssistantsNamedToolChoiceType @type = default, InternalAssistantsNamedToolChoiceFunction function = default) { - return new ConversationInputSpeechStartedUpdate(ConversationUpdateKind.InputAudioBufferSpeechStarted, eventId, serializedAdditionalRawData: null, audioStartMs, itemId); + + return new ToolConstraint(@type, function, null); + } + + public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, InternalRunRequiredAction requiredAction = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default) + { + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadRun( + id, + createdAt, + threadId, + assistantId, + status, + requiredAction, + lastError, + expiresAt, + startedAt, + cancelledAt, + failedAt, + completedAt, + incompleteDetails, + model, + instructions, + tools?.ToList(), + metadata, + usage, + temperature, + truncationStrategy, + @object, + responseFormat, + toolConstraint, + nucleusSamplingFactor, + allowParallelToolCalls, + maxInputTokenCount, + maxOutputTokenCount, + null); + } + + public static RunError RunError(RunErrorCode code = default, string message = default) + { + + return new RunError(code, message, null); + } + + public static RunIncompleteDetails RunIncompleteDetails(RunIncompleteReason? reason = default) + { + + return new RunIncompleteDetails(reason, null); + } + + public static RunTokenUsage RunTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) + { + + return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); + } + + public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, ToolConstraint toolConstraint = default) + { + internalMessages ??= new ChangeTrackingList(); + toolsOverride ??= new ChangeTrackingList(); + + return new RunCreationOptions( + assistantId, + stream, + responseFormat, + modelOverride, + instructionsOverride, + additionalInstructions, + internalMessages?.ToList(), + allowParallelToolCalls, + toolsOverride?.ToList(), + nucleusSamplingFactor, + maxInputTokenCount, + maxOutputTokenCount, + toolConstraint, + null); + } + + public static RunModificationOptions RunModificationOptions(IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new RunModificationOptions(metadata, null); } - public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string eventId = null, int audioEndMs = default, string itemId = null) + public static ToolOutput ToolOutput(string toolCallId = default, string output = default) { - return new ConversationInputSpeechFinishedUpdate(ConversationUpdateKind.InputAudioBufferSpeechStopped, eventId, serializedAdditionalRawData: null, audioEndMs, itemId); + + return new ToolOutput(toolCallId, output, null); } - public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string eventId = null, string itemId = null, int contentIndex = default, string transcript = null) + public static RunStep RunStep(string id = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default, InternalRunStepObjectObject @object = default, RunStepDetails details = default) { - return new ConversationInputTranscriptionFinishedUpdate( - ConversationUpdateKind.ItemInputAudioTranscriptionCompleted, - eventId, - serializedAdditionalRawData: null, - itemId, - contentIndex, - transcript); + metadata ??= new ChangeTrackingDictionary(); + + return new RunStep( + id, + createdAt, + assistantId, + threadId, + runId, + @type, + status, + lastError, + expiredAt, + cancelledAt, + failedAt, + completedAt, + metadata, + usage, + @object, + details, + null); } - public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string eventId = null, string itemId = null, string previousItemId = null) + public static RunStepDetails RunStepDetails(string @type = default) { - return new ConversationInputAudioBufferCommittedUpdate(ConversationUpdateKind.InputAudioBufferCommitted, eventId, serializedAdditionalRawData: null, itemId, previousItemId); + + return new UnknownRunStepObjectStepDetails(@type, null); } - public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = null) + public static RunStepToolCall RunStepToolCall(string @type = default) { - return new ConversationInputAudioBufferClearedUpdate(ConversationUpdateKind.InputAudioBufferCleared, eventId, serializedAdditionalRawData: null); + + return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(@type, null); } - public static ModerationResultCollection ModerationResultCollection(string id = null, string model = null, IEnumerable results = null) + public static RunStepCodeInterpreterOutput RunStepCodeInterpreterOutput(string @type = default) { - results ??= new List(); - return new ModerationResultCollection(id, model, results?.ToList()); + return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); + } + + public static RunStepFileSearchResult RunStepFileSearchResult(string fileId = default, string fileName = default, float score = default, IEnumerable content = default) + { + content ??= new ChangeTrackingList(); + + return new RunStepFileSearchResult(fileId, fileName, score, content?.ToList(), null); + } + + public static RunStepError RunStepError(RunStepErrorCode code = default, string message = default) + { + + return new RunStepError(code, message, null); + } + + public static RunStepTokenUsage RunStepTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) + { + + return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); + } + + public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IDictionary metadata = default, InternalThreadObjectObject @object = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new AssistantThread(id, createdAt, metadata, @object, null); + } + + public static ThreadModificationOptions ThreadModificationOptions(IDictionary metadata = default, ToolResources toolResources = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadModificationOptions(metadata, toolResources, null); + } + + public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, string threadId = default, InternalDeleteThreadResponseObject @object = default) + { + + return new ThreadDeletionResult(deleted, threadId, @object, null); + } + + public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default) + { + + return new ModerationResultCollection(id, model, null); + } + + public static ModerationResult ModerationResult(bool flagged = default) + { + + return new ModerationResult(flagged, null); + } + + public static OpenAIModelCollection OpenAIModelCollection() + { + + return new OpenAIModelCollection(null); + } + + public static OpenAIModel OpenAIModel(string id = default, string ownedBy = default, DateTimeOffset createdAt = default) + { + + return new OpenAIModel(id, ownedBy, createdAt, null); + } + + public static ModelDeletionResult ModelDeletionResult(bool deleted = default, string modelId = default, InternalDeleteModelResponseObject @object = default) + { + + return new ModelDeletionResult(deleted, modelId, @object, null); + } + + public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default) + { + content ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new ThreadMessage( + id, + createdAt, + threadId, + status, + incompleteDetails, + completedAt, + incompleteAt, + content?.ToList(), + assistantId, + runId, + metadata, + @object, + role, + null); } public static MessageFailureDetails MessageFailureDetails(MessageFailureReason reason = default) { - return new MessageFailureDetails(reason, serializedAdditionalRawData: null); + + return new MessageFailureDetails(reason, null); + } + + public static MessageModificationOptions MessageModificationOptions(IDictionary metadata = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new MessageModificationOptions(metadata, null); + } + + public static MessageDeletionResult MessageDeletionResult(bool deleted = default, string messageId = default, InternalDeleteMessageResponseObject @object = default) + { + + return new MessageDeletionResult(deleted, messageId, @object, null); + } + + public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, string endUserId = default) + { + + return new ImageGenerationOptions( + quality, + responseFormat, + size, + style, + endUserId, + null); + } + + public static GeneratedImageCollection GeneratedImageCollection() + { + + return new GeneratedImageCollection(null); } - public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset created = default, IEnumerable data = null) + public static GeneratedImage GeneratedImage(string revisedPrompt = default, BinaryData imageBytes = default, Uri imageUri = default) { - data ??= new List(); - return new GeneratedImageCollection(created, data?.ToList()); + return new GeneratedImage(revisedPrompt, imageBytes, imageUri, null); } - public static GeneratedImage GeneratedImage(BinaryData imageBytes = null, Uri imageUri = null, string revisedPrompt = null) + public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) { - return new GeneratedImage(imageBytes, imageUri, revisedPrompt, serializedAdditionalRawData: null); + + return new ImageEditOptions(size, responseFormat, endUserId, null); + } + + public static ImageVariationOptions ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) + { + + return new ImageVariationOptions(size, responseFormat, endUserId, null); + } + + public static OpenAIFileCollection OpenAIFileCollection() + { + + return new OpenAIFileCollection(null); + } + + public static FileDeletionResult FileDeletionResult(bool deleted = default, string fileId = default, InternalDeleteFileResponseObject @object = default) + { + + return new FileDeletionResult(deleted, fileId, @object, null); + } + + public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, string endUserId = default) + { + + return new EmbeddingGenerationOptions(dimensions, endUserId, null); + } + + public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(string model = default, EmbeddingTokenUsage usage = default, InternalCreateEmbeddingResponseObject @object = default) + { + + return new OpenAIEmbeddingCollection(model, usage, @object, null); + } + + public static OpenAIEmbedding OpenAIEmbedding(int index = default, BinaryData embeddingProperty = default) + { + + return new OpenAIEmbedding(index, embeddingProperty, null); } public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = default, int totalTokenCount = default) { - return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, serializedAdditionalRawData: null); + + return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, null); } - public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = null) + public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = default) { - return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, serializedAdditionalRawData: null); + + return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, null); } public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, serializedAdditionalRawData: null); + + return new ChatOutputTokenUsageDetails(reasoningTokenCount, null); } - public static ChatMessage ChatMessage(ChatMessageContent content = null) + public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default) { - return new InternalUnknownChatMessage(default, content, serializedAdditionalRawData: null); + tools ??= new ChangeTrackingList(); + messages ??= new ChangeTrackingList(); + stopSequences ??= new ChangeTrackingList(); + logitBiases ??= new ChangeTrackingDictionary(); + + return new ChatCompletionOptions( + frequencyPenalty, + presencePenalty, + responseFormat, + serviceTier, + temperature, + topP, + tools?.ToList(), + messages?.ToList(), + model, + n, + stream, + streamOptions, + includeLogProbabilities, + topLogProbabilityCount, + stopSequences?.ToList(), + logitBiases, + toolChoice, + functionChoice, + allowParallelToolCalls, + endUserId, + deprecatedMaxTokens, + maxOutputTokenCount, + null); } - public static SystemChatMessage SystemChatMessage(ChatMessageContent content = null, string participantName = null) + public static ChatMessage ChatMessage(Chat.ChatMessageRole role = default) { - return new SystemChatMessage(ChatMessageRole.System, content, serializedAdditionalRawData: null, participantName); + + return new InternalUnknownChatMessage(role, null); + } + + public static SystemChatMessage SystemChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) + { + + return new SystemChatMessage(content, participantName, role, null); } - public static UserChatMessage UserChatMessage(ChatMessageContent content = null, string participantName = null) + public static UserChatMessage UserChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) { - return new UserChatMessage(ChatMessageRole.User, content, serializedAdditionalRawData: null, participantName); + + return new UserChatMessage(content, participantName, role, null); } - public static AssistantChatMessage AssistantChatMessage(ChatMessageContent content = null, string refusal = null, string participantName = null, IEnumerable toolCalls = null, ChatFunctionCall functionCall = null) + public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, Chat.ChatMessageRole role = default) { - toolCalls ??= new List(); + toolCalls ??= new ChangeTrackingList(); return new AssistantChatMessage( - ChatMessageRole.Assistant, content, - serializedAdditionalRawData: null, refusal, participantName, toolCalls?.ToList(), - functionCall); + role, + null); + } + + public static ChatToolCall ChatToolCall(string id = default, InternalChatCompletionMessageToolCallFunction function = default, Chat.ChatToolCallKind kind = default) + { + + return new ChatToolCall(id, function, kind, null); + } + + public static ChatFunctionCall ChatFunctionCall(string functionName = default, BinaryData functionArguments = default) + { + + return new ChatFunctionCall(functionName, functionArguments, null); + } + + public static ToolChatMessage ToolChatMessage(BinaryData content = default, string toolCallId = default, Chat.ChatMessageRole role = default) + { + + return new ToolChatMessage(content, toolCallId, role, null); + } + + public static FunctionChatMessage FunctionChatMessage(string content = default, string functionName = default, Chat.ChatMessageRole role = default) + { + + return new FunctionChatMessage(content, functionName, role, null); + } + + public static ChatResponseFormat ChatResponseFormat(string @type = default) + { + + return new InternalUnknownChatResponseFormat(@type, null); + } + + public static ChatTool ChatTool(InternalFunctionDefinition function = default, Chat.ChatToolKind kind = default) + { + + return new ChatTool(function, kind, null); + } + + public static ChatFunction ChatFunction(string functionName = default, string functionDescription = default, BinaryData functionParameters = default) + { + + return new ChatFunction(functionName, functionDescription, functionParameters, null); + } + + public static ChatCompletion ChatCompletion(string id = default, string model = default, string systemFingerprint = default, ChatTokenUsage usage = default, InternalCreateChatCompletionResponseObject @object = default, Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default) + { + choices ??= new ChangeTrackingList(); + + return new ChatCompletion( + id, + model, + systemFingerprint, + usage, + @object, + serviceTier, + choices?.ToList(), + createdAt, + null); + } + + public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default, IEnumerable topLogProbabilities = default) + { + utf8Bytes ??= new ReadOnlyMemory(); + topLogProbabilities ??= new ChangeTrackingList(); + + return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), topLogProbabilities?.ToList(), null); + } + + public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default) + { + utf8Bytes ??= new ReadOnlyMemory(); + + return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); + } + + public static AssistantCreationOptions AssistantCreationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable tools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) + { + metadata ??= new ChangeTrackingDictionary(); + tools ??= new ChangeTrackingList(); + + return new AssistantCreationOptions( + name, + description, + instructions, + metadata, + temperature, + tools?.ToList(), + toolResources, + responseFormat, + nucleusSamplingFactor, + null); + } + + public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, float? nucleusSamplingFactor = default) + { + tools ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); + + return new Assistant( + id, + createdAt, + name, + description, + model, + instructions, + tools?.ToList(), + toolResources, + metadata, + temperature, + @object, + nucleusSamplingFactor, + null); + } + + public static ToolResources ToolResources() + { + + return new ToolResources(null); + } + + public static CodeInterpreterToolResources CodeInterpreterToolResources() + { + + return new CodeInterpreterToolResources(null); } - public static ToolChatMessage ToolChatMessage(ChatMessageContent content = null, string toolCallId = null) + public static AssistantModificationOptions AssistantModificationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable defaultTools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { - return new ToolChatMessage(ChatMessageRole.Tool, content, serializedAdditionalRawData: null, toolCallId); + metadata ??= new ChangeTrackingDictionary(); + defaultTools ??= new ChangeTrackingList(); + + return new AssistantModificationOptions( + name, + description, + instructions, + metadata, + temperature, + defaultTools?.ToList(), + toolResources, + responseFormat, + nucleusSamplingFactor, + null); } - public static FunctionChatMessage FunctionChatMessage(ChatMessageContent content = null, string functionName = null) + public static AssistantDeletionResult AssistantDeletionResult(bool deleted = default, string assistantId = default, InternalDeleteAssistantResponseObject @object = default) { - return new FunctionChatMessage(ChatMessageRole.Function, content, serializedAdditionalRawData: null, functionName); + + return new AssistantDeletionResult(deleted, assistantId, @object, null); } - public static ChatFunction ChatFunction(string functionDescription = null, string functionName = null, BinaryData functionParameters = null) + public static SpeechGenerationOptions SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat = default, InternalCreateSpeechRequestModel model = default, string input = default, GeneratedSpeechVoice voice = default, float? speedRatio = default) { - return new ChatFunction(functionDescription, functionName, functionParameters, serializedAdditionalRawData: null); + + return new SpeechGenerationOptions( + responseFormat, + model, + input, + voice, + speedRatio, + null); } - public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = default, ReadOnlyMemory? utf8Bytes = null, IEnumerable topLogProbabilities = null) + public static AudioTranscriptionOptions AudioTranscriptionOptions(string language = default, string prompt = default, AudioTranscriptionFormat? responseFormat = default, float? temperature = default, IEnumerable internalTimestampGranularities = default) { - topLogProbabilities ??= new List(); + internalTimestampGranularities ??= new ChangeTrackingList(); - return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes, topLogProbabilities?.ToList(), serializedAdditionalRawData: null); + return new AudioTranscriptionOptions( + language, + prompt, + responseFormat, + temperature, + internalTimestampGranularities?.ToList(), + null); } - public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = default, ReadOnlyMemory? utf8Bytes = null) + public static AudioTranscription AudioTranscription(string language = default, string text = default, IEnumerable words = default, IEnumerable segments = default) { - return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes, serializedAdditionalRawData: null); + words ??= new ChangeTrackingList(); + segments ??= new ChangeTrackingList(); + + return new AudioTranscription(language, text, words?.ToList(), segments?.ToList(), null); } - public static TranscribedWord TranscribedWord(string word = null, TimeSpan startTime = default, TimeSpan endTime = default) + public static TranscribedWord TranscribedWord(string word = default, TimeSpan startTime = default, TimeSpan endTime = default) { - return new TranscribedWord(word, startTime, endTime, serializedAdditionalRawData: null); + + return new TranscribedWord(word, startTime, endTime, null); } - public static TranscribedSegment TranscribedSegment(int id = default, int seekOffset = default, TimeSpan startTime = default, TimeSpan endTime = default, string text = null, ReadOnlyMemory tokenIds = default, float temperature = default, float averageLogProbability = default, float compressionRatio = default, float noSpeechProbability = default) + public static TranscribedSegment TranscribedSegment(int id = default, string text = default, float temperature = default, float compressionRatio = default, TimeSpan startTime = default, TimeSpan endTime = default, int seekOffset = default, ReadOnlyMemory tokenIds = default, float averageLogProbability = default, float noSpeechProbability = default) { + tokenIds ??= new ReadOnlyMemory(); + return new TranscribedSegment( id, - seekOffset, - startTime, - endTime, text, - tokenIds, temperature, - averageLogProbability, compressionRatio, + startTime, + endTime, + seekOffset, + tokenIds?.ToList(), + averageLogProbability, noSpeechProbability, - serializedAdditionalRawData: null); + null); + } + + public static AudioTranslationOptions AudioTranslationOptions(string prompt = default, AudioTranslationFormat? responseFormat = default, float? temperature = default) + { + + return new AudioTranslationOptions(prompt, responseFormat, temperature, null); + } + + public static AudioTranslation AudioTranslation(string language = default, string text = default, IEnumerable segments = default) + { + segments ??= new ChangeTrackingList(); + + return new AudioTranslation(language, text, segments?.ToList(), null); + } + + public static AssistantResponseFormat AssistantResponseFormat(string @type = default) + { + + return new InternalUnknownAssistantResponseFormat(@type, null); + } + + public static ChatFunctionChoice ChatFunctionChoice() + { + + return new ChatFunctionChoice(null); + } + + public static ChatToolChoice ChatToolChoice() + { + + return new ChatToolChoice(null); + } + + public static ChatMessageContentPart ChatMessageContentPart() + { + + return new ChatMessageContentPart(null); + } + + public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = default, BinaryData functionArgumentsUpdate = default) + { + + return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, null); } - public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = null, BinaryData functionArgumentsUpdate = null) + public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = default, InternalChatCompletionMessageToolCallChunkFunction function = default, Chat.ChatToolCallKind kind = default, string toolCallId = default) { - return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, serializedAdditionalRawData: null); + + return new StreamingChatToolCallUpdate(index, function, kind, toolCallId, null); + } + + public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string model = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, string completionId = default, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default, ChatTokenUsage usage = default) + { + choices ??= new ChangeTrackingList(); + + return new StreamingChatCompletionUpdate( + model, + systemFingerprint, + @object, + completionId, + serviceTier, + choices?.ToList(), + createdAt, + usage, + null); + } + + public static RunStepUpdateCodeInterpreterOutput RunStepUpdateCodeInterpreterOutput(string @type = default) + { + + return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); } } } diff --git a/.dotnet/src/Generated/RealtimeConversationClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.cs deleted file mode 100644 index def54f0ba..000000000 --- a/.dotnet/src/Generated/RealtimeConversationClient.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; - -namespace OpenAI.RealtimeConversation -{ - // Data plane generated sub-client. - public partial class RealtimeConversationClient - { - private const string AuthorizationHeader = "Authorization"; - private readonly ApiKeyCredential _keyCredential; - private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - - public virtual ClientPipeline Pipeline => _pipeline; - - protected RealtimeConversationClient() - { - } - - internal RealtimeConversationClient(ClientPipeline pipeline, ApiKeyCredential keyCredential, Uri endpoint) - { - _pipeline = pipeline; - _keyCredential = keyCredential; - _endpoint = endpoint; - } - - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); - } -} diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs index f97680882..02f103b64 100644 --- a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -3,7 +3,6 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using OpenAI; @@ -52,73 +51,6 @@ internal PipelineMessage CreateListVectorStoresRequest(int? limit, string order, return message; } - internal PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - internal PipelineMessage CreateListVectorStoreFilesRequest(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); @@ -156,117 +88,6 @@ internal PipelineMessage CreateListVectorStoreFilesRequest(string vectorStoreId, return message; } - internal PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, BinaryContent content, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - request.Headers.Set("Content-Type", "application/json"); - request.Content = content; - message.Apply(options); - return message; - } - - internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) - { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); - return message; - } - internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { PipelineMessage message = Pipeline.CreateMessage(); diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 520c076aa..8f24b6659 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -6,39 +6,127 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.VectorStores { - // Data plane generated sub-client. public partial class VectorStoreClient { + private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private readonly ClientPipeline _pipeline; - private readonly Uri _endpoint; protected VectorStoreClient() { } - public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options = null) + public virtual ClientResult ListVectorStores(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListVectorStoresAsync(int? limit, string order, string after, string before, RequestOptions options) + { + using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListVectorStores(int? limit, VectorStoreCollectionOrder? order, string after, string before) + { + ClientResult result = ListVectorStores(limit, order.ToString(), after, before, null); + return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListVectorStoresAsync(int? limit, VectorStoreCollectionOrder? order, string after, string before) + { + ClientResult result = await ListVectorStoresAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = this.CreateCreateVectorStoreRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = this.CreateCreateVectorStoreRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + public virtual async Task ListVectorStoreFilesAsync(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + ClientResult result = ListVectorStoreFiles(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListVectorStoreFilesAsync(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + ClientResult result = await ListVectorStoreFilesAsync(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + } + + public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + ClientResult result = ListFilesInVectorStoreBatch(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + } + + public virtual async Task> ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + ClientResult result = await ListFilesInVectorStoreBatchAsync(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); + return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + } } } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index c8d9f6831..459999278 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -3404,8 +3404,8 @@ { "$id": "376", "kind": "enum", - "name": "CreateModerationRequestModel", - "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", + "name": "RealtimeRequestCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", "valueType": { "$id": "377", "kind": "string", @@ -3417,8 +3417,8 @@ { "$id": "378", "kind": "enumvalue", - "name": "text-moderation-latest", - "value": "text-moderation-latest", + "name": "session_update", + "value": "session.update", "valueType": { "$id": "379", "kind": "string", @@ -3434,8 +3434,8 @@ { "$id": "380", "kind": "enumvalue", - "name": "text-moderation-stable", - "value": "text-moderation-stable", + "name": "input_audio_buffer_append", + "value": "input_audio_buffer.append", "valueType": { "$id": "381", "kind": "string", @@ -3447,222 +3447,139 @@ "$ref": "376" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "382", - "kind": "enum", - "name": "ListModelsResponse_object", - "valueType": { - "$id": "383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "384", + "$id": "382", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "input_audio_buffer_commit", + "value": "input_audio_buffer.commit", "valueType": { - "$ref": "383" + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "382" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListModelsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "385", - "kind": "enum", - "name": "Model_object", - "valueType": { - "$id": "386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "376" + }, + "decorators": [] + }, { - "$id": "387", + "$id": "384", "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", + "name": "input_audio_buffer_clear", + "value": "input_audio_buffer.clear", "valueType": { - "$ref": "386" + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "385" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Model_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "388", - "kind": "enum", - "name": "DeleteModelResponse_object", - "valueType": { - "$id": "389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "376" + }, + "decorators": [] + }, { - "$id": "390", + "$id": "386", "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", + "name": "item_create", + "value": "conversation.item.create", "valueType": { - "$ref": "389" + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "388" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteModelResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "391", - "kind": "enum", - "name": "MessageObject_object", - "valueType": { - "$id": "392", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "376" + }, + "decorators": [] + }, { - "$id": "393", + "$id": "388", "kind": "enumvalue", - "name": "thread.message", - "value": "thread.message", - "description": "thread.message", + "name": "item_delete", + "value": "conversation.item.delete", "valueType": { - "$ref": "392" + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "391" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "394", - "kind": "enum", - "name": "MessageObjectStatus", - "crossLanguageDefinitionId": "MessageObject.status.anonymous", - "valueType": { - "$id": "395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "376" + }, + "decorators": [] + }, { - "$id": "396", + "$id": "390", "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", + "name": "item_truncate", + "value": "conversation.item.truncate", "valueType": { - "$id": "397", + "$id": "391", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "394" + "$ref": "376" }, "decorators": [] }, { - "$id": "398", + "$id": "392", "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", + "name": "response_create", + "value": "response.create", "valueType": { - "$id": "399", + "$id": "393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "394" + "$ref": "376" }, "decorators": [] }, { - "$id": "400", + "$id": "394", "kind": "enumvalue", - "name": "completed", - "value": "completed", + "name": "response_cancel", + "value": "response.cancel", "valueType": { - "$id": "401", + "$id": "395", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "394" + "$ref": "376" }, "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Json", "decorators": [] }, { - "$id": "402", + "$id": "396", "kind": "enum", - "name": "MessageObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", + "name": "RealtimeRequestModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", "valueType": { - "$id": "403", + "$id": "397", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3670,44 +3587,99 @@ }, "values": [ { - "$id": "404", + "$id": "398", "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", + "name": "gpt_4o_realtime", + "value": "gpt-4o-realtime", "valueType": { - "$id": "405", + "$id": "399", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "402" + "$ref": "396" }, "decorators": [] - }, + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "400", + "kind": "enum", + "name": "RealtimeRequestSessionUpdateCommandSessionModality", + "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "406", + "$id": "402", "kind": "enumvalue", - "name": "max_tokens", - "value": "max_tokens", + "name": "text", + "value": "text", "valueType": { - "$id": "407", + "$id": "403", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "402" + "$ref": "400" }, "decorators": [] }, + { + "$id": "404", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "400" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "406", + "kind": "enum", + "name": "RealtimeVoice", + "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", + "valueType": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "408", "kind": "enumvalue", - "name": "run_cancelled", - "value": "run_cancelled", + "name": "alloy", + "value": "alloy", "valueType": { "$id": "409", "kind": "string", @@ -3716,15 +3688,15 @@ "decorators": [] }, "enumType": { - "$ref": "402" + "$ref": "406" }, "decorators": [] }, { "$id": "410", "kind": "enumvalue", - "name": "run_expired", - "value": "run_expired", + "name": "shimmer", + "value": "shimmer", "valueType": { "$id": "411", "kind": "string", @@ -3733,15 +3705,15 @@ "decorators": [] }, "enumType": { - "$ref": "402" + "$ref": "406" }, "decorators": [] }, { "$id": "412", "kind": "enumvalue", - "name": "run_failed", - "value": "run_failed", + "name": "echo", + "value": "echo", "valueType": { "$id": "413", "kind": "string", @@ -3750,21 +3722,21 @@ "decorators": [] }, "enumType": { - "$ref": "402" + "$ref": "406" }, "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Output,Json", "decorators": [] }, { "$id": "414", "kind": "enum", - "name": "MessageObjectRole", - "crossLanguageDefinitionId": "MessageObject.role.anonymous", + "name": "RealtimeAudioFormat", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", "valueType": { "$id": "415", "kind": "string", @@ -3776,8 +3748,8 @@ { "$id": "416", "kind": "enumvalue", - "name": "user", - "value": "user", + "name": "pcm16", + "value": "pcm16", "valueType": { "$id": "417", "kind": "string", @@ -3793,8 +3765,8 @@ { "$id": "418", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", + "name": "g711_ulaw", + "value": "g711_ulaw", "valueType": { "$id": "419", "kind": "string", @@ -3806,48 +3778,48 @@ "$ref": "414" }, "decorators": [] + }, + { + "$id": "420", + "kind": "enumvalue", + "name": "g711_alaw", + "value": "g711_alaw", + "valueType": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "420", + "$id": "422", "kind": "enum", - "name": "ListMessagesRequestOrder", - "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", + "name": "RealtimeAudioInputTranscriptionModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", "valueType": { - "$id": "421", + "$id": "423", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "values": [ - { - "$id": "422", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "420" - }, - "decorators": [] - }, { "$id": "424", "kind": "enumvalue", - "name": "desc", - "value": "desc", + "name": "whisper_1", + "value": "whisper-1", "valueType": { "$id": "425", "kind": "string", @@ -3856,20 +3828,21 @@ "decorators": [] }, "enumType": { - "$ref": "420" + "$ref": "422" }, "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Input", + "usage": "Input,Output,Json", "decorators": [] }, { "$id": "426", "kind": "enum", - "name": "ListMessagesResponse_object", + "name": "RealtimeTurnDetectionType", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", "valueType": { "$id": "427", "kind": "string", @@ -3881,30 +3854,34 @@ { "$id": "428", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "server_vad", + "value": "server_vad", "valueType": { - "$ref": "427" + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { "$ref": "426" - } + }, + "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ListMessagesResponse_object", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "429", + "$id": "430", "kind": "enum", - "name": "DeleteMessageResponse_object", + "name": "RealtimeToolType", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", "valueType": { - "$id": "430", + "$id": "431", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3912,61 +3889,47 @@ }, "values": [ { - "$id": "431", + "$id": "432", "kind": "enumvalue", - "name": "thread.message.deleted", - "value": "thread.message.deleted", - "description": "thread.message.deleted", + "name": "function", + "value": "function", "valueType": { - "$ref": "430" + "$id": "433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "429" - } + "$ref": "430" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The DeleteMessageResponse_object", + "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "432", + "$id": "434", "kind": "enum", - "name": "CreateImageRequestModel", - "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", + "name": "RealtimeToolChoiceLiteral", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", "valueType": { - "$id": "433", + "$id": "435", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "values": [ - { - "$id": "434", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "432" - }, - "decorators": [] - }, { "$id": "436", "kind": "enumvalue", - "name": "dall-e-3", - "value": "dall-e-3", + "name": "auto", + "value": "auto", "valueType": { "$id": "437", "kind": "string", @@ -3975,87 +3938,89 @@ "decorators": [] }, "enumType": { - "$ref": "432" + "$ref": "434" }, + "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "438", - "kind": "enum", - "name": "CreateImageRequestQuality", - "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", - "valueType": { - "$id": "439", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "440", + "$id": "438", "kind": "enumvalue", - "name": "standard", - "value": "standard", + "name": "none", + "value": "none", "valueType": { - "$id": "441", + "$id": "439", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "438" + "$ref": "434" }, + "description": "Specifies that the model should call no tools whatsoever.", "decorators": [] }, { - "$id": "442", + "$id": "440", "kind": "enumvalue", - "name": "hd", - "value": "hd", + "name": "required", + "value": "required", "valueType": { - "$id": "443", + "$id": "441", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "438" + "$ref": "434" }, + "description": "Specifies that the model should call at least one tool.", "decorators": [] } ], - "isFixed": true, + "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", + "isFixed": false, "isFlags": false, - "usage": "Input,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "444", + "$id": "442", "kind": "enum", - "name": "CreateImageRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", + "name": "RealtimeItemType", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", "valueType": { - "$id": "445", + "$id": "443", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "values": [ + { + "$id": "444", + "kind": "enumvalue", + "name": "message", + "value": "message", + "valueType": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + }, { "$id": "446", "kind": "enumvalue", - "name": "url", - "value": "url", + "name": "function_call", + "value": "function_call", "valueType": { "$id": "447", "kind": "string", @@ -4064,15 +4029,15 @@ "decorators": [] }, "enumType": { - "$ref": "444" + "$ref": "442" }, "decorators": [] }, { "$id": "448", "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", + "name": "function_call_output", + "value": "function_call_output", "valueType": { "$id": "449", "kind": "string", @@ -4081,21 +4046,21 @@ "decorators": [] }, "enumType": { - "$ref": "444" + "$ref": "442" }, "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Input,Json", + "usage": "Input,Output,Json", "decorators": [] }, { "$id": "450", "kind": "enum", - "name": "CreateImageRequestSize", - "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", + "name": "RealtimeMessageRole", + "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", "valueType": { "$id": "451", "kind": "string", @@ -4107,8 +4072,8 @@ { "$id": "452", "kind": "enumvalue", - "name": "256x256", - "value": "256x256", + "name": "system", + "value": "system", "valueType": { "$id": "453", "kind": "string", @@ -4124,8 +4089,8 @@ { "$id": "454", "kind": "enumvalue", - "name": "512x512", - "value": "512x512", + "name": "user", + "value": "user", "valueType": { "$id": "455", "kind": "string", @@ -4141,8 +4106,8 @@ { "$id": "456", "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", + "name": "assistant", + "value": "assistant", "valueType": { "$id": "457", "kind": "string", @@ -4154,54 +4119,20 @@ "$ref": "450" }, "decorators": [] - }, - { - "$id": "458", - "kind": "enumvalue", - "name": "1792x1024", - "value": "1792x1024", - "valueType": { - "$id": "459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "460", - "kind": "enumvalue", - "name": "1024x1792", - "value": "1024x1792", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, - "usage": "Input,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "462", + "$id": "458", "kind": "enum", - "name": "CreateImageRequestStyle", - "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", + "name": "RealtimeItemStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", "valueType": { - "$id": "463", + "$id": "459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4209,88 +4140,69 @@ }, "values": [ { - "$id": "464", + "$id": "460", "kind": "enumvalue", - "name": "vivid", - "value": "vivid", + "name": "in_progress", + "value": "in_progress", "valueType": { - "$id": "465", + "$id": "461", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "462" + "$ref": "458" }, "decorators": [] }, { - "$id": "466", + "$id": "462", "kind": "enumvalue", - "name": "natural", - "value": "natural", + "name": "completed", + "value": "completed", "valueType": { - "$id": "467", + "$id": "463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "462" + "$ref": "458" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "468", - "kind": "enum", - "name": "CreateImageEditRequestModel", - "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", - "valueType": { - "$id": "469", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "470", + "$id": "464", "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", + "name": "incomplete", + "value": "incomplete", "valueType": { - "$id": "471", + "$id": "465", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "468" + "$ref": "458" }, "decorators": [] } ], "isFixed": false, "isFlags": false, - "usage": "Input", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "472", + "$id": "466", "kind": "enum", - "name": "CreateImageEditRequestSize", - "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", + "name": "RealtimeContentPartType", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", "valueType": { - "$id": "473", + "$id": "467", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4298,80 +4210,131 @@ }, "values": [ { - "$id": "474", + "$id": "468", "kind": "enumvalue", - "name": "256x256", - "value": "256x256", + "name": "input_text", + "value": "input_text", "valueType": { - "$id": "475", + "$id": "469", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "472" + "$ref": "466" }, "decorators": [] }, { - "$id": "476", + "$id": "470", "kind": "enumvalue", - "name": "512x512", - "value": "512x512", + "name": "input_audio", + "value": "input_audio", "valueType": { - "$id": "477", + "$id": "471", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "472" + "$ref": "466" }, "decorators": [] }, { - "$id": "478", + "$id": "472", "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", + "name": "text", + "value": "text", "valueType": { - "$id": "479", + "$id": "473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "472" + "$ref": "466" }, "decorators": [] - } - ], - "isFixed": true, + }, + { + "$id": "474", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + } + ], + "isFixed": false, "isFlags": false, - "usage": "Input", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "480", + "$id": "476", "kind": "enum", - "name": "CreateImageEditRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", + "name": "RealtimeResponseCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", "valueType": { - "$id": "481", + "$id": "477", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "values": [ + { + "$id": "478", + "kind": "enumvalue", + "name": "session_created", + "value": "session.created", + "valueType": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "480", + "kind": "enumvalue", + "name": "session_updated", + "value": "session.updated", + "valueType": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "482", "kind": "enumvalue", - "name": "url", - "value": "url", + "name": "item_created", + "value": "conversation.item.created", "valueType": { "$id": "483", "kind": "string", @@ -4380,15 +4343,15 @@ "decorators": [] }, "enumType": { - "$ref": "480" + "$ref": "476" }, "decorators": [] }, { "$id": "484", "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", + "name": "item_deleted", + "value": "conversation.item.deleted", "valueType": { "$id": "485", "kind": "string", @@ -4397,34 +4360,32 @@ "decorators": [] }, "enumType": { - "$ref": "480" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "486", - "kind": "enum", - "name": "CreateImageVariationRequestModel", - "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", - "valueType": { - "$id": "487", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "486", + "kind": "enumvalue", + "name": "item_truncated", + "value": "conversation.item.truncated", + "valueType": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "488", "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", + "name": "response_created", + "value": "response.created", "valueType": { "$id": "489", "kind": "string", @@ -4433,34 +4394,32 @@ "decorators": [] }, "enumType": { - "$ref": "486" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "490", - "kind": "enum", - "name": "CreateImageVariationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", - "valueType": { - "$id": "491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "490", + "kind": "enumvalue", + "name": "response_done", + "value": "response.done", + "valueType": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "492", "kind": "enumvalue", - "name": "url", - "value": "url", + "name": "rate_limits_updated", + "value": "rate_limits.updated", "valueType": { "$id": "493", "kind": "string", @@ -4469,15 +4428,15 @@ "decorators": [] }, "enumType": { - "$ref": "490" + "$ref": "476" }, "decorators": [] }, { "$id": "494", "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", + "name": "response_output_item_added", + "value": "response.output_item.added", "valueType": { "$id": "495", "kind": "string", @@ -4486,34 +4445,32 @@ "decorators": [] }, "enumType": { - "$ref": "490" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "496", - "kind": "enum", - "name": "CreateImageVariationRequestSize", - "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", - "valueType": { - "$id": "497", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "496", + "kind": "enumvalue", + "name": "response_output_item_done", + "value": "response.output_item.done", + "valueType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "498", "kind": "enumvalue", - "name": "256x256", - "value": "256x256", + "name": "response_content_part_added", + "value": "response.content_part.added", "valueType": { "$id": "499", "kind": "string", @@ -4522,15 +4479,15 @@ "decorators": [] }, "enumType": { - "$ref": "496" + "$ref": "476" }, "decorators": [] }, { "$id": "500", "kind": "enumvalue", - "name": "512x512", - "value": "512x512", + "name": "response_content_part_done", + "value": "response.content_part.done", "valueType": { "$id": "501", "kind": "string", @@ -4539,15 +4496,15 @@ "decorators": [] }, "enumType": { - "$ref": "496" + "$ref": "476" }, "decorators": [] }, { "$id": "502", "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", + "name": "response_audio_delta", + "value": "response.audio.delta", "valueType": { "$id": "503", "kind": "string", @@ -4556,34 +4513,32 @@ "decorators": [] }, "enumType": { - "$ref": "496" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "504", - "kind": "enum", - "name": "CreateFineTuningJobRequestModel", - "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", - "valueType": { - "$id": "505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "504", + "kind": "enumvalue", + "name": "response_audio_done", + "value": "response.audio.done", + "valueType": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "506", "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", + "name": "response_audio_transcript_delta", + "value": "response.audio_transcript.delta", "valueType": { "$id": "507", "kind": "string", @@ -4592,15 +4547,15 @@ "decorators": [] }, "enumType": { - "$ref": "504" + "$ref": "476" }, "decorators": [] }, { "$id": "508", "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", + "name": "response_audio_transcript_done", + "value": "response.audio_transcript.done", "valueType": { "$id": "509", "kind": "string", @@ -4609,15 +4564,15 @@ "decorators": [] }, "enumType": { - "$ref": "504" + "$ref": "476" }, "decorators": [] }, { "$id": "510", "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", + "name": "response_text_delta", + "value": "response.text.delta", "valueType": { "$id": "511", "kind": "string", @@ -4626,15 +4581,15 @@ "decorators": [] }, "enumType": { - "$ref": "504" + "$ref": "476" }, "decorators": [] }, { "$id": "512", "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", + "name": "response_text_done", + "value": "response.text.done", "valueType": { "$id": "513", "kind": "string", @@ -4643,34 +4598,32 @@ "decorators": [] }, "enumType": { - "$ref": "504" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "514", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "514", + "kind": "enumvalue", + "name": "response_function_call_arguments_delta", + "value": "response.function_call_arguments.delta", + "valueType": { + "$id": "515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "516", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "response_function_call_arguments_done", + "value": "response.function_call_arguments.done", "valueType": { "$id": "517", "kind": "string", @@ -4679,34 +4632,32 @@ "decorators": [] }, "enumType": { - "$ref": "514" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "518", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "518", + "kind": "enumvalue", + "name": "input_audio_buffer_speech_started", + "value": "input_audio_buffer.speech_started", + "valueType": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "520", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "input_audio_buffer_speech_stopped", + "value": "input_audio_buffer.speech_stopped", "valueType": { "$id": "521", "kind": "string", @@ -4715,34 +4666,32 @@ "decorators": [] }, "enumType": { - "$ref": "518" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "522", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "523", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "522", + "kind": "enumvalue", + "name": "item_input_audio_transcription_completed", + "value": "conversation.item.input_audio_transcription.completed", + "valueType": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "524", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "item_input_audio_transcription_failed", + "value": "conversation.item.input_audio_transcription.failed", "valueType": { "$id": "525", "kind": "string", @@ -4751,34 +4700,32 @@ "decorators": [] }, "enumType": { - "$ref": "522" + "$ref": "476" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "526", - "kind": "enum", - "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "527", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + { + "$id": "526", + "kind": "enumvalue", + "name": "input_audio_buffer_committed", + "value": "input_audio_buffer.committed", + "valueType": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, { "$id": "528", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "input_audio_buffer_cleared", + "value": "input_audio_buffer.cleared", "valueType": { "$id": "529", "kind": "string", @@ -4787,23 +4734,39 @@ "decorators": [] }, "enumType": { - "$ref": "526" + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "530", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" }, "decorators": [] } ], - "isFixed": true, + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "530", + "$id": "532", "kind": "enum", - "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", + "name": "RealtimeResponseSession_object", "valueType": { - "$id": "531", + "$id": "533", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4811,35 +4774,32 @@ }, "values": [ { - "$id": "532", + "$id": "534", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "realtime.session", + "value": "realtime.session", + "description": "realtime.session", "valueType": { - "$id": "533", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "533" }, "enumType": { - "$ref": "530" - }, - "decorators": [] + "$ref": "532" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseSession_object", + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "534", + "$id": "535", "kind": "enum", - "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "name": "RealtimeResponseItem_object", "valueType": { - "$id": "535", + "$id": "536", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4847,24 +4807,22 @@ }, "values": [ { - "$id": "536", + "$id": "537", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "realtime.item", + "value": "realtime.item", + "description": "realtime.item", "valueType": { - "$id": "537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "536" }, "enumType": { - "$ref": "534" - }, - "decorators": [] + "$ref": "535" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseItem_object", + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] @@ -4872,7 +4830,7 @@ { "$id": "538", "kind": "enum", - "name": "FineTuningJob_object", + "name": "RealtimeResponse_object", "valueType": { "$id": "539", "kind": "string", @@ -4884,9 +4842,9 @@ { "$id": "540", "kind": "enumvalue", - "name": "fine_tuning.job", - "value": "fine_tuning.job", - "description": "fine_tuning.job", + "name": "realtime.response", + "value": "realtime.response", + "description": "realtime.response", "valueType": { "$ref": "539" }, @@ -4896,7 +4854,7 @@ } ], "crossLanguageDefinitionId": "", - "description": "The FineTuningJob_object", + "description": "The RealtimeResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", @@ -4905,8 +4863,8 @@ { "$id": "541", "kind": "enum", - "name": "FineTuningJobStatus", - "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", + "name": "RealtimeResponseStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", "valueType": { "$id": "542", "kind": "string", @@ -4918,8 +4876,8 @@ { "$id": "543", "kind": "enumvalue", - "name": "validating_files", - "value": "validating_files", + "name": "in_progress", + "value": "in_progress", "valueType": { "$id": "544", "kind": "string", @@ -4935,8 +4893,8 @@ { "$id": "545", "kind": "enumvalue", - "name": "queued", - "value": "queued", + "name": "completed", + "value": "completed", "valueType": { "$id": "546", "kind": "string", @@ -4952,8 +4910,8 @@ { "$id": "547", "kind": "enumvalue", - "name": "running", - "value": "running", + "name": "cancelled", + "value": "cancelled", "valueType": { "$id": "548", "kind": "string", @@ -4969,8 +4927,8 @@ { "$id": "549", "kind": "enumvalue", - "name": "succeeded", - "value": "succeeded", + "name": "incomplete", + "value": "incomplete", "valueType": { "$id": "550", "kind": "string", @@ -4999,21 +4957,57 @@ "$ref": "541" }, "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "553", + "kind": "enum", + "name": "RealtimeResponseCancelledStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", + "valueType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "555", + "kind": "enumvalue", + "name": "turn_detected", + "value": "turn_detected", + "valueType": { + "$id": "556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "553" + }, + "decorators": [] }, { - "$id": "553", + "$id": "557", "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", + "name": "client_cancelled", + "value": "client_cancelled", "valueType": { - "$id": "554", + "$id": "558", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "541" + "$ref": "553" }, "decorators": [] } @@ -5024,11 +5018,12 @@ "decorators": [] }, { - "$id": "555", + "$id": "559", "kind": "enum", - "name": "ListPaginatedFineTuningJobsResponse_object", + "name": "RealtimeResponseIncompleteStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", "valueType": { - "$id": "556", + "$id": "560", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5036,32 +5031,52 @@ }, "values": [ { - "$id": "557", + "$id": "561", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "max_output_tokens", + "value": "max_output_tokens", "valueType": { - "$ref": "556" + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "555" - } + "$ref": "559" + }, + "decorators": [] + }, + { + "$id": "563", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "559" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ListPaginatedFineTuningJobsResponse_object", - "isFixed": false, + "isFixed": true, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "558", + "$id": "565", "kind": "enum", - "name": "FineTuningJobCheckpoint_object", + "name": "CreateModerationRequestModel", + "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", "valueType": { - "$id": "559", + "$id": "566", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5069,32 +5084,51 @@ }, "values": [ { - "$id": "560", + "$id": "567", "kind": "enumvalue", - "name": "fine_tuning.job.checkpoint", - "value": "fine_tuning.job.checkpoint", - "description": "fine_tuning.job.checkpoint", + "name": "text-moderation-latest", + "value": "text-moderation-latest", "valueType": { - "$ref": "559" + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "558" - } + "$ref": "565" + }, + "decorators": [] + }, + { + "$id": "569", + "kind": "enumvalue", + "name": "text-moderation-stable", + "value": "text-moderation-stable", + "valueType": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "565" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobCheckpoint_object", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Json", "decorators": [] }, { - "$id": "561", + "$id": "571", "kind": "enum", - "name": "ListFineTuningJobCheckpointsResponse_object", + "name": "ListModelsResponse_object", "valueType": { - "$id": "562", + "$id": "572", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5102,33 +5136,32 @@ }, "values": [ { - "$id": "563", + "$id": "573", "kind": "enumvalue", "name": "list", "value": "list", "description": "list", "valueType": { - "$ref": "562" + "$ref": "572" }, "enumType": { - "$ref": "561" + "$ref": "571" } } ], "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobCheckpointsResponse_object", + "description": "The ListModelsResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "564", + "$id": "574", "kind": "enum", - "name": "FineTuningJobEventLevel", - "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", + "name": "Model_object", "valueType": { - "$id": "565", + "$id": "575", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5136,68 +5169,32 @@ }, "values": [ { - "$id": "566", + "$id": "576", "kind": "enumvalue", - "name": "info", - "value": "info", + "name": "model", + "value": "model", + "description": "model", "valueType": { - "$id": "567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "575" }, "enumType": { - "$ref": "564" - }, - "decorators": [] - }, - { - "$id": "568", - "kind": "enumvalue", - "name": "warn", - "value": "warn", - "valueType": { - "$id": "569", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "564" - }, - "decorators": [] - }, - { - "$id": "570", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "571", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "564" - }, - "decorators": [] + "$ref": "574" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The Model_object", + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "572", + "$id": "577", "kind": "enum", - "name": "FineTuningJobEvent_object", + "name": "DeleteModelResponse_object", "valueType": { - "$id": "573", + "$id": "578", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5205,32 +5202,32 @@ }, "values": [ { - "$id": "574", + "$id": "579", "kind": "enumvalue", - "name": "fine_tuning.job.event", - "value": "fine_tuning.job.event", - "description": "fine_tuning.job.event", + "name": "model", + "value": "model", + "description": "model", "valueType": { - "$ref": "573" + "$ref": "578" }, "enumType": { - "$ref": "572" + "$ref": "577" } } ], "crossLanguageDefinitionId": "", - "description": "The FineTuningJobEvent_object", + "description": "The DeleteModelResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "575", + "$id": "580", "kind": "enum", - "name": "ListFineTuningJobEventsResponse_object", + "name": "MessageObject_object", "valueType": { - "$id": "576", + "$id": "581", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5238,33 +5235,33 @@ }, "values": [ { - "$id": "577", + "$id": "582", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "thread.message", + "value": "thread.message", + "description": "thread.message", "valueType": { - "$ref": "576" + "$ref": "581" }, "enumType": { - "$ref": "575" + "$ref": "580" } } ], "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobEventsResponse_object", + "description": "The MessageObject_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "578", + "$id": "583", "kind": "enum", - "name": "CreateFileRequestPurpose", - "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", + "name": "MessageObjectStatus", + "crossLanguageDefinitionId": "MessageObject.status.anonymous", "valueType": { - "$id": "579", + "$id": "584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5272,85 +5269,69 @@ }, "values": [ { - "$id": "580", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "578" - }, - "decorators": [] - }, - { - "$id": "582", + "$id": "585", "kind": "enumvalue", - "name": "batch", - "value": "batch", + "name": "in_progress", + "value": "in_progress", "valueType": { - "$id": "583", + "$id": "586", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "578" + "$ref": "583" }, "decorators": [] }, { - "$id": "584", + "$id": "587", "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", + "name": "incomplete", + "value": "incomplete", "valueType": { - "$id": "585", + "$id": "588", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "578" + "$ref": "583" }, "decorators": [] }, { - "$id": "586", + "$id": "589", "kind": "enumvalue", - "name": "vision", - "value": "vision", + "name": "completed", + "value": "completed", "valueType": { - "$id": "587", + "$id": "590", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "578" + "$ref": "583" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input", + "usage": "Output,Json", "decorators": [] }, { - "$id": "588", + "$id": "591", "kind": "enum", - "name": "ListFilesResponse_object", + "name": "MessageObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", "valueType": { - "$id": "589", + "$id": "592", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5358,136 +5339,103 @@ }, "values": [ { - "$id": "590", + "$id": "593", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "content_filter", + "value": "content_filter", "valueType": { - "$ref": "589" + "$id": "594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "588" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "591", - "kind": "enum", - "name": "DeleteFileResponse_object", - "valueType": { - "$id": "592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "591" + }, + "decorators": [] + }, { - "$id": "593", + "$id": "595", "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", + "name": "max_tokens", + "value": "max_tokens", "valueType": { - "$ref": "592" + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { "$ref": "591" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "594", - "kind": "enum", - "name": "CreateEmbeddingRequestModel", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", - "valueType": { - "$id": "595", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + "decorators": [] + }, { - "$id": "596", + "$id": "597", "kind": "enumvalue", - "name": "text-embedding-ada-002", - "value": "text-embedding-ada-002", + "name": "run_cancelled", + "value": "run_cancelled", "valueType": { - "$id": "597", + "$id": "598", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "594" + "$ref": "591" }, "decorators": [] }, { - "$id": "598", + "$id": "599", "kind": "enumvalue", - "name": "text-embedding-3-small", - "value": "text-embedding-3-small", + "name": "run_expired", + "value": "run_expired", "valueType": { - "$id": "599", + "$id": "600", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "594" + "$ref": "591" }, "decorators": [] }, { - "$id": "600", + "$id": "601", "kind": "enumvalue", - "name": "text-embedding-3-large", - "value": "text-embedding-3-large", + "name": "run_failed", + "value": "run_failed", "valueType": { - "$id": "601", + "$id": "602", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "594" + "$ref": "591" }, "decorators": [] } ], - "isFixed": false, + "isFixed": true, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "602", + "$id": "603", "kind": "enum", - "name": "CreateEmbeddingRequestEncodingFormat", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", + "name": "MessageObjectRole", + "crossLanguageDefinitionId": "MessageObject.role.anonymous", "valueType": { - "$id": "603", + "$id": "604", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5495,51 +5443,52 @@ }, "values": [ { - "$id": "604", + "$id": "605", "kind": "enumvalue", - "name": "float", - "value": "float", + "name": "user", + "value": "user", "valueType": { - "$id": "605", + "$id": "606", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "602" + "$ref": "603" }, "decorators": [] }, { - "$id": "606", + "$id": "607", "kind": "enumvalue", - "name": "base64", - "value": "base64", + "name": "assistant", + "value": "assistant", "valueType": { - "$id": "607", + "$id": "608", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "602" + "$ref": "603" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "608", + "$id": "609", "kind": "enum", - "name": "Embedding_object", + "name": "ListMessagesRequestOrder", + "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", "valueType": { - "$id": "609", + "$id": "610", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5547,32 +5496,51 @@ }, "values": [ { - "$id": "610", + "$id": "611", "kind": "enumvalue", - "name": "embedding", - "value": "embedding", - "description": "embedding", + "name": "asc", + "value": "asc", "valueType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { "$ref": "609" }, + "decorators": [] + }, + { + "$id": "613", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "enumType": { - "$ref": "608" - } + "$ref": "609" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The Embedding_object", - "isFixed": false, + "isFixed": true, "isFlags": false, - "usage": "Output,Json", + "usage": "Input", "decorators": [] }, { - "$id": "611", + "$id": "615", "kind": "enum", - "name": "CreateEmbeddingResponse_object", + "name": "ListMessagesResponse_object", "valueType": { - "$id": "612", + "$id": "616", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5580,33 +5548,32 @@ }, "values": [ { - "$id": "613", + "$id": "617", "kind": "enumvalue", "name": "list", "value": "list", "description": "list", "valueType": { - "$ref": "612" + "$ref": "616" }, "enumType": { - "$ref": "611" + "$ref": "615" } } ], "crossLanguageDefinitionId": "", - "description": "The CreateEmbeddingResponse_object", + "description": "The ListMessagesResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "614", + "$id": "618", "kind": "enum", - "name": "CreateCompletionRequestModel", - "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", + "name": "DeleteMessageResponse_object", "valueType": { - "$id": "615", + "$id": "619", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5614,53 +5581,70 @@ }, "values": [ { - "$id": "616", + "$id": "620", "kind": "enumvalue", - "name": "gpt-3.5-turbo-instruct", - "value": "gpt-3.5-turbo-instruct", + "name": "thread.message.deleted", + "value": "thread.message.deleted", + "description": "thread.message.deleted", "valueType": { - "$id": "617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "619" }, "enumType": { - "$ref": "614" - }, - "decorators": [] - }, + "$ref": "618" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteMessageResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "621", + "kind": "enum", + "name": "CreateImageRequestModel", + "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", + "valueType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "618", + "$id": "623", "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", + "name": "dall-e-2", + "value": "dall-e-2", "valueType": { - "$id": "619", + "$id": "624", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "614" + "$ref": "621" }, "decorators": [] }, { - "$id": "620", + "$id": "625", "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", + "name": "dall-e-3", + "value": "dall-e-3", "valueType": { - "$id": "621", + "$id": "626", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "614" + "$ref": "621" }, "decorators": [] } @@ -5671,12 +5655,12 @@ "decorators": [] }, { - "$id": "622", + "$id": "627", "kind": "enum", - "name": "CreateCompletionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", + "name": "CreateImageRequestQuality", + "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", "valueType": { - "$id": "623", + "$id": "628", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5684,99 +5668,50 @@ }, "values": [ { - "$id": "624", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "625", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "622" - }, - "decorators": [] - }, - { - "$id": "626", + "$id": "629", "kind": "enumvalue", - "name": "length", - "value": "length", + "name": "standard", + "value": "standard", "valueType": { - "$id": "627", + "$id": "630", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "622" + "$ref": "627" }, "decorators": [] }, { - "$id": "628", + "$id": "631", "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", + "name": "hd", + "value": "hd", "valueType": { - "$id": "629", + "$id": "632", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "622" + "$ref": "627" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "630", - "kind": "enum", - "name": "CreateCompletionResponse_object", - "valueType": { - "$id": "631", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "632", - "kind": "enumvalue", - "name": "text_completion", - "value": "text_completion", - "description": "text_completion", - "valueType": { - "$ref": "631" - }, - "enumType": { - "$ref": "630" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Json", "decorators": [] }, { "$id": "633", "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartText_type", + "name": "CreateImageRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", "valueType": { "$id": "634", "kind": "string", @@ -5788,53 +5723,39 @@ { "$id": "635", "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", + "name": "url", + "value": "url", "valueType": { - "$ref": "634" + "$id": "636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { "$ref": "633" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartText_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "636", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImage_type", - "valueType": { - "$id": "637", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, + "decorators": [] + }, { - "$id": "638", + "$id": "637", "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", + "name": "b64_json", + "value": "b64_json", "valueType": { - "$ref": "637" + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "636" - } + "$ref": "633" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartImage_type", - "isFixed": false, + "isFixed": true, "isFlags": false, "usage": "Input,Json", "decorators": [] @@ -5842,8 +5763,8 @@ { "$id": "639", "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", - "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", + "name": "CreateImageRequestSize", + "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", "valueType": { "$id": "640", "kind": "string", @@ -5855,8 +5776,8 @@ { "$id": "641", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "256x256", + "value": "256x256", "valueType": { "$id": "642", "kind": "string", @@ -5872,8 +5793,8 @@ { "$id": "643", "kind": "enumvalue", - "name": "low", - "value": "low", + "name": "512x512", + "value": "512x512", "valueType": { "$id": "644", "kind": "string", @@ -5889,8 +5810,8 @@ { "$id": "645", "kind": "enumvalue", - "name": "high", - "value": "high", + "name": "1024x1024", + "value": "1024x1024", "valueType": { "$id": "646", "kind": "string", @@ -5902,6 +5823,40 @@ "$ref": "639" }, "decorators": [] + }, + { + "$id": "647", + "kind": "enumvalue", + "name": "1792x1024", + "value": "1792x1024", + "valueType": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "649", + "kind": "enumvalue", + "name": "1024x1792", + "value": "1024x1792", + "valueType": { + "$id": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] } ], "isFixed": true, @@ -5910,11 +5865,12 @@ "decorators": [] }, { - "$id": "647", + "$id": "651", "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartRefusal_type", + "name": "CreateImageRequestStyle", + "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", "valueType": { - "$id": "648", + "$id": "652", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5922,32 +5878,52 @@ }, "values": [ { - "$id": "649", + "$id": "653", "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", + "name": "vivid", + "value": "vivid", "valueType": { - "$ref": "648" + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "647" - } + "$ref": "651" + }, + "decorators": [] + }, + { + "$id": "655", + "kind": "enumvalue", + "name": "natural", + "value": "natural", + "valueType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "651" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartRefusal_type", - "isFixed": false, + "isFixed": true, "isFlags": false, "usage": "Input,Json", "decorators": [] }, { - "$id": "650", + "$id": "657", "kind": "enum", - "name": "ChatCompletionMessageToolCall_type", + "name": "CreateImageEditRequestModel", + "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", "valueType": { - "$id": "651", + "$id": "658", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5955,112 +5931,46 @@ }, "values": [ { - "$id": "652", + "$id": "659", "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", + "name": "dall-e-2", + "value": "dall-e-2", "valueType": { - "$ref": "651" + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "650" - } + "$ref": "657" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCall_type", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input", "decorators": [] }, { - "$id": "653", + "$id": "661", "kind": "enum", - "name": "CreateChatCompletionRequestModel", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", + "name": "CreateImageEditRequestSize", + "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", "valueType": { - "$id": "654", + "$id": "662", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "values": [ - { - "$id": "655", - "kind": "enumvalue", - "name": "o1-preview", - "value": "o1-preview", - "valueType": { - "$id": "656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "657", - "kind": "enumvalue", - "name": "o1-preview-2024-09-12", - "value": "o1-preview-2024-09-12", - "valueType": { - "$id": "658", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "659", - "kind": "enumvalue", - "name": "o1-mini", - "value": "o1-mini", - "valueType": { - "$id": "660", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "661", - "kind": "enumvalue", - "name": "o1-mini-2024-09-12", - "value": "o1-mini-2024-09-12", - "valueType": { - "$id": "662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" - }, - "decorators": [] - }, { "$id": "663", "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", + "name": "256x256", + "value": "256x256", "valueType": { "$id": "664", "kind": "string", @@ -6069,15 +5979,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "661" }, "decorators": [] }, { "$id": "665", "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", + "name": "512x512", + "value": "512x512", "valueType": { "$id": "666", "kind": "string", @@ -6086,15 +5996,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "661" }, "decorators": [] }, { "$id": "667", "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", + "name": "1024x1024", + "value": "1024x1024", "valueType": { "$id": "668", "kind": "string", @@ -6103,32 +6013,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "669", - "kind": "enumvalue", - "name": "chatgpt-4o-latest", - "value": "chatgpt-4o-latest", - "valueType": { - "$id": "670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "661" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "669", + "kind": "enum", + "name": "CreateImageEditRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", + "valueType": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "671", "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", + "name": "url", + "value": "url", "valueType": { "$id": "672", "kind": "string", @@ -6137,15 +6049,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "669" }, "decorators": [] }, { "$id": "673", "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", + "name": "b64_json", + "value": "b64_json", "valueType": { "$id": "674", "kind": "string", @@ -6154,32 +6066,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "669" }, "decorators": [] - }, - { - "$id": "675", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "676", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" - }, - "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "675", + "kind": "enum", + "name": "CreateImageVariationRequestModel", + "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", + "valueType": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "677", "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", + "name": "dall-e-2", + "value": "dall-e-2", "valueType": { "$id": "678", "kind": "string", @@ -6188,32 +6102,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "679", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "675" }, "decorators": [] - }, + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "679", + "kind": "enum", + "name": "CreateImageVariationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", + "valueType": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "681", "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", + "name": "url", + "value": "url", "valueType": { "$id": "682", "kind": "string", @@ -6222,15 +6138,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "679" }, "decorators": [] }, { "$id": "683", "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", + "name": "b64_json", + "value": "b64_json", "valueType": { "$id": "684", "kind": "string", @@ -6239,32 +6155,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "685", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "679" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "685", + "kind": "enum", + "name": "CreateImageVariationRequestSize", + "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", + "valueType": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "687", "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", + "name": "256x256", + "value": "256x256", "valueType": { "$id": "688", "kind": "string", @@ -6273,15 +6191,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "685" }, "decorators": [] }, { "$id": "689", "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", + "name": "512x512", + "value": "512x512", "valueType": { "$id": "690", "kind": "string", @@ -6290,15 +6208,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "685" }, "decorators": [] }, { "$id": "691", "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", + "name": "1024x1024", + "value": "1024x1024", "valueType": { "$id": "692", "kind": "string", @@ -6307,32 +6225,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "693", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "694", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "685" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "693", + "kind": "enum", + "name": "CreateFineTuningJobRequestModel", + "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", + "valueType": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "695", "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", + "name": "babbage-002", + "value": "babbage-002", "valueType": { "$id": "696", "kind": "string", @@ -6341,15 +6261,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "693" }, "decorators": [] }, { "$id": "697", "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", + "name": "davinci-002", + "value": "davinci-002", "valueType": { "$id": "698", "kind": "string", @@ -6358,7 +6278,7 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "693" }, "decorators": [] }, @@ -6375,15 +6295,15 @@ "decorators": [] }, "enumType": { - "$ref": "653" + "$ref": "693" }, "decorators": [] }, { "$id": "701", "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", "valueType": { "$id": "702", "kind": "string", @@ -6392,32 +6312,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "703", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0301", - "value": "gpt-3.5-turbo-0301", - "valueType": { - "$id": "704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "693" }, "decorators": [] - }, + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "703", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "705", "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", + "name": "auto", + "value": "auto", "valueType": { "$id": "706", "kind": "string", @@ -6426,32 +6348,34 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "707", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "708", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "703" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "707", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "709", "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", + "name": "auto", + "value": "auto", "valueType": { "$id": "710", "kind": "string", @@ -6460,40 +6384,23 @@ "decorators": [] }, "enumType": { - "$ref": "653" - }, - "decorators": [] - }, - { - "$id": "711", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "712", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "653" + "$ref": "707" }, "decorators": [] } ], - "isFixed": false, + "isFixed": true, "isFlags": false, "usage": "Input,Json", "decorators": [] }, { - "$id": "713", + "$id": "711", "kind": "enum", - "name": "CreateChatCompletionRequestServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", "valueType": { - "$id": "714", + "$id": "712", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6501,27 +6408,46 @@ }, "values": [ { - "$id": "715", + "$id": "713", "kind": "enumvalue", "name": "auto", "value": "auto", "valueType": { - "$id": "716", + "$id": "714", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "713" + "$ref": "711" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "715", + "kind": "enum", + "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "717", "kind": "enumvalue", - "name": "default", - "value": "default", + "name": "auto", + "value": "auto", "valueType": { "$id": "718", "kind": "string", @@ -6530,20 +6456,21 @@ "decorators": [] }, "enumType": { - "$ref": "713" + "$ref": "715" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { "$id": "719", "kind": "enum", - "name": "ChatCompletionTool_type", + "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", "valueType": { "$id": "720", "kind": "string", @@ -6555,31 +6482,33 @@ { "$id": "721", "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", + "name": "auto", + "value": "auto", "valueType": { - "$ref": "720" + "$id": "722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { "$ref": "719" - } + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionTool_type", - "isFixed": false, + "isFixed": true, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "722", + "$id": "723", "kind": "enum", - "name": "CreateChatCompletionRequestToolChoice", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", + "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", "valueType": { - "$id": "723", + "$id": "724", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6587,68 +6516,34 @@ }, "values": [ { - "$id": "724", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "725", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "722" - }, - "decorators": [] - }, - { - "$id": "726", + "$id": "725", "kind": "enumvalue", "name": "auto", "value": "auto", "valueType": { - "$id": "727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "722" - }, - "decorators": [] - }, - { - "$id": "728", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "729", + "$id": "726", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "722" + "$ref": "723" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "730", + "$id": "727", "kind": "enum", - "name": "ChatCompletionNamedToolChoice_type", + "name": "FineTuningJob_object", "valueType": { - "$id": "731", + "$id": "728", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6656,33 +6551,33 @@ }, "values": [ { - "$id": "732", + "$id": "729", "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", + "name": "fine_tuning.job", + "value": "fine_tuning.job", + "description": "fine_tuning.job", "valueType": { - "$ref": "731" + "$ref": "728" }, "enumType": { - "$ref": "730" + "$ref": "727" } } ], "crossLanguageDefinitionId": "", - "description": "The ChatCompletionNamedToolChoice_type", + "description": "The FineTuningJob_object", "isFixed": false, "isFlags": false, - "usage": "Input,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "733", + "$id": "730", "kind": "enum", - "name": "CreateChatCompletionResponseChoiceFinishReason1", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", + "name": "FineTuningJobStatus", + "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", "valueType": { - "$id": "734", + "$id": "731", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6690,102 +6585,119 @@ }, "values": [ { - "$id": "735", + "$id": "732", "kind": "enumvalue", - "name": "stop", - "value": "stop", + "name": "validating_files", + "value": "validating_files", "valueType": { - "$id": "736", + "$id": "733", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "733" + "$ref": "730" }, "decorators": [] }, { - "$id": "737", + "$id": "734", "kind": "enumvalue", - "name": "length", - "value": "length", + "name": "queued", + "value": "queued", "valueType": { - "$id": "738", + "$id": "735", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "733" + "$ref": "730" }, "decorators": [] }, { - "$id": "739", + "$id": "736", "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", + "name": "running", + "value": "running", "valueType": { - "$id": "740", + "$id": "737", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "733" + "$ref": "730" }, "decorators": [] }, { - "$id": "741", + "$id": "738", "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", + "name": "succeeded", + "value": "succeeded", "valueType": { - "$id": "742", + "$id": "739", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "733" + "$ref": "730" }, "decorators": [] }, { - "$id": "743", + "$id": "740", "kind": "enumvalue", - "name": "function_call", - "value": "function_call", + "name": "failed", + "value": "failed", "valueType": { - "$id": "744", + "$id": "741", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "733" + "$ref": "730" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "745", - "kind": "enum", - "name": "ChatCompletionResponseMessage_role", + }, + { + "$id": "742", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "744", + "kind": "enum", + "name": "ListPaginatedFineTuningJobsResponse_object", "valueType": { - "$id": "746", + "$id": "745", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6793,33 +6705,32 @@ }, "values": [ { - "$id": "747", + "$id": "746", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", + "name": "list", + "value": "list", + "description": "list", "valueType": { - "$ref": "746" + "$ref": "745" }, "enumType": { - "$ref": "745" + "$ref": "744" } } ], "crossLanguageDefinitionId": "", - "description": "The ChatCompletionResponseMessage_role", + "description": "The ListPaginatedFineTuningJobsResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "748", + "$id": "747", "kind": "enum", - "name": "CreateChatCompletionResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", + "name": "FineTuningJobCheckpoint_object", "valueType": { - "$id": "749", + "$id": "748", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6827,51 +6738,32 @@ }, "values": [ { - "$id": "750", + "$id": "749", "kind": "enumvalue", - "name": "scale", - "value": "scale", + "name": "fine_tuning.job.checkpoint", + "value": "fine_tuning.job.checkpoint", + "description": "fine_tuning.job.checkpoint", "valueType": { - "$id": "751", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { "$ref": "748" }, - "decorators": [] - }, - { - "$id": "752", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "753", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, "enumType": { - "$ref": "748" - }, - "decorators": [] + "$ref": "747" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobCheckpoint_object", + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "754", + "$id": "750", "kind": "enum", - "name": "CreateChatCompletionResponse_object", + "name": "ListFineTuningJobCheckpointsResponse_object", "valueType": { - "$id": "755", + "$id": "751", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6879,33 +6771,33 @@ }, "values": [ { - "$id": "756", + "$id": "752", "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", + "name": "list", + "value": "list", + "description": "list", "valueType": { - "$ref": "755" + "$ref": "751" }, "enumType": { - "$ref": "754" + "$ref": "750" } } ], "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionResponse_object", + "description": "The ListFineTuningJobCheckpointsResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "757", + "$id": "753", "kind": "enum", - "name": "CreateBatchRequestEndpoint", - "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", + "name": "FineTuningJobEventLevel", + "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", "valueType": { - "$id": "758", + "$id": "754", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6913,84 +6805,68 @@ }, "values": [ { - "$id": "759", + "$id": "755", "kind": "enumvalue", - "name": "/v1/chat/completions", - "value": "/v1/chat/completions", + "name": "info", + "value": "info", "valueType": { - "$id": "760", + "$id": "756", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "757" + "$ref": "753" }, "decorators": [] }, { - "$id": "761", + "$id": "757", "kind": "enumvalue", - "name": "/v1/embeddings", - "value": "/v1/embeddings", + "name": "warn", + "value": "warn", "valueType": { - "$id": "762", + "$id": "758", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "757" + "$ref": "753" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "763", - "kind": "enum", - "name": "CreateBatchRequest_completion_window", - "valueType": { - "$id": "764", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "765", + "$id": "759", "kind": "enumvalue", - "name": "24h", - "value": "24h", - "description": "24h", + "name": "error", + "value": "error", "valueType": { - "$ref": "764" + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "763" - } + "$ref": "753" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "description": "The CreateBatchRequest_completion_window", - "isFixed": false, + "isFixed": true, "isFlags": false, - "usage": "Spread,Json", + "usage": "Output,Json", "decorators": [] }, { - "$id": "766", + "$id": "761", "kind": "enum", - "name": "Batch_object", + "name": "FineTuningJobEvent_object", "valueType": { - "$id": "767", + "$id": "762", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6998,32 +6874,32 @@ }, "values": [ { - "$id": "768", + "$id": "763", "kind": "enumvalue", - "name": "batch", - "value": "batch", - "description": "batch", + "name": "fine_tuning.job.event", + "value": "fine_tuning.job.event", + "description": "fine_tuning.job.event", "valueType": { - "$ref": "767" + "$ref": "762" }, "enumType": { - "$ref": "766" + "$ref": "761" } } ], "crossLanguageDefinitionId": "", - "description": "The Batch_object", + "description": "The FineTuningJobEvent_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "769", + "$id": "764", "kind": "enum", - "name": "BatchErrors_object", + "name": "ListFineTuningJobEventsResponse_object", "valueType": { - "$id": "770", + "$id": "765", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7031,33 +6907,33 @@ }, "values": [ { - "$id": "771", + "$id": "766", "kind": "enumvalue", "name": "list", "value": "list", "description": "list", "valueType": { - "$ref": "770" + "$ref": "765" }, "enumType": { - "$ref": "769" + "$ref": "764" } } ], "crossLanguageDefinitionId": "", - "description": "The BatchErrors_object", + "description": "The ListFineTuningJobEventsResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "772", + "$id": "767", "kind": "enum", - "name": "BatchStatus", - "crossLanguageDefinitionId": "Batch.status.anonymous", + "name": "CreateFileRequestPurpose", + "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", "valueType": { - "$id": "773", + "$id": "768", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7065,153 +6941,118 @@ }, "values": [ { - "$id": "774", - "kind": "enumvalue", - "name": "validating", - "value": "validating", - "valueType": { - "$id": "775", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "772" - }, - "decorators": [] - }, - { - "$id": "776", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "777", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "772" - }, - "decorators": [] - }, - { - "$id": "778", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "772" - }, - "decorators": [] - }, - { - "$id": "780", + "$id": "769", "kind": "enumvalue", - "name": "finalizing", - "value": "finalizing", + "name": "assistants", + "value": "assistants", "valueType": { - "$id": "781", + "$id": "770", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "772" + "$ref": "767" }, "decorators": [] }, { - "$id": "782", + "$id": "771", "kind": "enumvalue", - "name": "completed", - "value": "completed", + "name": "batch", + "value": "batch", "valueType": { - "$id": "783", + "$id": "772", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "772" + "$ref": "767" }, "decorators": [] }, { - "$id": "784", + "$id": "773", "kind": "enumvalue", - "name": "expired", - "value": "expired", + "name": "fine-tune", + "value": "fine-tune", "valueType": { - "$id": "785", + "$id": "774", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "772" + "$ref": "767" }, "decorators": [] }, { - "$id": "786", + "$id": "775", "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", + "name": "vision", + "value": "vision", "valueType": { - "$id": "787", + "$id": "776", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "772" + "$ref": "767" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "777", + "kind": "enum", + "name": "ListFilesResponse_object", + "valueType": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "788", + "$id": "779", "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", + "name": "list", + "value": "list", + "description": "list", "valueType": { - "$id": "789", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "778" }, "enumType": { - "$ref": "772" - }, - "decorators": [] + "$ref": "777" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The ListFilesResponse_object", + "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "790", + "$id": "780", "kind": "enum", - "name": "ListBatchesResponse_object", + "name": "DeleteFileResponse_object", "valueType": { - "$id": "791", + "$id": "781", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7219,33 +7060,33 @@ }, "values": [ { - "$id": "792", + "$id": "782", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "file", + "value": "file", + "description": "file", "valueType": { - "$ref": "791" + "$ref": "781" }, "enumType": { - "$ref": "790" + "$ref": "780" } } ], "crossLanguageDefinitionId": "", - "description": "The ListBatchesResponse_object", + "description": "The DeleteFileResponse_object", "isFixed": false, "isFlags": false, "usage": "Output,Json", "decorators": [] }, { - "$id": "793", + "$id": "783", "kind": "enum", - "name": "CreateAssistantRequestModel", - "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", + "name": "CreateEmbeddingRequestModel", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", "valueType": { - "$id": "794", + "$id": "784", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7253,163 +7094,269 @@ }, "values": [ { - "$id": "795", + "$id": "785", "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", + "name": "text-embedding-ada-002", + "value": "text-embedding-ada-002", "valueType": { - "$id": "796", + "$id": "786", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "783" }, "decorators": [] }, { - "$id": "797", + "$id": "787", "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", + "name": "text-embedding-3-small", + "value": "text-embedding-3-small", "valueType": { - "$id": "798", + "$id": "788", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "783" }, "decorators": [] }, { - "$id": "799", + "$id": "789", "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", + "name": "text-embedding-3-large", + "value": "text-embedding-3-large", "valueType": { - "$id": "800", + "$id": "790", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "783" }, "decorators": [] - }, + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "791", + "kind": "enum", + "name": "CreateEmbeddingRequestEncodingFormat", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", + "valueType": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "801", + "$id": "793", "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", + "name": "float", + "value": "float", "valueType": { - "$id": "802", + "$id": "794", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "791" }, "decorators": [] }, { - "$id": "803", + "$id": "795", "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", + "name": "base64", + "value": "base64", "valueType": { - "$id": "804", + "$id": "796", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "791" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "797", + "kind": "enum", + "name": "Embedding_object", + "valueType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "805", + "$id": "799", "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", + "name": "embedding", + "value": "embedding", + "description": "embedding", "valueType": { - "$id": "806", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "798" }, "enumType": { - "$ref": "793" + "$ref": "797" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Embedding_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "800", + "kind": "enum", + "name": "CreateEmbeddingResponse_object", + "valueType": { + "$id": "801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "802", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "801" }, - "decorators": [] - }, + "enumType": { + "$ref": "800" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateEmbeddingResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "803", + "kind": "enum", + "name": "CreateCompletionRequestModel", + "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", + "valueType": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "807", + "$id": "805", "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", + "name": "gpt-3.5-turbo-instruct", + "value": "gpt-3.5-turbo-instruct", "valueType": { - "$id": "808", + "$id": "806", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "803" }, "decorators": [] }, { - "$id": "809", + "$id": "807", "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", + "name": "davinci-002", + "value": "davinci-002", "valueType": { - "$id": "810", + "$id": "808", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "803" }, "decorators": [] }, { - "$id": "811", + "$id": "809", "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", + "name": "babbage-002", + "value": "babbage-002", "valueType": { - "$id": "812", + "$id": "810", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "803" }, "decorators": [] - }, + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "811", + "kind": "enum", + "name": "CreateCompletionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { "$id": "813", "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", + "name": "stop", + "value": "stop", "valueType": { "$id": "814", "kind": "string", @@ -7418,15 +7365,15 @@ "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "811" }, "decorators": [] }, { "$id": "815", "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", + "name": "length", + "value": "length", "valueType": { "$id": "816", "kind": "string", @@ -7435,15 +7382,15 @@ "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "811" }, "decorators": [] }, { "$id": "817", "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", + "name": "content_filter", + "value": "content_filter", "valueType": { "$id": "818", "kind": "string", @@ -7452,209 +7399,88 @@ "decorators": [] }, "enumType": { - "$ref": "793" + "$ref": "811" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "819", + "kind": "enum", + "name": "CreateCompletionResponse_object", + "valueType": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "819", + "$id": "821", "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", + "name": "text_completion", + "value": "text_completion", + "description": "text_completion", "valueType": { - "$id": "820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "820" }, "enumType": { - "$ref": "793" - }, - "decorators": [] - }, + "$ref": "819" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "822", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartText_type", + "valueType": { + "$id": "823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "821", + "$id": "824", "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", + "name": "text", + "value": "text", + "description": "text", "valueType": { - "$id": "822", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "823" }, "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "823", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "825", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "827", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "828", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "829", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "831", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "832", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "833", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "835", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "836", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "837", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "838", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] - }, - { - "$id": "839", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "793" - }, - "decorators": [] + "$ref": "822" + } } ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartText_type", "isFixed": false, "isFlags": false, "usage": "Input,Json", "decorators": [] }, { - "$id": "841", + "$id": "825", "kind": "enum", - "name": "AssistantObject_object", + "name": "ChatCompletionRequestMessageContentPartImage_type", "valueType": { - "$id": "842", + "$id": "826", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7662,33 +7488,33 @@ }, "values": [ { - "$id": "843", + "$id": "827", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", + "name": "image_url", + "value": "image_url", + "description": "image_url", "valueType": { - "$ref": "842" + "$ref": "826" }, "enumType": { - "$ref": "841" + "$ref": "825" } } ], "crossLanguageDefinitionId": "", - "description": "The AssistantObject_object", + "description": "The ChatCompletionRequestMessageContentPartImage_type", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Json", "decorators": [] }, { - "$id": "844", + "$id": "828", "kind": "enum", - "name": "ListAssistantsRequestOrder", - "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", + "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", + "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", "valueType": { - "$id": "845", + "$id": "829", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7696,51 +7522,68 @@ }, "values": [ { - "$id": "846", + "$id": "830", "kind": "enumvalue", - "name": "asc", - "value": "asc", + "name": "auto", + "value": "auto", "valueType": { - "$id": "847", + "$id": "831", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "844" + "$ref": "828" }, "decorators": [] }, { - "$id": "848", + "$id": "832", "kind": "enumvalue", - "name": "desc", - "value": "desc", + "name": "low", + "value": "low", "valueType": { - "$id": "849", + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + }, + { + "$id": "834", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "835", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "844" + "$ref": "828" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input", + "usage": "Input,Json", "decorators": [] }, { - "$id": "850", + "$id": "836", "kind": "enum", - "name": "ListAssistantsResponse_object", + "name": "ChatCompletionRequestMessageContentPartRefusal_type", "valueType": { - "$id": "851", + "$id": "837", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7748,32 +7591,32 @@ }, "values": [ { - "$id": "852", + "$id": "838", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "refusal", + "value": "refusal", + "description": "refusal", "valueType": { - "$ref": "851" + "$ref": "837" }, "enumType": { - "$ref": "850" + "$ref": "836" } } ], "crossLanguageDefinitionId": "", - "description": "The ListAssistantsResponse_object", + "description": "The ChatCompletionRequestMessageContentPartRefusal_type", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Json", "decorators": [] }, { - "$id": "853", + "$id": "839", "kind": "enum", - "name": "DeleteAssistantResponse_object", + "name": "ChatCompletionMessageToolCall_type", "valueType": { - "$id": "854", + "$id": "840", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7781,33 +7624,33 @@ }, "values": [ { - "$id": "855", + "$id": "841", "kind": "enumvalue", - "name": "assistant.deleted", - "value": "assistant.deleted", - "description": "assistant.deleted", + "name": "function", + "value": "function", + "description": "function", "valueType": { - "$ref": "854" + "$ref": "840" }, "enumType": { - "$ref": "853" + "$ref": "839" } } ], "crossLanguageDefinitionId": "", - "description": "The DeleteAssistantResponse_object", + "description": "The ChatCompletionMessageToolCall_type", "isFixed": false, "isFlags": false, - "usage": "Output,Json", + "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "856", + "$id": "842", "kind": "enum", - "name": "CreateSpeechRequestModel", - "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", + "name": "CreateChatCompletionRequestModel", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", "valueType": { - "$id": "857", + "$id": "843", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7815,726 +7658,511 @@ }, "values": [ { - "$id": "858", + "$id": "844", "kind": "enumvalue", - "name": "tts-1", - "value": "tts-1", + "name": "o1-preview", + "value": "o1-preview", "valueType": { - "$id": "859", + "$id": "845", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "856" + "$ref": "842" }, "decorators": [] }, { - "$id": "860", + "$id": "846", "kind": "enumvalue", - "name": "tts-1-hd", - "value": "tts-1-hd", + "name": "o1-preview-2024-09-12", + "value": "o1-preview-2024-09-12", "valueType": { - "$id": "861", + "$id": "847", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "856" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "862", - "kind": "enum", - "name": "CreateSpeechRequestVoice", - "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", - "valueType": { - "$id": "863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "864", + "$id": "848", "kind": "enumvalue", - "name": "alloy", - "value": "alloy", + "name": "o1-mini", + "value": "o1-mini", "valueType": { - "$id": "865", + "$id": "849", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] }, { - "$id": "866", + "$id": "850", "kind": "enumvalue", - "name": "echo", - "value": "echo", + "name": "o1-mini-2024-09-12", + "value": "o1-mini-2024-09-12", "valueType": { - "$id": "867", + "$id": "851", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] }, { - "$id": "868", + "$id": "852", "kind": "enumvalue", - "name": "fable", - "value": "fable", + "name": "gpt-4o", + "value": "gpt-4o", "valueType": { - "$id": "869", + "$id": "853", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] }, { - "$id": "870", + "$id": "854", "kind": "enumvalue", - "name": "onyx", - "value": "onyx", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", "valueType": { - "$id": "871", + "$id": "855", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] }, { - "$id": "872", + "$id": "856", "kind": "enumvalue", - "name": "nova", - "value": "nova", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", "valueType": { - "$id": "873", + "$id": "857", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] }, { - "$id": "874", + "$id": "858", "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", + "name": "chatgpt-4o-latest", + "value": "chatgpt-4o-latest", "valueType": { - "$id": "875", + "$id": "859", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "862" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "876", - "kind": "enum", - "name": "CreateSpeechRequestResponseFormat", - "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", - "valueType": { - "$id": "877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "878", + "$id": "860", "kind": "enumvalue", - "name": "mp3", - "value": "mp3", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", "valueType": { - "$id": "879", + "$id": "861", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] }, { - "$id": "880", + "$id": "862", "kind": "enumvalue", - "name": "opus", - "value": "opus", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", "valueType": { - "$id": "881", + "$id": "863", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] }, { - "$id": "882", + "$id": "864", "kind": "enumvalue", - "name": "aac", - "value": "aac", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", "valueType": { - "$id": "883", + "$id": "865", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] }, { - "$id": "884", + "$id": "866", "kind": "enumvalue", - "name": "flac", - "value": "flac", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", "valueType": { - "$id": "885", + "$id": "867", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] }, { - "$id": "886", + "$id": "868", "kind": "enumvalue", - "name": "wav", - "value": "wav", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", "valueType": { - "$id": "887", + "$id": "869", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] }, { - "$id": "888", + "$id": "870", "kind": "enumvalue", - "name": "pcm", - "value": "pcm", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", "valueType": { - "$id": "889", + "$id": "871", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "876" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "890", - "kind": "enum", - "name": "CreateTranscriptionRequestModel", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", - "valueType": { - "$id": "891", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "892", + "$id": "872", "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", "valueType": { - "$id": "893", + "$id": "873", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "890" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "894", - "kind": "enum", - "name": "CreateTranscriptionRequestResponseFormat1", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", - "valueType": { - "$id": "895", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "896", + "$id": "874", "kind": "enumvalue", - "name": "json", - "value": "json", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", "valueType": { - "$id": "897", + "$id": "875", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "894" + "$ref": "842" }, "decorators": [] }, { - "$id": "898", + "$id": "876", "kind": "enumvalue", - "name": "text", - "value": "text", + "name": "gpt-4", + "value": "gpt-4", "valueType": { - "$id": "899", + "$id": "877", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "894" + "$ref": "842" }, "decorators": [] }, { - "$id": "900", + "$id": "878", "kind": "enumvalue", - "name": "srt", - "value": "srt", + "name": "gpt-4-0314", + "value": "gpt-4-0314", "valueType": { - "$id": "901", + "$id": "879", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "894" + "$ref": "842" }, "decorators": [] }, { - "$id": "902", + "$id": "880", "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", + "name": "gpt-4-0613", + "value": "gpt-4-0613", "valueType": { - "$id": "903", + "$id": "881", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "894" + "$ref": "842" }, "decorators": [] }, { - "$id": "904", + "$id": "882", "kind": "enumvalue", - "name": "vtt", - "value": "vtt", + "name": "gpt-4-32k", + "value": "gpt-4-32k", "valueType": { - "$id": "905", + "$id": "883", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "894" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "906", - "kind": "enum", - "name": "CreateTranscriptionRequestTimestampGranularity", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", - "valueType": { - "$id": "907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "908", + "$id": "884", "kind": "enumvalue", - "name": "word", - "value": "word", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", "valueType": { - "$id": "909", + "$id": "885", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "906" + "$ref": "842" }, "decorators": [] }, { - "$id": "910", + "$id": "886", "kind": "enumvalue", - "name": "segment", - "value": "segment", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", "valueType": { - "$id": "911", + "$id": "887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "906" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "912", - "kind": "enum", - "name": "CreateTranscriptionResponseVerboseJson_task", - "valueType": { - "$id": "913", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "914", + "$id": "888", "kind": "enumvalue", - "name": "transcribe", - "value": "transcribe", - "description": "transcribe", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", "valueType": { - "$ref": "913" + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "912" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranscriptionResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "915", - "kind": "enum", - "name": "CreateTranslationRequestModel", - "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", - "valueType": { - "$id": "916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "842" + }, + "decorators": [] + }, { - "$id": "917", + "$id": "890", "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", "valueType": { - "$id": "918", + "$id": "891", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "915" + "$ref": "842" }, "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "919", - "kind": "enum", - "name": "CreateTranslationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", - "valueType": { - "$id": "920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "921", + "$id": "892", "kind": "enumvalue", - "name": "json", - "value": "json", + "name": "gpt-3.5-turbo-0301", + "value": "gpt-3.5-turbo-0301", "valueType": { - "$id": "922", + "$id": "893", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "919" + "$ref": "842" }, "decorators": [] }, { - "$id": "923", + "$id": "894", "kind": "enumvalue", - "name": "text", - "value": "text", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", "valueType": { - "$id": "924", + "$id": "895", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "919" + "$ref": "842" }, "decorators": [] }, { - "$id": "925", + "$id": "896", "kind": "enumvalue", - "name": "srt", - "value": "srt", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", "valueType": { - "$id": "926", + "$id": "897", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "919" + "$ref": "842" }, "decorators": [] }, { - "$id": "927", + "$id": "898", "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", "valueType": { - "$id": "928", + "$id": "899", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "919" + "$ref": "842" }, "decorators": [] }, { - "$id": "929", + "$id": "900", "kind": "enumvalue", - "name": "vtt", - "value": "vtt", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", "valueType": { - "$id": "930", + "$id": "901", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "919" + "$ref": "842" }, "decorators": [] } ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "931", - "kind": "enum", - "name": "CreateTranslationResponseVerboseJson_task", - "valueType": { - "$id": "932", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "933", - "kind": "enumvalue", - "name": "translate", - "value": "translate", - "description": "translate", - "valueType": { - "$ref": "932" - }, - "enumType": { - "$ref": "931" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranslationResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "934", - "kind": "enum", - "name": "BatchRequestInput_method", - "valueType": { - "$id": "935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "936", - "kind": "enumvalue", - "name": "POST", - "value": "POST", - "description": "POST", - "valueType": { - "$ref": "935" - }, - "enumType": { - "$ref": "934" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchRequestInput_method", "isFixed": false, "isFlags": false, - "usage": "Input", + "usage": "Input,Json", "decorators": [] }, { - "$id": "937", + "$id": "902", "kind": "enum", - "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", + "name": "CreateChatCompletionRequestServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", "valueType": { - "$id": "938", + "$id": "903", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8542,118 +8170,51 @@ }, "values": [ { - "$id": "939", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - }, - { - "$id": "941", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "942", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - }, - { - "$id": "943", + "$id": "904", "kind": "enumvalue", - "name": "function_call", - "value": "function_call", + "name": "auto", + "value": "auto", "valueType": { - "$id": "944", + "$id": "905", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "937" + "$ref": "902" }, "decorators": [] }, { - "$id": "945", + "$id": "906", "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", + "name": "default", + "value": "default", "valueType": { - "$id": "946", + "$id": "907", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "937" + "$ref": "902" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "947", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponse_object", - "valueType": { - "$id": "948", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "949", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "948" - }, - "enumType": { - "$ref": "947" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionFunctionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", + "usage": "Input,Json", "decorators": [] }, { - "$id": "950", + "$id": "908", "kind": "enum", - "name": "ChatCompletionMessageToolCallChunk_type", + "name": "ChatCompletionTool_type", "valueType": { - "$id": "951", + "$id": "909", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8661,33 +8222,33 @@ }, "values": [ { - "$id": "952", + "$id": "910", "kind": "enumvalue", "name": "function", "value": "function", "description": "function", "valueType": { - "$ref": "951" + "$ref": "909" }, "enumType": { - "$ref": "950" + "$ref": "908" } } ], "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCallChunk_type", + "description": "The ChatCompletionTool_type", "isFixed": false, "isFlags": false, - "usage": "Output", + "usage": "Input,Json", "decorators": [] }, { - "$id": "953", + "$id": "911", "kind": "enum", - "name": "ChatCompletionStreamResponseDeltaRole", - "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", + "name": "CreateChatCompletionRequestToolChoice", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", "valueType": { - "$id": "954", + "$id": "912", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8695,86 +8256,102 @@ }, "values": [ { - "$id": "955", + "$id": "913", "kind": "enumvalue", - "name": "system", - "value": "system", + "name": "none", + "value": "none", "valueType": { - "$id": "956", + "$id": "914", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "953" + "$ref": "911" }, "decorators": [] }, { - "$id": "957", + "$id": "915", "kind": "enumvalue", - "name": "user", - "value": "user", + "name": "auto", + "value": "auto", "valueType": { - "$id": "958", + "$id": "916", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "953" + "$ref": "911" }, "decorators": [] }, { - "$id": "959", + "$id": "917", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", + "name": "required", + "value": "required", "valueType": { - "$id": "960", + "$id": "918", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "953" + "$ref": "911" }, "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "919", + "kind": "enum", + "name": "ChatCompletionNamedToolChoice_type", + "valueType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "961", + "$id": "921", "kind": "enumvalue", - "name": "tool", - "value": "tool", + "name": "function", + "value": "function", + "description": "function", "valueType": { - "$id": "962", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "920" }, "enumType": { - "$ref": "953" - }, - "decorators": [] + "$ref": "919" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionNamedToolChoice_type", + "isFixed": false, "isFlags": false, - "usage": "Output", + "usage": "Input,Json", "decorators": [] }, { - "$id": "963", + "$id": "922", "kind": "enum", - "name": "CreateChatCompletionStreamResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", + "name": "CreateChatCompletionResponseChoiceFinishReason1", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", "valueType": { - "$id": "964", + "$id": "923", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8782,103 +8359,102 @@ }, "values": [ { - "$id": "965", + "$id": "924", "kind": "enumvalue", "name": "stop", "value": "stop", "valueType": { - "$id": "966", + "$id": "925", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "963" + "$ref": "922" }, "decorators": [] }, { - "$id": "967", + "$id": "926", "kind": "enumvalue", "name": "length", "value": "length", "valueType": { - "$id": "968", + "$id": "927", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "963" + "$ref": "922" }, "decorators": [] }, { - "$id": "969", + "$id": "928", "kind": "enumvalue", "name": "tool_calls", "value": "tool_calls", "valueType": { - "$id": "970", + "$id": "929", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "963" + "$ref": "922" }, "decorators": [] }, { - "$id": "971", + "$id": "930", "kind": "enumvalue", "name": "content_filter", "value": "content_filter", "valueType": { - "$id": "972", + "$id": "931", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "963" + "$ref": "922" }, "decorators": [] }, { - "$id": "973", + "$id": "932", "kind": "enumvalue", "name": "function_call", "value": "function_call", "valueType": { - "$id": "974", + "$id": "933", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "963" + "$ref": "922" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "975", + "$id": "934", "kind": "enum", - "name": "CreateChatCompletionStreamResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", + "name": "ChatCompletionResponseMessage_role", "valueType": { - "$id": "976", + "$id": "935", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8886,51 +8462,85 @@ }, "values": [ { - "$id": "977", + "$id": "936", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "935" + }, + "enumType": { + "$ref": "934" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionResponseMessage_role", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "937", + "kind": "enum", + "name": "CreateChatCompletionResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", + "valueType": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "939", "kind": "enumvalue", "name": "scale", "value": "scale", "valueType": { - "$id": "978", + "$id": "940", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "975" + "$ref": "937" }, "decorators": [] }, { - "$id": "979", + "$id": "941", "kind": "enumvalue", "name": "default", "value": "default", "valueType": { - "$id": "980", + "$id": "942", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "975" + "$ref": "937" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "981", + "$id": "943", "kind": "enum", - "name": "CreateChatCompletionStreamResponse_object", + "name": "CreateChatCompletionResponse_object", "valueType": { - "$id": "982", + "$id": "944", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8938,33 +8548,33 @@ }, "values": [ { - "$id": "983", + "$id": "945", "kind": "enumvalue", - "name": "chat.completion.chunk", - "value": "chat.completion.chunk", - "description": "chat.completion.chunk", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", "valueType": { - "$ref": "982" + "$ref": "944" }, "enumType": { - "$ref": "981" + "$ref": "943" } } ], "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionStreamResponse_object", + "description": "The CreateChatCompletionResponse_object", "isFixed": false, "isFlags": false, - "usage": "Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "984", + "$id": "946", "kind": "enum", - "name": "MessageDeltaContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", + "name": "CreateBatchRequestEndpoint", + "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", "valueType": { - "$id": "985", + "$id": "947", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8972,69 +8582,51 @@ }, "values": [ { - "$id": "986", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "987", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "984" - }, - "decorators": [] - }, - { - "$id": "988", + "$id": "948", "kind": "enumvalue", - "name": "low", - "value": "low", + "name": "/v1/chat/completions", + "value": "/v1/chat/completions", "valueType": { - "$id": "989", + "$id": "949", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "984" + "$ref": "946" }, "decorators": [] }, { - "$id": "990", + "$id": "950", "kind": "enumvalue", - "name": "high", - "value": "high", + "name": "/v1/embeddings", + "value": "/v1/embeddings", "valueType": { - "$id": "991", + "$id": "951", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "984" + "$ref": "946" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Output", + "usage": "Input,Json", "decorators": [] }, { - "$id": "992", + "$id": "952", "kind": "enum", - "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", + "name": "CreateBatchRequest_completion_window", "valueType": { - "$id": "993", + "$id": "953", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9042,68 +8634,65 @@ }, "values": [ { - "$id": "994", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "995", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "992" - }, - "decorators": [] - }, - { - "$id": "996", + "$id": "954", "kind": "enumvalue", - "name": "low", - "value": "low", + "name": "24h", + "value": "24h", + "description": "24h", "valueType": { - "$id": "997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "953" }, "enumType": { - "$ref": "992" - }, - "decorators": [] - }, + "$ref": "952" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateBatchRequest_completion_window", + "isFixed": false, + "isFlags": false, + "usage": "Spread,Json", + "decorators": [] + }, + { + "$id": "955", + "kind": "enum", + "name": "Batch_object", + "valueType": { + "$id": "956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "998", + "$id": "957", "kind": "enumvalue", - "name": "high", - "value": "high", + "name": "batch", + "value": "batch", + "description": "batch", "valueType": { - "$id": "999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "956" }, "enumType": { - "$ref": "992" - }, - "decorators": [] + "$ref": "955" + } } ], - "isFixed": true, + "crossLanguageDefinitionId": "", + "description": "The Batch_object", + "isFixed": false, "isFlags": false, - "usage": "Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "1000", + "$id": "958", "kind": "enum", - "name": "MessageContentImageFileObject_type", + "name": "BatchErrors_object", "valueType": { - "$id": "1001", + "$id": "959", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9111,33 +8700,33 @@ }, "values": [ { - "$id": "1002", + "$id": "960", "kind": "enumvalue", - "name": "image_file", - "value": "image_file", - "description": "image_file", + "name": "list", + "value": "list", + "description": "list", "valueType": { - "$ref": "1001" + "$ref": "959" }, "enumType": { - "$ref": "1000" + "$ref": "958" } } ], "crossLanguageDefinitionId": "", - "description": "The MessageContentImageFileObject_type", + "description": "The BatchErrors_object", "isFixed": false, "isFlags": false, - "usage": "Input,Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "1003", + "$id": "961", "kind": "enum", - "name": "MessageContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", + "name": "BatchStatus", + "crossLanguageDefinitionId": "Batch.status.anonymous", "valueType": { - "$id": "1004", + "$id": "962", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9145,237 +8734,153 @@ }, "values": [ { - "$id": "1005", + "$id": "963", "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1006", + "name": "validating", + "value": "validating", + "valueType": { + "$id": "964", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1003" + "$ref": "961" }, "decorators": [] }, { - "$id": "1007", + "$id": "965", "kind": "enumvalue", - "name": "low", - "value": "low", + "name": "failed", + "value": "failed", "valueType": { - "$id": "1008", + "$id": "966", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1003" + "$ref": "961" }, "decorators": [] }, { - "$id": "1009", + "$id": "967", "kind": "enumvalue", - "name": "high", - "value": "high", + "name": "in_progress", + "value": "in_progress", "valueType": { - "$id": "1010", + "$id": "968", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1003" + "$ref": "961" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1011", - "kind": "enum", - "name": "MessageContentTextObject_type", - "valueType": { - "$id": "1012", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "1013", + "$id": "969", "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", + "name": "finalizing", + "value": "finalizing", "valueType": { - "$ref": "1012" + "$id": "970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "1011" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1014", - "kind": "enum", - "name": "MessageContentRefusalObject_type", - "valueType": { - "$id": "1015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1016", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "1015" + "$ref": "961" }, - "enumType": { - "$ref": "1014" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentRefusalObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1017", - "kind": "enum", - "name": "MessageContentImageUrlObject_type", - "valueType": { - "$id": "1018", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "decorators": [] + }, { - "$id": "1019", + "$id": "971", "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", + "name": "completed", + "value": "completed", "valueType": { - "$ref": "1018" + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "1017" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageUrlObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1020", - "kind": "enum", - "name": "MessageContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "961" + }, + "decorators": [] + }, { - "$id": "1022", + "$id": "973", "kind": "enumvalue", - "name": "auto", - "value": "auto", + "name": "expired", + "value": "expired", "valueType": { - "$id": "1023", + "$id": "974", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1020" + "$ref": "961" }, "decorators": [] }, { - "$id": "1024", + "$id": "975", "kind": "enumvalue", - "name": "low", - "value": "low", + "name": "cancelling", + "value": "cancelling", "valueType": { - "$id": "1025", + "$id": "976", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1020" + "$ref": "961" }, "decorators": [] }, { - "$id": "1026", + "$id": "977", "kind": "enumvalue", - "name": "high", - "value": "high", + "name": "cancelled", + "value": "cancelled", "valueType": { - "$id": "1027", + "$id": "978", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1020" + "$ref": "961" }, "decorators": [] } ], "isFixed": true, "isFlags": false, - "usage": "Input,Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "1028", + "$id": "979", "kind": "enum", - "name": "MessageDeltaObject_object", + "name": "ListBatchesResponse_object", "valueType": { - "$id": "1029", + "$id": "980", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9383,33 +8888,33 @@ }, "values": [ { - "$id": "1030", + "$id": "981", "kind": "enumvalue", - "name": "thread.message.delta", - "value": "thread.message.delta", - "description": "thread.message.delta", + "name": "list", + "value": "list", + "description": "list", "valueType": { - "$ref": "1029" + "$ref": "980" }, "enumType": { - "$ref": "1028" + "$ref": "979" } } ], "crossLanguageDefinitionId": "", - "description": "The MessageDeltaObject_object", + "description": "The ListBatchesResponse_object", "isFixed": false, "isFlags": false, - "usage": "Output", + "usage": "Output,Json", "decorators": [] }, { - "$id": "1031", + "$id": "982", "kind": "enum", - "name": "MessageDeltaObjectDeltaRole", - "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", + "name": "CreateAssistantRequestModel", + "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", "valueType": { - "$id": "1032", + "$id": "983", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9417,4172 +8922,2848 @@ }, "values": [ { - "$id": "1033", + "$id": "984", "kind": "enumvalue", - "name": "user", - "value": "user", + "name": "gpt-4o", + "value": "gpt-4o", "valueType": { - "$id": "1034", + "$id": "985", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1031" + "$ref": "982" }, "decorators": [] }, { - "$id": "1035", + "$id": "986", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", "valueType": { - "$id": "1036", + "$id": "987", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1031" + "$ref": "982" }, "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1037", - "kind": "enum", - "name": "MessageRequestContentTextObject_type", - "valueType": { - "$id": "1038", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { - "$id": "1039", + "$id": "988", "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", "valueType": { - "$ref": "1038" + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "1037" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageRequestContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1040", - "kind": "enum", - "name": "RunStepDeltaObject_object", - "valueType": { - "$id": "1041", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "982" + }, + "decorators": [] + }, { - "$id": "1042", + "$id": "990", "kind": "enumvalue", - "name": "thread.run.step.delta", - "value": "thread.run.step.delta", - "description": "thread.run.step.delta", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", "valueType": { - "$ref": "1041" + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "1040" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1043", - "kind": "enum", - "name": "ListThreadsResponse_object", - "valueType": { - "$id": "1044", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "982" + }, + "decorators": [] + }, { - "$id": "1045", + "$id": "992", "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", "valueType": { - "$ref": "1044" + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { - "$ref": "1043" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListThreadsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1046", - "kind": "enum", - "name": "ChatCompletionRole", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", - "valueType": { - "$id": "1047", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + "$ref": "982" + }, + "decorators": [] + }, { - "$id": "1048", + "$id": "994", "kind": "enumvalue", - "name": "system", - "value": "system", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", "valueType": { - "$id": "1049", + "$id": "995", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1046" + "$ref": "982" }, "decorators": [] }, { - "$id": "1050", + "$id": "996", "kind": "enumvalue", - "name": "user", - "value": "user", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", "valueType": { - "$id": "1051", + "$id": "997", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1046" + "$ref": "982" }, "decorators": [] }, { - "$id": "1052", + "$id": "998", "kind": "enumvalue", - "name": "assistant", - "value": "assistant", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", "valueType": { - "$id": "1053", + "$id": "999", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1046" + "$ref": "982" }, "decorators": [] }, { - "$id": "1054", + "$id": "1000", "kind": "enumvalue", - "name": "tool", - "value": "tool", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", "valueType": { - "$id": "1055", + "$id": "1001", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1046" + "$ref": "982" }, "decorators": [] }, { - "$id": "1056", + "$id": "1002", "kind": "enumvalue", - "name": "function", - "value": "function", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", "valueType": { - "$id": "1057", + "$id": "1003", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "1046" + "$ref": "982" }, "decorators": [] - } - ], - "access": "public", - "description": "The role of the author of a message", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - } - ], - "Models": [ - { - "$id": "1058", - "kind": "model", - "name": "CreateUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + }, { - "$id": "1059", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to upload.", - "type": { - "$id": "1060", + "$id": "1004", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "1005", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" - }, - { - "$id": "1061", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", - "type": { - "$ref": "2" + "enumType": { + "$ref": "982" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" + "decorators": [] }, { - "$id": "1062", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The number of bytes in the file you are uploading.", - "type": { - "$id": "1063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", + "$id": "1006", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "1007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1064", - "kind": "property", - "name": "mime_type", - "serializedName": "mime_type", - "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", - "type": { - "$id": "1065", + "$id": "1008", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "1009", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" - } - ] - }, - { - "$id": "1066", - "kind": "model", - "name": "Upload", - "crossLanguageDefinitionId": "OpenAI.Upload", - "usage": "Output,Json", - "description": "The Upload object can accept byte chunks in the form of Parts.", - "decorators": [], - "properties": [ + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, { - "$id": "1067", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The Upload unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1068", + "$id": "1010", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "1011", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.id" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1069", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1070", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1071", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "$id": "1012", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.created_at" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1072", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to be uploaded.", - "type": { - "$id": "1073", + "$id": "1014", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "1015", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.filename" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1074", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The intended number of bytes to be uploaded.", - "type": { - "$id": "1075", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", + "$id": "1016", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.bytes" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1076", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", - "type": { - "$id": "1077", + "$id": "1018", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "1019", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.purpose" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1078", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the Upload.", - "type": { - "$ref": "12" + "$id": "1020", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.status" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1079", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1080", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1081", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "$id": "1022", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "1023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1082", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"upload\".", - "type": { - "$id": "1083", - "kind": "constant", - "valueType": { - "$ref": "22" - }, - "value": "upload", + "$id": "1024", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.object" + "enumType": { + "$ref": "982" + }, + "decorators": [] }, { - "$id": "1084", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The ready File object after the Upload is completed.", - "type": { - "$id": "1085", - "kind": "nullable", - "type": { - "$id": "1086", - "kind": "model", - "name": "OpenAIFile", - "crossLanguageDefinitionId": "OpenAI.OpenAIFile", - "usage": "Output,Json", - "description": "The `File` object represents a document that has been uploaded to OpenAI.", - "decorators": [], - "properties": [ - { - "$id": "1087", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The file identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "1088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" - }, - { - "$id": "1089", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The size of the file, in bytes.", - "type": { - "$id": "1090", - "kind": "nullable", - "type": { - "$id": "1091", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" - }, - { - "$id": "1092", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the file was created.", - "type": { - "$id": "1093", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1094", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" - }, - { - "$id": "1095", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file.", - "type": { - "$id": "1096", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" - }, - { - "$id": "1097", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `file`.", - "type": { - "$id": "1098", - "kind": "constant", - "valueType": { - "$ref": "25" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" - }, - { - "$id": "1099", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", - "type": { - "$ref": "28" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" - }, - { - "$id": "1100", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", - "type": { - "$ref": "44" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" - }, - { - "$id": "1101", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", - "type": { - "$id": "1102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" - } - ] - } + "$id": "1026", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.file" - } - ] - }, - { - "$ref": "1086" - }, - { - "$id": "1103", - "kind": "model", - "name": "ErrorResponse", - "crossLanguageDefinitionId": "OpenAI.ErrorResponse", - "usage": "Output,Error,Json", - "decorators": [], - "properties": [ + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, { - "$id": "1104", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "1105", - "kind": "model", - "name": "Error", - "crossLanguageDefinitionId": "OpenAI.Error", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1106", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "1107", - "kind": "nullable", - "type": { - "$id": "1108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.code" - }, - { - "$id": "1109", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "1110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.message" - }, - { - "$id": "1111", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "1112", - "kind": "nullable", - "type": { - "$id": "1113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.param" - }, - { - "$id": "1114", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.type" - } - ] + "$id": "1028", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" + "enumType": { + "$ref": "982" + }, + "decorators": [] } - ] - }, - { - "$ref": "1105" + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] }, { - "$id": "1116", - "kind": "model", - "name": "AddUploadPartRequest", - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ + "$id": "1030", + "kind": "enum", + "name": "AssistantObject_object", + "valueType": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1117", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The chunk of bytes for this Part.", - "type": { - "$id": "1118", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] + "$id": "1032", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "1031" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" + "enumType": { + "$ref": "1030" + } } - ] + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] }, { - "$id": "1119", - "kind": "model", - "name": "UploadPart", - "crossLanguageDefinitionId": "OpenAI.UploadPart", - "usage": "Output,Json", - "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", - "decorators": [], - "properties": [ + "$id": "1033", + "kind": "enum", + "name": "ListAssistantsRequestOrder", + "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", + "valueType": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1120", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The upload Part unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1121", + "$id": "1035", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "1036", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.id" + "enumType": { + "$ref": "1033" + }, + "decorators": [] }, { - "$id": "1122", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Part was created.", - "type": { - "$id": "1123", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1124", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "$id": "1037", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" - }, + "enumType": { + "$ref": "1033" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1039", + "kind": "enum", + "name": "ListAssistantsResponse_object", + "valueType": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1125", - "kind": "property", - "name": "upload_id", - "serializedName": "upload_id", - "description": "The ID of the Upload object that this Part was added to.", - "type": { - "$id": "1126", + "$id": "1041", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1040" + }, + "enumType": { + "$ref": "1039" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListAssistantsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1042", + "kind": "enum", + "name": "DeleteAssistantResponse_object", + "valueType": { + "$id": "1043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1044", + "kind": "enumvalue", + "name": "assistant.deleted", + "value": "assistant.deleted", + "description": "assistant.deleted", + "valueType": { + "$ref": "1043" + }, + "enumType": { + "$ref": "1042" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteAssistantResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1045", + "kind": "enum", + "name": "CreateSpeechRequestModel", + "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", + "valueType": { + "$id": "1046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1047", + "kind": "enumvalue", + "name": "tts-1", + "value": "tts-1", + "valueType": { + "$id": "1048", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" + "enumType": { + "$ref": "1045" + }, + "decorators": [] }, { - "$id": "1127", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `upload.part`.", - "type": { - "$id": "1128", - "kind": "constant", - "valueType": { - "$ref": "52" - }, - "value": "upload.part", + "$id": "1049", + "kind": "enumvalue", + "name": "tts-1-hd", + "value": "tts-1-hd", + "valueType": { + "$id": "1050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.object" + "enumType": { + "$ref": "1045" + }, + "decorators": [] } - ] + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] }, { - "$id": "1129", - "kind": "model", - "name": "CompleteUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", + "$id": "1051", + "kind": "enum", + "name": "CreateSpeechRequestVoice", + "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", + "valueType": { + "$id": "1052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1053", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "1054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1055", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "1056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1057", + "kind": "enumvalue", + "name": "fable", + "value": "fable", + "valueType": { + "$id": "1058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1059", + "kind": "enumvalue", + "name": "onyx", + "value": "onyx", + "valueType": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1061", + "kind": "enumvalue", + "name": "nova", + "value": "nova", + "valueType": { + "$id": "1062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1063", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, "usage": "Input,Json", - "decorators": [], - "properties": [ + "decorators": [] + }, + { + "$id": "1065", + "kind": "enum", + "name": "CreateSpeechRequestResponseFormat", + "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", + "valueType": { + "$id": "1066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1130", - "kind": "property", - "name": "part_ids", - "serializedName": "part_ids", - "description": "The ordered list of Part IDs.", - "type": { - "$id": "1131", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1067", + "kind": "enumvalue", + "name": "mp3", + "value": "mp3", + "valueType": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" + "enumType": { + "$ref": "1065" + }, + "decorators": [] }, { - "$id": "1133", - "kind": "property", - "name": "md5", - "serializedName": "md5", - "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", - "type": { - "$id": "1134", + "$id": "1069", + "kind": "enumvalue", + "name": "opus", + "value": "opus", + "valueType": { + "$id": "1070", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1071", + "kind": "enumvalue", + "name": "aac", + "value": "aac", + "valueType": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1073", + "kind": "enumvalue", + "name": "flac", + "value": "flac", + "valueType": { + "$id": "1074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1075", + "kind": "enumvalue", + "name": "wav", + "value": "wav", + "valueType": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1077", + "kind": "enumvalue", + "name": "pcm", + "value": "pcm", + "valueType": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] } - ] + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] }, { - "$id": "1135", - "kind": "model", - "name": "ListVectorStoresResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ + "$id": "1079", + "kind": "enum", + "name": "CreateTranscriptionRequestModel", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", + "valueType": { + "$id": "1080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1136", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1137", - "kind": "constant", - "valueType": { - "$ref": "61" - }, - "value": "list", + "$id": "1081", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" + "enumType": { + "$ref": "1079" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1083", + "kind": "enum", + "name": "CreateTranscriptionRequestResponseFormat1", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", + "valueType": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1085", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] }, { - "$id": "1138", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1139", - "kind": "array", - "name": "ArrayVectorStoreObject", - "valueType": { - "$id": "1140", - "kind": "model", - "name": "VectorStoreObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", - "usage": "Output,Json", - "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", - "decorators": [], - "properties": [ - { - "$id": "1141", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" - }, - { - "$id": "1143", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store`.", - "type": { - "$id": "1144", - "kind": "constant", - "valueType": { - "$ref": "64" - }, - "value": "vector_store", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" - }, - { - "$id": "1145", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store was created.", - "type": { - "$id": "1146", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1147", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" - }, - { - "$id": "1148", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1149", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" - }, - { - "$id": "1150", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total number of bytes used by the files in the vector store.", - "type": { - "$id": "1151", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" - }, - { - "$id": "1152", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1153", - "kind": "model", - "name": "VectorStoreObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1154", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1155", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1156", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been successfully processed.", - "type": { - "$id": "1157", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" - }, - { - "$id": "1158", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1159", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" - }, - { - "$id": "1160", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that were cancelled.", - "type": { - "$id": "1161", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1162", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1163", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" - }, - { - "$id": "1164", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", - "type": { - "$ref": "67" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" - }, - { - "$id": "1165", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1166", - "kind": "model", - "name": "VectorStoreExpirationAfter", - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", - "usage": "Input,Output,Json", - "description": "The expiration policy for a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1167", - "kind": "property", - "name": "anchor", - "serializedName": "anchor", - "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", - "type": { - "$id": "1168", - "kind": "constant", - "valueType": { - "$ref": "75" - }, - "value": "last_active_at", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" - }, - { - "$id": "1169", - "kind": "property", - "name": "days", - "serializedName": "days", - "description": "The number of days after the anchor time that the vector store will expire.", - "type": { - "$id": "1170", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" - }, - { - "$id": "1171", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the vector store will expire.", - "type": { - "$id": "1172", - "kind": "nullable", - "type": { - "$id": "1173", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" - }, - { - "$id": "1175", - "kind": "property", - "name": "last_active_at", - "serializedName": "last_active_at", - "description": "The Unix timestamp (in seconds) for when the vector store was last active.", - "type": { - "$id": "1176", - "kind": "nullable", - "type": { - "$id": "1177", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1178", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" - }, - { - "$id": "1179", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1180", - "kind": "nullable", - "type": { - "$id": "1181", - "kind": "dict", - "keyType": { - "$id": "1182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1087", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" + "enumType": { + "$ref": "1083" + }, + "decorators": [] }, { - "$id": "1184", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1185", + "$id": "1089", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1090", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" + "enumType": { + "$ref": "1083" + }, + "decorators": [] }, { - "$id": "1186", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1187", + "$id": "1091", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1092", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" + "enumType": { + "$ref": "1083" + }, + "decorators": [] }, { - "$id": "1188", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1189", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "1093", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" + "enumType": { + "$ref": "1083" + }, + "decorators": [] } - ] - }, - { - "$ref": "1140" - }, - { - "$ref": "1153" - }, - { - "$ref": "1166" + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] }, { - "$id": "1190", - "kind": "model", - "name": "CreateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "$id": "1095", + "kind": "enum", + "name": "CreateTranscriptionRequestTimestampGranularity", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", + "valueType": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1191", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1192", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1097", + "kind": "enumvalue", + "name": "word", + "value": "word", + "valueType": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" + "enumType": { + "$ref": "1095" + }, + "decorators": [] }, { - "$id": "1194", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1195", + "$id": "1099", + "kind": "enumvalue", + "name": "segment", + "value": "segment", + "valueType": { + "$id": "1100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" - }, - { - "$id": "1196", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$ref": "1166" + "enumType": { + "$ref": "1095" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" - }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1101", + "kind": "enum", + "name": "CreateTranscriptionResponseVerboseJson_task", + "valueType": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1197", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1198", - "kind": "union", - "name": "CreateVectorStoreRequestChunkingStrategy", - "variantTypes": [ - { - "$id": "1199", - "kind": "model", - "name": "AutoChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", - "usage": "Input,Json", - "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$id": "1200", - "kind": "model", - "name": "FileChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1201", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1202", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" - }, - "properties": [ - { - "$ref": "1201" - } - ], - "discriminatedSubtypes": { - "$id": "1203", - "auto": { - "$ref": "1199" - }, - "static": { - "$id": "1204", - "kind": "model", - "name": "StaticChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", - "usage": "Input,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$ref": "1200" - }, - "properties": [ - { - "$id": "1205", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1206", - "kind": "constant", - "valueType": { - "$id": "1207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" - }, - { - "$id": "1208", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$id": "1209", - "kind": "model", - "name": "StaticChunkingStrategy", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1210", - "kind": "property", - "name": "max_chunk_size_tokens", - "serializedName": "max_chunk_size_tokens", - "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", - "type": { - "$id": "1211", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" - }, - { - "$id": "1212", - "kind": "property", - "name": "chunk_overlap_tokens", - "serializedName": "chunk_overlap_tokens", - "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", - "type": { - "$id": "1213", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" - } - ] - } - } - }, - "properties": [ - { - "$id": "1214", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `auto`.", - "type": { - "$id": "1215", - "kind": "constant", - "valueType": { - "$id": "1216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" - } - ] - }, - { - "$ref": "1204" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" - }, - { - "$id": "1217", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1218", - "kind": "nullable", - "type": { - "$id": "1219", - "kind": "dict", - "keyType": { - "$id": "1220", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } + "$id": "1103", + "kind": "enumvalue", + "name": "transcribe", + "value": "transcribe", + "description": "transcribe", + "valueType": { + "$ref": "1102" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" + "enumType": { + "$ref": "1101" + } } - ] - }, - { - "$ref": "1199" - }, - { - "$ref": "1200" - }, - { - "$ref": "1204" + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranscriptionResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] }, { - "$ref": "1209" + "$id": "1104", + "kind": "enum", + "name": "CreateTranslationRequestModel", + "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1106", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1104" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] }, { - "$id": "1222", - "kind": "model", - "name": "UpdateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "$id": "1108", + "kind": "enum", + "name": "CreateTranslationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", + "valueType": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1223", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1224", - "kind": "nullable", - "type": { - "$id": "1225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } + "$id": "1110", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" - }, - { - "$id": "1226", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1227", - "kind": "nullable", - "type": { - "$ref": "1166" - } + "enumType": { + "$ref": "1108" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" + "decorators": [] }, { - "$id": "1228", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1229", - "kind": "nullable", - "type": { - "$id": "1230", - "kind": "dict", - "keyType": { - "$id": "1231", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } + "$id": "1112", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" - } - ] - }, - { - "$id": "1233", - "kind": "model", - "name": "DeleteVectorStoreResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, { - "$id": "1234", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1235", + "$id": "1114", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" + "enumType": { + "$ref": "1108" + }, + "decorators": [] }, { - "$id": "1236", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1237", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "1116", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" + "enumType": { + "$ref": "1108" + }, + "decorators": [] }, { - "$id": "1238", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1239", - "kind": "constant", - "valueType": { - "$ref": "78" - }, - "value": "vector_store.deleted", + "$id": "1118", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" + "enumType": { + "$ref": "1108" + }, + "decorators": [] } - ] + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] }, { - "$id": "1240", - "kind": "model", - "name": "ListVectorStoreFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", + "$id": "1120", + "kind": "enum", + "name": "CreateTranslationResponseVerboseJson_task", + "valueType": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1122", + "kind": "enumvalue", + "name": "translate", + "value": "translate", + "description": "translate", + "valueType": { + "$ref": "1121" + }, + "enumType": { + "$ref": "1120" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranslationResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, "usage": "Output,Json", - "decorators": [], - "properties": [ + "decorators": [] + }, + { + "$id": "1123", + "kind": "enum", + "name": "BatchRequestInput_method", + "valueType": { + "$id": "1124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1241", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1242", - "kind": "constant", - "valueType": { - "$ref": "97" - }, - "value": "list", + "$id": "1125", + "kind": "enumvalue", + "name": "POST", + "value": "POST", + "description": "POST", + "valueType": { + "$ref": "1124" + }, + "enumType": { + "$ref": "1123" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchRequestInput_method", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1126", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1128", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" + "enumType": { + "$ref": "1126" + }, + "decorators": [] }, { - "$id": "1243", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1244", - "kind": "array", - "name": "ArrayVectorStoreFileObject", - "valueType": { - "$id": "1245", - "kind": "model", - "name": "VectorStoreFileObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", - "usage": "Output,Json", - "description": "A list of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1246", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1247", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" - }, - { - "$id": "1248", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file`.", - "type": { - "$id": "1249", - "kind": "constant", - "valueType": { - "$ref": "100" - }, - "value": "vector_store.file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" - }, - { - "$id": "1250", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", - "type": { - "$id": "1251", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" - }, - { - "$id": "1252", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store file was created.", - "type": { - "$id": "1253", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1254", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" - }, - { - "$id": "1255", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" - }, - { - "$id": "1257", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", - "type": { - "$ref": "103" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" - }, - { - "$id": "1258", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", - "type": { - "$id": "1259", - "kind": "nullable", - "type": { - "$id": "1260", - "kind": "model", - "name": "VectorStoreFileObjectLastError", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1261", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "113" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" - }, - { - "$id": "1262", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1263", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" - }, - { - "$id": "1264", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The strategy used to chunk the file.", - "type": { - "$id": "1265", - "kind": "union", - "name": "VectorStoreFileObjectChunkingStrategy", - "variantTypes": [ - { - "$id": "1266", - "kind": "model", - "name": "StaticChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$id": "1267", - "kind": "model", - "name": "FileChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1268", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1269", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" - }, - "properties": [ - { - "$ref": "1268" - } - ], - "discriminatedSubtypes": { - "$id": "1270", - "static": { - "$ref": "1266" - }, - "other": { - "$id": "1271", - "kind": "model", - "name": "OtherChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", - "discriminatorValue": "other", - "decorators": [], - "baseModel": { - "$ref": "1267" - }, - "properties": [ - { - "$id": "1272", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `other`.", - "type": { - "$id": "1273", - "kind": "constant", - "valueType": { - "$id": "1274", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "other", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" - } - ] - }, - "auto": { - "$id": "1275", - "kind": "model", - "name": "AutoChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$ref": "1267" - }, - "properties": [ - { - "$id": "1276", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1277", - "kind": "constant", - "valueType": { - "$id": "1278", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" - } - ] - } - } - }, - "properties": [ - { - "$id": "1279", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1280", - "kind": "constant", - "valueType": { - "$id": "1281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" - }, - { - "$id": "1282", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$ref": "1209" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" - } - ] - }, - { - "$ref": "1271" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1130", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" + "enumType": { + "$ref": "1126" + }, + "decorators": [] }, { - "$id": "1283", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1284", + "$id": "1132", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" + "enumType": { + "$ref": "1126" + }, + "decorators": [] }, { - "$id": "1285", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1286", + "$id": "1134", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1135", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" - }, - { - "$id": "1287", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1288", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] + "enumType": { + "$ref": "1126" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" + "decorators": [] } - ] - }, - { - "$ref": "1245" - }, - { - "$ref": "1260" - }, - { - "$ref": "1266" - }, - { - "$ref": "1267" + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$ref": "1271" + "$id": "1136", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponse_object", + "valueType": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1138", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "1137" + }, + "enumType": { + "$ref": "1136" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionFunctionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$ref": "1275" + "$id": "1139", + "kind": "enum", + "name": "ChatCompletionMessageToolCallChunk_type", + "valueType": { + "$id": "1140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1141", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "1140" + }, + "enumType": { + "$ref": "1139" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCallChunk_type", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$id": "1289", - "kind": "model", - "name": "CreateVectorStoreFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "$id": "1142", + "kind": "enum", + "name": "ChatCompletionStreamResponseDeltaRole", + "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", + "valueType": { + "$id": "1143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1290", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1291", + "$id": "1144", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" + "enumType": { + "$ref": "1142" + }, + "decorators": [] }, { - "$id": "1292", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1293", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1199" - }, - { - "$ref": "1204" - } - ], + "$id": "1146", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1148", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1150", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] } - ] + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$id": "1294", - "kind": "model", - "name": "DeleteVectorStoreFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ + "$id": "1152", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1295", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1296", + "$id": "1154", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1155", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" + "enumType": { + "$ref": "1152" + }, + "decorators": [] }, { - "$id": "1297", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1298", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "1156", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" + "enumType": { + "$ref": "1152" + }, + "decorators": [] }, { - "$id": "1299", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1300", - "kind": "constant", - "valueType": { - "$ref": "121" - }, - "value": "vector_store.file.deleted", + "$id": "1158", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" - } - ] - }, - { - "$id": "1301", - "kind": "model", - "name": "CreateVectorStoreFileBatchRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, { - "$id": "1302", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1303", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1160", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" + "enumType": { + "$ref": "1152" + }, + "decorators": [] }, { - "$id": "1305", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1306", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1199" - }, - { - "$ref": "1204" - } - ], + "$id": "1162", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" + "enumType": { + "$ref": "1152" + }, + "decorators": [] } - ] + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$id": "1307", - "kind": "model", - "name": "VectorStoreFileBatchObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", - "usage": "Output,Json", - "description": "A batch of files attached to a vector store.", - "decorators": [], - "properties": [ + "$id": "1164", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", + "valueType": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1308", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1309", + "$id": "1166", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "1167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" + "enumType": { + "$ref": "1164" + }, + "decorators": [] }, { - "$id": "1310", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file_batch`.", - "type": { - "$id": "1311", - "kind": "constant", - "valueType": { - "$ref": "124" - }, - "value": "vector_store.files_batch", + "$id": "1168", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" - }, + "enumType": { + "$ref": "1164" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1170", + "kind": "enum", + "name": "CreateChatCompletionStreamResponse_object", + "valueType": { + "$id": "1171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1312", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", - "type": { - "$id": "1313", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1314", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] + "$id": "1172", + "kind": "enumvalue", + "name": "chat.completion.chunk", + "value": "chat.completion.chunk", + "description": "chat.completion.chunk", + "valueType": { + "$ref": "1171" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" - }, + "enumType": { + "$ref": "1170" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionStreamResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1173", + "kind": "enum", + "name": "MessageDeltaContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1315", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1316", + "$id": "1175", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1176", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" + "enumType": { + "$ref": "1173" + }, + "decorators": [] }, { - "$id": "1317", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", - "type": { - "$ref": "127" + "$id": "1177", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" + "enumType": { + "$ref": "1173" + }, + "decorators": [] }, { - "$id": "1318", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1319", - "kind": "model", - "name": "VectorStoreFileBatchObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1320", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1321", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1322", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been processed.", - "type": { - "$id": "1323", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" - }, - { - "$id": "1324", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1325", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" - }, - { - "$id": "1326", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that where cancelled.", - "type": { - "$id": "1327", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1328", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1329", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" - } - ] + "$id": "1179", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" + "enumType": { + "$ref": "1173" + }, + "decorators": [] } - ] - }, - { - "$ref": "1319" + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] }, { - "$id": "1330", - "kind": "model", - "name": "CreateThreadAndRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "$id": "1181", + "kind": "enum", + "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1331", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1332", + "$id": "1183", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1184", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" + "enumType": { + "$ref": "1181" + }, + "decorators": [] }, { - "$id": "1333", - "kind": "property", - "name": "thread", - "serializedName": "thread", - "description": "If no thread is provided, an empty thread will be created.", - "type": { - "$id": "1334", - "kind": "model", - "name": "CreateThreadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1335", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", - "type": { - "$id": "1336", - "kind": "array", - "name": "ArrayCreateMessageRequest", - "valueType": { - "$id": "1337", - "kind": "model", - "name": "CreateMessageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1338", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", - "type": { - "$ref": "143" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" - }, - { - "$id": "1339", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "1340", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$id": "1341", - "kind": "model", - "name": "MessageContent", - "crossLanguageDefinitionId": "OpenAI.MessageContent", - "access": "public", - "usage": "Input,Output,Json", - "description": "Represents a single piece of content in an Assistants API message.", - "decorators": [], - "properties": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" - }, - { - "$id": "1342", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they should be added to.", - "type": { - "$id": "1343", - "kind": "nullable", - "type": { - "$id": "1344", - "kind": "array", - "name": "CreateMessageRequestAttachments", - "valueType": { - "$id": "1345", - "kind": "model", - "name": "CreateMessageRequestAttachment", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1346", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "1347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" - }, - { - "$id": "1348", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "1349", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1350", - "kind": "union", - "name": "CreateMessageRequestAttachmentTool", - "variantTypes": [ - { - "$id": "1351", - "kind": "model", - "name": "AssistantToolsCode", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", - "usage": "Input,Output,Json", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$id": "1352", - "kind": "model", - "name": "AssistantToolDefinition", - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1353", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" - }, - "properties": [ - { - "$ref": "1353" - } - ], - "discriminatedSubtypes": { - "$id": "1355", - "code_interpreter": { - "$ref": "1351" - }, - "file_search": { - "$id": "1356", - "kind": "model", - "name": "AssistantToolsFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", - "usage": "Input,Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1352" - }, - "properties": [ - { - "$id": "1357", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1358", - "kind": "constant", - "valueType": { - "$id": "1359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" - }, - { - "$id": "1360", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "Overrides for the file search tool.", - "type": { - "$id": "1361", - "kind": "model", - "name": "AssistantToolsFileSearchFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1362", - "kind": "property", - "name": "max_num_results", - "serializedName": "max_num_results", - "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "type": { - "$id": "1363", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" - }, - { - "$id": "1364", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1365", - "kind": "model", - "name": "FileSearchRankingOptions", - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", - "usage": "Input,Output,Json", - "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "decorators": [], - "properties": [ - { - "$id": "1366", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", - "type": { - "$ref": "149" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" - }, - { - "$id": "1367", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1368", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" - } - ] - }, - "function": { - "$id": "1369", - "kind": "model", - "name": "AssistantToolsFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", - "usage": "Input,Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1352" - }, - "properties": [ - { - "$id": "1370", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `function`", - "type": { - "$id": "1371", - "kind": "constant", - "valueType": { - "$id": "1372", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" - }, - { - "$id": "1373", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1374", - "kind": "model", - "name": "FunctionObject", - "crossLanguageDefinitionId": "OpenAI.FunctionObject", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1375", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "1376", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" - }, - { - "$id": "1377", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1378", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" - }, - { - "$id": "1379", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "1380", - "kind": "model", - "name": "FunctionParameters", - "crossLanguageDefinitionId": "OpenAI.FunctionParameters", - "usage": "Input,Output,Json", - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", - "decorators": [], - "additionalProperties": { - "$id": "1381", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" - }, - { - "$id": "1382", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", - "type": { - "$id": "1383", - "kind": "nullable", - "type": { - "$id": "1384", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" - } - ] - } - } - }, - "properties": [ - { - "$id": "1385", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `code_interpreter`", - "type": { - "$id": "1386", - "kind": "constant", - "valueType": { - "$id": "1387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" - } - ] - }, - { - "$id": "1388", - "kind": "model", - "name": "AssistantToolsFileSearchTypeOnly", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1389", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1390", - "kind": "constant", - "valueType": { - "$ref": "155" - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" - }, - { - "$id": "1391", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1392", - "kind": "nullable", - "type": { - "$id": "1393", - "kind": "dict", - "keyType": { - "$id": "1394", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" - }, - { - "$id": "1396", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1397", - "kind": "nullable", - "type": { - "$id": "1398", - "kind": "model", - "name": "CreateThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1399", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1400", - "kind": "model", - "name": "CreateThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1401", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1402", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1404", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1405", - "kind": "model", - "name": "ToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1406", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1407", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1408", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" - }, - { - "$id": "1409", - "kind": "property", - "name": "vector_stores", - "serializedName": "vector_stores", - "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", - "type": { - "$id": "1410", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1411", - "kind": "model", - "name": "ToolResourcesFileSearchVectorStore", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1412", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", - "type": { - "$id": "1413", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1414", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" - }, - { - "$id": "1415", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1416", - "kind": "union", - "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", - "variantTypes": [ - { - "$ref": "1199" - }, - { - "$ref": "1204" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" - }, - { - "$id": "1417", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1418", - "kind": "dict", - "keyType": { - "$id": "1419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1420", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" - }, - { - "$id": "1421", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1422", - "kind": "nullable", - "type": { - "$id": "1423", - "kind": "dict", - "keyType": { - "$id": "1424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1425", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" - } - ] + "$id": "1185", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" + "enumType": { + "$ref": "1181" + }, + "decorators": [] }, { - "$id": "1426", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1427", - "kind": "nullable", - "type": { - "$ref": "158" - } + "$id": "1187", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" - }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1189", + "kind": "enum", + "name": "MessageContentImageFileObject_type", + "valueType": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1428", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1429", - "kind": "nullable", - "type": { - "$id": "1430", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } + "$id": "1191", + "kind": "enumvalue", + "name": "image_file", + "value": "image_file", + "description": "image_file", + "valueType": { + "$ref": "1190" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" - }, + "enumType": { + "$ref": "1189" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageFileObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1192", + "kind": "enum", + "name": "MessageContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "1431", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1432", - "kind": "nullable", - "type": { - "$id": "1433", - "kind": "array", - "name": "CreateThreadAndRunRequestTools", - "valueType": { - "$ref": "1352" - }, - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", - "decorators": [] - } + "$id": "1194", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" + "enumType": { + "$ref": "1192" + }, + "decorators": [] }, { - "$id": "1434", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1435", - "kind": "nullable", - "type": { - "$id": "1436", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1437", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1438", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1439", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1440", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1441", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1442", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1443", - "kind": "model", - "name": "ToolResourcesFileSearchIdsOnly", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1444", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1445", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1446", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" - } - ] - } + "$id": "1196", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" + "enumType": { + "$ref": "1192" + }, + "decorators": [] }, { - "$id": "1447", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1448", - "kind": "nullable", - "type": { - "$id": "1449", - "kind": "dict", - "keyType": { - "$id": "1450", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } + "$id": "1198", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" + "enumType": { + "$ref": "1192" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1200", + "kind": "enum", + "name": "MessageContentTextObject_type", + "valueType": { + "$id": "1201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1202", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1201" + }, + "enumType": { + "$ref": "1200" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1203", + "kind": "enum", + "name": "MessageContentRefusalObject_type", + "valueType": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1205", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "1204" + }, + "enumType": { + "$ref": "1203" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentRefusalObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1206", + "kind": "enum", + "name": "MessageContentImageUrlObject_type", + "valueType": { + "$id": "1207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1208", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "1207" + }, + "enumType": { + "$ref": "1206" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageUrlObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1209", + "kind": "enum", + "name": "MessageContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1211", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1213", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1215", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1217", + "kind": "enum", + "name": "MessageDeltaObject_object", + "valueType": { + "$id": "1218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1219", + "kind": "enumvalue", + "name": "thread.message.delta", + "value": "thread.message.delta", + "description": "thread.message.delta", + "valueType": { + "$ref": "1218" + }, + "enumType": { + "$ref": "1217" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1220", + "kind": "enum", + "name": "MessageDeltaObjectDeltaRole", + "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", + "valueType": { + "$id": "1221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1222", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + }, + { + "$id": "1224", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1226", + "kind": "enum", + "name": "MessageRequestContentTextObject_type", + "valueType": { + "$id": "1227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1228", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1227" + }, + "enumType": { + "$ref": "1226" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageRequestContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1229", + "kind": "enum", + "name": "RunStepDeltaObject_object", + "valueType": { + "$id": "1230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1231", + "kind": "enumvalue", + "name": "thread.run.step.delta", + "value": "thread.run.step.delta", + "description": "thread.run.step.delta", + "valueType": { + "$ref": "1230" + }, + "enumType": { + "$ref": "1229" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1232", + "kind": "enum", + "name": "ListThreadsResponse_object", + "valueType": { + "$id": "1233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1234", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1233" + }, + "enumType": { + "$ref": "1232" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListThreadsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1235", + "kind": "enum", + "name": "ChatCompletionRole", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", + "valueType": { + "$id": "1236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1237", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1239", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1241", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1243", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] }, { - "$id": "1452", + "$id": "1245", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "1246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + } + ], + "access": "public", + "description": "The role of the author of a message", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + } + ], + "Models": [ + { + "$id": "1247", + "kind": "model", + "name": "CreateUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1248", "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to upload.", "type": { - "$id": "1453", - "kind": "nullable", - "type": { - "$id": "1454", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" }, { - "$id": "1455", + "$id": "1250", "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", "type": { - "$id": "1456", - "kind": "nullable", - "type": { - "$id": "1457", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } + "$ref": "2" }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" }, { - "$id": "1458", + "$id": "1251", "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "name": "bytes", + "serializedName": "bytes", + "description": "The number of bytes in the file you are uploading.", "type": { - "$id": "1459", - "kind": "nullable", - "type": { - "$id": "1460", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } + "$id": "1252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" }, { - "$id": "1461", + "$id": "1253", "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "name": "mime_type", + "serializedName": "mime_type", + "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", "type": { - "$id": "1462", - "kind": "nullable", - "type": { - "$id": "1463", + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" + } + ] + }, + { + "$id": "1255", + "kind": "model", + "name": "Upload", + "crossLanguageDefinitionId": "OpenAI.Upload", + "usage": "Output,Json", + "description": "The Upload object can accept byte chunks in the form of Parts.", + "decorators": [], + "properties": [ + { + "$id": "1256", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The Upload unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.id" + }, + { + "$id": "1258", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1259", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1260", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] - } + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" + "crossLanguageDefinitionId": "OpenAI.Upload.created_at" }, { - "$id": "1464", + "$id": "1261", "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to be uploaded.", "type": { - "$id": "1465", - "kind": "nullable", - "type": { - "$id": "1466", + "$id": "1262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.filename" + }, + { + "$id": "1263", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The intended number of bytes to be uploaded.", + "type": { + "$id": "1264", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.bytes" + }, + { + "$id": "1265", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", + "type": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.purpose" + }, + { + "$id": "1267", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the Upload.", + "type": { + "$ref": "12" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.status" + }, + { + "$id": "1268", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1269", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1270", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] - } + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" + }, + { + "$id": "1271", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"upload\".", + "type": { + "$id": "1272", + "kind": "constant", + "valueType": { + "$ref": "22" + }, + "value": "upload", + "decorators": [] }, "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" + "crossLanguageDefinitionId": "OpenAI.Upload.object" }, { - "$id": "1467", + "$id": "1273", "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", + "name": "file", + "serializedName": "file", + "description": "The ready File object after the Upload is completed.", "type": { - "$id": "1468", + "$id": "1274", "kind": "nullable", "type": { - "$id": "1469", + "$id": "1275", "kind": "model", - "name": "TruncationObject", - "crossLanguageDefinitionId": "OpenAI.TruncationObject", - "usage": "Input,Output,Json", - "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", + "name": "OpenAIFile", + "crossLanguageDefinitionId": "OpenAI.OpenAIFile", + "usage": "Output,Json", + "description": "The `File` object represents a document that has been uploaded to OpenAI.", "decorators": [], "properties": [ { - "$id": "1470", + "$id": "1276", "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "name": "id", + "serializedName": "id", + "description": "The file identifier, which can be referenced in the API endpoints.", "type": { - "$ref": "206" + "$id": "1277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" }, { - "$id": "1471", + "$id": "1278", "kind": "property", - "name": "last_messages", - "serializedName": "last_messages", - "description": "The number of most recent messages from the thread when constructing the context for the run.", + "name": "bytes", + "serializedName": "bytes", + "description": "The size of the file, in bytes.", "type": { - "$id": "1472", + "$id": "1279", "kind": "nullable", "type": { - "$id": "1473", + "$id": "1280", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] } }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" + }, + { + "$id": "1281", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the file was created.", + "type": { + "$id": "1282", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" + }, + { + "$id": "1284", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" + }, + { + "$id": "1286", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `file`.", + "type": { + "$id": "1287", + "kind": "constant", + "valueType": { + "$ref": "25" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" + }, + { + "$id": "1288", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", + "type": { + "$ref": "28" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" + }, + { + "$id": "1289", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" + }, + { + "$id": "1290", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", + "type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" } ] } @@ -13591,527 +11772,174 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" - }, + "crossLanguageDefinitionId": "OpenAI.Upload.file" + } + ] + }, + { + "$ref": "1275" + }, + { + "$id": "1292", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "OpenAI.ErrorResponse", + "usage": "Output,Error,Json", + "decorators": [], + "properties": [ { - "$id": "1474", + "$id": "1293", "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", + "name": "error", + "serializedName": "error", "type": { - "$id": "1475", - "kind": "nullable", - "type": { - "$id": "1476", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" + "$id": "1294", + "kind": "model", + "name": "Error", + "crossLanguageDefinitionId": "OpenAI.Error", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1295", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "1296", + "kind": "nullable", + "type": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } }, - { - "$id": "1477", - "kind": "model", - "name": "AssistantsNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", - "usage": "Input,Output,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", - "decorators": [], - "properties": [ - { - "$id": "1478", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. If type is `function`, the function name must be set", - "type": { - "$ref": "220" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" - }, - { - "$id": "1479", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1480", - "kind": "model", - "name": "AssistantsNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1481", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "1482", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - } + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.code" + }, + { + "$id": "1298", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "1299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.message" + }, + { + "$id": "1300", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "1301", + "kind": "nullable", + "type": { + "$id": "1302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.param" + }, + { + "$id": "1303", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.type" + } + ] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" - }, + "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" + } + ] + }, + { + "$ref": "1294" + }, + { + "$id": "1305", + "kind": "model", + "name": "AddUploadPartRequest", + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ { - "$id": "1483", + "$id": "1306", "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", + "name": "data", + "serializedName": "data", + "description": "The chunk of bytes for this Part.", "type": { - "$id": "1484", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "1307", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" - }, + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" + } + ] + }, + { + "$id": "1308", + "kind": "model", + "name": "UploadPart", + "crossLanguageDefinitionId": "OpenAI.UploadPart", + "usage": "Output,Json", + "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", + "decorators": [], + "properties": [ { - "$id": "1485", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1486", - "kind": "nullable", - "type": { - "$id": "1487", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1488", - "kind": "constant", - "valueType": { - "$id": "1489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "1490", - "kind": "model", - "name": "ResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", - "usage": "Input,Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$id": "1491", - "kind": "model", - "name": "OmniTypedResponseFormat", - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1492", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" - }, - "properties": [ - { - "$ref": "1492" - } - ], - "discriminatedSubtypes": { - "$id": "1494", - "text": { - "$ref": "1490" - }, - "json_object": { - "$id": "1495", - "kind": "model", - "name": "ResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", - "usage": "Input,Output,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "1491" - }, - "properties": [ - { - "$id": "1496", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "1497", - "kind": "constant", - "valueType": { - "$id": "1498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "1499", - "kind": "model", - "name": "ResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", - "usage": "Input,Output,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "1491" - }, - "properties": [ - { - "$id": "1500", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "1501", - "kind": "constant", - "valueType": { - "$id": "1502", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" - }, - { - "$id": "1503", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$id": "1504", - "kind": "model", - "name": "ResponseFormatJsonSchemaJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1505", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", - "type": { - "$id": "1506", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" - }, - { - "$id": "1507", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1508", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" - }, - { - "$id": "1509", - "kind": "property", - "name": "schema", - "serializedName": "schema", - "type": { - "$id": "1510", - "kind": "model", - "name": "ResponseFormatJsonSchemaSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", - "usage": "Input,Output,Json", - "description": "The schema for the response format, described as a JSON Schema object.", - "decorators": [], - "additionalProperties": { - "$id": "1511", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" - }, - { - "$id": "1512", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", - "type": { - "$id": "1513", - "kind": "nullable", - "type": { - "$id": "1514", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "properties": [ - { - "$id": "1515", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "1516", - "kind": "constant", - "valueType": { - "$id": "1517", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" - } - ] - }, - { - "$ref": "1495" - }, - { - "$ref": "1499" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" - } - ] - }, - { - "$ref": "1334" - }, - { - "$ref": "1337" - }, - { - "$ref": "1341" - }, - { - "$ref": "1345" - }, - { - "$ref": "1351" - }, - { - "$ref": "1352" - }, - { - "$ref": "1356" - }, - { - "$ref": "1361" - }, - { - "$ref": "1365" - }, - { - "$ref": "1369" - }, - { - "$ref": "1374" - }, - { - "$ref": "1380" - }, - { - "$ref": "1388" - }, - { - "$ref": "1398" - }, - { - "$ref": "1400" - }, - { - "$ref": "1405" - }, - { - "$ref": "1411" - }, - { - "$ref": "1436" - }, - { - "$ref": "1438" - }, - { - "$ref": "1443" - }, - { - "$ref": "1469" - }, - { - "$ref": "1477" - }, - { - "$ref": "1480" - }, - { - "$ref": "1490" - }, - { - "$ref": "1491" - }, - { - "$ref": "1495" - }, - { - "$ref": "1499" - }, - { - "$ref": "1504" - }, - { - "$ref": "1510" - }, - { - "$id": "1518", - "kind": "model", - "name": "RunObject", - "crossLanguageDefinitionId": "OpenAI.RunObject", - "usage": "Output,Json", - "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "1519", + "$id": "1309", "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", + "description": "The upload Part unique identifier, which can be referenced in API endpoints.", "type": { - "$id": "1520", + "$id": "1310", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14121,42 +11949,21 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.id" - }, - { - "$id": "1521", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run`.", - "type": { - "$id": "1522", - "kind": "constant", - "valueType": { - "$ref": "228" - }, - "value": "thread.run", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.object" + "crossLanguageDefinitionId": "OpenAI.UploadPart.id" }, { - "$id": "1523", + "$id": "1311", "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run was created.", + "description": "The Unix timestamp (in seconds) for when the Part was created.", "type": { - "$id": "1524", + "$id": "1312", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "1525", + "$id": "1313", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -14169,16 +11976,16 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" + "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" }, { - "$id": "1526", + "$id": "1314", "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "name": "upload_id", + "serializedName": "upload_id", + "description": "The ID of the Upload object that this Part was added to.", "type": { - "$id": "1527", + "$id": "1315", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14188,578 +11995,886 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" + "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" }, { - "$id": "1528", + "$id": "1316", "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `upload.part`.", + "type": { + "$id": "1317", + "kind": "constant", + "valueType": { + "$ref": "52" + }, + "value": "upload.part", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.object" + } + ] + }, + { + "$id": "1318", + "kind": "model", + "name": "CompleteUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1319", + "kind": "property", + "name": "part_ids", + "serializedName": "part_ids", + "description": "The ordered list of Part IDs.", + "type": { + "$id": "1320", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" + }, + { + "$id": "1322", + "kind": "property", + "name": "md5", + "serializedName": "md5", + "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", "type": { - "$id": "1529", + "$id": "1323", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" - }, + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" + } + ] + }, + { + "$id": "1324", + "kind": "model", + "name": "ListVectorStoresResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ { - "$id": "1530", + "$id": "1325", "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", + "name": "object", + "serializedName": "object", "type": { - "$ref": "231" + "$id": "1326", + "kind": "constant", + "valueType": { + "$ref": "61" + }, + "value": "list", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.status" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" }, { - "$id": "1531", + "$id": "1327", "kind": "property", - "name": "required_action", - "serializedName": "required_action", - "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "name": "data", + "serializedName": "data", "type": { - "$id": "1532", - "kind": "nullable", - "type": { - "$id": "1533", + "$id": "1328", + "kind": "array", + "name": "ArrayVectorStoreObject", + "valueType": { + "$id": "1329", "kind": "model", - "name": "RunObjectRequiredAction", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", + "name": "VectorStoreObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", "usage": "Output,Json", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", "decorators": [], "properties": [ { - "$id": "1534", + "$id": "1330", "kind": "property", - "name": "type", - "serializedName": "type", - "description": "For now, this is always `submit_tool_outputs`.", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" + }, + { + "$id": "1332", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store`.", "type": { - "$id": "1535", + "$id": "1333", "kind": "constant", "valueType": { - "$ref": "251" + "$ref": "64" }, - "value": "submit_tool_outputs", + "value": "vector_store", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" }, { - "$id": "1536", + "$id": "1334", "kind": "property", - "name": "submit_tool_outputs", - "serializedName": "submit_tool_outputs", - "description": "Details on the tool outputs needed for this run to continue.", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store was created.", "type": { - "$id": "1537", - "kind": "model", - "name": "RunObjectRequiredActionSubmitToolOutputs", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1538", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "A list of the relevant tool calls.", + "$id": "1335", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1336", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" + }, + { + "$id": "1337", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" + }, + { + "$id": "1339", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total number of bytes used by the files in the vector store.", + "type": { + "$id": "1340", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" + }, + { + "$id": "1341", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1342", + "kind": "model", + "name": "VectorStoreObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1343", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", "type": { - "$id": "1539", - "kind": "array", - "name": "ArrayRunToolCallObject", + "$id": "1344", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1345", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been successfully processed.", + "type": { + "$id": "1346", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" + }, + { + "$id": "1347", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1348", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" + }, + { + "$id": "1349", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that were cancelled.", + "type": { + "$id": "1350", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1351", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1352", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" + }, + { + "$id": "1353", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", + "type": { + "$ref": "67" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" + }, + { + "$id": "1354", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1355", + "kind": "model", + "name": "VectorStoreExpirationAfter", + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", + "usage": "Input,Output,Json", + "description": "The expiration policy for a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1356", + "kind": "property", + "name": "anchor", + "serializedName": "anchor", + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", + "type": { + "$id": "1357", + "kind": "constant", "valueType": { - "$id": "1540", - "kind": "model", - "name": "RunToolCallObject", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", - "usage": "Output,Json", - "description": "Tool call objects", - "decorators": [], - "properties": [ - { - "$id": "1541", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", - "type": { - "$id": "1542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" - }, - { - "$id": "1543", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call the output is required for. For now, this is always `function`.", - "type": { - "$id": "1544", - "kind": "constant", - "valueType": { - "$ref": "254" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" - }, - { - "$id": "1545", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function definition.", - "type": { - "$id": "1546", - "kind": "model", - "name": "RunToolCallObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1547", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "1548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" - }, - { - "$id": "1549", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments that the model expects you to pass to the function.", - "type": { - "$id": "1550", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" - } - ] + "$ref": "75" }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "value": "last_active_at", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" + }, + { + "$id": "1358", + "kind": "property", + "name": "days", + "serializedName": "days", + "description": "The number of days after the anchor time that the vector store will expire.", + "type": { + "$id": "1359", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" } ] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" - }, - { - "$id": "1551", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run. Will be `null` if there are no errors.", - "type": { - "$id": "1552", - "kind": "nullable", - "type": { - "$id": "1553", - "kind": "model", - "name": "RunObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" + }, { - "$id": "1554", + "$id": "1360", "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", "type": { - "$ref": "257" + "$id": "1361", + "kind": "nullable", + "type": { + "$id": "1362", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1363", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" + }, + { + "$id": "1364", + "kind": "property", + "name": "last_active_at", + "serializedName": "last_active_at", + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", + "type": { + "$id": "1365", + "kind": "nullable", + "type": { + "$id": "1366", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1367", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" }, { - "$id": "1555", + "$id": "1368", "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "1556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$id": "1369", + "kind": "nullable", + "type": { + "$id": "1370", + "kind": "dict", + "keyType": { + "$id": "1371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" } ] - } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" }, { - "$id": "1557", + "$id": "1373", "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the run will expire.", + "name": "first_id", + "serializedName": "first_id", "type": { - "$id": "1558", - "kind": "nullable", - "type": { - "$id": "1559", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1560", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } + "$id": "1374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" }, { - "$id": "1561", + "$id": "1375", "kind": "property", - "name": "started_at", - "serializedName": "started_at", - "description": "The Unix timestamp (in seconds) for when the run was started.", + "name": "last_id", + "serializedName": "last_id", "type": { - "$id": "1562", - "kind": "nullable", - "type": { - "$id": "1563", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1564", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" }, { - "$id": "1565", + "$id": "1377", "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "name": "has_more", + "serializedName": "has_more", "type": { - "$id": "1566", - "kind": "nullable", - "type": { - "$id": "1567", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1568", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } + "$id": "1378", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" - }, - { - "$id": "1569", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run failed.", - "type": { - "$id": "1570", - "kind": "nullable", - "type": { - "$id": "1571", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1572", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" - }, + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" + } + ] + }, + { + "$ref": "1329" + }, + { + "$ref": "1342" + }, + { + "$ref": "1355" + }, + { + "$id": "1379", + "kind": "model", + "name": "CreateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ { - "$id": "1573", + "$id": "1380", "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run was completed.", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { - "$id": "1574", - "kind": "nullable", - "type": { - "$id": "1575", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1576", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "$id": "1381", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" - }, - { - "$id": "1577", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", - "type": { - "$id": "1578", - "kind": "nullable", - "type": { - "$id": "1579", - "kind": "model", - "name": "RunObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1580", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", - "type": { - "$ref": "265" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" - } - ] - } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" }, { - "$id": "1581", + "$id": "1383", "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", "type": { - "$id": "1582", + "$id": "1384", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.model" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" }, { - "$id": "1583", + "$id": "1385", "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "name": "expires_after", + "serializedName": "expires_after", "type": { - "$id": "1584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "1355" }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" }, { - "$id": "1585", + "$id": "1386", "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", "type": { - "$id": "1586", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1352" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "1387", + "kind": "union", + "name": "CreateVectorStoreRequestChunkingStrategy", + "variantTypes": [ + { + "$id": "1388", + "kind": "model", + "name": "AutoChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", + "usage": "Input,Json", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$id": "1389", + "kind": "model", + "name": "FileChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1390", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" + }, + "properties": [ + { + "$ref": "1390" + } + ], + "discriminatedSubtypes": { + "$id": "1392", + "auto": { + "$ref": "1388" + }, + "static": { + "$id": "1393", + "kind": "model", + "name": "StaticChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", + "usage": "Input,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$ref": "1389" + }, + "properties": [ + { + "$id": "1394", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1395", + "kind": "constant", + "valueType": { + "$id": "1396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" + }, + { + "$id": "1397", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$id": "1398", + "kind": "model", + "name": "StaticChunkingStrategy", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1399", + "kind": "property", + "name": "max_chunk_size_tokens", + "serializedName": "max_chunk_size_tokens", + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", + "type": { + "$id": "1400", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" + }, + { + "$id": "1401", + "kind": "property", + "name": "chunk_overlap_tokens", + "serializedName": "chunk_overlap_tokens", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", + "type": { + "$id": "1402", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" + } + ] + } + } + }, + "properties": [ + { + "$id": "1403", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `auto`.", + "type": { + "$id": "1404", + "kind": "constant", + "valueType": { + "$id": "1405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" + } + ] + }, + { + "$ref": "1393" + } + ], "decorators": [] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tools" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" }, { - "$id": "1587", + "$id": "1406", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "1588", + "$id": "1407", "kind": "nullable", "type": { - "$id": "1589", + "$id": "1408", "kind": "dict", "keyType": { - "$id": "1590", + "$id": "1409", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "1591", + "$id": "1410", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14768,132 +12883,101 @@ "decorators": [] } }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" - }, + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" + } + ] + }, + { + "$ref": "1388" + }, + { + "$ref": "1389" + }, + { + "$ref": "1393" + }, + { + "$ref": "1398" + }, + { + "$id": "1411", + "kind": "model", + "name": "UpdateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ { - "$id": "1592", + "$id": "1412", "kind": "property", - "name": "usage", - "serializedName": "usage", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", "type": { - "$id": "1593", + "$id": "1413", "kind": "nullable", "type": { - "$id": "1594", - "kind": "model", - "name": "RunCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", - "decorators": [], - "properties": [ - { - "$id": "1595", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run.", - "type": { - "$id": "1596", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" - }, - { - "$id": "1597", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run.", - "type": { - "$id": "1598", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" - }, - { - "$id": "1599", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "1600", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" - } - ] + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] } }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.usage" + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" }, { - "$id": "1601", + "$id": "1415", "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "name": "expires_after", + "serializedName": "expires_after", "type": { - "$id": "1602", + "$id": "1416", "kind": "nullable", "type": { - "$id": "1603", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] + "$ref": "1355" } }, "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" }, { - "$id": "1604", + "$id": "1417", "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "1605", + "$id": "1418", "kind": "nullable", "type": { - "$id": "1606", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", + "$id": "1419", + "kind": "dict", + "keyType": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] } }, @@ -14901,203 +12985,593 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" - }, + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" + } + ] + }, + { + "$id": "1422", + "kind": "model", + "name": "DeleteVectorStoreResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ { - "$id": "1607", + "$id": "1423", "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", + "name": "id", + "serializedName": "id", "type": { - "$id": "1608", - "kind": "nullable", - "type": { - "$id": "1609", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" }, { - "$id": "1610", + "$id": "1425", "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens specified to have been used over the course of the run.", + "name": "deleted", + "serializedName": "deleted", "type": { - "$id": "1611", - "kind": "nullable", - "type": { - "$id": "1612", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } + "$id": "1426", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" }, { - "$id": "1613", + "$id": "1427", "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", + "name": "object", + "serializedName": "object", "type": { - "$id": "1614", - "kind": "nullable", - "type": { - "$ref": "1469" - } + "$id": "1428", + "kind": "constant", + "valueType": { + "$ref": "78" + }, + "value": "vector_store.deleted", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" - }, + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" + } + ] + }, + { + "$id": "1429", + "kind": "model", + "name": "ListVectorStoreFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ { - "$id": "1615", + "$id": "1430", "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", + "name": "object", + "serializedName": "object", "type": { - "$id": "1616", - "kind": "nullable", - "type": { - "$id": "1617", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1477" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" - }, - { - "$id": "1618", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1619", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "1431", + "kind": "constant", + "valueType": { + "$ref": "97" + }, + "value": "list", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" }, { - "$id": "1620", + "$id": "1432", "kind": "property", - "name": "response_format", - "serializedName": "response_format", + "name": "data", + "serializedName": "data", "type": { - "$id": "1621", - "kind": "nullable", - "type": { - "$id": "1622", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ + "$id": "1433", + "kind": "array", + "name": "ArrayVectorStoreFileObject", + "valueType": { + "$id": "1434", + "kind": "model", + "name": "VectorStoreFileObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", + "usage": "Output,Json", + "description": "A list of files attached to a vector store.", + "decorators": [], + "properties": [ { - "$id": "1623", - "kind": "constant", - "valueType": { - "$id": "1624", + "$id": "1435", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1436", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "auto", - "decorators": [] + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" + }, + { + "$id": "1437", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file`.", + "type": { + "$id": "1438", + "kind": "constant", + "valueType": { + "$ref": "100" + }, + "value": "vector_store.file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" + }, + { + "$id": "1439", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", + "type": { + "$id": "1440", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" + }, + { + "$id": "1441", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", + "type": { + "$id": "1442", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1443", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" + }, + { + "$id": "1444", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" }, { - "$ref": "1490" + "$id": "1446", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", + "type": { + "$ref": "103" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" }, { - "$ref": "1495" + "$id": "1447", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", + "type": { + "$id": "1448", + "kind": "nullable", + "type": { + "$id": "1449", + "kind": "model", + "name": "VectorStoreFileObjectLastError", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1450", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "113" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" + }, + { + "$id": "1451", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" }, { - "$ref": "1499" + "$id": "1453", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The strategy used to chunk the file.", + "type": { + "$id": "1454", + "kind": "union", + "name": "VectorStoreFileObjectChunkingStrategy", + "variantTypes": [ + { + "$id": "1455", + "kind": "model", + "name": "StaticChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$id": "1456", + "kind": "model", + "name": "FileChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1457", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" + }, + "properties": [ + { + "$ref": "1457" + } + ], + "discriminatedSubtypes": { + "$id": "1459", + "static": { + "$ref": "1455" + }, + "other": { + "$id": "1460", + "kind": "model", + "name": "OtherChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", + "discriminatorValue": "other", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1461", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `other`.", + "type": { + "$id": "1462", + "kind": "constant", + "valueType": { + "$id": "1463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "other", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" + } + ] + }, + "auto": { + "$id": "1464", + "kind": "model", + "name": "AutoChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1465", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1466", + "kind": "constant", + "valueType": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" + } + ] + } + } + }, + "properties": [ + { + "$id": "1468", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1469", + "kind": "constant", + "valueType": { + "$id": "1470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" + }, + { + "$id": "1471", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$ref": "1398" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" + } + ] + }, + { + "$ref": "1460" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" } - ], - "decorators": [] - } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" + }, + { + "$id": "1472", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" + }, + { + "$id": "1474", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" + }, + { + "$id": "1476", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1477", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" } ] }, { - "$ref": "1533" - }, - { - "$ref": "1537" + "$ref": "1434" }, { - "$ref": "1540" + "$ref": "1449" }, { - "$ref": "1546" + "$ref": "1455" }, { - "$ref": "1553" + "$ref": "1456" }, { - "$ref": "1579" + "$ref": "1460" }, { - "$ref": "1594" + "$ref": "1464" }, { - "$id": "1625", + "$id": "1478", "kind": "model", - "name": "CreateRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", + "name": "CreateVectorStoreFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", "usage": "Input,Json", "decorators": [], "properties": [ { - "$id": "1626", + "$id": "1479", "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "name": "file_id", + "serializedName": "file_id", + "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { - "$id": "1627", + "$id": "1480", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15107,461 +13581,246 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" }, { - "$id": "1628", + "$id": "1481", "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", "type": { - "$id": "1629", - "kind": "nullable", - "type": { - "$ref": "271" - } + "$id": "1482", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] }, "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" - }, + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" + } + ] + }, + { + "$id": "1483", + "kind": "model", + "name": "DeleteVectorStoreFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ { - "$id": "1630", + "$id": "1484", "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", + "name": "id", + "serializedName": "id", "type": { - "$id": "1631", - "kind": "nullable", - "type": { - "$id": "1632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } + "$id": "1485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" }, { - "$id": "1633", + "$id": "1486", "kind": "property", - "name": "additional_instructions", - "serializedName": "additional_instructions", - "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "name": "deleted", + "serializedName": "deleted", "type": { - "$id": "1634", - "kind": "nullable", - "type": { - "$id": "1635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } + "$id": "1487", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" }, { - "$id": "1636", + "$id": "1488", "kind": "property", - "name": "additional_messages", - "serializedName": "additional_messages", - "description": "Adds additional messages to the thread before creating the run.", + "name": "object", + "serializedName": "object", "type": { - "$id": "1637", - "kind": "nullable", - "type": { - "$id": "1638", - "kind": "array", - "name": "CreateRunRequestAdditional_messages", - "valueType": { - "$ref": "1337" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", - "decorators": [] - } + "$id": "1489", + "kind": "constant", + "valueType": { + "$ref": "121" + }, + "value": "vector_store.file.deleted", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" - }, + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" + } + ] + }, + { + "$id": "1490", + "kind": "model", + "name": "CreateVectorStoreFileBatchRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ { - "$id": "1639", + "$id": "1491", "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { - "$id": "1640", - "kind": "nullable", - "type": { - "$id": "1641", - "kind": "array", - "name": "CreateRunRequestTools", - "valueType": { - "$ref": "1352" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", + "$id": "1492", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] - } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" }, { - "$id": "1642", + "$id": "1494", "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", "type": { - "$id": "1643", - "kind": "nullable", - "type": { - "$id": "1644", - "kind": "dict", - "keyType": { - "$id": "1645", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1646", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$id": "1495", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" - }, - { - "$id": "1647", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1648", - "kind": "nullable", - "type": { - "$id": "1649", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" - }, - { - "$id": "1650", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1651", - "kind": "nullable", - "type": { - "$id": "1652", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" - }, - { - "$id": "1653", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1654", - "kind": "nullable", - "type": { - "$id": "1655", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" - }, - { - "$id": "1656", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1657", - "kind": "nullable", - "type": { - "$id": "1658", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" - }, - { - "$id": "1659", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1660", - "kind": "nullable", - "type": { - "$id": "1661", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" - }, - { - "$id": "1662", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1663", - "kind": "nullable", - "type": { - "$ref": "1469" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" - }, - { - "$id": "1664", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1665", - "kind": "nullable", - "type": { - "$id": "1666", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1477" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" - }, - { - "$id": "1667", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1668", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + { + "$ref": "1393" + } + ], "decorators": [] }, "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" - }, - { - "$id": "1669", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1670", - "kind": "nullable", - "type": { - "$id": "1671", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1672", - "kind": "constant", - "valueType": { - "$id": "1673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1490" - }, - { - "$ref": "1495" - }, - { - "$ref": "1499" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" } ] }, { - "$id": "1674", + "$id": "1496", "kind": "model", - "name": "ListRunsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", + "name": "VectorStoreFileBatchObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", "usage": "Output,Json", + "description": "A batch of files attached to a vector store.", "decorators": [], "properties": [ { - "$id": "1675", + "$id": "1497", "kind": "property", - "name": "object", - "serializedName": "object", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { - "$id": "1676", - "kind": "constant", - "valueType": { - "$ref": "325" - }, - "value": "list", + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" }, { - "$id": "1677", + "$id": "1499", "kind": "property", - "name": "data", - "serializedName": "data", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file_batch`.", "type": { - "$id": "1678", - "kind": "array", - "name": "ArrayRunObject", + "$id": "1500", + "kind": "constant", "valueType": { - "$ref": "1518" + "$ref": "124" }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "value": "vector_store.files_batch", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" }, { - "$id": "1679", + "$id": "1501", "kind": "property", - "name": "first_id", - "serializedName": "first_id", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", "type": { - "$id": "1680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "1502", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1503", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" }, { - "$id": "1681", + "$id": "1504", "kind": "property", - "name": "last_id", - "serializedName": "last_id", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", "type": { - "$id": "1682", + "$id": "1505", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15571,475 +13830,276 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" }, { - "$id": "1683", + "$id": "1506", "kind": "property", - "name": "has_more", - "serializedName": "has_more", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", "type": { - "$id": "1684", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] + "$ref": "127" }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" - } - ] - }, - { - "$id": "1685", - "kind": "model", - "name": "ModifyRunRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" + }, { - "$id": "1686", + "$id": "1507", "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "name": "file_counts", + "serializedName": "file_counts", "type": { - "$id": "1687", - "kind": "nullable", - "type": { - "$id": "1688", - "kind": "dict", - "keyType": { - "$id": "1689", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$id": "1508", + "kind": "model", + "name": "VectorStoreFileBatchObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1509", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1510", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" }, - "valueType": { - "$id": "1690", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + { + "$id": "1511", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been processed.", + "type": { + "$id": "1512", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" }, - "decorators": [] - } + { + "$id": "1513", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1514", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" + }, + { + "$id": "1515", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that where cancelled.", + "type": { + "$id": "1516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1517", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" + } + ] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" } ] }, { - "$id": "1691", + "$ref": "1508" + }, + { + "$id": "1519", "kind": "model", - "name": "SubmitToolOutputsRunRequest", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", + "name": "CreateThreadAndRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", "usage": "Input,Json", "decorators": [], "properties": [ { - "$id": "1692", + "$id": "1520", "kind": "property", - "name": "tool_outputs", - "serializedName": "tool_outputs", - "description": "A list of tools for which the outputs are being submitted.", - "type": { - "$id": "1693", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1694", - "kind": "model", - "name": "SubmitToolOutputsRunRequestToolOutput", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1695", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", - "type": { - "$id": "1696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" - }, - { - "$id": "1697", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the tool call to be submitted to continue the run.", - "type": { - "$id": "1698", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" - }, - { - "$id": "1699", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1700", - "kind": "nullable", - "type": { - "$id": "1701", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" - } - ] - }, - { - "$ref": "1694" - }, - { - "$id": "1702", - "kind": "model", - "name": "ListRunStepsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1703", - "kind": "property", - "name": "object", - "serializedName": "object", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", "type": { - "$id": "1704", - "kind": "constant", - "valueType": { - "$ref": "334" - }, - "value": "list", + "$id": "1521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" }, { - "$id": "1705", + "$id": "1522", "kind": "property", - "name": "data", - "serializedName": "data", + "name": "thread", + "serializedName": "thread", + "description": "If no thread is provided, an empty thread will be created.", "type": { - "$id": "1706", - "kind": "array", - "name": "ArrayRunStepObject", - "valueType": { - "$id": "1707", - "kind": "model", - "name": "RunStepObject", - "crossLanguageDefinitionId": "OpenAI.RunStepObject", - "usage": "Output,Json", - "description": "Represents a step in execution of a run.", - "decorators": [], - "properties": [ - { - "$id": "1708", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "1709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" - }, - { - "$id": "1710", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step`.", - "type": { - "$id": "1711", - "kind": "constant", - "valueType": { - "$ref": "337" - }, - "value": "thread.run.step", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" - }, - { - "$id": "1712", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run step was created.", - "type": { - "$id": "1713", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1714", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" - }, - { - "$id": "1715", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", - "type": { - "$id": "1716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" - }, - { - "$id": "1717", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "type": { - "$id": "1718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" - }, - { - "$id": "1719", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", - "type": { - "$id": "1720", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" - }, - { - "$id": "1721", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", - "type": { - "$ref": "340" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" - }, - { - "$id": "1722", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", - "type": { - "$ref": "346" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" - }, - { - "$id": "1723", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$id": "1724", + "$id": "1523", + "kind": "model", + "name": "CreateThreadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1524", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "type": { + "$id": "1525", + "kind": "array", + "name": "ArrayCreateMessageRequest", + "valueType": { + "$id": "1526", "kind": "model", - "name": "RunStepObjectStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", - "usage": "Output,Json", - "description": "Abstractly represents a run step details object.", + "name": "CreateMessageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", + "usage": "Input,Json", "decorators": [], - "discriminatorProperty": { - "$id": "1725", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1726", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" - }, "properties": [ { - "$ref": "1725" - } - ], - "discriminatedSubtypes": { - "$id": "1727", - "message_creation": { - "$id": "1728", - "kind": "model", - "name": "RunStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", - "usage": "Output,Json", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "1724" + "$id": "1527", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", + "type": { + "$ref": "143" }, - "properties": [ - { - "$id": "1729", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "1730", - "kind": "constant", - "valueType": { - "$id": "1731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" + }, + { + "$id": "1528", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "1529", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$id": "1530", + "kind": "model", + "name": "MessageContent", + "crossLanguageDefinitionId": "OpenAI.MessageContent", + "access": "public", + "usage": "Input,Output,Json", + "description": "Represents a single piece of content in an Assistants API message.", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" + "properties": [] }, - { - "$id": "1732", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "1733", + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" + }, + { + "$id": "1531", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they should be added to.", + "type": { + "$id": "1532", + "kind": "nullable", + "type": { + "$id": "1533", + "kind": "array", + "name": "CreateMessageRequestAttachments", + "valueType": { + "$id": "1534", "kind": "model", - "name": "RunStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output,Json", + "name": "CreateMessageRequestAttachment", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", + "usage": "Input,Json", "decorators": [], "properties": [ { - "$id": "1734", + "$id": "1535", "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", "type": { - "$id": "1735", + "$id": "1536", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16049,179 +14109,45 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "1736", - "kind": "model", - "name": "RunStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", - "usage": "Output,Json", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "1724" - }, - "properties": [ - { - "$id": "1737", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "1738", - "kind": "constant", - "valueType": { - "$id": "1739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" - }, - { - "$id": "1740", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "1741", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "1742", - "kind": "model", - "name": "RunStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1743", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" + }, + { + "$id": "1537", "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", "type": { - "$id": "1744", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "1743" - } - ], - "discriminatedSubtypes": { - "$id": "1745", - "code_interpreter": { - "$id": "1746", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", - "usage": "Output,Json", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "1742" - }, - "properties": [ - { - "$id": "1747", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "1748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "1749", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "1750", - "kind": "constant", - "valueType": { - "$id": "1751", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "1752", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "1753", + "$id": "1538", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1539", + "kind": "union", + "name": "CreateMessageRequestAttachmentTool", + "variantTypes": [ + { + "$id": "1540", "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output,Json", + "name": "AssistantToolsCode", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", + "usage": "Input,Output,Json", + "discriminatorValue": "code_interpreter", "decorators": [], - "properties": [ - { - "$id": "1754", + "baseModel": { + "$id": "1541", + "kind": "model", + "name": "AssistantToolDefinition", + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1542", "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", + "name": "type", + "serializedName": "type", "type": { - "$id": "1755", + "$id": "1543", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16229,1553 +14155,11425 @@ }, "optional": false, "readOnly": false, - "discriminator": false, + "discriminator": true, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" }, - { - "$id": "1756", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "1757", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "1758", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "1759", + "properties": [ + { + "$ref": "1542" + } + ], + "discriminatedSubtypes": { + "$id": "1544", + "code_interpreter": { + "$ref": "1540" + }, + "file_search": { + "$id": "1545", + "kind": "model", + "name": "AssistantToolsFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", + "usage": "Input,Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1541" + }, + "properties": [ + { + "$id": "1546", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", + "description": "The type of tool being defined: `file_search`", "type": { - "$id": "1760", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "1547", + "kind": "constant", + "valueType": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": true, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" }, - "properties": [ - { - "$ref": "1759" - } - ], - "discriminatedSubtypes": { - "$id": "1761", - "logs": { - "$id": "1762", + { + "$id": "1549", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "Overrides for the file search tool.", + "type": { + "$id": "1550", "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", - "usage": "Output,Json", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", + "name": "AssistantToolsFileSearchFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", + "usage": "Input,Output,Json", "decorators": [], - "baseModel": { - "$ref": "1758" - }, "properties": [ { - "$id": "1763", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "1764", - "kind": "constant", - "valueType": { - "$id": "1765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "1766", + "$id": "1551", "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", + "name": "max_num_results", + "serializedName": "max_num_results", + "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "type": { - "$id": "1767", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "1552", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "1768", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", - "usage": "Output,Json", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "1758" - }, - "properties": [ - { - "$id": "1769", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "1770", - "kind": "constant", - "valueType": { - "$id": "1771", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" }, { - "$id": "1772", + "$id": "1553", "kind": "property", - "name": "image", - "serializedName": "image", + "name": "ranking_options", + "serializedName": "ranking_options", "type": { - "$id": "1773", + "$id": "1554", "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output,Json", + "name": "FileSearchRankingOptions", + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", + "usage": "Input,Output,Json", + "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "decorators": [], "properties": [ { - "$id": "1774", + "$id": "1555", "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", "type": { - "$id": "1775", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$ref": "149" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" + }, + { + "$id": "1556", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1557", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" } ] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" } ] - } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] + ] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "1776", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", - "usage": "Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1742" - }, - "properties": [ - { - "$id": "1777", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1778", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "1779", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "1780", - "kind": "constant", - "valueType": { - "$id": "1781", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "1782", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "1783", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1784", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1785", + "function": { + "$id": "1558", "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "usage": "Output,Json", - "description": "The ranking options for the file search.", + "name": "AssistantToolsFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", + "usage": "Input,Output,Json", + "discriminatorValue": "function", "decorators": [], + "baseModel": { + "$ref": "1541" + }, "properties": [ { - "$id": "1786", + "$id": "1559", "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker used for the file search.", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `function`", "type": { - "$id": "1787", + "$id": "1560", "kind": "constant", "valueType": { - "$ref": "358" + "$id": "1561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "value": "default_2024_08_21", + "value": "function", "decorators": [] }, "optional": false, "readOnly": false, - "discriminator": false, + "discriminator": true, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" }, { - "$id": "1788", + "$id": "1562", "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "name": "function", + "serializedName": "function", "type": { - "$id": "1789", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] + "$id": "1563", + "kind": "model", + "name": "FunctionObject", + "crossLanguageDefinitionId": "OpenAI.FunctionObject", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1564", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" + }, + { + "$id": "1566", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" + }, + { + "$id": "1568", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "1569", + "kind": "model", + "name": "FunctionParameters", + "crossLanguageDefinitionId": "OpenAI.FunctionParameters", + "usage": "Input,Output,Json", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", + "decorators": [], + "additionalProperties": { + "$id": "1570", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" + }, + { + "$id": "1571", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", + "type": { + "$id": "1572", + "kind": "nullable", + "type": { + "$id": "1573", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" + } + ] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" } ] + } + } + }, + "properties": [ + { + "$id": "1574", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `code_interpreter`", + "type": { + "$id": "1575", + "kind": "constant", + "valueType": { + "$id": "1576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, - "discriminator": false, + "discriminator": true, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" - }, + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" + } + ] + }, + { + "$id": "1577", + "kind": "model", + "name": "AssistantToolsFileSearchTypeOnly", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ { - "$id": "1790", + "$id": "1578", "kind": "property", - "name": "results", - "serializedName": "results", - "description": "The results of the file search.", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", "type": { - "$id": "1791", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", + "$id": "1579", + "kind": "constant", "valueType": { - "$id": "1792", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", - "usage": "Output,Json", - "description": "A result instance of the file search.", - "decorators": [], - "properties": [ - { - "$id": "1793", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that result was found in.", - "type": { - "$id": "1794", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" - }, - { - "$id": "1795", - "kind": "property", - "name": "file_name", - "serializedName": "file_name", - "description": "The name of the file that result was found in.", - "type": { - "$id": "1796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" - }, - { - "$id": "1797", - "kind": "property", - "name": "score", - "serializedName": "score", - "description": "The score of the result. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1798", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" - }, - { - "$id": "1799", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", - "type": { - "$id": "1800", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1801", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1802", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content.", - "type": { - "$id": "1803", - "kind": "constant", - "valueType": { - "$ref": "361" - }, - "value": "text", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" - }, - { - "$id": "1804", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content of the file.", - "type": { - "$id": "1805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" - } - ] + "$ref": "155" }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "value": "file_search", "decorators": [] }, - "optional": true, + "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" } ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" + }, + { + "$id": "1580", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1581", + "kind": "nullable", + "type": { + "$id": "1582", + "kind": "dict", + "keyType": { + "$id": "1583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" + }, + { + "$id": "1585", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1586", + "kind": "nullable", + "type": { + "$id": "1587", + "kind": "model", + "name": "CreateThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1588", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1589", + "kind": "model", + "name": "CreateThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1590", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1591", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1593", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1594", + "kind": "model", + "name": "ToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1595", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1596", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" + }, + { + "$id": "1598", + "kind": "property", + "name": "vector_stores", + "serializedName": "vector_stores", + "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", + "type": { + "$id": "1599", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1600", + "kind": "model", + "name": "ToolResourcesFileSearchVectorStore", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1601", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", + "type": { + "$id": "1602", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" - } - ] + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" + }, + { + "$id": "1604", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1605", + "kind": "union", + "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" + }, + { + "$id": "1606", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1607", + "kind": "dict", + "keyType": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" + }, + { + "$id": "1610", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1611", + "kind": "nullable", + "type": { + "$id": "1612", + "kind": "dict", + "keyType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" + }, + { + "$id": "1615", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1616", + "kind": "nullable", + "type": { + "$ref": "158" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" + }, + { + "$id": "1617", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1618", + "kind": "nullable", + "type": { + "$id": "1619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" + }, + { + "$id": "1620", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1621", + "kind": "nullable", + "type": { + "$id": "1622", + "kind": "array", + "name": "CreateThreadAndRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" + }, + { + "$id": "1623", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1624", + "kind": "nullable", + "type": { + "$id": "1625", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1626", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1627", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1628", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1629", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1631", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1632", + "kind": "model", + "name": "ToolResourcesFileSearchIdsOnly", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1633", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1634", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" + }, + { + "$id": "1636", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1637", + "kind": "nullable", + "type": { + "$id": "1638", + "kind": "dict", + "keyType": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" + }, + { + "$id": "1641", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1642", + "kind": "nullable", + "type": { + "$id": "1643", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" + }, + { + "$id": "1644", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1645", + "kind": "nullable", + "type": { + "$id": "1646", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" + }, + { + "$id": "1647", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1648", + "kind": "nullable", + "type": { + "$id": "1649", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" + }, + { + "$id": "1650", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1651", + "kind": "nullable", + "type": { + "$id": "1652", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" + }, + { + "$id": "1653", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1654", + "kind": "nullable", + "type": { + "$id": "1655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" + }, + { + "$id": "1656", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1657", + "kind": "nullable", + "type": { + "$id": "1658", + "kind": "model", + "name": "TruncationObject", + "crossLanguageDefinitionId": "OpenAI.TruncationObject", + "usage": "Input,Output,Json", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", + "decorators": [], + "properties": [ + { + "$id": "1659", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "type": { + "$ref": "206" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" + }, + { + "$id": "1660", + "kind": "property", + "name": "last_messages", + "serializedName": "last_messages", + "description": "The number of most recent messages from the thread when constructing the context for the run.", + "type": { + "$id": "1661", + "kind": "nullable", + "type": { + "$id": "1662", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" + }, + { + "$id": "1663", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1664", + "kind": "nullable", + "type": { + "$id": "1665", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$id": "1666", + "kind": "model", + "name": "AssistantsNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", + "usage": "Input,Output,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", + "decorators": [], + "properties": [ + { + "$id": "1667", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. If type is `function`, the function name must be set", + "type": { + "$ref": "220" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" + }, + { + "$id": "1668", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1669", + "kind": "model", + "name": "AssistantsNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1670", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "1671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" + }, + { + "$id": "1672", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1673", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" + }, + { + "$id": "1674", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1675", + "kind": "nullable", + "type": { + "$id": "1676", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1677", + "kind": "constant", + "valueType": { + "$id": "1678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "1679", + "kind": "model", + "name": "ResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", + "usage": "Input,Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$id": "1680", + "kind": "model", + "name": "OmniTypedResponseFormat", + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1681", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" + }, + "properties": [ + { + "$ref": "1681" + } + ], + "discriminatedSubtypes": { + "$id": "1683", + "text": { + "$ref": "1679" + }, + "json_object": { + "$id": "1684", + "kind": "model", + "name": "ResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", + "usage": "Input,Output,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1685", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "1686", + "kind": "constant", + "valueType": { + "$id": "1687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "1688", + "kind": "model", + "name": "ResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", + "usage": "Input,Output,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1689", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "1690", + "kind": "constant", + "valueType": { + "$id": "1691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" + }, + { + "$id": "1692", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$id": "1693", + "kind": "model", + "name": "ResponseFormatJsonSchemaJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1694", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", + "type": { + "$id": "1695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" + }, + { + "$id": "1696", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" + }, + { + "$id": "1698", + "kind": "property", + "name": "schema", + "serializedName": "schema", + "type": { + "$id": "1699", + "kind": "model", + "name": "ResponseFormatJsonSchemaSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", + "usage": "Input,Output,Json", + "description": "The schema for the response format, described as a JSON Schema object.", + "decorators": [], + "additionalProperties": { + "$id": "1700", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" + }, + { + "$id": "1701", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", + "type": { + "$id": "1702", + "kind": "nullable", + "type": { + "$id": "1703", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "properties": [ + { + "$id": "1704", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "1705", + "kind": "constant", + "valueType": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" + } + ] + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" + } + ] + }, + { + "$ref": "1523" + }, + { + "$ref": "1526" + }, + { + "$ref": "1530" + }, + { + "$ref": "1534" + }, + { + "$ref": "1540" + }, + { + "$ref": "1541" + }, + { + "$ref": "1545" + }, + { + "$ref": "1550" + }, + { + "$ref": "1554" + }, + { + "$ref": "1558" + }, + { + "$ref": "1563" + }, + { + "$ref": "1569" + }, + { + "$ref": "1577" + }, + { + "$ref": "1587" + }, + { + "$ref": "1589" + }, + { + "$ref": "1594" + }, + { + "$ref": "1600" + }, + { + "$ref": "1625" + }, + { + "$ref": "1627" + }, + { + "$ref": "1632" + }, + { + "$ref": "1658" + }, + { + "$ref": "1666" + }, + { + "$ref": "1669" + }, + { + "$ref": "1679" + }, + { + "$ref": "1680" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + }, + { + "$ref": "1693" + }, + { + "$ref": "1699" + }, + { + "$id": "1707", + "kind": "model", + "name": "RunObject", + "crossLanguageDefinitionId": "OpenAI.RunObject", + "usage": "Output,Json", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "1708", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.id" + }, + { + "$id": "1710", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run`.", + "type": { + "$id": "1711", + "kind": "constant", + "valueType": { + "$ref": "228" + }, + "value": "thread.run", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.object" + }, + { + "$id": "1712", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": { + "$id": "1713", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1714", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" + }, + { + "$id": "1715", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": { + "$id": "1716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" + }, + { + "$id": "1717", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "type": { + "$id": "1718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" + }, + { + "$id": "1719", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", + "type": { + "$ref": "231" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.status" + }, + { + "$id": "1720", + "kind": "property", + "name": "required_action", + "serializedName": "required_action", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "type": { + "$id": "1721", + "kind": "nullable", + "type": { + "$id": "1722", + "kind": "model", + "name": "RunObjectRequiredAction", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1723", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "For now, this is always `submit_tool_outputs`.", + "type": { + "$id": "1724", + "kind": "constant", + "valueType": { + "$ref": "251" + }, + "value": "submit_tool_outputs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" + }, + { + "$id": "1725", + "kind": "property", + "name": "submit_tool_outputs", + "serializedName": "submit_tool_outputs", + "description": "Details on the tool outputs needed for this run to continue.", + "type": { + "$id": "1726", + "kind": "model", + "name": "RunObjectRequiredActionSubmitToolOutputs", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1727", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "A list of the relevant tool calls.", + "type": { + "$id": "1728", + "kind": "array", + "name": "ArrayRunToolCallObject", + "valueType": { + "$id": "1729", + "kind": "model", + "name": "RunToolCallObject", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", + "usage": "Output,Json", + "description": "Tool call objects", + "decorators": [], + "properties": [ + { + "$id": "1730", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", + "type": { + "$id": "1731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" + }, + { + "$id": "1732", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "type": { + "$id": "1733", + "kind": "constant", + "valueType": { + "$ref": "254" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" + }, + { + "$id": "1734", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function definition.", + "type": { + "$id": "1735", + "kind": "model", + "name": "RunToolCallObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1736", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "1737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" + }, + { + "$id": "1738", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments that the model expects you to pass to the function.", + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" + }, + { + "$id": "1740", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "type": { + "$id": "1741", + "kind": "nullable", + "type": { + "$id": "1742", + "kind": "model", + "name": "RunObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1743", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", + "type": { + "$ref": "257" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" + }, + { + "$id": "1744", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" + }, + { + "$id": "1746", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": { + "$id": "1747", + "kind": "nullable", + "type": { + "$id": "1748", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1749", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" + }, + { + "$id": "1750", + "kind": "property", + "name": "started_at", + "serializedName": "started_at", + "description": "The Unix timestamp (in seconds) for when the run was started.", + "type": { + "$id": "1751", + "kind": "nullable", + "type": { + "$id": "1752", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1753", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" + }, + { + "$id": "1754", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "type": { + "$id": "1755", + "kind": "nullable", + "type": { + "$id": "1756", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1757", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" + }, + { + "$id": "1758", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run failed.", + "type": { + "$id": "1759", + "kind": "nullable", + "type": { + "$id": "1760", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1761", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" + }, + { + "$id": "1762", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "type": { + "$id": "1763", + "kind": "nullable", + "type": { + "$id": "1764", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1765", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" + }, + { + "$id": "1766", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", + "type": { + "$id": "1767", + "kind": "nullable", + "type": { + "$id": "1768", + "kind": "model", + "name": "RunObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1769", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", + "type": { + "$ref": "265" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" + }, + { + "$id": "1770", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.model" + }, + { + "$id": "1772", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" + }, + { + "$id": "1774", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1775", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tools" + }, + { + "$id": "1776", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1777", + "kind": "nullable", + "type": { + "$id": "1778", + "kind": "dict", + "keyType": { + "$id": "1779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" + }, + { + "$id": "1781", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "1782", + "kind": "nullable", + "type": { + "$id": "1783", + "kind": "model", + "name": "RunCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", + "decorators": [], + "properties": [ + { + "$id": "1784", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run.", + "type": { + "$id": "1785", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" + }, + { + "$id": "1786", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run.", + "type": { + "$id": "1787", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" + }, + { + "$id": "1788", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "1789", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.usage" + }, + { + "$id": "1790", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "type": { + "$id": "1791", + "kind": "nullable", + "type": { + "$id": "1792", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" + }, + { + "$id": "1793", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "type": { + "$id": "1794", + "kind": "nullable", + "type": { + "$id": "1795", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" + }, + { + "$id": "1796", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", + "type": { + "$id": "1797", + "kind": "nullable", + "type": { + "$id": "1798", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" + }, + { + "$id": "1799", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens specified to have been used over the course of the run.", + "type": { + "$id": "1800", + "kind": "nullable", + "type": { + "$id": "1801", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" + }, + { + "$id": "1802", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1803", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" + }, + { + "$id": "1804", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1805", + "kind": "nullable", + "type": { + "$id": "1806", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" + }, + { + "$id": "1807", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1808", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" + }, + { + "$id": "1809", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1810", + "kind": "nullable", + "type": { + "$id": "1811", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1812", + "kind": "constant", + "valueType": { + "$id": "1813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" + } + ] + }, + { + "$ref": "1722" + }, + { + "$ref": "1726" + }, + { + "$ref": "1729" + }, + { + "$ref": "1735" + }, + { + "$ref": "1742" + }, + { + "$ref": "1768" + }, + { + "$ref": "1783" + }, + { + "$id": "1814", + "kind": "model", + "name": "CreateRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1815", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" + }, + { + "$id": "1817", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1818", + "kind": "nullable", + "type": { + "$ref": "271" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" + }, + { + "$id": "1819", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1820", + "kind": "nullable", + "type": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" + }, + { + "$id": "1822", + "kind": "property", + "name": "additional_instructions", + "serializedName": "additional_instructions", + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "type": { + "$id": "1823", + "kind": "nullable", + "type": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" + }, + { + "$id": "1825", + "kind": "property", + "name": "additional_messages", + "serializedName": "additional_messages", + "description": "Adds additional messages to the thread before creating the run.", + "type": { + "$id": "1826", + "kind": "nullable", + "type": { + "$id": "1827", + "kind": "array", + "name": "CreateRunRequestAdditional_messages", + "valueType": { + "$ref": "1526" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" + }, + { + "$id": "1828", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1829", + "kind": "nullable", + "type": { + "$id": "1830", + "kind": "array", + "name": "CreateRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" + }, + { + "$id": "1831", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1832", + "kind": "nullable", + "type": { + "$id": "1833", + "kind": "dict", + "keyType": { + "$id": "1834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" + }, + { + "$id": "1836", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1837", + "kind": "nullable", + "type": { + "$id": "1838", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" + }, + { + "$id": "1839", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1840", + "kind": "nullable", + "type": { + "$id": "1841", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" + }, + { + "$id": "1842", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1843", + "kind": "nullable", + "type": { + "$id": "1844", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" + }, + { + "$id": "1845", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1846", + "kind": "nullable", + "type": { + "$id": "1847", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" + }, + { + "$id": "1848", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1849", + "kind": "nullable", + "type": { + "$id": "1850", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" + }, + { + "$id": "1851", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1852", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" + }, + { + "$id": "1853", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1854", + "kind": "nullable", + "type": { + "$id": "1855", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" + }, + { + "$id": "1856", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1857", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" + }, + { + "$id": "1858", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1859", + "kind": "nullable", + "type": { + "$id": "1860", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1861", + "kind": "constant", + "valueType": { + "$id": "1862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" + } + ] + }, + { + "$id": "1863", + "kind": "model", + "name": "ListRunsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1864", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1865", + "kind": "constant", + "valueType": { + "$ref": "325" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" + }, + { + "$id": "1866", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1867", + "kind": "array", + "name": "ArrayRunObject", + "valueType": { + "$ref": "1707" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" + }, + { + "$id": "1868", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" + }, + { + "$id": "1870", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" + }, + { + "$id": "1872", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1873", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" + } + ] + }, + { + "$id": "1874", + "kind": "model", + "name": "ModifyRunRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1875", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1876", + "kind": "nullable", + "type": { + "$id": "1877", + "kind": "dict", + "keyType": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" + } + ] + }, + { + "$id": "1880", + "kind": "model", + "name": "SubmitToolOutputsRunRequest", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1881", + "kind": "property", + "name": "tool_outputs", + "serializedName": "tool_outputs", + "description": "A list of tools for which the outputs are being submitted.", + "type": { + "$id": "1882", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1883", + "kind": "model", + "name": "SubmitToolOutputsRunRequestToolOutput", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1884", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", + "type": { + "$id": "1885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" + }, + { + "$id": "1886", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the tool call to be submitted to continue the run.", + "type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" + }, + { + "$id": "1888", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1889", + "kind": "nullable", + "type": { + "$id": "1890", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" + } + ] + }, + { + "$ref": "1883" + }, + { + "$id": "1891", + "kind": "model", + "name": "ListRunStepsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1892", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1893", + "kind": "constant", + "valueType": { + "$ref": "334" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" + }, + { + "$id": "1894", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1895", + "kind": "array", + "name": "ArrayRunStepObject", + "valueType": { + "$id": "1896", + "kind": "model", + "name": "RunStepObject", + "crossLanguageDefinitionId": "OpenAI.RunStepObject", + "usage": "Output,Json", + "description": "Represents a step in execution of a run.", + "decorators": [], + "properties": [ + { + "$id": "1897", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" + }, + { + "$id": "1899", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step`.", + "type": { + "$id": "1900", + "kind": "constant", + "valueType": { + "$ref": "337" + }, + "value": "thread.run.step", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" + }, + { + "$id": "1901", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": { + "$id": "1902", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1903", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" + }, + { + "$id": "1904", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": { + "$id": "1905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" + }, + { + "$id": "1906", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": { + "$id": "1907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" + }, + { + "$id": "1908", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", + "type": { + "$id": "1909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" + }, + { + "$id": "1910", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", + "type": { + "$ref": "340" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" + }, + { + "$id": "1911", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": { + "$ref": "346" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" + }, + { + "$id": "1912", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$id": "1913", + "kind": "model", + "name": "RunStepObjectStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", + "usage": "Output,Json", + "description": "Abstractly represents a run step details object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1914", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" + }, + "properties": [ + { + "$ref": "1914" + } + ], + "discriminatedSubtypes": { + "$id": "1916", + "message_creation": { + "$id": "1917", + "kind": "model", + "name": "RunStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", + "usage": "Output,Json", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1918", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "1919", + "kind": "constant", + "valueType": { + "$id": "1920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" + }, + { + "$id": "1921", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "1922", + "kind": "model", + "name": "RunStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1923", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "1924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "1925", + "kind": "model", + "name": "RunStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", + "usage": "Output,Json", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1926", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "1927", + "kind": "constant", + "valueType": { + "$id": "1928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" + }, + { + "$id": "1929", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "1930", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "1931", + "kind": "model", + "name": "RunStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1932", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "1932" + } + ], + "discriminatedSubtypes": { + "$id": "1934", + "code_interpreter": { + "$id": "1935", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", + "usage": "Output,Json", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1936", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "1937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "1938", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "1939", + "kind": "constant", + "valueType": { + "$id": "1940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "1941", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "1942", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1943", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "1944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "1945", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "1946", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "1947", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "1948", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "1948" + } + ], + "discriminatedSubtypes": { + "$id": "1950", + "logs": { + "$id": "1951", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", + "usage": "Output,Json", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1952", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "1953", + "kind": "constant", + "valueType": { + "$id": "1954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "1955", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "1956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "1957", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", + "usage": "Output,Json", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1958", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "1959", + "kind": "constant", + "valueType": { + "$id": "1960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "1961", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "1962", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1963", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "1964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "1965", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", + "usage": "Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1966", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "1968", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "1969", + "kind": "constant", + "valueType": { + "$id": "1970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "1971", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "1972", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1973", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1974", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "usage": "Output,Json", + "description": "The ranking options for the file search.", + "decorators": [], + "properties": [ + { + "$id": "1975", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker used for the file search.", + "type": { + "$id": "1976", + "kind": "constant", + "valueType": { + "$ref": "358" + }, + "value": "default_2024_08_21", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" + }, + { + "$id": "1977", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1978", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" + }, + { + "$id": "1979", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "The results of the file search.", + "type": { + "$id": "1980", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", + "valueType": { + "$id": "1981", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", + "usage": "Output,Json", + "description": "A result instance of the file search.", + "decorators": [], + "properties": [ + { + "$id": "1982", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that result was found in.", + "type": { + "$id": "1983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" + }, + { + "$id": "1984", + "kind": "property", + "name": "file_name", + "serializedName": "file_name", + "description": "The name of the file that result was found in.", + "type": { + "$id": "1985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" + }, + { + "$id": "1986", + "kind": "property", + "name": "score", + "serializedName": "score", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1987", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" + }, + { + "$id": "1988", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", + "type": { + "$id": "1989", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1990", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1991", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content.", + "type": { + "$id": "1992", + "kind": "constant", + "valueType": { + "$ref": "361" + }, + "value": "text", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" + }, + { + "$id": "1993", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content of the file.", + "type": { + "$id": "1994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "1995", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", + "usage": "Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1996", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "1998", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "1999", + "kind": "constant", + "valueType": { + "$id": "2000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "2001", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "2002", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2003", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "2004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "2005", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "2006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "2007", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "2008", + "kind": "nullable", + "type": { + "$id": "2009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" + }, + { + "$id": "2010", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "type": { + "$id": "2011", + "kind": "nullable", + "type": { + "$id": "2012", + "kind": "model", + "name": "RunStepObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2013", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "364" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" + }, + { + "$id": "2014", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "2015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" + }, + { + "$id": "2016", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "type": { + "$id": "2017", + "kind": "nullable", + "type": { + "$id": "2018", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2019", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" + }, + { + "$id": "2020", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "type": { + "$id": "2021", + "kind": "nullable", + "type": { + "$id": "2022", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2023", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" + }, + { + "$id": "2024", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "type": { + "$id": "2025", + "kind": "nullable", + "type": { + "$id": "2026", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2027", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" + }, + { + "$id": "2028", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "type": { + "$id": "2029", + "kind": "nullable", + "type": { + "$id": "2030", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2031", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" + }, + { + "$id": "2032", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2033", + "kind": "nullable", + "type": { + "$id": "2034", + "kind": "dict", + "keyType": { + "$id": "2035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" + }, + { + "$id": "2037", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2038", + "kind": "nullable", + "type": { + "$id": "2039", + "kind": "model", + "name": "RunStepCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", + "decorators": [], + "properties": [ + { + "$id": "2040", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run step.", + "type": { + "$id": "2041", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" + }, + { + "$id": "2042", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run step.", + "type": { + "$id": "2043", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" + }, + { + "$id": "2044", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "2045", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" + }, + { + "$id": "2046", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" + }, + { + "$id": "2048", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" + }, + { + "$id": "2050", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2051", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" + } + ] + }, + { + "$ref": "1896" + }, + { + "$ref": "1913" + }, + { + "$ref": "1917" + }, + { + "$ref": "1922" + }, + { + "$ref": "1925" + }, + { + "$ref": "1931" + }, + { + "$ref": "1935" + }, + { + "$ref": "1942" + }, + { + "$ref": "1947" + }, + { + "$ref": "1951" + }, + { + "$ref": "1957" + }, + { + "$ref": "1962" + }, + { + "$ref": "1965" + }, + { + "$ref": "1972" + }, + { + "$ref": "1974" + }, + { + "$ref": "1981" + }, + { + "$ref": "1990" + }, + { + "$ref": "1995" + }, + { + "$ref": "2002" + }, + { + "$ref": "2012" + }, + { + "$ref": "2039" + }, + { + "$id": "2052", + "kind": "model", + "name": "ThreadObject", + "crossLanguageDefinitionId": "OpenAI.ThreadObject", + "usage": "Output,Json", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "decorators": [], + "properties": [ + { + "$id": "2053", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" + }, + { + "$id": "2055", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread`.", + "type": { + "$id": "2056", + "kind": "constant", + "valueType": { + "$ref": "370" + }, + "value": "thread", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" + }, + { + "$id": "2057", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": { + "$id": "2058", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2059", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" + }, + { + "$id": "2060", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2061", + "kind": "nullable", + "type": { + "$id": "2062", + "kind": "model", + "name": "ThreadObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2063", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2064", + "kind": "model", + "name": "ThreadObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2065", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2066", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2067", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2068", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "2069", + "kind": "model", + "name": "ThreadObjectToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2070", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", + "type": { + "$id": "2071", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" + }, + { + "$id": "2073", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2074", + "kind": "nullable", + "type": { + "$id": "2075", + "kind": "dict", + "keyType": { + "$id": "2076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" + } + ] + }, + { + "$ref": "2062" + }, + { + "$ref": "2064" + }, + { + "$ref": "2069" + }, + { + "$id": "2078", + "kind": "model", + "name": "ModifyThreadRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2079", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2080", + "kind": "nullable", + "type": { + "$id": "2081", + "kind": "model", + "name": "ModifyThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2082", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2083", + "kind": "model", + "name": "ModifyThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2084", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2085", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2087", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" + }, + { + "$id": "2088", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2089", + "kind": "nullable", + "type": { + "$id": "2090", + "kind": "dict", + "keyType": { + "$id": "2091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" + } + ] + }, + { + "$ref": "2081" + }, + { + "$ref": "2083" + }, + { + "$id": "2093", + "kind": "model", + "name": "DeleteThreadResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2094", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" + }, + { + "$id": "2096", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2097", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" + }, + { + "$id": "2098", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2099", + "kind": "constant", + "valueType": { + "$ref": "373" + }, + "value": "thread.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" + } + ] + }, + { + "$id": "2100", + "kind": "model", + "name": "RealtimeRequestCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", + "usage": "Input,Json", + "description": "A base representation for messages sent by the client to the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2101", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "376" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" + }, + "properties": [ + { + "$ref": "2101" + }, + { + "$id": "2102", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2104", + "session.update": { + "$id": "2105", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", + "usage": "Input,Json", + "discriminatorValue": "session.update", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2106", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2107", + "kind": "constant", + "valueType": { + "$id": "2108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.update", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" + }, + { + "$id": "2109", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2110", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommandSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2111", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "396" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" + }, + { + "$id": "2112", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2113", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" + }, + { + "$id": "2114", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" + }, + { + "$id": "2115", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" + }, + { + "$id": "2117", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" + }, + { + "$id": "2118", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" + }, + { + "$id": "2119", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2120", + "kind": "model", + "name": "RealtimeAudioInputTranscriptionSettings", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2121", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "422" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" + }, + { + "$id": "2122", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$id": "2123", + "kind": "model", + "name": "RealtimeTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2124", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "426" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" + }, + "properties": [ + { + "$ref": "2124" + } + ], + "discriminatedSubtypes": { + "$id": "2125", + "server_vad": { + "$id": "2126", + "kind": "model", + "name": "RealtimeServerVadTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", + "usage": "Input,Output,Json", + "discriminatorValue": "server_vad", + "decorators": [], + "baseModel": { + "$ref": "2123" + }, + "properties": [ + { + "$id": "2127", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2128", + "kind": "constant", + "valueType": { + "$id": "2129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "server_vad", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" + }, + { + "$id": "2130", + "kind": "property", + "name": "threshold", + "serializedName": "threshold", + "type": { + "$id": "2131", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" + }, + { + "$id": "2132", + "kind": "property", + "name": "prefix_padding_ms", + "serializedName": "prefix_padding_ms", + "type": { + "$id": "2133", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" + }, + { + "$id": "2135", + "kind": "property", + "name": "silence_duration_ms", + "serializedName": "silence_duration_ms", + "type": { + "$id": "2136", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" + }, + { + "$id": "2138", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2139", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$id": "2140", + "kind": "model", + "name": "RealtimeTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeTool", + "usage": "Input,Output,Json", + "description": "The base representation of a realtime tool definition.", + "decorators": [], + "discriminatorProperty": { + "$id": "2141", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" + }, + "properties": [ + { + "$ref": "2141" + } + ], + "discriminatedSubtypes": { + "$id": "2142", + "function": { + "$id": "2143", + "kind": "model", + "name": "RealtimeFunctionTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", + "usage": "Input,Output,Json", + "description": "The definition of a function tool as used by the realtime endpoint.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2140" + }, + "properties": [ + { + "$id": "2144", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2145", + "kind": "constant", + "valueType": { + "$id": "2146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" + }, + { + "$id": "2147", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" + }, + { + "$id": "2149", + "kind": "property", + "name": "description", + "serializedName": "description", + "type": { + "$id": "2150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" + }, + { + "$id": "2151", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "2152", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" + }, + { + "$id": "2153", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2154", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$id": "2155", + "kind": "model", + "name": "RealtimeToolChoiceObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", + "usage": "Input,Output,Json", + "description": "A base representation for a realtime tool_choice selecting a named tool.", + "decorators": [], + "discriminatorProperty": { + "$id": "2156", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" + }, + "properties": [ + { + "$ref": "2156" + } + ], + "discriminatedSubtypes": { + "$id": "2157", + "function": { + "$id": "2158", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", + "usage": "Input,Output,Json", + "description": "The representation of a realtime tool_choice selecting a named function tool.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2155" + }, + "properties": [ + { + "$id": "2159", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2145" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" + }, + { + "$id": "2160", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "2161", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2162", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" + } + ] + } + } + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" + }, + { + "$id": "2164", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2165", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" + }, + { + "$id": "2166", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2167", + "kind": "union", + "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", + "variantTypes": [ + { + "$id": "2168", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2169", + "kind": "constant", + "valueType": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" + } + ] + }, + "input_audio_buffer.append": { + "$id": "2171", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferAppendCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.append", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2172", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2173", + "kind": "constant", + "valueType": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.append", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" + }, + { + "$id": "2175", + "kind": "property", + "name": "audio", + "serializedName": "audio", + "type": { + "$id": "2176", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" + } + ] + }, + "input_audio_buffer.commit": { + "$id": "2177", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferCommitCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.commit", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2178", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2179", + "kind": "constant", + "valueType": { + "$id": "2180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.commit", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" + } + ] + }, + "input_audio_buffer.clear": { + "$id": "2181", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferClearCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.clear", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2182", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2183", + "kind": "constant", + "valueType": { + "$id": "2184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.clear", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" + } + ] + }, + "conversation.item.create": { + "$id": "2185", + "kind": "model", + "name": "RealtimeRequestItemCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2186", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2187", + "kind": "constant", + "valueType": { + "$id": "2188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" + }, + { + "$id": "2189", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" + }, + { + "$id": "2191", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2192", + "kind": "model", + "name": "RealtimeRequestItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2193", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" + }, + "properties": [ + { + "$ref": "2193" + }, + { + "$id": "2194", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2196", + "message": { + "$id": "2197", + "kind": "model", + "name": "RealtimeRequestMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", + "usage": "Input,Json", + "discriminatorValue": "message", + "decorators": [], + "discriminatorProperty": { + "$id": "2198", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" + }, + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2199", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2200", + "kind": "constant", + "valueType": { + "$id": "2201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" + }, + { + "$ref": "2198" + }, + { + "$id": "2202", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" + } + ], + "discriminatedSubtypes": { + "$id": "2203", + "system": { + "$id": "2204", + "kind": "model", + "name": "RealtimeRequestSystemMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2205", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2206", + "kind": "constant", + "valueType": { + "$id": "2207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" + }, + { + "$id": "2208", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2209", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$id": "2210", + "kind": "model", + "name": "RealtimeRequestTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_text", + "decorators": [], + "baseModel": { + "$id": "2211", + "kind": "model", + "name": "RealtimeContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2212", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "466" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" + }, + "properties": [ + { + "$ref": "2212" + } + ], + "discriminatedSubtypes": { + "$id": "2213", + "input_text": { + "$ref": "2210" + }, + "input_audio": { + "$id": "2214", + "kind": "model", + "name": "RealtimeRequestAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2215", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2216", + "kind": "constant", + "valueType": { + "$id": "2217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" + }, + { + "$id": "2218", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" + } + ] + }, + "text": { + "$id": "2220", + "kind": "model", + "name": "RealtimeResponseTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", + "usage": "Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2221", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2222", + "kind": "constant", + "valueType": { + "$id": "2223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" + }, + { + "$id": "2224", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" + } + ] + }, + "audio": { + "$id": "2226", + "kind": "model", + "name": "RealtimeResponseAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", + "usage": "Output,Json", + "discriminatorValue": "audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2227", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2228", + "kind": "constant", + "valueType": { + "$id": "2229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" + }, + { + "$id": "2230", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2231", + "kind": "nullable", + "type": { + "$id": "2232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" + } + ] + } + } + }, + "properties": [ + { + "$id": "2233", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2234", + "kind": "constant", + "valueType": { + "$id": "2235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" + }, + { + "$id": "2236", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" + } + ] + }, + "user": { + "$id": "2238", + "kind": "model", + "name": "RealtimeRequestUserMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2239", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2240", + "kind": "constant", + "valueType": { + "$id": "2241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" + }, + { + "$id": "2242", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2243", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2244", + "kind": "union", + "name": "RealtimeRequestUserMessageItemContent", + "variantTypes": [ + { + "$ref": "2210" + }, + { + "$ref": "2214" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" + } + ] + }, + "assistant": { + "$id": "2245", + "kind": "model", + "name": "RealtimeRequestAssistantMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2246", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2247", + "kind": "constant", + "valueType": { + "$id": "2248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" + }, + { + "$id": "2249", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2250", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$ref": "2210" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" + } + ] + } + } + }, + "function_call": { + "$id": "2251", + "kind": "model", + "name": "RealtimeRequestFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", + "usage": "Input,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2252", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2253", + "kind": "constant", + "valueType": { + "$id": "2254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" + }, + { + "$id": "2255", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" + }, + { + "$id": "2257", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" + }, + { + "$id": "2259", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" + }, + { + "$id": "2261", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2262", + "kind": "model", + "name": "RealtimeRequestFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", + "usage": "Input,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2263", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2264", + "kind": "constant", + "valueType": { + "$id": "2265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call_output", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" + }, + { + "$id": "2266", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" + }, + { + "$id": "2268", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" + } + ] + }, + "conversation.item.delete": { + "$id": "2270", + "kind": "model", + "name": "RealtimeRequestItemDeleteCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.delete", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2271", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2272", + "kind": "constant", + "valueType": { + "$id": "2273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.delete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" + }, + { + "$id": "2274", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" + } + ] + }, + "conversation.item.truncate": { + "$id": "2276", + "kind": "model", + "name": "RealtimeRequestItemTruncateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.truncate", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2277", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2278", + "kind": "constant", + "valueType": { + "$id": "2279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" + }, + { + "$id": "2280", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" + }, + { + "$id": "2282", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" + }, + { + "$id": "2284", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2285", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" + } + ] + }, + "response.create": { + "$id": "2286", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", + "usage": "Input,Json", + "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", + "discriminatorValue": "response.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2287", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2288", + "kind": "constant", + "valueType": { + "$id": "2289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" + }, + { + "$id": "2290", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2291", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommandResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2292", + "kind": "property", + "name": "commit", + "serializedName": "commit", + "type": { + "$id": "2293", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" + }, + { + "$id": "2294", + "kind": "property", + "name": "cancel_previous", + "serializedName": "cancel_previous", + "type": { + "$id": "2295", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" + }, + { + "$id": "2296", + "kind": "property", + "name": "append_input_items", + "serializedName": "append_input_items", + "type": { + "$id": "2297", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" + }, + { + "$id": "2298", + "kind": "property", + "name": "input_items", + "serializedName": "input_items", + "type": { + "$id": "2299", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" + }, + { + "$id": "2300", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" + }, + { + "$id": "2302", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2303", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" + }, + { + "$id": "2304", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" + }, + { + "$id": "2305", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2306", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" + }, + { + "$id": "2307", + "kind": "property", + "name": "max_output_tokens", + "serializedName": "max_output_tokens", + "type": { + "$id": "2308", + "kind": "nullable", + "type": { + "$id": "2309", + "kind": "union", + "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", + "variantTypes": [ + { + "$id": "2310", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2311", + "kind": "constant", + "valueType": { + "$id": "2312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" + }, + { + "$id": "2313", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2314", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" + }, + { + "$id": "2315", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2316", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" + }, + { + "$id": "2317", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" + } + ] + }, + "response.cancel": { + "$id": "2318", + "kind": "model", + "name": "RealtimeRequestResponseCancelCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", + "usage": "Input,Json", + "discriminatorValue": "response.cancel", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2319", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2320", + "kind": "constant", + "valueType": { + "$id": "2321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.cancel", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" + } + ] + } + } + }, + { + "$ref": "2105" + }, + { + "$ref": "2110" + }, + { + "$ref": "2120" + }, + { + "$ref": "2123" + }, + { + "$ref": "2126" + }, + { + "$ref": "2140" + }, + { + "$ref": "2143" + }, + { + "$ref": "2155" + }, + { + "$ref": "2158" + }, + { + "$ref": "2161" + }, + { + "$ref": "2171" + }, + { + "$ref": "2177" + }, + { + "$ref": "2181" + }, + { + "$ref": "2185" + }, + { + "$ref": "2192" + }, + { + "$ref": "2197" + }, + { + "$ref": "2204" + }, + { + "$ref": "2210" + }, + { + "$ref": "2211" + }, + { + "$ref": "2214" + }, + { + "$ref": "2220" + }, + { + "$ref": "2226" + }, + { + "$ref": "2238" + }, + { + "$ref": "2245" + }, + { + "$ref": "2251" + }, + { + "$ref": "2262" + }, + { + "$ref": "2270" + }, + { + "$ref": "2276" + }, + { + "$ref": "2286" + }, + { + "$ref": "2291" + }, + { + "$ref": "2318" + }, + { + "$id": "2322", + "kind": "model", + "name": "RealtimeResponseCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", + "usage": "Output,Json", + "description": "Base representation of a WebSocket message received from the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2323", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "476" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" + }, + "properties": [ + { + "$ref": "2323" + }, + { + "$id": "2324", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2325", + "kind": "nullable", + "type": { + "$id": "2326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2327", + "session.created": { + "$id": "2328", + "kind": "model", + "name": "RealtimeResponseSessionCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2329", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2330", + "kind": "constant", + "valueType": { + "$id": "2331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" + }, + { + "$id": "2332", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2333", + "kind": "model", + "name": "RealtimeResponseSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2334", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2335", + "kind": "constant", + "valueType": { + "$ref": "532" + }, + "value": "realtime.session", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" + }, + { + "$id": "2336", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" + }, + { + "$id": "2338", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$id": "2339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" + }, + { + "$id": "2340", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2341", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" + }, + { + "$id": "2342", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" + }, + { + "$id": "2344", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" + }, + { + "$id": "2345", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" + }, + { + "$id": "2346", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" + }, + { + "$id": "2347", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2348", + "kind": "nullable", + "type": { + "$ref": "2120" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" + }, + { + "$id": "2349", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$ref": "2123" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" + }, + { + "$id": "2350", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2351", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" + }, + { + "$id": "2352", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2353", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" + }, + { + "$id": "2354", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2355", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" + }, + { + "$id": "2356", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2357", + "kind": "nullable", + "type": { + "$id": "2358", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" + } + ] + }, + "session.updated": { + "$id": "2359", + "kind": "model", + "name": "RealtimeResponseSessionUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2360", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2361", + "kind": "constant", + "valueType": { + "$id": "2362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" + }, + { + "$id": "2363", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$ref": "2333" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" + } + ] + }, + "conversation.item.created": { + "$id": "2364", + "kind": "model", + "name": "RealtimeResponseItemCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2365", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2366", + "kind": "constant", + "valueType": { + "$id": "2367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" + }, + { + "$id": "2368", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2369", + "kind": "model", + "name": "RealtimeResponseItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2370", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" + }, + "properties": [ + { + "$id": "2371", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2372", + "kind": "constant", + "valueType": { + "$ref": "535" + }, + "value": "realtime.item", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" + }, + { + "$ref": "2370" + }, + { + "$id": "2373", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2374", + "kind": "nullable", + "type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2376", + "message": { + "$id": "2377", + "kind": "model", + "name": "RealtimeResponseMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", + "usage": "Output,Json", + "discriminatorValue": "message", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2378", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2200" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" + }, + { + "$id": "2379", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" + }, + { + "$id": "2380", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2381", + "kind": "array", + "name": "ArrayRealtimeContentPart", + "valueType": { + "$ref": "2211" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" + }, + { + "$id": "2382", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" + } + ] + }, + "function_call": { + "$id": "2383", + "kind": "model", + "name": "RealtimeResponseFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", + "usage": "Output,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2384", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2253" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" + }, + { + "$id": "2385", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" + }, + { + "$id": "2387", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" + }, + { + "$id": "2389", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" + }, + { + "$id": "2391", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2392", + "kind": "model", + "name": "RealtimeResponseFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", + "usage": "Output,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2393", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2264" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" + }, + { + "$id": "2394", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" + }, + { + "$id": "2396", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" + } + ] + }, + "conversation.item.deleted": { + "$id": "2398", + "kind": "model", + "name": "RealtimeResponseItemDeletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.deleted", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2399", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2400", + "kind": "constant", + "valueType": { + "$id": "2401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" + }, + { + "$id": "2402", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" + } + ] + }, + "conversation.item.truncated": { + "$id": "2404", + "kind": "model", + "name": "RealtimeResponseItemTruncatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.truncated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2405", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2406", + "kind": "constant", + "valueType": { + "$id": "2407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" + }, + { + "$id": "2408", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" + }, + { + "$id": "2410", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2411", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" + }, + { + "$id": "2412", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "2413", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" + } + ] + }, + "response.created": { + "$id": "2414", + "kind": "model", + "name": "RealtimeResponseCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2415", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2416", + "kind": "constant", + "valueType": { + "$id": "2417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" + }, + { + "$id": "2418", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2419", + "kind": "model", + "name": "RealtimeResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2420", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2421", + "kind": "constant", + "valueType": { + "$ref": "538" + }, + "value": "realtime.response", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" + }, + { + "$id": "2422", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" + }, + { + "$id": "2424", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" + }, + { + "$id": "2425", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "type": { + "$id": "2426", + "kind": "nullable", + "type": { + "$id": "2427", + "kind": "model", + "name": "RealtimeResponseStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2428", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" + }, + "properties": [ + { + "$ref": "2428" + } + ], + "discriminatedSubtypes": { + "$id": "2429", + "cancelled": { + "$id": "2430", + "kind": "model", + "name": "RealtimeResponseCancelledStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "cancelled", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2431", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2432", + "kind": "constant", + "valueType": { + "$id": "2433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "function": { - "$id": "1806", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", - "usage": "Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1742" - }, - "properties": [ - { - "$id": "1807", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "1809", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "1810", - "kind": "constant", - "valueType": { - "$id": "1811", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "1812", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "1813", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1814", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "1815", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "1816", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "1817", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "1818", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "1819", - "kind": "nullable", - "type": { - "$id": "1820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" - } - ] - } - } + "value": "cancelled", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] + { + "$id": "2434", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "553" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" + } + ] + }, + "incomplete": { + "$id": "2435", + "kind": "model", + "name": "RealtimeResponseIncompleteStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "incomplete", + "decorators": [], + "baseModel": { + "$ref": "2427" }, - "optional": false, - "readOnly": false, - "discriminator": false, + "properties": [ + { + "$id": "2436", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2437", + "kind": "constant", + "valueType": { + "$id": "2438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "incomplete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" + }, + { + "$id": "2439", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "559" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" + } + ] + }, + "failed": { + "$id": "2440", + "kind": "model", + "name": "RealtimeResponseFailedStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "failed", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2441", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2442", + "kind": "constant", + "valueType": { + "$id": "2443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" + }, + { + "$id": "2444", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2445", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" + } + ] } - ] + } } - } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" - }, - { - "$id": "1821", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run step. Will be `null` if there are no errors.", - "type": { - "$id": "1822", - "kind": "nullable", + { + "$id": "2446", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2447", + "kind": "array", + "name": "ArrayRealtimeResponseItem", + "valueType": { + "$ref": "2369" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" + }, + { + "$id": "2448", + "kind": "property", + "name": "usage", + "serializedName": "usage", "type": { - "$id": "1823", + "$id": "2449", "kind": "model", - "name": "RunStepObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", + "name": "RealtimeResponseUsage", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", "usage": "Output,Json", "decorators": [], "properties": [ { - "$id": "1824", + "$id": "2450", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "type": { + "$id": "2451", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" + }, + { + "$id": "2452", "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", + "name": "input_tokens", + "serializedName": "input_tokens", "type": { - "$ref": "364" + "$id": "2453", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" }, { - "$id": "1825", + "$id": "2454", "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", + "name": "output_tokens", + "serializedName": "output_tokens", "type": { - "$id": "1826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "2455", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" + }, + { + "$id": "2456", + "kind": "property", + "name": "input_token_details", + "serializedName": "input_token_details", + "type": { + "$id": "2457", + "kind": "model", + "name": "RealtimeResponseUsageInputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2458", + "kind": "property", + "name": "cached_tokens", + "serializedName": "cached_tokens", + "type": { + "$id": "2459", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" + }, + { + "$id": "2460", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2461", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" + }, + { + "$id": "2462", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2463", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" + }, + { + "$id": "2464", + "kind": "property", + "name": "output_token_details", + "serializedName": "output_token_details", + "type": { + "$id": "2465", + "kind": "model", + "name": "RealtimeResponseUsageOutputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2466", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2467", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" + }, + { + "$id": "2468", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2469", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" } ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" + } + ] + }, + "response.done": { + "$id": "2470", + "kind": "model", + "name": "RealtimeResponseDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2471", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2472", + "kind": "constant", + "valueType": { + "$id": "2473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - { - "$id": "1827", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", - "type": { - "$id": "1828", - "kind": "nullable", - "type": { - "$id": "1829", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1830", + "value": "response.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" + }, + { + "$id": "2474", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$ref": "2419" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" + } + ] + }, + "rate_limits.updated": { + "$id": "2475", + "kind": "model", + "name": "RealtimeResponseRateLimitsUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "rate_limits.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2476", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2477", + "kind": "constant", + "valueType": { + "$id": "2478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "rate_limits.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" + }, + { + "$id": "2479", + "kind": "property", + "name": "rate_limits", + "serializedName": "rate_limits", + "type": { + "$id": "2480", + "kind": "array", + "name": "ArrayRealtimeResponseRateLimitDetailsItem", + "valueType": { + "$id": "2481", + "kind": "model", + "name": "RealtimeResponseRateLimitDetailsItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2482", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" + }, + { + "$id": "2484", + "kind": "property", + "name": "limit", + "serializedName": "limit", + "type": { + "$id": "2485", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" - }, - { - "$id": "1831", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", - "type": { - "$id": "1832", - "kind": "nullable", - "type": { - "$id": "1833", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1834", + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" + }, + { + "$id": "2486", + "kind": "property", + "name": "remaining", + "serializedName": "remaining", + "type": { + "$id": "2487", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" + }, + { + "$id": "2488", + "kind": "property", + "name": "reset_seconds", + "serializedName": "reset_seconds", + "type": { + "$id": "2489", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" + } + ] + }, + "response.output_item.added": { + "$id": "2490", + "kind": "model", + "name": "RealtimeResponseOutputItemAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2491", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2492", + "kind": "constant", + "valueType": { + "$id": "2493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" + }, + { + "$id": "2494", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" + }, + { + "$id": "2496", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2497", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" + }, + { + "$id": "2498", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" + } + ] + }, + "response.output_item.done": { + "$id": "2499", + "kind": "model", + "name": "RealtimeResponseOutputItemDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2500", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2501", + "kind": "constant", + "valueType": { + "$id": "2502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" + }, + { + "$id": "2503", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" + }, + { + "$id": "2505", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2506", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" + }, + { + "$id": "2507", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" + } + ] + }, + "response.content_part.added": { + "$id": "2508", + "kind": "model", + "name": "RealtimeResponseContentPartAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2509", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2510", + "kind": "constant", + "valueType": { + "$id": "2511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.content_part.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" + }, + { + "$id": "2512", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" + }, + { + "$id": "2514", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" + }, + { + "$id": "2516", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2517", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" + }, + { + "$id": "2518", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2519", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" + }, + { + "$id": "2520", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" + } + ] + }, + "response.content_part.done": { + "$id": "2521", + "kind": "model", + "name": "RealtimeResponseContentPartDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2522", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2523", + "kind": "constant", + "valueType": { + "$id": "2524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - { - "$id": "1835", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run step failed.", - "type": { - "$id": "1836", - "kind": "nullable", - "type": { - "$id": "1837", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1838", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" + "value": "response.content_part.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" + }, + { + "$id": "2525", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" + }, + { + "$id": "2527", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" + }, + { + "$id": "2529", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2530", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" + }, + { + "$id": "2531", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2532", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" + }, + { + "$id": "2533", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" + } + ] + }, + "response.audio.delta": { + "$id": "2534", + "kind": "model", + "name": "RealtimeResponseAudioDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2535", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2536", + "kind": "constant", + "valueType": { + "$id": "2537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - { - "$id": "1839", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run step completed.", - "type": { - "$id": "1840", - "kind": "nullable", - "type": { - "$id": "1841", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1842", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" + "value": "response.audio.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" + }, + { + "$id": "2538", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" + }, + { + "$id": "2540", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2541", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" + }, + { + "$id": "2542", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2543", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" + }, + { + "$id": "2544", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2545", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" + }, + { + "$id": "2546", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2547", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" + } + ] + }, + "response.audio.done": { + "$id": "2548", + "kind": "model", + "name": "RealtimeResponseAudioDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2549", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2550", + "kind": "constant", + "valueType": { + "$id": "2551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - { - "$id": "1843", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1844", - "kind": "nullable", - "type": { - "$id": "1845", - "kind": "dict", - "keyType": { - "$id": "1846", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" + "value": "response.audio.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" + }, + { + "$id": "2552", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" + }, + { + "$id": "2554", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" + }, + { + "$id": "2556", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2557", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" + }, + { + "$id": "2558", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2559", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" + } + ] + }, + "response.audio_transcript.delta": { + "$id": "2560", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2561", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2562", + "kind": "constant", + "valueType": { + "$id": "2563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - { - "$id": "1848", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "1849", - "kind": "nullable", - "type": { - "$id": "1850", - "kind": "model", - "name": "RunStepCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", - "decorators": [], - "properties": [ - { - "$id": "1851", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run step.", - "type": { - "$id": "1852", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" - }, - { - "$id": "1853", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run step.", - "type": { - "$id": "1854", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" - }, - { - "$id": "1855", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "1856", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" - } - ] + "value": "response.audio_transcript.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" + }, + { + "$id": "2564", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" + }, + { + "$id": "2566", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" + }, + { + "$id": "2568", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2569", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" + }, + { + "$id": "2570", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" + }, + { + "$id": "2572", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" + } + ] + }, + "response.audio_transcript.done": { + "$id": "2574", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2575", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2576", + "kind": "constant", + "valueType": { + "$id": "2577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio_transcript.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, + { + "$id": "2578", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" + }, + { + "$id": "2580", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" + }, + { + "$id": "2582", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2583", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" + }, + { + "$id": "2584", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2585", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" + } + ] + }, + "response.text.delta": { + "$id": "2586", + "kind": "model", + "name": "RealtimeResponseTextDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.delta", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2587", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2588", + "kind": "constant", + "valueType": { + "$id": "2589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" + }, + { + "$id": "2590", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" + }, + { + "$id": "2592", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" + }, + { + "$id": "2594", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2595", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" + }, + { + "$id": "2596", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2597", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" + }, + { + "$id": "2598", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" + } + ] }, - { - "$id": "1857", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1858", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "response.text.done": { + "$id": "2600", + "kind": "model", + "name": "RealtimeResponseTextDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.done", + "decorators": [], + "baseModel": { + "$ref": "2322" }, - "optional": false, - "readOnly": false, - "discriminator": false, + "properties": [ + { + "$id": "2601", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2602", + "kind": "constant", + "valueType": { + "$id": "2603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" + }, + { + "$id": "2604", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" + }, + { + "$id": "2606", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" + }, + { + "$id": "2608", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2609", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" + }, + { + "$id": "2610", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2611", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" + }, + { + "$id": "2612", + "kind": "property", + "name": "value", + "serializedName": "value", + "type": { + "$id": "2613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" + } + ] + }, + "response.function_call_arguments.delta": { + "$id": "2614", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.delta", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2615", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2616", + "kind": "constant", + "valueType": { + "$id": "2617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" + }, + { + "$id": "2618", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" + }, + { + "$id": "2620", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" + }, + { + "$id": "2622", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2623", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" + }, + { + "$id": "2624", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" + }, + { + "$id": "2626", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" + } + ] }, - { - "$id": "1859", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1860", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "response.function_call_arguments.done": { + "$id": "2628", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.done", + "decorators": [], + "baseModel": { + "$ref": "2322" }, - "optional": false, - "readOnly": false, - "discriminator": false, + "properties": [ + { + "$id": "2629", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2630", + "kind": "constant", + "valueType": { + "$id": "2631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" + }, + { + "$id": "2632", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" + }, + { + "$id": "2634", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" + }, + { + "$id": "2636", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2637", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" + }, + { + "$id": "2638", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" + }, + { + "$id": "2640", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" + }, + { + "$id": "2642", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" + } + ] + }, + "input_audio_buffer.speech_started": { + "$id": "2644", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_started", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2645", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2646", + "kind": "constant", + "valueType": { + "$id": "2647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_started", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" + }, + { + "$id": "2648", + "kind": "property", + "name": "audio_start_ms", + "serializedName": "audio_start_ms", + "type": { + "$id": "2649", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" + }, + { + "$id": "2650", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" + } + ] }, - { - "$id": "1861", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1862", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, + "input_audio_buffer.speech_stopped": { + "$id": "2652", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_stopped", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" - } - ] - }, - { - "$ref": "1707" - }, - { - "$ref": "1724" - }, - { - "$ref": "1728" - }, - { - "$ref": "1733" - }, - { - "$ref": "1736" - }, - { - "$ref": "1742" - }, - { - "$ref": "1746" - }, - { - "$ref": "1753" - }, - { - "$ref": "1758" - }, - { - "$ref": "1762" - }, - { - "$ref": "1768" - }, - { - "$ref": "1773" - }, - { - "$ref": "1776" - }, - { - "$ref": "1783" - }, - { - "$ref": "1785" - }, - { - "$ref": "1792" - }, - { - "$ref": "1801" - }, - { - "$ref": "1806" - }, - { - "$ref": "1813" - }, - { - "$ref": "1823" - }, - { - "$ref": "1850" - }, - { - "$id": "1863", - "kind": "model", - "name": "ThreadObject", - "crossLanguageDefinitionId": "OpenAI.ThreadObject", - "usage": "Output,Json", - "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", - "decorators": [], - "properties": [ - { - "$id": "1864", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "baseModel": { + "$ref": "2322" }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" - }, - { - "$id": "1866", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread`.", - "type": { - "$id": "1867", - "kind": "constant", - "valueType": { - "$ref": "370" + "properties": [ + { + "$id": "2653", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2654", + "kind": "constant", + "valueType": { + "$id": "2655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_stopped", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" }, - "value": "thread", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" - }, - { - "$id": "1868", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the thread was created.", - "type": { - "$id": "1869", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1870", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] + { + "$id": "2656", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2657", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" - }, - { - "$id": "1871", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1872", - "kind": "nullable", - "type": { - "$id": "1873", - "kind": "model", - "name": "ThreadObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", - "usage": "Output,Json", + { + "$id": "2658", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, "decorators": [], - "properties": [ - { - "$id": "1874", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1875", - "kind": "model", - "name": "ThreadObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1876", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1877", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1879", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1880", - "kind": "model", - "name": "ThreadObjectToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1881", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", - "type": { - "$id": "1882", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" - } - ] + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" + ] }, - { - "$id": "1884", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1885", - "kind": "nullable", - "type": { - "$id": "1886", - "kind": "dict", - "keyType": { - "$id": "1887", + "conversation.item.input_audio_transcription.completed": { + "$id": "2660", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.completed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2661", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2662", + "kind": "constant", + "valueType": { + "$id": "2663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.completed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" + }, + { + "$id": "2664", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2665", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "valueType": { - "$id": "1888", + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" + }, + { + "$id": "2666", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2667", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" + }, + { + "$id": "2668", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2669", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "decorators": [] + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" } - }, - "optional": false, - "readOnly": false, - "discriminator": false, + ] + }, + "conversation.item.input_audio_transcription.failed": { + "$id": "2670", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.failed", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" - } - ] - }, - { - "$ref": "1873" - }, - { - "$ref": "1875" - }, - { - "$ref": "1880" - }, - { - "$id": "1889", - "kind": "model", - "name": "ModifyThreadRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1890", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1891", - "kind": "nullable", - "type": { - "$id": "1892", - "kind": "model", - "name": "ModifyThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2671", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2672", + "kind": "constant", + "valueType": { + "$id": "2673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, "decorators": [], - "properties": [ - { - "$id": "1893", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1894", - "kind": "model", - "name": "ModifyThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" + }, + { + "$id": "2674", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" + }, + { + "$id": "2676", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2677", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" + }, + { + "$id": "2678", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2679", + "kind": "model", + "name": "RealtimeResponseApiError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2680", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, "decorators": [], - "properties": [ - { - "$id": "1895", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1896", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1897", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1898", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1443" + { + "$id": "2682", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" - } - ] + { + "$id": "2684", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" + }, + { + "$id": "2686", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" + ] }, - { - "$id": "1899", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1900", - "kind": "nullable", - "type": { - "$id": "1901", - "kind": "dict", - "keyType": { - "$id": "1902", + "input_audio_buffer.committed": { + "$id": "2688", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferCommittedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.committed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2689", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2690", + "kind": "constant", + "valueType": { + "$id": "2691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.committed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" + }, + { + "$id": "2692", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2693", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "valueType": { - "$id": "1903", + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" + }, + { + "$id": "2694", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2695", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "decorators": [] + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" } + ] + }, + "input_audio_buffer.cleared": { + "$id": "2696", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferClearedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.cleared", + "decorators": [], + "baseModel": { + "$ref": "2322" }, - "optional": true, - "readOnly": false, - "discriminator": false, + "properties": [ + { + "$id": "2697", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2698", + "kind": "constant", + "valueType": { + "$id": "2699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.cleared", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" + } + ] + }, + "error": { + "$id": "2700", + "kind": "model", + "name": "RealtimeResponseErrorCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", + "usage": "Output,Json", + "description": "A command that describes an error encountered during a realtime operation.", + "discriminatorValue": "error", "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2701", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2702", + "kind": "constant", + "valueType": { + "$id": "2703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "error", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" + }, + { + "$id": "2704", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2705", + "kind": "model", + "name": "RealtimeResponseError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2706", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" + }, + { + "$id": "2708", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" + }, + { + "$id": "2710", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" + }, + { + "$id": "2712", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" + }, + { + "$id": "2714", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" + } + ] } - ] + } }, { - "$ref": "1892" + "$ref": "2328" }, { - "$ref": "1894" + "$ref": "2333" }, { - "$id": "1904", - "kind": "model", - "name": "DeleteThreadResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1905", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1906", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" - }, - { - "$id": "1907", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1908", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" - }, - { - "$id": "1909", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1910", - "kind": "constant", - "valueType": { - "$ref": "373" - }, - "value": "thread.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" - } - ] + "$ref": "2359" + }, + { + "$ref": "2364" + }, + { + "$ref": "2369" + }, + { + "$ref": "2377" + }, + { + "$ref": "2383" + }, + { + "$ref": "2392" + }, + { + "$ref": "2398" + }, + { + "$ref": "2404" + }, + { + "$ref": "2414" + }, + { + "$ref": "2419" + }, + { + "$ref": "2427" + }, + { + "$ref": "2430" + }, + { + "$ref": "2435" + }, + { + "$ref": "2440" + }, + { + "$ref": "2449" + }, + { + "$ref": "2457" + }, + { + "$ref": "2465" + }, + { + "$ref": "2470" + }, + { + "$ref": "2475" + }, + { + "$ref": "2481" + }, + { + "$ref": "2490" + }, + { + "$ref": "2499" + }, + { + "$ref": "2508" + }, + { + "$ref": "2521" + }, + { + "$ref": "2534" + }, + { + "$ref": "2548" + }, + { + "$ref": "2560" + }, + { + "$ref": "2574" + }, + { + "$ref": "2586" + }, + { + "$ref": "2600" + }, + { + "$ref": "2614" + }, + { + "$ref": "2628" + }, + { + "$ref": "2644" + }, + { + "$ref": "2652" + }, + { + "$ref": "2660" + }, + { + "$ref": "2670" + }, + { + "$ref": "2679" + }, + { + "$ref": "2688" + }, + { + "$ref": "2696" + }, + { + "$ref": "2700" + }, + { + "$ref": "2705" }, { - "$id": "1911", + "$id": "2716", "kind": "model", "name": "CreateModerationRequest", "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", @@ -17783,29 +25581,29 @@ "decorators": [], "properties": [ { - "$id": "1912", + "$id": "2717", "kind": "property", "name": "input", "serializedName": "input", "description": "The input text to classify", "type": { - "$id": "1913", + "$id": "2718", "kind": "union", "name": "CreateModerationRequestInput", "variantTypes": [ { - "$id": "1914", + "$id": "2719", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "1915", + "$id": "2720", "kind": "array", "name": "Array", "valueType": { - "$id": "1916", + "$id": "2721", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17824,13 +25622,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" }, { - "$id": "1917", + "$id": "2722", "kind": "property", "name": "model", "serializedName": "model", "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", "type": { - "$ref": "376" + "$ref": "565" }, "optional": true, "readOnly": false, @@ -17841,7 +25639,7 @@ ] }, { - "$id": "1918", + "$id": "2723", "kind": "model", "name": "CreateModerationResponse", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", @@ -17850,13 +25648,13 @@ "decorators": [], "properties": [ { - "$id": "1919", + "$id": "2724", "kind": "property", "name": "id", "serializedName": "id", "description": "The unique identifier for the moderation request.", "type": { - "$id": "1920", + "$id": "2725", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17869,13 +25667,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" }, { - "$id": "1921", + "$id": "2726", "kind": "property", "name": "model", "serializedName": "model", "description": "The model used to generate the moderation results.", "type": { - "$id": "1922", + "$id": "2727", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17888,17 +25686,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" }, { - "$id": "1923", + "$id": "2728", "kind": "property", "name": "results", "serializedName": "results", "description": "A list of moderation objects.", "type": { - "$id": "1924", + "$id": "2729", "kind": "array", "name": "Array", "valueType": { - "$id": "1925", + "$id": "2730", "kind": "model", "name": "CreateModerationResponseResult", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", @@ -17906,13 +25704,13 @@ "decorators": [], "properties": [ { - "$id": "1926", + "$id": "2731", "kind": "property", "name": "flagged", "serializedName": "flagged", "description": "Whether any of the below categories are flagged.", "type": { - "$id": "1927", + "$id": "2732", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -17925,13 +25723,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" }, { - "$id": "1928", + "$id": "2733", "kind": "property", "name": "categories", "serializedName": "categories", "description": "A list of the categories, and whether they are flagged or not.", "type": { - "$id": "1929", + "$id": "2734", "kind": "model", "name": "CreateModerationResponseResultCategories", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", @@ -17939,13 +25737,13 @@ "decorators": [], "properties": [ { - "$id": "1930", + "$id": "2735", "kind": "property", "name": "hate", "serializedName": "hate", "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", "type": { - "$id": "1931", + "$id": "2736", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -17958,13 +25756,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" }, { - "$id": "1932", + "$id": "2737", "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", "type": { - "$id": "1933", + "$id": "2738", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -17977,13 +25775,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" }, { - "$id": "1934", + "$id": "2739", "kind": "property", "name": "harassment", "serializedName": "harassment", "description": "Content that expresses, incites, or promotes harassing language towards any target.", "type": { - "$id": "1935", + "$id": "2740", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -17996,13 +25794,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" }, { - "$id": "1936", + "$id": "2741", "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", "description": "Harassment content that also includes violence or serious harm towards any target.", "type": { - "$id": "1937", + "$id": "2742", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18015,13 +25813,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" }, { - "$id": "1938", + "$id": "2743", "kind": "property", "name": "self-harm", "serializedName": "self-harm", "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { - "$id": "1939", + "$id": "2744", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18034,13 +25832,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" }, { - "$id": "1940", + "$id": "2745", "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { - "$id": "1941", + "$id": "2746", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18053,13 +25851,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" }, { - "$id": "1942", + "$id": "2747", "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", "type": { - "$id": "1943", + "$id": "2748", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18072,13 +25870,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" }, { - "$id": "1944", + "$id": "2749", "kind": "property", "name": "sexual", "serializedName": "sexual", "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", "type": { - "$id": "1945", + "$id": "2750", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18091,13 +25889,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" }, { - "$id": "1946", + "$id": "2751", "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", "description": "Sexual content that includes an individual who is under 18 years old.", "type": { - "$id": "1947", + "$id": "2752", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18110,13 +25908,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" }, { - "$id": "1948", + "$id": "2753", "kind": "property", "name": "violence", "serializedName": "violence", "description": "Content that depicts death, violence, or physical injury.", "type": { - "$id": "1949", + "$id": "2754", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18129,13 +25927,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" }, { - "$id": "1950", + "$id": "2755", "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", "description": "Content that depicts death, violence, or physical injury in graphic detail.", "type": { - "$id": "1951", + "$id": "2756", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18156,13 +25954,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" }, { - "$id": "1952", + "$id": "2757", "kind": "property", "name": "category_scores", "serializedName": "category_scores", "description": "A list of the categories along with their scores as predicted by model.", "type": { - "$id": "1953", + "$id": "2758", "kind": "model", "name": "CreateModerationResponseResultCategoryScores", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", @@ -18170,13 +25968,13 @@ "decorators": [], "properties": [ { - "$id": "1954", + "$id": "2759", "kind": "property", "name": "hate", "serializedName": "hate", "description": "The score for the category 'hate'.", "type": { - "$id": "1955", + "$id": "2760", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18189,13 +25987,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" }, { - "$id": "1956", + "$id": "2761", "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", "description": "The score for the category 'hate/threatening'.", "type": { - "$id": "1957", + "$id": "2762", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18208,13 +26006,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" }, { - "$id": "1958", + "$id": "2763", "kind": "property", "name": "harassment", "serializedName": "harassment", "description": "The score for the category 'harassment'.", "type": { - "$id": "1959", + "$id": "2764", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18227,13 +26025,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" }, { - "$id": "1960", + "$id": "2765", "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", "description": "The score for the category 'harassment/threatening'.", "type": { - "$id": "1961", + "$id": "2766", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18246,13 +26044,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" }, { - "$id": "1962", + "$id": "2767", "kind": "property", "name": "self-harm", "serializedName": "self-harm", "description": "The score for the category 'self-harm'.", "type": { - "$id": "1963", + "$id": "2768", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18265,13 +26063,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" }, { - "$id": "1964", + "$id": "2769", "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", "description": "The score for the category 'self-harm/intent'.", "type": { - "$id": "1965", + "$id": "2770", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18284,13 +26082,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" }, { - "$id": "1966", + "$id": "2771", "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", "description": "The score for the category 'self-harm/instructions'.", "type": { - "$id": "1967", + "$id": "2772", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18303,13 +26101,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" }, { - "$id": "1968", + "$id": "2773", "kind": "property", "name": "sexual", "serializedName": "sexual", "description": "The score for the category 'sexual'.", "type": { - "$id": "1969", + "$id": "2774", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18322,13 +26120,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" }, { - "$id": "1970", + "$id": "2775", "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", "description": "The score for the category 'sexual/minors'.", "type": { - "$id": "1971", + "$id": "2776", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18341,13 +26139,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" }, { - "$id": "1972", + "$id": "2777", "kind": "property", "name": "violence", "serializedName": "violence", "description": "The score for the category 'violence'.", "type": { - "$id": "1973", + "$id": "2778", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18360,13 +26158,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" }, { - "$id": "1974", + "$id": "2779", "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", "description": "The score for the category 'violence/graphic'.", "type": { - "$id": "1975", + "$id": "2780", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -18400,16 +26198,16 @@ ] }, { - "$ref": "1925" + "$ref": "2730" }, { - "$ref": "1929" + "$ref": "2734" }, { - "$ref": "1953" + "$ref": "2758" }, { - "$id": "1976", + "$id": "2781", "kind": "model", "name": "ListModelsResponse", "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", @@ -18417,15 +26215,15 @@ "decorators": [], "properties": [ { - "$id": "1977", + "$id": "2782", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "1978", + "$id": "2783", "kind": "constant", "valueType": { - "$ref": "382" + "$ref": "571" }, "value": "list", "decorators": [] @@ -18437,16 +26235,16 @@ "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" }, { - "$id": "1979", + "$id": "2784", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "1980", + "$id": "2785", "kind": "array", "name": "ArrayModel", "valueType": { - "$id": "1981", + "$id": "2786", "kind": "model", "name": "Model", "crossLanguageDefinitionId": "OpenAI.Model", @@ -18455,13 +26253,13 @@ "decorators": [], "properties": [ { - "$id": "1982", + "$id": "2787", "kind": "property", "name": "id", "serializedName": "id", "description": "The model identifier, which can be referenced in the API endpoints.", "type": { - "$id": "1983", + "$id": "2788", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18474,18 +26272,18 @@ "crossLanguageDefinitionId": "OpenAI.Model.id" }, { - "$id": "1984", + "$id": "2789", "kind": "property", "name": "created", "serializedName": "created", "description": "The Unix timestamp (in seconds) when the model was created.", "type": { - "$id": "1985", + "$id": "2790", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "1986", + "$id": "2791", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18501,16 +26299,16 @@ "crossLanguageDefinitionId": "OpenAI.Model.created" }, { - "$id": "1987", + "$id": "2792", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"model\".", "type": { - "$id": "1988", + "$id": "2793", "kind": "constant", "valueType": { - "$ref": "385" + "$ref": "574" }, "value": "model", "decorators": [] @@ -18522,13 +26320,13 @@ "crossLanguageDefinitionId": "OpenAI.Model.object" }, { - "$id": "1989", + "$id": "2794", "kind": "property", "name": "owned_by", "serializedName": "owned_by", "description": "The organization that owns the model.", "type": { - "$id": "1990", + "$id": "2795", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18554,10 +26352,10 @@ ] }, { - "$ref": "1981" + "$ref": "2786" }, { - "$id": "1991", + "$id": "2796", "kind": "model", "name": "DeleteModelResponse", "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", @@ -18565,12 +26363,12 @@ "decorators": [], "properties": [ { - "$id": "1992", + "$id": "2797", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "1993", + "$id": "2798", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18583,12 +26381,12 @@ "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" }, { - "$id": "1994", + "$id": "2799", "kind": "property", "name": "deleted", "serializedName": "deleted", "type": { - "$id": "1995", + "$id": "2800", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -18601,15 +26399,15 @@ "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" }, { - "$id": "1996", + "$id": "2801", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "1997", + "$id": "2802", "kind": "constant", "valueType": { - "$ref": "388" + "$ref": "577" }, "value": "model", "decorators": [] @@ -18623,7 +26421,7 @@ ] }, { - "$id": "1998", + "$id": "2803", "kind": "model", "name": "MessageObject", "crossLanguageDefinitionId": "OpenAI.MessageObject", @@ -18632,13 +26430,13 @@ "decorators": [], "properties": [ { - "$id": "1999", + "$id": "2804", "kind": "property", "name": "id", "serializedName": "id", "description": "The identifier, which can be referenced in API endpoints.", "type": { - "$id": "2000", + "$id": "2805", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18651,16 +26449,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.id" }, { - "$id": "2001", + "$id": "2806", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `thread.message`.", "type": { - "$id": "2002", + "$id": "2807", "kind": "constant", "valueType": { - "$ref": "391" + "$ref": "580" }, "value": "thread.message", "decorators": [] @@ -18672,18 +26470,18 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.object" }, { - "$id": "2003", + "$id": "2808", "kind": "property", "name": "created_at", "serializedName": "created_at", "description": "The Unix timestamp (in seconds) for when the message was created.", "type": { - "$id": "2004", + "$id": "2809", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2005", + "$id": "2810", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18699,13 +26497,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" }, { - "$id": "2006", + "$id": "2811", "kind": "property", "name": "thread_id", "serializedName": "thread_id", "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", "type": { - "$id": "2007", + "$id": "2812", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18718,13 +26516,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" }, { - "$id": "2008", + "$id": "2813", "kind": "property", "name": "status", "serializedName": "status", "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", "type": { - "$ref": "394" + "$ref": "583" }, "optional": false, "readOnly": false, @@ -18733,16 +26531,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.status" }, { - "$id": "2009", + "$id": "2814", "kind": "property", "name": "incomplete_details", "serializedName": "incomplete_details", "description": "On an incomplete message, details about why the message is incomplete.", "type": { - "$id": "2010", + "$id": "2815", "kind": "nullable", "type": { - "$id": "2011", + "$id": "2816", "kind": "model", "name": "MessageObjectIncompleteDetails", "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", @@ -18750,13 +26548,13 @@ "decorators": [], "properties": [ { - "$id": "2012", + "$id": "2817", "kind": "property", "name": "reason", "serializedName": "reason", "description": "The reason the message is incomplete.", "type": { - "$ref": "402" + "$ref": "591" }, "optional": false, "readOnly": false, @@ -18774,21 +26572,21 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" }, { - "$id": "2013", + "$id": "2818", "kind": "property", "name": "completed_at", "serializedName": "completed_at", "description": "The Unix timestamp (in seconds) for when the message was completed.", "type": { - "$id": "2014", + "$id": "2819", "kind": "nullable", "type": { - "$id": "2015", + "$id": "2820", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2016", + "$id": "2821", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18805,21 +26603,21 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" }, { - "$id": "2017", + "$id": "2822", "kind": "property", "name": "incomplete_at", "serializedName": "incomplete_at", "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", "type": { - "$id": "2018", + "$id": "2823", "kind": "nullable", "type": { - "$id": "2019", + "$id": "2824", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2020", + "$id": "2825", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18836,13 +26634,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" }, { - "$id": "2021", + "$id": "2826", "kind": "property", "name": "role", "serializedName": "role", "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { - "$ref": "414" + "$ref": "603" }, "optional": false, "readOnly": false, @@ -18851,17 +26649,17 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.role" }, { - "$id": "2022", + "$id": "2827", "kind": "property", "name": "content", "serializedName": "content", "description": "The content of the message in array of text and/or images.", "type": { - "$id": "2023", + "$id": "2828", "kind": "array", "name": "ArrayMessageContent", "valueType": { - "$ref": "1341" + "$ref": "1530" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -18873,16 +26671,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.content" }, { - "$id": "2024", + "$id": "2829", "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", "type": { - "$id": "2025", + "$id": "2830", "kind": "nullable", "type": { - "$id": "2026", + "$id": "2831", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18896,16 +26694,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" }, { - "$id": "2027", + "$id": "2832", "kind": "property", "name": "run_id", "serializedName": "run_id", "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", "type": { - "$id": "2028", + "$id": "2833", "kind": "nullable", "type": { - "$id": "2029", + "$id": "2834", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18919,20 +26717,20 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" }, { - "$id": "2030", + "$id": "2835", "kind": "property", "name": "attachments", "serializedName": "attachments", "description": "A list of files attached to the message, and the tools they were added to.", "type": { - "$id": "2031", + "$id": "2836", "kind": "nullable", "type": { - "$id": "2032", + "$id": "2837", "kind": "array", "name": "MessageObjectAttachments", "valueType": { - "$id": "2033", + "$id": "2838", "kind": "model", "name": "MessageObjectAttachment", "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", @@ -18940,13 +26738,13 @@ "decorators": [], "properties": [ { - "$id": "2034", + "$id": "2839", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The ID of the file to attach to the message.", "type": { - "$id": "2035", + "$id": "2840", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18959,25 +26757,25 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" }, { - "$id": "2036", + "$id": "2841", "kind": "property", "name": "tools", "serializedName": "tools", "description": "The tools to add this file to.", "type": { - "$id": "2037", + "$id": "2842", "kind": "array", "name": "Array", "valueType": { - "$id": "2038", + "$id": "2843", "kind": "union", "name": "MessageObjectAttachmentTool", "variantTypes": [ { - "$ref": "1351" + "$ref": "1540" }, { - "$ref": "1388" + "$ref": "1577" } ], "decorators": [] @@ -19004,26 +26802,26 @@ "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" }, { - "$id": "2039", + "$id": "2844", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2040", + "$id": "2845", "kind": "nullable", "type": { - "$id": "2041", + "$id": "2846", "kind": "dict", "keyType": { - "$id": "2042", + "$id": "2847", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2043", + "$id": "2848", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19041,13 +26839,13 @@ ] }, { - "$ref": "2011" + "$ref": "2816" }, { - "$ref": "2033" + "$ref": "2838" }, { - "$id": "2044", + "$id": "2849", "kind": "model", "name": "ListMessagesResponse", "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", @@ -19055,15 +26853,15 @@ "decorators": [], "properties": [ { - "$id": "2045", + "$id": "2850", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2046", + "$id": "2851", "kind": "constant", "valueType": { - "$ref": "426" + "$ref": "615" }, "value": "list", "decorators": [] @@ -19075,16 +26873,16 @@ "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" }, { - "$id": "2047", + "$id": "2852", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2048", + "$id": "2853", "kind": "array", "name": "ArrayMessageObject", "valueType": { - "$ref": "1998" + "$ref": "2803" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -19096,12 +26894,12 @@ "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" }, { - "$id": "2049", + "$id": "2854", "kind": "property", "name": "first_id", "serializedName": "first_id", "type": { - "$id": "2050", + "$id": "2855", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19114,12 +26912,12 @@ "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" }, { - "$id": "2051", + "$id": "2856", "kind": "property", "name": "last_id", "serializedName": "last_id", "type": { - "$id": "2052", + "$id": "2857", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19132,12 +26930,12 @@ "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" }, { - "$id": "2053", + "$id": "2858", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2054", + "$id": "2859", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -19152,7 +26950,7 @@ ] }, { - "$id": "2055", + "$id": "2860", "kind": "model", "name": "ModifyMessageRequest", "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", @@ -19160,26 +26958,26 @@ "decorators": [], "properties": [ { - "$id": "2056", + "$id": "2861", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2057", + "$id": "2862", "kind": "nullable", "type": { - "$id": "2058", + "$id": "2863", "kind": "dict", "keyType": { - "$id": "2059", + "$id": "2864", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2060", + "$id": "2865", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19197,7 +26995,7 @@ ] }, { - "$id": "2061", + "$id": "2866", "kind": "model", "name": "DeleteMessageResponse", "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", @@ -19205,12 +27003,12 @@ "decorators": [], "properties": [ { - "$id": "2062", + "$id": "2867", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "2063", + "$id": "2868", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19223,12 +27021,12 @@ "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" }, { - "$id": "2064", + "$id": "2869", "kind": "property", "name": "deleted", "serializedName": "deleted", "type": { - "$id": "2065", + "$id": "2870", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -19241,15 +27039,15 @@ "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" }, { - "$id": "2066", + "$id": "2871", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2067", + "$id": "2872", "kind": "constant", "valueType": { - "$ref": "429" + "$ref": "618" }, "value": "thread.message.deleted", "decorators": [] @@ -19263,7 +27061,7 @@ ] }, { - "$id": "2068", + "$id": "2873", "kind": "model", "name": "CreateImageRequest", "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", @@ -19271,13 +27069,13 @@ "decorators": [], "properties": [ { - "$id": "2069", + "$id": "2874", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", "type": { - "$id": "2070", + "$id": "2875", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19290,16 +27088,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" }, { - "$id": "2071", + "$id": "2876", "kind": "property", "name": "model", "serializedName": "model", "description": "The model to use for image generation.", "type": { - "$id": "2072", + "$id": "2877", "kind": "nullable", "type": { - "$ref": "432" + "$ref": "621" } }, "optional": true, @@ -19309,16 +27107,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" }, { - "$id": "2073", + "$id": "2878", "kind": "property", "name": "n", "serializedName": "n", "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { - "$id": "2074", + "$id": "2879", "kind": "nullable", "type": { - "$id": "2075", + "$id": "2880", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19332,13 +27130,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" }, { - "$id": "2076", + "$id": "2881", "kind": "property", "name": "quality", "serializedName": "quality", "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", "type": { - "$ref": "438" + "$ref": "627" }, "optional": true, "readOnly": false, @@ -19347,16 +27145,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" }, { - "$id": "2077", + "$id": "2882", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { - "$id": "2078", + "$id": "2883", "kind": "nullable", "type": { - "$ref": "444" + "$ref": "633" } }, "optional": true, @@ -19366,16 +27164,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" }, { - "$id": "2079", + "$id": "2884", "kind": "property", "name": "size", "serializedName": "size", "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", "type": { - "$id": "2080", + "$id": "2885", "kind": "nullable", "type": { - "$ref": "450" + "$ref": "639" } }, "optional": true, @@ -19385,16 +27183,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" }, { - "$id": "2081", + "$id": "2886", "kind": "property", "name": "style", "serializedName": "style", "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", "type": { - "$id": "2082", + "$id": "2887", "kind": "nullable", "type": { - "$ref": "462" + "$ref": "651" } }, "optional": true, @@ -19404,13 +27202,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" }, { - "$id": "2083", + "$id": "2888", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2084", + "$id": "2889", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19425,7 +27223,7 @@ ] }, { - "$id": "2085", + "$id": "2890", "kind": "model", "name": "ImagesResponse", "crossLanguageDefinitionId": "OpenAI.ImagesResponse", @@ -19433,17 +27231,17 @@ "decorators": [], "properties": [ { - "$id": "2086", + "$id": "2891", "kind": "property", "name": "created", "serializedName": "created", "type": { - "$id": "2087", + "$id": "2892", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2088", + "$id": "2893", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19459,16 +27257,16 @@ "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" }, { - "$id": "2089", + "$id": "2894", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2090", + "$id": "2895", "kind": "array", "name": "ArrayImage", "valueType": { - "$id": "2091", + "$id": "2896", "kind": "model", "name": "Image", "crossLanguageDefinitionId": "OpenAI.Image", @@ -19477,13 +27275,13 @@ "decorators": [], "properties": [ { - "$id": "2092", + "$id": "2897", "kind": "property", "name": "b64_json", "serializedName": "b64_json", "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "type": { - "$id": "2093", + "$id": "2898", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -19497,13 +27295,13 @@ "crossLanguageDefinitionId": "OpenAI.Image.b64_json" }, { - "$id": "2094", + "$id": "2899", "kind": "property", "name": "url", "serializedName": "url", "description": "The URL of the generated image, if `response_format` is `url` (default).", "type": { - "$id": "2095", + "$id": "2900", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -19516,13 +27314,13 @@ "crossLanguageDefinitionId": "OpenAI.Image.url" }, { - "$id": "2096", + "$id": "2901", "kind": "property", "name": "revised_prompt", "serializedName": "revised_prompt", "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", "type": { - "$id": "2097", + "$id": "2902", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19548,10 +27346,10 @@ ] }, { - "$ref": "2091" + "$ref": "2896" }, { - "$id": "2098", + "$id": "2903", "kind": "model", "name": "CreateImageEditRequest", "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", @@ -19559,13 +27357,13 @@ "decorators": [], "properties": [ { - "$id": "2099", + "$id": "2904", "kind": "property", "name": "image", "serializedName": "image", "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", "type": { - "$id": "2100", + "$id": "2905", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -19579,13 +27377,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" }, { - "$id": "2101", + "$id": "2906", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "A text description of the desired image(s). The maximum length is 1000 characters.", "type": { - "$id": "2102", + "$id": "2907", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19598,13 +27396,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" }, { - "$id": "2103", + "$id": "2908", "kind": "property", "name": "mask", "serializedName": "mask", "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", "type": { - "$id": "2104", + "$id": "2909", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -19618,16 +27416,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" }, { - "$id": "2105", + "$id": "2910", "kind": "property", "name": "model", "serializedName": "model", "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { - "$id": "2106", + "$id": "2911", "kind": "nullable", "type": { - "$ref": "468" + "$ref": "657" } }, "optional": true, @@ -19637,16 +27435,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" }, { - "$id": "2107", + "$id": "2912", "kind": "property", "name": "n", "serializedName": "n", "description": "The number of images to generate. Must be between 1 and 10.", "type": { - "$id": "2108", + "$id": "2913", "kind": "nullable", "type": { - "$id": "2109", + "$id": "2914", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19660,16 +27458,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" }, { - "$id": "2110", + "$id": "2915", "kind": "property", "name": "size", "serializedName": "size", "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { - "$id": "2111", + "$id": "2916", "kind": "nullable", "type": { - "$ref": "472" + "$ref": "661" } }, "optional": true, @@ -19679,16 +27477,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" }, { - "$id": "2112", + "$id": "2917", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { - "$id": "2113", + "$id": "2918", "kind": "nullable", "type": { - "$ref": "480" + "$ref": "669" } }, "optional": true, @@ -19698,13 +27496,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" }, { - "$id": "2114", + "$id": "2919", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2115", + "$id": "2920", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19719,7 +27517,7 @@ ] }, { - "$id": "2116", + "$id": "2921", "kind": "model", "name": "CreateImageVariationRequest", "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", @@ -19727,13 +27525,13 @@ "decorators": [], "properties": [ { - "$id": "2117", + "$id": "2922", "kind": "property", "name": "image", "serializedName": "image", "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", "type": { - "$id": "2118", + "$id": "2923", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -19747,16 +27545,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" }, { - "$id": "2119", + "$id": "2924", "kind": "property", "name": "model", "serializedName": "model", "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { - "$id": "2120", + "$id": "2925", "kind": "nullable", "type": { - "$ref": "486" + "$ref": "675" } }, "optional": true, @@ -19766,16 +27564,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" }, { - "$id": "2121", + "$id": "2926", "kind": "property", "name": "n", "serializedName": "n", "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { - "$id": "2122", + "$id": "2927", "kind": "nullable", "type": { - "$id": "2123", + "$id": "2928", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19789,16 +27587,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" }, { - "$id": "2124", + "$id": "2929", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { - "$id": "2125", + "$id": "2930", "kind": "nullable", "type": { - "$ref": "490" + "$ref": "679" } }, "optional": true, @@ -19808,16 +27606,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" }, { - "$id": "2126", + "$id": "2931", "kind": "property", "name": "size", "serializedName": "size", "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { - "$id": "2127", + "$id": "2932", "kind": "nullable", "type": { - "$ref": "496" + "$ref": "685" } }, "optional": true, @@ -19827,13 +27625,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" }, { - "$id": "2128", + "$id": "2933", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2129", + "$id": "2934", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19848,7 +27646,7 @@ ] }, { - "$id": "2130", + "$id": "2935", "kind": "model", "name": "CreateFineTuningJobRequest", "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", @@ -19856,13 +27654,13 @@ "decorators": [], "properties": [ { - "$id": "2131", + "$id": "2936", "kind": "property", "name": "model", "serializedName": "model", "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", "type": { - "$ref": "504" + "$ref": "693" }, "optional": false, "readOnly": false, @@ -19871,13 +27669,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" }, { - "$id": "2132", + "$id": "2937", "kind": "property", "name": "training_file", "serializedName": "training_file", "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { - "$id": "2133", + "$id": "2938", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19890,13 +27688,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" }, { - "$id": "2134", + "$id": "2939", "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", "description": "The hyperparameters used for the fine-tuning job.", "type": { - "$id": "2135", + "$id": "2940", "kind": "model", "name": "CreateFineTuningJobRequestHyperparameters", "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", @@ -19904,21 +27702,21 @@ "decorators": [], "properties": [ { - "$id": "2136", + "$id": "2941", "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { - "$id": "2137", + "$id": "2942", "kind": "union", "name": "CreateFineTuningJobRequestHyperparametersNEpochs", "variantTypes": [ { - "$ref": "514" + "$ref": "703" }, { - "$id": "2138", + "$id": "2943", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19934,21 +27732,21 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" }, { - "$id": "2139", + "$id": "2944", "kind": "property", "name": "batch_size", "serializedName": "batch_size", "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { - "$id": "2140", + "$id": "2945", "kind": "union", "name": "CreateFineTuningJobRequestHyperparametersBatchSize", "variantTypes": [ { - "$ref": "518" + "$ref": "707" }, { - "$id": "2141", + "$id": "2946", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19964,21 +27762,21 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" }, { - "$id": "2142", + "$id": "2947", "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { - "$id": "2143", + "$id": "2948", "kind": "union", "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", "variantTypes": [ { - "$ref": "522" + "$ref": "711" }, { - "$id": "2144", + "$id": "2949", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -20002,16 +27800,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" }, { - "$id": "2145", + "$id": "2950", "kind": "property", "name": "suffix", "serializedName": "suffix", "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", "type": { - "$id": "2146", + "$id": "2951", "kind": "nullable", "type": { - "$id": "2147", + "$id": "2952", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20025,16 +27823,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" }, { - "$id": "2148", + "$id": "2953", "kind": "property", "name": "validation_file", "serializedName": "validation_file", "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { - "$id": "2149", + "$id": "2954", "kind": "nullable", "type": { - "$id": "2150", + "$id": "2955", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20048,32 +27846,32 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" }, { - "$id": "2151", + "$id": "2956", "kind": "property", "name": "integrations", "serializedName": "integrations", "description": "A list of integrations to enable for your fine-tuning job.", "type": { - "$id": "2152", + "$id": "2957", "kind": "nullable", "type": { - "$id": "2153", + "$id": "2958", "kind": "array", "name": "CreateFineTuningJobRequestIntegrations", "valueType": { - "$id": "2154", + "$id": "2959", "kind": "model", "name": "CreateFineTuningJobRequestIntegration", "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", "usage": "Input,Json", "decorators": [], "discriminatorProperty": { - "$id": "2155", + "$id": "2960", "kind": "property", "name": "type", "serializedName": "type", "type": { - "$id": "2156", + "$id": "2961", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20087,13 +27885,13 @@ }, "properties": [ { - "$ref": "2155" + "$ref": "2960" } ], "discriminatedSubtypes": { - "$id": "2157", + "$id": "2962", "wandb": { - "$id": "2158", + "$id": "2963", "kind": "model", "name": "CreateFineTuningJobRequestWandbIntegration", "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", @@ -20101,19 +27899,19 @@ "discriminatorValue": "wandb", "decorators": [], "baseModel": { - "$ref": "2154" + "$ref": "2959" }, "properties": [ { - "$id": "2159", + "$id": "2964", "kind": "property", "name": "type", "serializedName": "type", "type": { - "$id": "2160", + "$id": "2965", "kind": "constant", "valueType": { - "$id": "2161", + "$id": "2966", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20129,12 +27927,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" }, { - "$id": "2162", + "$id": "2967", "kind": "property", "name": "wandb", "serializedName": "wandb", "type": { - "$id": "2163", + "$id": "2968", "kind": "model", "name": "CreateFineTuningJobRequestWandbIntegrationWandb", "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", @@ -20142,12 +27940,12 @@ "decorators": [], "properties": [ { - "$id": "2164", + "$id": "2969", "kind": "property", "name": "project", "serializedName": "project", "type": { - "$id": "2165", + "$id": "2970", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20160,15 +27958,15 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" }, { - "$id": "2166", + "$id": "2971", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "2167", + "$id": "2972", "kind": "nullable", "type": { - "$id": "2168", + "$id": "2973", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20182,15 +27980,15 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" }, { - "$id": "2169", + "$id": "2974", "kind": "property", "name": "entity", "serializedName": "entity", "type": { - "$id": "2170", + "$id": "2975", "kind": "nullable", "type": { - "$id": "2171", + "$id": "2976", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20204,16 +28002,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" }, { - "$id": "2172", + "$id": "2977", "kind": "property", "name": "tags", "serializedName": "tags", "type": { - "$id": "2173", + "$id": "2978", "kind": "array", "name": "Array", "valueType": { - "$id": "2174", + "$id": "2979", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20251,16 +28049,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" }, { - "$id": "2175", + "$id": "2980", "kind": "property", "name": "seed", "serializedName": "seed", "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", "type": { - "$id": "2176", + "$id": "2981", "kind": "nullable", "type": { - "$id": "2177", + "$id": "2982", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20276,19 +28074,19 @@ ] }, { - "$ref": "2135" + "$ref": "2940" }, { - "$ref": "2154" + "$ref": "2959" }, { - "$ref": "2158" + "$ref": "2963" }, { - "$ref": "2163" + "$ref": "2968" }, { - "$id": "2178", + "$id": "2983", "kind": "model", "name": "FineTuningJob", "crossLanguageDefinitionId": "OpenAI.FineTuningJob", @@ -20297,16 +28095,16 @@ "decorators": [], "properties": [ { - "$id": "2179", + "$id": "2984", "kind": "property", "name": "user_provided_suffix", "serializedName": "user_provided_suffix", "description": "The descriptive suffix applied to the job, as specified in the job creation request.", "type": { - "$id": "2180", + "$id": "2985", "kind": "nullable", "type": { - "$id": "2181", + "$id": "2986", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20320,13 +28118,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" }, { - "$id": "2182", + "$id": "2987", "kind": "property", "name": "id", "serializedName": "id", "description": "The object identifier, which can be referenced in the API endpoints.", "type": { - "$id": "2183", + "$id": "2988", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20339,18 +28137,18 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" }, { - "$id": "2184", + "$id": "2989", "kind": "property", "name": "created_at", "serializedName": "created_at", "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "type": { - "$id": "2185", + "$id": "2990", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2186", + "$id": "2991", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20366,16 +28164,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" }, { - "$id": "2187", + "$id": "2992", "kind": "property", "name": "error", "serializedName": "error", "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", "type": { - "$id": "2188", + "$id": "2993", "kind": "nullable", "type": { - "$id": "2189", + "$id": "2994", "kind": "model", "name": "FineTuningJobError", "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", @@ -20383,13 +28181,13 @@ "decorators": [], "properties": [ { - "$id": "2190", + "$id": "2995", "kind": "property", "name": "code", "serializedName": "code", "description": "A machine-readable error code.", "type": { - "$id": "2191", + "$id": "2996", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20402,13 +28200,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" }, { - "$id": "2192", + "$id": "2997", "kind": "property", "name": "message", "serializedName": "message", "description": "A human-readable error message.", "type": { - "$id": "2193", + "$id": "2998", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20421,16 +28219,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" }, { - "$id": "2194", + "$id": "2999", "kind": "property", "name": "param", "serializedName": "param", "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", "type": { - "$id": "2195", + "$id": "3000", "kind": "nullable", "type": { - "$id": "2196", + "$id": "3001", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20453,16 +28251,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" }, { - "$id": "2197", + "$id": "3002", "kind": "property", "name": "fine_tuned_model", "serializedName": "fine_tuned_model", "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", "type": { - "$id": "2198", + "$id": "3003", "kind": "nullable", "type": { - "$id": "2199", + "$id": "3004", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20476,21 +28274,21 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" }, { - "$id": "2200", + "$id": "3005", "kind": "property", "name": "finished_at", "serializedName": "finished_at", "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", "type": { - "$id": "2201", + "$id": "3006", "kind": "nullable", "type": { - "$id": "2202", + "$id": "3007", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2203", + "$id": "3008", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20507,13 +28305,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" }, { - "$id": "2204", + "$id": "3009", "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { - "$id": "2205", + "$id": "3010", "kind": "model", "name": "FineTuningJobHyperparameters", "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", @@ -20521,21 +28319,21 @@ "decorators": [], "properties": [ { - "$id": "2206", + "$id": "3011", "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { - "$id": "2207", + "$id": "3012", "kind": "union", "name": "FineTuningJobHyperparametersNEpochs", "variantTypes": [ { - "$ref": "526" + "$ref": "715" }, { - "$id": "2208", + "$id": "3013", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20551,21 +28349,21 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" }, { - "$id": "2209", + "$id": "3014", "kind": "property", "name": "batch_size", "serializedName": "batch_size", "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { - "$id": "2210", + "$id": "3015", "kind": "union", "name": "FineTuningJobHyperparametersBatchSize", "variantTypes": [ { - "$ref": "530" + "$ref": "719" }, { - "$id": "2211", + "$id": "3016", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20581,21 +28379,21 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" }, { - "$id": "2212", + "$id": "3017", "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { - "$id": "2213", + "$id": "3018", "kind": "union", "name": "FineTuningJobHyperparametersLearningRateMultiplier", "variantTypes": [ { - "$ref": "534" + "$ref": "723" }, { - "$id": "2214", + "$id": "3019", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -20619,13 +28417,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" }, { - "$id": "2215", + "$id": "3020", "kind": "property", "name": "model", "serializedName": "model", "description": "The base model that is being fine-tuned.", "type": { - "$id": "2216", + "$id": "3021", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20638,16 +28436,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" }, { - "$id": "2217", + "$id": "3022", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"fine_tuning.job\".", "type": { - "$id": "2218", + "$id": "3023", "kind": "constant", "valueType": { - "$ref": "538" + "$ref": "727" }, "value": "fine_tuning.job", "decorators": [] @@ -20659,13 +28457,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" }, { - "$id": "2219", + "$id": "3024", "kind": "property", "name": "organization_id", "serializedName": "organization_id", "description": "The organization that owns the fine-tuning job.", "type": { - "$id": "2220", + "$id": "3025", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20678,17 +28476,17 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" }, { - "$id": "2221", + "$id": "3026", "kind": "property", "name": "result_files", "serializedName": "result_files", "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { - "$id": "2222", + "$id": "3027", "kind": "array", "name": "Array", "valueType": { - "$id": "2223", + "$id": "3028", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20704,13 +28502,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" }, { - "$id": "2224", + "$id": "3029", "kind": "property", "name": "status", "serializedName": "status", "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", "type": { - "$ref": "541" + "$ref": "730" }, "optional": false, "readOnly": false, @@ -20719,16 +28517,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" }, { - "$id": "2225", + "$id": "3030", "kind": "property", "name": "trained_tokens", "serializedName": "trained_tokens", "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", "type": { - "$id": "2226", + "$id": "3031", "kind": "nullable", "type": { - "$id": "2227", + "$id": "3032", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -20742,13 +28540,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" }, { - "$id": "2228", + "$id": "3033", "kind": "property", "name": "training_file", "serializedName": "training_file", "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { - "$id": "2229", + "$id": "3034", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20761,16 +28559,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" }, { - "$id": "2230", + "$id": "3035", "kind": "property", "name": "validation_file", "serializedName": "validation_file", "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { - "$id": "2231", + "$id": "3036", "kind": "nullable", "type": { - "$id": "2232", + "$id": "3037", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20784,32 +28582,32 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" }, { - "$id": "2233", + "$id": "3038", "kind": "property", "name": "integrations", "serializedName": "integrations", "description": "A list of integrations to enable for this fine-tuning job.", "type": { - "$id": "2234", + "$id": "3039", "kind": "nullable", "type": { - "$id": "2235", + "$id": "3040", "kind": "array", "name": "FineTuningJobIntegrations", "valueType": { - "$id": "2236", + "$id": "3041", "kind": "model", "name": "FineTuningIntegration", "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", "usage": "Output,Json", "decorators": [], "discriminatorProperty": { - "$id": "2237", + "$id": "3042", "kind": "property", "name": "type", "serializedName": "type", "type": { - "$id": "2238", + "$id": "3043", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20823,13 +28621,13 @@ }, "properties": [ { - "$ref": "2237" + "$ref": "3042" } ], "discriminatedSubtypes": { - "$id": "2239", + "$id": "3044", "wandb": { - "$id": "2240", + "$id": "3045", "kind": "model", "name": "FineTuningIntegrationWandb", "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", @@ -20837,20 +28635,20 @@ "discriminatorValue": "wandb", "decorators": [], "baseModel": { - "$ref": "2236" + "$ref": "3041" }, "properties": [ { - "$id": "2241", + "$id": "3046", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the integration being enabled for the fine-tuning job", "type": { - "$id": "2242", + "$id": "3047", "kind": "constant", "valueType": { - "$id": "2243", + "$id": "3048", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20866,13 +28664,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" }, { - "$id": "2244", + "$id": "3049", "kind": "property", "name": "wandb", "serializedName": "wandb", "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", "type": { - "$id": "2245", + "$id": "3050", "kind": "model", "name": "FineTuningIntegrationWandbWandb", "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", @@ -20880,13 +28678,13 @@ "decorators": [], "properties": [ { - "$id": "2246", + "$id": "3051", "kind": "property", "name": "project", "serializedName": "project", "description": "The name of the project that the new run will be created under.", "type": { - "$id": "2247", + "$id": "3052", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20899,16 +28697,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" }, { - "$id": "2248", + "$id": "3053", "kind": "property", "name": "name", "serializedName": "name", "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", "type": { - "$id": "2249", + "$id": "3054", "kind": "nullable", "type": { - "$id": "2250", + "$id": "3055", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20922,16 +28720,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" }, { - "$id": "2251", + "$id": "3056", "kind": "property", "name": "entity", "serializedName": "entity", "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", "type": { - "$id": "2252", + "$id": "3057", "kind": "nullable", "type": { - "$id": "2253", + "$id": "3058", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20945,17 +28743,17 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" }, { - "$id": "2254", + "$id": "3059", "kind": "property", "name": "tags", "serializedName": "tags", "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", "type": { - "$id": "2255", + "$id": "3060", "kind": "array", "name": "Array", "valueType": { - "$id": "2256", + "$id": "3061", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20993,13 +28791,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" }, { - "$id": "2257", + "$id": "3062", "kind": "property", "name": "seed", "serializedName": "seed", "description": "The seed used for the fine-tuning job.", "type": { - "$id": "2258", + "$id": "3063", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21012,21 +28810,21 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" }, { - "$id": "2259", + "$id": "3064", "kind": "property", "name": "estimated_finish", "serializedName": "estimated_finish", "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", "type": { - "$id": "2260", + "$id": "3065", "kind": "nullable", "type": { - "$id": "2261", + "$id": "3066", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2262", + "$id": "3067", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21045,22 +28843,22 @@ ] }, { - "$ref": "2189" + "$ref": "2994" }, { - "$ref": "2205" + "$ref": "3010" }, { - "$ref": "2236" + "$ref": "3041" }, { - "$ref": "2240" + "$ref": "3045" }, { - "$ref": "2245" + "$ref": "3050" }, { - "$id": "2263", + "$id": "3068", "kind": "model", "name": "ListPaginatedFineTuningJobsResponse", "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", @@ -21068,16 +28866,16 @@ "decorators": [], "properties": [ { - "$id": "2264", + "$id": "3069", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2265", + "$id": "3070", "kind": "array", "name": "ArrayFineTuningJob", "valueType": { - "$ref": "2178" + "$ref": "2983" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -21089,12 +28887,12 @@ "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" }, { - "$id": "2266", + "$id": "3071", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2267", + "$id": "3072", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -21107,15 +28905,15 @@ "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" }, { - "$id": "2268", + "$id": "3073", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2269", + "$id": "3074", "kind": "constant", "valueType": { - "$ref": "555" + "$ref": "744" }, "value": "list", "decorators": [] @@ -21129,7 +28927,7 @@ ] }, { - "$id": "2270", + "$id": "3075", "kind": "model", "name": "ListFineTuningJobCheckpointsResponse", "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", @@ -21137,16 +28935,16 @@ "decorators": [], "properties": [ { - "$id": "2271", + "$id": "3076", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2272", + "$id": "3077", "kind": "array", "name": "ArrayFineTuningJobCheckpoint", "valueType": { - "$id": "2273", + "$id": "3078", "kind": "model", "name": "FineTuningJobCheckpoint", "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", @@ -21155,13 +28953,13 @@ "decorators": [], "properties": [ { - "$id": "2274", + "$id": "3079", "kind": "property", "name": "id", "serializedName": "id", "description": "The checkpoint identifier, which can be referenced in the API endpoints.", "type": { - "$id": "2275", + "$id": "3080", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21174,18 +28972,18 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" }, { - "$id": "2276", + "$id": "3081", "kind": "property", "name": "created_at", "serializedName": "created_at", "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", "type": { - "$id": "2277", + "$id": "3082", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2278", + "$id": "3083", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21201,13 +28999,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" }, { - "$id": "2279", + "$id": "3084", "kind": "property", "name": "fine_tuned_model_checkpoint", "serializedName": "fine_tuned_model_checkpoint", "description": "The name of the fine-tuned checkpoint model that is created.", "type": { - "$id": "2280", + "$id": "3085", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21220,13 +29018,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" }, { - "$id": "2281", + "$id": "3086", "kind": "property", "name": "step_number", "serializedName": "step_number", "description": "The step number that the checkpoint was created at.", "type": { - "$id": "2282", + "$id": "3087", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21239,13 +29037,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" }, { - "$id": "2283", + "$id": "3088", "kind": "property", "name": "metrics", "serializedName": "metrics", "description": "Metrics at the step number during the fine-tuning job.", "type": { - "$id": "2284", + "$id": "3089", "kind": "model", "name": "FineTuningJobCheckpointMetrics", "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", @@ -21253,12 +29051,12 @@ "decorators": [], "properties": [ { - "$id": "2285", + "$id": "3090", "kind": "property", "name": "step", "serializedName": "step", "type": { - "$id": "2286", + "$id": "3091", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21271,12 +29069,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" }, { - "$id": "2287", + "$id": "3092", "kind": "property", "name": "train_loss", "serializedName": "train_loss", "type": { - "$id": "2288", + "$id": "3093", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21289,12 +29087,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" }, { - "$id": "2289", + "$id": "3094", "kind": "property", "name": "train_mean_token_accuracy", "serializedName": "train_mean_token_accuracy", "type": { - "$id": "2290", + "$id": "3095", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21307,12 +29105,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" }, { - "$id": "2291", + "$id": "3096", "kind": "property", "name": "valid_loss", "serializedName": "valid_loss", "type": { - "$id": "2292", + "$id": "3097", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21325,12 +29123,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" }, { - "$id": "2293", + "$id": "3098", "kind": "property", "name": "valid_mean_token_accuracy", "serializedName": "valid_mean_token_accuracy", "type": { - "$id": "2294", + "$id": "3099", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21343,12 +29141,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" }, { - "$id": "2295", + "$id": "3100", "kind": "property", "name": "full_valid_loss", "serializedName": "full_valid_loss", "type": { - "$id": "2296", + "$id": "3101", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21361,12 +29159,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" }, { - "$id": "2297", + "$id": "3102", "kind": "property", "name": "full_valid_mean_token_accuracy", "serializedName": "full_valid_mean_token_accuracy", "type": { - "$id": "2298", + "$id": "3103", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -21387,13 +29185,13 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" }, { - "$id": "2299", + "$id": "3104", "kind": "property", "name": "fine_tuning_job_id", "serializedName": "fine_tuning_job_id", "description": "The name of the fine-tuning job that this checkpoint was created from.", "type": { - "$id": "2300", + "$id": "3105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21406,16 +29204,16 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" }, { - "$id": "2301", + "$id": "3106", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", "type": { - "$id": "2302", + "$id": "3107", "kind": "constant", "valueType": { - "$ref": "558" + "$ref": "747" }, "value": "fine_tuning.job.checkpoint", "decorators": [] @@ -21438,15 +29236,15 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" }, { - "$id": "2303", + "$id": "3108", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2304", + "$id": "3109", "kind": "constant", "valueType": { - "$ref": "561" + "$ref": "750" }, "value": "list", "decorators": [] @@ -21458,15 +29256,15 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" }, { - "$id": "2305", + "$id": "3110", "kind": "property", "name": "first_id", "serializedName": "first_id", "type": { - "$id": "2306", + "$id": "3111", "kind": "nullable", "type": { - "$id": "2307", + "$id": "3112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21480,15 +29278,15 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" }, { - "$id": "2308", + "$id": "3113", "kind": "property", "name": "last_id", "serializedName": "last_id", "type": { - "$id": "2309", + "$id": "3114", "kind": "nullable", "type": { - "$id": "2310", + "$id": "3115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21502,12 +29300,12 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" }, { - "$id": "2311", + "$id": "3116", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2312", + "$id": "3117", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -21522,13 +29320,13 @@ ] }, { - "$ref": "2273" + "$ref": "3078" }, { - "$ref": "2284" + "$ref": "3089" }, { - "$id": "2313", + "$id": "3118", "kind": "model", "name": "ListFineTuningJobEventsResponse", "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", @@ -21536,12 +29334,12 @@ "decorators": [], "properties": [ { - "$id": "2314", + "$id": "3119", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2315", + "$id": "3120", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -21554,16 +29352,16 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" }, { - "$id": "2316", + "$id": "3121", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2317", + "$id": "3122", "kind": "array", "name": "ArrayFineTuningJobEvent", "valueType": { - "$id": "2318", + "$id": "3123", "kind": "model", "name": "FineTuningJobEvent", "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", @@ -21572,12 +29370,12 @@ "decorators": [], "properties": [ { - "$id": "2319", + "$id": "3124", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "2320", + "$id": "3125", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21590,17 +29388,17 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" }, { - "$id": "2321", + "$id": "3126", "kind": "property", "name": "created_at", "serializedName": "created_at", "type": { - "$id": "2322", + "$id": "3127", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2323", + "$id": "3128", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21616,12 +29414,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" }, { - "$id": "2324", + "$id": "3129", "kind": "property", "name": "level", "serializedName": "level", "type": { - "$ref": "564" + "$ref": "753" }, "optional": false, "readOnly": false, @@ -21630,12 +29428,12 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" }, { - "$id": "2325", + "$id": "3130", "kind": "property", "name": "message", "serializedName": "message", "type": { - "$id": "2326", + "$id": "3131", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21648,15 +29446,15 @@ "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" }, { - "$id": "2327", + "$id": "3132", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2328", + "$id": "3133", "kind": "constant", "valueType": { - "$ref": "572" + "$ref": "761" }, "value": "fine_tuning.job.event", "decorators": [] @@ -21679,15 +29477,15 @@ "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" }, { - "$id": "2329", + "$id": "3134", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2330", + "$id": "3135", "kind": "constant", "valueType": { - "$ref": "575" + "$ref": "764" }, "value": "list", "decorators": [] @@ -21701,10 +29499,10 @@ ] }, { - "$ref": "2318" + "$ref": "3123" }, { - "$id": "2331", + "$id": "3136", "kind": "model", "name": "CreateFileRequest", "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", @@ -21712,13 +29510,13 @@ "decorators": [], "properties": [ { - "$id": "2332", + "$id": "3137", "kind": "property", "name": "file", "serializedName": "file", "description": "The File object (not file name) to be uploaded.", "type": { - "$id": "2333", + "$id": "3138", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -21732,13 +29530,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" }, { - "$id": "2334", + "$id": "3139", "kind": "property", "name": "purpose", "serializedName": "purpose", "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", "type": { - "$ref": "578" + "$ref": "767" }, "optional": false, "readOnly": false, @@ -21749,7 +29547,7 @@ ] }, { - "$id": "2335", + "$id": "3140", "kind": "model", "name": "ListFilesResponse", "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", @@ -21757,16 +29555,16 @@ "decorators": [], "properties": [ { - "$id": "2336", + "$id": "3141", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2337", + "$id": "3142", "kind": "array", "name": "ArrayOpenAiFile", "valueType": { - "$ref": "1086" + "$ref": "1275" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -21778,15 +29576,15 @@ "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" }, { - "$id": "2338", + "$id": "3143", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2339", + "$id": "3144", "kind": "constant", "valueType": { - "$ref": "588" + "$ref": "777" }, "value": "list", "decorators": [] @@ -21800,7 +29598,7 @@ ] }, { - "$id": "2340", + "$id": "3145", "kind": "model", "name": "DeleteFileResponse", "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", @@ -21808,12 +29606,12 @@ "decorators": [], "properties": [ { - "$id": "2341", + "$id": "3146", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "2342", + "$id": "3147", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21826,15 +29624,15 @@ "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" }, { - "$id": "2343", + "$id": "3148", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2344", + "$id": "3149", "kind": "constant", "valueType": { - "$ref": "591" + "$ref": "780" }, "value": "file", "decorators": [] @@ -21846,12 +29644,12 @@ "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" }, { - "$id": "2345", + "$id": "3150", "kind": "property", "name": "deleted", "serializedName": "deleted", "type": { - "$id": "2346", + "$id": "3151", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -21866,7 +29664,7 @@ ] }, { - "$id": "2347", + "$id": "3152", "kind": "model", "name": "CreateEmbeddingRequest", "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", @@ -21874,29 +29672,29 @@ "decorators": [], "properties": [ { - "$id": "2348", + "$id": "3153", "kind": "property", "name": "input", "serializedName": "input", "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { - "$id": "2349", + "$id": "3154", "kind": "union", "name": "CreateEmbeddingRequestInput", "variantTypes": [ { - "$id": "2350", + "$id": "3155", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2351", + "$id": "3156", "kind": "array", "name": "Array", "valueType": { - "$id": "2352", + "$id": "3157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21906,11 +29704,11 @@ "decorators": [] }, { - "$id": "2353", + "$id": "3158", "kind": "array", "name": "Array", "valueType": { - "$id": "2354", + "$id": "3159", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21920,15 +29718,15 @@ "decorators": [] }, { - "$id": "2355", + "$id": "3160", "kind": "array", "name": "ArrayArray", "valueType": { - "$id": "2356", + "$id": "3161", "kind": "array", "name": "Array", "valueType": { - "$id": "2357", + "$id": "3162", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21950,13 +29748,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" }, { - "$id": "2358", + "$id": "3163", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { - "$ref": "594" + "$ref": "783" }, "optional": false, "readOnly": false, @@ -21965,13 +29763,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" }, { - "$id": "2359", + "$id": "3164", "kind": "property", "name": "encoding_format", "serializedName": "encoding_format", "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", "type": { - "$ref": "602" + "$ref": "791" }, "optional": true, "readOnly": false, @@ -21980,13 +29778,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" }, { - "$id": "2360", + "$id": "3165", "kind": "property", "name": "dimensions", "serializedName": "dimensions", "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", "type": { - "$id": "2361", + "$id": "3166", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21999,13 +29797,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" }, { - "$id": "2362", + "$id": "3167", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2363", + "$id": "3168", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22020,7 +29818,7 @@ ] }, { - "$id": "2364", + "$id": "3169", "kind": "model", "name": "CreateEmbeddingResponse", "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", @@ -22028,17 +29826,17 @@ "decorators": [], "properties": [ { - "$id": "2365", + "$id": "3170", "kind": "property", "name": "data", "serializedName": "data", "description": "The list of embeddings generated by the model.", "type": { - "$id": "2366", + "$id": "3171", "kind": "array", "name": "ArrayEmbedding", "valueType": { - "$id": "2367", + "$id": "3172", "kind": "model", "name": "Embedding", "crossLanguageDefinitionId": "OpenAI.Embedding", @@ -22047,13 +29845,13 @@ "decorators": [], "properties": [ { - "$id": "2368", + "$id": "3173", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the embedding in the list of embeddings.", "type": { - "$id": "2369", + "$id": "3174", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22066,22 +29864,22 @@ "crossLanguageDefinitionId": "OpenAI.Embedding.index" }, { - "$id": "2370", + "$id": "3175", "kind": "property", "name": "embedding", "serializedName": "embedding", "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", "type": { - "$id": "2371", + "$id": "3176", "kind": "union", "name": "EmbeddingEmbedding", "variantTypes": [ { - "$id": "2372", + "$id": "3177", "kind": "array", "name": "Array", "valueType": { - "$id": "2373", + "$id": "3178", "kind": "float", "name": "float", "crossLanguageDefinitionId": "TypeSpec.float", @@ -22091,7 +29889,7 @@ "decorators": [] }, { - "$id": "2374", + "$id": "3179", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22107,16 +29905,16 @@ "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" }, { - "$id": "2375", + "$id": "3180", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"embedding\".", "type": { - "$id": "2376", + "$id": "3181", "kind": "constant", "valueType": { - "$ref": "608" + "$ref": "797" }, "value": "embedding", "decorators": [] @@ -22139,13 +29937,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" }, { - "$id": "2377", + "$id": "3182", "kind": "property", "name": "model", "serializedName": "model", "description": "The name of the model used to generate the embedding.", "type": { - "$id": "2378", + "$id": "3183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22158,16 +29956,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" }, { - "$id": "2379", + "$id": "3184", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"list\".", "type": { - "$id": "2380", + "$id": "3185", "kind": "constant", "valueType": { - "$ref": "611" + "$ref": "800" }, "value": "list", "decorators": [] @@ -22179,13 +29977,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" }, { - "$id": "2381", + "$id": "3186", "kind": "property", "name": "usage", "serializedName": "usage", "description": "The usage information for the request.", "type": { - "$id": "2382", + "$id": "3187", "kind": "model", "name": "CreateEmbeddingResponseUsage", "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", @@ -22193,13 +29991,13 @@ "decorators": [], "properties": [ { - "$id": "2383", + "$id": "3188", "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", "description": "The number of tokens used by the prompt.", "type": { - "$id": "2384", + "$id": "3189", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22212,13 +30010,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" }, { - "$id": "2385", + "$id": "3190", "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", "description": "The total number of tokens used by the request.", "type": { - "$id": "2386", + "$id": "3191", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22241,13 +30039,13 @@ ] }, { - "$ref": "2367" + "$ref": "3172" }, { - "$ref": "2382" + "$ref": "3187" }, { - "$id": "2387", + "$id": "3192", "kind": "model", "name": "CreateCompletionRequest", "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", @@ -22255,13 +30053,13 @@ "decorators": [], "properties": [ { - "$id": "2388", + "$id": "3193", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { - "$ref": "614" + "$ref": "803" }, "optional": false, "readOnly": false, @@ -22270,32 +30068,32 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" }, { - "$id": "2389", + "$id": "3194", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", "type": { - "$id": "2390", + "$id": "3195", "kind": "nullable", "type": { - "$id": "2391", + "$id": "3196", "kind": "union", "name": "CreateCompletionRequestPrompt", "variantTypes": [ { - "$id": "2392", + "$id": "3197", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2393", + "$id": "3198", "kind": "array", "name": "Array", "valueType": { - "$id": "2394", + "$id": "3199", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22305,11 +30103,11 @@ "decorators": [] }, { - "$id": "2395", + "$id": "3200", "kind": "array", "name": "Array", "valueType": { - "$id": "2396", + "$id": "3201", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22319,15 +30117,15 @@ "decorators": [] }, { - "$id": "2397", + "$id": "3202", "kind": "array", "name": "ArrayArray", "valueType": { - "$id": "2398", + "$id": "3203", "kind": "array", "name": "Array", "valueType": { - "$id": "2399", + "$id": "3204", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22350,16 +30148,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" }, { - "$id": "2400", + "$id": "3205", "kind": "property", "name": "best_of", "serializedName": "best_of", "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { - "$id": "2401", + "$id": "3206", "kind": "nullable", "type": { - "$id": "2402", + "$id": "3207", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22373,16 +30171,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" }, { - "$id": "2403", + "$id": "3208", "kind": "property", "name": "echo", "serializedName": "echo", "description": "Echo back the prompt in addition to the completion", "type": { - "$id": "2404", + "$id": "3209", "kind": "nullable", "type": { - "$id": "2405", + "$id": "3210", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -22396,16 +30194,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" }, { - "$id": "2406", + "$id": "3211", "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { - "$id": "2407", + "$id": "3212", "kind": "nullable", "type": { - "$id": "2408", + "$id": "3213", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22419,26 +30217,26 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" }, { - "$id": "2409", + "$id": "3214", "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", "type": { - "$id": "2410", + "$id": "3215", "kind": "nullable", "type": { - "$id": "2411", + "$id": "3216", "kind": "dict", "keyType": { - "$id": "2412", + "$id": "3217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2413", + "$id": "3218", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22454,16 +30252,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" }, { - "$id": "2414", + "$id": "3219", "kind": "property", "name": "logprobs", "serializedName": "logprobs", "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", "type": { - "$id": "2415", + "$id": "3220", "kind": "nullable", "type": { - "$id": "2416", + "$id": "3221", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22477,16 +30275,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" }, { - "$id": "2417", + "$id": "3222", "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { - "$id": "2418", + "$id": "3223", "kind": "nullable", "type": { - "$id": "2419", + "$id": "3224", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22500,16 +30298,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" }, { - "$id": "2420", + "$id": "3225", "kind": "property", "name": "n", "serializedName": "n", "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { - "$id": "2421", + "$id": "3226", "kind": "nullable", "type": { - "$id": "2422", + "$id": "3227", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22523,16 +30321,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" }, { - "$id": "2423", + "$id": "3228", "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { - "$id": "2424", + "$id": "3229", "kind": "nullable", "type": { - "$id": "2425", + "$id": "3230", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22546,16 +30344,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" }, { - "$id": "2426", + "$id": "3231", "kind": "property", "name": "seed", "serializedName": "seed", "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { - "$id": "2427", + "$id": "3232", "kind": "nullable", "type": { - "$id": "2428", + "$id": "3233", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -22569,32 +30367,32 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" }, { - "$id": "2429", + "$id": "3234", "kind": "property", "name": "stop", "serializedName": "stop", "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", "type": { - "$id": "2430", + "$id": "3235", "kind": "nullable", "type": { - "$id": "2431", + "$id": "3236", "kind": "union", "name": "CreateCompletionRequestStop", "variantTypes": [ { - "$id": "2432", + "$id": "3237", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2433", + "$id": "3238", "kind": "array", "name": "Array", "valueType": { - "$id": "2434", + "$id": "3239", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22614,16 +30412,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" }, { - "$id": "2435", + "$id": "3240", "kind": "property", "name": "stream", "serializedName": "stream", "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { - "$id": "2436", + "$id": "3241", "kind": "nullable", "type": { - "$id": "2437", + "$id": "3242", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -22637,15 +30435,15 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" }, { - "$id": "2438", + "$id": "3243", "kind": "property", "name": "stream_options", "serializedName": "stream_options", "type": { - "$id": "2439", + "$id": "3244", "kind": "nullable", "type": { - "$id": "2440", + "$id": "3245", "kind": "model", "name": "ChatCompletionStreamOptions", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", @@ -22654,13 +30452,13 @@ "decorators": [], "properties": [ { - "$id": "2441", + "$id": "3246", "kind": "property", "name": "include_usage", "serializedName": "include_usage", "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", "type": { - "$id": "2442", + "$id": "3247", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -22682,16 +30480,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" }, { - "$id": "2443", + "$id": "3248", "kind": "property", "name": "suffix", "serializedName": "suffix", "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", "type": { - "$id": "2444", + "$id": "3249", "kind": "nullable", "type": { - "$id": "2445", + "$id": "3250", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22705,16 +30503,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" }, { - "$id": "2446", + "$id": "3251", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { - "$id": "2447", + "$id": "3252", "kind": "nullable", "type": { - "$id": "2448", + "$id": "3253", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22728,16 +30526,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" }, { - "$id": "2449", + "$id": "3254", "kind": "property", "name": "top_p", "serializedName": "top_p", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { - "$id": "2450", + "$id": "3255", "kind": "nullable", "type": { - "$id": "2451", + "$id": "3256", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22751,13 +30549,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" }, { - "$id": "2452", + "$id": "3257", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2453", + "$id": "3258", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22772,10 +30570,10 @@ ] }, { - "$ref": "2440" + "$ref": "3245" }, { - "$id": "2454", + "$id": "3259", "kind": "model", "name": "CreateCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", @@ -22784,13 +30582,13 @@ "decorators": [], "properties": [ { - "$id": "2455", + "$id": "3260", "kind": "property", "name": "id", "serializedName": "id", "description": "A unique identifier for the completion.", "type": { - "$id": "2456", + "$id": "3261", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22803,17 +30601,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" }, { - "$id": "2457", + "$id": "3262", "kind": "property", "name": "choices", "serializedName": "choices", "description": "The list of completion choices the model generated for the input prompt.", "type": { - "$id": "2458", + "$id": "3263", "kind": "array", "name": "Array", "valueType": { - "$id": "2459", + "$id": "3264", "kind": "model", "name": "CreateCompletionResponseChoice", "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", @@ -22821,13 +30619,13 @@ "decorators": [], "properties": [ { - "$id": "2460", + "$id": "3265", "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", "type": { - "$ref": "622" + "$ref": "811" }, "optional": false, "readOnly": false, @@ -22836,12 +30634,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" }, { - "$id": "2461", + "$id": "3266", "kind": "property", "name": "index", "serializedName": "index", "type": { - "$id": "2462", + "$id": "3267", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22854,15 +30652,15 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" }, { - "$id": "2463", + "$id": "3268", "kind": "property", "name": "logprobs", "serializedName": "logprobs", "type": { - "$id": "2464", + "$id": "3269", "kind": "nullable", "type": { - "$id": "2465", + "$id": "3270", "kind": "model", "name": "CreateCompletionResponseChoiceLogprobs", "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", @@ -22870,16 +30668,16 @@ "decorators": [], "properties": [ { - "$id": "2466", + "$id": "3271", "kind": "property", "name": "text_offset", "serializedName": "text_offset", "type": { - "$id": "2467", + "$id": "3272", "kind": "array", "name": "Array", "valueType": { - "$id": "2468", + "$id": "3273", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -22895,16 +30693,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" }, { - "$id": "2469", + "$id": "3274", "kind": "property", "name": "token_logprobs", "serializedName": "token_logprobs", "type": { - "$id": "2470", + "$id": "3275", "kind": "array", "name": "Array", "valueType": { - "$id": "2471", + "$id": "3276", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22920,16 +30718,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" }, { - "$id": "2472", + "$id": "3277", "kind": "property", "name": "tokens", "serializedName": "tokens", "type": { - "$id": "2473", + "$id": "3278", "kind": "array", "name": "Array", "valueType": { - "$id": "2474", + "$id": "3279", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22945,26 +30743,26 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" }, { - "$id": "2475", + "$id": "3280", "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", "type": { - "$id": "2476", + "$id": "3281", "kind": "array", "name": "ArrayRecord", "valueType": { - "$id": "2477", + "$id": "3282", "kind": "dict", "keyType": { - "$id": "2478", + "$id": "3283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2479", + "$id": "3284", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -22991,12 +30789,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" }, { - "$id": "2480", + "$id": "3285", "kind": "property", "name": "text", "serializedName": "text", "type": { - "$id": "2481", + "$id": "3286", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23020,18 +30818,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" }, { - "$id": "2482", + "$id": "3287", "kind": "property", "name": "created", "serializedName": "created", "description": "The Unix timestamp (in seconds) of when the completion was created.", "type": { - "$id": "2483", + "$id": "3288", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2484", + "$id": "3289", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -23047,13 +30845,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" }, { - "$id": "2485", + "$id": "3290", "kind": "property", "name": "model", "serializedName": "model", "description": "The model used for completion.", "type": { - "$id": "2486", + "$id": "3291", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23066,13 +30864,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" }, { - "$id": "2487", + "$id": "3292", "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { - "$id": "2488", + "$id": "3293", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23085,16 +30883,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" }, { - "$id": "2489", + "$id": "3294", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always \"text_completion\"", "type": { - "$id": "2490", + "$id": "3295", "kind": "constant", "valueType": { - "$ref": "630" + "$ref": "819" }, "value": "text_completion", "decorators": [] @@ -23106,12 +30904,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" }, { - "$id": "2491", + "$id": "3296", "kind": "property", "name": "usage", "serializedName": "usage", "type": { - "$id": "2492", + "$id": "3297", "kind": "model", "name": "CompletionUsage", "crossLanguageDefinitionId": "OpenAI.CompletionUsage", @@ -23120,13 +30918,13 @@ "decorators": [], "properties": [ { - "$id": "2493", + "$id": "3298", "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", "description": "Number of tokens in the generated completion.", "type": { - "$id": "2494", + "$id": "3299", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -23139,13 +30937,13 @@ "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" }, { - "$id": "2495", + "$id": "3300", "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", "description": "Number of tokens in the prompt.", "type": { - "$id": "2496", + "$id": "3301", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -23158,13 +30956,13 @@ "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" }, { - "$id": "2497", + "$id": "3302", "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", "description": "Total number of tokens used in the request (prompt + completion).", "type": { - "$id": "2498", + "$id": "3303", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -23177,13 +30975,13 @@ "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" }, { - "$id": "2499", + "$id": "3304", "kind": "property", "name": "completion_tokens_details", "serializedName": "completion_tokens_details", "description": "Breakdown of tokens used in a completion.", "type": { - "$id": "2500", + "$id": "3305", "kind": "model", "name": "CompletionUsageCompletionTokensDetails", "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", @@ -23191,13 +30989,13 @@ "decorators": [], "properties": [ { - "$id": "2501", + "$id": "3306", "kind": "property", "name": "reasoning_tokens", "serializedName": "reasoning_tokens", "description": "Tokens generated by the model for reasoning.", "type": { - "$id": "2502", + "$id": "3307", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -23228,19 +31026,19 @@ ] }, { - "$ref": "2459" + "$ref": "3264" }, { - "$ref": "2465" + "$ref": "3270" }, { - "$ref": "2492" + "$ref": "3297" }, { - "$ref": "2500" + "$ref": "3305" }, { - "$id": "2503", + "$id": "3308", "kind": "model", "name": "CreateChatCompletionRequest", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", @@ -23248,30 +31046,30 @@ "decorators": [], "properties": [ { - "$id": "2504", + "$id": "3309", "kind": "property", "name": "messages", "serializedName": "messages", "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", "type": { - "$id": "2505", + "$id": "3310", "kind": "array", "name": "ArrayChatCompletionRequestMessage", "valueType": { - "$id": "2506", + "$id": "3311", "kind": "model", "name": "ChatCompletionRequestMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", "usage": "Input,Json", "decorators": [], "discriminatorProperty": { - "$id": "2507", + "$id": "3312", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the author of this message.", "type": { - "$id": "2508", + "$id": "3313", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23285,13 +31083,13 @@ }, "properties": [ { - "$ref": "2507" + "$ref": "3312" } ], "discriminatedSubtypes": { - "$id": "2509", + "$id": "3314", "system": { - "$id": "2510", + "$id": "3315", "kind": "model", "name": "ChatCompletionRequestSystemMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", @@ -23299,38 +31097,38 @@ "discriminatorValue": "system", "decorators": [], "baseModel": { - "$ref": "2506" + "$ref": "3311" }, "properties": [ { - "$id": "2511", + "$id": "3316", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the system message.", "type": { - "$id": "2512", + "$id": "3317", "kind": "union", "name": "ChatCompletionRequestSystemMessageContent", "variantTypes": [ { - "$id": "2513", + "$id": "3318", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2514", + "$id": "3319", "kind": "array", "name": "ArrayChatCompletionRequestSystemMessageContentPart", "valueType": { - "$id": "2515", + "$id": "3320", "kind": "union", "name": "ChatCompletionRequestSystemMessageContentPart", "variantTypes": [ { - "$id": "2516", + "$id": "3321", "kind": "model", "name": "ChatCompletionRequestMessageContentPartText", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", @@ -23338,16 +31136,16 @@ "decorators": [], "properties": [ { - "$id": "2517", + "$id": "3322", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the content part.", "type": { - "$id": "2518", + "$id": "3323", "kind": "constant", "valueType": { - "$ref": "633" + "$ref": "822" }, "value": "text", "decorators": [] @@ -23359,13 +31157,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" }, { - "$id": "2519", + "$id": "3324", "kind": "property", "name": "text", "serializedName": "text", "description": "The text content.", "type": { - "$id": "2520", + "$id": "3325", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23395,16 +31193,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" }, { - "$id": "2521", + "$id": "3326", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the messages author, in this case `system`.", "type": { - "$id": "2522", + "$id": "3327", "kind": "constant", "valueType": { - "$id": "2523", + "$id": "3328", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23420,13 +31218,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" }, { - "$id": "2524", + "$id": "3329", "kind": "property", "name": "name", "serializedName": "name", "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { - "$id": "2525", + "$id": "3330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23441,7 +31239,7 @@ ] }, "user": { - "$id": "2526", + "$id": "3331", "kind": "model", "name": "ChatCompletionRequestUserMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", @@ -23449,41 +31247,41 @@ "discriminatorValue": "user", "decorators": [], "baseModel": { - "$ref": "2506" + "$ref": "3311" }, "properties": [ { - "$id": "2527", + "$id": "3332", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the user message.", "type": { - "$id": "2528", + "$id": "3333", "kind": "union", "name": "ChatCompletionRequestUserMessageContent", "variantTypes": [ { - "$id": "2529", + "$id": "3334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2530", + "$id": "3335", "kind": "array", "name": "ArrayChatCompletionRequestUserMessageContentPart", "valueType": { - "$id": "2531", + "$id": "3336", "kind": "union", "name": "ChatCompletionRequestUserMessageContentPart", "variantTypes": [ { - "$ref": "2516" + "$ref": "3321" }, { - "$id": "2532", + "$id": "3337", "kind": "model", "name": "ChatCompletionRequestMessageContentPartImage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", @@ -23491,16 +31289,16 @@ "decorators": [], "properties": [ { - "$id": "2533", + "$id": "3338", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the content part.", "type": { - "$id": "2534", + "$id": "3339", "kind": "constant", "valueType": { - "$ref": "636" + "$ref": "825" }, "value": "image_url", "decorators": [] @@ -23512,12 +31310,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" }, { - "$id": "2535", + "$id": "3340", "kind": "property", "name": "image_url", "serializedName": "image_url", "type": { - "$id": "2536", + "$id": "3341", "kind": "model", "name": "ChatCompletionRequestMessageContentPartImageImageUrl", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", @@ -23525,13 +31323,13 @@ "decorators": [], "properties": [ { - "$id": "2537", + "$id": "3342", "kind": "property", "name": "url", "serializedName": "url", "description": "Either a URL of the image or the base64 encoded image data.", "type": { - "$id": "2538", + "$id": "3343", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -23544,13 +31342,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" }, { - "$id": "2539", + "$id": "3344", "kind": "property", "name": "detail", "serializedName": "detail", "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", "type": { - "$ref": "639" + "$ref": "828" }, "optional": true, "readOnly": false, @@ -23584,16 +31382,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" }, { - "$id": "2540", + "$id": "3345", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the messages author, in this case `user`.", "type": { - "$id": "2541", + "$id": "3346", "kind": "constant", "valueType": { - "$id": "2542", + "$id": "3347", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23609,13 +31407,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" }, { - "$id": "2543", + "$id": "3348", "kind": "property", "name": "name", "serializedName": "name", "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { - "$id": "2544", + "$id": "3349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23630,7 +31428,7 @@ ] }, "assistant": { - "$id": "2545", + "$id": "3350", "kind": "model", "name": "ChatCompletionRequestAssistantMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", @@ -23638,44 +31436,44 @@ "discriminatorValue": "assistant", "decorators": [], "baseModel": { - "$ref": "2506" + "$ref": "3311" }, "properties": [ { - "$id": "2546", + "$id": "3351", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", "type": { - "$id": "2547", + "$id": "3352", "kind": "nullable", "type": { - "$id": "2548", + "$id": "3353", "kind": "union", "name": "ChatCompletionRequestAssistantMessageContent", "variantTypes": [ { - "$id": "2549", + "$id": "3354", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2550", + "$id": "3355", "kind": "array", "name": "ArrayChatCompletionRequestAssistantMessageContentPart", "valueType": { - "$id": "2551", + "$id": "3356", "kind": "union", "name": "ChatCompletionRequestAssistantMessageContentPart", "variantTypes": [ { - "$ref": "2516" + "$ref": "3321" }, { - "$id": "2552", + "$id": "3357", "kind": "model", "name": "ChatCompletionRequestMessageContentPartRefusal", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", @@ -23683,16 +31481,16 @@ "decorators": [], "properties": [ { - "$id": "2553", + "$id": "3358", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the content part.", "type": { - "$id": "2554", + "$id": "3359", "kind": "constant", "valueType": { - "$ref": "647" + "$ref": "836" }, "value": "refusal", "decorators": [] @@ -23704,13 +31502,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" }, { - "$id": "2555", + "$id": "3360", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "The refusal message generated by the model.", "type": { - "$id": "2556", + "$id": "3361", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23741,16 +31539,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" }, { - "$id": "2557", + "$id": "3362", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "The refusal message by the assistant.", "type": { - "$id": "2558", + "$id": "3363", "kind": "nullable", "type": { - "$id": "2559", + "$id": "3364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23764,16 +31562,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" }, { - "$id": "2560", + "$id": "3365", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the messages author, in this case `assistant`.", "type": { - "$id": "2561", + "$id": "3366", "kind": "constant", "valueType": { - "$id": "2562", + "$id": "3367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23789,13 +31587,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" }, { - "$id": "2563", + "$id": "3368", "kind": "property", "name": "name", "serializedName": "name", "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { - "$id": "2564", + "$id": "3369", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23808,16 +31606,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" }, { - "$id": "2565", + "$id": "3370", "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", "type": { - "$id": "2566", + "$id": "3371", "kind": "array", "name": "ChatCompletionMessageToolCalls", "valueType": { - "$id": "2567", + "$id": "3372", "kind": "model", "name": "ChatCompletionMessageToolCall", "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", @@ -23825,13 +31623,13 @@ "decorators": [], "properties": [ { - "$id": "2568", + "$id": "3373", "kind": "property", "name": "id", "serializedName": "id", "description": "The ID of the tool call.", "type": { - "$id": "2569", + "$id": "3374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23844,16 +31642,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" }, { - "$id": "2570", + "$id": "3375", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the tool. Currently, only `function` is supported.", "type": { - "$id": "2571", + "$id": "3376", "kind": "constant", "valueType": { - "$ref": "650" + "$ref": "839" }, "value": "function", "decorators": [] @@ -23865,13 +31663,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" }, { - "$id": "2572", + "$id": "3377", "kind": "property", "name": "function", "serializedName": "function", "description": "The function that the model called.", "type": { - "$id": "2573", + "$id": "3378", "kind": "model", "name": "ChatCompletionMessageToolCallFunction", "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", @@ -23879,13 +31677,13 @@ "decorators": [], "properties": [ { - "$id": "2574", + "$id": "3379", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to call.", "type": { - "$id": "2575", + "$id": "3380", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23898,13 +31696,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" }, { - "$id": "2576", + "$id": "3381", "kind": "property", "name": "arguments", "serializedName": "arguments", "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { - "$id": "2577", + "$id": "3382", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23936,16 +31734,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" }, { - "$id": "2578", + "$id": "3383", "kind": "property", "name": "function_call", "serializedName": "function_call", "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { - "$id": "2579", + "$id": "3384", "kind": "nullable", "type": { - "$id": "2580", + "$id": "3385", "kind": "model", "name": "ChatCompletionRequestAssistantMessageFunctionCall", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", @@ -23953,13 +31751,13 @@ "decorators": [], "properties": [ { - "$id": "2581", + "$id": "3386", "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", "type": { - "$id": "2582", + "$id": "3387", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23969,16 +31767,16 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" }, { - "$id": "2583", + "$id": "3388", "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { - "$id": "2584", + "$id": "3389", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23988,7 +31786,7 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" } ] } @@ -24002,7 +31800,7 @@ ] }, "tool": { - "$id": "2585", + "$id": "3390", "kind": "model", "name": "ChatCompletionRequestToolMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", @@ -24010,20 +31808,20 @@ "discriminatorValue": "tool", "decorators": [], "baseModel": { - "$ref": "2506" + "$ref": "3311" }, "properties": [ { - "$id": "2586", + "$id": "3391", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the messages author, in this case `tool`.", "type": { - "$id": "2587", + "$id": "3392", "kind": "constant", "valueType": { - "$id": "2588", + "$id": "3393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24039,34 +31837,34 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" }, { - "$id": "2589", + "$id": "3394", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the tool message.", "type": { - "$id": "2590", + "$id": "3395", "kind": "union", "name": "ChatCompletionRequestToolMessageContent", "variantTypes": [ { - "$id": "2591", + "$id": "3396", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2592", + "$id": "3397", "kind": "array", "name": "ArrayChatCompletionRequestToolMessageContentPart", "valueType": { - "$id": "2593", + "$id": "3398", "kind": "union", "name": "ChatCompletionRequestToolMessageContentPart", "variantTypes": [ { - "$ref": "2516" + "$ref": "3321" } ], "decorators": [] @@ -24084,13 +31882,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" }, { - "$id": "2594", + "$id": "3399", "kind": "property", "name": "tool_call_id", "serializedName": "tool_call_id", "description": "Tool call that this message is responding to.", "type": { - "$id": "2595", + "$id": "3400", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24105,7 +31903,7 @@ ] }, "function": { - "$id": "2596", + "$id": "3401", "kind": "model", "name": "ChatCompletionRequestFunctionMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", @@ -24114,20 +31912,20 @@ "discriminatorValue": "function", "decorators": [], "baseModel": { - "$ref": "2506" + "$ref": "3311" }, "properties": [ { - "$id": "2597", + "$id": "3402", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the messages author, in this case `function`.", "type": { - "$id": "2598", + "$id": "3403", "kind": "constant", "valueType": { - "$id": "2599", + "$id": "3404", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24143,16 +31941,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" }, { - "$id": "2600", + "$id": "3405", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the function message.", "type": { - "$id": "2601", + "$id": "3406", "kind": "nullable", "type": { - "$id": "2602", + "$id": "3407", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24166,13 +31964,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" }, { - "$id": "2603", + "$id": "3408", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to call.", "type": { - "$id": "2604", + "$id": "3409", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24198,13 +31996,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" }, { - "$id": "2605", + "$id": "3410", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", "type": { - "$ref": "653" + "$ref": "842" }, "optional": false, "readOnly": false, @@ -24213,16 +32011,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" }, { - "$id": "2606", + "$id": "3411", "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { - "$id": "2607", + "$id": "3412", "kind": "nullable", "type": { - "$id": "2608", + "$id": "3413", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -24236,26 +32034,26 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" }, { - "$id": "2609", + "$id": "3414", "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", "type": { - "$id": "2610", + "$id": "3415", "kind": "nullable", "type": { - "$id": "2611", + "$id": "3416", "kind": "dict", "keyType": { - "$id": "2612", + "$id": "3417", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2613", + "$id": "3418", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -24271,16 +32069,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" }, { - "$id": "2614", + "$id": "3419", "kind": "property", "name": "logprobs", "serializedName": "logprobs", "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", "type": { - "$id": "2615", + "$id": "3420", "kind": "nullable", "type": { - "$id": "2616", + "$id": "3421", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -24294,16 +32092,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" }, { - "$id": "2617", + "$id": "3422", "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", "type": { - "$id": "2618", + "$id": "3423", "kind": "nullable", "type": { - "$id": "2619", + "$id": "3424", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -24317,16 +32115,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" }, { - "$id": "2620", + "$id": "3425", "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", "type": { - "$id": "2621", + "$id": "3426", "kind": "nullable", "type": { - "$id": "2622", + "$id": "3427", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -24340,16 +32138,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" }, { - "$id": "2623", + "$id": "3428", "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", "type": { - "$id": "2624", + "$id": "3429", "kind": "nullable", "type": { - "$id": "2625", + "$id": "3430", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -24363,16 +32161,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" }, { - "$id": "2626", + "$id": "3431", "kind": "property", "name": "n", "serializedName": "n", "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", "type": { - "$id": "2627", + "$id": "3432", "kind": "nullable", "type": { - "$id": "2628", + "$id": "3433", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -24386,16 +32184,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" }, { - "$id": "2629", + "$id": "3434", "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { - "$id": "2630", + "$id": "3435", "kind": "nullable", "type": { - "$id": "2631", + "$id": "3436", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -24409,25 +32207,25 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" }, { - "$id": "2632", + "$id": "3437", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", "type": { - "$id": "2633", + "$id": "3438", "kind": "model", "name": "ChatResponseFormat", "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", "usage": "Input,Json", "decorators": [], "discriminatorProperty": { - "$id": "2634", + "$id": "3439", "kind": "property", "name": "type", "serializedName": "type", "type": { - "$id": "2635", + "$id": "3440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24441,13 +32239,13 @@ }, "properties": [ { - "$ref": "2634" + "$ref": "3439" } ], "discriminatedSubtypes": { - "$id": "2636", + "$id": "3441", "text": { - "$id": "2637", + "$id": "3442", "kind": "model", "name": "ChatResponseFormatText", "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", @@ -24455,20 +32253,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "2633" + "$ref": "3438" }, "properties": [ { - "$id": "2638", + "$id": "3443", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `text`", "type": { - "$id": "2639", + "$id": "3444", "kind": "constant", "valueType": { - "$id": "2640", + "$id": "3445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24486,7 +32284,7 @@ ] }, "json_object": { - "$id": "2641", + "$id": "3446", "kind": "model", "name": "ChatResponseFormatJsonObject", "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", @@ -24494,20 +32292,20 @@ "discriminatorValue": "json_object", "decorators": [], "baseModel": { - "$ref": "2633" + "$ref": "3438" }, "properties": [ { - "$id": "2642", + "$id": "3447", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `json_object`", "type": { - "$id": "2643", + "$id": "3448", "kind": "constant", "valueType": { - "$id": "2644", + "$id": "3449", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24525,7 +32323,7 @@ ] }, "json_schema": { - "$id": "2645", + "$id": "3450", "kind": "model", "name": "ChatResponseFormatJsonSchema", "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", @@ -24534,20 +32332,20 @@ "discriminatorValue": "json_schema", "decorators": [], "baseModel": { - "$ref": "2633" + "$ref": "3438" }, "properties": [ { - "$id": "2646", + "$id": "3451", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `json_schema`", "type": { - "$id": "2647", + "$id": "3452", "kind": "constant", "valueType": { - "$id": "2648", + "$id": "3453", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24563,12 +32361,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" }, { - "$id": "2649", + "$id": "3454", "kind": "property", "name": "json_schema", "serializedName": "json_schema", "type": { - "$ref": "1504" + "$ref": "1693" }, "optional": false, "readOnly": false, @@ -24587,16 +32385,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" }, { - "$id": "2650", + "$id": "3455", "kind": "property", "name": "seed", "serializedName": "seed", "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { - "$id": "2651", + "$id": "3456", "kind": "nullable", "type": { - "$id": "2652", + "$id": "3457", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -24610,16 +32408,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" }, { - "$id": "2653", + "$id": "3458", "kind": "property", "name": "service_tier", "serializedName": "service_tier", "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", "type": { - "$id": "2654", + "$id": "3459", "kind": "nullable", "type": { - "$ref": "713" + "$ref": "902" } }, "optional": true, @@ -24629,32 +32427,32 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" }, { - "$id": "2655", + "$id": "3460", "kind": "property", "name": "stop", "serializedName": "stop", "description": "Up to 4 sequences where the API will stop generating further tokens.", "type": { - "$id": "2656", + "$id": "3461", "kind": "nullable", "type": { - "$id": "2657", + "$id": "3462", "kind": "union", "name": "CreateChatCompletionRequestStop", "variantTypes": [ { - "$id": "2658", + "$id": "3463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "2659", + "$id": "3464", "kind": "array", "name": "Array", "valueType": { - "$id": "2660", + "$id": "3465", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24674,16 +32472,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" }, { - "$id": "2661", + "$id": "3466", "kind": "property", "name": "stream", "serializedName": "stream", "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { - "$id": "2662", + "$id": "3467", "kind": "nullable", "type": { - "$id": "2663", + "$id": "3468", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -24697,15 +32495,15 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" }, { - "$id": "2664", + "$id": "3469", "kind": "property", "name": "stream_options", "serializedName": "stream_options", "type": { - "$id": "2665", + "$id": "3470", "kind": "nullable", "type": { - "$ref": "2440" + "$ref": "3245" } }, "optional": true, @@ -24715,16 +32513,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" }, { - "$id": "2666", + "$id": "3471", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { - "$id": "2667", + "$id": "3472", "kind": "nullable", "type": { - "$id": "2668", + "$id": "3473", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -24738,16 +32536,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" }, { - "$id": "2669", + "$id": "3474", "kind": "property", "name": "top_p", "serializedName": "top_p", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { - "$id": "2670", + "$id": "3475", "kind": "nullable", "type": { - "$id": "2671", + "$id": "3476", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -24761,17 +32559,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" }, { - "$id": "2672", + "$id": "3477", "kind": "property", "name": "tools", "serializedName": "tools", "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", "type": { - "$id": "2673", + "$id": "3478", "kind": "array", "name": "ArrayChatCompletionTool", "valueType": { - "$id": "2674", + "$id": "3479", "kind": "model", "name": "ChatCompletionTool", "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", @@ -24779,16 +32577,16 @@ "decorators": [], "properties": [ { - "$id": "2675", + "$id": "3480", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the tool. Currently, only `function` is supported.", "type": { - "$id": "2676", + "$id": "3481", "kind": "constant", "valueType": { - "$ref": "719" + "$ref": "908" }, "value": "function", "decorators": [] @@ -24800,12 +32598,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" }, { - "$id": "2677", + "$id": "3482", "kind": "property", "name": "function", "serializedName": "function", "type": { - "$ref": "1374" + "$ref": "1563" }, "optional": false, "readOnly": false, @@ -24825,20 +32623,20 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" }, { - "$id": "2678", + "$id": "3483", "kind": "property", "name": "tool_choice", "serializedName": "tool_choice", "type": { - "$id": "2679", + "$id": "3484", "kind": "union", "name": "ChatCompletionToolChoiceOption", "variantTypes": [ { - "$ref": "722" + "$ref": "911" }, { - "$id": "2680", + "$id": "3485", "kind": "model", "name": "ChatCompletionNamedToolChoice", "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", @@ -24847,16 +32645,16 @@ "decorators": [], "properties": [ { - "$id": "2681", + "$id": "3486", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the tool. Currently, only `function` is supported.", "type": { - "$id": "2682", + "$id": "3487", "kind": "constant", "valueType": { - "$ref": "730" + "$ref": "919" }, "value": "function", "decorators": [] @@ -24868,12 +32666,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" }, { - "$id": "2683", + "$id": "3488", "kind": "property", "name": "function", "serializedName": "function", "type": { - "$id": "2684", + "$id": "3489", "kind": "model", "name": "ChatCompletionNamedToolChoiceFunction", "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", @@ -24881,13 +32679,13 @@ "decorators": [], "properties": [ { - "$id": "2685", + "$id": "3490", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to call.", "type": { - "$id": "2686", + "$id": "3491", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24919,12 +32717,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" }, { - "$id": "2687", + "$id": "3492", "kind": "property", "name": "parallel_tool_calls", "serializedName": "parallel_tool_calls", "type": { - "$id": "2688", + "$id": "3493", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -24937,13 +32735,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" }, { - "$id": "2689", + "$id": "3494", "kind": "property", "name": "user", "serializedName": "user", "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { - "$id": "2690", + "$id": "3495", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24956,21 +32754,21 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" }, { - "$id": "2691", + "$id": "3496", "kind": "property", "name": "function_call", "serializedName": "function_call", "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", "type": { - "$id": "2692", + "$id": "3497", "kind": "union", "name": "CreateChatCompletionRequestFunctionCall", "variantTypes": [ { - "$id": "2693", + "$id": "3498", "kind": "constant", "valueType": { - "$id": "2694", + "$id": "3499", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24980,10 +32778,10 @@ "decorators": [] }, { - "$id": "2695", + "$id": "3500", "kind": "constant", "valueType": { - "$id": "2696", + "$id": "3501", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -24993,7 +32791,7 @@ "decorators": [] }, { - "$id": "2697", + "$id": "3502", "kind": "model", "name": "ChatCompletionFunctionCallOption", "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", @@ -25002,13 +32800,13 @@ "decorators": [], "properties": [ { - "$id": "2698", + "$id": "3503", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to call.", "type": { - "$id": "2699", + "$id": "3504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25032,17 +32830,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" }, { - "$id": "2700", + "$id": "3505", "kind": "property", "name": "functions", "serializedName": "functions", "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", "type": { - "$id": "2701", + "$id": "3506", "kind": "array", "name": "ArrayChatCompletionFunctions", "valueType": { - "$id": "2702", + "$id": "3507", "kind": "model", "name": "ChatCompletionFunctions", "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", @@ -25051,13 +32849,13 @@ "decorators": [], "properties": [ { - "$id": "2703", + "$id": "3508", "kind": "property", "name": "description", "serializedName": "description", "description": "A description of what the function does, used by the model to choose when and how to call the function.", "type": { - "$id": "2704", + "$id": "3509", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25070,13 +32868,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" }, { - "$id": "2705", + "$id": "3510", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { - "$id": "2706", + "$id": "3511", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25089,12 +32887,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" }, { - "$id": "2707", + "$id": "3512", "kind": "property", "name": "parameters", "serializedName": "parameters", "type": { - "$ref": "1380" + "$ref": "1569" }, "optional": true, "readOnly": false, @@ -25116,73 +32914,73 @@ ] }, { - "$ref": "2506" + "$ref": "3311" }, { - "$ref": "2510" + "$ref": "3315" }, { - "$ref": "2516" + "$ref": "3321" }, { - "$ref": "2526" + "$ref": "3331" }, { - "$ref": "2532" + "$ref": "3337" }, { - "$ref": "2536" + "$ref": "3341" }, { - "$ref": "2545" + "$ref": "3350" }, { - "$ref": "2552" + "$ref": "3357" }, { - "$ref": "2567" + "$ref": "3372" }, { - "$ref": "2573" + "$ref": "3378" }, { - "$ref": "2580" + "$ref": "3385" }, { - "$ref": "2585" + "$ref": "3390" }, { - "$ref": "2596" + "$ref": "3401" }, { - "$ref": "2633" + "$ref": "3438" }, { - "$ref": "2637" + "$ref": "3442" }, { - "$ref": "2641" + "$ref": "3446" }, { - "$ref": "2645" + "$ref": "3450" }, { - "$ref": "2674" + "$ref": "3479" }, { - "$ref": "2680" + "$ref": "3485" }, { - "$ref": "2684" + "$ref": "3489" }, { - "$ref": "2697" + "$ref": "3502" }, { - "$ref": "2702" + "$ref": "3507" }, { - "$id": "2708", + "$id": "3513", "kind": "model", "name": "CreateChatCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", @@ -25191,13 +32989,13 @@ "decorators": [], "properties": [ { - "$id": "2709", + "$id": "3514", "kind": "property", "name": "id", "serializedName": "id", "description": "A unique identifier for the chat completion.", "type": { - "$id": "2710", + "$id": "3515", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25210,17 +33008,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" }, { - "$id": "2711", + "$id": "3516", "kind": "property", "name": "choices", "serializedName": "choices", "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { - "$id": "2712", + "$id": "3517", "kind": "array", "name": "Array", "valueType": { - "$id": "2713", + "$id": "3518", "kind": "model", "name": "CreateChatCompletionResponseChoice", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", @@ -25228,13 +33026,13 @@ "decorators": [], "properties": [ { - "$id": "2714", + "$id": "3519", "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { - "$ref": "733" + "$ref": "922" }, "optional": false, "readOnly": false, @@ -25243,13 +33041,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" }, { - "$id": "2715", + "$id": "3520", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the choice in the list of choices.", "type": { - "$id": "2716", + "$id": "3521", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -25262,12 +33060,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" }, { - "$id": "2717", + "$id": "3522", "kind": "property", "name": "message", "serializedName": "message", "type": { - "$id": "2718", + "$id": "3523", "kind": "model", "name": "ChatCompletionResponseMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", @@ -25276,16 +33074,16 @@ "decorators": [], "properties": [ { - "$id": "2719", + "$id": "3524", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the message.", "type": { - "$id": "2720", + "$id": "3525", "kind": "nullable", "type": { - "$id": "2721", + "$id": "3526", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25299,16 +33097,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" }, { - "$id": "2722", + "$id": "3527", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "The refusal message generated by the model.", "type": { - "$id": "2723", + "$id": "3528", "kind": "nullable", "type": { - "$id": "2724", + "$id": "3529", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25322,16 +33120,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" }, { - "$id": "2725", + "$id": "3530", "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", "type": { - "$id": "2726", + "$id": "3531", "kind": "array", "name": "ChatCompletionMessageToolCalls", "valueType": { - "$ref": "2567" + "$ref": "3372" }, "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", "decorators": [] @@ -25343,16 +33141,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" }, { - "$id": "2727", + "$id": "3532", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the author of this message.", "type": { - "$id": "2728", + "$id": "3533", "kind": "constant", "valueType": { - "$ref": "745" + "$ref": "934" }, "value": "assistant", "decorators": [] @@ -25364,13 +33162,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" }, { - "$id": "2729", + "$id": "3534", "kind": "property", "name": "function_call", "serializedName": "function_call", "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { - "$id": "2730", + "$id": "3535", "kind": "model", "name": "ChatCompletionResponseMessageFunctionCall", "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", @@ -25378,13 +33176,13 @@ "decorators": [], "properties": [ { - "$id": "2731", + "$id": "3536", "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", "type": { - "$id": "2732", + "$id": "3537", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25394,16 +33192,16 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" }, { - "$id": "2733", + "$id": "3538", "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { - "$id": "2734", + "$id": "3539", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25413,7 +33211,7 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" } ] }, @@ -25432,16 +33230,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" }, { - "$id": "2735", + "$id": "3540", "kind": "property", "name": "logprobs", "serializedName": "logprobs", "description": "Log probability information for the choice.", "type": { - "$id": "2736", + "$id": "3541", "kind": "nullable", "type": { - "$id": "2737", + "$id": "3542", "kind": "model", "name": "CreateChatCompletionResponseChoiceLogprobs", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", @@ -25449,20 +33247,20 @@ "decorators": [], "properties": [ { - "$id": "2738", + "$id": "3543", "kind": "property", "name": "content", "serializedName": "content", "description": "A list of message content tokens with log probability information.", "type": { - "$id": "2739", + "$id": "3544", "kind": "nullable", "type": { - "$id": "2740", + "$id": "3545", "kind": "array", "name": "ArrayChatCompletionTokenLogprob", "valueType": { - "$id": "2741", + "$id": "3546", "kind": "model", "name": "ChatCompletionTokenLogprob", "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", @@ -25470,13 +33268,13 @@ "decorators": [], "properties": [ { - "$id": "2742", + "$id": "3547", "kind": "property", "name": "token", "serializedName": "token", "description": "The token.", "type": { - "$id": "2743", + "$id": "3548", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25489,13 +33287,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" }, { - "$id": "2744", + "$id": "3549", "kind": "property", "name": "logprob", "serializedName": "logprob", "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { - "$id": "2745", + "$id": "3550", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -25508,20 +33306,20 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" }, { - "$id": "2746", + "$id": "3551", "kind": "property", "name": "bytes", "serializedName": "bytes", "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { - "$id": "2747", + "$id": "3552", "kind": "nullable", "type": { - "$id": "2748", + "$id": "3553", "kind": "array", "name": "ChatCompletionTokenLogprobBytes", "valueType": { - "$id": "2749", + "$id": "3554", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -25538,17 +33336,17 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" }, { - "$id": "2750", + "$id": "3555", "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", "type": { - "$id": "2751", + "$id": "3556", "kind": "array", "name": "Array", "valueType": { - "$id": "2752", + "$id": "3557", "kind": "model", "name": "ChatCompletionTokenLogprobTopLogprob", "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", @@ -25556,13 +33354,13 @@ "decorators": [], "properties": [ { - "$id": "2753", + "$id": "3558", "kind": "property", "name": "token", "serializedName": "token", "description": "The token.", "type": { - "$id": "2754", + "$id": "3559", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25575,13 +33373,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" }, { - "$id": "2755", + "$id": "3560", "kind": "property", "name": "logprob", "serializedName": "logprob", "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { - "$id": "2756", + "$id": "3561", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -25594,20 +33392,20 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" }, { - "$id": "2757", + "$id": "3562", "kind": "property", "name": "bytes", "serializedName": "bytes", "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { - "$id": "2758", + "$id": "3563", "kind": "nullable", "type": { - "$id": "2759", + "$id": "3564", "kind": "array", "name": "Array", "valueType": { - "$id": "2760", + "$id": "3565", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -25647,20 +33445,20 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" }, { - "$id": "2761", + "$id": "3566", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "A list of message refusal tokens with log probability information.", "type": { - "$id": "2762", + "$id": "3567", "kind": "nullable", "type": { - "$id": "2763", + "$id": "3568", "kind": "array", "name": "ArrayChatCompletionTokenLogprob", "valueType": { - "$ref": "2741" + "$ref": "3546" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -25693,18 +33491,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" }, { - "$id": "2764", + "$id": "3569", "kind": "property", "name": "created", "serializedName": "created", "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { - "$id": "2765", + "$id": "3570", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2766", + "$id": "3571", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -25720,13 +33518,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" }, { - "$id": "2767", + "$id": "3572", "kind": "property", "name": "model", "serializedName": "model", "description": "The model used for the chat completion.", "type": { - "$id": "2768", + "$id": "3573", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25739,16 +33537,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" }, { - "$id": "2769", + "$id": "3574", "kind": "property", "name": "service_tier", "serializedName": "service_tier", "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { - "$id": "2770", + "$id": "3575", "kind": "nullable", "type": { - "$ref": "748" + "$ref": "937" } }, "optional": true, @@ -25758,13 +33556,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" }, { - "$id": "2771", + "$id": "3576", "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { - "$id": "2772", + "$id": "3577", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25777,16 +33575,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" }, { - "$id": "2773", + "$id": "3578", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `chat.completion`.", "type": { - "$id": "2774", + "$id": "3579", "kind": "constant", "valueType": { - "$ref": "754" + "$ref": "943" }, "value": "chat.completion", "decorators": [] @@ -25798,12 +33596,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" }, { - "$id": "2775", + "$id": "3580", "kind": "property", "name": "usage", "serializedName": "usage", "type": { - "$ref": "2492" + "$ref": "3297" }, "optional": true, "readOnly": false, @@ -25814,25 +33612,25 @@ ] }, { - "$ref": "2713" + "$ref": "3518" }, { - "$ref": "2718" + "$ref": "3523" }, { - "$ref": "2730" + "$ref": "3535" }, { - "$ref": "2737" + "$ref": "3542" }, { - "$ref": "2741" + "$ref": "3546" }, { - "$ref": "2752" + "$ref": "3557" }, { - "$id": "2776", + "$id": "3581", "kind": "model", "name": "CreateBatchRequest", "crossLanguageDefinitionId": "createBatch.Request.anonymous", @@ -25840,13 +33638,13 @@ "decorators": [], "properties": [ { - "$id": "2777", + "$id": "3582", "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", "type": { - "$id": "2778", + "$id": "3583", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25859,13 +33657,13 @@ "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" }, { - "$id": "2779", + "$id": "3584", "kind": "property", "name": "endpoint", "serializedName": "endpoint", "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", "type": { - "$ref": "757" + "$ref": "946" }, "optional": false, "readOnly": false, @@ -25874,16 +33672,16 @@ "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" }, { - "$id": "2780", + "$id": "3585", "kind": "property", "name": "completion_window", "serializedName": "completion_window", "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", "type": { - "$id": "2781", + "$id": "3586", "kind": "constant", "valueType": { - "$ref": "763" + "$ref": "952" }, "value": "24h", "decorators": [] @@ -25895,26 +33693,26 @@ "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" }, { - "$id": "2782", + "$id": "3587", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Optional custom metadata for the batch.", "type": { - "$id": "2783", + "$id": "3588", "kind": "nullable", "type": { - "$id": "2784", + "$id": "3589", "kind": "dict", "keyType": { - "$id": "2785", + "$id": "3590", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2786", + "$id": "3591", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25932,7 +33730,7 @@ ] }, { - "$id": "2787", + "$id": "3592", "kind": "model", "name": "Batch", "crossLanguageDefinitionId": "OpenAI.Batch", @@ -25940,12 +33738,12 @@ "decorators": [], "properties": [ { - "$id": "2788", + "$id": "3593", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "2789", + "$id": "3594", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25958,16 +33756,16 @@ "crossLanguageDefinitionId": "OpenAI.Batch.id" }, { - "$id": "2790", + "$id": "3595", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `batch`.", "type": { - "$id": "2791", + "$id": "3596", "kind": "constant", "valueType": { - "$ref": "766" + "$ref": "955" }, "value": "batch", "decorators": [] @@ -25979,13 +33777,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.object" }, { - "$id": "2792", + "$id": "3597", "kind": "property", "name": "endpoint", "serializedName": "endpoint", "description": "The OpenAI API endpoint used by the batch.", "type": { - "$id": "2793", + "$id": "3598", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -25998,12 +33796,12 @@ "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" }, { - "$id": "2794", + "$id": "3599", "kind": "property", "name": "errors", "serializedName": "errors", "type": { - "$id": "2795", + "$id": "3600", "kind": "model", "name": "BatchErrors", "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", @@ -26011,16 +33809,16 @@ "decorators": [], "properties": [ { - "$id": "2796", + "$id": "3601", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `list`.", "type": { - "$id": "2797", + "$id": "3602", "kind": "constant", "valueType": { - "$ref": "769" + "$ref": "958" }, "value": "list", "decorators": [] @@ -26032,16 +33830,16 @@ "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" }, { - "$id": "2798", + "$id": "3603", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2799", + "$id": "3604", "kind": "array", "name": "Array", "valueType": { - "$id": "2800", + "$id": "3605", "kind": "model", "name": "BatchErrorsDatum", "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", @@ -26049,13 +33847,13 @@ "decorators": [], "properties": [ { - "$id": "2801", + "$id": "3606", "kind": "property", "name": "code", "serializedName": "code", "description": "An error code identifying the error type.", "type": { - "$id": "2802", + "$id": "3607", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26068,13 +33866,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" }, { - "$id": "2803", + "$id": "3608", "kind": "property", "name": "message", "serializedName": "message", "description": "A human-readable message providing more details about the error.", "type": { - "$id": "2804", + "$id": "3609", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26087,16 +33885,16 @@ "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" }, { - "$id": "2805", + "$id": "3610", "kind": "property", "name": "param", "serializedName": "param", "description": "The name of the parameter that caused the error, if applicable.", "type": { - "$id": "2806", + "$id": "3611", "kind": "nullable", "type": { - "$id": "2807", + "$id": "3612", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26110,16 +33908,16 @@ "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" }, { - "$id": "2808", + "$id": "3613", "kind": "property", "name": "line", "serializedName": "line", "description": "The line number of the input file where the error occurred, if applicable.", "type": { - "$id": "2809", + "$id": "3614", "kind": "nullable", "type": { - "$id": "2810", + "$id": "3615", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26152,13 +33950,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.errors" }, { - "$id": "2811", + "$id": "3616", "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", "description": "The ID of the input file for the batch.", "type": { - "$id": "2812", + "$id": "3617", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26171,13 +33969,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" }, { - "$id": "2813", + "$id": "3618", "kind": "property", "name": "completion_window", "serializedName": "completion_window", "description": "The time frame within which the batch should be processed.", "type": { - "$id": "2814", + "$id": "3619", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26190,13 +33988,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" }, { - "$id": "2815", + "$id": "3620", "kind": "property", "name": "status", "serializedName": "status", "description": "The current status of the batch.", "type": { - "$ref": "772" + "$ref": "961" }, "optional": false, "readOnly": false, @@ -26205,13 +34003,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.status" }, { - "$id": "2816", + "$id": "3621", "kind": "property", "name": "output_file_id", "serializedName": "output_file_id", "description": "The ID of the file containing the outputs of successfully executed requests.", "type": { - "$id": "2817", + "$id": "3622", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26224,13 +34022,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" }, { - "$id": "2818", + "$id": "3623", "kind": "property", "name": "error_file_id", "serializedName": "error_file_id", "description": "The ID of the file containing the outputs of requests with errors.", "type": { - "$id": "2819", + "$id": "3624", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26243,18 +34041,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" }, { - "$id": "2820", + "$id": "3625", "kind": "property", "name": "created_at", "serializedName": "created_at", "description": "The Unix timestamp (in seconds) for when the batch was created.", "type": { - "$id": "2821", + "$id": "3626", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2822", + "$id": "3627", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26270,18 +34068,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.created_at" }, { - "$id": "2823", + "$id": "3628", "kind": "property", "name": "in_progress_at", "serializedName": "in_progress_at", "description": "The Unix timestamp (in seconds) for when the batch started processing.", "type": { - "$id": "2824", + "$id": "3629", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2825", + "$id": "3630", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26297,18 +34095,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" }, { - "$id": "2826", + "$id": "3631", "kind": "property", "name": "expires_at", "serializedName": "expires_at", "description": "The Unix timestamp (in seconds) for when the batch will expire.", "type": { - "$id": "2827", + "$id": "3632", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2828", + "$id": "3633", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26324,18 +34122,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" }, { - "$id": "2829", + "$id": "3634", "kind": "property", "name": "finalizing_at", "serializedName": "finalizing_at", "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", "type": { - "$id": "2830", + "$id": "3635", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2831", + "$id": "3636", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26351,18 +34149,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" }, { - "$id": "2832", + "$id": "3637", "kind": "property", "name": "completed_at", "serializedName": "completed_at", "description": "The Unix timestamp (in seconds) for when the batch was completed.", "type": { - "$id": "2833", + "$id": "3638", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2834", + "$id": "3639", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26378,18 +34176,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" }, { - "$id": "2835", + "$id": "3640", "kind": "property", "name": "failed_at", "serializedName": "failed_at", "description": "The Unix timestamp (in seconds) for when the batch failed.", "type": { - "$id": "2836", + "$id": "3641", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2837", + "$id": "3642", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26405,18 +34203,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" }, { - "$id": "2838", + "$id": "3643", "kind": "property", "name": "expired_at", "serializedName": "expired_at", "description": "The Unix timestamp (in seconds) for when the batch expired.", "type": { - "$id": "2839", + "$id": "3644", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2840", + "$id": "3645", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26432,18 +34230,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" }, { - "$id": "2841", + "$id": "3646", "kind": "property", "name": "cancelling_at", "serializedName": "cancelling_at", "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", "type": { - "$id": "2842", + "$id": "3647", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2843", + "$id": "3648", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26459,18 +34257,18 @@ "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" }, { - "$id": "2844", + "$id": "3649", "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", "type": { - "$id": "2845", + "$id": "3650", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2846", + "$id": "3651", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26486,13 +34284,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" }, { - "$id": "2847", + "$id": "3652", "kind": "property", "name": "request_counts", "serializedName": "request_counts", "description": "The request counts for different statuses within the batch.", "type": { - "$id": "2848", + "$id": "3653", "kind": "model", "name": "BatchRequestCounts", "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", @@ -26500,13 +34298,13 @@ "decorators": [], "properties": [ { - "$id": "2849", + "$id": "3654", "kind": "property", "name": "total", "serializedName": "total", "description": "Total number of requests in the batch.", "type": { - "$id": "2850", + "$id": "3655", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26519,13 +34317,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" }, { - "$id": "2851", + "$id": "3656", "kind": "property", "name": "completed", "serializedName": "completed", "description": "Number of requests that have been completed successfully.", "type": { - "$id": "2852", + "$id": "3657", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26538,13 +34336,13 @@ "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" }, { - "$id": "2853", + "$id": "3658", "kind": "property", "name": "failed", "serializedName": "failed", "description": "Number of requests that have failed.", "type": { - "$id": "2854", + "$id": "3659", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -26565,26 +34363,26 @@ "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" }, { - "$id": "2855", + "$id": "3660", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2856", + "$id": "3661", "kind": "nullable", "type": { - "$id": "2857", + "$id": "3662", "kind": "dict", "keyType": { - "$id": "2858", + "$id": "3663", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2859", + "$id": "3664", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26602,16 +34400,16 @@ ] }, { - "$ref": "2795" + "$ref": "3600" }, { - "$ref": "2800" + "$ref": "3605" }, { - "$ref": "2848" + "$ref": "3653" }, { - "$id": "2860", + "$id": "3665", "kind": "model", "name": "ListBatchesResponse", "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", @@ -26619,16 +34417,16 @@ "decorators": [], "properties": [ { - "$id": "2861", + "$id": "3666", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2862", + "$id": "3667", "kind": "array", "name": "ArrayBatch", "valueType": { - "$ref": "2787" + "$ref": "3592" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -26640,12 +34438,12 @@ "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" }, { - "$id": "2863", + "$id": "3668", "kind": "property", "name": "first_id", "serializedName": "first_id", "type": { - "$id": "2864", + "$id": "3669", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26658,12 +34456,12 @@ "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" }, { - "$id": "2865", + "$id": "3670", "kind": "property", "name": "last_id", "serializedName": "last_id", "type": { - "$id": "2866", + "$id": "3671", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26676,12 +34474,12 @@ "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" }, { - "$id": "2867", + "$id": "3672", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2868", + "$id": "3673", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -26694,15 +34492,15 @@ "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" }, { - "$id": "2869", + "$id": "3674", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2870", + "$id": "3675", "kind": "constant", "valueType": { - "$ref": "790" + "$ref": "979" }, "value": "list", "decorators": [] @@ -26716,7 +34514,7 @@ ] }, { - "$id": "2871", + "$id": "3676", "kind": "model", "name": "CreateAssistantRequest", "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", @@ -26724,13 +34522,13 @@ "decorators": [], "properties": [ { - "$id": "2872", + "$id": "3677", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { - "$ref": "793" + "$ref": "982" }, "optional": false, "readOnly": false, @@ -26739,16 +34537,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" }, { - "$id": "2873", + "$id": "3678", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the assistant. The maximum length is 256 characters.", "type": { - "$id": "2874", + "$id": "3679", "kind": "nullable", "type": { - "$id": "2875", + "$id": "3680", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26762,16 +34560,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" }, { - "$id": "2876", + "$id": "3681", "kind": "property", "name": "description", "serializedName": "description", "description": "The description of the assistant. The maximum length is 512 characters.", "type": { - "$id": "2877", + "$id": "3682", "kind": "nullable", "type": { - "$id": "2878", + "$id": "3683", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26785,16 +34583,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" }, { - "$id": "2879", + "$id": "3684", "kind": "property", "name": "instructions", "serializedName": "instructions", "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { - "$id": "2880", + "$id": "3685", "kind": "nullable", "type": { - "$id": "2881", + "$id": "3686", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26808,17 +34606,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" }, { - "$id": "2882", + "$id": "3687", "kind": "property", "name": "tools", "serializedName": "tools", "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { - "$id": "2883", + "$id": "3688", "kind": "array", "name": "ArrayAssistantToolDefinition", "valueType": { - "$ref": "1352" + "$ref": "1541" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -26830,16 +34628,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" }, { - "$id": "2884", + "$id": "3689", "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { - "$id": "2885", + "$id": "3690", "kind": "nullable", "type": { - "$id": "2886", + "$id": "3691", "kind": "model", "name": "CreateAssistantRequestToolResources", "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", @@ -26847,12 +34645,12 @@ "decorators": [], "properties": [ { - "$id": "2887", + "$id": "3692", "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", "type": { - "$id": "2888", + "$id": "3693", "kind": "model", "name": "CreateAssistantRequestToolResourcesCodeInterpreter", "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", @@ -26860,17 +34658,17 @@ "decorators": [], "properties": [ { - "$id": "2889", + "$id": "3694", "kind": "property", "name": "file_ids", "serializedName": "file_ids", "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { - "$id": "2890", + "$id": "3695", "kind": "array", "name": "Array", "valueType": { - "$id": "2891", + "$id": "3696", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26894,12 +34692,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" }, { - "$id": "2892", + "$id": "3697", "kind": "property", "name": "file_search", "serializedName": "file_search", "type": { - "$ref": "1405" + "$ref": "1594" }, "optional": true, "readOnly": false, @@ -26917,26 +34715,26 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" }, { - "$id": "2893", + "$id": "3698", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2894", + "$id": "3699", "kind": "nullable", "type": { - "$id": "2895", + "$id": "3700", "kind": "dict", "keyType": { - "$id": "2896", + "$id": "3701", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2897", + "$id": "3702", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -26952,16 +34750,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" }, { - "$id": "2898", + "$id": "3703", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { - "$id": "2899", + "$id": "3704", "kind": "nullable", "type": { - "$id": "2900", + "$id": "3705", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -26975,16 +34773,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" }, { - "$id": "2901", + "$id": "3706", "kind": "property", "name": "top_p", "serializedName": "top_p", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { - "$id": "2902", + "$id": "3707", "kind": "nullable", "type": { - "$id": "2903", + "$id": "3708", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -26998,23 +34796,23 @@ "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" }, { - "$id": "2904", + "$id": "3709", "kind": "property", "name": "response_format", "serializedName": "response_format", "type": { - "$id": "2905", + "$id": "3710", "kind": "nullable", "type": { - "$id": "2906", + "$id": "3711", "kind": "union", "name": "AssistantsApiResponseFormatOption", "variantTypes": [ { - "$id": "2907", + "$id": "3712", "kind": "constant", "valueType": { - "$id": "2908", + "$id": "3713", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27024,13 +34822,13 @@ "decorators": [] }, { - "$ref": "1490" + "$ref": "1679" }, { - "$ref": "1495" + "$ref": "1684" }, { - "$ref": "1499" + "$ref": "1688" } ], "decorators": [] @@ -27045,13 +34843,13 @@ ] }, { - "$ref": "2886" + "$ref": "3691" }, { - "$ref": "2888" + "$ref": "3693" }, { - "$id": "2909", + "$id": "3714", "kind": "model", "name": "AssistantObject", "crossLanguageDefinitionId": "OpenAI.AssistantObject", @@ -27060,13 +34858,13 @@ "decorators": [], "properties": [ { - "$id": "2910", + "$id": "3715", "kind": "property", "name": "id", "serializedName": "id", "description": "The identifier, which can be referenced in API endpoints.", "type": { - "$id": "2911", + "$id": "3716", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27079,16 +34877,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" }, { - "$id": "2912", + "$id": "3717", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `assistant`.", "type": { - "$id": "2913", + "$id": "3718", "kind": "constant", "valueType": { - "$ref": "841" + "$ref": "1030" }, "value": "assistant", "decorators": [] @@ -27100,18 +34898,18 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" }, { - "$id": "2914", + "$id": "3719", "kind": "property", "name": "created_at", "serializedName": "created_at", "description": "The Unix timestamp (in seconds) for when the assistant was created.", "type": { - "$id": "2915", + "$id": "3720", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "2916", + "$id": "3721", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -27127,16 +34925,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" }, { - "$id": "2917", + "$id": "3722", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the assistant. The maximum length is 256 characters.", "type": { - "$id": "2918", + "$id": "3723", "kind": "nullable", "type": { - "$id": "2919", + "$id": "3724", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27150,16 +34948,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" }, { - "$id": "2920", + "$id": "3725", "kind": "property", "name": "description", "serializedName": "description", "description": "The description of the assistant. The maximum length is 512 characters.", "type": { - "$id": "2921", + "$id": "3726", "kind": "nullable", "type": { - "$id": "2922", + "$id": "3727", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27173,13 +34971,13 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" }, { - "$id": "2923", + "$id": "3728", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { - "$id": "2924", + "$id": "3729", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27192,16 +34990,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" }, { - "$id": "2925", + "$id": "3730", "kind": "property", "name": "instructions", "serializedName": "instructions", "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { - "$id": "2926", + "$id": "3731", "kind": "nullable", "type": { - "$id": "2927", + "$id": "3732", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27215,17 +35013,17 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" }, { - "$id": "2928", + "$id": "3733", "kind": "property", "name": "tools", "serializedName": "tools", "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { - "$id": "2929", + "$id": "3734", "kind": "array", "name": "ArrayAssistantToolDefinition", "valueType": { - "$ref": "1352" + "$ref": "1541" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -27237,16 +35035,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" }, { - "$id": "2930", + "$id": "3735", "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { - "$id": "2931", + "$id": "3736", "kind": "nullable", "type": { - "$id": "2932", + "$id": "3737", "kind": "model", "name": "AssistantObjectToolResources", "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", @@ -27254,12 +35052,12 @@ "decorators": [], "properties": [ { - "$id": "2933", + "$id": "3738", "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", "type": { - "$id": "2934", + "$id": "3739", "kind": "model", "name": "AssistantObjectToolResourcesCodeInterpreter", "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", @@ -27267,17 +35065,17 @@ "decorators": [], "properties": [ { - "$id": "2935", + "$id": "3740", "kind": "property", "name": "file_ids", "serializedName": "file_ids", "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", "type": { - "$id": "2936", + "$id": "3741", "kind": "array", "name": "Array", "valueType": { - "$id": "2937", + "$id": "3742", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27301,12 +35099,12 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" }, { - "$id": "2938", + "$id": "3743", "kind": "property", "name": "file_search", "serializedName": "file_search", "type": { - "$ref": "1443" + "$ref": "1632" }, "optional": true, "readOnly": false, @@ -27324,26 +35122,26 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" }, { - "$id": "2939", + "$id": "3744", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2940", + "$id": "3745", "kind": "nullable", "type": { - "$id": "2941", + "$id": "3746", "kind": "dict", "keyType": { - "$id": "2942", + "$id": "3747", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2943", + "$id": "3748", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27359,16 +35157,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" }, { - "$id": "2944", + "$id": "3749", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { - "$id": "2945", + "$id": "3750", "kind": "nullable", "type": { - "$id": "2946", + "$id": "3751", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -27382,16 +35180,16 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" }, { - "$id": "2947", + "$id": "3752", "kind": "property", "name": "top_p", "serializedName": "top_p", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { - "$id": "2948", + "$id": "3753", "kind": "nullable", "type": { - "$id": "2949", + "$id": "3754", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -27405,23 +35203,23 @@ "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" }, { - "$id": "2950", + "$id": "3755", "kind": "property", "name": "response_format", "serializedName": "response_format", "type": { - "$id": "2951", + "$id": "3756", "kind": "nullable", "type": { - "$id": "2952", + "$id": "3757", "kind": "union", "name": "AssistantsApiResponseFormatOption", "variantTypes": [ { - "$id": "2953", + "$id": "3758", "kind": "constant", "valueType": { - "$id": "2954", + "$id": "3759", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27431,13 +35229,13 @@ "decorators": [] }, { - "$ref": "1490" + "$ref": "1679" }, { - "$ref": "1495" + "$ref": "1684" }, { - "$ref": "1499" + "$ref": "1688" } ], "decorators": [] @@ -27452,13 +35250,13 @@ ] }, { - "$ref": "2932" + "$ref": "3737" }, { - "$ref": "2934" + "$ref": "3739" }, { - "$id": "2955", + "$id": "3760", "kind": "model", "name": "ListAssistantsResponse", "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", @@ -27466,15 +35264,15 @@ "decorators": [], "properties": [ { - "$id": "2956", + "$id": "3761", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "2957", + "$id": "3762", "kind": "constant", "valueType": { - "$ref": "850" + "$ref": "1039" }, "value": "list", "decorators": [] @@ -27486,16 +35284,16 @@ "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" }, { - "$id": "2958", + "$id": "3763", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "2959", + "$id": "3764", "kind": "array", "name": "ArrayAssistantObject", "valueType": { - "$ref": "2909" + "$ref": "3714" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -27507,12 +35305,12 @@ "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" }, { - "$id": "2960", + "$id": "3765", "kind": "property", "name": "first_id", "serializedName": "first_id", "type": { - "$id": "2961", + "$id": "3766", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27525,12 +35323,12 @@ "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" }, { - "$id": "2962", + "$id": "3767", "kind": "property", "name": "last_id", "serializedName": "last_id", "type": { - "$id": "2963", + "$id": "3768", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27543,12 +35341,12 @@ "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" }, { - "$id": "2964", + "$id": "3769", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "2965", + "$id": "3770", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -27563,7 +35361,7 @@ ] }, { - "$id": "2966", + "$id": "3771", "kind": "model", "name": "ModifyAssistantRequest", "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", @@ -27571,13 +35369,13 @@ "decorators": [], "properties": [ { - "$id": "2967", + "$id": "3772", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { - "$id": "2968", + "$id": "3773", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27590,16 +35388,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" }, { - "$id": "2969", + "$id": "3774", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the assistant. The maximum length is 256 characters.", "type": { - "$id": "2970", + "$id": "3775", "kind": "nullable", "type": { - "$id": "2971", + "$id": "3776", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27613,16 +35411,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" }, { - "$id": "2972", + "$id": "3777", "kind": "property", "name": "description", "serializedName": "description", "description": "The description of the assistant. The maximum length is 512 characters.", "type": { - "$id": "2973", + "$id": "3778", "kind": "nullable", "type": { - "$id": "2974", + "$id": "3779", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27636,16 +35434,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" }, { - "$id": "2975", + "$id": "3780", "kind": "property", "name": "instructions", "serializedName": "instructions", "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { - "$id": "2976", + "$id": "3781", "kind": "nullable", "type": { - "$id": "2977", + "$id": "3782", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27659,17 +35457,17 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" }, { - "$id": "2978", + "$id": "3783", "kind": "property", "name": "tools", "serializedName": "tools", "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { - "$id": "2979", + "$id": "3784", "kind": "array", "name": "ArrayAssistantToolDefinition", "valueType": { - "$ref": "1352" + "$ref": "1541" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -27681,16 +35479,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" }, { - "$id": "2980", + "$id": "3785", "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { - "$id": "2981", + "$id": "3786", "kind": "nullable", "type": { - "$id": "2982", + "$id": "3787", "kind": "model", "name": "ModifyAssistantRequestToolResources", "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", @@ -27698,12 +35496,12 @@ "decorators": [], "properties": [ { - "$id": "2983", + "$id": "3788", "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", "type": { - "$id": "2984", + "$id": "3789", "kind": "model", "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", @@ -27711,17 +35509,17 @@ "decorators": [], "properties": [ { - "$id": "2985", + "$id": "3790", "kind": "property", "name": "file_ids", "serializedName": "file_ids", "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { - "$id": "2986", + "$id": "3791", "kind": "array", "name": "Array", "valueType": { - "$id": "2987", + "$id": "3792", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27745,12 +35543,12 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" }, { - "$id": "2988", + "$id": "3793", "kind": "property", "name": "file_search", "serializedName": "file_search", "type": { - "$ref": "1443" + "$ref": "1632" }, "optional": true, "readOnly": false, @@ -27768,26 +35566,26 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" }, { - "$id": "2989", + "$id": "3794", "kind": "property", "name": "metadata", "serializedName": "metadata", "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { - "$id": "2990", + "$id": "3795", "kind": "nullable", "type": { - "$id": "2991", + "$id": "3796", "kind": "dict", "keyType": { - "$id": "2992", + "$id": "3797", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "2993", + "$id": "3798", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27803,16 +35601,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" }, { - "$id": "2994", + "$id": "3799", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { - "$id": "2995", + "$id": "3800", "kind": "nullable", "type": { - "$id": "2996", + "$id": "3801", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -27826,16 +35624,16 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" }, { - "$id": "2997", + "$id": "3802", "kind": "property", "name": "top_p", "serializedName": "top_p", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { - "$id": "2998", + "$id": "3803", "kind": "nullable", "type": { - "$id": "2999", + "$id": "3804", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -27849,23 +35647,23 @@ "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" }, { - "$id": "3000", + "$id": "3805", "kind": "property", "name": "response_format", "serializedName": "response_format", "type": { - "$id": "3001", + "$id": "3806", "kind": "nullable", "type": { - "$id": "3002", + "$id": "3807", "kind": "union", "name": "AssistantsApiResponseFormatOption", "variantTypes": [ { - "$id": "3003", + "$id": "3808", "kind": "constant", "valueType": { - "$id": "3004", + "$id": "3809", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27875,13 +35673,13 @@ "decorators": [] }, { - "$ref": "1490" + "$ref": "1679" }, { - "$ref": "1495" + "$ref": "1684" }, { - "$ref": "1499" + "$ref": "1688" } ], "decorators": [] @@ -27896,13 +35694,13 @@ ] }, { - "$ref": "2982" + "$ref": "3787" }, { - "$ref": "2984" + "$ref": "3789" }, { - "$id": "3005", + "$id": "3810", "kind": "model", "name": "DeleteAssistantResponse", "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", @@ -27910,12 +35708,12 @@ "decorators": [], "properties": [ { - "$id": "3006", + "$id": "3811", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "3007", + "$id": "3812", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -27928,12 +35726,12 @@ "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" }, { - "$id": "3008", + "$id": "3813", "kind": "property", "name": "deleted", "serializedName": "deleted", "type": { - "$id": "3009", + "$id": "3814", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -27946,15 +35744,15 @@ "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" }, { - "$id": "3010", + "$id": "3815", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "3011", + "$id": "3816", "kind": "constant", "valueType": { - "$ref": "853" + "$ref": "1042" }, "value": "assistant.deleted", "decorators": [] @@ -27968,7 +35766,7 @@ ] }, { - "$id": "3012", + "$id": "3817", "kind": "model", "name": "CreateSpeechRequest", "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", @@ -27976,13 +35774,13 @@ "decorators": [], "properties": [ { - "$id": "3013", + "$id": "3818", "kind": "property", "name": "model", "serializedName": "model", "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", "type": { - "$ref": "856" + "$ref": "1045" }, "optional": false, "readOnly": false, @@ -27991,13 +35789,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" }, { - "$id": "3014", + "$id": "3819", "kind": "property", "name": "input", "serializedName": "input", "description": "The text to generate audio for. The maximum length is 4096 characters.", "type": { - "$id": "3015", + "$id": "3820", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28010,13 +35808,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" }, { - "$id": "3016", + "$id": "3821", "kind": "property", "name": "voice", "serializedName": "voice", "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", "type": { - "$ref": "862" + "$ref": "1051" }, "optional": false, "readOnly": false, @@ -28025,13 +35823,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" }, { - "$id": "3017", + "$id": "3822", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", "type": { - "$ref": "876" + "$ref": "1065" }, "optional": true, "readOnly": false, @@ -28040,13 +35838,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" }, { - "$id": "3018", + "$id": "3823", "kind": "property", "name": "speed", "serializedName": "speed", "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", "type": { - "$id": "3019", + "$id": "3824", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28061,7 +35859,7 @@ ] }, { - "$id": "3020", + "$id": "3825", "kind": "model", "name": "CreateTranscriptionRequest", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", @@ -28069,13 +35867,13 @@ "decorators": [], "properties": [ { - "$id": "3021", + "$id": "3826", "kind": "property", "name": "file", "serializedName": "file", "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { - "$id": "3022", + "$id": "3827", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -28089,13 +35887,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" }, { - "$id": "3023", + "$id": "3828", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { - "$ref": "890" + "$ref": "1079" }, "optional": false, "readOnly": false, @@ -28104,13 +35902,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" }, { - "$id": "3024", + "$id": "3829", "kind": "property", "name": "language", "serializedName": "language", "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", "type": { - "$id": "3025", + "$id": "3830", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28123,13 +35921,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" }, { - "$id": "3026", + "$id": "3831", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", "type": { - "$id": "3027", + "$id": "3832", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28142,13 +35940,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" }, { - "$id": "3028", + "$id": "3833", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { - "$ref": "894" + "$ref": "1083" }, "optional": true, "readOnly": false, @@ -28157,13 +35955,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" }, { - "$id": "3029", + "$id": "3834", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { - "$id": "3030", + "$id": "3835", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28176,17 +35974,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" }, { - "$id": "3031", + "$id": "3836", "kind": "property", "name": "timestamp_granularities", "serializedName": "timestamp_granularities", "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", "type": { - "$id": "3032", + "$id": "3837", "kind": "array", "name": "Array", "valueType": { - "$ref": "906" + "$ref": "1095" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -28200,7 +35998,7 @@ ] }, { - "$id": "3033", + "$id": "3838", "kind": "model", "name": "CreateTranscriptionResponseVerboseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", @@ -28209,16 +36007,16 @@ "decorators": [], "properties": [ { - "$id": "3034", + "$id": "3839", "kind": "property", "name": "task", "serializedName": "task", "description": "The task label.", "type": { - "$id": "3035", + "$id": "3840", "kind": "constant", "valueType": { - "$ref": "912" + "$ref": "1101" }, "value": "transcribe", "decorators": [] @@ -28230,13 +36028,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" }, { - "$id": "3036", + "$id": "3841", "kind": "property", "name": "language", "serializedName": "language", "description": "The language of the input audio.", "type": { - "$id": "3037", + "$id": "3842", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28249,18 +36047,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" }, { - "$id": "3038", + "$id": "3843", "kind": "property", "name": "duration", "serializedName": "duration", "description": "The duration of the input audio.", "type": { - "$id": "3039", + "$id": "3844", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3040", + "$id": "3845", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28276,13 +36074,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" }, { - "$id": "3041", + "$id": "3846", "kind": "property", "name": "text", "serializedName": "text", "description": "The transcribed text.", "type": { - "$id": "3042", + "$id": "3847", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28295,17 +36093,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" }, { - "$id": "3043", + "$id": "3848", "kind": "property", "name": "words", "serializedName": "words", "description": "Extracted words and their corresponding timestamps.", "type": { - "$id": "3044", + "$id": "3849", "kind": "array", "name": "ArrayTranscriptionWord", "valueType": { - "$id": "3045", + "$id": "3850", "kind": "model", "name": "TranscriptionWord", "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", @@ -28313,13 +36111,13 @@ "decorators": [], "properties": [ { - "$id": "3046", + "$id": "3851", "kind": "property", "name": "word", "serializedName": "word", "description": "The text content of the word.", "type": { - "$id": "3047", + "$id": "3852", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28332,18 +36130,18 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" }, { - "$id": "3048", + "$id": "3853", "kind": "property", "name": "start", "serializedName": "start", "description": "Start time of the word in seconds.", "type": { - "$id": "3049", + "$id": "3854", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3050", + "$id": "3855", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28359,18 +36157,18 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" }, { - "$id": "3051", + "$id": "3856", "kind": "property", "name": "end", "serializedName": "end", "description": "End time of the word in seconds.", "type": { - "$id": "3052", + "$id": "3857", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3053", + "$id": "3858", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28397,17 +36195,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" }, { - "$id": "3054", + "$id": "3859", "kind": "property", "name": "segments", "serializedName": "segments", "description": "Segments of the transcribed text and their corresponding details.", "type": { - "$id": "3055", + "$id": "3860", "kind": "array", "name": "ArrayTranscriptionSegment", "valueType": { - "$id": "3056", + "$id": "3861", "kind": "model", "name": "TranscriptionSegment", "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", @@ -28415,13 +36213,13 @@ "decorators": [], "properties": [ { - "$id": "3057", + "$id": "3862", "kind": "property", "name": "id", "serializedName": "id", "description": "Unique identifier of the segment.", "type": { - "$id": "3058", + "$id": "3863", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -28434,13 +36232,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" }, { - "$id": "3059", + "$id": "3864", "kind": "property", "name": "seek", "serializedName": "seek", "description": "Seek offset of the segment.", "type": { - "$id": "3060", + "$id": "3865", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -28453,18 +36251,18 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" }, { - "$id": "3061", + "$id": "3866", "kind": "property", "name": "start", "serializedName": "start", "description": "Start time of the segment in seconds.", "type": { - "$id": "3062", + "$id": "3867", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3063", + "$id": "3868", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28480,18 +36278,18 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" }, { - "$id": "3064", + "$id": "3869", "kind": "property", "name": "end", "serializedName": "end", "description": "End time of the segment in seconds.", "type": { - "$id": "3065", + "$id": "3870", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3066", + "$id": "3871", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28507,13 +36305,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" }, { - "$id": "3067", + "$id": "3872", "kind": "property", "name": "text", "serializedName": "text", "description": "Text content of the segment.", "type": { - "$id": "3068", + "$id": "3873", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28526,17 +36324,17 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" }, { - "$id": "3069", + "$id": "3874", "kind": "property", "name": "tokens", "serializedName": "tokens", "description": "Array of token IDs for the text content.", "type": { - "$id": "3070", + "$id": "3875", "kind": "array", "name": "Array", "valueType": { - "$id": "3071", + "$id": "3876", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -28552,13 +36350,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" }, { - "$id": "3072", + "$id": "3877", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "Temperature parameter used for generating the segment.", "type": { - "$id": "3073", + "$id": "3878", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28571,13 +36369,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" }, { - "$id": "3074", + "$id": "3879", "kind": "property", "name": "avg_logprob", "serializedName": "avg_logprob", "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", "type": { - "$id": "3075", + "$id": "3880", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28590,13 +36388,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" }, { - "$id": "3076", + "$id": "3881", "kind": "property", "name": "compression_ratio", "serializedName": "compression_ratio", "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", "type": { - "$id": "3077", + "$id": "3882", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28609,13 +36407,13 @@ "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" }, { - "$id": "3078", + "$id": "3883", "kind": "property", "name": "no_speech_prob", "serializedName": "no_speech_prob", "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", "type": { - "$id": "3079", + "$id": "3884", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28641,13 +36439,13 @@ ] }, { - "$ref": "3045" + "$ref": "3850" }, { - "$ref": "3056" + "$ref": "3861" }, { - "$id": "3080", + "$id": "3885", "kind": "model", "name": "CreateTranscriptionResponseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", @@ -28656,13 +36454,13 @@ "decorators": [], "properties": [ { - "$id": "3081", + "$id": "3886", "kind": "property", "name": "text", "serializedName": "text", "description": "The transcribed text.", "type": { - "$id": "3082", + "$id": "3887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28677,7 +36475,7 @@ ] }, { - "$id": "3083", + "$id": "3888", "kind": "model", "name": "CreateTranslationRequest", "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", @@ -28685,13 +36483,13 @@ "decorators": [], "properties": [ { - "$id": "3084", + "$id": "3889", "kind": "property", "name": "file", "serializedName": "file", "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { - "$id": "3085", + "$id": "3890", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -28705,13 +36503,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" }, { - "$id": "3086", + "$id": "3891", "kind": "property", "name": "model", "serializedName": "model", "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { - "$ref": "915" + "$ref": "1104" }, "optional": false, "readOnly": false, @@ -28720,13 +36518,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" }, { - "$id": "3087", + "$id": "3892", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", "type": { - "$id": "3088", + "$id": "3893", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28739,13 +36537,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" }, { - "$id": "3089", + "$id": "3894", "kind": "property", "name": "response_format", "serializedName": "response_format", "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { - "$ref": "919" + "$ref": "1108" }, "optional": true, "readOnly": false, @@ -28754,13 +36552,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" }, { - "$id": "3090", + "$id": "3895", "kind": "property", "name": "temperature", "serializedName": "temperature", "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { - "$id": "3091", + "$id": "3896", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28775,7 +36573,7 @@ ] }, { - "$id": "3092", + "$id": "3897", "kind": "model", "name": "CreateTranslationResponseVerboseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", @@ -28783,16 +36581,16 @@ "decorators": [], "properties": [ { - "$id": "3093", + "$id": "3898", "kind": "property", "name": "task", "serializedName": "task", "description": "The task label.", "type": { - "$id": "3094", + "$id": "3899", "kind": "constant", "valueType": { - "$ref": "931" + "$ref": "1120" }, "value": "translate", "decorators": [] @@ -28804,13 +36602,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" }, { - "$id": "3095", + "$id": "3900", "kind": "property", "name": "language", "serializedName": "language", "description": "The language of the output translation (always `english`).", "type": { - "$id": "3096", + "$id": "3901", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28823,18 +36621,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" }, { - "$id": "3097", + "$id": "3902", "kind": "property", "name": "duration", "serializedName": "duration", "description": "The duration of the input audio.", "type": { - "$id": "3098", + "$id": "3903", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "3099", + "$id": "3904", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -28850,13 +36648,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" }, { - "$id": "3100", + "$id": "3905", "kind": "property", "name": "text", "serializedName": "text", "description": "The translated text.", "type": { - "$id": "3101", + "$id": "3906", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28869,17 +36667,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" }, { - "$id": "3102", + "$id": "3907", "kind": "property", "name": "segments", "serializedName": "segments", "description": "Segments of the translated text and their corresponding details.", "type": { - "$id": "3103", + "$id": "3908", "kind": "array", "name": "ArrayTranscriptionSegment", "valueType": { - "$ref": "3056" + "$ref": "3861" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -28893,7 +36691,7 @@ ] }, { - "$id": "3104", + "$id": "3909", "kind": "model", "name": "CreateTranslationResponseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", @@ -28901,12 +36699,12 @@ "decorators": [], "properties": [ { - "$id": "3105", + "$id": "3910", "kind": "property", "name": "text", "serializedName": "text", "type": { - "$id": "3106", + "$id": "3911", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28921,7 +36719,7 @@ ] }, { - "$id": "3107", + "$id": "3912", "kind": "model", "name": "AssistantResponseFormat", "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", @@ -28929,12 +36727,12 @@ "usage": "Input", "decorators": [], "discriminatorProperty": { - "$id": "3108", + "$id": "3913", "kind": "property", "name": "type", "serializedName": "type", "type": { - "$id": "3109", + "$id": "3914", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28948,13 +36746,13 @@ }, "properties": [ { - "$ref": "3108" + "$ref": "3913" } ], "discriminatedSubtypes": { - "$id": "3110", + "$id": "3915", "text": { - "$id": "3111", + "$id": "3916", "kind": "model", "name": "AssistantResponseFormatText", "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", @@ -28962,20 +36760,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "3107" + "$ref": "3912" }, "properties": [ { - "$id": "3112", + "$id": "3917", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `text`", "type": { - "$id": "3113", + "$id": "3918", "kind": "constant", "valueType": { - "$id": "3114", + "$id": "3919", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -28993,7 +36791,7 @@ ] }, "json_object": { - "$id": "3115", + "$id": "3920", "kind": "model", "name": "AssistantResponseFormatJsonObject", "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", @@ -29001,20 +36799,20 @@ "discriminatorValue": "json_object", "decorators": [], "baseModel": { - "$ref": "3107" + "$ref": "3912" }, "properties": [ { - "$id": "3116", + "$id": "3921", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `json_object`", "type": { - "$id": "3117", + "$id": "3922", "kind": "constant", "valueType": { - "$id": "3118", + "$id": "3923", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29032,7 +36830,7 @@ ] }, "json_schema": { - "$id": "3119", + "$id": "3924", "kind": "model", "name": "AssistantResponseFormatJsonSchema", "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", @@ -29040,20 +36838,20 @@ "discriminatorValue": "json_schema", "decorators": [], "baseModel": { - "$ref": "3107" + "$ref": "3912" }, "properties": [ { - "$id": "3120", + "$id": "3925", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of response format being defined: `json_schema`", "type": { - "$id": "3121", + "$id": "3926", "kind": "constant", "valueType": { - "$id": "3122", + "$id": "3927", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29069,12 +36867,12 @@ "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" }, { - "$id": "3123", + "$id": "3928", "kind": "property", "name": "json_schema", "serializedName": "json_schema", "type": { - "$ref": "1504" + "$ref": "1693" }, "optional": false, "readOnly": false, @@ -29087,16 +36885,16 @@ } }, { - "$ref": "3111" + "$ref": "3916" }, { - "$ref": "3115" + "$ref": "3920" }, { - "$ref": "3119" + "$ref": "3924" }, { - "$id": "3124", + "$id": "3929", "kind": "model", "name": "BatchRequestInput", "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", @@ -29106,13 +36904,13 @@ "decorators": [], "properties": [ { - "$id": "3125", + "$id": "3930", "kind": "property", "name": "custom_id", "serializedName": "custom_id", "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", "type": { - "$id": "3126", + "$id": "3931", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29125,16 +36923,16 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" }, { - "$id": "3127", + "$id": "3932", "kind": "property", "name": "method", "serializedName": "method", "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", "type": { - "$id": "3128", + "$id": "3933", "kind": "constant", "valueType": { - "$ref": "934" + "$ref": "1123" }, "value": "POST", "decorators": [] @@ -29146,13 +36944,13 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" }, { - "$id": "3129", + "$id": "3934", "kind": "property", "name": "url", "serializedName": "url", "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", "type": { - "$id": "3130", + "$id": "3935", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -29167,7 +36965,7 @@ ] }, { - "$id": "3131", + "$id": "3936", "kind": "model", "name": "BatchRequestOutput", "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", @@ -29177,12 +36975,12 @@ "decorators": [], "properties": [ { - "$id": "3132", + "$id": "3937", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "3133", + "$id": "3938", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29195,13 +36993,13 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" }, { - "$id": "3134", + "$id": "3939", "kind": "property", "name": "custom_id", "serializedName": "custom_id", "description": "A developer-provided per-request id that will be used to match outputs to inputs.", "type": { - "$id": "3135", + "$id": "3940", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29214,15 +37012,15 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" }, { - "$id": "3136", + "$id": "3941", "kind": "property", "name": "response", "serializedName": "response", "type": { - "$id": "3137", + "$id": "3942", "kind": "nullable", "type": { - "$id": "3138", + "$id": "3943", "kind": "model", "name": "BatchRequestOutputResponse", "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", @@ -29230,13 +37028,13 @@ "decorators": [], "properties": [ { - "$id": "3139", + "$id": "3944", "kind": "property", "name": "status_code", "serializedName": "status_code", "description": "The HTTP status code of the response", "type": { - "$id": "3140", + "$id": "3945", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -29249,13 +37047,13 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" }, { - "$id": "3141", + "$id": "3946", "kind": "property", "name": "request_id", "serializedName": "request_id", "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", "type": { - "$id": "3142", + "$id": "3947", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29268,23 +37066,23 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" }, { - "$id": "3143", + "$id": "3948", "kind": "property", "name": "body", "serializedName": "body", "description": "The JSON body of the response", "type": { - "$id": "3144", + "$id": "3949", "kind": "dict", "keyType": { - "$id": "3145", + "$id": "3950", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "3146", + "$id": "3951", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -29308,16 +37106,16 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" }, { - "$id": "3147", + "$id": "3952", "kind": "property", "name": "error", "serializedName": "error", "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", "type": { - "$id": "3148", + "$id": "3953", "kind": "nullable", "type": { - "$id": "3149", + "$id": "3954", "kind": "model", "name": "BatchRequestOutputError", "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", @@ -29325,13 +37123,13 @@ "decorators": [], "properties": [ { - "$id": "3150", + "$id": "3955", "kind": "property", "name": "code", "serializedName": "code", "description": "A machine-readable error code.", "type": { - "$id": "3151", + "$id": "3956", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29344,13 +37142,13 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" }, { - "$id": "3152", + "$id": "3957", "kind": "property", "name": "message", "serializedName": "message", "description": "A human-readable error message.", "type": { - "$id": "3153", + "$id": "3958", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29374,13 +37172,13 @@ ] }, { - "$ref": "3138" + "$ref": "3943" }, { - "$ref": "3149" + "$ref": "3954" }, { - "$id": "3154", + "$id": "3959", "kind": "model", "name": "ChatCompletionFunctionChoice", "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", @@ -29390,7 +37188,7 @@ "properties": [] }, { - "$id": "3155", + "$id": "3960", "kind": "model", "name": "ChatCompletionToolChoice", "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", @@ -29400,7 +37198,17 @@ "properties": [] }, { - "$id": "3156", + "$id": "3961", + "kind": "model", + "name": "ChatMessageContent", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3962", "kind": "model", "name": "ChatMessageContentPart", "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", @@ -29410,7 +37218,7 @@ "properties": [] }, { - "$id": "3157", + "$id": "3963", "kind": "model", "name": "CreateChatCompletionFunctionResponse", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", @@ -29420,13 +37228,13 @@ "decorators": [], "properties": [ { - "$id": "3158", + "$id": "3964", "kind": "property", "name": "id", "serializedName": "id", "description": "A unique identifier for the chat completion.", "type": { - "$id": "3159", + "$id": "3965", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29439,17 +37247,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" }, { - "$id": "3160", + "$id": "3966", "kind": "property", "name": "choices", "serializedName": "choices", "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { - "$id": "3161", + "$id": "3967", "kind": "array", "name": "Array", "valueType": { - "$id": "3162", + "$id": "3968", "kind": "model", "name": "CreateChatCompletionFunctionResponseChoice", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", @@ -29457,13 +37265,13 @@ "decorators": [], "properties": [ { - "$id": "3163", + "$id": "3969", "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", "type": { - "$ref": "937" + "$ref": "1126" }, "optional": false, "readOnly": false, @@ -29472,13 +37280,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" }, { - "$id": "3164", + "$id": "3970", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the choice in the list of choices.", "type": { - "$id": "3165", + "$id": "3971", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -29491,12 +37299,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" }, { - "$id": "3166", + "$id": "3972", "kind": "property", "name": "message", "serializedName": "message", "type": { - "$ref": "2718" + "$ref": "3523" }, "optional": false, "readOnly": false, @@ -29516,18 +37324,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" }, { - "$id": "3167", + "$id": "3973", "kind": "property", "name": "created", "serializedName": "created", "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { - "$id": "3168", + "$id": "3974", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "3169", + "$id": "3975", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -29543,13 +37351,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" }, { - "$id": "3170", + "$id": "3976", "kind": "property", "name": "model", "serializedName": "model", "description": "The model used for the chat completion.", "type": { - "$id": "3171", + "$id": "3977", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29562,13 +37370,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" }, { - "$id": "3172", + "$id": "3978", "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { - "$id": "3173", + "$id": "3979", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29581,16 +37389,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" }, { - "$id": "3174", + "$id": "3980", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `chat.completion`.", "type": { - "$id": "3175", + "$id": "3981", "kind": "constant", "valueType": { - "$ref": "947" + "$ref": "1136" }, "value": "chat.completion", "decorators": [] @@ -29602,12 +37410,12 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" }, { - "$id": "3176", + "$id": "3982", "kind": "property", "name": "usage", "serializedName": "usage", "type": { - "$ref": "2492" + "$ref": "3297" }, "optional": true, "readOnly": false, @@ -29618,10 +37426,10 @@ ] }, { - "$ref": "3162" + "$ref": "3968" }, { - "$id": "3177", + "$id": "3983", "kind": "model", "name": "ChatCompletionStreamResponseDelta", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", @@ -29630,16 +37438,16 @@ "decorators": [], "properties": [ { - "$id": "3178", + "$id": "3984", "kind": "property", "name": "content", "serializedName": "content", "description": "The contents of the chunk message.", "type": { - "$id": "3179", + "$id": "3985", "kind": "nullable", "type": { - "$id": "3180", + "$id": "3986", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29653,13 +37461,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" }, { - "$id": "3181", + "$id": "3987", "kind": "property", "name": "function_call", "serializedName": "function_call", "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { - "$id": "3182", + "$id": "3988", "kind": "model", "name": "ChatCompletionStreamResponseDeltaFunctionCall", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", @@ -29667,13 +37475,13 @@ "decorators": [], "properties": [ { - "$id": "3183", + "$id": "3989", "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", "type": { - "$id": "3184", + "$id": "3990", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29683,16 +37491,16 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" }, { - "$id": "3185", + "$id": "3991", "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { - "$id": "3186", + "$id": "3992", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29702,7 +37510,7 @@ "readOnly": false, "discriminator": false, "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" } ] }, @@ -29713,16 +37521,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" }, { - "$id": "3187", + "$id": "3993", "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", "type": { - "$id": "3188", + "$id": "3994", "kind": "array", "name": "ArrayChatCompletionMessageToolCallChunk", "valueType": { - "$id": "3189", + "$id": "3995", "kind": "model", "name": "ChatCompletionMessageToolCallChunk", "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", @@ -29730,12 +37538,12 @@ "decorators": [], "properties": [ { - "$id": "3190", + "$id": "3996", "kind": "property", "name": "index", "serializedName": "index", "type": { - "$id": "3191", + "$id": "3997", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -29748,13 +37556,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" }, { - "$id": "3192", + "$id": "3998", "kind": "property", "name": "id", "serializedName": "id", "description": "The ID of the tool call.", "type": { - "$id": "3193", + "$id": "3999", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29767,16 +37575,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" }, { - "$id": "3194", + "$id": "4000", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the tool. Currently, only `function` is supported.", "type": { - "$id": "3195", + "$id": "4001", "kind": "constant", "valueType": { - "$ref": "950" + "$ref": "1139" }, "value": "function", "decorators": [] @@ -29788,12 +37596,12 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" }, { - "$id": "3196", + "$id": "4002", "kind": "property", "name": "function", "serializedName": "function", "type": { - "$id": "3197", + "$id": "4003", "kind": "model", "name": "ChatCompletionMessageToolCallChunkFunction", "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", @@ -29801,13 +37609,13 @@ "decorators": [], "properties": [ { - "$id": "3198", + "$id": "4004", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function to call.", "type": { - "$id": "3199", + "$id": "4005", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29820,13 +37628,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" }, { - "$id": "3200", + "$id": "4006", "kind": "property", "name": "arguments", "serializedName": "arguments", "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { - "$id": "3201", + "$id": "4007", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29858,13 +37666,13 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" }, { - "$id": "3202", + "$id": "4008", "kind": "property", "name": "role", "serializedName": "role", "description": "The role of the author of this message.", "type": { - "$ref": "953" + "$ref": "1142" }, "optional": true, "readOnly": false, @@ -29873,16 +37681,16 @@ "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" }, { - "$id": "3203", + "$id": "4009", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "The refusal message generated by the model.", "type": { - "$id": "3204", + "$id": "4010", "kind": "nullable", "type": { - "$id": "3205", + "$id": "4011", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29898,16 +37706,16 @@ ] }, { - "$ref": "3182" + "$ref": "3988" }, { - "$ref": "3189" + "$ref": "3995" }, { - "$ref": "3197" + "$ref": "4003" }, { - "$id": "3206", + "$id": "4012", "kind": "model", "name": "CreateChatCompletionStreamResponse", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", @@ -29917,13 +37725,13 @@ "decorators": [], "properties": [ { - "$id": "3207", + "$id": "4013", "kind": "property", "name": "id", "serializedName": "id", "description": "A unique identifier for the chat completion. Each chunk has the same ID.", "type": { - "$id": "3208", + "$id": "4014", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -29936,17 +37744,17 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" }, { - "$id": "3209", + "$id": "4015", "kind": "property", "name": "choices", "serializedName": "choices", "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", "type": { - "$id": "3210", + "$id": "4016", "kind": "array", "name": "Array", "valueType": { - "$id": "3211", + "$id": "4017", "kind": "model", "name": "CreateChatCompletionStreamResponseChoice", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", @@ -29954,12 +37762,12 @@ "decorators": [], "properties": [ { - "$id": "3212", + "$id": "4018", "kind": "property", "name": "delta", "serializedName": "delta", "type": { - "$ref": "3177" + "$ref": "3983" }, "optional": false, "readOnly": false, @@ -29968,16 +37776,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" }, { - "$id": "3213", + "$id": "4019", "kind": "property", "name": "logprobs", "serializedName": "logprobs", "description": "Log probability information for the choice.", "type": { - "$id": "3214", + "$id": "4020", "kind": "nullable", "type": { - "$id": "3215", + "$id": "4021", "kind": "model", "name": "CreateChatCompletionStreamResponseChoiceLogprobs", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", @@ -29985,20 +37793,20 @@ "decorators": [], "properties": [ { - "$id": "3216", + "$id": "4022", "kind": "property", "name": "content", "serializedName": "content", "description": "A list of message content tokens with log probability information.", "type": { - "$id": "3217", + "$id": "4023", "kind": "nullable", "type": { - "$id": "3218", + "$id": "4024", "kind": "array", "name": "ArrayChatCompletionTokenLogprob", "valueType": { - "$ref": "2741" + "$ref": "3546" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -30011,20 +37819,20 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" }, { - "$id": "3219", + "$id": "4025", "kind": "property", "name": "refusal", "serializedName": "refusal", "description": "A list of message refusal tokens with log probability information.", "type": { - "$id": "3220", + "$id": "4026", "kind": "nullable", "type": { - "$id": "3221", + "$id": "4027", "kind": "array", "name": "ArrayChatCompletionTokenLogprob", "valueType": { - "$ref": "2741" + "$ref": "3546" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -30046,16 +37854,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" }, { - "$id": "3222", + "$id": "4028", "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { - "$id": "3223", + "$id": "4029", "kind": "nullable", "type": { - "$ref": "963" + "$ref": "1152" } }, "optional": false, @@ -30065,13 +37873,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" }, { - "$id": "3224", + "$id": "4030", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the choice in the list of choices.", "type": { - "$id": "3225", + "$id": "4031", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30095,18 +37903,18 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" }, { - "$id": "3226", + "$id": "4032", "kind": "property", "name": "created", "serializedName": "created", "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", "type": { - "$id": "3227", + "$id": "4033", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "3228", + "$id": "4034", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30122,13 +37930,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" }, { - "$id": "3229", + "$id": "4035", "kind": "property", "name": "model", "serializedName": "model", "description": "The model to generate the completion.", "type": { - "$id": "3230", + "$id": "4036", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30141,16 +37949,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" }, { - "$id": "3231", + "$id": "4037", "kind": "property", "name": "service_tier", "serializedName": "service_tier", "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { - "$id": "3232", + "$id": "4038", "kind": "nullable", "type": { - "$ref": "975" + "$ref": "1164" } }, "optional": true, @@ -30160,13 +37968,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" }, { - "$id": "3233", + "$id": "4039", "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { - "$id": "3234", + "$id": "4040", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30179,16 +37987,16 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" }, { - "$id": "3235", + "$id": "4041", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `chat.completion.chunk`.", "type": { - "$id": "3236", + "$id": "4042", "kind": "constant", "valueType": { - "$ref": "981" + "$ref": "1170" }, "value": "chat.completion.chunk", "decorators": [] @@ -30200,13 +38008,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" }, { - "$id": "3237", + "$id": "4043", "kind": "property", "name": "usage", "serializedName": "usage", "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", "type": { - "$id": "3238", + "$id": "4044", "kind": "model", "name": "CreateChatCompletionStreamResponseUsage", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", @@ -30214,13 +38022,13 @@ "decorators": [], "properties": [ { - "$id": "3239", + "$id": "4045", "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", "description": "Number of tokens in the generated completion.", "type": { - "$id": "3240", + "$id": "4046", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30233,13 +38041,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" }, { - "$id": "3241", + "$id": "4047", "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", "description": "Number of tokens in the prompt.", "type": { - "$id": "3242", + "$id": "4048", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30252,13 +38060,13 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" }, { - "$id": "3243", + "$id": "4049", "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", "description": "Total number of tokens used in the request (prompt + completion).", "type": { - "$id": "3244", + "$id": "4050", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30281,16 +38089,16 @@ ] }, { - "$ref": "3211" + "$ref": "4017" }, { - "$ref": "3215" + "$ref": "4021" }, { - "$ref": "3238" + "$ref": "4044" }, { - "$id": "3245", + "$id": "4051", "kind": "model", "name": "FinetuneChatRequestInput", "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", @@ -30300,42 +38108,42 @@ "decorators": [], "properties": [ { - "$id": "3246", + "$id": "4052", "kind": "property", "name": "messages", "serializedName": "messages", "type": { - "$id": "3247", + "$id": "4053", "kind": "array", "name": "Array", "valueType": { - "$id": "3248", + "$id": "4054", "kind": "union", "name": "FinetuneChatRequestInputMessage", "variantTypes": [ { - "$ref": "2510" + "$ref": "3315" }, { - "$ref": "2526" + "$ref": "3331" }, { - "$id": "3249", + "$id": "4055", "kind": "model", "name": "FineTuneChatCompletionRequestAssistantMessage", "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", "usage": "Input", "decorators": [], "baseModel": { - "$ref": "2545" + "$ref": "3350" }, "properties": [] }, { - "$ref": "2585" + "$ref": "3390" }, { - "$ref": "2596" + "$ref": "3401" } ], "decorators": [] @@ -30350,17 +38158,17 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" }, { - "$id": "3250", + "$id": "4056", "kind": "property", "name": "tools", "serializedName": "tools", "description": "A list of tools the model may generate JSON inputs for.", "type": { - "$id": "3251", + "$id": "4057", "kind": "array", "name": "ArrayChatCompletionTool", "valueType": { - "$ref": "2674" + "$ref": "3479" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -30372,12 +38180,12 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" }, { - "$id": "3252", + "$id": "4058", "kind": "property", "name": "parallel_tool_calls", "serializedName": "parallel_tool_calls", "type": { - "$id": "3253", + "$id": "4059", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -30390,17 +38198,17 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" }, { - "$id": "3254", + "$id": "4060", "kind": "property", "name": "functions", "serializedName": "functions", "description": "A list of functions the model may generate JSON inputs for.", "type": { - "$id": "3255", + "$id": "4061", "kind": "array", "name": "ArrayChatCompletionFunctions", "valueType": { - "$ref": "2702" + "$ref": "3507" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -30414,10 +38222,10 @@ ] }, { - "$ref": "3249" + "$ref": "4055" }, { - "$id": "3256", + "$id": "4062", "kind": "model", "name": "FinetuneCompletionRequestInput", "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", @@ -30427,13 +38235,13 @@ "decorators": [], "properties": [ { - "$id": "3257", + "$id": "4063", "kind": "property", "name": "prompt", "serializedName": "prompt", "description": "The input prompt for this training example.", "type": { - "$id": "3258", + "$id": "4064", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30446,13 +38254,13 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" }, { - "$id": "3259", + "$id": "4065", "kind": "property", "name": "completion", "serializedName": "completion", "description": "The desired completion for this training example.", "type": { - "$id": "3260", + "$id": "4066", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30467,7 +38275,7 @@ ] }, { - "$id": "3261", + "$id": "4067", "kind": "model", "name": "MessageContentTextObjectAnnotation", "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", @@ -30475,13 +38283,13 @@ "usage": "Input,Output", "decorators": [], "discriminatorProperty": { - "$id": "3262", + "$id": "4068", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the content item.", "type": { - "$id": "3263", + "$id": "4069", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30495,13 +38303,13 @@ }, "properties": [ { - "$ref": "3262" + "$ref": "4068" } ], "discriminatedSubtypes": { - "$id": "3264", + "$id": "4070", "file_citation": { - "$id": "3265", + "$id": "4071", "kind": "model", "name": "MessageContentTextAnnotationsFileCitationObject", "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", @@ -30511,20 +38319,20 @@ "discriminatorValue": "file_citation", "decorators": [], "baseModel": { - "$ref": "3261" + "$ref": "4067" }, "properties": [ { - "$id": "3266", + "$id": "4072", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `file_citation`.", "type": { - "$id": "3267", + "$id": "4073", "kind": "constant", "valueType": { - "$id": "3268", + "$id": "4074", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30540,13 +38348,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" }, { - "$id": "3269", + "$id": "4075", "kind": "property", "name": "text", "serializedName": "text", "description": "The text in the message content that needs to be replaced.", "type": { - "$id": "3270", + "$id": "4076", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30559,12 +38367,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" }, { - "$id": "3271", + "$id": "4077", "kind": "property", "name": "file_citation", "serializedName": "file_citation", "type": { - "$id": "3272", + "$id": "4078", "kind": "model", "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", @@ -30572,13 +38380,13 @@ "decorators": [], "properties": [ { - "$id": "3273", + "$id": "4079", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The ID of the specific File the citation is from.", "type": { - "$id": "3274", + "$id": "4080", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30599,12 +38407,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" }, { - "$id": "3275", + "$id": "4081", "kind": "property", "name": "start_index", "serializedName": "start_index", "type": { - "$id": "3276", + "$id": "4082", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30617,12 +38425,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" }, { - "$id": "3277", + "$id": "4083", "kind": "property", "name": "end_index", "serializedName": "end_index", "type": { - "$id": "3278", + "$id": "4084", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30637,7 +38445,7 @@ ] }, "file_path": { - "$id": "3279", + "$id": "4085", "kind": "model", "name": "MessageContentTextAnnotationsFilePathObject", "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", @@ -30647,20 +38455,20 @@ "discriminatorValue": "file_path", "decorators": [], "baseModel": { - "$ref": "3261" + "$ref": "4067" }, "properties": [ { - "$id": "3280", + "$id": "4086", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `file_path`.", "type": { - "$id": "3281", + "$id": "4087", "kind": "constant", "valueType": { - "$id": "3282", + "$id": "4088", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30676,13 +38484,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" }, { - "$id": "3283", + "$id": "4089", "kind": "property", "name": "text", "serializedName": "text", "description": "The text in the message content that needs to be replaced.", "type": { - "$id": "3284", + "$id": "4090", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30695,12 +38503,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" }, { - "$id": "3285", + "$id": "4091", "kind": "property", "name": "file_path", "serializedName": "file_path", "type": { - "$id": "3286", + "$id": "4092", "kind": "model", "name": "MessageContentTextAnnotationsFilePathObjectFilePath", "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", @@ -30708,13 +38516,13 @@ "decorators": [], "properties": [ { - "$id": "3287", + "$id": "4093", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The ID of the file that was generated.", "type": { - "$id": "3288", + "$id": "4094", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30735,12 +38543,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" }, { - "$id": "3289", + "$id": "4095", "kind": "property", "name": "start_index", "serializedName": "start_index", "type": { - "$id": "3290", + "$id": "4096", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30753,12 +38561,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" }, { - "$id": "3291", + "$id": "4097", "kind": "property", "name": "end_index", "serializedName": "end_index", "type": { - "$id": "3292", + "$id": "4098", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30775,19 +38583,19 @@ } }, { - "$ref": "3265" + "$ref": "4071" }, { - "$ref": "3272" + "$ref": "4078" }, { - "$ref": "3279" + "$ref": "4085" }, { - "$ref": "3286" + "$ref": "4092" }, { - "$id": "3293", + "$id": "4099", "kind": "model", "name": "MessageDeltaContent", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", @@ -30796,13 +38604,13 @@ "description": "Represents a single piece of incremental content in an Assistants API streaming response.", "decorators": [], "discriminatorProperty": { - "$id": "3294", + "$id": "4100", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the content item.", "type": { - "$id": "3295", + "$id": "4101", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30816,13 +38624,13 @@ }, "properties": [ { - "$ref": "3294" + "$ref": "4100" } ], "discriminatedSubtypes": { - "$id": "3296", + "$id": "4102", "image_file": { - "$id": "3297", + "$id": "4103", "kind": "model", "name": "MessageDeltaContentImageFileObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", @@ -30832,17 +38640,17 @@ "discriminatorValue": "image_file", "decorators": [], "baseModel": { - "$ref": "3293" + "$ref": "4099" }, "properties": [ { - "$id": "3298", + "$id": "4104", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the content part in the message.", "type": { - "$id": "3299", + "$id": "4105", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30855,16 +38663,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" }, { - "$id": "3300", + "$id": "4106", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `image_file`.", "type": { - "$id": "3301", + "$id": "4107", "kind": "constant", "valueType": { - "$id": "3302", + "$id": "4108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30880,12 +38688,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" }, { - "$id": "3303", + "$id": "4109", "kind": "property", "name": "image_file", "serializedName": "image_file", "type": { - "$id": "3304", + "$id": "4110", "kind": "model", "name": "MessageDeltaContentImageFileObjectImageFile", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", @@ -30893,13 +38701,13 @@ "decorators": [], "properties": [ { - "$id": "3305", + "$id": "4111", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { - "$id": "3306", + "$id": "4112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30912,13 +38720,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" }, { - "$id": "3307", + "$id": "4113", "kind": "property", "name": "detail", "serializedName": "detail", "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { - "$ref": "984" + "$ref": "1173" }, "optional": true, "readOnly": false, @@ -30937,7 +38745,7 @@ ] }, "image_url": { - "$id": "3308", + "$id": "4114", "kind": "model", "name": "MessageDeltaContentImageUrlObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", @@ -30947,17 +38755,17 @@ "discriminatorValue": "image_url", "decorators": [], "baseModel": { - "$ref": "3293" + "$ref": "4099" }, "properties": [ { - "$id": "3309", + "$id": "4115", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the content part in the message.", "type": { - "$id": "3310", + "$id": "4116", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -30970,16 +38778,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" }, { - "$id": "3311", + "$id": "4117", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `image_url`.", "type": { - "$id": "3312", + "$id": "4118", "kind": "constant", "valueType": { - "$id": "3313", + "$id": "4119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -30995,12 +38803,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" }, { - "$id": "3314", + "$id": "4120", "kind": "property", "name": "image_url", "serializedName": "image_url", "type": { - "$id": "3315", + "$id": "4121", "kind": "model", "name": "MessageDeltaContentImageUrlObjectImageUrl", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", @@ -31008,13 +38816,13 @@ "decorators": [], "properties": [ { - "$id": "3316", + "$id": "4122", "kind": "property", "name": "url", "serializedName": "url", "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { - "$id": "3317", + "$id": "4123", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -31027,13 +38835,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" }, { - "$id": "3318", + "$id": "4124", "kind": "property", "name": "detail", "serializedName": "detail", "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { - "$ref": "992" + "$ref": "1181" }, "optional": true, "readOnly": false, @@ -31052,7 +38860,7 @@ ] }, "text": { - "$id": "3319", + "$id": "4125", "kind": "model", "name": "MessageDeltaContentTextObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", @@ -31062,17 +38870,17 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "3293" + "$ref": "4099" }, "properties": [ { - "$id": "3320", + "$id": "4126", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the content part in the message.", "type": { - "$id": "3321", + "$id": "4127", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31085,16 +38893,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" }, { - "$id": "3322", + "$id": "4128", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `text`.", "type": { - "$id": "3323", + "$id": "4129", "kind": "constant", "valueType": { - "$id": "3324", + "$id": "4130", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31110,12 +38918,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" }, { - "$id": "3325", + "$id": "4131", "kind": "property", "name": "text", "serializedName": "text", "type": { - "$id": "3326", + "$id": "4132", "kind": "model", "name": "MessageDeltaContentTextObjectText", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", @@ -31123,13 +38931,13 @@ "decorators": [], "properties": [ { - "$id": "3327", + "$id": "4133", "kind": "property", "name": "value", "serializedName": "value", "description": "The data that makes up the text.", "type": { - "$id": "3328", + "$id": "4134", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31142,16 +38950,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" }, { - "$id": "3329", + "$id": "4135", "kind": "property", "name": "annotations", "serializedName": "annotations", "type": { - "$id": "3330", + "$id": "4136", "kind": "array", "name": "ArrayMessageDeltaTextContentAnnotation", "valueType": { - "$id": "3331", + "$id": "4137", "kind": "model", "name": "MessageDeltaTextContentAnnotation", "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", @@ -31159,13 +38967,13 @@ "usage": "Output", "decorators": [], "discriminatorProperty": { - "$id": "3332", + "$id": "4138", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the content item.", "type": { - "$id": "3333", + "$id": "4139", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31179,13 +38987,13 @@ }, "properties": [ { - "$ref": "3332" + "$ref": "4138" } ], "discriminatedSubtypes": { - "$id": "3334", + "$id": "4140", "file_citation": { - "$id": "3335", + "$id": "4141", "kind": "model", "name": "MessageDeltaContentTextAnnotationsFileCitationObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", @@ -31195,17 +39003,17 @@ "discriminatorValue": "file_citation", "decorators": [], "baseModel": { - "$ref": "3331" + "$ref": "4137" }, "properties": [ { - "$id": "3336", + "$id": "4142", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the annotation in the text content part.", "type": { - "$id": "3337", + "$id": "4143", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31218,16 +39026,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" }, { - "$id": "3338", + "$id": "4144", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `file_citation`.", "type": { - "$id": "3339", + "$id": "4145", "kind": "constant", "valueType": { - "$id": "3340", + "$id": "4146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31243,13 +39051,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" }, { - "$id": "3341", + "$id": "4147", "kind": "property", "name": "text", "serializedName": "text", "description": "The text in the message content that needs to be replaced.", "type": { - "$id": "3342", + "$id": "4148", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31262,12 +39070,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" }, { - "$id": "3343", + "$id": "4149", "kind": "property", "name": "file_citation", "serializedName": "file_citation", "type": { - "$id": "3344", + "$id": "4150", "kind": "model", "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", @@ -31275,13 +39083,13 @@ "decorators": [], "properties": [ { - "$id": "3345", + "$id": "4151", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The ID of the specific File the citation is from.", "type": { - "$id": "3346", + "$id": "4152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31294,13 +39102,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" }, { - "$id": "3347", + "$id": "4153", "kind": "property", "name": "quote", "serializedName": "quote", "description": "The specific quote in the file.", "type": { - "$id": "3348", + "$id": "4154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31321,12 +39129,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" }, { - "$id": "3349", + "$id": "4155", "kind": "property", "name": "start_index", "serializedName": "start_index", "type": { - "$id": "3350", + "$id": "4156", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31339,12 +39147,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" }, { - "$id": "3351", + "$id": "4157", "kind": "property", "name": "end_index", "serializedName": "end_index", "type": { - "$id": "3352", + "$id": "4158", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31359,7 +39167,7 @@ ] }, "file_path": { - "$id": "3353", + "$id": "4159", "kind": "model", "name": "MessageDeltaContentTextAnnotationsFilePathObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", @@ -31369,17 +39177,17 @@ "discriminatorValue": "file_path", "decorators": [], "baseModel": { - "$ref": "3331" + "$ref": "4137" }, "properties": [ { - "$id": "3354", + "$id": "4160", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the annotation in the text content part.", "type": { - "$id": "3355", + "$id": "4161", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31392,16 +39200,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" }, { - "$id": "3356", + "$id": "4162", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `file_path`.", "type": { - "$id": "3357", + "$id": "4163", "kind": "constant", "valueType": { - "$id": "3358", + "$id": "4164", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31417,13 +39225,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" }, { - "$id": "3359", + "$id": "4165", "kind": "property", "name": "text", "serializedName": "text", "description": "The text in the message content that needs to be replaced.", "type": { - "$id": "3360", + "$id": "4166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31436,12 +39244,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" }, { - "$id": "3361", + "$id": "4167", "kind": "property", "name": "file_path", "serializedName": "file_path", "type": { - "$id": "3362", + "$id": "4168", "kind": "model", "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", @@ -31449,13 +39257,13 @@ "decorators": [], "properties": [ { - "$id": "3363", + "$id": "4169", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The ID of the file that was generated.", "type": { - "$id": "3364", + "$id": "4170", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31476,12 +39284,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" }, { - "$id": "3365", + "$id": "4171", "kind": "property", "name": "start_index", "serializedName": "start_index", "type": { - "$id": "3366", + "$id": "4172", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31494,12 +39302,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" }, { - "$id": "3367", + "$id": "4173", "kind": "property", "name": "end_index", "serializedName": "end_index", "type": { - "$id": "3368", + "$id": "4174", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31535,7 +39343,7 @@ ] }, "refusal": { - "$id": "3369", + "$id": "4175", "kind": "model", "name": "MessageDeltaContentRefusalObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", @@ -31544,17 +39352,17 @@ "discriminatorValue": "refusal", "decorators": [], "baseModel": { - "$ref": "3293" + "$ref": "4099" }, "properties": [ { - "$id": "3370", + "$id": "4176", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the refusal part in the message.", "type": { - "$id": "3371", + "$id": "4177", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -31567,16 +39375,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" }, { - "$id": "3372", + "$id": "4178", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `refusal`.", "type": { - "$id": "3373", + "$id": "4179", "kind": "constant", "valueType": { - "$id": "3374", + "$id": "4180", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31592,12 +39400,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" }, { - "$id": "3375", + "$id": "4181", "kind": "property", "name": "refusal", "serializedName": "refusal", "type": { - "$id": "3376", + "$id": "4182", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31614,43 +39422,43 @@ } }, { - "$ref": "3297" + "$ref": "4103" }, { - "$ref": "3304" + "$ref": "4110" }, { - "$ref": "3308" + "$ref": "4114" }, { - "$ref": "3315" + "$ref": "4121" }, { - "$ref": "3319" + "$ref": "4125" }, { - "$ref": "3326" + "$ref": "4132" }, { - "$ref": "3331" + "$ref": "4137" }, { - "$ref": "3335" + "$ref": "4141" }, { - "$ref": "3344" + "$ref": "4150" }, { - "$ref": "3353" + "$ref": "4159" }, { - "$ref": "3362" + "$ref": "4168" }, { - "$ref": "3369" + "$ref": "4175" }, { - "$id": "3377", + "$id": "4183", "kind": "model", "name": "MessageContentImageFileObject", "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", @@ -31659,20 +39467,20 @@ "description": "References an image [File](/docs/api-reference/files) in the content of a message.", "decorators": [], "baseModel": { - "$ref": "1341" + "$ref": "1530" }, "properties": [ { - "$id": "3378", + "$id": "4184", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `image_file`.", "type": { - "$id": "3379", + "$id": "4185", "kind": "constant", "valueType": { - "$ref": "1000" + "$ref": "1189" }, "value": "image_file", "decorators": [] @@ -31684,12 +39492,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" }, { - "$id": "3380", + "$id": "4186", "kind": "property", "name": "image_file", "serializedName": "image_file", "type": { - "$id": "3381", + "$id": "4187", "kind": "model", "name": "MessageContentImageFileObjectImageFile", "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", @@ -31697,13 +39505,13 @@ "decorators": [], "properties": [ { - "$id": "3382", + "$id": "4188", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { - "$id": "3383", + "$id": "4189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31716,13 +39524,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" }, { - "$id": "3384", + "$id": "4190", "kind": "property", "name": "detail", "serializedName": "detail", "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { - "$ref": "1003" + "$ref": "1192" }, "optional": true, "readOnly": false, @@ -31741,10 +39549,10 @@ ] }, { - "$ref": "3381" + "$ref": "4187" }, { - "$id": "3385", + "$id": "4191", "kind": "model", "name": "MessageContentTextObject", "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", @@ -31753,20 +39561,20 @@ "description": "The text content that is part of a message.", "decorators": [], "baseModel": { - "$ref": "1341" + "$ref": "1530" }, "properties": [ { - "$id": "3386", + "$id": "4192", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `text`.", "type": { - "$id": "3387", + "$id": "4193", "kind": "constant", "valueType": { - "$ref": "1011" + "$ref": "1200" }, "value": "text", "decorators": [] @@ -31778,12 +39586,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" }, { - "$id": "3388", + "$id": "4194", "kind": "property", "name": "text", "serializedName": "text", "type": { - "$id": "3389", + "$id": "4195", "kind": "model", "name": "MessageContentTextObjectText", "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", @@ -31791,13 +39599,13 @@ "decorators": [], "properties": [ { - "$id": "3390", + "$id": "4196", "kind": "property", "name": "value", "serializedName": "value", "description": "The data that makes up the text.", "type": { - "$id": "3391", + "$id": "4197", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31810,16 +39618,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" }, { - "$id": "3392", + "$id": "4198", "kind": "property", "name": "annotations", "serializedName": "annotations", "type": { - "$id": "3393", + "$id": "4199", "kind": "array", "name": "ArrayMessageContentTextObjectAnnotation", "valueType": { - "$ref": "3261" + "$ref": "4067" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -31841,10 +39649,10 @@ ] }, { - "$ref": "3389" + "$ref": "4195" }, { - "$id": "3394", + "$id": "4200", "kind": "model", "name": "MessageContentRefusalObject", "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", @@ -31853,20 +39661,20 @@ "description": "The refusal content generated by the assistant.", "decorators": [], "baseModel": { - "$ref": "1341" + "$ref": "1530" }, "properties": [ { - "$id": "3395", + "$id": "4201", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `refusal`.", "type": { - "$id": "3396", + "$id": "4202", "kind": "constant", "valueType": { - "$ref": "1014" + "$ref": "1203" }, "value": "refusal", "decorators": [] @@ -31878,12 +39686,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" }, { - "$id": "3397", + "$id": "4203", "kind": "property", "name": "refusal", "serializedName": "refusal", "type": { - "$id": "3398", + "$id": "4204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -31898,7 +39706,7 @@ ] }, { - "$id": "3399", + "$id": "4205", "kind": "model", "name": "MessageContentImageUrlObject", "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", @@ -31907,20 +39715,20 @@ "description": "References an image URL in the content of a message.", "decorators": [], "baseModel": { - "$ref": "1341" + "$ref": "1530" }, "properties": [ { - "$id": "3400", + "$id": "4206", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of the content part.", "type": { - "$id": "3401", + "$id": "4207", "kind": "constant", "valueType": { - "$ref": "1017" + "$ref": "1206" }, "value": "image_url", "decorators": [] @@ -31932,12 +39740,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" }, { - "$id": "3402", + "$id": "4208", "kind": "property", "name": "image_url", "serializedName": "image_url", "type": { - "$id": "3403", + "$id": "4209", "kind": "model", "name": "MessageContentImageUrlObjectImageUrl", "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", @@ -31945,13 +39753,13 @@ "decorators": [], "properties": [ { - "$id": "3404", + "$id": "4210", "kind": "property", "name": "url", "serializedName": "url", "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { - "$id": "3405", + "$id": "4211", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -31964,13 +39772,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" }, { - "$id": "3406", + "$id": "4212", "kind": "property", "name": "detail", "serializedName": "detail", "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", "type": { - "$ref": "1020" + "$ref": "1209" }, "optional": true, "readOnly": false, @@ -31989,10 +39797,10 @@ ] }, { - "$ref": "3403" + "$ref": "4209" }, { - "$id": "3407", + "$id": "4213", "kind": "model", "name": "MessageDeltaObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", @@ -32002,13 +39810,13 @@ "decorators": [], "properties": [ { - "$id": "3408", + "$id": "4214", "kind": "property", "name": "id", "serializedName": "id", "description": "The identifier of the message, which can be referenced in API endpoints.", "type": { - "$id": "3409", + "$id": "4215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32021,16 +39829,16 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" }, { - "$id": "3410", + "$id": "4216", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `thread.message.delta`.", "type": { - "$id": "3411", + "$id": "4217", "kind": "constant", "valueType": { - "$ref": "1028" + "$ref": "1217" }, "value": "thread.message.delta", "decorators": [] @@ -32042,13 +39850,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" }, { - "$id": "3412", + "$id": "4218", "kind": "property", "name": "delta", "serializedName": "delta", "description": "The delta containing the fields that have changed on the Message.", "type": { - "$id": "3413", + "$id": "4219", "kind": "model", "name": "MessageDeltaObjectDelta", "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", @@ -32056,13 +39864,13 @@ "decorators": [], "properties": [ { - "$id": "3414", + "$id": "4220", "kind": "property", "name": "role", "serializedName": "role", "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { - "$ref": "1031" + "$ref": "1220" }, "optional": true, "readOnly": false, @@ -32071,17 +39879,17 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" }, { - "$id": "3415", + "$id": "4221", "kind": "property", "name": "content", "serializedName": "content", "description": "The content of the message in array of text and/or images.", "type": { - "$id": "3416", + "$id": "4222", "kind": "array", "name": "ArrayMessageDeltaContent", "valueType": { - "$ref": "3293" + "$ref": "4099" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -32103,10 +39911,10 @@ ] }, { - "$ref": "3413" + "$ref": "4219" }, { - "$id": "3417", + "$id": "4223", "kind": "model", "name": "MessageRequestContentTextObject", "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", @@ -32115,20 +39923,20 @@ "description": "The text content that is part of a message.", "decorators": [], "baseModel": { - "$ref": "1341" + "$ref": "1530" }, "properties": [ { - "$id": "3418", + "$id": "4224", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `text`.", "type": { - "$id": "3419", + "$id": "4225", "kind": "constant", "valueType": { - "$ref": "1037" + "$ref": "1226" }, "value": "text", "decorators": [] @@ -32140,13 +39948,13 @@ "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" }, { - "$id": "3420", + "$id": "4226", "kind": "property", "name": "text", "serializedName": "text", "description": "Text content to be sent to the model", "type": { - "$id": "3421", + "$id": "4227", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32161,20 +39969,20 @@ ] }, { - "$id": "3422", + "$id": "4228", "kind": "model", "name": "RunStepDeltaStepDetails", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", "usage": "Output", "decorators": [], "discriminatorProperty": { - "$id": "3423", + "$id": "4229", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the details object.", "type": { - "$id": "3424", + "$id": "4230", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32188,13 +39996,13 @@ }, "properties": [ { - "$ref": "3423" + "$ref": "4229" } ], "discriminatedSubtypes": { - "$id": "3425", + "$id": "4231", "message_creation": { - "$id": "3426", + "$id": "4232", "kind": "model", "name": "RunStepDeltaStepDetailsMessageCreationObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", @@ -32204,20 +40012,20 @@ "discriminatorValue": "message_creation", "decorators": [], "baseModel": { - "$ref": "3422" + "$ref": "4228" }, "properties": [ { - "$id": "3427", + "$id": "4233", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `message_creation`.", "type": { - "$id": "3428", + "$id": "4234", "kind": "constant", "valueType": { - "$id": "3429", + "$id": "4235", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32233,12 +40041,12 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" }, { - "$id": "3430", + "$id": "4236", "kind": "property", "name": "message_creation", "serializedName": "message_creation", "type": { - "$id": "3431", + "$id": "4237", "kind": "model", "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", @@ -32246,13 +40054,13 @@ "decorators": [], "properties": [ { - "$id": "3432", + "$id": "4238", "kind": "property", "name": "message_id", "serializedName": "message_id", "description": "The ID of the message that was created by this run step.", "type": { - "$id": "3433", + "$id": "4239", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32275,7 +40083,7 @@ ] }, "tool_calls": { - "$id": "3434", + "$id": "4240", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", @@ -32285,20 +40093,20 @@ "discriminatorValue": "tool_calls", "decorators": [], "baseModel": { - "$ref": "3422" + "$ref": "4228" }, "properties": [ { - "$id": "3435", + "$id": "4241", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `tool_calls`.", "type": { - "$id": "3436", + "$id": "4242", "kind": "constant", "valueType": { - "$id": "3437", + "$id": "4243", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32314,17 +40122,17 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" }, { - "$id": "3438", + "$id": "4244", "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", "type": { - "$id": "3439", + "$id": "4245", "kind": "array", "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "valueType": { - "$id": "3440", + "$id": "4246", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", @@ -32332,13 +40140,13 @@ "description": "Abstractly represents a run step tool call details inner object.", "decorators": [], "discriminatorProperty": { - "$id": "3441", + "$id": "4247", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the details object.", "type": { - "$id": "3442", + "$id": "4248", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32352,13 +40160,13 @@ }, "properties": [ { - "$ref": "3441" + "$ref": "4247" } ], "discriminatedSubtypes": { - "$id": "3443", + "$id": "4249", "code_interpreter": { - "$id": "3444", + "$id": "4250", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", @@ -32368,17 +40176,17 @@ "discriminatorValue": "code_interpreter", "decorators": [], "baseModel": { - "$ref": "3440" + "$ref": "4246" }, "properties": [ { - "$id": "3445", + "$id": "4251", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the tool call in the tool calls array.", "type": { - "$id": "3446", + "$id": "4252", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -32391,13 +40199,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" }, { - "$id": "3447", + "$id": "4253", "kind": "property", "name": "id", "serializedName": "id", "description": "The ID of the tool call.", "type": { - "$id": "3448", + "$id": "4254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32410,16 +40218,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" }, { - "$id": "3449", + "$id": "4255", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", "type": { - "$id": "3450", + "$id": "4256", "kind": "constant", "valueType": { - "$id": "3451", + "$id": "4257", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32435,13 +40243,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" }, { - "$id": "3452", + "$id": "4258", "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", "description": "The Code Interpreter tool call definition.", "type": { - "$id": "3453", + "$id": "4259", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", @@ -32449,13 +40257,13 @@ "decorators": [], "properties": [ { - "$id": "3454", + "$id": "4260", "kind": "property", "name": "input", "serializedName": "input", "description": "The input to the Code Interpreter tool call.", "type": { - "$id": "3455", + "$id": "4261", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32468,17 +40276,17 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" }, { - "$id": "3456", + "$id": "4262", "kind": "property", "name": "outputs", "serializedName": "outputs", "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", "type": { - "$id": "3457", + "$id": "4263", "kind": "array", "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "valueType": { - "$id": "3458", + "$id": "4264", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", @@ -32486,13 +40294,13 @@ "description": "Abstractly represents a run step tool call details code interpreter output.", "decorators": [], "discriminatorProperty": { - "$id": "3459", + "$id": "4265", "kind": "property", "name": "type", "serializedName": "type", "description": "The discriminated type identifier for the details object.", "type": { - "$id": "3460", + "$id": "4266", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32506,13 +40314,13 @@ }, "properties": [ { - "$ref": "3459" + "$ref": "4265" } ], "discriminatedSubtypes": { - "$id": "3461", + "$id": "4267", "logs": { - "$id": "3462", + "$id": "4268", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", @@ -32522,17 +40330,17 @@ "discriminatorValue": "logs", "decorators": [], "baseModel": { - "$ref": "3458" + "$ref": "4264" }, "properties": [ { - "$id": "3463", + "$id": "4269", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the output in the outputs array.", "type": { - "$id": "3464", + "$id": "4270", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -32545,16 +40353,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" }, { - "$id": "3465", + "$id": "4271", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `logs`.", "type": { - "$id": "3466", + "$id": "4272", "kind": "constant", "valueType": { - "$id": "3467", + "$id": "4273", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32570,13 +40378,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" }, { - "$id": "3468", + "$id": "4274", "kind": "property", "name": "logs", "serializedName": "logs", "description": "The text output from the Code Interpreter tool call.", "type": { - "$id": "3469", + "$id": "4275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32591,7 +40399,7 @@ ] }, "image": { - "$id": "3470", + "$id": "4276", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", @@ -32600,17 +40408,17 @@ "discriminatorValue": "image", "decorators": [], "baseModel": { - "$ref": "3458" + "$ref": "4264" }, "properties": [ { - "$id": "3471", + "$id": "4277", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the output in the outputs array.", "type": { - "$id": "3472", + "$id": "4278", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -32623,16 +40431,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" }, { - "$id": "3473", + "$id": "4279", "kind": "property", "name": "type", "serializedName": "type", "description": "Always `image`.", "type": { - "$id": "3474", + "$id": "4280", "kind": "constant", "valueType": { - "$id": "3475", + "$id": "4281", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32648,12 +40456,12 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" }, { - "$id": "3476", + "$id": "4282", "kind": "property", "name": "image", "serializedName": "image", "type": { - "$id": "3477", + "$id": "4283", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", @@ -32661,13 +40469,13 @@ "decorators": [], "properties": [ { - "$id": "3478", + "$id": "4284", "kind": "property", "name": "file_id", "serializedName": "file_id", "description": "The [file](/docs/api-reference/files) ID of the image.", "type": { - "$id": "3479", + "$id": "4285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32711,7 +40519,7 @@ ] }, "file_search": { - "$id": "3480", + "$id": "4286", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", @@ -32720,17 +40528,17 @@ "discriminatorValue": "file_search", "decorators": [], "baseModel": { - "$ref": "3440" + "$ref": "4246" }, "properties": [ { - "$id": "3481", + "$id": "4287", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the tool call in the tool calls array.", "type": { - "$id": "3482", + "$id": "4288", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -32743,13 +40551,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" }, { - "$id": "3483", + "$id": "4289", "kind": "property", "name": "id", "serializedName": "id", "description": "The ID of the tool call object.", "type": { - "$id": "3484", + "$id": "4290", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32762,16 +40570,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" }, { - "$id": "3485", + "$id": "4291", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", "type": { - "$id": "3486", + "$id": "4292", "kind": "constant", "valueType": { - "$id": "3487", + "$id": "4293", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32787,23 +40595,23 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" }, { - "$id": "3488", + "$id": "4294", "kind": "property", "name": "file_search", "serializedName": "file_search", "description": "For now, this is always going to be an empty object.", "type": { - "$id": "3489", + "$id": "4295", "kind": "dict", "keyType": { - "$id": "3490", + "$id": "4296", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "3491", + "$id": "4297", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -32820,7 +40628,7 @@ ] }, "function": { - "$id": "3492", + "$id": "4298", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", @@ -32829,17 +40637,17 @@ "discriminatorValue": "function", "decorators": [], "baseModel": { - "$ref": "3440" + "$ref": "4246" }, "properties": [ { - "$id": "3493", + "$id": "4299", "kind": "property", "name": "index", "serializedName": "index", "description": "The index of the tool call in the tool calls array.", "type": { - "$id": "3494", + "$id": "4300", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -32852,13 +40660,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" }, { - "$id": "3495", + "$id": "4301", "kind": "property", "name": "id", "serializedName": "id", "description": "The ID of the tool call object.", "type": { - "$id": "3496", + "$id": "4302", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32871,16 +40679,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" }, { - "$id": "3497", + "$id": "4303", "kind": "property", "name": "type", "serializedName": "type", "description": "The type of tool call. This is always going to be `function` for this type of tool call.", "type": { - "$id": "3498", + "$id": "4304", "kind": "constant", "valueType": { - "$id": "3499", + "$id": "4305", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32896,13 +40704,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" }, { - "$id": "3500", + "$id": "4306", "kind": "property", "name": "function", "serializedName": "function", "description": "The definition of the function that was called.", "type": { - "$id": "3501", + "$id": "4307", "kind": "model", "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", @@ -32910,13 +40718,13 @@ "decorators": [], "properties": [ { - "$id": "3502", + "$id": "4308", "kind": "property", "name": "name", "serializedName": "name", "description": "The name of the function.", "type": { - "$id": "3503", + "$id": "4309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32929,13 +40737,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" }, { - "$id": "3504", + "$id": "4310", "kind": "property", "name": "arguments", "serializedName": "arguments", "description": "The arguments passed to the function.", "type": { - "$id": "3505", + "$id": "4311", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32948,16 +40756,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" }, { - "$id": "3506", + "$id": "4312", "kind": "property", "name": "output", "serializedName": "output", "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", "type": { - "$id": "3507", + "$id": "4313", "kind": "nullable", "type": { - "$id": "3508", + "$id": "4314", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32996,46 +40804,46 @@ } }, { - "$ref": "3426" + "$ref": "4232" }, { - "$ref": "3431" + "$ref": "4237" }, { - "$ref": "3434" + "$ref": "4240" }, { - "$ref": "3440" + "$ref": "4246" }, { - "$ref": "3444" + "$ref": "4250" }, { - "$ref": "3453" + "$ref": "4259" }, { - "$ref": "3458" + "$ref": "4264" }, { - "$ref": "3462" + "$ref": "4268" }, { - "$ref": "3470" + "$ref": "4276" }, { - "$ref": "3477" + "$ref": "4283" }, { - "$ref": "3480" + "$ref": "4286" }, { - "$ref": "3492" + "$ref": "4298" }, { - "$ref": "3501" + "$ref": "4307" }, { - "$id": "3509", + "$id": "4315", "kind": "model", "name": "RunStepDeltaObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", @@ -33045,13 +40853,13 @@ "decorators": [], "properties": [ { - "$id": "3510", + "$id": "4316", "kind": "property", "name": "id", "serializedName": "id", "description": "The identifier of the run step, which can be referenced in API endpoints.", "type": { - "$id": "3511", + "$id": "4317", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33064,16 +40872,16 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" }, { - "$id": "3512", + "$id": "4318", "kind": "property", "name": "object", "serializedName": "object", "description": "The object type, which is always `thread.run.step.delta`.", "type": { - "$id": "3513", + "$id": "4319", "kind": "constant", "valueType": { - "$ref": "1040" + "$ref": "1229" }, "value": "thread.run.step.delta", "decorators": [] @@ -33085,13 +40893,13 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" }, { - "$id": "3514", + "$id": "4320", "kind": "property", "name": "delta", "serializedName": "delta", "description": "The delta containing the fields that have changed on the run step.", "type": { - "$id": "3515", + "$id": "4321", "kind": "model", "name": "RunStepDeltaObjectDelta", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", @@ -33099,13 +40907,13 @@ "decorators": [], "properties": [ { - "$id": "3516", + "$id": "4322", "kind": "property", "name": "step_details", "serializedName": "step_details", "description": "The details of the run step.", "type": { - "$ref": "3422" + "$ref": "4228" }, "optional": true, "readOnly": false, @@ -33124,10 +40932,10 @@ ] }, { - "$ref": "3515" + "$ref": "4321" }, { - "$id": "3517", + "$id": "4323", "kind": "model", "name": "CreateThreadRequestToolResourcesFileSearchBase", "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", @@ -33137,7 +40945,7 @@ "properties": [] }, { - "$id": "3518", + "$id": "4324", "kind": "model", "name": "ListThreadsResponse", "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", @@ -33146,15 +40954,15 @@ "decorators": [], "properties": [ { - "$id": "3519", + "$id": "4325", "kind": "property", "name": "object", "serializedName": "object", "type": { - "$id": "3520", + "$id": "4326", "kind": "constant", "valueType": { - "$ref": "1043" + "$ref": "1232" }, "value": "list", "decorators": [] @@ -33166,16 +40974,16 @@ "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" }, { - "$id": "3521", + "$id": "4327", "kind": "property", "name": "data", "serializedName": "data", "type": { - "$id": "3522", + "$id": "4328", "kind": "array", "name": "ArrayThreadObject", "valueType": { - "$ref": "1863" + "$ref": "2052" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -33187,12 +40995,12 @@ "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" }, { - "$id": "3523", + "$id": "4329", "kind": "property", "name": "first_id", "serializedName": "first_id", "type": { - "$id": "3524", + "$id": "4330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33205,12 +41013,12 @@ "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" }, { - "$id": "3525", + "$id": "4331", "kind": "property", "name": "last_id", "serializedName": "last_id", "type": { - "$id": "3526", + "$id": "4332", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33223,12 +41031,12 @@ "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" }, { - "$id": "3527", + "$id": "4333", "kind": "property", "name": "has_more", "serializedName": "has_more", "type": { - "$id": "3528", + "$id": "4334", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -33245,20 +41053,20 @@ ], "Clients": [ { - "$id": "3529", + "$id": "4335", "Name": "OpenAIClient", "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", "Operations": [], "Protocol": { - "$id": "3530" + "$id": "4336" }, "Parameters": [ { - "$id": "3531", + "$id": "4337", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3532", + "$id": "4338", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33273,9 +41081,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3533", + "$id": "4339", "Type": { - "$id": "3534", + "$id": "4340", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -33287,22 +41095,22 @@ "Decorators": [] }, { - "$id": "3535", + "$id": "4341", "Name": "Audio", "Operations": [ { - "$id": "3536", + "$id": "4342", "Name": "createSpeech", "ResourceName": "Audio", "Summary": "Generates audio from the input text.", "Accessibility": "public", "Parameters": [ { - "$id": "3537", + "$id": "4343", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3538", + "$id": "4344", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33317,9 +41125,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3539", + "$id": "4345", "Type": { - "$id": "3540", + "$id": "4346", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -33328,14 +41136,14 @@ } }, { - "$id": "3541", + "$id": "4347", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3542", + "$id": "4348", "kind": "constant", "valueType": { - "$id": "3543", + "$id": "4349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33355,15 +41163,15 @@ "SkipUrlEncoding": false }, { - "$id": "3544", + "$id": "4350", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3545", + "$id": "4351", "kind": "constant", "valueType": { - "$id": "3546", + "$id": "4352", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33383,11 +41191,11 @@ "SkipUrlEncoding": false }, { - "$id": "3547", + "$id": "4353", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "3012" + "$ref": "3817" }, "Location": "Body", "IsApiVersion": false, @@ -33402,12 +41210,12 @@ ], "Responses": [ { - "$id": "3548", + "$id": "4354", "StatusCodes": [ 200 ], "BodyType": { - "$id": "3549", + "$id": "4355", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -33417,12 +41225,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "3550", + "$id": "4356", "Name": "transferEncoding", "NameInResponse": "Transfer-Encoding", "Description": "chunked", "Type": { - "$id": "3551", + "$id": "4357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33430,14 +41238,14 @@ } }, { - "$id": "3552", + "$id": "4358", "Name": "contentType", "NameInResponse": "content-type", "Type": { - "$id": "3553", + "$id": "4359", "kind": "constant", "valueType": { - "$id": "3554", + "$id": "4360", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33468,24 +41276,24 @@ "Decorators": [] }, { - "$id": "3555", + "$id": "4361", "Name": "createTranscription", "ResourceName": "Audio", "Summary": "Transcribes audio into the input language.", "Accessibility": "public", "Parameters": [ { - "$ref": "3537" + "$ref": "4343" }, { - "$id": "3556", + "$id": "4362", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3557", + "$id": "4363", "kind": "constant", "valueType": { - "$id": "3558", + "$id": "4364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33505,14 +41313,14 @@ "SkipUrlEncoding": false }, { - "$id": "3559", + "$id": "4365", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "3560", + "$id": "4366", "kind": "constant", "valueType": { - "$id": "3561", + "$id": "4367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33532,11 +41340,11 @@ "SkipUrlEncoding": false }, { - "$id": "3562", + "$id": "4368", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "3020" + "$ref": "3825" }, "Location": "Body", "IsApiVersion": false, @@ -33551,12 +41359,12 @@ ], "Responses": [ { - "$id": "3563", + "$id": "4369", "StatusCodes": [ 200 ], "BodyType": { - "$id": "3564", + "$id": "4370", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33565,14 +41373,14 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "3565", + "$id": "4371", "Name": "contentType", "NameInResponse": "content-type", "Type": { - "$id": "3566", + "$id": "4372", "kind": "constant", "valueType": { - "$id": "3567", + "$id": "4373", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33605,24 +41413,24 @@ "Decorators": [] }, { - "$id": "3568", + "$id": "4374", "Name": "createTranslation", "ResourceName": "Audio", "Summary": "Translates audio into English..", "Accessibility": "public", "Parameters": [ { - "$ref": "3537" + "$ref": "4343" }, { - "$id": "3569", + "$id": "4375", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3570", + "$id": "4376", "kind": "constant", "valueType": { - "$id": "3571", + "$id": "4377", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33642,14 +41450,14 @@ "SkipUrlEncoding": false }, { - "$id": "3572", + "$id": "4378", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "3573", + "$id": "4379", "kind": "constant", "valueType": { - "$id": "3574", + "$id": "4380", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33669,11 +41477,11 @@ "SkipUrlEncoding": false }, { - "$id": "3575", + "$id": "4381", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "3083" + "$ref": "3888" }, "Location": "Body", "IsApiVersion": false, @@ -33688,12 +41496,12 @@ ], "Responses": [ { - "$id": "3576", + "$id": "4382", "StatusCodes": [ 200 ], "BodyType": { - "$id": "3577", + "$id": "4383", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33702,14 +41510,14 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "3578", + "$id": "4384", "Name": "contentType", "NameInResponse": "content-type", "Type": { - "$id": "3579", + "$id": "4385", "kind": "constant", "valueType": { - "$id": "3580", + "$id": "4386", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33743,33 +41551,33 @@ } ], "Protocol": { - "$id": "3581" + "$id": "4387" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3537" + "$ref": "4343" } ], "Decorators": [] }, { - "$id": "3582", + "$id": "4388", "Name": "Assistants", "Operations": [ { - "$id": "3583", + "$id": "4389", "Name": "createAssistant", "ResourceName": "Assistants", "Summary": "Create an assistant with a model and instructions.", "Accessibility": "public", "Parameters": [ { - "$id": "3584", + "$id": "4390", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3585", + "$id": "4391", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33784,9 +41592,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3586", + "$id": "4392", "Type": { - "$id": "3587", + "$id": "4393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -33795,14 +41603,14 @@ } }, { - "$id": "3588", + "$id": "4394", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3589", + "$id": "4395", "kind": "constant", "valueType": { - "$id": "3590", + "$id": "4396", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33822,15 +41630,15 @@ "SkipUrlEncoding": false }, { - "$id": "3591", + "$id": "4397", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3592", + "$id": "4398", "kind": "constant", "valueType": { - "$id": "3593", + "$id": "4399", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33850,11 +41658,11 @@ "SkipUrlEncoding": false }, { - "$id": "3594", + "$id": "4400", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2871" + "$ref": "3676" }, "Location": "Body", "IsApiVersion": false, @@ -33869,12 +41677,12 @@ ], "Responses": [ { - "$id": "3595", + "$id": "4401", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2909" + "$ref": "3714" }, "BodyMediaType": "Json", "Headers": [], @@ -33898,24 +41706,24 @@ "Decorators": [] }, { - "$id": "3596", + "$id": "4402", "Name": "listAssistants", "ResourceName": "Assistants", "Summary": "Returns a list of assistants.", "Accessibility": "public", "Parameters": [ { - "$ref": "3584" + "$ref": "4390" }, { - "$id": "3597", + "$id": "4403", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3598", + "$id": "4404", "kind": "constant", "valueType": { - "$id": "3599", + "$id": "4405", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33935,12 +41743,12 @@ "SkipUrlEncoding": false }, { - "$id": "3600", + "$id": "4406", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "3601", + "$id": "4407", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -33957,12 +41765,12 @@ "SkipUrlEncoding": false }, { - "$id": "3602", + "$id": "4408", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { - "$ref": "844" + "$ref": "1033" }, "Location": "Query", "IsApiVersion": false, @@ -33975,12 +41783,12 @@ "SkipUrlEncoding": false }, { - "$id": "3603", + "$id": "4409", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "3604", + "$id": "4410", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33997,12 +41805,12 @@ "SkipUrlEncoding": false }, { - "$id": "3605", + "$id": "4411", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "3606", + "$id": "4412", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34021,12 +41829,12 @@ ], "Responses": [ { - "$id": "3607", + "$id": "4413", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2955" + "$ref": "3760" }, "BodyMediaType": "Json", "Headers": [], @@ -34047,24 +41855,24 @@ "Decorators": [] }, { - "$id": "3608", + "$id": "4414", "Name": "getAssistant", "ResourceName": "Assistants", "Summary": "Retrieves an assistant.", "Accessibility": "public", "Parameters": [ { - "$ref": "3584" + "$ref": "4390" }, { - "$id": "3609", + "$id": "4415", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3610", + "$id": "4416", "kind": "constant", "valueType": { - "$id": "3611", + "$id": "4417", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34084,12 +41892,12 @@ "SkipUrlEncoding": false }, { - "$id": "3612", + "$id": "4418", "Name": "assistant_id", "NameInRequest": "assistant_id", "Description": "The ID of the assistant to retrieve.", "Type": { - "$id": "3613", + "$id": "4419", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34108,12 +41916,12 @@ ], "Responses": [ { - "$id": "3614", + "$id": "4420", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2909" + "$ref": "3714" }, "BodyMediaType": "Json", "Headers": [], @@ -34134,24 +41942,24 @@ "Decorators": [] }, { - "$id": "3615", + "$id": "4421", "Name": "modifyAssistant", "ResourceName": "Assistants", "Summary": "Modifies an assistant.", "Accessibility": "public", "Parameters": [ { - "$ref": "3584" + "$ref": "4390" }, { - "$id": "3616", + "$id": "4422", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3617", + "$id": "4423", "kind": "constant", "valueType": { - "$id": "3618", + "$id": "4424", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34171,12 +41979,12 @@ "SkipUrlEncoding": false }, { - "$id": "3619", + "$id": "4425", "Name": "assistant_id", "NameInRequest": "assistant_id", "Description": "The ID of the assistant to modify.", "Type": { - "$id": "3620", + "$id": "4426", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34193,15 +42001,15 @@ "SkipUrlEncoding": false }, { - "$id": "3621", + "$id": "4427", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3622", + "$id": "4428", "kind": "constant", "valueType": { - "$id": "3623", + "$id": "4429", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34221,11 +42029,11 @@ "SkipUrlEncoding": false }, { - "$id": "3624", + "$id": "4430", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2966" + "$ref": "3771" }, "Location": "Body", "IsApiVersion": false, @@ -34240,12 +42048,12 @@ ], "Responses": [ { - "$id": "3625", + "$id": "4431", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2909" + "$ref": "3714" }, "BodyMediaType": "Json", "Headers": [], @@ -34269,24 +42077,24 @@ "Decorators": [] }, { - "$id": "3626", + "$id": "4432", "Name": "deleteAssistant", "ResourceName": "Assistants", "Summary": "Delete an assistant.", "Accessibility": "public", "Parameters": [ { - "$ref": "3584" + "$ref": "4390" }, { - "$id": "3627", + "$id": "4433", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3628", + "$id": "4434", "kind": "constant", "valueType": { - "$id": "3629", + "$id": "4435", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34306,12 +42114,12 @@ "SkipUrlEncoding": false }, { - "$id": "3630", + "$id": "4436", "Name": "assistant_id", "NameInRequest": "assistant_id", "Description": "The ID of the assistant to delete.", "Type": { - "$id": "3631", + "$id": "4437", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34330,12 +42138,12 @@ ], "Responses": [ { - "$id": "3632", + "$id": "4438", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "3005" + "$ref": "3810" }, "BodyMediaType": "Json", "Headers": [], @@ -34357,33 +42165,33 @@ } ], "Protocol": { - "$id": "3633" + "$id": "4439" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3584" + "$ref": "4390" } ], "Decorators": [] }, { - "$id": "3634", + "$id": "4440", "Name": "Batches", "Operations": [ { - "$id": "3635", + "$id": "4441", "Name": "createBatch", "ResourceName": "Batches", "Summary": "Creates and executes a batch from an uploaded file of requests", "Accessibility": "public", "Parameters": [ { - "$id": "3636", + "$id": "4442", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3637", + "$id": "4443", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -34398,9 +42206,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3638", + "$id": "4444", "Type": { - "$id": "3639", + "$id": "4445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -34409,14 +42217,14 @@ } }, { - "$id": "3640", + "$id": "4446", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3641", + "$id": "4447", "kind": "constant", "valueType": { - "$id": "3642", + "$id": "4448", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34436,15 +42244,15 @@ "SkipUrlEncoding": false }, { - "$id": "3643", + "$id": "4449", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3644", + "$id": "4450", "kind": "constant", "valueType": { - "$id": "3645", + "$id": "4451", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34464,11 +42272,11 @@ "SkipUrlEncoding": false }, { - "$id": "3646", + "$id": "4452", "Name": "createBatchRequest", "NameInRequest": "createBatchRequest", "Type": { - "$ref": "2776" + "$ref": "3581" }, "Location": "Body", "IsApiVersion": false, @@ -34483,12 +42291,12 @@ ], "Responses": [ { - "$id": "3647", + "$id": "4453", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2787" + "$ref": "3592" }, "BodyMediaType": "Json", "Headers": [], @@ -34512,24 +42320,24 @@ "Decorators": [] }, { - "$id": "3648", + "$id": "4454", "Name": "listBatches", "ResourceName": "Batches", "Summary": "List your organization's batches.", "Accessibility": "public", "Parameters": [ { - "$ref": "3636" + "$ref": "4442" }, { - "$id": "3649", + "$id": "4455", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3650", + "$id": "4456", "kind": "constant", "valueType": { - "$id": "3651", + "$id": "4457", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34549,12 +42357,12 @@ "SkipUrlEncoding": false }, { - "$id": "3652", + "$id": "4458", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "3653", + "$id": "4459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34571,12 +42379,12 @@ "SkipUrlEncoding": false }, { - "$id": "3654", + "$id": "4460", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "3655", + "$id": "4461", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -34595,12 +42403,12 @@ ], "Responses": [ { - "$id": "3656", + "$id": "4462", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2860" + "$ref": "3665" }, "BodyMediaType": "Json", "Headers": [], @@ -34621,24 +42429,24 @@ "Decorators": [] }, { - "$id": "3657", + "$id": "4463", "Name": "retrieveBatch", "ResourceName": "Batches", "Summary": "Retrieves a batch.", "Accessibility": "public", "Parameters": [ { - "$ref": "3636" + "$ref": "4442" }, { - "$id": "3658", + "$id": "4464", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3659", + "$id": "4465", "kind": "constant", "valueType": { - "$id": "3660", + "$id": "4466", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34658,12 +42466,12 @@ "SkipUrlEncoding": false }, { - "$id": "3661", + "$id": "4467", "Name": "batch_id", "NameInRequest": "batch_id", "Description": "The ID of the batch to retrieve.", "Type": { - "$id": "3662", + "$id": "4468", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34682,12 +42490,12 @@ ], "Responses": [ { - "$id": "3663", + "$id": "4469", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2787" + "$ref": "3592" }, "BodyMediaType": "Json", "Headers": [], @@ -34708,24 +42516,24 @@ "Decorators": [] }, { - "$id": "3664", + "$id": "4470", "Name": "cancelBatch", "ResourceName": "Batches", "Summary": "Cancels an in-progress batch.", "Accessibility": "public", "Parameters": [ { - "$ref": "3636" + "$ref": "4442" }, { - "$id": "3665", + "$id": "4471", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3666", + "$id": "4472", "kind": "constant", "valueType": { - "$id": "3667", + "$id": "4473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34745,12 +42553,12 @@ "SkipUrlEncoding": false }, { - "$id": "3668", + "$id": "4474", "Name": "batch_id", "NameInRequest": "batch_id", "Description": "The ID of the batch to cancel.", "Type": { - "$id": "3669", + "$id": "4475", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34769,12 +42577,12 @@ ], "Responses": [ { - "$id": "3670", + "$id": "4476", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2787" + "$ref": "3592" }, "BodyMediaType": "Json", "Headers": [], @@ -34796,33 +42604,33 @@ } ], "Protocol": { - "$id": "3671" + "$id": "4477" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3636" + "$ref": "4442" } ], "Decorators": [] }, { - "$id": "3672", + "$id": "4478", "Name": "Chat", "Operations": [ { - "$id": "3673", + "$id": "4479", "Name": "createChatCompletion", "ResourceName": "Chat", "Summary": "Creates a model response for the given chat conversation.", "Accessibility": "public", "Parameters": [ { - "$id": "3674", + "$id": "4480", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3675", + "$id": "4481", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -34837,9 +42645,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3676", + "$id": "4482", "Type": { - "$id": "3677", + "$id": "4483", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -34848,14 +42656,14 @@ } }, { - "$id": "3678", + "$id": "4484", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3679", + "$id": "4485", "kind": "constant", "valueType": { - "$id": "3680", + "$id": "4486", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34875,15 +42683,15 @@ "SkipUrlEncoding": false }, { - "$id": "3681", + "$id": "4487", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3682", + "$id": "4488", "kind": "constant", "valueType": { - "$id": "3683", + "$id": "4489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34903,11 +42711,11 @@ "SkipUrlEncoding": false }, { - "$id": "3684", + "$id": "4490", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2503" + "$ref": "3308" }, "Location": "Body", "IsApiVersion": false, @@ -34922,12 +42730,12 @@ ], "Responses": [ { - "$id": "3685", + "$id": "4491", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2708" + "$ref": "3513" }, "BodyMediaType": "Json", "Headers": [], @@ -34952,33 +42760,33 @@ } ], "Protocol": { - "$id": "3686" + "$id": "4492" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3674" + "$ref": "4480" } ], "Decorators": [] }, { - "$id": "3687", + "$id": "4493", "Name": "Completions", "Operations": [ { - "$id": "3688", + "$id": "4494", "Name": "createCompletion", "ResourceName": "Completions", "Summary": "Creates a completion for the provided prompt and parameters.", "Accessibility": "public", "Parameters": [ { - "$id": "3689", + "$id": "4495", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3690", + "$id": "4496", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -34993,9 +42801,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3691", + "$id": "4497", "Type": { - "$id": "3692", + "$id": "4498", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -35004,14 +42812,14 @@ } }, { - "$id": "3693", + "$id": "4499", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3694", + "$id": "4500", "kind": "constant", "valueType": { - "$id": "3695", + "$id": "4501", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35031,15 +42839,15 @@ "SkipUrlEncoding": false }, { - "$id": "3696", + "$id": "4502", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3697", + "$id": "4503", "kind": "constant", "valueType": { - "$id": "3698", + "$id": "4504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35059,11 +42867,11 @@ "SkipUrlEncoding": false }, { - "$id": "3699", + "$id": "4505", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2387" + "$ref": "3192" }, "Location": "Body", "IsApiVersion": false, @@ -35078,12 +42886,12 @@ ], "Responses": [ { - "$id": "3700", + "$id": "4506", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2454" + "$ref": "3259" }, "BodyMediaType": "Json", "Headers": [], @@ -35108,33 +42916,33 @@ } ], "Protocol": { - "$id": "3701" + "$id": "4507" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3689" + "$ref": "4495" } ], "Decorators": [] }, { - "$id": "3702", + "$id": "4508", "Name": "Embeddings", "Operations": [ { - "$id": "3703", + "$id": "4509", "Name": "createEmbedding", "ResourceName": "Embeddings", "Summary": "Creates an embedding vector representing the input text.", "Accessibility": "public", "Parameters": [ { - "$id": "3704", + "$id": "4510", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3705", + "$id": "4511", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -35149,9 +42957,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3706", + "$id": "4512", "Type": { - "$id": "3707", + "$id": "4513", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -35160,14 +42968,14 @@ } }, { - "$id": "3708", + "$id": "4514", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3709", + "$id": "4515", "kind": "constant", "valueType": { - "$id": "3710", + "$id": "4516", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35187,15 +42995,15 @@ "SkipUrlEncoding": false }, { - "$id": "3711", + "$id": "4517", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3712", + "$id": "4518", "kind": "constant", "valueType": { - "$id": "3713", + "$id": "4519", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35215,11 +43023,11 @@ "SkipUrlEncoding": false }, { - "$id": "3714", + "$id": "4520", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2347" + "$ref": "3152" }, "Location": "Body", "IsApiVersion": false, @@ -35234,12 +43042,12 @@ ], "Responses": [ { - "$id": "3715", + "$id": "4521", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2364" + "$ref": "3169" }, "BodyMediaType": "Json", "Headers": [], @@ -35264,33 +43072,33 @@ } ], "Protocol": { - "$id": "3716" + "$id": "4522" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3704" + "$ref": "4510" } ], "Decorators": [] }, { - "$id": "3717", + "$id": "4523", "Name": "Files", "Operations": [ { - "$id": "3718", + "$id": "4524", "Name": "createFile", "ResourceName": "Files", "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", "Accessibility": "public", "Parameters": [ { - "$id": "3719", + "$id": "4525", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3720", + "$id": "4526", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -35305,9 +43113,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3721", + "$id": "4527", "Type": { - "$id": "3722", + "$id": "4528", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -35316,14 +43124,14 @@ } }, { - "$id": "3723", + "$id": "4529", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3724", + "$id": "4530", "kind": "constant", "valueType": { - "$id": "3725", + "$id": "4531", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35343,14 +43151,14 @@ "SkipUrlEncoding": false }, { - "$id": "3726", + "$id": "4532", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "3727", + "$id": "4533", "kind": "constant", "valueType": { - "$id": "3728", + "$id": "4534", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35370,11 +43178,11 @@ "SkipUrlEncoding": false }, { - "$id": "3729", + "$id": "4535", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2331" + "$ref": "3136" }, "Location": "Body", "IsApiVersion": false, @@ -35389,12 +43197,12 @@ ], "Responses": [ { - "$id": "3730", + "$id": "4536", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1086" + "$ref": "1275" }, "BodyMediaType": "Json", "Headers": [], @@ -35418,24 +43226,24 @@ "Decorators": [] }, { - "$id": "3731", + "$id": "4537", "Name": "listFiles", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Accessibility": "public", "Parameters": [ { - "$ref": "3719" + "$ref": "4525" }, { - "$id": "3732", + "$id": "4538", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3733", + "$id": "4539", "kind": "constant", "valueType": { - "$id": "3734", + "$id": "4540", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35455,12 +43263,12 @@ "SkipUrlEncoding": false }, { - "$id": "3735", + "$id": "4541", "Name": "purpose", "NameInRequest": "purpose", "Description": "Only return files with the given purpose.", "Type": { - "$id": "3736", + "$id": "4542", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35479,12 +43287,12 @@ ], "Responses": [ { - "$id": "3737", + "$id": "4543", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2335" + "$ref": "3140" }, "BodyMediaType": "Json", "Headers": [], @@ -35505,24 +43313,24 @@ "Decorators": [] }, { - "$id": "3738", + "$id": "4544", "Name": "retrieveFile", "ResourceName": "Files", "Summary": "Returns information about a specific file.", "Accessibility": "public", "Parameters": [ { - "$ref": "3719" + "$ref": "4525" }, { - "$id": "3739", + "$id": "4545", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3740", + "$id": "4546", "kind": "constant", "valueType": { - "$id": "3741", + "$id": "4547", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35542,12 +43350,12 @@ "SkipUrlEncoding": false }, { - "$id": "3742", + "$id": "4548", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "3743", + "$id": "4549", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35566,12 +43374,12 @@ ], "Responses": [ { - "$id": "3744", + "$id": "4550", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1086" + "$ref": "1275" }, "BodyMediaType": "Json", "Headers": [], @@ -35592,24 +43400,24 @@ "Decorators": [] }, { - "$id": "3745", + "$id": "4551", "Name": "deleteFile", "ResourceName": "Files", "Summary": "Delete a file", "Accessibility": "public", "Parameters": [ { - "$ref": "3719" + "$ref": "4525" }, { - "$id": "3746", + "$id": "4552", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3747", + "$id": "4553", "kind": "constant", "valueType": { - "$id": "3748", + "$id": "4554", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35629,12 +43437,12 @@ "SkipUrlEncoding": false }, { - "$id": "3749", + "$id": "4555", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "3750", + "$id": "4556", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35653,12 +43461,12 @@ ], "Responses": [ { - "$id": "3751", + "$id": "4557", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2340" + "$ref": "3145" }, "BodyMediaType": "Json", "Headers": [], @@ -35679,24 +43487,24 @@ "Decorators": [] }, { - "$id": "3752", + "$id": "4558", "Name": "downloadFile", "ResourceName": "Files", "Summary": "Returns the contents of the specified file.", "Accessibility": "public", "Parameters": [ { - "$ref": "3719" + "$ref": "4525" }, { - "$id": "3753", + "$id": "4559", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3754", + "$id": "4560", "kind": "constant", "valueType": { - "$id": "3755", + "$id": "4561", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35716,12 +43524,12 @@ "SkipUrlEncoding": false }, { - "$id": "3756", + "$id": "4562", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "3757", + "$id": "4563", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35740,12 +43548,12 @@ ], "Responses": [ { - "$id": "3758", + "$id": "4564", "StatusCodes": [ 200 ], "BodyType": { - "$id": "3759", + "$id": "4565", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -35772,33 +43580,33 @@ } ], "Protocol": { - "$id": "3760" + "$id": "4566" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3719" + "$ref": "4525" } ], "Decorators": [] }, { - "$id": "3761", + "$id": "4567", "Name": "FineTuning", "Operations": [ { - "$id": "3762", + "$id": "4568", "Name": "createFineTuningJob", "ResourceName": "FineTuning", "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Accessibility": "public", "Parameters": [ { - "$id": "3763", + "$id": "4569", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3764", + "$id": "4570", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -35813,9 +43621,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3765", + "$id": "4571", "Type": { - "$id": "3766", + "$id": "4572", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -35824,14 +43632,14 @@ } }, { - "$id": "3767", + "$id": "4573", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3768", + "$id": "4574", "kind": "constant", "valueType": { - "$id": "3769", + "$id": "4575", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35851,15 +43659,15 @@ "SkipUrlEncoding": false }, { - "$id": "3770", + "$id": "4576", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3771", + "$id": "4577", "kind": "constant", "valueType": { - "$id": "3772", + "$id": "4578", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35879,11 +43687,11 @@ "SkipUrlEncoding": false }, { - "$id": "3773", + "$id": "4579", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2130" + "$ref": "2935" }, "Location": "Body", "IsApiVersion": false, @@ -35898,12 +43706,12 @@ ], "Responses": [ { - "$id": "3774", + "$id": "4580", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2178" + "$ref": "2983" }, "BodyMediaType": "Json", "Headers": [], @@ -35927,24 +43735,24 @@ "Decorators": [] }, { - "$id": "3775", + "$id": "4581", "Name": "listPaginatedFineTuningJobs", "ResourceName": "FineTuning", "Summary": "List your organization's fine-tuning jobs", "Accessibility": "public", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" }, { - "$id": "3776", + "$id": "4582", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3777", + "$id": "4583", "kind": "constant", "valueType": { - "$id": "3778", + "$id": "4584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35964,12 +43772,12 @@ "SkipUrlEncoding": false }, { - "$id": "3779", + "$id": "4585", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last job from the previous pagination request.", "Type": { - "$id": "3780", + "$id": "4586", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -35986,12 +43794,12 @@ "SkipUrlEncoding": false }, { - "$id": "3781", + "$id": "4587", "Name": "limit", "NameInRequest": "limit", "Description": "Number of fine-tuning jobs to retrieve.", "Type": { - "$id": "3782", + "$id": "4588", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -36010,12 +43818,12 @@ ], "Responses": [ { - "$id": "3783", + "$id": "4589", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2263" + "$ref": "3068" }, "BodyMediaType": "Json", "Headers": [], @@ -36036,24 +43844,24 @@ "Decorators": [] }, { - "$id": "3784", + "$id": "4590", "Name": "retrieveFineTuningJob", "ResourceName": "FineTuning", "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Accessibility": "public", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" }, { - "$id": "3785", + "$id": "4591", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3786", + "$id": "4592", "kind": "constant", "valueType": { - "$id": "3787", + "$id": "4593", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36073,12 +43881,12 @@ "SkipUrlEncoding": false }, { - "$id": "3788", + "$id": "4594", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job.", "Type": { - "$id": "3789", + "$id": "4595", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36097,12 +43905,12 @@ ], "Responses": [ { - "$id": "3790", + "$id": "4596", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2178" + "$ref": "2983" }, "BodyMediaType": "Json", "Headers": [], @@ -36123,24 +43931,24 @@ "Decorators": [] }, { - "$id": "3791", + "$id": "4597", "Name": "cancelFineTuningJob", "ResourceName": "FineTuning", "Summary": "Immediately cancel a fine-tune job.", "Accessibility": "public", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" }, { - "$id": "3792", + "$id": "4598", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3793", + "$id": "4599", "kind": "constant", "valueType": { - "$id": "3794", + "$id": "4600", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36160,12 +43968,12 @@ "SkipUrlEncoding": false }, { - "$id": "3795", + "$id": "4601", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to cancel.", "Type": { - "$id": "3796", + "$id": "4602", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36184,12 +43992,12 @@ ], "Responses": [ { - "$id": "3797", + "$id": "4603", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2178" + "$ref": "2983" }, "BodyMediaType": "Json", "Headers": [], @@ -36210,24 +44018,24 @@ "Decorators": [] }, { - "$id": "3798", + "$id": "4604", "Name": "listFineTuningJobCheckpoints", "ResourceName": "FineTuning", "Summary": "List the checkpoints for a fine-tuning job.", "Accessibility": "public", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" }, { - "$id": "3799", + "$id": "4605", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3800", + "$id": "4606", "kind": "constant", "valueType": { - "$id": "3801", + "$id": "4607", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36247,12 +44055,12 @@ "SkipUrlEncoding": false }, { - "$id": "3802", + "$id": "4608", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to get checkpoints for.", "Type": { - "$id": "3803", + "$id": "4609", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36269,12 +44077,12 @@ "SkipUrlEncoding": false }, { - "$id": "3804", + "$id": "4610", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last checkpoint ID from the previous pagination request.", "Type": { - "$id": "3805", + "$id": "4611", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36291,12 +44099,12 @@ "SkipUrlEncoding": false }, { - "$id": "3806", + "$id": "4612", "Name": "limit", "NameInRequest": "limit", "Description": "Number of checkpoints to retrieve.", "Type": { - "$id": "3807", + "$id": "4613", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -36315,12 +44123,12 @@ ], "Responses": [ { - "$id": "3808", + "$id": "4614", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2270" + "$ref": "3075" }, "BodyMediaType": "Json", "Headers": [], @@ -36341,24 +44149,24 @@ "Decorators": [] }, { - "$id": "3809", + "$id": "4615", "Name": "listFineTuningEvents", "ResourceName": "FineTuning", "Summary": "Get status updates for a fine-tuning job.", "Accessibility": "public", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" }, { - "$id": "3810", + "$id": "4616", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3811", + "$id": "4617", "kind": "constant", "valueType": { - "$id": "3812", + "$id": "4618", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36378,12 +44186,12 @@ "SkipUrlEncoding": false }, { - "$id": "3813", + "$id": "4619", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to get events for.", "Type": { - "$id": "3814", + "$id": "4620", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36400,12 +44208,12 @@ "SkipUrlEncoding": false }, { - "$id": "3815", + "$id": "4621", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last event from the previous pagination request.", "Type": { - "$id": "3816", + "$id": "4622", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36422,12 +44230,12 @@ "SkipUrlEncoding": false }, { - "$id": "3817", + "$id": "4623", "Name": "limit", "NameInRequest": "limit", "Description": "Number of events to retrieve.", "Type": { - "$id": "3818", + "$id": "4624", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -36446,12 +44254,12 @@ ], "Responses": [ { - "$id": "3819", + "$id": "4625", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2313" + "$ref": "3118" }, "BodyMediaType": "Json", "Headers": [], @@ -36473,33 +44281,33 @@ } ], "Protocol": { - "$id": "3820" + "$id": "4626" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3763" + "$ref": "4569" } ], "Decorators": [] }, { - "$id": "3821", + "$id": "4627", "Name": "Images", "Operations": [ { - "$id": "3822", + "$id": "4628", "Name": "createImage", "ResourceName": "Images", "Summary": "Creates an image given a prompt", "Accessibility": "public", "Parameters": [ { - "$id": "3823", + "$id": "4629", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3824", + "$id": "4630", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -36514,9 +44322,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3825", + "$id": "4631", "Type": { - "$id": "3826", + "$id": "4632", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -36525,14 +44333,14 @@ } }, { - "$id": "3827", + "$id": "4633", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3828", + "$id": "4634", "kind": "constant", "valueType": { - "$id": "3829", + "$id": "4635", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36552,15 +44360,15 @@ "SkipUrlEncoding": false }, { - "$id": "3830", + "$id": "4636", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3831", + "$id": "4637", "kind": "constant", "valueType": { - "$id": "3832", + "$id": "4638", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36580,11 +44388,11 @@ "SkipUrlEncoding": false }, { - "$id": "3833", + "$id": "4639", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2068" + "$ref": "2873" }, "Location": "Body", "IsApiVersion": false, @@ -36599,12 +44407,12 @@ ], "Responses": [ { - "$id": "3834", + "$id": "4640", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2085" + "$ref": "2890" }, "BodyMediaType": "Json", "Headers": [], @@ -36628,24 +44436,24 @@ "Decorators": [] }, { - "$id": "3835", + "$id": "4641", "Name": "createImageEdit", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Accessibility": "public", "Parameters": [ { - "$ref": "3823" + "$ref": "4629" }, { - "$id": "3836", + "$id": "4642", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3837", + "$id": "4643", "kind": "constant", "valueType": { - "$id": "3838", + "$id": "4644", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36665,14 +44473,14 @@ "SkipUrlEncoding": false }, { - "$id": "3839", + "$id": "4645", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "3840", + "$id": "4646", "kind": "constant", "valueType": { - "$id": "3841", + "$id": "4647", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36692,11 +44500,11 @@ "SkipUrlEncoding": false }, { - "$id": "3842", + "$id": "4648", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2098" + "$ref": "2903" }, "Location": "Body", "IsApiVersion": false, @@ -36711,12 +44519,12 @@ ], "Responses": [ { - "$id": "3843", + "$id": "4649", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2085" + "$ref": "2890" }, "BodyMediaType": "Json", "Headers": [], @@ -36740,24 +44548,24 @@ "Decorators": [] }, { - "$id": "3844", + "$id": "4650", "Name": "createImageVariation", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Accessibility": "public", "Parameters": [ { - "$ref": "3823" + "$ref": "4629" }, { - "$id": "3845", + "$id": "4651", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3846", + "$id": "4652", "kind": "constant", "valueType": { - "$id": "3847", + "$id": "4653", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36777,14 +44585,14 @@ "SkipUrlEncoding": false }, { - "$id": "3848", + "$id": "4654", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "3849", + "$id": "4655", "kind": "constant", "valueType": { - "$id": "3850", + "$id": "4656", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36804,11 +44612,11 @@ "SkipUrlEncoding": false }, { - "$id": "3851", + "$id": "4657", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2116" + "$ref": "2921" }, "Location": "Body", "IsApiVersion": false, @@ -36823,12 +44631,12 @@ ], "Responses": [ { - "$id": "3852", + "$id": "4658", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2085" + "$ref": "2890" }, "BodyMediaType": "Json", "Headers": [], @@ -36853,33 +44661,33 @@ } ], "Protocol": { - "$id": "3853" + "$id": "4659" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3823" + "$ref": "4629" } ], "Decorators": [] }, { - "$id": "3854", + "$id": "4660", "Name": "Messages", "Operations": [ { - "$id": "3855", + "$id": "4661", "Name": "createMessage", "ResourceName": "Messages", "Summary": "Create a message.", "Accessibility": "public", "Parameters": [ { - "$id": "3856", + "$id": "4662", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3857", + "$id": "4663", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -36894,9 +44702,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3858", + "$id": "4664", "Type": { - "$id": "3859", + "$id": "4665", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -36905,14 +44713,14 @@ } }, { - "$id": "3860", + "$id": "4666", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3861", + "$id": "4667", "kind": "constant", "valueType": { - "$id": "3862", + "$id": "4668", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36932,12 +44740,12 @@ "SkipUrlEncoding": false }, { - "$id": "3863", + "$id": "4669", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", "Type": { - "$id": "3864", + "$id": "4670", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36954,15 +44762,15 @@ "SkipUrlEncoding": false }, { - "$id": "3865", + "$id": "4671", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3866", + "$id": "4672", "kind": "constant", "valueType": { - "$id": "3867", + "$id": "4673", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -36982,11 +44790,11 @@ "SkipUrlEncoding": false }, { - "$id": "3868", + "$id": "4674", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1337" + "$ref": "1526" }, "Location": "Body", "IsApiVersion": false, @@ -37001,12 +44809,12 @@ ], "Responses": [ { - "$id": "3869", + "$id": "4675", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1998" + "$ref": "2803" }, "BodyMediaType": "Json", "Headers": [], @@ -37030,24 +44838,24 @@ "Decorators": [] }, { - "$id": "3870", + "$id": "4676", "Name": "listMessages", "ResourceName": "Messages", "Summary": "Returns a list of messages for a given thread.", "Accessibility": "public", "Parameters": [ { - "$ref": "3856" + "$ref": "4662" }, { - "$id": "3871", + "$id": "4677", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3872", + "$id": "4678", "kind": "constant", "valueType": { - "$id": "3873", + "$id": "4679", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37067,12 +44875,12 @@ "SkipUrlEncoding": false }, { - "$id": "3874", + "$id": "4680", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", "Type": { - "$id": "3875", + "$id": "4681", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37089,12 +44897,12 @@ "SkipUrlEncoding": false }, { - "$id": "3876", + "$id": "4682", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "3877", + "$id": "4683", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -37111,12 +44919,12 @@ "SkipUrlEncoding": false }, { - "$id": "3878", + "$id": "4684", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { - "$ref": "420" + "$ref": "609" }, "Location": "Query", "IsApiVersion": false, @@ -37129,12 +44937,12 @@ "SkipUrlEncoding": false }, { - "$id": "3879", + "$id": "4685", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "3880", + "$id": "4686", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37151,12 +44959,12 @@ "SkipUrlEncoding": false }, { - "$id": "3881", + "$id": "4687", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "3882", + "$id": "4688", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37175,12 +44983,12 @@ ], "Responses": [ { - "$id": "3883", + "$id": "4689", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2044" + "$ref": "2849" }, "BodyMediaType": "Json", "Headers": [], @@ -37201,24 +45009,24 @@ "Decorators": [] }, { - "$id": "3884", + "$id": "4690", "Name": "getMessage", "ResourceName": "Messages", "Summary": "Retrieve a message.", "Accessibility": "public", "Parameters": [ { - "$ref": "3856" + "$ref": "4662" }, { - "$id": "3885", + "$id": "4691", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3886", + "$id": "4692", "kind": "constant", "valueType": { - "$id": "3887", + "$id": "4693", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37238,12 +45046,12 @@ "SkipUrlEncoding": false }, { - "$id": "3888", + "$id": "4694", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", "Type": { - "$id": "3889", + "$id": "4695", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37260,12 +45068,12 @@ "SkipUrlEncoding": false }, { - "$id": "3890", + "$id": "4696", "Name": "message_id", "NameInRequest": "message_id", "Description": "The ID of the message to retrieve.", "Type": { - "$id": "3891", + "$id": "4697", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37284,12 +45092,12 @@ ], "Responses": [ { - "$id": "3892", + "$id": "4698", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1998" + "$ref": "2803" }, "BodyMediaType": "Json", "Headers": [], @@ -37310,24 +45118,24 @@ "Decorators": [] }, { - "$id": "3893", + "$id": "4699", "Name": "modifyMessage", "ResourceName": "Messages", "Summary": "Modifies a message.", "Accessibility": "public", "Parameters": [ { - "$ref": "3856" + "$ref": "4662" }, { - "$id": "3894", + "$id": "4700", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3895", + "$id": "4701", "kind": "constant", "valueType": { - "$id": "3896", + "$id": "4702", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37347,12 +45155,12 @@ "SkipUrlEncoding": false }, { - "$id": "3897", + "$id": "4703", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to which this message belongs.", "Type": { - "$id": "3898", + "$id": "4704", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37369,12 +45177,12 @@ "SkipUrlEncoding": false }, { - "$id": "3899", + "$id": "4705", "Name": "message_id", "NameInRequest": "message_id", "Description": "The ID of the message to modify.", "Type": { - "$id": "3900", + "$id": "4706", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37391,15 +45199,15 @@ "SkipUrlEncoding": false }, { - "$id": "3901", + "$id": "4707", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3902", + "$id": "4708", "kind": "constant", "valueType": { - "$id": "3903", + "$id": "4709", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37419,11 +45227,11 @@ "SkipUrlEncoding": false }, { - "$id": "3904", + "$id": "4710", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "2055" + "$ref": "2860" }, "Location": "Body", "IsApiVersion": false, @@ -37438,12 +45246,12 @@ ], "Responses": [ { - "$id": "3905", + "$id": "4711", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1998" + "$ref": "2803" }, "BodyMediaType": "Json", "Headers": [], @@ -37467,24 +45275,24 @@ "Decorators": [] }, { - "$id": "3906", + "$id": "4712", "Name": "deleteMessage", "ResourceName": "Messages", "Summary": "Deletes a message.", "Accessibility": "public", "Parameters": [ { - "$ref": "3856" + "$ref": "4662" }, { - "$id": "3907", + "$id": "4713", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3908", + "$id": "4714", "kind": "constant", "valueType": { - "$id": "3909", + "$id": "4715", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37504,12 +45312,12 @@ "SkipUrlEncoding": false }, { - "$id": "3910", + "$id": "4716", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to which this message belongs.", "Type": { - "$id": "3911", + "$id": "4717", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37526,12 +45334,12 @@ "SkipUrlEncoding": false }, { - "$id": "3912", + "$id": "4718", "Name": "message_id", "NameInRequest": "message_id", "Description": "The ID of the message to delete.", "Type": { - "$id": "3913", + "$id": "4719", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37550,12 +45358,12 @@ ], "Responses": [ { - "$id": "3914", + "$id": "4720", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "2061" + "$ref": "2866" }, "BodyMediaType": "Json", "Headers": [], @@ -37577,33 +45385,33 @@ } ], "Protocol": { - "$id": "3915" + "$id": "4721" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3856" + "$ref": "4662" } ], "Decorators": [] }, { - "$id": "3916", + "$id": "4722", "Name": "ModelsOps", "Operations": [ { - "$id": "3917", + "$id": "4723", "Name": "listModels", "ResourceName": "Models", "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", "Accessibility": "public", "Parameters": [ { - "$id": "3918", + "$id": "4724", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3919", + "$id": "4725", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -37618,9 +45426,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3920", + "$id": "4726", "Type": { - "$id": "3921", + "$id": "4727", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -37629,14 +45437,14 @@ } }, { - "$id": "3922", + "$id": "4728", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3923", + "$id": "4729", "kind": "constant", "valueType": { - "$id": "3924", + "$id": "4730", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37658,12 +45466,12 @@ ], "Responses": [ { - "$id": "3925", + "$id": "4731", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1976" + "$ref": "2781" }, "BodyMediaType": "Json", "Headers": [], @@ -37684,24 +45492,425 @@ "Decorators": [] }, { - "$id": "3926", + "$id": "4732", "Name": "retrieveModel", "ResourceName": "Models", "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", "Accessibility": "public", "Parameters": [ { - "$ref": "3918" + "$ref": "4724" + }, + { + "$id": "4733", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4734", + "kind": "constant", + "valueType": { + "$id": "4735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4736", + "Name": "model", + "NameInRequest": "model", + "Description": "The ID of the model to use for this request.", + "Type": { + "$id": "4737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4738", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2786" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", + "Decorators": [] + }, + { + "$id": "4739", + "Name": "deleteModel", + "ResourceName": "Models", + "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4724" + }, + { + "$id": "4740", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4741", + "kind": "constant", + "valueType": { + "$id": "4742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4743", + "Name": "model", + "NameInRequest": "model", + "Description": "The model to delete", + "Type": { + "$id": "4744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4745", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2796" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4746" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4724" + } + ], + "Decorators": [] + }, + { + "$id": "4747", + "Name": "Moderations", + "Operations": [ + { + "$id": "4748", + "Name": "createModeration", + "ResourceName": "Moderations", + "Summary": "Classifies if text is potentially harmful.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4749", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "4750", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4751", + "Type": { + "$id": "4752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4753", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4754", + "kind": "constant", + "valueType": { + "$id": "4755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4756", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4757", + "kind": "constant", + "valueType": { + "$id": "4758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4759", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2716" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4760", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2723" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/moderations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4761" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4749" + } + ], + "Decorators": [] + }, + { + "$id": "4762", + "Name": "Realtime", + "Operations": [ + { + "$id": "4763", + "Name": "startRealtimeSession", + "ResourceName": "Realtime", + "Summary": "Starts a real-time conversation session.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4764", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "4765", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4766", + "Type": { + "$id": "4767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4768", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4769", + "kind": "constant", + "valueType": { + "$id": "4770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false }, { - "$id": "3927", + "$id": "4771", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3928", + "$id": "4772", "kind": "constant", "valueType": { - "$id": "3929", + "$id": "4773", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -37721,105 +45930,20 @@ "SkipUrlEncoding": false }, { - "$id": "3930", - "Name": "model", - "NameInRequest": "model", - "Description": "The ID of the model to use for this request.", - "Type": { - "$id": "3931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "3932", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1981" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", - "Decorators": [] - }, - { - "$id": "3933", - "Name": "deleteModel", - "ResourceName": "Models", - "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "3918" - }, - { - "$id": "3934", - "Name": "accept", - "NameInRequest": "Accept", + "$id": "4774", + "Name": "requestMessages", + "NameInRequest": "requestMessages", "Type": { - "$id": "3935", - "kind": "constant", + "$id": "4775", + "kind": "array", + "name": "ArrayRealtimeRequestCommand", "valueType": { - "$id": "3936", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "2100" }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "3937", - "Name": "model", - "NameInRequest": "model", - "Description": "The model to delete", - "Type": { - "$id": "3938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, - "Location": "Path", + "Location": "Body", "IsApiVersion": false, "IsContentType": false, "IsEndpoint": false, @@ -37832,166 +45956,20 @@ ], "Responses": [ { - "$id": "3939", + "$id": "4776", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1991" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", - "Decorators": [] - } - ], - "Protocol": { - "$id": "3940" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "3918" - } - ], - "Decorators": [] - }, - { - "$id": "3941", - "Name": "Moderations", - "Operations": [ - { - "$id": "3942", - "Name": "createModeration", - "ResourceName": "Moderations", - "Summary": "Classifies if text is potentially harmful.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "3943", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Type": { - "$id": "3944", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "3945", - "Type": { - "$id": "3946", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "3947", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "3948", - "kind": "constant", - "valueType": { - "$id": "3949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "3950", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "3951", - "kind": "constant", + "$id": "4777", + "kind": "array", + "name": "ArrayRealtimeResponseCommand", "valueType": { - "$id": "3952", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "2322" }, - "value": "application/json", + "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "3953", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1911" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "3954", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1918" - }, "BodyMediaType": "Json", "Headers": [], "IsErrorResponse": false, @@ -38001,47 +45979,47 @@ } ], "HttpMethod": "POST", - "RequestBodyMediaType": "Json", + "RequestBodyMediaType": "None", "Uri": "{endpoint}", - "Path": "/moderations", + "Path": "/realtime", "RequestMediaTypes": [ "application/json" ], "BufferResponse": true, "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", + "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", "Decorators": [] } ], "Protocol": { - "$id": "3955" + "$id": "4778" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3943" + "$ref": "4764" } ], "Decorators": [] }, { - "$id": "3956", + "$id": "4779", "Name": "Threads", "Operations": [ { - "$id": "3957", + "$id": "4780", "Name": "createThread", "ResourceName": "Threads", "Summary": "Create a thread.", "Accessibility": "public", "Parameters": [ { - "$id": "3958", + "$id": "4781", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3959", + "$id": "4782", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -38056,9 +46034,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "3960", + "$id": "4783", "Type": { - "$id": "3961", + "$id": "4784", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -38067,14 +46045,14 @@ } }, { - "$id": "3962", + "$id": "4785", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3963", + "$id": "4786", "kind": "constant", "valueType": { - "$id": "3964", + "$id": "4787", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38094,15 +46072,15 @@ "SkipUrlEncoding": false }, { - "$id": "3965", + "$id": "4788", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3966", + "$id": "4789", "kind": "constant", "valueType": { - "$id": "3967", + "$id": "4790", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38122,11 +46100,11 @@ "SkipUrlEncoding": false }, { - "$id": "3968", + "$id": "4791", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1334" + "$ref": "1523" }, "Location": "Body", "IsApiVersion": false, @@ -38141,12 +46119,12 @@ ], "Responses": [ { - "$id": "3969", + "$id": "4792", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1863" + "$ref": "2052" }, "BodyMediaType": "Json", "Headers": [], @@ -38170,24 +46148,24 @@ "Decorators": [] }, { - "$id": "3970", + "$id": "4793", "Name": "getThread", "ResourceName": "Threads", "Summary": "Retrieves a thread.", "Accessibility": "public", "Parameters": [ { - "$ref": "3958" + "$ref": "4781" }, { - "$id": "3971", + "$id": "4794", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3972", + "$id": "4795", "kind": "constant", "valueType": { - "$id": "3973", + "$id": "4796", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38207,12 +46185,12 @@ "SkipUrlEncoding": false }, { - "$id": "3974", + "$id": "4797", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to retrieve.", "Type": { - "$id": "3975", + "$id": "4798", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38231,12 +46209,12 @@ ], "Responses": [ { - "$id": "3976", + "$id": "4799", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1863" + "$ref": "2052" }, "BodyMediaType": "Json", "Headers": [], @@ -38257,24 +46235,24 @@ "Decorators": [] }, { - "$id": "3977", + "$id": "4800", "Name": "modifyThread", "ResourceName": "Threads", "Summary": "Modifies a thread.", "Accessibility": "public", "Parameters": [ { - "$ref": "3958" + "$ref": "4781" }, { - "$id": "3978", + "$id": "4801", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3979", + "$id": "4802", "kind": "constant", "valueType": { - "$id": "3980", + "$id": "4803", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38294,12 +46272,12 @@ "SkipUrlEncoding": false }, { - "$id": "3981", + "$id": "4804", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", "Type": { - "$id": "3982", + "$id": "4805", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38316,15 +46294,15 @@ "SkipUrlEncoding": false }, { - "$id": "3983", + "$id": "4806", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "3984", + "$id": "4807", "kind": "constant", "valueType": { - "$id": "3985", + "$id": "4808", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38344,11 +46322,11 @@ "SkipUrlEncoding": false }, { - "$id": "3986", + "$id": "4809", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1889" + "$ref": "2078" }, "Location": "Body", "IsApiVersion": false, @@ -38363,12 +46341,12 @@ ], "Responses": [ { - "$id": "3987", + "$id": "4810", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1863" + "$ref": "2052" }, "BodyMediaType": "Json", "Headers": [], @@ -38392,24 +46370,24 @@ "Decorators": [] }, { - "$id": "3988", + "$id": "4811", "Name": "deleteThread", "ResourceName": "Threads", "Summary": "Delete a thread.", "Accessibility": "public", "Parameters": [ { - "$ref": "3958" + "$ref": "4781" }, { - "$id": "3989", + "$id": "4812", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "3990", + "$id": "4813", "kind": "constant", "valueType": { - "$id": "3991", + "$id": "4814", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38429,12 +46407,12 @@ "SkipUrlEncoding": false }, { - "$id": "3992", + "$id": "4815", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to delete.", "Type": { - "$id": "3993", + "$id": "4816", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38453,12 +46431,12 @@ ], "Responses": [ { - "$id": "3994", + "$id": "4817", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1904" + "$ref": "2093" }, "BodyMediaType": "Json", "Headers": [], @@ -38480,33 +46458,33 @@ } ], "Protocol": { - "$id": "3995" + "$id": "4818" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3958" + "$ref": "4781" } ], "Decorators": [] }, { - "$id": "3996", + "$id": "4819", "Name": "Runs", "Operations": [ { - "$id": "3997", + "$id": "4820", "Name": "createThreadAndRun", "ResourceName": "Runs", "Summary": "Create a thread and run it in one request.", "Accessibility": "public", "Parameters": [ { - "$id": "3998", + "$id": "4821", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "3999", + "$id": "4822", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -38521,9 +46499,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "4000", + "$id": "4823", "Type": { - "$id": "4001", + "$id": "4824", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -38532,14 +46510,14 @@ } }, { - "$id": "4002", + "$id": "4825", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4003", + "$id": "4826", "kind": "constant", "valueType": { - "$id": "4004", + "$id": "4827", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38559,15 +46537,15 @@ "SkipUrlEncoding": false }, { - "$id": "4005", + "$id": "4828", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4006", + "$id": "4829", "kind": "constant", "valueType": { - "$id": "4007", + "$id": "4830", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38587,11 +46565,11 @@ "SkipUrlEncoding": false }, { - "$id": "4008", + "$id": "4831", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1330" + "$ref": "1519" }, "Location": "Body", "IsApiVersion": false, @@ -38606,12 +46584,12 @@ ], "Responses": [ { - "$id": "4009", + "$id": "4832", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -38635,24 +46613,24 @@ "Decorators": [] }, { - "$id": "4010", + "$id": "4833", "Name": "createRun", "ResourceName": "Runs", "Summary": "Create a run.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4011", + "$id": "4834", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4012", + "$id": "4835", "kind": "constant", "valueType": { - "$id": "4013", + "$id": "4836", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38672,12 +46650,12 @@ "SkipUrlEncoding": false }, { - "$id": "4014", + "$id": "4837", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to run.", "Type": { - "$id": "4015", + "$id": "4838", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38694,15 +46672,15 @@ "SkipUrlEncoding": false }, { - "$id": "4016", + "$id": "4839", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4017", + "$id": "4840", "kind": "constant", "valueType": { - "$id": "4018", + "$id": "4841", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38722,11 +46700,11 @@ "SkipUrlEncoding": false }, { - "$id": "4019", + "$id": "4842", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1625" + "$ref": "1814" }, "Location": "Body", "IsApiVersion": false, @@ -38741,12 +46719,12 @@ ], "Responses": [ { - "$id": "4020", + "$id": "4843", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -38770,24 +46748,24 @@ "Decorators": [] }, { - "$id": "4021", + "$id": "4844", "Name": "listRuns", "ResourceName": "Runs", "Summary": "Returns a list of runs belonging to a thread.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4022", + "$id": "4845", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4023", + "$id": "4846", "kind": "constant", "valueType": { - "$id": "4024", + "$id": "4847", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38807,12 +46785,12 @@ "SkipUrlEncoding": false }, { - "$id": "4025", + "$id": "4848", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread the run belongs to.", "Type": { - "$id": "4026", + "$id": "4849", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38829,12 +46807,12 @@ "SkipUrlEncoding": false }, { - "$id": "4027", + "$id": "4850", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "4028", + "$id": "4851", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -38851,7 +46829,7 @@ "SkipUrlEncoding": false }, { - "$id": "4029", + "$id": "4852", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", @@ -38869,12 +46847,12 @@ "SkipUrlEncoding": false }, { - "$id": "4030", + "$id": "4853", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "4031", + "$id": "4854", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38891,12 +46869,12 @@ "SkipUrlEncoding": false }, { - "$id": "4032", + "$id": "4855", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "4033", + "$id": "4856", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38915,12 +46893,12 @@ ], "Responses": [ { - "$id": "4034", + "$id": "4857", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1674" + "$ref": "1863" }, "BodyMediaType": "Json", "Headers": [], @@ -38941,24 +46919,24 @@ "Decorators": [] }, { - "$id": "4035", + "$id": "4858", "Name": "getRun", "ResourceName": "Runs", "Summary": "Retrieves a run.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4036", + "$id": "4859", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4037", + "$id": "4860", "kind": "constant", "valueType": { - "$id": "4038", + "$id": "4861", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -38978,12 +46956,12 @@ "SkipUrlEncoding": false }, { - "$id": "4039", + "$id": "4862", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { - "$id": "4040", + "$id": "4863", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39000,12 +46978,12 @@ "SkipUrlEncoding": false }, { - "$id": "4041", + "$id": "4864", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run to retrieve.", "Type": { - "$id": "4042", + "$id": "4865", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39024,12 +47002,12 @@ ], "Responses": [ { - "$id": "4043", + "$id": "4866", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -39050,24 +47028,24 @@ "Decorators": [] }, { - "$id": "4044", + "$id": "4867", "Name": "modifyRun", "ResourceName": "Runs", "Summary": "Modifies a run.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4045", + "$id": "4868", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4046", + "$id": "4869", "kind": "constant", "valueType": { - "$id": "4047", + "$id": "4870", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39087,12 +47065,12 @@ "SkipUrlEncoding": false }, { - "$id": "4048", + "$id": "4871", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { - "$id": "4049", + "$id": "4872", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39109,12 +47087,12 @@ "SkipUrlEncoding": false }, { - "$id": "4050", + "$id": "4873", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run to modify.", "Type": { - "$id": "4051", + "$id": "4874", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39131,15 +47109,15 @@ "SkipUrlEncoding": false }, { - "$id": "4052", + "$id": "4875", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4053", + "$id": "4876", "kind": "constant", "valueType": { - "$id": "4054", + "$id": "4877", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39159,11 +47137,11 @@ "SkipUrlEncoding": false }, { - "$id": "4055", + "$id": "4878", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1685" + "$ref": "1874" }, "Location": "Body", "IsApiVersion": false, @@ -39178,12 +47156,12 @@ ], "Responses": [ { - "$id": "4056", + "$id": "4879", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -39207,24 +47185,24 @@ "Decorators": [] }, { - "$id": "4057", + "$id": "4880", "Name": "cancelRun", "ResourceName": "Runs", "Summary": "Cancels a run that is `in_progress`.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4058", + "$id": "4881", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4059", + "$id": "4882", "kind": "constant", "valueType": { - "$id": "4060", + "$id": "4883", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39244,12 +47222,12 @@ "SkipUrlEncoding": false }, { - "$id": "4061", + "$id": "4884", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to which this run belongs.", "Type": { - "$id": "4062", + "$id": "4885", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39266,12 +47244,12 @@ "SkipUrlEncoding": false }, { - "$id": "4063", + "$id": "4886", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run to cancel.", "Type": { - "$id": "4064", + "$id": "4887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39290,12 +47268,12 @@ ], "Responses": [ { - "$id": "4065", + "$id": "4888", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -39316,24 +47294,24 @@ "Decorators": [] }, { - "$id": "4066", + "$id": "4889", "Name": "submitToolOutputsToRun", "ResourceName": "Runs", "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4067", + "$id": "4890", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4068", + "$id": "4891", "kind": "constant", "valueType": { - "$id": "4069", + "$id": "4892", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39353,12 +47331,12 @@ "SkipUrlEncoding": false }, { - "$id": "4070", + "$id": "4893", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", "Type": { - "$id": "4071", + "$id": "4894", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39375,12 +47353,12 @@ "SkipUrlEncoding": false }, { - "$id": "4072", + "$id": "4895", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run that requires the tool output submission.", "Type": { - "$id": "4073", + "$id": "4896", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39397,15 +47375,15 @@ "SkipUrlEncoding": false }, { - "$id": "4074", + "$id": "4897", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4075", + "$id": "4898", "kind": "constant", "valueType": { - "$id": "4076", + "$id": "4899", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39425,11 +47403,11 @@ "SkipUrlEncoding": false }, { - "$id": "4077", + "$id": "4900", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1691" + "$ref": "1880" }, "Location": "Body", "IsApiVersion": false, @@ -39444,12 +47422,12 @@ ], "Responses": [ { - "$id": "4078", + "$id": "4901", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1518" + "$ref": "1707" }, "BodyMediaType": "Json", "Headers": [], @@ -39473,24 +47451,24 @@ "Decorators": [] }, { - "$id": "4079", + "$id": "4902", "Name": "listRunSteps", "ResourceName": "Runs", "Summary": "Returns a list of run steps belonging to a run.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4080", + "$id": "4903", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4081", + "$id": "4904", "kind": "constant", "valueType": { - "$id": "4082", + "$id": "4905", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39510,12 +47488,12 @@ "SkipUrlEncoding": false }, { - "$id": "4083", + "$id": "4906", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread the run and run steps belong to.", "Type": { - "$id": "4084", + "$id": "4907", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39532,12 +47510,12 @@ "SkipUrlEncoding": false }, { - "$id": "4085", + "$id": "4908", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run the run steps belong to.", "Type": { - "$id": "4086", + "$id": "4909", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39554,12 +47532,12 @@ "SkipUrlEncoding": false }, { - "$id": "4087", + "$id": "4910", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "4088", + "$id": "4911", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -39576,7 +47554,7 @@ "SkipUrlEncoding": false }, { - "$id": "4089", + "$id": "4912", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", @@ -39594,12 +47572,12 @@ "SkipUrlEncoding": false }, { - "$id": "4090", + "$id": "4913", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "4091", + "$id": "4914", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39616,12 +47594,12 @@ "SkipUrlEncoding": false }, { - "$id": "4092", + "$id": "4915", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "4093", + "$id": "4916", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39640,12 +47618,12 @@ ], "Responses": [ { - "$id": "4094", + "$id": "4917", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1702" + "$ref": "1891" }, "BodyMediaType": "Json", "Headers": [], @@ -39666,24 +47644,24 @@ "Decorators": [] }, { - "$id": "4095", + "$id": "4918", "Name": "getRunStep", "ResourceName": "Runs", "Summary": "Retrieves a run step.", "Accessibility": "public", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" }, { - "$id": "4096", + "$id": "4919", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4097", + "$id": "4920", "kind": "constant", "valueType": { - "$id": "4098", + "$id": "4921", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39703,12 +47681,12 @@ "SkipUrlEncoding": false }, { - "$id": "4099", + "$id": "4922", "Name": "thread_id", "NameInRequest": "thread_id", "Description": "The ID of the thread to which the run and run step belongs.", "Type": { - "$id": "4100", + "$id": "4923", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39725,12 +47703,12 @@ "SkipUrlEncoding": false }, { - "$id": "4101", + "$id": "4924", "Name": "run_id", "NameInRequest": "run_id", "Description": "The ID of the run to which the run step belongs.", "Type": { - "$id": "4102", + "$id": "4925", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39747,12 +47725,12 @@ "SkipUrlEncoding": false }, { - "$id": "4103", + "$id": "4926", "Name": "step_id", "NameInRequest": "step_id", "Description": "The ID of the run step to retrieve.", "Type": { - "$id": "4104", + "$id": "4927", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39771,12 +47749,12 @@ ], "Responses": [ { - "$id": "4105", + "$id": "4928", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1707" + "$ref": "1896" }, "BodyMediaType": "Json", "Headers": [], @@ -39798,33 +47776,33 @@ } ], "Protocol": { - "$id": "4106" + "$id": "4929" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "3998" + "$ref": "4821" } ], "Decorators": [] }, { - "$id": "4107", + "$id": "4930", "Name": "VectorStores", "Operations": [ { - "$id": "4108", + "$id": "4931", "Name": "listVectorStores", "ResourceName": "VectorStores", "Summary": "Returns a list of vector-stores.", "Accessibility": "public", "Parameters": [ { - "$id": "4109", + "$id": "4932", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "4110", + "$id": "4933", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -39839,9 +47817,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "4111", + "$id": "4934", "Type": { - "$id": "4112", + "$id": "4935", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -39850,14 +47828,14 @@ } }, { - "$id": "4113", + "$id": "4936", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4114", + "$id": "4937", "kind": "constant", "valueType": { - "$id": "4115", + "$id": "4938", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39877,12 +47855,12 @@ "SkipUrlEncoding": false }, { - "$id": "4116", + "$id": "4939", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "4117", + "$id": "4940", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -39899,7 +47877,7 @@ "SkipUrlEncoding": false }, { - "$id": "4118", + "$id": "4941", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", @@ -39917,12 +47895,12 @@ "SkipUrlEncoding": false }, { - "$id": "4119", + "$id": "4942", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "4120", + "$id": "4943", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39939,12 +47917,12 @@ "SkipUrlEncoding": false }, { - "$id": "4121", + "$id": "4944", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "4122", + "$id": "4945", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -39963,12 +47941,12 @@ ], "Responses": [ { - "$id": "4123", + "$id": "4946", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1135" + "$ref": "1324" }, "BodyMediaType": "Json", "Headers": [], @@ -39989,24 +47967,24 @@ "Decorators": [] }, { - "$id": "4124", + "$id": "4947", "Name": "createVectorStore", "ResourceName": "VectorStores", "Summary": "Creates a vector store.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4125", + "$id": "4948", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4126", + "$id": "4949", "kind": "constant", "valueType": { - "$id": "4127", + "$id": "4950", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40026,15 +48004,15 @@ "SkipUrlEncoding": false }, { - "$id": "4128", + "$id": "4951", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4129", + "$id": "4952", "kind": "constant", "valueType": { - "$id": "4130", + "$id": "4953", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40054,11 +48032,11 @@ "SkipUrlEncoding": false }, { - "$id": "4131", + "$id": "4954", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1190" + "$ref": "1379" }, "Location": "Body", "IsApiVersion": false, @@ -40073,12 +48051,12 @@ ], "Responses": [ { - "$id": "4132", + "$id": "4955", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1140" + "$ref": "1329" }, "BodyMediaType": "Json", "Headers": [], @@ -40102,24 +48080,24 @@ "Decorators": [] }, { - "$id": "4133", + "$id": "4956", "Name": "getVectorStore", "ResourceName": "VectorStores", "Summary": "Retrieves a vector store.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4134", + "$id": "4957", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4135", + "$id": "4958", "kind": "constant", "valueType": { - "$id": "4136", + "$id": "4959", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40139,12 +48117,12 @@ "SkipUrlEncoding": false }, { - "$id": "4137", + "$id": "4960", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store to retrieve.", "Type": { - "$id": "4138", + "$id": "4961", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40163,12 +48141,12 @@ ], "Responses": [ { - "$id": "4139", + "$id": "4962", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1140" + "$ref": "1329" }, "BodyMediaType": "Json", "Headers": [], @@ -40189,24 +48167,24 @@ "Decorators": [] }, { - "$id": "4140", + "$id": "4963", "Name": "modifyVectorStore", "ResourceName": "VectorStores", "Summary": "Modifies a vector store.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4141", + "$id": "4964", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4142", + "$id": "4965", "kind": "constant", "valueType": { - "$id": "4143", + "$id": "4966", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40226,12 +48204,12 @@ "SkipUrlEncoding": false }, { - "$id": "4144", + "$id": "4967", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store to modify.", "Type": { - "$id": "4145", + "$id": "4968", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40248,15 +48226,15 @@ "SkipUrlEncoding": false }, { - "$id": "4146", + "$id": "4969", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4147", + "$id": "4970", "kind": "constant", "valueType": { - "$id": "4148", + "$id": "4971", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40276,11 +48254,11 @@ "SkipUrlEncoding": false }, { - "$id": "4149", + "$id": "4972", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1222" + "$ref": "1411" }, "Location": "Body", "IsApiVersion": false, @@ -40295,12 +48273,12 @@ ], "Responses": [ { - "$id": "4150", + "$id": "4973", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1140" + "$ref": "1329" }, "BodyMediaType": "Json", "Headers": [], @@ -40324,24 +48302,24 @@ "Decorators": [] }, { - "$id": "4151", + "$id": "4974", "Name": "deleteVectorStore", "ResourceName": "VectorStores", "Summary": "Delete a vector store.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4152", + "$id": "4975", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4153", + "$id": "4976", "kind": "constant", "valueType": { - "$id": "4154", + "$id": "4977", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40361,12 +48339,12 @@ "SkipUrlEncoding": false }, { - "$id": "4155", + "$id": "4978", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store to delete.", "Type": { - "$id": "4156", + "$id": "4979", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40385,12 +48363,12 @@ ], "Responses": [ { - "$id": "4157", + "$id": "4980", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1233" + "$ref": "1422" }, "BodyMediaType": "Json", "Headers": [], @@ -40411,24 +48389,24 @@ "Decorators": [] }, { - "$id": "4158", + "$id": "4981", "Name": "listVectorStoreFiles", "ResourceName": "VectorStores", "Summary": "Returns a list of vector store files.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4159", + "$id": "4982", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4160", + "$id": "4983", "kind": "constant", "valueType": { - "$id": "4161", + "$id": "4984", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40448,12 +48426,12 @@ "SkipUrlEncoding": false }, { - "$id": "4162", + "$id": "4985", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the files belong to.", "Type": { - "$id": "4163", + "$id": "4986", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40470,12 +48448,12 @@ "SkipUrlEncoding": false }, { - "$id": "4164", + "$id": "4987", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "4165", + "$id": "4988", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -40492,7 +48470,7 @@ "SkipUrlEncoding": false }, { - "$id": "4166", + "$id": "4989", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", @@ -40510,12 +48488,12 @@ "SkipUrlEncoding": false }, { - "$id": "4167", + "$id": "4990", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "4168", + "$id": "4991", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40532,12 +48510,12 @@ "SkipUrlEncoding": false }, { - "$id": "4169", + "$id": "4992", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "4170", + "$id": "4993", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40554,7 +48532,7 @@ "SkipUrlEncoding": false }, { - "$id": "4171", + "$id": "4994", "Name": "filter", "NameInRequest": "filter", "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", @@ -40574,12 +48552,12 @@ ], "Responses": [ { - "$id": "4172", + "$id": "4995", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1240" + "$ref": "1429" }, "BodyMediaType": "Json", "Headers": [], @@ -40600,24 +48578,24 @@ "Decorators": [] }, { - "$id": "4173", + "$id": "4996", "Name": "createVectorStoreFile", "ResourceName": "VectorStores", "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4174", + "$id": "4997", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4175", + "$id": "4998", "kind": "constant", "valueType": { - "$id": "4176", + "$id": "4999", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40637,12 +48615,12 @@ "SkipUrlEncoding": false }, { - "$id": "4177", + "$id": "5000", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store for which to create a File.", "Type": { - "$id": "4178", + "$id": "5001", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40659,15 +48637,15 @@ "SkipUrlEncoding": false }, { - "$id": "4179", + "$id": "5002", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4180", + "$id": "5003", "kind": "constant", "valueType": { - "$id": "4181", + "$id": "5004", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40687,11 +48665,11 @@ "SkipUrlEncoding": false }, { - "$id": "4182", + "$id": "5005", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1289" + "$ref": "1478" }, "Location": "Body", "IsApiVersion": false, @@ -40706,12 +48684,12 @@ ], "Responses": [ { - "$id": "4183", + "$id": "5006", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1245" + "$ref": "1434" }, "BodyMediaType": "Json", "Headers": [], @@ -40735,24 +48713,24 @@ "Decorators": [] }, { - "$id": "4184", + "$id": "5007", "Name": "getVectorStoreFile", "ResourceName": "VectorStores", "Summary": "Retrieves a vector store file.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4185", + "$id": "5008", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4186", + "$id": "5009", "kind": "constant", "valueType": { - "$id": "4187", + "$id": "5010", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40772,12 +48750,12 @@ "SkipUrlEncoding": false }, { - "$id": "4188", + "$id": "5011", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the file belongs to.", "Type": { - "$id": "4189", + "$id": "5012", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40794,12 +48772,12 @@ "SkipUrlEncoding": false }, { - "$id": "4190", + "$id": "5013", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file being retrieved.", "Type": { - "$id": "4191", + "$id": "5014", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40818,12 +48796,12 @@ ], "Responses": [ { - "$id": "4192", + "$id": "5015", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1245" + "$ref": "1434" }, "BodyMediaType": "Json", "Headers": [], @@ -40844,24 +48822,24 @@ "Decorators": [] }, { - "$id": "4193", + "$id": "5016", "Name": "deleteVectorStoreFile", "ResourceName": "VectorStores", "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4194", + "$id": "5017", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4195", + "$id": "5018", "kind": "constant", "valueType": { - "$id": "4196", + "$id": "5019", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40881,12 +48859,12 @@ "SkipUrlEncoding": false }, { - "$id": "4197", + "$id": "5020", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the file belongs to.", "Type": { - "$id": "4198", + "$id": "5021", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40903,12 +48881,12 @@ "SkipUrlEncoding": false }, { - "$id": "4199", + "$id": "5022", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to delete.", "Type": { - "$id": "4200", + "$id": "5023", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40927,12 +48905,12 @@ ], "Responses": [ { - "$id": "4201", + "$id": "5024", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1294" + "$ref": "1483" }, "BodyMediaType": "Json", "Headers": [], @@ -40953,24 +48931,24 @@ "Decorators": [] }, { - "$id": "4202", + "$id": "5025", "Name": "createVectorStoreFileBatch", "ResourceName": "VectorStores", "Summary": "Create a vector store file batch.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4203", + "$id": "5026", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4204", + "$id": "5027", "kind": "constant", "valueType": { - "$id": "4205", + "$id": "5028", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40990,12 +48968,12 @@ "SkipUrlEncoding": false }, { - "$id": "4206", + "$id": "5029", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store for which to create a file batch.", "Type": { - "$id": "4207", + "$id": "5030", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41012,15 +48990,15 @@ "SkipUrlEncoding": false }, { - "$id": "4208", + "$id": "5031", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4209", + "$id": "5032", "kind": "constant", "valueType": { - "$id": "4210", + "$id": "5033", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41040,11 +49018,11 @@ "SkipUrlEncoding": false }, { - "$id": "4211", + "$id": "5034", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1301" + "$ref": "1490" }, "Location": "Body", "IsApiVersion": false, @@ -41059,12 +49037,12 @@ ], "Responses": [ { - "$id": "4212", + "$id": "5035", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1307" + "$ref": "1496" }, "BodyMediaType": "Json", "Headers": [], @@ -41088,24 +49066,24 @@ "Decorators": [] }, { - "$id": "4213", + "$id": "5036", "Name": "getVectorStoreFileBatch", "ResourceName": "VectorStores", "Summary": "Retrieves a vector store file batch.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4214", + "$id": "5037", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4215", + "$id": "5038", "kind": "constant", "valueType": { - "$id": "4216", + "$id": "5039", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41125,12 +49103,12 @@ "SkipUrlEncoding": false }, { - "$id": "4217", + "$id": "5040", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the file batch belongs to.", "Type": { - "$id": "4218", + "$id": "5041", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41147,12 +49125,12 @@ "SkipUrlEncoding": false }, { - "$id": "4219", + "$id": "5042", "Name": "batch_id", "NameInRequest": "batch_id", "Description": "The ID of the file batch being retrieved.", "Type": { - "$id": "4220", + "$id": "5043", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41171,12 +49149,12 @@ ], "Responses": [ { - "$id": "4221", + "$id": "5044", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1307" + "$ref": "1496" }, "BodyMediaType": "Json", "Headers": [], @@ -41197,24 +49175,24 @@ "Decorators": [] }, { - "$id": "4222", + "$id": "5045", "Name": "cancelVectorStoreFileBatch", "ResourceName": "VectorStores", "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4223", + "$id": "5046", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4224", + "$id": "5047", "kind": "constant", "valueType": { - "$id": "4225", + "$id": "5048", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41234,12 +49212,12 @@ "SkipUrlEncoding": false }, { - "$id": "4226", + "$id": "5049", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the file batch belongs to.", "Type": { - "$id": "4227", + "$id": "5050", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41256,12 +49234,12 @@ "SkipUrlEncoding": false }, { - "$id": "4228", + "$id": "5051", "Name": "batch_id", "NameInRequest": "batch_id", "Description": "The ID of the file batch to cancel.", "Type": { - "$id": "4229", + "$id": "5052", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41280,12 +49258,12 @@ ], "Responses": [ { - "$id": "4230", + "$id": "5053", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1307" + "$ref": "1496" }, "BodyMediaType": "Json", "Headers": [], @@ -41306,24 +49284,24 @@ "Decorators": [] }, { - "$id": "4231", + "$id": "5054", "Name": "listFilesInVectorStoreBatch", "ResourceName": "VectorStores", "Summary": "Returns a list of vector store files in a batch.", "Accessibility": "public", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" }, { - "$id": "4232", + "$id": "5055", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4233", + "$id": "5056", "kind": "constant", "valueType": { - "$id": "4234", + "$id": "5057", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41343,12 +49321,12 @@ "SkipUrlEncoding": false }, { - "$id": "4235", + "$id": "5058", "Name": "vector_store_id", "NameInRequest": "vector_store_id", "Description": "The ID of the vector store that the file batch belongs to.", "Type": { - "$id": "4236", + "$id": "5059", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41365,12 +49343,12 @@ "SkipUrlEncoding": false }, { - "$id": "4237", + "$id": "5060", "Name": "batch_id", "NameInRequest": "batch_id", "Description": "The ID of the file batch that the files belong to.", "Type": { - "$id": "4238", + "$id": "5061", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41387,12 +49365,12 @@ "SkipUrlEncoding": false }, { - "$id": "4239", + "$id": "5062", "Name": "limit", "NameInRequest": "limit", "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { - "$id": "4240", + "$id": "5063", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -41409,7 +49387,7 @@ "SkipUrlEncoding": false }, { - "$id": "4241", + "$id": "5064", "Name": "order", "NameInRequest": "order", "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", @@ -41427,12 +49405,12 @@ "SkipUrlEncoding": false }, { - "$id": "4242", + "$id": "5065", "Name": "after", "NameInRequest": "after", "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { - "$id": "4243", + "$id": "5066", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41449,12 +49427,12 @@ "SkipUrlEncoding": false }, { - "$id": "4244", + "$id": "5067", "Name": "before", "NameInRequest": "before", "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { - "$id": "4245", + "$id": "5068", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41471,7 +49449,7 @@ "SkipUrlEncoding": false }, { - "$id": "4246", + "$id": "5069", "Name": "filter", "NameInRequest": "filter", "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", @@ -41491,12 +49469,12 @@ ], "Responses": [ { - "$id": "4247", + "$id": "5070", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1240" + "$ref": "1429" }, "BodyMediaType": "Json", "Headers": [], @@ -41518,33 +49496,33 @@ } ], "Protocol": { - "$id": "4248" + "$id": "5071" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "4109" + "$ref": "4932" } ], "Decorators": [] }, { - "$id": "4249", + "$id": "5072", "Name": "Uploads", "Operations": [ { - "$id": "4250", + "$id": "5073", "Name": "createUpload", "ResourceName": "Uploads", "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", "Accessibility": "public", "Parameters": [ { - "$id": "4251", + "$id": "5074", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "4252", + "$id": "5075", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -41559,9 +49537,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "4253", + "$id": "5076", "Type": { - "$id": "4254", + "$id": "5077", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -41570,14 +49548,14 @@ } }, { - "$id": "4255", + "$id": "5078", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4256", + "$id": "5079", "kind": "constant", "valueType": { - "$id": "4257", + "$id": "5080", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41597,15 +49575,15 @@ "SkipUrlEncoding": false }, { - "$id": "4258", + "$id": "5081", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4259", + "$id": "5082", "kind": "constant", "valueType": { - "$id": "4260", + "$id": "5083", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41625,11 +49603,11 @@ "SkipUrlEncoding": false }, { - "$id": "4261", + "$id": "5084", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1058" + "$ref": "1247" }, "Location": "Body", "IsApiVersion": false, @@ -41644,12 +49622,12 @@ ], "Responses": [ { - "$id": "4262", + "$id": "5085", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1066" + "$ref": "1255" }, "BodyMediaType": "Json", "Headers": [], @@ -41673,24 +49651,24 @@ "Decorators": [] }, { - "$id": "4263", + "$id": "5086", "Name": "addUploadPart", "ResourceName": "Uploads", "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", "Accessibility": "public", "Parameters": [ { - "$ref": "4251" + "$ref": "5074" }, { - "$id": "4264", + "$id": "5087", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4265", + "$id": "5088", "kind": "constant", "valueType": { - "$id": "4266", + "$id": "5089", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41710,14 +49688,14 @@ "SkipUrlEncoding": false }, { - "$id": "4267", + "$id": "5090", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "4268", + "$id": "5091", "kind": "constant", "valueType": { - "$id": "4269", + "$id": "5092", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41737,11 +49715,11 @@ "SkipUrlEncoding": false }, { - "$id": "4270", + "$id": "5093", "Name": "upload_id", "NameInRequest": "upload_id", "Type": { - "$id": "4271", + "$id": "5094", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41758,11 +49736,11 @@ "SkipUrlEncoding": false }, { - "$id": "4272", + "$id": "5095", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1116" + "$ref": "1305" }, "Location": "Body", "IsApiVersion": false, @@ -41777,12 +49755,12 @@ ], "Responses": [ { - "$id": "4273", + "$id": "5096", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1119" + "$ref": "1308" }, "BodyMediaType": "Json", "Headers": [], @@ -41806,24 +49784,24 @@ "Decorators": [] }, { - "$id": "4274", + "$id": "5097", "Name": "completeUpload", "ResourceName": "Uploads", "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", "Accessibility": "public", "Parameters": [ { - "$ref": "4251" + "$ref": "5074" }, { - "$id": "4275", + "$id": "5098", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4276", + "$id": "5099", "kind": "constant", "valueType": { - "$id": "4277", + "$id": "5100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41843,11 +49821,11 @@ "SkipUrlEncoding": false }, { - "$id": "4278", + "$id": "5101", "Name": "upload_id", "NameInRequest": "upload_id", "Type": { - "$id": "4279", + "$id": "5102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41864,15 +49842,15 @@ "SkipUrlEncoding": false }, { - "$id": "4280", + "$id": "5103", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "4281", + "$id": "5104", "kind": "constant", "valueType": { - "$id": "4282", + "$id": "5105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41892,11 +49870,11 @@ "SkipUrlEncoding": false }, { - "$id": "4283", + "$id": "5106", "Name": "requestBody", "NameInRequest": "requestBody", "Type": { - "$ref": "1129" + "$ref": "1318" }, "Location": "Body", "IsApiVersion": false, @@ -41911,12 +49889,12 @@ ], "Responses": [ { - "$id": "4284", + "$id": "5107", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1066" + "$ref": "1255" }, "BodyMediaType": "Json", "Headers": [], @@ -41940,24 +49918,24 @@ "Decorators": [] }, { - "$id": "4285", + "$id": "5108", "Name": "cancelUpload", "ResourceName": "Uploads", "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", "Accessibility": "public", "Parameters": [ { - "$ref": "4251" + "$ref": "5074" }, { - "$id": "4286", + "$id": "5109", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "4287", + "$id": "5110", "kind": "constant", "valueType": { - "$id": "4288", + "$id": "5111", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -41977,11 +49955,11 @@ "SkipUrlEncoding": false }, { - "$id": "4289", + "$id": "5112", "Name": "upload_id", "NameInRequest": "upload_id", "Type": { - "$id": "4290", + "$id": "5113", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -42000,12 +49978,12 @@ ], "Responses": [ { - "$id": "4291", + "$id": "5114", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "1066" + "$ref": "1255" }, "BodyMediaType": "Json", "Headers": [], @@ -42027,21 +50005,21 @@ } ], "Protocol": { - "$id": "4292" + "$id": "5115" }, "Parent": "OpenAIClient", "Parameters": [ { - "$ref": "4251" + "$ref": "5074" } ], "Decorators": [] } ], "Auth": { - "$id": "4293", + "$id": "5116", "ApiKey": { - "$id": "4294", + "$id": "5117", "Name": "Authorization", "Prefix": "Bearer" } diff --git a/package-lock.json b/package-lock.json index f98567fbb..a27dd4d61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,19 +66,19 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -88,9 +88,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", - "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -329,9 +329,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240925.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240925.2.tgz", - "integrity": "sha512-36OfvNFDzDs2895KNTWrWR9fYj2TAIVuM1BzKUuRMVb3UE9RAx3XQ1+DZOtT51ROaKpRBcHDkMJqyyh7jmepbQ==", + "version": "0.1.9-alpha.20241002.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241002.1.tgz", + "integrity": "sha512-3SJSq50s8OJkRX9ExUVMXUsvACVVGeC3mH2BoiW8wKMexxw0gRJzYuKjd/tmQpM51hGHKB9HtdK2zylXuD0PJQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -573,9 +573,9 @@ } }, "node_modules/fast-uri": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz", + "integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==" }, "node_modules/fastq": { "version": "1.17.1", From bb6017d8f0191be47c7d1c87a2b022ca79a072b0 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 8 Oct 2024 13:43:07 -0700 Subject: [PATCH 05/54] More customization updates --- .../Assistants/AssistantClient.Protocol.cs | 20 +- .../src/Custom/Assistants/AssistantClient.cs | 26 +- .../Assistants/AssistantCollectionOrder.cs | 4 +- .../Assistants/AssistantResponseFormat.cs | 2 +- ...InterpreterToolDefinition.Serialization.cs | 2 +- .../Assistants/FileSearchRankingOptions.cs | 2 +- .../FileSearchToolDefinition.Serialization.cs | 2 +- ...InternalAssistantMessageClient.Protocol.cs | 16 +- .../InternalAssistantMessageClient.cs | 10 +- .../Internal/InternalAssistantThreadClient.cs | 6 - ...alMessageImageFileContent.Serialization.cs | 2 +- ...nalMessageImageUrlContent.Serialization.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 2 +- ...wnAssistantToolDefinition.Serialization.cs | 2 +- .../Assistants/MessageCollectionOrder.cs | 4 +- .../Assistants/MessageCreationAttachment.cs | 2 +- .../Assistants/MessageCreationOptions.cs | 4 +- .../Custom/Assistants/RunCollectionOrder.cs | 4 +- .../Custom/Assistants/RunIncompleteReason.cs | 4 +- .../Assistants/RunStepCollectionOrder.cs | 4 +- .../src/Custom/Assistants/RunStepToolCall.cs | 2 +- .dotnet/src/Custom/Assistants/ThreadRun.cs | 2 +- .../Audio/AudioTranscription.Serialization.cs | 4 +- .../Custom/Audio/AudioTranscriptionFormat.cs | 4 +- .../Audio/AudioTranslation.Serialization.cs | 4 +- .../Custom/Audio/AudioTranslationFormat.cs | 4 +- .../Custom/Audio/OpenAIAudioModelFactory.cs | 26 +- .dotnet/src/Custom/Batch/BatchClient.cs | 10 +- .../src/Custom/Embeddings/EmbeddingClient.cs | 12 +- .../src/Custom/Embeddings/OpenAIEmbedding.cs | 2 +- .../OpenAIEmbeddingsModelFactory.cs | 2 +- .../Files/Internal/InternalUploadsClient.cs | 9 +- .../Custom/Files/OpenAIFileClient.Protocol.cs | 4 +- .../FineTuning/FineTuningClient.Protocol.cs | 2 +- .../src/Custom/FineTuning/FineTuningClient.cs | 8 +- .../Internal/InternalFunctionDefinition.cs | 2 +- .../Internal/LegacyCompletionClient.cs | 12 +- .dotnet/src/Custom/OpenAIError.cs | 2 +- .dotnet/src/Generated/AssistantClient.cs | 2 + .dotnet/src/Generated/BatchClient.cs | 20 +- .dotnet/src/Generated/FineTuningClient.cs | 2 + ...ternalAssistantMessageClient.RestClient.cs | 2 +- .../InternalAssistantMessageClient.cs | 4 +- .../InternalAssistantRunClient.RestClient.cs | 2 +- .../Generated/InternalAssistantRunClient.cs | 2 +- ...nternalAssistantThreadClient.RestClient.cs | 2 +- .../InternalAssistantThreadClient.cs | 5 +- .../InternalUploadsClient.RestClient.cs | 2 +- .../src/Generated/InternalUploadsClient.cs | 4 +- .../LegacyCompletionClient.RestClient.cs | 2 +- .../src/Generated/LegacyCompletionClient.cs | 4 +- .../Models/Assistant.Serialization.cs | 24 + .dotnet/src/Generated/Models/Assistant.cs | 3 +- .../AssistantChatMessage.Serialization.cs | 29 + .../Generated/Models/AssistantChatMessage.cs | 3 +- .../AssistantCreationOptions.Serialization.cs | 11 + .../Models/AssistantCreationOptions.cs | 3 +- ...istantModificationOptions.Serialization.cs | 19 + .../Models/AssistantModificationOptions.cs | 3 +- .../Models/AssistantThread.Serialization.cs | 23 +- .../src/Generated/Models/AssistantThread.cs | 6 +- .../AudioTranscription.Serialization.cs | 30 +- .../Generated/Models/AudioTranscription.cs | 8 +- ...AudioTranscriptionOptions.Serialization.cs | 41 +- .../Models/AudioTranscriptionOptions.cs | 4 +- .../Models/AudioTranslation.Serialization.cs | 29 +- .../src/Generated/Models/AudioTranslation.cs | 8 +- .../AudioTranslationOptions.Serialization.cs | 24 +- .../Models/AudioTranslationOptions.cs | 4 +- .../ChatCompletionOptions.Serialization.cs | 106 ++-- .../Generated/Models/ChatCompletionOptions.cs | 4 +- .../Models/ChatFunction.Serialization.cs | 17 +- .../Models/ChatFunctionCall.Serialization.cs | 4 +- .../ChatMessageContent.Serialization.cs | 122 ++++ .../Generated/Models/ChatMessageContent.cs | 19 + ...atOutputTokenUsageDetails.Serialization.cs | 1 + .../Models/ChatTokenUsage.Serialization.cs | 1 + ...eInterpreterToolResources.Serialization.cs | 39 +- .../Models/CodeInterpreterToolResources.cs | 3 +- ...versationAudioDeltaUpdate.Serialization.cs | 177 ++++++ .../Models/ConversationAudioDeltaUpdate.cs | 40 ++ ...nversationAudioDoneUpdate.Serialization.cs | 177 ++++++ .../Models/ConversationAudioDoneUpdate.cs | 39 ++ .../Models/ConversationAudioFormat.cs | 46 ++ .../ConversationContentPart.Serialization.cs | 134 +++++ .../Models/ConversationContentPart.cs | 27 + ...ContentPartFinishedUpdate.Serialization.cs | 177 ++++++ .../ConversationContentPartFinishedUpdate.cs | 40 ++ .../Models/ConversationContentPartKind.cs | 49 ++ ...nContentPartStartedUpdate.Serialization.cs | 177 ++++++ .../ConversationContentPartStartedUpdate.cs | 40 ++ .../ConversationErrorUpdate.Serialization.cs | 137 +++++ .../Models/ConversationErrorUpdate.cs | 24 + ...nCallArgumentsDeltaUpdate.Serialization.cs | 177 ++++++ ...rsationFunctionCallArgumentsDeltaUpdate.cs | 40 ++ ...onCallArgumentsDoneUpdate.Serialization.cs | 186 ++++++ ...ersationFunctionCallArgumentsDoneUpdate.cs | 44 ++ .../ConversationFunctionTool.Serialization.cs | 161 ++++++ .../Models/ConversationFunctionTool.cs | 19 + ...tAudioBufferClearedUpdate.Serialization.cs | 129 +++++ ...nversationInputAudioBufferClearedUpdate.cs | 20 + ...udioBufferCommittedUpdate.Serialization.cs | 153 +++++ ...ersationInputAudioBufferCommittedUpdate.cs | 27 + ...InputSpeechFinishedUpdate.Serialization.cs | 145 +++++ .../ConversationInputSpeechFinishedUpdate.cs | 28 + ...nInputSpeechStartedUpdate.Serialization.cs | 145 +++++ .../ConversationInputSpeechStartedUpdate.cs | 28 + ...ionInputTokenUsageDetails.Serialization.cs | 150 +++++ .../ConversationInputTokenUsageDetails.cs | 35 ++ ...TranscriptionFailedUpdate.Serialization.cs | 159 ++++++ ...versationInputTranscriptionFailedUpdate.cs | 32 ++ ...anscriptionFinishedUpdate.Serialization.cs | 159 ++++++ ...rsationInputTranscriptionFinishedUpdate.cs | 32 ++ ...InputTranscriptionOptions.Serialization.cs | 138 +++++ .../ConversationInputTranscriptionOptions.cs | 26 + .../Models/ConversationItem.Serialization.cs | 137 +++++ .../src/Generated/Models/ConversationItem.cs | 30 + ...ionItemAcknowledgedUpdate.Serialization.cs | 137 +++++ .../ConversationItemAcknowledgedUpdate.cs | 22 + ...ersationItemDeletedUpdate.Serialization.cs | 137 +++++ .../Models/ConversationItemDeletedUpdate.cs | 24 + ...rsationItemFinishedUpdate.Serialization.cs | 159 ++++++ .../Models/ConversationItemFinishedUpdate.cs | 32 ++ ...ersationItemStartedUpdate.Serialization.cs | 159 ++++++ .../Models/ConversationItemStartedUpdate.cs | 32 ++ .../Models/ConversationItemStatus.cs | 46 ++ ...sationItemTruncatedUpdate.Serialization.cs | 159 ++++++ .../Models/ConversationItemTruncatedUpdate.cs | 32 ++ .../Models/ConversationMessageRole.cs | 46 ++ ...onOutputTokenUsageDetails.Serialization.cs | 142 +++++ .../ConversationOutputTokenUsageDetails.cs | 31 + ...tTranscriptionDeltaUpdate.Serialization.cs | 177 ++++++ ...versationOutputTranscriptionDeltaUpdate.cs | 40 ++ ...anscriptionFinishedUpdate.Serialization.cs | 168 ++++++ ...sationOutputTranscriptionFinishedUpdate.cs | 36 ++ ...ationRateLimitDetailsItem.Serialization.cs | 158 ++++++ .../ConversationRateLimitDetailsItem.cs | 39 ++ ...onRateLimitsUpdatedUpdate.Serialization.cs | 147 +++++ .../ConversationRateLimitsUpdatedUpdate.cs | 25 + ...ionResponseFinishedUpdate.Serialization.cs | 137 +++++ .../ConversationResponseFinishedUpdate.cs | 24 + ...tionResponseStartedUpdate.Serialization.cs | 137 +++++ .../ConversationResponseStartedUpdate.cs | 24 + ...onSessionConfiguredUpdate.Serialization.cs | 137 +++++ .../ConversationSessionConfiguredUpdate.cs | 24 + ...onversationSessionOptions.Serialization.cs | 345 ++++++++++++ .../Models/ConversationSessionOptions.cs | 52 ++ ...ationSessionStartedUpdate.Serialization.cs | 137 +++++ .../ConversationSessionStartedUpdate.cs | 24 + .../Generated/Models/ConversationStatus.cs | 52 ++ ...nversationTextDeltaUpdate.Serialization.cs | 177 ++++++ .../Models/ConversationTextDeltaUpdate.cs | 40 ++ ...onversationTextDoneUpdate.Serialization.cs | 177 ++++++ .../Models/ConversationTextDoneUpdate.cs | 40 ++ .../ConversationTokenUsage.Serialization.cs | 172 ++++++ .../Models/ConversationTokenUsage.cs | 43 ++ .../Models/ConversationTool.Serialization.cs | 128 +++++ .../src/Generated/Models/ConversationTool.cs | 25 + ...onversationToolChoiceKind.Serialization.cs | 36 ++ .../Generated/Models/ConversationToolKind.cs | 40 ++ .../Models/ConversationTranscriptionModel.cs | 40 ++ ...ersationTurnDetectionKind.Serialization.cs | 26 + ...ationTurnDetectionOptions.Serialization.cs | 111 ++++ .../ConversationTurnDetectionOptions.cs | 25 + .../ConversationUpdate.Serialization.cs | 189 +++++++ .../Generated/Models/ConversationUpdate.cs | 29 + .../ConversationUpdateKind.Serialization.cs | 156 ++++++ .../src/Generated/Models/ConversationVoice.cs | 46 ++ ...mbeddingGenerationOptions.Serialization.cs | 52 +- .../Models/EmbeddingGenerationOptions.cs | 5 +- .../FileSearchRankingOptions.Serialization.cs | 10 +- .../Models/FileSearchRankingOptions.cs | 6 - .../FileSearchToolResources.Serialization.cs | 7 +- ...eTuningJobHyperparameters.Serialization.cs | 51 +- .../Models/FineTuningJobHyperparameters.cs | 10 +- .../Models/GeneratedImage.Serialization.cs | 6 +- .../Models/ImageEditOptions.Serialization.cs | 94 +++- .../src/Generated/Models/ImageEditOptions.cs | 7 +- .../ImageGenerationOptions.Serialization.cs | 62 ++ .../Models/ImageGenerationOptions.cs | 5 +- .../ImageVariationOptions.Serialization.cs | 68 ++- .../Generated/Models/ImageVariationOptions.cs | 5 +- ...sageToolCallChunkFunction.Serialization.cs | 18 +- ...tCompletionMessageToolCallChunkFunction.cs | 3 +- ...onMessageToolCallFunction.Serialization.cs | 10 +- ...alChatCompletionMessageToolCallFunction.cs | 7 +- ...CompletionResponseMessage.Serialization.cs | 7 +- .../InternalChatCompletionResponseMessage.cs | 4 +- ...sponseMessageFunctionCall.Serialization.cs | 16 +- ...atCompletionResponseMessageFunctionCall.cs | 12 +- ...letionStreamResponseDelta.Serialization.cs | 7 +- ...ternalChatCompletionStreamResponseDelta.cs | 2 +- ...CreateThreadAndRunRequest.Serialization.cs | 96 ++++ .../InternalCreateThreadAndRunRequest.cs | 6 +- ...ateVectorStoreFileRequest.Serialization.cs | 1 + ...InternalFileUploadOptions.Serialization.cs | 26 +- .../Models/InternalFileUploadOptions.cs | 5 +- ...onRequestAssistantMessage.Serialization.cs | 38 +- ...neChatCompletionRequestAssistantMessage.cs | 5 +- ...nternalFunctionDefinition.Serialization.cs | 34 +- .../Models/InternalFunctionDefinition.cs | 7 +- ...entImageUrlObjectImageUrl.Serialization.cs | 5 + ...ntItemFileObjectImageFile.Serialization.cs | 5 + ...tImageFileObjectImageFile.Serialization.cs | 5 + ...entImageUrlObjectImageUrl.Serialization.cs | 5 + ...alMessageDeltaObjectDelta.Serialization.cs | 1 + ...questAssistantMessageItem.Serialization.cs | 170 ++++++ ...rnalRealtimeRequestAssistantMessageItem.cs | 26 + ...meRequestAudioContentPart.Serialization.cs | 130 +++++ ...InternalRealtimeRequestAudioContentPart.cs | 23 + ...nalRealtimeRequestCommand.Serialization.cs | 149 +++++ .../Models/InternalRealtimeRequestCommand.cs | 30 + .../InternalRealtimeRequestCommandType.cs | 64 +++ ...meRequestFunctionCallItem.Serialization.cs | 176 ++++++ ...InternalRealtimeRequestFunctionCallItem.cs | 40 ++ ...estFunctionCallOutputItem.Serialization.cs | 145 +++++ ...alRealtimeRequestFunctionCallOutputItem.cs | 32 ++ ...tAudioBufferAppendCommand.Serialization.cs | 137 +++++ ...imeRequestInputAudioBufferAppendCommand.cs | 27 + ...utAudioBufferClearCommand.Serialization.cs | 125 +++++ ...timeRequestInputAudioBufferClearCommand.cs | 20 + ...tAudioBufferCommitCommand.Serialization.cs | 125 +++++ ...imeRequestInputAudioBufferCommitCommand.cs | 20 + ...eRequestItemCreateCommand.Serialization.cs | 153 +++++ ...nternalRealtimeRequestItemCreateCommand.cs | 30 + ...eRequestItemDeleteCommand.Serialization.cs | 137 +++++ ...nternalRealtimeRequestItemDeleteCommand.cs | 27 + ...equestItemTruncateCommand.Serialization.cs | 159 ++++++ ...ernalRealtimeRequestItemTruncateCommand.cs | 35 ++ .../Models/InternalRealtimeRequestItemType.cs | 46 ++ ...ealtimeRequestMessageItem.Serialization.cs | 153 +++++ .../InternalRealtimeRequestMessageItem.cs | 27 + .../Models/InternalRealtimeRequestModel.cs | 40 ++ ...uestResponseCancelCommand.Serialization.cs | 125 +++++ ...nalRealtimeRequestResponseCancelCommand.cs | 20 + ...uestResponseCreateCommand.Serialization.cs | 141 +++++ ...nalRealtimeRequestResponseCreateCommand.cs | 23 + ...onseCreateCommandResponse.Serialization.cs | 372 ++++++++++++ ...imeRequestResponseCreateCommandResponse.cs | 66 +++ ...questSessionUpdateCommand.Serialization.cs | 137 +++++ ...rnalRealtimeRequestSessionUpdateCommand.cs | 27 + ...uestSessionUpdateCommandSessionModality.cs | 43 ++ ...eRequestSystemMessageItem.Serialization.cs | 170 ++++++ ...nternalRealtimeRequestSystemMessageItem.cs | 26 + ...imeRequestTextContentPart.Serialization.cs | 126 +++++ .../InternalRealtimeRequestTextContentPart.cs | 27 + ...imeRequestUserMessageItem.Serialization.cs | 170 ++++++ .../InternalRealtimeRequestUserMessageItem.cs | 17 + .../InternalRealtimeResponse.Serialization.cs | 203 +++++++ .../Models/InternalRealtimeResponse.cs | 45 ++ ...lRealtimeResponseApiError.Serialization.cs | 174 ++++++ .../InternalRealtimeResponseApiError.cs | 37 ++ ...eResponseAudioContentPart.Serialization.cs | 138 +++++ ...nternalRealtimeResponseAudioContentPart.cs | 24 + ...nseCancelledStatusDetails.Serialization.cs | 126 +++++ ...lRealtimeResponseCancelledStatusDetails.cs | 24 + ...imeResponseCancelledStatusDetailsReason.cs | 43 ++ ...rnalRealtimeResponseError.Serialization.cs | 196 +++++++ .../Models/InternalRealtimeResponseError.cs | 40 ++ ...eResponseFunctionCallItem.Serialization.cs | 175 ++++++ ...nternalRealtimeResponseFunctionCallItem.cs | 36 ++ ...nseFunctionCallOutputItem.Serialization.cs | 157 ++++++ ...lRealtimeResponseFunctionCallOutputItem.cs | 28 + ...seIncompleteStatusDetails.Serialization.cs | 126 +++++ ...RealtimeResponseIncompleteStatusDetails.cs | 24 + ...meResponseIncompleteStatusDetailsReason.cs | 43 ++ ...ernalRealtimeResponseItem.Serialization.cs | 143 +++++ .../Models/InternalRealtimeResponseItem.cs | 34 ++ .../InternalRealtimeResponseItemObject.cs | 40 ++ ...altimeResponseMessageItem.Serialization.cs | 176 ++++++ .../InternalRealtimeResponseMessageItem.cs | 31 + .../Models/InternalRealtimeResponseObject.cs | 40 ++ ...alRealtimeResponseSession.Serialization.cs | 299 ++++++++++ .../Models/InternalRealtimeResponseSession.cs | 77 +++ .../InternalRealtimeResponseSessionObject.cs | 40 ++ ...timeResponseStatusDetails.Serialization.cs | 132 +++++ .../InternalRealtimeResponseStatusDetails.cs | 27 + ...meResponseTextContentPart.Serialization.cs | 126 +++++ ...InternalRealtimeResponseTextContentPart.cs | 24 + ...imeServerVadTurnDetection.Serialization.cs | 162 ++++++ .../InternalRealtimeServerVadTurnDetection.cs | 29 + ...eToolChoiceFunctionObject.Serialization.cs | 126 +++++ ...nternalRealtimeToolChoiceFunctionObject.cs | 27 + ...iceFunctionObjectFunction.Serialization.cs | 134 +++++ ...ealtimeToolChoiceFunctionObjectFunction.cs | 30 + ...lRealtimeToolChoiceObject.Serialization.cs | 128 +++++ .../InternalRealtimeToolChoiceObject.cs | 27 + ...ormatJsonSchemaJsonSchema.Serialization.cs | 12 +- ...CallsCodeOutputLogsObject.Serialization.cs | 5 + ...ileSearchObjectFileSearch.Serialization.cs | 1 + ...MessageCreationAttachment.Serialization.cs | 14 +- .../MessageCreationOptions.Serialization.cs | 7 +- .../Models/ModerationOptions.Serialization.cs | 33 +- .../src/Generated/Models/ModerationOptions.cs | 4 +- .../Models/OpenAIEmbedding.Serialization.cs | 21 +- .../src/Generated/Models/OpenAIEmbedding.cs | 4 +- .../Models/OpenAIFile.Serialization.cs | 35 ++ .dotnet/src/Generated/Models/OpenAIFile.cs | 9 +- .../OpenAIFileCollection.Serialization.cs | 2 + .../Generated/Models/OpenAIFileCollection.cs | 8 +- .../Models/OpenAIModel.Serialization.cs | 10 +- .dotnet/src/Generated/Models/OpenAIModel.cs | 6 +- .../OpenAIModelCollection.Serialization.cs | 2 + .../Generated/Models/OpenAIModelCollection.cs | 8 +- ...sponseFailedStatusDetails.Serialization.cs | 133 +++++ .../RealtimeResponseFailedStatusDetails.cs | 24 + .../RunCreationOptions.Serialization.cs | 113 +++- .../Generated/Models/RunCreationOptions.cs | 5 +- ...amingChatCompletionUpdate.Serialization.cs | 1 + ...ingChatFunctionCallUpdate.Serialization.cs | 10 +- ...reamingChatToolCallUpdate.Serialization.cs | 7 + .../Models/SystemChatMessage.Serialization.cs | 5 + .../ThreadCreationOptions.Serialization.cs | 1 + .../Models/ThreadMessage.Serialization.cs | 26 + .dotnet/src/Generated/Models/ThreadMessage.cs | 6 +- ...ThreadModificationOptions.Serialization.cs | 1 + .../Models/ToolResources.Serialization.cs | 34 +- .dotnet/src/Generated/Models/ToolResources.cs | 4 +- ...nknownRealtimeContentPart.Serialization.cs | 105 ++++ .../Models/UnknownRealtimeContentPart.cs | 16 + ...ownRealtimeRequestCommand.Serialization.cs | 116 ++++ .../Models/UnknownRealtimeRequestCommand.cs | 16 + ...nknownRealtimeRequestItem.Serialization.cs | 116 ++++ .../Models/UnknownRealtimeRequestItem.cs | 16 + ...ealtimeRequestMessageItem.Serialization.cs | 134 +++++ .../UnknownRealtimeRequestMessageItem.cs | 17 + ...wnRealtimeResponseCommand.Serialization.cs | 116 ++++ .../Models/UnknownRealtimeResponseCommand.cs | 16 + ...knownRealtimeResponseItem.Serialization.cs | 122 ++++ .../Models/UnknownRealtimeResponseItem.cs | 16 + ...timeResponseStatusDetails.Serialization.cs | 105 ++++ .../UnknownRealtimeResponseStatusDetails.cs | 16 + .../UnknownRealtimeTool.Serialization.cs | 105 ++++ .../Generated/Models/UnknownRealtimeTool.cs | 16 + ...nRealtimeToolChoiceObject.Serialization.cs | 105 ++++ .../Models/UnknownRealtimeToolChoiceObject.cs | 16 + ...nownRealtimeTurnDetection.Serialization.cs | 105 ++++ .../Models/UnknownRealtimeTurnDetection.cs | 16 + .../Models/UserChatMessage.Serialization.cs | 5 + .../Models/VectorStore.Serialization.cs | 1 + .../VectorStoreBatchFileJob.Serialization.cs | 9 + .../Models/VectorStoreBatchFileJob.cs | 6 +- ...VectorStoreCreationHelper.Serialization.cs | 1 + ...ectorStoreCreationOptions.Serialization.cs | 2 + ...VectorStoreDeletionResult.Serialization.cs | 10 +- .../Models/VectorStoreDeletionResult.cs | 6 +- ...ctorStoreExpirationPolicy.Serialization.cs | 18 +- .../Models/VectorStoreExpirationPolicy.cs | 5 - ...ectorStoreFileAssociation.Serialization.cs | 1 + ...rStoreModificationOptions.Serialization.cs | 1 + .dotnet/src/Generated/OpenAIClient.cs | 7 + .dotnet/src/Generated/OpenAIModelFactory.cs | 528 ++++++++++++++++-- .../RealtimeConversationClient.RestClient.cs | 48 ++ .../Generated/RealtimeConversationClient.cs | 65 +++ 354 files changed, 18964 insertions(+), 427 deletions(-) create mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.cs create mode 100644 .dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationAudioFormat.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPart.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPartKind.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationErrorUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationFunctionTool.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItem.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemStatus.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationMessageRole.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs create mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionOptions.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationStatus.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTokenUsage.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTool.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTool.cs create mode 100644 .dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationToolKind.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTranscriptionModel.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs create mode 100644 .dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationUpdate.cs create mode 100644 .dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/ConversationVoice.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponse.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseError.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs create mode 100644 .dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTool.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs create mode 100644 .dotnet/src/Generated/RealtimeConversationClient.RestClient.cs create mode 100644 .dotnet/src/Generated/RealtimeConversationClient.cs diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs b/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs index 8b0074b48..bec9a89d8 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs @@ -22,7 +22,7 @@ public virtual async Task CreateAssistantAsync(BinaryContent conte Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateAssistantRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -39,7 +39,7 @@ public virtual ClientResult CreateAssistant(BinaryContent content, RequestOption Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateAssistantRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -69,7 +69,7 @@ public virtual ClientResult CreateAssistant(BinaryContent content, RequestOption [EditorBrowsable(EditorBrowsableState.Never)] public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options) { - return new AsyncAssistantCollectionResult(this, _pipeline, options, limit, order, after, before); + return new AsyncAssistantCollectionResult(this, Pipeline, options, limit, order, after, before); } /// @@ -99,7 +99,7 @@ public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order [EditorBrowsable(EditorBrowsableState.Never)] public virtual CollectionResult GetAssistants(int? limit, string order, string after, string before, RequestOptions options) { - return new AssistantCollectionResult(this, _pipeline, options, limit, order, after, before); + return new AssistantCollectionResult(this, Pipeline, options, limit, order, after, before); } /// @@ -117,7 +117,7 @@ public virtual async Task GetAssistantAsync(string assistantId, Re Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); using PipelineMessage message = CreateGetAssistantRequest(assistantId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -135,7 +135,7 @@ public virtual ClientResult GetAssistant(string assistantId, RequestOptions opti Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); using PipelineMessage message = CreateGetAssistantRequest(assistantId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -155,7 +155,7 @@ public virtual async Task ModifyAssistantAsync(string assistantId, Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyAssistantRequest(assistantId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -175,7 +175,7 @@ public virtual ClientResult ModifyAssistant(string assistantId, BinaryContent co Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyAssistantRequest(assistantId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -193,7 +193,7 @@ public virtual async Task DeleteAssistantAsync(string assistantId, Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); using PipelineMessage message = CreateDeleteAssistantRequest(assistantId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -211,7 +211,7 @@ public virtual ClientResult DeleteAssistant(string assistantId, RequestOptions o Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); using PipelineMessage message = CreateDeleteAssistantRequest(assistantId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index d1662dee0..569a690d5 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -30,12 +30,6 @@ public partial class AssistantClient private readonly InternalAssistantRunClient _runSubClient; private readonly InternalAssistantThreadClient _threadSubClient; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -77,9 +71,9 @@ public AssistantClient(ApiKeyCredential credential, OpenAIClientOptions options) Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); - _messageSubClient = new(_pipeline, options); - _runSubClient = new(_pipeline, options); - _threadSubClient = new(_pipeline, options); + _messageSubClient = new(Pipeline, options); + _runSubClient = new(Pipeline, options); + _threadSubClient = new(Pipeline, options); } // CUSTOM: @@ -95,11 +89,11 @@ protected internal AssistantClient(ClientPipeline pipeline, OpenAIClientOptions Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); - _messageSubClient = new(_pipeline, options); - _runSubClient = new(_pipeline, options); - _threadSubClient = new(_pipeline, options); + _messageSubClient = new(Pipeline, options); + _runSubClient = new(Pipeline, options); + _threadSubClient = new(Pipeline, options); } /// Creates a new assistant. @@ -113,7 +107,7 @@ public virtual async Task> CreateAssistantAsync(string m options ??= new(); options.Model = model; - ClientResult protocolResult = await CreateAssistantAsync(options?.ToBinaryContent(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult protocolResult = await CreateAssistantAsync(options, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); } @@ -128,7 +122,7 @@ public virtual ClientResult CreateAssistant(string model, AssistantCr options ??= new(); options.Model = model; - ClientResult protocolResult = CreateAssistant(options?.ToBinaryContent(), cancellationToken.ToRequestOptions()); + ClientResult protocolResult = CreateAssistant(options, cancellationToken.ToRequestOptions()); return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); } @@ -258,7 +252,7 @@ public virtual async Task> ModifyAssistantAsync(string a Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); Argument.AssertNotNull(options, nameof(options)); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult protocolResult = await ModifyAssistantAsync(assistantId, content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); diff --git a/.dotnet/src/Custom/Assistants/AssistantCollectionOrder.cs b/.dotnet/src/Custom/Assistants/AssistantCollectionOrder.cs index 4a25b8885..275d5d98d 100644 --- a/.dotnet/src/Custom/Assistants/AssistantCollectionOrder.cs +++ b/.dotnet/src/Custom/Assistants/AssistantCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct AssistantCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static AssistantCollectionOrder Ascending { get; } = new AssistantCollectionOrder(AscendingValue); + public static AssistantCollectionOrder Ascending { get; } = new AssistantCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static AssistantCollectionOrder Descending { get; } = new AssistantCollectionOrder(DescendingValue); + public static AssistantCollectionOrder Descending { get; } = new AssistantCollectionOrder(DescValue); } diff --git a/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs b/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs index 597bbb6b4..68b9b33dc 100644 --- a/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs +++ b/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs @@ -32,8 +32,8 @@ public static AssistantResponseFormat CreateJsonSchemaFormat( InternalResponseFormatJsonSchemaJsonSchema internalSchema = new( description, name, - jsonSchema, strictSchemaEnabled, + jsonSchema, null); return new InternalAssistantResponseFormatJsonSchema(internalSchema); } diff --git a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs index 208ac9240..c388480eb 100644 --- a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs @@ -17,7 +17,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/FileSearchRankingOptions.cs b/.dotnet/src/Custom/Assistants/FileSearchRankingOptions.cs index 9afa871a0..e7e43eb62 100644 --- a/.dotnet/src/Custom/Assistants/FileSearchRankingOptions.cs +++ b/.dotnet/src/Custom/Assistants/FileSearchRankingOptions.cs @@ -33,6 +33,6 @@ internal FileSearchRankingOptions(FileSearchRanker? ranker, float scoreThreshold { Ranker = ranker; ScoreThreshold = scoreThreshold; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; } } diff --git a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs index ffcc62ab8..8111cc399 100644 --- a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs @@ -22,7 +22,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(_fileSearch, options); } - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.Protocol.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.Protocol.cs index fb54903bc..a83381225 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.Protocol.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.Protocol.cs @@ -23,7 +23,7 @@ public virtual async Task CreateMessageAsync(string threadId, Bina Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateMessageRequest(threadId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -42,7 +42,7 @@ public virtual ClientResult CreateMessage(string threadId, BinaryContent content Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateMessageRequest(threadId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -61,7 +61,7 @@ public virtual async Task GetMessageAsync(string threadId, string Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); using PipelineMessage message = CreateGetMessageRequest(threadId, messageId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -80,7 +80,7 @@ public virtual ClientResult GetMessage(string threadId, string messageId, Reques Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); using PipelineMessage message = CreateGetMessageRequest(threadId, messageId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -101,7 +101,7 @@ public virtual async Task ModifyMessageAsync(string threadId, stri Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyMessageRequest(threadId, messageId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -122,7 +122,7 @@ public virtual ClientResult ModifyMessage(string threadId, string messageId, Bin Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyMessageRequest(threadId, messageId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -141,7 +141,7 @@ public virtual async Task DeleteMessageAsync(string threadId, stri Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); using PipelineMessage message = CreateDeleteMessageRequest(threadId, messageId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -160,6 +160,6 @@ public virtual ClientResult DeleteMessage(string threadId, string messageId, Req Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); using PipelineMessage message = CreateDeleteMessageRequest(threadId, messageId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 1ad9a9c9d..5d66124cf 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -18,12 +18,6 @@ namespace OpenAI.Assistants; [CodeGenSuppress("DeleteMessage", typeof(string), typeof(string))] internal partial class InternalAssistantMessageClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. @@ -46,7 +40,7 @@ public InternalAssistantMessageClient(ApiKeyCredential credential, OpenAIClientO Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -63,7 +57,7 @@ protected internal InternalAssistantMessageClient(ClientPipeline pipeline, OpenA Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index 43b1e2975..cf21b52f0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -16,12 +16,6 @@ namespace OpenAI.Assistants; [CodeGenSuppress("DeleteThread", typeof(string))] internal partial class InternalAssistantThreadClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs index 1cd98176f..748340361 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs @@ -19,7 +19,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(_type); writer.WritePropertyName("image_file"u8); writer.WriteObjectValue(_imageFile, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs index 2a4eb69cc..44055a32f 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs @@ -19,7 +19,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(_type); writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(_imageUrl, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs index 931aed080..16c7e9356 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs @@ -19,7 +19,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("text"u8); writer.WriteStringValue(InternalText); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs index 26f4e5baa..22c7d878a 100644 --- a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs @@ -17,7 +17,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/MessageCollectionOrder.cs b/.dotnet/src/Custom/Assistants/MessageCollectionOrder.cs index aa8d4444c..47d03e935 100644 --- a/.dotnet/src/Custom/Assistants/MessageCollectionOrder.cs +++ b/.dotnet/src/Custom/Assistants/MessageCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct MessageCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static MessageCollectionOrder Ascending { get; } = new MessageCollectionOrder(AscendingValue); + public static MessageCollectionOrder Ascending { get; } = new MessageCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static MessageCollectionOrder Descending { get; } = new MessageCollectionOrder(DescendingValue); + public static MessageCollectionOrder Descending { get; } = new MessageCollectionOrder(DescValue); } diff --git a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs index d3409532f..602a51675 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs @@ -39,7 +39,7 @@ private static void DeserializeTools(JsonProperty property, ref IReadOnlyList deserializedTools = []; foreach (JsonElement toolElement in property.Value.EnumerateArray()) { - deserializedTools.Add(ToolDefinition.DeserializeToolDefinition(toolElement)); + deserializedTools.Add(ToolDefinition.DeserializeToolDefinition(toolElement, null)); } tools = deserializedTools; } diff --git a/.dotnet/src/Custom/Assistants/MessageCreationOptions.cs b/.dotnet/src/Custom/Assistants/MessageCreationOptions.cs index fc256245a..676ac91fc 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationOptions.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationOptions.cs @@ -29,10 +29,10 @@ public partial class MessageCreationOptions /// public MessageCreationOptions() : this( - MessageRole.User, - new ChangeTrackingList(), new ChangeTrackingList(), new ChangeTrackingDictionary(), + MessageRole.User, + new ChangeTrackingList(), new ChangeTrackingDictionary()) { } diff --git a/.dotnet/src/Custom/Assistants/RunCollectionOrder.cs b/.dotnet/src/Custom/Assistants/RunCollectionOrder.cs index db99d10b9..0b2f91749 100644 --- a/.dotnet/src/Custom/Assistants/RunCollectionOrder.cs +++ b/.dotnet/src/Custom/Assistants/RunCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct RunCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static RunCollectionOrder Ascending { get; } = new RunCollectionOrder(AscendingValue); + public static RunCollectionOrder Ascending { get; } = new RunCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static RunCollectionOrder Descending { get; } = new RunCollectionOrder(DescendingValue); + public static RunCollectionOrder Descending { get; } = new RunCollectionOrder(DescValue); } diff --git a/.dotnet/src/Custom/Assistants/RunIncompleteReason.cs b/.dotnet/src/Custom/Assistants/RunIncompleteReason.cs index 5b17c95d0..692300ebf 100644 --- a/.dotnet/src/Custom/Assistants/RunIncompleteReason.cs +++ b/.dotnet/src/Custom/Assistants/RunIncompleteReason.cs @@ -11,10 +11,10 @@ public readonly partial struct RunIncompleteReason { // CUSTOM: Renamed. [CodeGenMember("MaxCompletionTokens")] - public static RunIncompleteReason MaxOutputTokenCount { get; } = new RunIncompleteReason(MaxOutputTokenCountValue); + public static RunIncompleteReason MaxOutputTokenCount { get; } = new RunIncompleteReason(MaxCompletionTokensValue); // CUSTOM: Renamed. [CodeGenMember("MaxPromptTokens")] - public static RunIncompleteReason MaxInputTokenCount { get; } = new RunIncompleteReason(MaxInputTokenCountValue); + public static RunIncompleteReason MaxInputTokenCount { get; } = new RunIncompleteReason(MaxPromptTokensValue); } } diff --git a/.dotnet/src/Custom/Assistants/RunStepCollectionOrder.cs b/.dotnet/src/Custom/Assistants/RunStepCollectionOrder.cs index e7011053d..5cc86bd75 100644 --- a/.dotnet/src/Custom/Assistants/RunStepCollectionOrder.cs +++ b/.dotnet/src/Custom/Assistants/RunStepCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct RunStepCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static RunStepCollectionOrder Ascending { get; } = new RunStepCollectionOrder(AscendingValue); + public static RunStepCollectionOrder Ascending { get; } = new RunStepCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static RunStepCollectionOrder Descending { get; } = new RunStepCollectionOrder(DescendingValue); + public static RunStepCollectionOrder Descending { get; } = new RunStepCollectionOrder(DescValue); } diff --git a/.dotnet/src/Custom/Assistants/RunStepToolCall.cs b/.dotnet/src/Custom/Assistants/RunStepToolCall.cs index 5181a392b..9c6dbed9a 100644 --- a/.dotnet/src/Custom/Assistants/RunStepToolCall.cs +++ b/.dotnet/src/Custom/Assistants/RunStepToolCall.cs @@ -12,7 +12,7 @@ public string ToolCallId => AsCodeInterpreter?.Id ?? AsFunction?.Id ?? AsFileSearch?.Id - ?? (SerializedAdditionalRawData?.TryGetValue("id", out BinaryData idData) == true + ?? (_additionalBinaryDataProperties?.TryGetValue("id", out BinaryData idData) == true ? idData.ToString() : null); diff --git a/.dotnet/src/Custom/Assistants/ThreadRun.cs b/.dotnet/src/Custom/Assistants/ThreadRun.cs index 0d8a04fed..bdd8bc195 100644 --- a/.dotnet/src/Custom/Assistants/ThreadRun.cs +++ b/.dotnet/src/Custom/Assistants/ThreadRun.cs @@ -23,7 +23,7 @@ public partial class ThreadRun internal readonly InternalRunRequiredAction _internalRequiredAction; // CUSTOM: Removed null check for `toolConstraint` and `responseFormat`. - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IReadOnlyDictionary metadata, RunTokenUsage usage, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(threadId, nameof(threadId)); diff --git a/.dotnet/src/Custom/Audio/AudioTranscription.Serialization.cs b/.dotnet/src/Custom/Audio/AudioTranscription.Serialization.cs index 0e73332c6..28b1538eb 100644 --- a/.dotnet/src/Custom/Audio/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Custom/Audio/AudioTranscription.Serialization.cs @@ -20,10 +20,10 @@ internal static AudioTranscription FromResponse(PipelineResponse response) text: response.Content?.ToString(), words: new ChangeTrackingList(), segments: new ChangeTrackingList(), - serializedAdditionalRawData: new Dictionary()); + additionalBinaryDataProperties: new Dictionary()); } using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranscription(document.RootElement); + return DeserializeAudioTranscription(document.RootElement, null); } } diff --git a/.dotnet/src/Custom/Audio/AudioTranscriptionFormat.cs b/.dotnet/src/Custom/Audio/AudioTranscriptionFormat.cs index 4f38552ca..3de01217f 100644 --- a/.dotnet/src/Custom/Audio/AudioTranscriptionFormat.cs +++ b/.dotnet/src/Custom/Audio/AudioTranscriptionFormat.cs @@ -20,14 +20,14 @@ public readonly partial struct AudioTranscriptionFormat // - Added custom doc comments. /// Plain text only. [CodeGenMember("Json")] - public static AudioTranscriptionFormat Simple { get; } = new AudioTranscriptionFormat(SimpleValue); + public static AudioTranscriptionFormat Simple { get; } = new AudioTranscriptionFormat(JsonValue); // CUSTOM: // - Renamed. // - Added custom doc comments. /// Plain text provided with additional metadata, such as duration and timestamps. [CodeGenMember("VerboseJson")] - public static AudioTranscriptionFormat Verbose { get; } = new AudioTranscriptionFormat(VerboseValue); + public static AudioTranscriptionFormat Verbose { get; } = new AudioTranscriptionFormat(VerboseJsonValue); // CUSTOM: Added custom doc comments. /// Text formatted as SubRip (.srt) file. diff --git a/.dotnet/src/Custom/Audio/AudioTranslation.Serialization.cs b/.dotnet/src/Custom/Audio/AudioTranslation.Serialization.cs index a2ac14d57..3eeed49f1 100644 --- a/.dotnet/src/Custom/Audio/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Custom/Audio/AudioTranslation.Serialization.cs @@ -19,10 +19,10 @@ internal static AudioTranslation FromResponse(PipelineResponse response) duration: null, text: response.Content?.ToString(), segments: new ChangeTrackingList(), - serializedAdditionalRawData: new Dictionary()); + additionalBinaryDataProperties: new Dictionary()); } using var document = JsonDocument.Parse(response.Content); - return DeserializeAudioTranslation(document.RootElement); + return DeserializeAudioTranslation(document.RootElement, null); } } diff --git a/.dotnet/src/Custom/Audio/AudioTranslationFormat.cs b/.dotnet/src/Custom/Audio/AudioTranslationFormat.cs index b31457f56..24bf9fb47 100644 --- a/.dotnet/src/Custom/Audio/AudioTranslationFormat.cs +++ b/.dotnet/src/Custom/Audio/AudioTranslationFormat.cs @@ -20,14 +20,14 @@ public readonly partial struct AudioTranslationFormat // - Added custom doc comments. /// Plain text only. [CodeGenMember("Json")] - public static AudioTranslationFormat Simple { get; } = new AudioTranslationFormat(SimpleValue); + public static AudioTranslationFormat Simple { get; } = new AudioTranslationFormat(JsonValue); // CUSTOM: // - Renamed. // - Added custom doc comments. /// Plain text provided with additional metadata, such as duration and timestamps. [CodeGenMember("VerboseJson")] - public static AudioTranslationFormat Verbose { get; } = new AudioTranslationFormat(VerboseValue); + public static AudioTranslationFormat Verbose { get; } = new AudioTranslationFormat(VerboseJsonValue); // CUSTOM: Added custom doc comments. /// Text formatted as SubRip (.srt) file. diff --git a/.dotnet/src/Custom/Audio/OpenAIAudioModelFactory.cs b/.dotnet/src/Custom/Audio/OpenAIAudioModelFactory.cs index f854dc3a3..79fb03a86 100644 --- a/.dotnet/src/Custom/Audio/OpenAIAudioModelFactory.cs +++ b/.dotnet/src/Custom/Audio/OpenAIAudioModelFactory.cs @@ -15,13 +15,13 @@ public static AudioTranscription AudioTranscription(string language = null, Time segments ??= new List(); return new AudioTranscription( - InternalCreateTranscriptionResponseVerboseJsonTask.Transcribe, language, - duration, text, words.ToList(), segments.ToList(), - serializedAdditionalRawData: null); + InternalCreateTranscriptionResponseVerboseJsonTask.Transcribe, + duration, + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -31,12 +31,12 @@ public static AudioTranslation AudioTranslation(string language = null, TimeSpan segments ??= new List(); return new AudioTranslation( - InternalCreateTranslationResponseVerboseJsonTask.Translate, language, - duration, text, - segments.ToList(), - serializedAdditionalRawData: null); + segments: segments.ToList(), + task: InternalCreateTranslationResponseVerboseJsonTask.Translate, + duration, + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -45,16 +45,16 @@ public static TranscribedSegment TranscribedSegment(int id = default, int seekOf { return new TranscribedSegment( id, - seekOffset, + text, + temperature, + compressionRatio, startTime, endTime, - text, + seekOffset, tokenIds, - temperature, averageLogProbability, - compressionRatio, noSpeechProbability, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -65,6 +65,6 @@ public static TranscribedWord TranscribedWord(string word = null, TimeSpan start word, startTime, endTime, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } } diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index 10bdd99d4..ecb6354e4 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -14,8 +14,8 @@ namespace OpenAI.Batch; [Experimental("OPENAI001")] [CodeGenClient("Batches")] [CodeGenSuppress("BatchClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IReadOnlyDictionary))] -[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IReadOnlyDictionary))] +[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] +[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] [CodeGenSuppress("CreateBatch", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateBatchAsync", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("RetrieveBatch", typeof(string))] @@ -28,12 +28,6 @@ namespace OpenAI.Batch; [CodeGenSuppress("GetBatchesAsync", typeof(string), typeof(int?))] public partial class BatchClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs index 79c70106b..c24e5d903 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs @@ -118,7 +118,7 @@ public virtual async Task> GenerateEmbeddingAsync( options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(input), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); } @@ -137,7 +137,7 @@ public virtual ClientResult GenerateEmbedding(string input, Emb options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(input), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); } @@ -156,7 +156,7 @@ public virtual async Task> GenerateEmbed options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); @@ -176,7 +176,7 @@ public virtual ClientResult GenerateEmbeddings(IEnume options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); } @@ -195,7 +195,7 @@ public virtual async Task> GenerateEmbed options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options); ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); } @@ -214,7 +214,7 @@ public virtual ClientResult GenerateEmbeddings(IEnume options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); } diff --git a/.dotnet/src/Custom/Embeddings/OpenAIEmbedding.cs b/.dotnet/src/Custom/Embeddings/OpenAIEmbedding.cs index 949a48f50..e27164e63 100644 --- a/.dotnet/src/Custom/Embeddings/OpenAIEmbedding.cs +++ b/.dotnet/src/Custom/Embeddings/OpenAIEmbedding.cs @@ -78,7 +78,7 @@ internal OpenAIEmbedding(int index, BinaryData embeddingProperty, InternalEmbedd Index = index; EmbeddingProperty = embeddingProperty; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; // Handle additional custom properties. _vector = ConvertToVectorOfFloats(embeddingProperty); diff --git a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingsModelFactory.cs b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingsModelFactory.cs index c4fd91322..1901ccfc5 100644 --- a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingsModelFactory.cs +++ b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingsModelFactory.cs @@ -38,6 +38,6 @@ public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = defa return new EmbeddingTokenUsage( inputTokenCount, totalTokenCount, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } } diff --git a/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs b/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs index 8e36408d5..cc828239e 100644 --- a/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs +++ b/.dotnet/src/Custom/Files/Internal/InternalUploadsClient.cs @@ -8,11 +8,6 @@ namespace OpenAI.Files; [CodeGenSuppress("InternalUploadsClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] internal partial class InternalUploadsClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; // CUSTOM: // - Used a custom pipeline. @@ -36,7 +31,7 @@ internal InternalUploadsClient(ApiKeyCredential credential, OpenAIClientOptions Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -53,7 +48,7 @@ protected internal InternalUploadsClient(ClientPipeline pipeline, OpenAIClientOp Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } } diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs index cb710d5f9..6efcb5806 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs @@ -85,7 +85,7 @@ public virtual ClientResult UploadFile(BinaryContent content, string contentType [EditorBrowsable(EditorBrowsableState.Never)] public virtual async Task GetFilesAsync(string purpose, RequestOptions options) { - using PipelineMessage message = CreateGetFilesRequest(purpose, options); + using PipelineMessage message = CreateListFilesRequest(purpose, options); return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -99,7 +99,7 @@ public virtual async Task GetFilesAsync(string purpose, RequestOpt [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult GetFiles(string purpose, RequestOptions options) { - using PipelineMessage message = CreateGetFilesRequest(purpose, options); + using PipelineMessage message = CreateListFilesRequest(purpose, options); return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); } diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs index fe8f8a6bd..110d8fd17 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs @@ -49,7 +49,7 @@ public virtual async Task CreateFineTuningJobAsync( Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateFineTuningJobRequest(content, options); - PipelineResponse response = await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + PipelineResponse response = await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); using JsonDocument doc = JsonDocument.Parse(response.Content); string jobId = doc.RootElement.GetProperty("id"u8).GetString(); diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index d15a8b7b4..d937bdc7e 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -27,12 +27,6 @@ namespace OpenAI.FineTuning; [CodeGenSuppress("GetFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?))] public partial class FineTuningClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -71,7 +65,7 @@ public FineTuningClient(ApiKeyCredential credential, OpenAIClientOptions options Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } diff --git a/.dotnet/src/Custom/Internal/InternalFunctionDefinition.cs b/.dotnet/src/Custom/Internal/InternalFunctionDefinition.cs index 0909a1c32..7c4dafb6c 100644 --- a/.dotnet/src/Custom/Internal/InternalFunctionDefinition.cs +++ b/.dotnet/src/Custom/Internal/InternalFunctionDefinition.cs @@ -9,5 +9,5 @@ internal partial class InternalFunctionDefinition /// The parameters to the function, formatting as a JSON Schema object. /// [CodeGenMember("Parameters")] - internal BinaryData Parameters; + internal BinaryData Parameters { get; set; } } diff --git a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs index 31588a590..168dc2f5c 100644 --- a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs +++ b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs @@ -14,13 +14,7 @@ namespace OpenAI.LegacyCompletions; internal partial class LegacyCompletionClient { private readonly string _model; - - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - + // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . @@ -72,7 +66,7 @@ public LegacyCompletionClient(string model, ApiKeyCredential credential, OpenAIC options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -94,7 +88,7 @@ protected internal LegacyCompletionClient(ClientPipeline pipeline, string model, options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } } diff --git a/.dotnet/src/Custom/OpenAIError.cs b/.dotnet/src/Custom/OpenAIError.cs index ce82f6d7c..3199b5290 100644 --- a/.dotnet/src/Custom/OpenAIError.cs +++ b/.dotnet/src/Custom/OpenAIError.cs @@ -19,7 +19,7 @@ internal static OpenAIError TryCreateFromResponse(PipelineResponse response) { using JsonDocument errorDocument = JsonDocument.Parse(response.Content); OpenAIErrorResponse errorResponse - = OpenAIErrorResponse.DeserializeOpenAIErrorResponse(errorDocument.RootElement); + = OpenAIErrorResponse.DeserializeOpenAIErrorResponse(errorDocument.RootElement, null); return errorResponse.Error; } catch (InvalidOperationException) diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index 25e74633f..a967b2221 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -20,6 +20,8 @@ protected AssistantClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListAssistants(int? limit, string order, string after, string before, RequestOptions options) { using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index cb2c8c817..a491c4a50 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -5,9 +5,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Threading.Tasks; -using OpenAI; namespace OpenAI.Batch { @@ -22,23 +20,7 @@ protected BatchClient() { } - public virtual ClientResult CreateBatch(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IDictionary metadata = default) - { - Argument.AssertNotNull(inputFileId, nameof(inputFileId)); - - InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); - ClientResult result = this.CreateBatch(spreadModel, null); - return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); - } - - public virtual async Task> CreateBatchAsync(string inputFileId, InternalCreateBatchRequestEndpoint endpoint, InternalBatchCompletionTimeframe completionWindow, IDictionary metadata = default) - { - Argument.AssertNotNull(inputFileId, nameof(inputFileId)); - - InternalCreateBatchRequest spreadModel = new InternalCreateBatchRequest(null, endpoint, null, metadata, null); - ClientResult result = await this.CreateBatchAsync(spreadModel, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalBatchJob)result, result.GetRawResponse()); - } + public ClientPipeline Pipeline { get; } public virtual ClientResult ListBatches(string after, int? limit, RequestOptions options) { diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index be0834b8a..fcc634a7b 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -21,6 +21,8 @@ protected FineTuningClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit, RequestOptions options) { using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs index 4d386f450..765c31d74 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { - public partial class InternalAssistantMessageClient + internal partial class InternalAssistantMessageClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index f980bd94e..81c98c877 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { - public partial class InternalAssistantMessageClient + internal partial class InternalAssistantMessageClient { private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; @@ -21,6 +21,8 @@ protected InternalAssistantMessageClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNull(threadId, nameof(threadId)); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs index 2f8db1bd7..a3dfd878f 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { - public partial class InternalAssistantRunClient + internal partial class InternalAssistantRunClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index 435f28095..dba3d32f0 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { - public partial class InternalAssistantRunClient + internal partial class InternalAssistantRunClient { private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs index 47f08cf50..43cfe1c33 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { - public partial class InternalAssistantThreadClient + internal partial class InternalAssistantThreadClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.cs index 17d57ccdf..6981b71d5 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.cs @@ -4,10 +4,11 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; namespace OpenAI.Assistants { - public partial class InternalAssistantThreadClient + internal partial class InternalAssistantThreadClient { private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; @@ -17,5 +18,7 @@ public partial class InternalAssistantThreadClient protected InternalAssistantThreadClient() { } + + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs index e612aff22..cb7b48b2d 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { - public partial class InternalUploadsClient + internal partial class InternalUploadsClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index 65cc1fb33..0c90b7dd3 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { - public partial class InternalUploadsClient + internal partial class InternalUploadsClient { private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; @@ -21,6 +21,8 @@ protected InternalUploadsClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); diff --git a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs index fc9c63ca9..9362b6a1a 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.LegacyCompletions { - public partial class LegacyCompletionClient + internal partial class LegacyCompletionClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index 14652e6e9..63c351a28 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -10,7 +10,7 @@ namespace OpenAI.LegacyCompletions { - public partial class LegacyCompletionClient + internal partial class LegacyCompletionClient { private readonly Uri _endpoint; private const string AuthorizationHeader = "Authorization"; @@ -21,6 +21,8 @@ protected LegacyCompletionClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index 35d6d095f..c530eed1a 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -117,6 +117,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteObjectValue(Object, options); + if (Optional.IsDefined(ResponseFormat)) + { + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } + } if (Optional.IsDefined(NucleusSamplingFactor)) { if (NucleusSamplingFactor != null) @@ -176,6 +188,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW IDictionary metadata = default; float? temperature = default; InternalAssistantObjectObject @object = default; + AssistantResponseFormat responseFormat = default; float? nucleusSamplingFactor = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -282,6 +295,16 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW @object = InternalAssistantObjectObject.DeserializeInternalAssistantObjectObject(prop.Value, options); continue; } + if (prop.NameEquals("response_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + responseFormat = null; + continue; + } + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -309,6 +332,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW metadata, temperature, @object, + responseFormat, nucleusSamplingFactor, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 5ab6b958e..09670a90f 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -25,7 +25,7 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Object = @object; } - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -38,6 +38,7 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Metadata = metadata; Temperature = temperature; Object = @object; + ResponseFormat = responseFormat; NucleusSamplingFactor = nucleusSamplingFactor; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 957e79a40..de441409d 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -67,6 +67,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(FunctionCall)) + { + if (FunctionCall != null) + { + writer.WritePropertyName("function_call"u8); + writer.WriteObjectValue(FunctionCall, options); + } + else + { + writer.WriteNull("functionCall"u8); + } + } } AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AssistantChatMessage)JsonModelCreateCore(ref reader, options); @@ -92,6 +104,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement string refusal = default; string participantName = default; IList toolCalls = default; + ChatFunctionCall functionCall = default; Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -118,6 +131,11 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } if (prop.NameEquals("name"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + participantName = null; + continue; + } participantName = prop.Value.GetString(); continue; } @@ -135,6 +153,16 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement toolCalls = array; continue; } + if (prop.NameEquals("function_call"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionCall = null; + continue; + } + functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); + continue; + } if (prop.NameEquals("role"u8)) { role = prop.Value.GetInt32().ToChatMessageRole(); @@ -150,6 +178,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement refusal, participantName, toolCalls ?? new ChangeTrackingList(), + functionCall, role, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index d1226707e..fb0797f5b 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -9,12 +9,13 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal AssistantChatMessage(BinaryData content, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) { Content = content; Refusal = refusal; ParticipantName = participantName; ToolCalls = toolCalls; + FunctionCall = functionCall; } public BinaryData Content { get; set; } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index 146eea92f..bc9c4d01f 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -98,6 +98,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); @@ -185,6 +187,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso string instructions = default; IDictionary metadata = default; float? temperature = default; + string model = default; IList tools = default; ToolResources toolResources = default; AssistantResponseFormat responseFormat = default; @@ -253,6 +256,11 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso temperature = prop.Value.GetSingle(); continue; } + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -271,6 +279,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolResources = null; continue; } toolResources = ToolResources.DeserializeToolResources(prop.Value, options); @@ -280,6 +289,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso { if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); @@ -306,6 +316,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso instructions, metadata ?? new ChangeTrackingDictionary(), temperature, + model, tools ?? new ChangeTrackingList(), toolResources, responseFormat, diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs index 6a2321033..15bd6a0ac 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs @@ -11,13 +11,14 @@ public partial class AssistantCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantCreationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, IList tools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) + internal AssistantCreationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, string model, IList tools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { Name = name; Description = description; Instructions = instructions; Metadata = metadata; Temperature = temperature; + Model = model; Tools = tools; ToolResources = toolResources; ResponseFormat = responseFormat; diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index ea4bc3571..3114df161 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -98,6 +98,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } if (Optional.IsCollectionDefined(DefaultTools)) { writer.WritePropertyName("tools"u8); @@ -185,6 +190,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt string instructions = default; IDictionary metadata = default; float? temperature = default; + string model = default; IList defaultTools = default; ToolResources toolResources = default; AssistantResponseFormat responseFormat = default; @@ -253,6 +259,16 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt temperature = prop.Value.GetSingle(); continue; } + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = prop.Value.GetString(); + continue; + } if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -271,6 +287,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolResources = null; continue; } toolResources = ToolResources.DeserializeToolResources(prop.Value, options); @@ -280,6 +297,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt { if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); @@ -306,6 +324,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt instructions, metadata ?? new ChangeTrackingDictionary(), temperature, + model, defaultTools ?? new ChangeTrackingList(), toolResources, responseFormat, diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs index 689275227..beaffd6ab 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs @@ -18,13 +18,14 @@ public AssistantModificationOptions() DefaultTools = new ChangeTrackingList(); } - internal AssistantModificationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, IList defaultTools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) + internal AssistantModificationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, string model, IList defaultTools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { Name = name; Description = description; Instructions = instructions; Metadata = metadata; Temperature = temperature; + Model = model; DefaultTools = defaultTools; ToolResources = toolResources; ResponseFormat = responseFormat; diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 7b2fa4c57..3ff49abc2 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -57,6 +57,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteObjectValue(Object, options); + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); + } + else + { + writer.WriteNull("toolResources"u8); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -97,6 +106,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, DateTimeOffset createdAt = default; IDictionary metadata = default; InternalThreadObjectObject @object = default; + ToolResources toolResources = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -137,12 +147,23 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, @object = InternalThreadObjectObject.DeserializeInternalThreadObjectObject(prop.Value, options); continue; } + if (prop.NameEquals("tool_resources"u8)) + { + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AssistantThread(id, createdAt, metadata, @object, additionalBinaryDataProperties); + return new AssistantThread( + id, + createdAt, + metadata, + @object, + toolResources, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index c649e6985..77bbcf089 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -11,20 +11,22 @@ public partial class AssistantThread { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object) + internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, ToolResources toolResources) { Id = id; CreatedAt = createdAt; Metadata = metadata; Object = @object; + ToolResources = toolResources; } - internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, IDictionary additionalBinaryDataProperties) + internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, ToolResources toolResources, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; Metadata = metadata; Object = @object; + ToolResources = toolResources; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index b4c6045d6..4e5d89a9e 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -55,6 +55,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + writer.WritePropertyName("task"u8); + writer.WriteObjectValue(Task, options); + writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -95,6 +99,8 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele string text = default; IList words = default; IList segments = default; + InternalCreateTranscriptionResponseVerboseJsonTask task = default; + TimeSpan? duration = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -136,12 +142,34 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele segments = array; continue; } + if (prop.NameEquals("task"u8)) + { + task = InternalCreateTranscriptionResponseVerboseJsonTask.DeserializeInternalCreateTranscriptionResponseVerboseJsonTask(prop.Value, options); + continue; + } + if (prop.NameEquals("duration"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + duration = null; + continue; + } + duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranscription(language, text, words ?? new ChangeTrackingList(), segments ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new AudioTranscription( + language, + text, + words ?? new ChangeTrackingList(), + segments ?? new ChangeTrackingList(), + task, + duration, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index 7743fd6d9..50c80099e 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -12,20 +12,24 @@ public partial class AudioTranscription { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscription(string language, string text) + internal AudioTranscription(string language, string text, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration) { Language = language; Text = text; Words = new ChangeTrackingList(); Segments = new ChangeTrackingList(); + Task = task; + Duration = duration; } - internal AudioTranscription(string language, string text, IList words, IList segments, IDictionary additionalBinaryDataProperties) + internal AudioTranscription(string language, string text, IList words, IList segments, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) { Language = language; Text = text; Words = words; Segments = segments; + Task = task; + Duration = duration; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 0608ce549..406aafc45 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -47,13 +47,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); if (Optional.IsCollectionDefined(InternalTimestampGranularities)) { writer.WritePropertyName("timestamp_granularities"u8); writer.WriteStartArray(); foreach (BinaryData item in InternalTimestampGranularities) { - writer.WriteObjectValue(item, options); + if (item == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } writer.WriteEndArray(); } @@ -97,6 +113,8 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J string prompt = default; AudioTranscriptionFormat? responseFormat = default; float? temperature = default; + BinaryData @file = default; + InternalCreateTranscriptionRequestModel model = default; IList internalTimestampGranularities = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -141,6 +159,16 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J temperature = prop.Value.GetSingle(); continue; } + if (prop.NameEquals("file"u8)) + { + @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("model"u8)) + { + model = InternalCreateTranscriptionRequestModel.DeserializeInternalCreateTranscriptionRequestModel(prop.Value, options); + continue; + } if (prop.NameEquals("timestamp_granularities"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -150,7 +178,14 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(BinaryData.DeserializeBinaryData(item, options)); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } } internalTimestampGranularities = array; continue; @@ -165,6 +200,8 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J prompt, responseFormat, temperature, + @file, + model, internalTimestampGranularities ?? new ChangeTrackingList(), additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index 3ec1e5c4c..b2cfc5d12 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -11,12 +11,14 @@ public partial class AudioTranscriptionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscriptionOptions(string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, IList internalTimestampGranularities, IDictionary additionalBinaryDataProperties) + internal AudioTranscriptionOptions(string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranscriptionRequestModel model, IList internalTimestampGranularities, IDictionary additionalBinaryDataProperties) { Language = language; Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; + File = @file; + Model = model; InternalTimestampGranularities = internalTimestampGranularities; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index 5f1e1e0bc..0a3c6646a 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -45,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + writer.WritePropertyName("task"u8); + writer.WriteObjectValue(Task, options); + writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -84,6 +88,8 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element string language = default; string text = default; IList segments = default; + InternalCreateTranslationResponseVerboseJsonTask task = default; + TimeSpan? duration = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -111,12 +117,33 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element segments = array; continue; } + if (prop.NameEquals("task"u8)) + { + task = InternalCreateTranslationResponseVerboseJsonTask.DeserializeInternalCreateTranslationResponseVerboseJsonTask(prop.Value, options); + continue; + } + if (prop.NameEquals("duration"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + duration = null; + continue; + } + duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranslation(language, text, segments ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new AudioTranslation( + language, + text, + segments ?? new ChangeTrackingList(), + task, + duration, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index 2efda3340..c3d2acd75 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -12,18 +12,22 @@ public partial class AudioTranslation { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslation(string language, string text) + internal AudioTranslation(string language, string text, InternalCreateTranslationResponseVerboseJsonTask task, TimeSpan? duration) { Language = language; Text = text; Segments = new ChangeTrackingList(); + Task = task; + Duration = duration; } - internal AudioTranslation(string language, string text, IList segments, IDictionary additionalBinaryDataProperties) + internal AudioTranslation(string language, string text, IList segments, InternalCreateTranslationResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) { Language = language; Text = text; Segments = segments; + Task = task; + Duration = duration; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index 059c223f8..5c4f32f86 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -42,6 +42,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -81,6 +85,8 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE string prompt = default; AudioTranslationFormat? responseFormat = default; float? temperature = default; + BinaryData @file = default; + InternalCreateTranslationRequestModel model = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -114,12 +120,28 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE temperature = prop.Value.GetSingle(); continue; } + if (prop.NameEquals("file"u8)) + { + @file = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("model"u8)) + { + model = InternalCreateTranslationRequestModel.DeserializeInternalCreateTranslationRequestModel(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioTranslationOptions(prompt, responseFormat, temperature, additionalBinaryDataProperties); + return new AudioTranslationOptions( + prompt, + responseFormat, + temperature, + @file, + model, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index 015ba8022..a4e4474db 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -11,11 +11,13 @@ public partial class AudioTranslationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslationOptions(string prompt, AudioTranslationFormat? responseFormat, float? temperature, IDictionary additionalBinaryDataProperties) + internal AudioTranslationOptions(string prompt, AudioTranslationFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranslationRequestModel model, IDictionary additionalBinaryDataProperties) { Prompt = prompt; ResponseFormat = responseFormat; Temperature = temperature; + File = @file; + Model = model; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 384ef302e..e5dcd8b62 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -103,12 +103,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndArray(); } writer.WritePropertyName("messages"u8); - writer.WriteStartArray(); - foreach (ChatMessage item in Messages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + this.SerializeMessagesValue(writer, options); writer.WritePropertyName("model"u8); writer.WriteObjectValue(Model, options); if (Optional.IsDefined(N)) @@ -176,17 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (StopSequences != null) { writer.WritePropertyName("stop"u8); - writer.WriteStartArray(); - foreach (string item in StopSequences) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + this.SerializeStopSequencesValue(writer, options); } else { @@ -198,13 +183,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (LogitBiases != null) { writer.WritePropertyName("logit_bias"u8); - writer.WriteStartObject(); - foreach (var item in LogitBiases) - { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); - } - writer.WriteEndObject(); + this.SerializeLogitBiasesValue(writer, options); } else { @@ -231,6 +210,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } + if (Optional.IsDefined(Seed)) + { + if (Seed != null) + { + writer.WritePropertyName("seed"u8); + writer.WriteNumberValue(Seed.Value); + } + else + { + writer.WriteNull("seed"u8); + } + } if (Optional.IsDefined(_deprecatedMaxTokens)) { if (_deprecatedMaxTokens != null) @@ -255,6 +246,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxCompletionTokens"u8); } } + if (Optional.IsCollectionDefined(Functions)) + { + writer.WritePropertyName("functions"u8); + writer.WriteStartArray(); + foreach (ChatFunction item in Functions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -311,8 +312,10 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme ChatFunctionChoice functionChoice = default; bool? allowParallelToolCalls = default; string endUserId = default; + long? seed = default; int? deprecatedMaxTokens = default; int? maxOutputTokenCount = default; + IList functions = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -429,6 +432,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { + streamOptions = null; continue; } streamOptions = InternalChatCompletionStreamOptions.DeserializeInternalChatCompletionStreamOptions(prop.Value, options); @@ -460,19 +464,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { continue; } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetString()); - } - } - stopSequences = array; + DeserializeStopSequencesValue(prop, ref stopSequences); continue; } if (prop.NameEquals("logit_bias"u8)) @@ -481,18 +473,14 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { continue; } - Dictionary dictionary = new Dictionary(); - foreach (var prop0 in prop.Value.EnumerateObject()) - { - dictionary.Add(prop0.Name, prop0.Value.GetInt32()); - } - logitBiases = dictionary; + DeserializeLogitBiasesValue(prop, ref logitBiases); continue; } if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolChoice = null; continue; } toolChoice = ChatToolChoice.DeserializeChatToolChoice(prop.Value, options); @@ -502,6 +490,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { + functionChoice = null; continue; } functionChoice = ChatFunctionChoice.DeserializeChatFunctionChoice(prop.Value, options); @@ -519,9 +508,24 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } if (prop.NameEquals("user"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + endUserId = null; + continue; + } endUserId = prop.Value.GetString(); continue; } + if (prop.NameEquals("seed"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + seed = null; + continue; + } + seed = prop.Value.GetInt64(); + continue; + } if (prop.NameEquals("max_tokens"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -542,6 +546,20 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme maxOutputTokenCount = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("functions"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ChatFunction.DeserializeChatFunction(item, options)); + } + functions = array; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -568,8 +586,10 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme functionChoice, allowParallelToolCalls, endUserId, + seed, deprecatedMaxTokens, maxOutputTokenCount, + functions ?? new ChangeTrackingList(), additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index 2d97be274..d8081e39e 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -11,7 +11,7 @@ public partial class ChatCompletionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, InternalCreateChatCompletionRequestServiceTier? serviceTier, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, int? deprecatedMaxTokens, int? maxOutputTokenCount, IDictionary additionalBinaryDataProperties) + internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, InternalCreateChatCompletionRequestServiceTier? serviceTier, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, IDictionary additionalBinaryDataProperties) { FrequencyPenalty = frequencyPenalty; PresencePenalty = presencePenalty; @@ -33,8 +33,10 @@ internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, FunctionChoice = functionChoice; AllowParallelToolCalls = allowParallelToolCalls; EndUserId = endUserId; + Seed = seed; _deprecatedMaxTokens = deprecatedMaxTokens; MaxOutputTokenCount = maxOutputTokenCount; + Functions = functions; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index 2aaa6f575..67af8e124 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -41,7 +41,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(FunctionParameters)) { writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(FunctionParameters, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(FunctionParameters); +#else + using (JsonDocument document = JsonDocument.Parse(FunctionParameters)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -92,6 +99,11 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR } if (prop.NameEquals("description"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionDescription = null; + continue; + } functionDescription = prop.Value.GetString(); continue; } @@ -99,9 +111,10 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR { if (prop.Value.ValueKind == JsonValueKind.Null) { + functionParameters = null; continue; } - functionParameters = BinaryData.DeserializeBinaryData(prop.Value, options); + functionParameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index f8ae826da..7a22a52f9 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(FunctionName); writer.WritePropertyName("arguments"u8); - writer.WriteObjectValue(FunctionArguments, options); + this.SerializeFunctionArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -83,7 +83,7 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element } if (prop.NameEquals("arguments"u8)) { - functionArguments = BinaryData.DeserializeBinaryData(prop.Value, options); + DeserializeFunctionArgumentsValue(prop, ref functionArguments); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs new file mode 100644 index 000000000..6f527b7b4 --- /dev/null +++ b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.Chat +{ + public partial class ChatMessageContent : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ChatMessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatMessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeChatMessageContent(document.RootElement, options); + } + + internal static ChatMessageContent DeserializeChatMessageContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ChatMessageContent(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{options.Format}' format."); + } + } + + ChatMessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ChatMessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeChatMessageContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ChatMessageContent chatMessageContent) + { + return BinaryContent.Create(chatMessageContent, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ChatMessageContent(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.cs b/.dotnet/src/Generated/Models/ChatMessageContent.cs new file mode 100644 index 000000000..61b11b330 --- /dev/null +++ b/.dotnet/src/Generated/Models/ChatMessageContent.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.Chat +{ + public partial class ChatMessageContent + { + private protected IDictionary _additionalBinaryDataProperties; + + internal ChatMessageContent(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + } +} diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 72efaee65..8cdf01845 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -73,6 +73,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai { if (prop.Value.ValueKind == JsonValueKind.Null) { + reasoningTokenCount = null; continue; } reasoningTokenCount = prop.Value.GetInt32(); diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index af500c3fc..f3e474ada 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -104,6 +104,7 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { + outputTokenDetails = null; continue; } outputTokenDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 4b88b9f80..e0cb4f692 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -27,6 +27,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(CodeInterpreterToolResources)} does not support writing '{format}' format."); } + if (Optional.IsCollectionDefined(FileIds)) + { + writer.WritePropertyName("file_ids"u8); + writer.WriteStartArray(); + foreach (string item in FileIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +78,37 @@ internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResou { return null; } + IList fileIds = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("file_ids"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + fileIds = array; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new CodeInterpreterToolResources(additionalBinaryDataProperties); + return new CodeInterpreterToolResources(fileIds ?? new ChangeTrackingList(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs index ae3565d48..4c5e382c9 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs @@ -11,8 +11,9 @@ public partial class CodeInterpreterToolResources { private protected IDictionary _additionalBinaryDataProperties; - internal CodeInterpreterToolResources(IDictionary additionalBinaryDataProperties) + internal CodeInterpreterToolResources(IList fileIds, IDictionary additionalBinaryDataProperties) { + FileIds = fileIds; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs new file mode 100644 index 000000000..b050c5545 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationAudioDeltaUpdate : IJsonModel + { + internal ConversationAudioDeltaUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("delta"u8); + writer.WriteBase64StringValue(Delta.ToArray(), "D"); + } + + ConversationAudioDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationAudioDeltaUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationAudioDeltaUpdate(document.RootElement, options); + } + + internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + BinaryData delta = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("delta"u8)) + { + delta = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationAudioDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationAudioDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationAudioDeltaUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationAudioDeltaUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationAudioDeltaUpdate conversationAudioDeltaUpdate) + { + return BinaryContent.Create(conversationAudioDeltaUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationAudioDeltaUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationAudioDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs new file mode 100644 index 000000000..74e813081 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationAudioDeltaUpdate : ConversationUpdate + { + internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public BinaryData Delta { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs new file mode 100644 index 000000000..ecc92f758 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationAudioDoneUpdate : IJsonModel + { + internal ConversationAudioDoneUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + } + + ConversationAudioDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationAudioDoneUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationAudioDoneUpdate(document.RootElement, options); + } + + internal static ConversationAudioDoneUpdate DeserializeConversationAudioDoneUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @type = "response.audio.done"; + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationAudioDoneUpdate( + @type, + responseId, + itemId, + outputIndex, + contentIndex, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationAudioDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationAudioDoneUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationAudioDoneUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationAudioDoneUpdate conversationAudioDoneUpdate) + { + return BinaryContent.Create(conversationAudioDoneUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationAudioDoneUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationAudioDoneUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs new file mode 100644 index 000000000..1c7e3eab7 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs @@ -0,0 +1,39 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationAudioDoneUpdate : ConversationUpdate + { + internal ConversationAudioDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + } + + internal ConversationAudioDoneUpdate(string @type, string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Type = @type; + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + } + + internal string Type { get; set; } = "response.audio.done"; + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationAudioFormat.cs b/.dotnet/src/Generated/Models/ConversationAudioFormat.cs new file mode 100644 index 000000000..93aaac894 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationAudioFormat.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationAudioFormat : IEquatable + { + private readonly string _value; + private const string Pcm16Value = "pcm16"; + private const string G711UlawValue = "g711_ulaw"; + private const string G711AlawValue = "g711_alaw"; + + public ConversationAudioFormat(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationAudioFormat Pcm16 { get; } = new ConversationAudioFormat(Pcm16Value); + + public static ConversationAudioFormat G711Ulaw { get; } = new ConversationAudioFormat(G711UlawValue); + + public static ConversationAudioFormat G711Alaw { get; } = new ConversationAudioFormat(G711AlawValue); + + public static bool operator ==(ConversationAudioFormat left, ConversationAudioFormat right) => left.Equals(right); + + public static bool operator !=(ConversationAudioFormat left, ConversationAudioFormat right) => !left.Equals(right); + + public static implicit operator ConversationAudioFormat(string value) => new ConversationAudioFormat(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationAudioFormat other && Equals(other); + + public bool Equals(ConversationAudioFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs new file mode 100644 index 000000000..a39dd2ad1 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -0,0 +1,134 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeContentPart))] + public abstract partial class ConversationContentPart : IJsonModel + { + internal ConversationContentPart() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationContentPart(document.RootElement, options); + } + + internal static ConversationContentPart DeserializeConversationContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "input_text": + return InternalRealtimeRequestTextContentPart.DeserializeInternalRealtimeRequestTextContentPart(element, options); + case "input_audio": + return InternalRealtimeRequestAudioContentPart.DeserializeInternalRealtimeRequestAudioContentPart(element, options); + case "text": + return InternalRealtimeResponseTextContentPart.DeserializeInternalRealtimeResponseTextContentPart(element, options); + case "audio": + return InternalRealtimeResponseAudioContentPart.DeserializeInternalRealtimeResponseAudioContentPart(element, options); + } + } + return UnknownRealtimeContentPart.DeserializeUnknownRealtimeContentPart(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{options.Format}' format."); + } + } + + ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationContentPart conversationContentPart) + { + return BinaryContent.Create(conversationContentPart, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationContentPart(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs new file mode 100644 index 000000000..7e79890ed --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public abstract partial class ConversationContentPart + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationContentPart(ConversationContentPartKind @type) + { + Type = @type; + } + + internal ConversationContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal ConversationContentPartKind Type { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..cabdb391a --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationContentPartFinishedUpdate : IJsonModel + { + internal ConversationContentPartFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("part"u8); + writer.WriteObjectValue(Part, options); + } + + ConversationContentPartFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationContentPartFinishedUpdate(document.RootElement, options); + } + + internal static ConversationContentPartFinishedUpdate DeserializeConversationContentPartFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + ConversationContentPart part = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("part"u8)) + { + part = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationContentPartFinishedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + part, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationContentPartFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationContentPartFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationContentPartFinishedUpdate conversationContentPartFinishedUpdate) + { + return BinaryContent.Create(conversationContentPartFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationContentPartFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationContentPartFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs new file mode 100644 index 000000000..fe18d4c68 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationContentPartFinishedUpdate : ConversationUpdate + { + internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Part = part; + } + + internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Part = part; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public ConversationContentPart Part { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs new file mode 100644 index 000000000..60c66c23f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs @@ -0,0 +1,49 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationContentPartKind : IEquatable + { + private readonly string _value; + private const string InputTextValue = "input_text"; + private const string InputAudioValue = "input_audio"; + private const string TextValue = "text"; + private const string AudioValue = "audio"; + + public ConversationContentPartKind(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationContentPartKind InputText { get; } = new ConversationContentPartKind(InputTextValue); + + public static ConversationContentPartKind InputAudio { get; } = new ConversationContentPartKind(InputAudioValue); + + public static ConversationContentPartKind Text { get; } = new ConversationContentPartKind(TextValue); + + public static ConversationContentPartKind Audio { get; } = new ConversationContentPartKind(AudioValue); + + public static bool operator ==(ConversationContentPartKind left, ConversationContentPartKind right) => left.Equals(right); + + public static bool operator !=(ConversationContentPartKind left, ConversationContentPartKind right) => !left.Equals(right); + + public static implicit operator ConversationContentPartKind(string value) => new ConversationContentPartKind(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationContentPartKind other && Equals(other); + + public bool Equals(ConversationContentPartKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs new file mode 100644 index 000000000..70392abba --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationContentPartStartedUpdate : IJsonModel + { + internal ConversationContentPartStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("part"u8); + writer.WriteObjectValue(Part, options); + } + + ConversationContentPartStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationContentPartStartedUpdate(document.RootElement, options); + } + + internal static ConversationContentPartStartedUpdate DeserializeConversationContentPartStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + ConversationContentPart part = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("part"u8)) + { + part = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationContentPartStartedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + part, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationContentPartStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationContentPartStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationContentPartStartedUpdate conversationContentPartStartedUpdate) + { + return BinaryContent.Create(conversationContentPartStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationContentPartStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationContentPartStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs new file mode 100644 index 000000000..77256c2a1 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationContentPartStartedUpdate : ConversationUpdate + { + internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Part = part; + } + + internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Part = part; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public ConversationContentPart Part { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs new file mode 100644 index 000000000..49b50ffc5 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationErrorUpdate : IJsonModel + { + internal ConversationErrorUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + + ConversationErrorUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationErrorUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationErrorUpdate(document.RootElement, options); + } + + internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseError error = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("error"u8)) + { + error = InternalRealtimeResponseError.DeserializeInternalRealtimeResponseError(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationErrorUpdate(error, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationErrorUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationErrorUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationErrorUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationErrorUpdate conversationErrorUpdate) + { + return BinaryContent.Create(conversationErrorUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationErrorUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationErrorUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs new file mode 100644 index 000000000..5227a7409 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationErrorUpdate : ConversationUpdate + { + internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId) : base(eventId) + { + Error = error; + } + + internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Error = error; + } + + public InternalRealtimeResponseError Error { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs new file mode 100644 index 000000000..fe5bbb03c --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionCallArgumentsDeltaUpdate : IJsonModel + { + internal ConversationFunctionCallArgumentsDeltaUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); + } + + ConversationFunctionCallArgumentsDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDeltaUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, options); + } + + internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversationFunctionCallArgumentsDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + string callId = default; + string delta = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("delta"u8)) + { + delta = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationFunctionCallArgumentsDeltaUpdate( + responseId, + itemId, + outputIndex, + callId, + delta, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationFunctionCallArgumentsDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDeltaUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDeltaUpdate conversationFunctionCallArgumentsDeltaUpdate) + { + return BinaryContent.Create(conversationFunctionCallArgumentsDeltaUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationFunctionCallArgumentsDeltaUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs new file mode 100644 index 000000000..72d21b4e0 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionCallArgumentsDeltaUpdate : ConversationUpdate + { + internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + CallId = callId; + Delta = delta; + } + + internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + CallId = callId; + Delta = delta; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public string CallId { get; set; } + + public string Delta { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs new file mode 100644 index 000000000..3e8f9c8f6 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs @@ -0,0 +1,186 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionCallArgumentsDoneUpdate : IJsonModel + { + internal ConversationFunctionCallArgumentsDoneUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + } + + ConversationFunctionCallArgumentsDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDoneUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, options); + } + + internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversationFunctionCallArgumentsDoneUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + string callId = default; + string name = default; + string arguments = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("arguments"u8)) + { + arguments = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationFunctionCallArgumentsDoneUpdate( + responseId, + itemId, + outputIndex, + callId, + name, + arguments, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationFunctionCallArgumentsDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDoneUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDoneUpdate conversationFunctionCallArgumentsDoneUpdate) + { + return BinaryContent.Create(conversationFunctionCallArgumentsDoneUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationFunctionCallArgumentsDoneUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs new file mode 100644 index 000000000..49d38df8a --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs @@ -0,0 +1,44 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionCallArgumentsDoneUpdate : ConversationUpdate + { + internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + CallId = callId; + Name = name; + Arguments = arguments; + } + + internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + CallId = callId; + Name = name; + Arguments = arguments; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public string CallId { get; set; } + + public string Name { get; set; } + + public string Arguments { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs new file mode 100644 index 000000000..30ba818d9 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -0,0 +1,161 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionTool : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Parameters); +#else + using (JsonDocument document = JsonDocument.Parse(Parameters)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + ConversationFunctionTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionTool)JsonModelCreateCore(ref reader, options); + + protected override ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationFunctionTool(document.RootElement, options); + } + + internal static ConversationFunctionTool DeserializeConversationFunctionTool(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + BinaryData parameters = default; + ConversationToolKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("parameters"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + parameters = null; + continue; + } + parameters = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = ConversationToolKind.DeserializeConversationToolKind(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationFunctionTool(name, description, parameters, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support writing '{options.Format}' format."); + } + } + + ConversationFunctionTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationFunctionTool)PersistableModelCreateCore(data, options); + + protected override ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationFunctionTool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationFunctionTool conversationFunctionTool) + { + return BinaryContent.Create(conversationFunctionTool, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationFunctionTool(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationFunctionTool(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs new file mode 100644 index 000000000..f16f3fb3a --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationFunctionTool : ConversationTool + { + internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + Name = name; + Description = description; + Parameters = parameters; + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs new file mode 100644 index 000000000..c47151ea6 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs @@ -0,0 +1,129 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputAudioBufferClearedUpdate : IJsonModel + { + internal ConversationInputAudioBufferClearedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationInputAudioBufferClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioBufferClearedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, options); + } + + internal static ConversationInputAudioBufferClearedUpdate DeserializeConversationInputAudioBufferClearedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputAudioBufferClearedUpdate(eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputAudioBufferClearedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputAudioBufferClearedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputAudioBufferClearedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputAudioBufferClearedUpdate conversationInputAudioBufferClearedUpdate) + { + return BinaryContent.Create(conversationInputAudioBufferClearedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputAudioBufferClearedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs new file mode 100644 index 000000000..b8026f0c7 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputAudioBufferClearedUpdate : ConversationUpdate + { + internal ConversationInputAudioBufferClearedUpdate(string eventId) : base(eventId) + { + } + + internal ConversationInputAudioBufferClearedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs new file mode 100644 index 000000000..6ab30c023 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputAudioBufferCommittedUpdate : IJsonModel + { + internal ConversationInputAudioBufferCommittedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + if (Optional.IsDefined(PreviousItemId)) + { + writer.WritePropertyName("previous_item_id"u8); + writer.WriteStringValue(PreviousItemId); + } + } + + ConversationInputAudioBufferCommittedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioBufferCommittedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); + } + + internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversationInputAudioBufferCommittedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + string previousItemId = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("previous_item_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + previousItemId = null; + continue; + } + previousItemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputAudioBufferCommittedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputAudioBufferCommittedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputAudioBufferCommittedUpdate conversationInputAudioBufferCommittedUpdate) + { + return BinaryContent.Create(conversationInputAudioBufferCommittedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputAudioBufferCommittedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs new file mode 100644 index 000000000..09c76128b --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputAudioBufferCommittedUpdate : ConversationUpdate + { + internal ConversationInputAudioBufferCommittedUpdate(string itemId, string eventId) : base(eventId) + { + ItemId = itemId; + } + + internal ConversationInputAudioBufferCommittedUpdate(string itemId, string previousItemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ItemId = itemId; + PreviousItemId = previousItemId; + } + + public string ItemId { get; set; } + + public string PreviousItemId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..3ac67cd50 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -0,0 +1,145 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputSpeechFinishedUpdate : IJsonModel + { + internal ConversationInputSpeechFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + } + + ConversationInputSpeechFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement, options); + } + + internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInputSpeechFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int audioEndMs = default; + string itemId = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("audio_end_ms"u8)) + { + audioEndMs = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputSpeechFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputSpeechFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputSpeechFinishedUpdate conversationInputSpeechFinishedUpdate) + { + return BinaryContent.Create(conversationInputSpeechFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputSpeechFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputSpeechFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs new file mode 100644 index 000000000..636d74230 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate + { + internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId) : base(eventId) + { + AudioEndMs = audioEndMs; + ItemId = itemId; + } + + internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + AudioEndMs = audioEndMs; + ItemId = itemId; + } + + public int AudioEndMs { get; set; } + + public string ItemId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs new file mode 100644 index 000000000..b28f1d5b3 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -0,0 +1,145 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputSpeechStartedUpdate : IJsonModel + { + internal ConversationInputSpeechStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("audio_start_ms"u8); + writer.WriteNumberValue(AudioStartMs); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + } + + ConversationInputSpeechStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputSpeechStartedUpdate(document.RootElement, options); + } + + internal static ConversationInputSpeechStartedUpdate DeserializeConversationInputSpeechStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int audioStartMs = default; + string itemId = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("audio_start_ms"u8)) + { + audioStartMs = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputSpeechStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputSpeechStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputSpeechStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputSpeechStartedUpdate conversationInputSpeechStartedUpdate) + { + return BinaryContent.Create(conversationInputSpeechStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputSpeechStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputSpeechStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs new file mode 100644 index 000000000..96066cd37 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate + { + internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId) : base(eventId) + { + AudioStartMs = audioStartMs; + ItemId = itemId; + } + + internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + AudioStartMs = audioStartMs; + ItemId = itemId; + } + + public int AudioStartMs { get; set; } + + public string ItemId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs new file mode 100644 index 000000000..408f006a6 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -0,0 +1,150 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTokenUsageDetails : IJsonModel + { + internal ConversationInputTokenUsageDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("cached_tokens"u8); + writer.WriteNumberValue(CachedTokens); + writer.WritePropertyName("text_tokens"u8); + writer.WriteNumberValue(TextTokens); + writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationInputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputTokenUsageDetails(document.RootElement, options); + } + + internal static ConversationInputTokenUsageDetails DeserializeConversationInputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int cachedTokens = default; + int textTokens = default; + int audioTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("cached_tokens"u8)) + { + cachedTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("text_tokens"u8)) + { + textTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("audio_tokens"u8)) + { + audioTokens = prop.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputTokenUsageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputTokenUsageDetails conversationInputTokenUsageDetails) + { + return BinaryContent.Create(conversationInputTokenUsageDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputTokenUsageDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputTokenUsageDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs new file mode 100644 index 000000000..b1c17d736 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs @@ -0,0 +1,35 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTokenUsageDetails + { + private protected IDictionary _additionalBinaryDataProperties; + + internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens) + { + CachedTokens = cachedTokens; + TextTokens = textTokens; + AudioTokens = audioTokens; + } + + internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens, IDictionary additionalBinaryDataProperties) + { + CachedTokens = cachedTokens; + TextTokens = textTokens; + AudioTokens = audioTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public int CachedTokens { get; set; } + + public int TextTokens { get; set; } + + public int AudioTokens { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs new file mode 100644 index 000000000..30097cfaf --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionFailedUpdate : IJsonModel + { + internal ConversationInputTranscriptionFailedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + + ConversationInputTranscriptionFailedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFailedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement, options); + } + + internal static ConversationInputTranscriptionFailedUpdate DeserializeConversationInputTranscriptionFailedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + int contentIndex = default; + InternalRealtimeResponseApiError error = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("error"u8)) + { + error = InternalRealtimeResponseApiError.DeserializeInternalRealtimeResponseApiError(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputTranscriptionFailedUpdate( + itemId, + contentIndex, + error, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputTranscriptionFailedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFailedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputTranscriptionFailedUpdate conversationInputTranscriptionFailedUpdate) + { + return BinaryContent.Create(conversationInputTranscriptionFailedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputTranscriptionFailedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputTranscriptionFailedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs new file mode 100644 index 000000000..4cb4e05ae --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate + { + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId) : base(eventId) + { + ItemId = itemId; + ContentIndex = contentIndex; + Error = error; + } + + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ItemId = itemId; + ContentIndex = contentIndex; + Error = error; + } + + public string ItemId { get; set; } + + public int ContentIndex { get; set; } + + public InternalRealtimeResponseApiError Error { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..e0728f1a6 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionFinishedUpdate : IJsonModel + { + internal ConversationInputTranscriptionFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("transcript"u8); + writer.WriteStringValue(Transcript); + } + + ConversationInputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement, options); + } + + internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversationInputTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + int contentIndex = default; + string transcript = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("transcript"u8)) + { + transcript = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputTranscriptionFinishedUpdate( + itemId, + contentIndex, + transcript, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputTranscriptionFinishedUpdate conversationInputTranscriptionFinishedUpdate) + { + return BinaryContent.Create(conversationInputTranscriptionFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputTranscriptionFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputTranscriptionFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs new file mode 100644 index 000000000..f07edda98 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate + { + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId) + { + ItemId = itemId; + ContentIndex = contentIndex; + Transcript = transcript; + } + + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ItemId = itemId; + ContentIndex = contentIndex; + Transcript = transcript; + } + + public string ItemId { get; set; } + + public int ContentIndex { get; set; } + + public string Transcript { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs new file mode 100644 index 000000000..f400c1406 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionOptions : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationInputTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationInputTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationInputTranscriptionOptions(document.RootElement, options); + } + + internal static ConversationInputTranscriptionOptions DeserializeConversationInputTranscriptionOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationTranscriptionModel? model = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = new ConversationTranscriptionModel(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationInputTranscriptionOptions(model, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support writing '{options.Format}' format."); + } + } + + ConversationInputTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationInputTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationInputTranscriptionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationInputTranscriptionOptions conversationInputTranscriptionOptions) + { + return BinaryContent.Create(conversationInputTranscriptionOptions, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationInputTranscriptionOptions(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputTranscriptionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs new file mode 100644 index 000000000..a3d76dfd2 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationInputTranscriptionOptions + { + private protected IDictionary _additionalBinaryDataProperties; + + public ConversationInputTranscriptionOptions() + { + } + + internal ConversationInputTranscriptionOptions(ConversationTranscriptionModel? model, IDictionary additionalBinaryDataProperties) + { + Model = model; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public ConversationTranscriptionModel? Model { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs new file mode 100644 index 000000000..b5b900a04 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeRequestItem))] + public abstract partial class ConversationItem : IJsonModel + { + internal ConversationItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItem(document.RootElement, options); + } + + internal static ConversationItem DeserializeConversationItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "message": + return InternalRealtimeRequestMessageItem.DeserializeInternalRealtimeRequestMessageItem(element, options); + case "function_call": + return InternalRealtimeRequestFunctionCallItem.DeserializeInternalRealtimeRequestFunctionCallItem(element, options); + case "function_call_output": + return InternalRealtimeRequestFunctionCallOutputItem.DeserializeInternalRealtimeRequestFunctionCallOutputItem(element, options); + } + } + return UnknownRealtimeRequestItem.DeserializeUnknownRealtimeRequestItem(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{options.Format}' format."); + } + } + + ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItem conversationItem) + { + return BinaryContent.Create(conversationItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItem.cs b/.dotnet/src/Generated/Models/ConversationItem.cs new file mode 100644 index 000000000..e45e6d333 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItem.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public abstract partial class ConversationItem + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationItem(InternalRealtimeRequestItemType @type) + { + Type = @type; + } + + internal ConversationItem(InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Id = id; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal InternalRealtimeRequestItemType Type { get; set; } + + public string Id { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs new file mode 100644 index 000000000..b6304d658 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemAcknowledgedUpdate : IJsonModel + { + internal ConversationItemAcknowledgedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); + } + + ConversationItemAcknowledgedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemAcknowledgedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); + } + + internal static ConversationItemAcknowledgedUpdate DeserializeConversationItemAcknowledgedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationItem item = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item"u8)) + { + item = ConversationItem.DeserializeConversationItem(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemAcknowledgedUpdate(item, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemAcknowledgedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemAcknowledgedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemAcknowledgedUpdate conversationItemAcknowledgedUpdate) + { + return BinaryContent.Create(conversationItemAcknowledgedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemAcknowledgedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs new file mode 100644 index 000000000..72f66d568 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemAcknowledgedUpdate : ConversationUpdate + { + internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId) : base(eventId) + { + Item = item; + } + + internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Item = item; + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs new file mode 100644 index 000000000..904bc980b --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemDeletedUpdate : IJsonModel + { + internal ConversationItemDeletedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + } + + ConversationItemDeletedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemDeletedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemDeletedUpdate(document.RootElement, options); + } + + internal static ConversationItemDeletedUpdate DeserializeConversationItemDeletedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemDeletedUpdate(itemId, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemDeletedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemDeletedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemDeletedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemDeletedUpdate conversationItemDeletedUpdate) + { + return BinaryContent.Create(conversationItemDeletedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemDeletedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemDeletedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs new file mode 100644 index 000000000..efbc25d2f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemDeletedUpdate : ConversationUpdate + { + internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId) + { + ItemId = itemId; + } + + internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ItemId = itemId; + } + + public string ItemId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..cb9661a82 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemFinishedUpdate : IJsonModel + { + internal ConversationItemFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); + } + + ConversationItemFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemFinishedUpdate(document.RootElement, options); + } + + internal static ConversationItemFinishedUpdate DeserializeConversationItemFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + int outputIndex = default; + InternalRealtimeResponseItem item = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("item"u8)) + { + item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemFinishedUpdate( + responseId, + outputIndex, + item, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemFinishedUpdate conversationItemFinishedUpdate) + { + return BinaryContent.Create(conversationItemFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs new file mode 100644 index 000000000..50a39b215 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemFinishedUpdate : ConversationUpdate + { + internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId) : base(eventId) + { + ResponseId = responseId; + OutputIndex = outputIndex; + Item = item; + } + + internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + OutputIndex = outputIndex; + Item = item; + } + + public string ResponseId { get; set; } + + public int OutputIndex { get; set; } + + public InternalRealtimeResponseItem Item { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs new file mode 100644 index 000000000..b437179a0 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemStartedUpdate : IJsonModel + { + internal ConversationItemStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); + } + + ConversationItemStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemStartedUpdate(document.RootElement, options); + } + + internal static ConversationItemStartedUpdate DeserializeConversationItemStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + int outputIndex = default; + InternalRealtimeResponseItem item = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("item"u8)) + { + item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemStartedUpdate( + responseId, + outputIndex, + item, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemStartedUpdate conversationItemStartedUpdate) + { + return BinaryContent.Create(conversationItemStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs new file mode 100644 index 000000000..9fafec5e4 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemStartedUpdate : ConversationUpdate + { + internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId) : base(eventId) + { + ResponseId = responseId; + OutputIndex = outputIndex; + Item = item; + } + + internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + OutputIndex = outputIndex; + Item = item; + } + + public string ResponseId { get; set; } + + public int OutputIndex { get; set; } + + public InternalRealtimeResponseItem Item { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemStatus.cs b/.dotnet/src/Generated/Models/ConversationItemStatus.cs new file mode 100644 index 000000000..98bad53cc --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemStatus.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationItemStatus : IEquatable + { + private readonly string _value; + private const string InProgressValue = "in_progress"; + private const string CompletedValue = "completed"; + private const string IncompleteValue = "incomplete"; + + public ConversationItemStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationItemStatus InProgress { get; } = new ConversationItemStatus(InProgressValue); + + public static ConversationItemStatus Completed { get; } = new ConversationItemStatus(CompletedValue); + + public static ConversationItemStatus Incomplete { get; } = new ConversationItemStatus(IncompleteValue); + + public static bool operator ==(ConversationItemStatus left, ConversationItemStatus right) => left.Equals(right); + + public static bool operator !=(ConversationItemStatus left, ConversationItemStatus right) => !left.Equals(right); + + public static implicit operator ConversationItemStatus(string value) => new ConversationItemStatus(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationItemStatus other && Equals(other); + + public bool Equals(ConversationItemStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs new file mode 100644 index 000000000..3c2d7b91a --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemTruncatedUpdate : IJsonModel + { + internal ConversationItemTruncatedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); + writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); + } + + ConversationItemTruncatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemTruncatedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemTruncatedUpdate(document.RootElement, options); + } + + internal static ConversationItemTruncatedUpdate DeserializeConversationItemTruncatedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + int audioEndMs = default; + int index = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("audio_end_ms"u8)) + { + audioEndMs = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("index"u8)) + { + index = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemTruncatedUpdate( + itemId, + audioEndMs, + index, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemTruncatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemTruncatedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemTruncatedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemTruncatedUpdate conversationItemTruncatedUpdate) + { + return BinaryContent.Create(conversationItemTruncatedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemTruncatedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemTruncatedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs new file mode 100644 index 000000000..bc566bcc5 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemTruncatedUpdate : ConversationUpdate + { + internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId) : base(eventId) + { + ItemId = itemId; + AudioEndMs = audioEndMs; + Index = index; + } + + internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ItemId = itemId; + AudioEndMs = audioEndMs; + Index = index; + } + + public string ItemId { get; set; } + + public int AudioEndMs { get; set; } + + public int Index { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationMessageRole.cs b/.dotnet/src/Generated/Models/ConversationMessageRole.cs new file mode 100644 index 000000000..83c3f811f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationMessageRole.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationMessageRole : IEquatable + { + private readonly string _value; + private const string SystemValue = "system"; + private const string UserValue = "user"; + private const string AssistantValue = "assistant"; + + public ConversationMessageRole(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationMessageRole System { get; } = new ConversationMessageRole(SystemValue); + + public static ConversationMessageRole User { get; } = new ConversationMessageRole(UserValue); + + public static ConversationMessageRole Assistant { get; } = new ConversationMessageRole(AssistantValue); + + public static bool operator ==(ConversationMessageRole left, ConversationMessageRole right) => left.Equals(right); + + public static bool operator !=(ConversationMessageRole left, ConversationMessageRole right) => !left.Equals(right); + + public static implicit operator ConversationMessageRole(string value) => new ConversationMessageRole(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationMessageRole other && Equals(other); + + public bool Equals(ConversationMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs new file mode 100644 index 000000000..7d223b096 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTokenUsageDetails : IJsonModel + { + internal ConversationOutputTokenUsageDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("text_tokens"u8); + writer.WriteNumberValue(TextTokens); + writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationOutputTokenUsageDetails(document.RootElement, options); + } + + internal static ConversationOutputTokenUsageDetails DeserializeConversationOutputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int textTokens = default; + int audioTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("text_tokens"u8)) + { + textTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("audio_tokens"u8)) + { + audioTokens = prop.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support writing '{options.Format}' format."); + } + } + + ConversationOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationOutputTokenUsageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationOutputTokenUsageDetails conversationOutputTokenUsageDetails) + { + return BinaryContent.Create(conversationOutputTokenUsageDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationOutputTokenUsageDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationOutputTokenUsageDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs new file mode 100644 index 000000000..56b28128b --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTokenUsageDetails + { + private protected IDictionary _additionalBinaryDataProperties; + + internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens) + { + TextTokens = textTokens; + AudioTokens = audioTokens; + } + + internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens, IDictionary additionalBinaryDataProperties) + { + TextTokens = textTokens; + AudioTokens = audioTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public int TextTokens { get; set; } + + public int AudioTokens { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs new file mode 100644 index 000000000..c0e9e79db --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTranscriptionDeltaUpdate : IJsonModel + { + internal ConversationOutputTranscriptionDeltaUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); + } + + ConversationOutputTranscriptionDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionDeltaUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, options); + } + + internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversationOutputTranscriptionDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + string delta = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("delta"u8)) + { + delta = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationOutputTranscriptionDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationOutputTranscriptionDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionDeltaUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationOutputTranscriptionDeltaUpdate conversationOutputTranscriptionDeltaUpdate) + { + return BinaryContent.Create(conversationOutputTranscriptionDeltaUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationOutputTranscriptionDeltaUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs new file mode 100644 index 000000000..4cf469577 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTranscriptionDeltaUpdate : ConversationUpdate + { + internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public string Delta { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..9aa0a5277 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs @@ -0,0 +1,168 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTranscriptionFinishedUpdate : IJsonModel + { + internal ConversationOutputTranscriptionFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + } + + ConversationOutputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); + } + + internal static ConversationOutputTranscriptionFinishedUpdate DeserializeConversationOutputTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationOutputTranscriptionFinishedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationOutputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationOutputTranscriptionFinishedUpdate conversationOutputTranscriptionFinishedUpdate) + { + return BinaryContent.Create(conversationOutputTranscriptionFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationOutputTranscriptionFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs new file mode 100644 index 000000000..473308e8d --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationOutputTranscriptionFinishedUpdate : ConversationUpdate + { + internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + } + + internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs new file mode 100644 index 000000000..bb391c2de --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -0,0 +1,158 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationRateLimitDetailsItem : IJsonModel + { + internal ConversationRateLimitDetailsItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit); + writer.WritePropertyName("remaining"u8); + writer.WriteNumberValue(Remaining); + writer.WritePropertyName("reset_seconds"u8); + writer.WriteNumberValue(ResetSeconds); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationRateLimitDetailsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationRateLimitDetailsItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationRateLimitDetailsItem(document.RootElement, options); + } + + internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimitDetailsItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int limit = default; + int remaining = default; + float resetSeconds = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("limit"u8)) + { + limit = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("remaining"u8)) + { + remaining = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("reset_seconds"u8)) + { + resetSeconds = prop.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support writing '{options.Format}' format."); + } + } + + ConversationRateLimitDetailsItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationRateLimitDetailsItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationRateLimitDetailsItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationRateLimitDetailsItem conversationRateLimitDetailsItem) + { + return BinaryContent.Create(conversationRateLimitDetailsItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationRateLimitDetailsItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationRateLimitDetailsItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs new file mode 100644 index 000000000..1716014d3 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs @@ -0,0 +1,39 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationRateLimitDetailsItem + { + private protected IDictionary _additionalBinaryDataProperties; + + internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds) + { + Name = name; + Limit = limit; + Remaining = remaining; + ResetSeconds = resetSeconds; + } + + internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds, IDictionary additionalBinaryDataProperties) + { + Name = name; + Limit = limit; + Remaining = remaining; + ResetSeconds = resetSeconds; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Name { get; set; } + + public int Limit { get; set; } + + public int Remaining { get; set; } + + public float ResetSeconds { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs new file mode 100644 index 000000000..52f649cf9 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs @@ -0,0 +1,147 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationRateLimitsUpdatedUpdate : IJsonModel + { + internal ConversationRateLimitsUpdatedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("rate_limits"u8); + writer.WriteStartArray(); + foreach (ConversationRateLimitDetailsItem item in RateLimits) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + + ConversationRateLimitsUpdatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationRateLimitsUpdatedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); + } + + internal static ConversationRateLimitsUpdatedUpdate DeserializeConversationRateLimitsUpdatedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList rateLimits = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("rate_limits"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationRateLimitDetailsItem.DeserializeConversationRateLimitDetailsItem(item, options)); + } + rateLimits = array; + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationRateLimitsUpdatedUpdate(rateLimits, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationRateLimitsUpdatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationRateLimitsUpdatedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationRateLimitsUpdatedUpdate conversationRateLimitsUpdatedUpdate) + { + return BinaryContent.Create(conversationRateLimitsUpdatedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationRateLimitsUpdatedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs new file mode 100644 index 000000000..f70e66286 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationRateLimitsUpdatedUpdate : ConversationUpdate + { + internal ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits, string eventId) : base(eventId) + { + RateLimits = rateLimits.ToList(); + } + + internal ConversationRateLimitsUpdatedUpdate(IList rateLimits, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + RateLimits = rateLimits; + } + + public IList RateLimits { get; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs new file mode 100644 index 000000000..e92fb0eb7 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationResponseFinishedUpdate : IJsonModel + { + internal ConversationResponseFinishedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + + ConversationResponseFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationResponseFinishedUpdate(document.RootElement, options); + } + + internal static ConversationResponseFinishedUpdate DeserializeConversationResponseFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponse response = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response"u8)) + { + response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationResponseFinishedUpdate(response, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationResponseFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationResponseFinishedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationResponseFinishedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationResponseFinishedUpdate conversationResponseFinishedUpdate) + { + return BinaryContent.Create(conversationResponseFinishedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationResponseFinishedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationResponseFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs new file mode 100644 index 000000000..ce568cba8 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationResponseFinishedUpdate : ConversationUpdate + { + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse response, string eventId) : base(eventId) + { + Response = response; + } + + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse response, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Response = response; + } + + public InternalRealtimeResponse Response { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs new file mode 100644 index 000000000..cef281254 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationResponseStartedUpdate : IJsonModel + { + internal ConversationResponseStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + + ConversationResponseStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationResponseStartedUpdate(document.RootElement, options); + } + + internal static ConversationResponseStartedUpdate DeserializeConversationResponseStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponse response = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response"u8)) + { + response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationResponseStartedUpdate(response, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationResponseStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationResponseStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationResponseStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationResponseStartedUpdate conversationResponseStartedUpdate) + { + return BinaryContent.Create(conversationResponseStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationResponseStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationResponseStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs new file mode 100644 index 000000000..ed497b0c1 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationResponseStartedUpdate : ConversationUpdate + { + internal ConversationResponseStartedUpdate(InternalRealtimeResponse response, string eventId) : base(eventId) + { + Response = response; + } + + internal ConversationResponseStartedUpdate(InternalRealtimeResponse response, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Response = response; + } + + public InternalRealtimeResponse Response { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs new file mode 100644 index 000000000..4803e24ae --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionConfiguredUpdate : IJsonModel + { + internal ConversationSessionConfiguredUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("session"u8); + writer.WriteObjectValue(Session, options); + } + + ConversationSessionConfiguredUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionConfiguredUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationSessionConfiguredUpdate(document.RootElement, options); + } + + internal static ConversationSessionConfiguredUpdate DeserializeConversationSessionConfiguredUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseSession session = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("session"u8)) + { + session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationSessionConfiguredUpdate(session, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationSessionConfiguredUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationSessionConfiguredUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationSessionConfiguredUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationSessionConfiguredUpdate conversationSessionConfiguredUpdate) + { + return BinaryContent.Create(conversationSessionConfiguredUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationSessionConfiguredUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationSessionConfiguredUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs new file mode 100644 index 000000000..d82e6e46d --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionConfiguredUpdate : ConversationUpdate + { + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session, string eventId) : base(eventId) + { + Session = session; + } + + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Session = session; + } + + public InternalRealtimeResponseSession Session { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs new file mode 100644 index 000000000..b7d396810 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -0,0 +1,345 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionOptions : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(Modalities)) + { + writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Voice)) + { + writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.Value.ToString()); + } + if (Optional.IsDefined(Instructions)) + { + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + } + if (Optional.IsDefined(InputAudioFormat)) + { + writer.WritePropertyName("input_audio_format"u8); + writer.WriteStringValue(InputAudioFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputAudioFormat)) + { + writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat.Value.ToString()); + } + if (Optional.IsCollectionDefined(Tools)) + { + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ConversationTool item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Temperature)) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } + if (Optional.IsDefined(ToolChoice)) + { + writer.WritePropertyName("tool_choice"u8); + writer.WriteObjectValue(ToolChoice, options); + } + if (Optional.IsDefined(MaxResponseOutputTokens)) + { + writer.WritePropertyName("max_response_output_tokens"u8); + writer.WriteObjectValue(MaxResponseOutputTokens, options); + } + if (Optional.IsDefined(TurnDetectionOptions)) + { + writer.WritePropertyName("turn_detection"u8); + writer.WriteObjectValue(TurnDetectionOptions, options); + } + if (Optional.IsDefined(InputTranscriptionOptions)) + { + writer.WritePropertyName("input_audio_transcription"u8); + writer.WriteObjectValue(InputTranscriptionOptions, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationSessionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationSessionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationSessionOptions(document.RootElement, options); + } + + internal static ConversationSessionOptions DeserializeConversationSessionOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList modalities = default; + ConversationVoice? voice = default; + string instructions = default; + ConversationAudioFormat? inputAudioFormat = default; + ConversationAudioFormat? outputAudioFormat = default; + IList tools = default; + float? temperature = default; + string model = default; + RealtimeConversation.ConversationToolChoice toolChoice = default; + RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default; + ConversationTurnDetectionOptions turnDetectionOptions = default; + ConversationInputTranscriptionOptions inputTranscriptionOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("modalities"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); + } + modalities = array; + continue; + } + if (prop.NameEquals("voice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + voice = null; + continue; + } + voice = new ConversationVoice(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("instructions"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + instructions = null; + continue; + } + instructions = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("input_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + inputAudioFormat = null; + continue; + } + inputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("output_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + outputAudioFormat = null; + continue; + } + outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("tools"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationTool.DeserializeConversationTool(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("temperature"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + temperature = null; + continue; + } + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolChoice = null; + continue; + } + toolChoice = RealtimeConversation.ConversationToolChoice.DeserializeConversationToolChoice(prop.Value, options); + continue; + } + if (prop.NameEquals("max_response_output_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + maxResponseOutputTokens = null; + continue; + } + maxResponseOutputTokens = RealtimeConversation.ConversationMaxTokensChoice.DeserializeConversationMaxTokensChoice(prop.Value, options); + continue; + } + if (prop.NameEquals("turn_detection"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + turnDetectionOptions = null; + continue; + } + turnDetectionOptions = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_transcription"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + inputTranscriptionOptions = null; + continue; + } + inputTranscriptionOptions = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationSessionOptions( + modalities ?? new ChangeTrackingList(), + voice, + instructions, + inputAudioFormat, + outputAudioFormat, + tools ?? new ChangeTrackingList(), + temperature, + model, + toolChoice, + maxResponseOutputTokens, + turnDetectionOptions, + inputTranscriptionOptions, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{options.Format}' format."); + } + } + + ConversationSessionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationSessionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationSessionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationSessionOptions conversationSessionOptions) + { + return BinaryContent.Create(conversationSessionOptions, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationSessionOptions(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationSessionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs new file mode 100644 index 000000000..2beda2388 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -0,0 +1,52 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionOptions + { + private protected IDictionary _additionalBinaryDataProperties; + + public ConversationSessionOptions() + { + Modalities = new ChangeTrackingList(); + Tools = new ChangeTrackingList(); + } + + internal ConversationSessionOptions(IList modalities, ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, string model, RealtimeConversation.ConversationToolChoice toolChoice, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IDictionary additionalBinaryDataProperties) + { + Modalities = modalities; + Voice = voice; + Instructions = instructions; + InputAudioFormat = inputAudioFormat; + OutputAudioFormat = outputAudioFormat; + Tools = tools; + Temperature = temperature; + Model = model; + ToolChoice = toolChoice; + MaxResponseOutputTokens = maxResponseOutputTokens; + TurnDetectionOptions = turnDetectionOptions; + InputTranscriptionOptions = inputTranscriptionOptions; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public IList Modalities { get; } + + public ConversationVoice? Voice { get; set; } + + public string Instructions { get; set; } + + public ConversationAudioFormat? InputAudioFormat { get; set; } + + public ConversationAudioFormat? OutputAudioFormat { get; set; } + + public IList Tools { get; } + + public float? Temperature { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs new file mode 100644 index 000000000..e267bb865 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionStartedUpdate : IJsonModel + { + internal ConversationSessionStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("session"u8); + writer.WriteObjectValue(Session, options); + } + + ConversationSessionStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationSessionStartedUpdate(document.RootElement, options); + } + + internal static ConversationSessionStartedUpdate DeserializeConversationSessionStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseSession session = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("session"u8)) + { + session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationSessionStartedUpdate(session, eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationSessionStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationSessionStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationSessionStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationSessionStartedUpdate conversationSessionStartedUpdate) + { + return BinaryContent.Create(conversationSessionStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationSessionStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationSessionStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs new file mode 100644 index 000000000..94a0bca3a --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationSessionStartedUpdate : ConversationUpdate + { + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession session, string eventId) : base(eventId) + { + Session = session; + } + + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession session, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + Session = session; + } + + public InternalRealtimeResponseSession Session { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationStatus.cs b/.dotnet/src/Generated/Models/ConversationStatus.cs new file mode 100644 index 000000000..8df01d529 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationStatus.cs @@ -0,0 +1,52 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationStatus : IEquatable + { + private readonly string _value; + private const string InProgressValue = "in_progress"; + private const string CompletedValue = "completed"; + private const string CancelledValue = "cancelled"; + private const string IncompleteValue = "incomplete"; + private const string FailedValue = "failed"; + + public ConversationStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationStatus InProgress { get; } = new ConversationStatus(InProgressValue); + + public static ConversationStatus Completed { get; } = new ConversationStatus(CompletedValue); + + public static ConversationStatus Cancelled { get; } = new ConversationStatus(CancelledValue); + + public static ConversationStatus Incomplete { get; } = new ConversationStatus(IncompleteValue); + + public static ConversationStatus Failed { get; } = new ConversationStatus(FailedValue); + + public static bool operator ==(ConversationStatus left, ConversationStatus right) => left.Equals(right); + + public static bool operator !=(ConversationStatus left, ConversationStatus right) => !left.Equals(right); + + public static implicit operator ConversationStatus(string value) => new ConversationStatus(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationStatus other && Equals(other); + + public bool Equals(ConversationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs new file mode 100644 index 000000000..7bfa9ea78 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTextDeltaUpdate : IJsonModel + { + internal ConversationTextDeltaUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); + } + + ConversationTextDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationTextDeltaUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationTextDeltaUpdate(document.RootElement, options); + } + + internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + string delta = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("delta"u8)) + { + delta = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationTextDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationTextDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationTextDeltaUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationTextDeltaUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationTextDeltaUpdate conversationTextDeltaUpdate) + { + return BinaryContent.Create(conversationTextDeltaUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationTextDeltaUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationTextDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs new file mode 100644 index 000000000..0829a98f6 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTextDeltaUpdate : ConversationUpdate + { + internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Delta = delta; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public string Delta { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs new file mode 100644 index 000000000..28f1a4b59 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTextDoneUpdate : IJsonModel + { + internal ConversationTextDoneUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + + ConversationTextDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationTextDoneUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationTextDoneUpdate(document.RootElement, options); + } + + internal static ConversationTextDoneUpdate DeserializeConversationTextDoneUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string responseId = default; + string itemId = default; + int outputIndex = default; + int contentIndex = default; + string value = default; + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + outputIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("value"u8)) + { + value = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationTextDoneUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + value, + eventId, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationTextDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationTextDoneUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationTextDoneUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationTextDoneUpdate conversationTextDoneUpdate) + { + return BinaryContent.Create(conversationTextDoneUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationTextDoneUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationTextDoneUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs new file mode 100644 index 000000000..c50394f13 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTextDoneUpdate : ConversationUpdate + { + internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId) : base(eventId) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Value = value; + } + + internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + ResponseId = responseId; + ItemId = itemId; + OutputIndex = outputIndex; + ContentIndex = contentIndex; + Value = value; + } + + public string ResponseId { get; set; } + + public string ItemId { get; set; } + + public int OutputIndex { get; set; } + + public int ContentIndex { get; set; } + + public string Value { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs new file mode 100644 index 000000000..e7d84e906 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -0,0 +1,172 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTokenUsage : IJsonModel + { + internal ConversationTokenUsage() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support writing '{format}' format."); + } + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + writer.WritePropertyName("input_tokens"u8); + writer.WriteNumberValue(InputTokens); + writer.WritePropertyName("output_tokens"u8); + writer.WriteNumberValue(OutputTokens); + writer.WritePropertyName("input_token_details"u8); + writer.WriteObjectValue(InputTokenDetails, options); + writer.WritePropertyName("output_token_details"u8); + writer.WriteObjectValue(OutputTokenDetails, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationTokenUsage(document.RootElement, options); + } + + internal static ConversationTokenUsage DeserializeConversationTokenUsage(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalTokens = default; + int inputTokens = default; + int outputTokens = default; + ConversationInputTokenUsageDetails inputTokenDetails = default; + ConversationOutputTokenUsageDetails outputTokenDetails = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("total_tokens"u8)) + { + totalTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("input_tokens"u8)) + { + inputTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("output_tokens"u8)) + { + outputTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("input_token_details"u8)) + { + inputTokenDetails = ConversationInputTokenUsageDetails.DeserializeConversationInputTokenUsageDetails(prop.Value, options); + continue; + } + if (prop.NameEquals("output_token_details"u8)) + { + outputTokenDetails = ConversationOutputTokenUsageDetails.DeserializeConversationOutputTokenUsageDetails(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationTokenUsage( + totalTokens, + inputTokens, + outputTokens, + inputTokenDetails, + outputTokenDetails, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support writing '{options.Format}' format."); + } + } + + ConversationTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationTokenUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationTokenUsage conversationTokenUsage) + { + return BinaryContent.Create(conversationTokenUsage, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationTokenUsage(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationTokenUsage(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs new file mode 100644 index 000000000..5df9d0d30 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationTokenUsage + { + private protected IDictionary _additionalBinaryDataProperties; + + internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails) + { + TotalTokens = totalTokens; + InputTokens = inputTokens; + OutputTokens = outputTokens; + InputTokenDetails = inputTokenDetails; + OutputTokenDetails = outputTokenDetails; + } + + internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails, IDictionary additionalBinaryDataProperties) + { + TotalTokens = totalTokens; + InputTokens = inputTokens; + OutputTokens = outputTokens; + InputTokenDetails = inputTokenDetails; + OutputTokenDetails = outputTokenDetails; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public int TotalTokens { get; set; } + + public int InputTokens { get; set; } + + public int OutputTokens { get; set; } + + public ConversationInputTokenUsageDetails InputTokenDetails { get; set; } + + public ConversationOutputTokenUsageDetails OutputTokenDetails { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs new file mode 100644 index 000000000..d4d55aa52 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -0,0 +1,128 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeTool))] + public abstract partial class ConversationTool : IJsonModel + { + internal ConversationTool() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteObjectValue(Kind, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationTool(document.RootElement, options); + } + + internal static ConversationTool DeserializeConversationTool(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "function": + return ConversationFunctionTool.DeserializeConversationFunctionTool(element, options); + } + } + return UnknownRealtimeTool.DeserializeUnknownRealtimeTool(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{options.Format}' format."); + } + } + + ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationTool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationTool conversationTool) + { + return BinaryContent.Create(conversationTool, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationTool(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationTool(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTool.cs b/.dotnet/src/Generated/Models/ConversationTool.cs new file mode 100644 index 000000000..5b87a5f3f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTool.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public abstract partial class ConversationTool + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationTool(ConversationToolKind kind) + { + Kind = kind; + } + + internal ConversationTool(ConversationToolKind kind, IDictionary additionalBinaryDataProperties) + { + Kind = kind; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs new file mode 100644 index 000000000..4d7f2010d --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationToolChoiceKind.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.RealtimeConversation +{ + internal static partial class ConversationToolChoiceKindExtensions + { + public static string ToSerialString(this RealtimeConversation.ConversationToolChoiceKind value) => value switch + { + RealtimeConversation.ConversationToolChoiceKind.Auto => "auto", + RealtimeConversation.ConversationToolChoiceKind.None => "none", + RealtimeConversation.ConversationToolChoiceKind.Required => "required", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationToolChoiceKind value.") + }; + + public static RealtimeConversation.ConversationToolChoiceKind ToConversationToolChoiceKind(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "auto")) + { + return RealtimeConversation.ConversationToolChoiceKind.Auto; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "none")) + { + return RealtimeConversation.ConversationToolChoiceKind.None; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "required")) + { + return RealtimeConversation.ConversationToolChoiceKind.Required; + } + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationToolChoiceKind value."); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationToolKind.cs b/.dotnet/src/Generated/Models/ConversationToolKind.cs new file mode 100644 index 000000000..e066cb56c --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationToolKind.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationToolKind : IEquatable + { + private readonly string _value; + private const string FunctionValue = "function"; + + public ConversationToolKind(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationToolKind Function { get; } = new ConversationToolKind(FunctionValue); + + public static bool operator ==(ConversationToolKind left, ConversationToolKind right) => left.Equals(right); + + public static bool operator !=(ConversationToolKind left, ConversationToolKind right) => !left.Equals(right); + + public static implicit operator ConversationToolKind(string value) => new ConversationToolKind(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationToolKind other && Equals(other); + + public bool Equals(ConversationToolKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs b/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs new file mode 100644 index 000000000..7150e400b --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationTranscriptionModel : IEquatable + { + private readonly string _value; + private const string Whisper1Value = "whisper-1"; + + public ConversationTranscriptionModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationTranscriptionModel Whisper1 { get; } = new ConversationTranscriptionModel(Whisper1Value); + + public static bool operator ==(ConversationTranscriptionModel left, ConversationTranscriptionModel right) => left.Equals(right); + + public static bool operator !=(ConversationTranscriptionModel left, ConversationTranscriptionModel right) => !left.Equals(right); + + public static implicit operator ConversationTranscriptionModel(string value) => new ConversationTranscriptionModel(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationTranscriptionModel other && Equals(other); + + public bool Equals(ConversationTranscriptionModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs new file mode 100644 index 000000000..fd991f4c0 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionKind.Serialization.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.RealtimeConversation +{ + internal static partial class ConversationTurnDetectionKindExtensions + { + public static string ToSerialString(this RealtimeConversation.ConversationTurnDetectionKind value) => value switch + { + RealtimeConversation.ConversationTurnDetectionKind.ServerVoiceActivityDetection => "server_vad", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationTurnDetectionKind value.") + }; + + public static RealtimeConversation.ConversationTurnDetectionKind ToConversationTurnDetectionKind(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "server_vad")) + { + return RealtimeConversation.ConversationTurnDetectionKind.ServerVoiceActivityDetection; + } + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationTurnDetectionKind value."); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs new file mode 100644 index 000000000..bc7a9e67f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -0,0 +1,111 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeTurnDetection))] + public abstract partial class ConversationTurnDetectionOptions : IJsonModel + { + internal ConversationTurnDetectionOptions() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteNumberValue((int)Kind); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationTurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(document.RootElement, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{options.Format}' format."); + } + } + + ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationTurnDetectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationTurnDetectionOptions conversationTurnDetectionOptions) + { + return BinaryContent.Create(conversationTurnDetectionOptions, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationTurnDetectionOptions(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs new file mode 100644 index 000000000..c99070e9e --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public abstract partial class ConversationTurnDetectionOptions + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind) + { + Kind = kind; + } + + internal ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind, IDictionary additionalBinaryDataProperties) + { + Kind = kind; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs new file mode 100644 index 000000000..f5c34002f --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -0,0 +1,189 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeResponseCommand))] + public abstract partial class ConversationUpdate : IJsonModel + { + internal ConversationUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{format}' format."); + } + if (EventId != null) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + else + { + writer.WriteNull("eventId"u8); + } + writer.WritePropertyName("type"u8); + writer.WriteNumberValue((int)Kind); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationUpdate(document.RootElement, options); + } + + internal static ConversationUpdate DeserializeConversationUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "session.created": + return ConversationSessionStartedUpdate.DeserializeConversationSessionStartedUpdate(element, options); + case "session.updated": + return ConversationSessionConfiguredUpdate.DeserializeConversationSessionConfiguredUpdate(element, options); + case "conversation.item.created": + return ConversationItemAcknowledgedUpdate.DeserializeConversationItemAcknowledgedUpdate(element, options); + case "conversation.item.deleted": + return ConversationItemDeletedUpdate.DeserializeConversationItemDeletedUpdate(element, options); + case "conversation.item.truncated": + return ConversationItemTruncatedUpdate.DeserializeConversationItemTruncatedUpdate(element, options); + case "response.created": + return ConversationResponseStartedUpdate.DeserializeConversationResponseStartedUpdate(element, options); + case "response.done": + return ConversationResponseFinishedUpdate.DeserializeConversationResponseFinishedUpdate(element, options); + case "rate_limits.updated": + return ConversationRateLimitsUpdatedUpdate.DeserializeConversationRateLimitsUpdatedUpdate(element, options); + case "response.output_item.added": + return ConversationItemStartedUpdate.DeserializeConversationItemStartedUpdate(element, options); + case "response.output_item.done": + return ConversationItemFinishedUpdate.DeserializeConversationItemFinishedUpdate(element, options); + case "response.content_part.added": + return ConversationContentPartStartedUpdate.DeserializeConversationContentPartStartedUpdate(element, options); + case "response.content_part.done": + return ConversationContentPartFinishedUpdate.DeserializeConversationContentPartFinishedUpdate(element, options); + case "response.audio.delta": + return ConversationAudioDeltaUpdate.DeserializeConversationAudioDeltaUpdate(element, options); + case "response.audio.done": + return ConversationAudioDoneUpdate.DeserializeConversationAudioDoneUpdate(element, options); + case "response.audio_transcript.delta": + return ConversationOutputTranscriptionDeltaUpdate.DeserializeConversationOutputTranscriptionDeltaUpdate(element, options); + case "response.audio_transcript.done": + return ConversationOutputTranscriptionFinishedUpdate.DeserializeConversationOutputTranscriptionFinishedUpdate(element, options); + case "response.text.delta": + return ConversationTextDeltaUpdate.DeserializeConversationTextDeltaUpdate(element, options); + case "response.text.done": + return ConversationTextDoneUpdate.DeserializeConversationTextDoneUpdate(element, options); + case "response.function_call_arguments.delta": + return ConversationFunctionCallArgumentsDeltaUpdate.DeserializeConversationFunctionCallArgumentsDeltaUpdate(element, options); + case "response.function_call_arguments.done": + return ConversationFunctionCallArgumentsDoneUpdate.DeserializeConversationFunctionCallArgumentsDoneUpdate(element, options); + case "input_audio_buffer.speech_started": + return ConversationInputSpeechStartedUpdate.DeserializeConversationInputSpeechStartedUpdate(element, options); + case "input_audio_buffer.speech_stopped": + return ConversationInputSpeechFinishedUpdate.DeserializeConversationInputSpeechFinishedUpdate(element, options); + case "conversation.item.input_audio_transcription.completed": + return ConversationInputTranscriptionFinishedUpdate.DeserializeConversationInputTranscriptionFinishedUpdate(element, options); + case "conversation.item.input_audio_transcription.failed": + return ConversationInputTranscriptionFailedUpdate.DeserializeConversationInputTranscriptionFailedUpdate(element, options); + case "input_audio_buffer.committed": + return ConversationInputAudioBufferCommittedUpdate.DeserializeConversationInputAudioBufferCommittedUpdate(element, options); + case "input_audio_buffer.cleared": + return ConversationInputAudioBufferClearedUpdate.DeserializeConversationInputAudioBufferClearedUpdate(element, options); + case "error": + return ConversationErrorUpdate.DeserializeConversationErrorUpdate(element, options); + } + } + return UnknownRealtimeResponseCommand.DeserializeUnknownRealtimeResponseCommand(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationUpdate conversationUpdate) + { + return BinaryContent.Create(conversationUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs new file mode 100644 index 000000000..5703c2ab0 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + public abstract partial class ConversationUpdate + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) + { + EventId = eventId; + Kind = kind; + } + + internal ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) + { + EventId = eventId; + Kind = kind; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string EventId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs new file mode 100644 index 000000000..9a8a2639b --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs @@ -0,0 +1,156 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.RealtimeConversation +{ + internal static partial class ConversationUpdateKindExtensions + { + public static string ToSerialString(this RealtimeConversation.ConversationUpdateKind value) => value switch + { + RealtimeConversation.ConversationUpdateKind.SessionStarted => "session.created", + RealtimeConversation.ConversationUpdateKind.SessionConfigured => "session.updated", + RealtimeConversation.ConversationUpdateKind.ItemAcknowledged => "conversation.item.created", + RealtimeConversation.ConversationUpdateKind.ItemDeleted => "conversation.item.deleted", + RealtimeConversation.ConversationUpdateKind.ItemTruncated => "conversation.item.truncated", + RealtimeConversation.ConversationUpdateKind.ResponseStarted => "response.created", + RealtimeConversation.ConversationUpdateKind.ResponseFinished => "response.done", + RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated => "rate_limits.updated", + RealtimeConversation.ConversationUpdateKind.ItemStarted => "response.output_item.added", + RealtimeConversation.ConversationUpdateKind.ItemFinished => "response.output_item.done", + RealtimeConversation.ConversationUpdateKind.ContentPartStarted => "response.content_part.added", + RealtimeConversation.ConversationUpdateKind.ContentPartFinished => "response.content_part.done", + RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta => "response.audio.delta", + RealtimeConversation.ConversationUpdateKind.ResponseAudioDone => "response.audio.done", + RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta => "response.audio_transcript.delta", + RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone => "response.audio_transcript.done", + RealtimeConversation.ConversationUpdateKind.ResponseTextDelta => "response.text.delta", + RealtimeConversation.ConversationUpdateKind.ResponseTextDone => "response.text.done", + RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta", + RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done", + RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted => "input_audio_buffer.speech_started", + RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped => "input_audio_buffer.speech_stopped", + RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted => "conversation.item.input_audio_transcription.completed", + RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed => "conversation.item.input_audio_transcription.failed", + RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted => "input_audio_buffer.committed", + RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared => "input_audio_buffer.cleared", + RealtimeConversation.ConversationUpdateKind.Error => "error", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value.") + }; + + public static RealtimeConversation.ConversationUpdateKind ToConversationUpdateKind(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.created")) + { + return RealtimeConversation.ConversationUpdateKind.SessionStarted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.updated")) + { + return RealtimeConversation.ConversationUpdateKind.SessionConfigured; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.created")) + { + return RealtimeConversation.ConversationUpdateKind.ItemAcknowledged; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.deleted")) + { + return RealtimeConversation.ConversationUpdateKind.ItemDeleted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.truncated")) + { + return RealtimeConversation.ConversationUpdateKind.ItemTruncated; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.created")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseStarted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.done")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseFinished; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "rate_limits.updated")) + { + return RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.added")) + { + return RealtimeConversation.ConversationUpdateKind.ItemStarted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.done")) + { + return RealtimeConversation.ConversationUpdateKind.ItemFinished; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.added")) + { + return RealtimeConversation.ConversationUpdateKind.ContentPartStarted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.done")) + { + return RealtimeConversation.ConversationUpdateKind.ContentPartFinished; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.delta")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.done")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseAudioDone; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.delta")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.done")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.delta")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseTextDelta; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.done")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseTextDone; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.delta")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.done")) + { + return RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_started")) + { + return RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_stopped")) + { + return RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.completed")) + { + return RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.failed")) + { + return RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.committed")) + { + return RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.cleared")) + { + return RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) + { + return RealtimeConversation.ConversationUpdateKind.Error; + } + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value."); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationVoice.cs b/.dotnet/src/Generated/Models/ConversationVoice.cs new file mode 100644 index 000000000..541f187e3 --- /dev/null +++ b/.dotnet/src/Generated/Models/ConversationVoice.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public readonly partial struct ConversationVoice : IEquatable + { + private readonly string _value; + private const string AlloyValue = "alloy"; + private const string ShimmerValue = "shimmer"; + private const string EchoValue = "echo"; + + public ConversationVoice(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static ConversationVoice Alloy { get; } = new ConversationVoice(AlloyValue); + + public static ConversationVoice Shimmer { get; } = new ConversationVoice(ShimmerValue); + + public static ConversationVoice Echo { get; } = new ConversationVoice(EchoValue); + + public static bool operator ==(ConversationVoice left, ConversationVoice right) => left.Equals(right); + + public static bool operator !=(ConversationVoice left, ConversationVoice right) => !left.Equals(right); + + public static implicit operator ConversationVoice(string value) => new ConversationVoice(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationVoice other && Equals(other); + + public bool Equals(ConversationVoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 76259c08e..419c295e3 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -32,6 +32,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("dimensions"u8); writer.WriteNumberValue(Dimensions.Value); } + writer.WritePropertyName("input"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Input); +#else + using (JsonDocument document = JsonDocument.Parse(Input)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("model"u8); + writer.WriteObjectValue(Model, options); + if (Optional.IsDefined(EncodingFormat)) + { + writer.WritePropertyName("encoding_format"u8); + writer.WriteObjectValue?>(EncodingFormat, options); + } if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); @@ -74,6 +90,9 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions return null; } int? dimensions = default; + BinaryData input = default; + InternalCreateEmbeddingRequestModel model = default; + Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -88,8 +107,33 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions dimensions = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("input"u8)) + { + input = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("model"u8)) + { + model = InternalCreateEmbeddingRequestModel.DeserializeInternalCreateEmbeddingRequestModel(prop.Value, options); + continue; + } + if (prop.NameEquals("encoding_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + encodingFormat = null; + continue; + } + encodingFormat = Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat?.DeserializeOpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat(prop.Value, options); + continue; + } if (prop.NameEquals("user"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + endUserId = null; + continue; + } endUserId = prop.Value.GetString(); continue; } @@ -98,7 +142,13 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new EmbeddingGenerationOptions(dimensions, endUserId, additionalBinaryDataProperties); + return new EmbeddingGenerationOptions( + dimensions, + input, + model, + encodingFormat, + endUserId, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index 012ffd763..bbf81d1ec 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -11,9 +11,12 @@ public partial class EmbeddingGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingGenerationOptions(int? dimensions, string endUserId, IDictionary additionalBinaryDataProperties) + internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalCreateEmbeddingRequestModel model, Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Dimensions = dimensions; + Input = input; + Model = model; + EncodingFormat = encodingFormat; EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 73aacc5f2..30135303e 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -32,6 +32,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ranker"u8); writer.WriteStringValue(Ranker.Value.ToString()); } + writer.WritePropertyName("score_threshold"u8); + writer.WriteNumberValue(ScoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -69,6 +71,7 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso return null; } FileSearchRanker? ranker = default; + float scoreThreshold = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -82,12 +85,17 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso ranker = new FileSearchRanker(prop.Value.GetString()); continue; } + if (prop.NameEquals("score_threshold"u8)) + { + scoreThreshold = prop.Value.GetSingle(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileSearchRankingOptions(ranker, additionalBinaryDataProperties); + return new FileSearchRankingOptions(ranker, scoreThreshold, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs index bd4061f3f..efa44ca02 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs @@ -11,12 +11,6 @@ public partial class FileSearchRankingOptions { private protected IDictionary _additionalBinaryDataProperties; - internal FileSearchRankingOptions(FileSearchRanker? ranker, IDictionary additionalBinaryDataProperties) - { - Ranker = ranker; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - public FileSearchRanker? Ranker { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index 8b65b745e..6c8016959 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -45,12 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsCollectionDefined(NewVectorStores)) { writer.WritePropertyName("vector_stores"u8); - writer.WriteStartArray(); - foreach (VectorStoreCreationHelper item in NewVectorStores) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + this.SerializeNewVectorStores(writer, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index cb9cffa9b..ed6755886 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -13,6 +13,10 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters : IJsonModel, IJsonModel { + public FineTuningJobHyperparameters() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -27,6 +31,33 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningJobHyperparameters)} does not support writing '{format}' format."); } + writer.WritePropertyName("n_epochs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(NEpochs); +#else + using (JsonDocument document = JsonDocument.Parse(NEpochs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("batch_size"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(BatchSize); +#else + using (JsonDocument document = JsonDocument.Parse(BatchSize)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("learning_rate_multiplier"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(LearningRateMultiplier); +#else + using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +94,33 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame { return null; } + BinaryData nEpochs = default; + BinaryData batchSize = default; + BinaryData learningRateMultiplier = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("n_epochs"u8)) + { + nEpochs = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("batch_size"u8)) + { + batchSize = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("learning_rate_multiplier"u8)) + { + learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FineTuningJobHyperparameters(additionalBinaryDataProperties); + return new FineTuningJobHyperparameters(nEpochs, batchSize, learningRateMultiplier, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 2a3242d7a..913a36676 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -11,12 +11,18 @@ internal readonly partial struct FineTuningJobHyperparameters { private protected IDictionary _additionalBinaryDataProperties; - internal FineTuningJobHyperparameters() + internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) { + NEpochs = nEpochs; + BatchSize = batchSize; + LearningRateMultiplier = learningRateMultiplier; } - internal FineTuningJobHyperparameters(IDictionary additionalBinaryDataProperties) + internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier, IDictionary additionalBinaryDataProperties) { + NEpochs = nEpochs; + BatchSize = batchSize; + LearningRateMultiplier = learningRateMultiplier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index c0febdf22..28aeb21f1 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(ImageBytes)) { writer.WritePropertyName("b64_json"u8); - writer.WriteObjectValue(ImageBytes, options); + writer.WriteBase64StringValue(ImageBytes.ToArray(), "D"); } if (Optional.IsDefined(ImageUri)) { @@ -98,15 +98,17 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { + imageBytes = null; continue; } - imageBytes = BinaryData.DeserializeBinaryData(prop.Value, options); + imageBytes = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } if (prop.NameEquals("url"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + imageUri = null; continue; } imageUri = Uri.DeserializeUri(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index 766370b4c..8e9033763 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -27,6 +27,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteObjectValue?>(Model, options); + } + else + { + writer.WriteNull("model"u8); + } + } + writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + if (Optional.IsDefined(Mask)) + { + writer.WritePropertyName("mask"u8); + writer.WriteBase64StringValue(Mask.ToArray(), "D"); + } + if (Optional.IsDefined(N)) + { + if (N != null) + { + writer.WritePropertyName("n"u8); + writer.WriteNumberValue(N.Value); + } + else + { + writer.WriteNull("n"u8); + } + } if (Optional.IsDefined(Size)) { if (Size != null) @@ -92,12 +125,57 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element { return null; } + Images.OpenAI.Images.InternalCreateImageEditRequestModel? model = default; + BinaryData image = default; + string prompt = default; + BinaryData mask = default; + long? n = default; Images.OpenAI.Images.GeneratedImageSize? size = default; Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = Images.OpenAI.Images.InternalCreateImageEditRequestModel?.DeserializeOpenAI.Images.InternalCreateImageEditRequestModel(prop.Value, options); + continue; + } + if (prop.NameEquals("image"u8)) + { + image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("prompt"u8)) + { + prompt = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("mask"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + mask = null; + continue; + } + mask = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("n"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + n = null; + continue; + } + n = prop.Value.GetInt64(); + continue; + } if (prop.NameEquals("size"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -120,6 +198,11 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element } if (prop.NameEquals("user"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + endUserId = null; + continue; + } endUserId = prop.Value.GetString(); continue; } @@ -128,7 +211,16 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ImageEditOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); + return new ImageEditOptions( + model, + image, + prompt, + mask, + n, + size, + responseFormat, + endUserId, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index 84862bb3d..fcc652437 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -11,8 +11,13 @@ public partial class ImageEditOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageEditOptions(Images.OpenAI.Images.InternalCreateImageEditRequestModel? model, BinaryData image, string prompt, BinaryData mask, long? n, Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { + Model = model; + Image = image; + Prompt = prompt; + Mask = mask; + N = n; Size = size; ResponseFormat = responseFormat; EndUserId = endUserId; diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index 7e7f1d014..f4b08a309 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -68,6 +68,32 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("style"u8); } } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteObjectValue?>(Model, options); + } + else + { + writer.WriteNull("model"u8); + } + } + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + if (Optional.IsDefined(N)) + { + if (N != null) + { + writer.WritePropertyName("n"u8); + writer.WriteNumberValue(N.Value); + } + else + { + writer.WriteNull("n"u8); + } + } if (Optional.IsDefined(EndUserId)) { writer.WritePropertyName("user"u8); @@ -113,6 +139,9 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle GeneratedImageFormat? responseFormat = default; GeneratedImageSize? size = default; GeneratedImageStyle? style = default; + Images.OpenAI.Images.InternalCreateImageRequestModel? model = default; + string prompt = default; + long? n = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -157,8 +186,38 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle style = new GeneratedImageStyle(prop.Value.GetString()); continue; } + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = Images.OpenAI.Images.InternalCreateImageRequestModel?.DeserializeOpenAI.Images.InternalCreateImageRequestModel(prop.Value, options); + continue; + } + if (prop.NameEquals("prompt"u8)) + { + prompt = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("n"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + n = null; + continue; + } + n = prop.Value.GetInt64(); + continue; + } if (prop.NameEquals("user"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + endUserId = null; + continue; + } endUserId = prop.Value.GetString(); continue; } @@ -172,6 +231,9 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle responseFormat, size, style, + model, + prompt, + n, endUserId, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index 3fe9fc4f1..1c1ea5ed2 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -11,12 +11,15 @@ public partial class ImageGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, Images.OpenAI.Images.InternalCreateImageRequestModel? model, string prompt, long? n, string endUserId, IDictionary additionalBinaryDataProperties) { Quality = quality; ResponseFormat = responseFormat; Size = size; Style = style; + Model = model; + Prompt = prompt; + N = n; EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 2615a1869..cc68e6e51 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -27,6 +27,32 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteObjectValue?>(Model, options); + } + else + { + writer.WriteNull("model"u8); + } + } + writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); + if (Optional.IsDefined(N)) + { + if (N != null) + { + writer.WritePropertyName("n"u8); + writer.WriteNumberValue(N.Value); + } + else + { + writer.WriteNull("n"u8); + } + } if (Optional.IsDefined(Size)) { if (Size != null) @@ -92,12 +118,40 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme { return null; } + Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model = default; + BinaryData image = default; + long? n = default; Images.OpenAI.Images.GeneratedImageSize? size = default; Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = Images.OpenAI.Images.InternalCreateImageVariationRequestModel?.DeserializeOpenAI.Images.InternalCreateImageVariationRequestModel(prop.Value, options); + continue; + } + if (prop.NameEquals("image"u8)) + { + image = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("n"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + n = null; + continue; + } + n = prop.Value.GetInt64(); + continue; + } if (prop.NameEquals("size"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -120,6 +174,11 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme } if (prop.NameEquals("user"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + endUserId = null; + continue; + } endUserId = prop.Value.GetString(); continue; } @@ -128,7 +187,14 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ImageVariationOptions(size, responseFormat, endUserId, additionalBinaryDataProperties); + return new ImageVariationOptions( + model, + image, + n, + size, + responseFormat, + endUserId, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index ac34eb96f..9e607db30 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -11,8 +11,11 @@ public partial class ImageVariationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageVariationOptions(Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model, BinaryData image, long? n, Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { + Model = model; + Image = image; + N = n; Size = size; ResponseFormat = responseFormat; EndUserId = endUserId; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index 5028ff4e7..d1d789285 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -32,6 +32,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } + if (Optional.IsDefined(Arguments)) + { + writer.WritePropertyName("arguments"u8); + this.SerializeArgumentsValue(writer, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -69,6 +74,7 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn return null; } string name = default; + BinaryData arguments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -82,12 +88,22 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn name = prop.Value.GetString(); continue; } + if (prop.NameEquals("arguments"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + arguments = null; + continue; + } + DeserializeArgumentsValue(prop, ref arguments); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalChatCompletionMessageToolCallChunkFunction(name, additionalBinaryDataProperties); + return new InternalChatCompletionMessageToolCallChunkFunction(name, arguments, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index 327b92396..2fc7e03f0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -15,9 +15,10 @@ internal InternalChatCompletionMessageToolCallChunkFunction() { } - internal InternalChatCompletionMessageToolCallChunkFunction(string name, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionMessageToolCallChunkFunction(string name, BinaryData arguments, IDictionary additionalBinaryDataProperties) { Name = name; + Arguments = arguments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index b61646930..e62dab204 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -33,6 +33,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + this.SerializeArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -70,6 +72,7 @@ internal static InternalChatCompletionMessageToolCallFunction DeserializeInterna return null; } string name = default; + BinaryData arguments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -78,12 +81,17 @@ internal static InternalChatCompletionMessageToolCallFunction DeserializeInterna name = prop.Value.GetString(); continue; } + if (prop.NameEquals("arguments"u8)) + { + DeserializeArgumentsValue(prop, ref arguments); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalChatCompletionMessageToolCallFunction(name, additionalBinaryDataProperties); + return new InternalChatCompletionMessageToolCallFunction(name, arguments, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs index c3f2f0500..7e8c4b4d6 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs @@ -12,16 +12,19 @@ internal partial class InternalChatCompletionMessageToolCallFunction { private protected IDictionary _additionalBinaryDataProperties; - public InternalChatCompletionMessageToolCallFunction(string name) + public InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments) { Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(arguments, nameof(arguments)); Name = name; + Arguments = arguments; } - internal InternalChatCompletionMessageToolCallFunction(string name, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments, IDictionary additionalBinaryDataProperties) { Name = name; + Arguments = arguments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 647fe2493..4389bf944 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -55,7 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Content != null) { writer.WritePropertyName("content"u8); - writer.WriteObjectValue(Content, options); + this.SerializeContentValue(writer, options); } else { @@ -105,7 +105,7 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom string refusal = default; IList toolCalls = default; Chat.ChatMessageRole role = default; - Chat.ChatMessageContent content = default; + ChatMessageContent content = default; ChatFunctionCall functionCall = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -141,13 +141,14 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom } if (prop.NameEquals("content"u8)) { - content = Chat.ChatMessageContent.DeserializeChatMessageContent(prop.Value, options); + DeserializeContentValue(prop, ref content); continue; } if (prop.NameEquals("function_call"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + functionCall = null; continue; } functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index a870f2607..f2ccf0c2c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -12,7 +12,7 @@ internal partial class InternalChatCompletionResponseMessage { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageRole role, Chat.ChatMessageContent content) + internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageRole role, ChatMessageContent content) { Refusal = refusal; ToolCalls = new ChangeTrackingList(); @@ -20,7 +20,7 @@ internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageR Content = content; } - internal InternalChatCompletionResponseMessage(string refusal, IList toolCalls, Chat.ChatMessageRole role, Chat.ChatMessageContent content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionResponseMessage(string refusal, IList toolCalls, Chat.ChatMessageRole role, ChatMessageContent content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) { Refusal = refusal; ToolCalls = toolCalls; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index b9fe1e71f..67c66454f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -31,10 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,19 +71,19 @@ internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInt { return null; } - string arguments = default; string name = default; + string arguments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("arguments"u8)) + if (prop.NameEquals("name"u8)) { - arguments = prop.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (prop.NameEquals("name"u8)) + if (prop.NameEquals("arguments"u8)) { - name = prop.Value.GetString(); + arguments = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -91,7 +91,7 @@ internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalChatCompletionResponseMessageFunctionCall(arguments, name, additionalBinaryDataProperties); + return new InternalChatCompletionResponseMessageFunctionCall(name, arguments, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index 657e6543e..70fd03ad0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -11,21 +11,21 @@ internal partial class InternalChatCompletionResponseMessageFunctionCall { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name) + internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments) { - Arguments = arguments; Name = name; + Arguments = arguments; } - internal InternalChatCompletionResponseMessageFunctionCall(string arguments, string name, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments, IDictionary additionalBinaryDataProperties) { - Arguments = arguments; Name = name; + Arguments = arguments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Arguments { get; set; } - public string Name { get; set; } + + public string Arguments { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index cb750960b..954b2bb29 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Content != null) { writer.WritePropertyName("content"u8); - writer.WriteObjectValue(Content, options); + this.SerializeContentValue(writer, options); } else { @@ -111,7 +111,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha IList toolCalls = default; string refusal = default; Chat.OpenAI.Chat.ChatMessageRole? role = default; - Chat.ChatMessageContent content = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -163,9 +163,10 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha { if (prop.Value.ValueKind == JsonValueKind.Null) { + content = null; continue; } - content = Chat.ChatMessageContent.DeserializeChatMessageContent(prop.Value, options); + DeserializeContentValue(prop, ref content); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index bfa229436..5d3ed0759 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -11,7 +11,7 @@ internal partial class InternalChatCompletionStreamResponseDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.OpenAI.Chat.ChatMessageRole? role, Chat.ChatMessageContent content, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.OpenAI.Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { FunctionCall = functionCall; ToolCalls = toolCalls; diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index a14cba4f2..16ce1aa96 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -167,6 +167,54 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"u8); + } + } + if (Optional.IsDefined(ToolResources)) + { + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); + } + else + { + writer.WriteNull("toolResources"u8); + } + } + if (Optional.IsDefined(ResponseFormat)) + { + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } + } + if (Optional.IsDefined(ToolChoice)) + { + if (ToolChoice != null) + { + writer.WritePropertyName("tool_choice"u8); + writer.WriteObjectValue(ToolChoice, options); + } + else + { + writer.WriteNull("toolChoice"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -215,6 +263,10 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea int? maxCompletionTokens = default; RunTruncationStrategy truncationStrategy = default; bool? parallelToolCalls = default; + string model = default; + ToolResources toolResources = default; + AssistantResponseFormat responseFormat = default; + ToolConstraint toolChoice = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -348,6 +400,46 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea parallelToolCalls = prop.Value.GetBoolean(); continue; } + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("tool_resources"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolResources = null; + continue; + } + toolResources = ToolResources.DeserializeToolResources(prop.Value, options); + continue; + } + if (prop.NameEquals("response_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + responseFormat = null; + continue; + } + responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolChoice = null; + continue; + } + toolChoice = ToolConstraint.DeserializeToolConstraint(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -366,6 +458,10 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea maxCompletionTokens, truncationStrategy, parallelToolCalls, + model, + toolResources, + responseFormat, + toolChoice, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index c6ef37c23..8fe840901 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -21,7 +21,7 @@ public InternalCreateThreadAndRunRequest(string assistantId) Metadata = new ChangeTrackingDictionary(); } - internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, string instructions, IList tools, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, bool? parallelToolCalls, IDictionary additionalBinaryDataProperties) + internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOptions thread, string instructions, IList tools, IDictionary metadata, float? temperature, float? topP, bool? stream, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, bool? parallelToolCalls, string model, ToolResources toolResources, AssistantResponseFormat responseFormat, ToolConstraint toolChoice, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Thread = thread; @@ -35,6 +35,10 @@ internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOpt MaxCompletionTokens = maxCompletionTokens; TruncationStrategy = truncationStrategy; ParallelToolCalls = parallelToolCalls; + Model = model; + ToolResources = toolResources; + ResponseFormat = responseFormat; + ToolChoice = toolChoice; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index e3bbd91b5..2b249b674 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -88,6 +88,7 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe { if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index 1824fdfe7..a2768cf93 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -6,6 +6,7 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.IO; using System.Text.Json; using OpenAI; @@ -27,6 +28,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support writing '{format}' format."); } + writer.WritePropertyName("file"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(global::System.BinaryData.FromStream(File)); +#else + using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(File))) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("purpose"u8); + writer.WriteObjectValue(Purpose, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +75,27 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J { return null; } + Stream @file = default; + FileUploadPurpose purpose = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("file"u8)) + { + @file = BinaryData.FromString(prop.Value.GetRawText()).ToStream(); + continue; + } + if (prop.NameEquals("purpose"u8)) + { + purpose = FileUploadPurpose.DeserializeFileUploadPurpose(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalFileUploadOptions(additionalBinaryDataProperties); + return new InternalFileUploadOptions(@file, purpose, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs index 2909fd343..f846811f5 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.IO; namespace OpenAI.Files { @@ -11,8 +12,10 @@ internal partial class InternalFileUploadOptions { private protected IDictionary _additionalBinaryDataProperties; - internal InternalFileUploadOptions(IDictionary additionalBinaryDataProperties) + internal InternalFileUploadOptions(Stream @file, FileUploadPurpose purpose, IDictionary additionalBinaryDataProperties) { + File = @file; + Purpose = purpose; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index f472ace9c..4c10238a0 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -29,21 +29,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalFineTuneChatCompletionRequestAssistantMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } } InternalFineTuneChatCompletionRequestAssistantMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuneChatCompletionRequestAssistantMessage)JsonModelCreateCore(ref reader, options); @@ -69,9 +54,9 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ string refusal = default; string participantName = default; IList toolCalls = default; + ChatFunctionCall functionCall = default; Chat.ChatMessageRole role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - IDictionary additionalBinaryDataProperties0 = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("content"u8)) @@ -96,6 +81,11 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (prop.NameEquals("name"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + participantName = null; + continue; + } participantName = prop.Value.GetString(); continue; } @@ -113,6 +103,16 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ toolCalls = array; continue; } + if (prop.NameEquals("function_call"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionCall = null; + continue; + } + functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); + continue; + } if (prop.NameEquals("role"u8)) { role = prop.Value.GetInt32().ToChatMessageRole(); @@ -120,7 +120,7 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (options.Format != "W") { - additionalBinaryDataProperties0.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalFineTuneChatCompletionRequestAssistantMessage( @@ -128,9 +128,9 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ refusal, participantName, toolCalls ?? new ChangeTrackingList(), + functionCall, role, - additionalBinaryDataProperties, - additionalBinaryDataProperties0); + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index b34062bc1..d0dd1e1b4 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -10,15 +10,12 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuneChatCompletionRequestAssistantMessage : AssistantChatMessage { - private protected IDictionary _additionalBinaryDataProperties; - public InternalFineTuneChatCompletionRequestAssistantMessage() { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string participantName, IList toolCalls, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties, IDictionary additionalBinaryDataProperties0) : base(content, refusal, participantName, toolCalls, role, additionalBinaryDataProperties) + internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(content, refusal, participantName, toolCalls, functionCall, role, additionalBinaryDataProperties) { - _additionalBinaryDataProperties = additionalBinaryDataProperties0; } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index 153c420f5..284593b64 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -7,7 +7,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using OpenAI.Chat; namespace OpenAI { @@ -38,11 +37,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(Parameters, options); - } if (Optional.IsDefined(Strict)) { if (Strict != null) @@ -55,6 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("strict"u8); } } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Parameters); +#else + using (JsonDocument document = JsonDocument.Parse(Parameters)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -93,8 +99,8 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition } string description = default; string name = default; - InternalFunctionParameters parameters = default; bool? strict = default; + BinaryData parameters = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -113,24 +119,24 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition name = prop.Value.GetString(); continue; } - if (prop.NameEquals("parameters"u8)) + if (prop.NameEquals("strict"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - parameters = null; + strict = null; continue; } - parameters = InternalFunctionParameters.DeserializeInternalFunctionParameters(prop.Value, options); + strict = prop.Value.GetBoolean(); continue; } - if (prop.NameEquals("strict"u8)) + if (prop.NameEquals("parameters"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - strict = null; + parameters = null; continue; } - strict = prop.Value.GetBoolean(); + parameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") @@ -138,7 +144,7 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalFunctionDefinition(description, name, parameters, strict, additionalBinaryDataProperties); + return new InternalFunctionDefinition(description, name, strict, parameters, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs index aace672a8..a2241d88b 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using OpenAI.Chat; namespace OpenAI { @@ -19,12 +18,12 @@ public InternalFunctionDefinition(string name) Name = name; } - internal InternalFunctionDefinition(string description, string name, InternalFunctionParameters parameters, bool? strict, IDictionary additionalBinaryDataProperties) + internal InternalFunctionDefinition(string description, string name, bool? strict, BinaryData parameters, IDictionary additionalBinaryDataProperties) { Description = description; Name = name; - Parameters = parameters; Strict = strict; + Parameters = parameters; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -32,8 +31,6 @@ internal InternalFunctionDefinition(string description, string name, InternalFun public string Name { get; set; } - public InternalFunctionParameters Parameters { get; set; } - public bool? Strict { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 71d4719a2..6d747ac88 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -86,6 +86,11 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal } if (prop.NameEquals("detail"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index 3c411ce98..212e1dddb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -86,6 +86,11 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna } if (prop.NameEquals("detail"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index 40a9c09d1..d1cd16c04 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -90,6 +90,11 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI } if (prop.NameEquals("detail"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index e7d64dbfc..5ce2257e0 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -90,6 +90,11 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt } if (prop.NameEquals("detail"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + detail = null; + continue; + } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 968216ef4..9c0137a68 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -98,6 +98,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO { if (prop.Value.ValueKind == JsonValueKind.Null) { + role = null; continue; } role = prop.Value.GetInt32().ToMessageRole(); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs new file mode 100644 index 000000000..f906c9bf4 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -0,0 +1,170 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestAssistantMessageItem : IJsonModel + { + internal InternalRealtimeRequestAssistantMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + + InternalRealtimeRequestAssistantMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestAssistantMessageItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalRealtimeRequestAssistantMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList content = default; + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; + continue; + } + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestAssistantMessageItem( + content, + role, + status, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestAssistantMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestAssistantMessageItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestAssistantMessageItem internalRealtimeRequestAssistantMessageItem) + { + return BinaryContent.Create(internalRealtimeRequestAssistantMessageItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestAssistantMessageItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestAssistantMessageItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs new file mode 100644 index 000000000..8c669e152 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestAssistantMessageItem : InternalRealtimeRequestMessageItem + { + public InternalRealtimeRequestAssistantMessageItem(IEnumerable content) : base(ConversationMessageRole.Assistant) + { + Argument.AssertNotNull(content, nameof(content)); + + Content = content.ToList(); + } + + internal InternalRealtimeRequestAssistantMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + { + Content = content; + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs new file mode 100644 index 000000000..2676796e0 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -0,0 +1,130 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestAudioContentPart : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Transcript)) + { + writer.WritePropertyName("transcript"u8); + writer.WriteStringValue(Transcript); + } + } + + InternalRealtimeRequestAudioContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestAudioContentPart)JsonModelCreateCore(ref reader, options); + + protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement, options); + } + + internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealtimeRequestAudioContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string transcript = default; + ConversationContentPartKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("transcript"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + transcript = null; + continue; + } + transcript = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestAudioContentPart(transcript, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestAudioContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestAudioContentPart)PersistableModelCreateCore(data, options); + + protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestAudioContentPart internalRealtimeRequestAudioContentPart) + { + return BinaryContent.Create(internalRealtimeRequestAudioContentPart, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestAudioContentPart(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestAudioContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs new file mode 100644 index 000000000..6809ff2c4 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs @@ -0,0 +1,23 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestAudioContentPart : ConversationContentPart + { + public InternalRealtimeRequestAudioContentPart() : base(ConversationContentPartKind.InputAudio) + { + } + + internal InternalRealtimeRequestAudioContentPart(string transcript, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Transcript = transcript; + } + + public string Transcript { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs new file mode 100644 index 000000000..1ae9914a2 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs @@ -0,0 +1,149 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeRequestCommand))] + internal abstract partial class InternalRealtimeRequestCommand : IJsonModel + { + internal InternalRealtimeRequestCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(EventId)) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestCommand DeserializeInternalRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "session.update": + return InternalRealtimeRequestSessionUpdateCommand.DeserializeInternalRealtimeRequestSessionUpdateCommand(element, options); + case "input_audio_buffer.append": + return InternalRealtimeRequestInputAudioBufferAppendCommand.DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(element, options); + case "input_audio_buffer.commit": + return InternalRealtimeRequestInputAudioBufferCommitCommand.DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(element, options); + case "input_audio_buffer.clear": + return InternalRealtimeRequestInputAudioBufferClearCommand.DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(element, options); + case "conversation.item.create": + return InternalRealtimeRequestItemCreateCommand.DeserializeInternalRealtimeRequestItemCreateCommand(element, options); + case "conversation.item.delete": + return InternalRealtimeRequestItemDeleteCommand.DeserializeInternalRealtimeRequestItemDeleteCommand(element, options); + case "conversation.item.truncate": + return InternalRealtimeRequestItemTruncateCommand.DeserializeInternalRealtimeRequestItemTruncateCommand(element, options); + case "response.create": + return InternalRealtimeRequestResponseCreateCommand.DeserializeInternalRealtimeRequestResponseCreateCommand(element, options); + case "response.cancel": + return InternalRealtimeRequestResponseCancelCommand.DeserializeInternalRealtimeRequestResponseCancelCommand(element, options); + } + } + return UnknownRealtimeRequestCommand.DeserializeUnknownRealtimeRequestCommand(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestCommand internalRealtimeRequestCommand) + { + return BinaryContent.Create(internalRealtimeRequestCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs new file mode 100644 index 000000000..baee8bdc4 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal abstract partial class InternalRealtimeRequestCommand + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind) + { + Kind = kind; + } + + internal InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) + { + Kind = kind; + EventId = eventId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal InternalRealtimeRequestCommandType Kind { get; set; } + + public string EventId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs new file mode 100644 index 000000000..b9ce392f0 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommandType.cs @@ -0,0 +1,64 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeRequestCommandType : IEquatable + { + private readonly string _value; + private const string SessionUpdateValue = "session.update"; + private const string InputAudioBufferAppendValue = "input_audio_buffer.append"; + private const string InputAudioBufferCommitValue = "input_audio_buffer.commit"; + private const string InputAudioBufferClearValue = "input_audio_buffer.clear"; + private const string ItemCreateValue = "conversation.item.create"; + private const string ItemDeleteValue = "conversation.item.delete"; + private const string ItemTruncateValue = "conversation.item.truncate"; + private const string ResponseCreateValue = "response.create"; + private const string ResponseCancelValue = "response.cancel"; + + public InternalRealtimeRequestCommandType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeRequestCommandType SessionUpdate { get; } = new InternalRealtimeRequestCommandType(SessionUpdateValue); + + public static InternalRealtimeRequestCommandType InputAudioBufferAppend { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferAppendValue); + + public static InternalRealtimeRequestCommandType InputAudioBufferCommit { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferCommitValue); + + public static InternalRealtimeRequestCommandType InputAudioBufferClear { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferClearValue); + + public static InternalRealtimeRequestCommandType ItemCreate { get; } = new InternalRealtimeRequestCommandType(ItemCreateValue); + + public static InternalRealtimeRequestCommandType ItemDelete { get; } = new InternalRealtimeRequestCommandType(ItemDeleteValue); + + public static InternalRealtimeRequestCommandType ItemTruncate { get; } = new InternalRealtimeRequestCommandType(ItemTruncateValue); + + public static InternalRealtimeRequestCommandType ResponseCreate { get; } = new InternalRealtimeRequestCommandType(ResponseCreateValue); + + public static InternalRealtimeRequestCommandType ResponseCancel { get; } = new InternalRealtimeRequestCommandType(ResponseCancelValue); + + public static bool operator ==(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => !left.Equals(right); + + public static implicit operator InternalRealtimeRequestCommandType(string value) => new InternalRealtimeRequestCommandType(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeRequestCommandType other && Equals(other); + + public bool Equals(InternalRealtimeRequestCommandType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs new file mode 100644 index 000000000..0d152d548 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -0,0 +1,176 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestFunctionCallItem : IJsonModel + { + internal InternalRealtimeRequestFunctionCallItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + } + + InternalRealtimeRequestFunctionCallItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestFunctionCallItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealtimeRequestFunctionCallItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string callId = default; + string arguments = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("arguments"u8)) + { + arguments = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestFunctionCallItem( + name, + callId, + arguments, + status, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestFunctionCallItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestFunctionCallItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestFunctionCallItem internalRealtimeRequestFunctionCallItem) + { + return BinaryContent.Create(internalRealtimeRequestFunctionCallItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestFunctionCallItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestFunctionCallItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs new file mode 100644 index 000000000..07995c362 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestFunctionCallItem : ConversationItem + { + public InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments) : base(InternalRealtimeRequestItemType.FunctionCall) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(callId, nameof(callId)); + Argument.AssertNotNull(arguments, nameof(arguments)); + + Name = name; + CallId = callId; + Arguments = arguments; + } + + internal InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + { + Name = name; + CallId = callId; + Arguments = arguments; + Status = status; + } + + public string Name { get; set; } + + public string CallId { get; set; } + + public string Arguments { get; set; } + + public ConversationItemStatus? Status { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs new file mode 100644 index 000000000..c2dda8eec --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -0,0 +1,145 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestFunctionCallOutputItem : IJsonModel + { + internal InternalRealtimeRequestFunctionCallOutputItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); + } + + InternalRealtimeRequestFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestFunctionCallOutputItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInternalRealtimeRequestFunctionCallOutputItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string callId = default; + string output = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output"u8)) + { + output = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestFunctionCallOutputItem(callId, output, @type, id, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestFunctionCallOutputItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestFunctionCallOutputItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestFunctionCallOutputItem internalRealtimeRequestFunctionCallOutputItem) + { + return BinaryContent.Create(internalRealtimeRequestFunctionCallOutputItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestFunctionCallOutputItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestFunctionCallOutputItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs new file mode 100644 index 000000000..a965b6c72 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs @@ -0,0 +1,32 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestFunctionCallOutputItem : ConversationItem + { + public InternalRealtimeRequestFunctionCallOutputItem(string callId, string output) : base(InternalRealtimeRequestItemType.FunctionCallOutput) + { + Argument.AssertNotNull(callId, nameof(callId)); + Argument.AssertNotNull(output, nameof(output)); + + CallId = callId; + Output = output; + } + + internal InternalRealtimeRequestFunctionCallOutputItem(string callId, string output, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + { + CallId = callId; + Output = output; + } + + public string CallId { get; set; } + + public string Output { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs new file mode 100644 index 000000000..895bf19f6 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferAppendCommand : IJsonModel + { + internal InternalRealtimeRequestInputAudioBufferAppendCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("audio"u8); + writer.WriteBase64StringValue(Audio.ToArray(), "D"); + } + + InternalRealtimeRequestInputAudioBufferAppendCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferAppendCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestInputAudioBufferAppendCommand DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData audio = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("audio"u8)) + { + audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestInputAudioBufferAppendCommand(audio, kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestInputAudioBufferAppendCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferAppendCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferAppendCommand internalRealtimeRequestInputAudioBufferAppendCommand) + { + return BinaryContent.Create(internalRealtimeRequestInputAudioBufferAppendCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestInputAudioBufferAppendCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs new file mode 100644 index 000000000..a38dd52b8 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferAppendCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestInputAudioBufferAppendCommand(BinaryData audio) : base(InternalRealtimeRequestCommandType.InputAudioBufferAppend) + { + Argument.AssertNotNull(audio, nameof(audio)); + + Audio = audio; + } + + internal InternalRealtimeRequestInputAudioBufferAppendCommand(BinaryData audio, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + Audio = audio; + } + + public BinaryData Audio { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs new file mode 100644 index 000000000..421d032ea --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs @@ -0,0 +1,125 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferClearCommand : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeRequestInputAudioBufferClearCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferClearCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestInputAudioBufferClearCommand(kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestInputAudioBufferClearCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferClearCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferClearCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferClearCommand internalRealtimeRequestInputAudioBufferClearCommand) + { + return BinaryContent.Create(internalRealtimeRequestInputAudioBufferClearCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestInputAudioBufferClearCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs new file mode 100644 index 000000000..ae8521b04 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferClearCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestInputAudioBufferClearCommand() : base(InternalRealtimeRequestCommandType.InputAudioBufferClear) + { + } + + internal InternalRealtimeRequestInputAudioBufferClearCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs new file mode 100644 index 000000000..06c14a940 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs @@ -0,0 +1,125 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferCommitCommand : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeRequestInputAudioBufferCommitCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferCommitCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestInputAudioBufferCommitCommand DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestInputAudioBufferCommitCommand(kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestInputAudioBufferCommitCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferCommitCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferCommitCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferCommitCommand internalRealtimeRequestInputAudioBufferCommitCommand) + { + return BinaryContent.Create(internalRealtimeRequestInputAudioBufferCommitCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestInputAudioBufferCommitCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs new file mode 100644 index 000000000..1dc5b624d --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestInputAudioBufferCommitCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestInputAudioBufferCommitCommand() : base(InternalRealtimeRequestCommandType.InputAudioBufferCommit) + { + } + + internal InternalRealtimeRequestInputAudioBufferCommitCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs new file mode 100644 index 000000000..f8926358f --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemCreateCommand : IJsonModel + { + internal InternalRealtimeRequestItemCreateCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(PreviousItemId)) + { + writer.WritePropertyName("previous_item_id"u8); + writer.WriteStringValue(PreviousItemId); + } + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); + } + + InternalRealtimeRequestItemCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemCreateCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalRealtimeRequestItemCreateCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string previousItemId = default; + ConversationItem item = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("previous_item_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + previousItemId = null; + continue; + } + previousItemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("item"u8)) + { + item = ConversationItem.DeserializeConversationItem(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestItemCreateCommand(previousItemId, item, kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestItemCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemCreateCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestItemCreateCommand internalRealtimeRequestItemCreateCommand) + { + return BinaryContent.Create(internalRealtimeRequestItemCreateCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestItemCreateCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs new file mode 100644 index 000000000..1327253f8 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemCreateCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestItemCreateCommand(ConversationItem item) : base(InternalRealtimeRequestCommandType.ItemCreate) + { + Argument.AssertNotNull(item, nameof(item)); + + Item = item; + } + + internal InternalRealtimeRequestItemCreateCommand(string previousItemId, ConversationItem item, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + PreviousItemId = previousItemId; + Item = item; + } + + public string PreviousItemId { get; set; } + + public ConversationItem Item { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs new file mode 100644 index 000000000..e0eba5e0b --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemDeleteCommand : IJsonModel + { + internal InternalRealtimeRequestItemDeleteCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + } + + InternalRealtimeRequestItemDeleteCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemDeleteCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalRealtimeRequestItemDeleteCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestItemDeleteCommand(itemId, kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestItemDeleteCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemDeleteCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestItemDeleteCommand internalRealtimeRequestItemDeleteCommand) + { + return BinaryContent.Create(internalRealtimeRequestItemDeleteCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestItemDeleteCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs new file mode 100644 index 000000000..148a82ad1 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemDeleteCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestItemDeleteCommand(string itemId) : base(InternalRealtimeRequestCommandType.ItemDelete) + { + Argument.AssertNotNull(itemId, nameof(itemId)); + + ItemId = itemId; + } + + internal InternalRealtimeRequestItemDeleteCommand(string itemId, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + ItemId = itemId; + } + + public string ItemId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs new file mode 100644 index 000000000..68261c17b --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemTruncateCommand : IJsonModel + { + internal InternalRealtimeRequestItemTruncateCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); + } + + InternalRealtimeRequestItemTruncateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemTruncateCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRealtimeRequestItemTruncateCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string itemId = default; + int contentIndex = default; + int audioEndMs = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("content_index"u8)) + { + contentIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("audio_end_ms"u8)) + { + audioEndMs = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestItemTruncateCommand( + itemId, + contentIndex, + audioEndMs, + kind, + eventId, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestItemTruncateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemTruncateCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestItemTruncateCommand internalRealtimeRequestItemTruncateCommand) + { + return BinaryContent.Create(internalRealtimeRequestItemTruncateCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestItemTruncateCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs new file mode 100644 index 000000000..e109dbd66 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.cs @@ -0,0 +1,35 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestItemTruncateCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestItemTruncateCommand(string itemId, int contentIndex, int audioEndMs) : base(InternalRealtimeRequestCommandType.ItemTruncate) + { + Argument.AssertNotNull(itemId, nameof(itemId)); + + ItemId = itemId; + ContentIndex = contentIndex; + AudioEndMs = audioEndMs; + } + + internal InternalRealtimeRequestItemTruncateCommand(string itemId, int contentIndex, int audioEndMs, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + ItemId = itemId; + ContentIndex = contentIndex; + AudioEndMs = audioEndMs; + } + + public string ItemId { get; set; } + + public int ContentIndex { get; set; } + + public int AudioEndMs { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs new file mode 100644 index 000000000..5c3cb68f1 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemType.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeRequestItemType : IEquatable + { + private readonly string _value; + private const string MessageValue = "message"; + private const string FunctionCallValue = "function_call"; + private const string FunctionCallOutputValue = "function_call_output"; + + public InternalRealtimeRequestItemType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeRequestItemType Message { get; } = new InternalRealtimeRequestItemType(MessageValue); + + public static InternalRealtimeRequestItemType FunctionCall { get; } = new InternalRealtimeRequestItemType(FunctionCallValue); + + public static InternalRealtimeRequestItemType FunctionCallOutput { get; } = new InternalRealtimeRequestItemType(FunctionCallOutputValue); + + public static bool operator ==(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => !left.Equals(right); + + public static implicit operator InternalRealtimeRequestItemType(string value) => new InternalRealtimeRequestItemType(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeRequestItemType other && Equals(other); + + public bool Equals(InternalRealtimeRequestItemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs new file mode 100644 index 000000000..73136b2b6 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestMessageItem : IJsonModel + { + internal InternalRealtimeRequestMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + } + + InternalRealtimeRequestMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestMessageItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRequestMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestMessageItem(role, status, @type, id, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestMessageItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestMessageItem internalRealtimeRequestMessageItem) + { + return BinaryContent.Create(internalRealtimeRequestMessageItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestMessageItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs new file mode 100644 index 000000000..e1a1620da --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestMessageItem : ConversationItem + { + public InternalRealtimeRequestMessageItem(ConversationMessageRole role) : base(InternalRealtimeRequestItemType.Message) + { + Role = role; + } + + internal InternalRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + { + Role = role; + Status = status; + } + + internal ConversationMessageRole Role { get; set; } + + public ConversationItemStatus? Status { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs new file mode 100644 index 000000000..9d5f3f152 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestModel.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeRequestModel : IEquatable + { + private readonly string _value; + private const string Gpt4oRealtimeValue = "gpt-4o-realtime"; + + public InternalRealtimeRequestModel(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeRequestModel Gpt4oRealtime { get; } = new InternalRealtimeRequestModel(Gpt4oRealtimeValue); + + public static bool operator ==(InternalRealtimeRequestModel left, InternalRealtimeRequestModel right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeRequestModel left, InternalRealtimeRequestModel right) => !left.Equals(right); + + public static implicit operator InternalRealtimeRequestModel(string value) => new InternalRealtimeRequestModel(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeRequestModel other && Equals(other); + + public bool Equals(InternalRealtimeRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs new file mode 100644 index 000000000..44d3e8139 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs @@ -0,0 +1,125 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCancelCommand : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeRequestResponseCancelCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCancelCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternalRealtimeRequestResponseCancelCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestResponseCancelCommand(kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestResponseCancelCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCancelCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCancelCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestResponseCancelCommand internalRealtimeRequestResponseCancelCommand) + { + return BinaryContent.Create(internalRealtimeRequestResponseCancelCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestResponseCancelCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs new file mode 100644 index 000000000..87154a36e --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCancelCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestResponseCancelCommand() : base(InternalRealtimeRequestCommandType.ResponseCancel) + { + } + + internal InternalRealtimeRequestResponseCancelCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs new file mode 100644 index 000000000..aed8ca958 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs @@ -0,0 +1,141 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCreateCommand : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Response)) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + } + + InternalRealtimeRequestResponseCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCreateCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternalRealtimeRequestResponseCreateCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestResponseCreateCommandResponse response = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("response"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + response = null; + continue; + } + response = InternalRealtimeRequestResponseCreateCommandResponse.DeserializeInternalRealtimeRequestResponseCreateCommandResponse(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestResponseCreateCommand(response, kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestResponseCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCreateCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommand internalRealtimeRequestResponseCreateCommand) + { + return BinaryContent.Create(internalRealtimeRequestResponseCreateCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestResponseCreateCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs new file mode 100644 index 000000000..82c11871a --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.cs @@ -0,0 +1,23 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCreateCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestResponseCreateCommand() : base(InternalRealtimeRequestCommandType.ResponseCreate) + { + } + + internal InternalRealtimeRequestResponseCreateCommand(InternalRealtimeRequestResponseCreateCommandResponse response, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + Response = response; + } + + public InternalRealtimeRequestResponseCreateCommandResponse Response { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs new file mode 100644 index 000000000..a71527c16 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs @@ -0,0 +1,372 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCreateCommandResponse : IJsonModel + { + internal InternalRealtimeRequestResponseCreateCommandResponse() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support writing '{format}' format."); + } + writer.WritePropertyName("commit"u8); + writer.WriteBooleanValue(Commit); + writer.WritePropertyName("cancel_previous"u8); + writer.WriteBooleanValue(CancelPrevious); + if (Optional.IsCollectionDefined(AppendInputItems)) + { + writer.WritePropertyName("append_input_items"u8); + writer.WriteStartArray(); + foreach (ConversationItem item in AppendInputItems) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InputItems)) + { + writer.WritePropertyName("input_items"u8); + writer.WriteStartArray(); + foreach (ConversationItem item in InputItems) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Instructions)) + { + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + } + if (Optional.IsCollectionDefined(Modalities)) + { + writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Voice)) + { + writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.Value.ToString()); + } + if (Optional.IsDefined(Temperature)) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(MaxOutputTokens)) + { + if (MaxOutputTokens != null) + { + writer.WritePropertyName("max_output_tokens"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(MaxOutputTokens); +#else + using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + else + { + writer.WriteNull("maxOutputTokens"u8); + } + } + if (Optional.IsCollectionDefined(Tools)) + { + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ConversationTool item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ToolChoice)) + { + writer.WritePropertyName("tool_choice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(OutputAudioFormat)) + { + writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeRequestResponseCreateCommandResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeRequestResponseCreateCommandResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, options); + } + + internal static InternalRealtimeRequestResponseCreateCommandResponse DeserializeInternalRealtimeRequestResponseCreateCommandResponse(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool commit = default; + bool cancelPrevious = default; + IList appendInputItems = default; + IList inputItems = default; + string instructions = default; + IList modalities = default; + ConversationVoice? voice = default; + float? temperature = default; + BinaryData maxOutputTokens = default; + IList tools = default; + BinaryData toolChoice = default; + ConversationAudioFormat? outputAudioFormat = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("commit"u8)) + { + commit = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("cancel_previous"u8)) + { + cancelPrevious = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("append_input_items"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationItem.DeserializeConversationItem(item, options)); + } + appendInputItems = array; + continue; + } + if (prop.NameEquals("input_items"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationItem.DeserializeConversationItem(item, options)); + } + inputItems = array; + continue; + } + if (prop.NameEquals("instructions"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + instructions = null; + continue; + } + instructions = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("modalities"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); + } + modalities = array; + continue; + } + if (prop.NameEquals("voice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + voice = null; + continue; + } + voice = new ConversationVoice(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("temperature"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + temperature = null; + continue; + } + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("max_output_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + maxOutputTokens = null; + continue; + } + maxOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("tools"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationTool.DeserializeConversationTool(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolChoice = null; + continue; + } + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("output_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + outputAudioFormat = null; + continue; + } + outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestResponseCreateCommandResponse( + commit, + cancelPrevious, + appendInputItems ?? new ChangeTrackingList(), + inputItems ?? new ChangeTrackingList(), + instructions, + modalities ?? new ChangeTrackingList(), + voice, + temperature, + maxOutputTokens, + tools ?? new ChangeTrackingList(), + toolChoice, + outputAudioFormat, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestResponseCreateCommandResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeRequestResponseCreateCommandResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommandResponse internalRealtimeRequestResponseCreateCommandResponse) + { + return BinaryContent.Create(internalRealtimeRequestResponseCreateCommandResponse, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestResponseCreateCommandResponse(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs new file mode 100644 index 000000000..9ee9193e9 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestResponseCreateCommandResponse + { + private protected IDictionary _additionalBinaryDataProperties; + + public InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious) + { + Commit = commit; + CancelPrevious = cancelPrevious; + AppendInputItems = new ChangeTrackingList(); + InputItems = new ChangeTrackingList(); + Modalities = new ChangeTrackingList(); + Tools = new ChangeTrackingList(); + } + + internal InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious, IList appendInputItems, IList inputItems, string instructions, IList modalities, ConversationVoice? voice, float? temperature, BinaryData maxOutputTokens, IList tools, BinaryData toolChoice, ConversationAudioFormat? outputAudioFormat, IDictionary additionalBinaryDataProperties) + { + Commit = commit; + CancelPrevious = cancelPrevious; + AppendInputItems = appendInputItems; + InputItems = inputItems; + Instructions = instructions; + Modalities = modalities; + Voice = voice; + Temperature = temperature; + MaxOutputTokens = maxOutputTokens; + Tools = tools; + ToolChoice = toolChoice; + OutputAudioFormat = outputAudioFormat; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public bool Commit { get; set; } + + public bool CancelPrevious { get; set; } + + public IList AppendInputItems { get; } + + public IList InputItems { get; } + + public string Instructions { get; set; } + + public IList Modalities { get; } + + public ConversationVoice? Voice { get; set; } + + public float? Temperature { get; set; } + + public BinaryData MaxOutputTokens { get; set; } + + public IList Tools { get; } + + public BinaryData ToolChoice { get; set; } + + public ConversationAudioFormat? OutputAudioFormat { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs new file mode 100644 index 000000000..b7dbca6a4 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestSessionUpdateCommand : IJsonModel + { + internal InternalRealtimeRequestSessionUpdateCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("session"u8); + writer.WriteObjectValue(Session, options); + } + + InternalRealtimeRequestSessionUpdateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestSessionUpdateCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, options); + } + + internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalRealtimeRequestSessionUpdateCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationSessionOptions session = default; + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("session"u8)) + { + session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestSessionUpdateCommand(session, kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestSessionUpdateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestSessionUpdateCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestSessionUpdateCommand internalRealtimeRequestSessionUpdateCommand) + { + return BinaryContent.Create(internalRealtimeRequestSessionUpdateCommand, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestSessionUpdateCommand(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs new file mode 100644 index 000000000..0322949e7 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestSessionUpdateCommand : InternalRealtimeRequestCommand + { + public InternalRealtimeRequestSessionUpdateCommand(ConversationSessionOptions session) : base(InternalRealtimeRequestCommandType.SessionUpdate) + { + Argument.AssertNotNull(session, nameof(session)); + + Session = session; + } + + internal InternalRealtimeRequestSessionUpdateCommand(ConversationSessionOptions session, InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + { + Session = session; + } + + public ConversationSessionOptions Session { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs new file mode 100644 index 000000000..199c694a9 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommandSessionModality.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeRequestSessionUpdateCommandSessionModality : IEquatable + { + private readonly string _value; + private const string TextValue = "text"; + private const string AudioValue = "audio"; + + public InternalRealtimeRequestSessionUpdateCommandSessionModality(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeRequestSessionUpdateCommandSessionModality Text { get; } = new InternalRealtimeRequestSessionUpdateCommandSessionModality(TextValue); + + public static InternalRealtimeRequestSessionUpdateCommandSessionModality Audio { get; } = new InternalRealtimeRequestSessionUpdateCommandSessionModality(AudioValue); + + public static bool operator ==(InternalRealtimeRequestSessionUpdateCommandSessionModality left, InternalRealtimeRequestSessionUpdateCommandSessionModality right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeRequestSessionUpdateCommandSessionModality left, InternalRealtimeRequestSessionUpdateCommandSessionModality right) => !left.Equals(right); + + public static implicit operator InternalRealtimeRequestSessionUpdateCommandSessionModality(string value) => new InternalRealtimeRequestSessionUpdateCommandSessionModality(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeRequestSessionUpdateCommandSessionModality other && Equals(other); + + public bool Equals(InternalRealtimeRequestSessionUpdateCommandSessionModality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs new file mode 100644 index 000000000..1ddce9cf2 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -0,0 +1,170 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestSystemMessageItem : IJsonModel + { + internal InternalRealtimeRequestSystemMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + + InternalRealtimeRequestSystemMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestSystemMessageItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalRealtimeRequestSystemMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList content = default; + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; + continue; + } + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestSystemMessageItem( + content, + role, + status, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestSystemMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestSystemMessageItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestSystemMessageItem internalRealtimeRequestSystemMessageItem) + { + return BinaryContent.Create(internalRealtimeRequestSystemMessageItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestSystemMessageItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestSystemMessageItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs new file mode 100644 index 000000000..726cf7098 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs @@ -0,0 +1,26 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestSystemMessageItem : InternalRealtimeRequestMessageItem + { + public InternalRealtimeRequestSystemMessageItem(IEnumerable content) : base(ConversationMessageRole.System) + { + Argument.AssertNotNull(content, nameof(content)); + + Content = content.ToList(); + } + + internal InternalRealtimeRequestSystemMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + { + Content = content; + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs new file mode 100644 index 000000000..42eab796c --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -0,0 +1,126 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestTextContentPart : IJsonModel + { + internal InternalRealtimeRequestTextContentPart() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + + InternalRealtimeRequestTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestTextContentPart)JsonModelCreateCore(ref reader, options); + + protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement, options); + } + + internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealtimeRequestTextContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + ConversationContentPartKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("text"u8)) + { + text = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestTextContentPart(text, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestTextContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestTextContentPart)PersistableModelCreateCore(data, options); + + protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestTextContentPart internalRealtimeRequestTextContentPart) + { + return BinaryContent.Create(internalRealtimeRequestTextContentPart, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestTextContentPart(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestTextContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs new file mode 100644 index 000000000..f488771e9 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestTextContentPart : ConversationContentPart + { + public InternalRealtimeRequestTextContentPart(string text) : base(ConversationContentPartKind.InputText) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + } + + internal InternalRealtimeRequestTextContentPart(string text, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Text = text; + } + + public string Text { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs new file mode 100644 index 000000000..8de8da27a --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -0,0 +1,170 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestUserMessageItem : IJsonModel + { + internal InternalRealtimeRequestUserMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + + InternalRealtimeRequestUserMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestUserMessageItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement, options); + } + + internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealtimeRequestUserMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList content = default; + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; + continue; + } + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeRequestUserMessageItem( + content, + role, + status, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestUserMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestUserMessageItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeRequestUserMessageItem internalRealtimeRequestUserMessageItem) + { + return BinaryContent.Create(internalRealtimeRequestUserMessageItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeRequestUserMessageItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeRequestUserMessageItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs new file mode 100644 index 000000000..e7c819676 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeRequestUserMessageItem : InternalRealtimeRequestMessageItem + { + internal InternalRealtimeRequestUserMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + { + Content = content; + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs new file mode 100644 index 000000000..41f705839 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -0,0 +1,203 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponse : IJsonModel + { + internal InternalRealtimeResponse() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support writing '{format}' format."); + } + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (StatusDetails != null) + { + writer.WritePropertyName("status_details"u8); + writer.WriteObjectValue(StatusDetails, options); + } + else + { + writer.WriteNull("statusDetails"u8); + } + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (ConversationItem item in Output) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponse(document.RootElement, options); + } + + internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseObject @object = default; + string id = default; + ConversationStatus status = default; + InternalRealtimeResponseStatusDetails statusDetails = default; + ConversationTokenUsage usage = default; + IReadOnlyList output = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status_details"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + statusDetails = null; + continue; + } + statusDetails = InternalRealtimeResponseStatusDetails.DeserializeInternalRealtimeResponseStatusDetails(prop.Value, options); + continue; + } + if (prop.NameEquals("usage"u8)) + { + usage = ConversationTokenUsage.DeserializeConversationTokenUsage(prop.Value, options); + continue; + } + if (prop.NameEquals("output"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationItem.DeserializeConversationItem(item, options)); + } + output = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponse( + @object, + id, + status, + statusDetails, + usage, + output, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponse internalRealtimeResponse) + { + return BinaryContent.Create(internalRealtimeResponse, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponse(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponse(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs new file mode 100644 index 000000000..913b825eb --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs @@ -0,0 +1,45 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponse + { + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalRealtimeResponse(string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IEnumerable output) + { + Id = id; + Status = status; + StatusDetails = statusDetails; + Usage = usage; + Output = output.ToList(); + } + + internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IReadOnlyList output, IDictionary additionalBinaryDataProperties) + { + Object = @object; + Id = id; + Status = status; + StatusDetails = statusDetails; + Usage = usage; + Output = output; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public InternalRealtimeResponseObject Object { get; } = "realtime.response"; + + public string Id { get; set; } + + public ConversationStatus Status { get; set; } + + public InternalRealtimeResponseStatusDetails StatusDetails { get; set; } + + public ConversationTokenUsage Usage { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs new file mode 100644 index 000000000..9e7ca78fa --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs @@ -0,0 +1,174 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseApiError : IJsonModel + { + internal InternalRealtimeResponseApiError() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Param)) + { + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponseApiError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponseApiError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseApiError(document.RootElement, options); + } + + internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResponseApiError(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @type = default; + string code = default; + string message = default; + string @param = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("code"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("message"u8)) + { + message = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("param"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + @param = null; + continue; + } + @param = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseApiError(@type, code, message, @param, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseApiError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponseApiError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseApiError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseApiError internalRealtimeResponseApiError) + { + return BinaryContent.Create(internalRealtimeResponseApiError, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseApiError(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseApiError(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs new file mode 100644 index 000000000..610d17ab2 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs @@ -0,0 +1,37 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseApiError + { + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalRealtimeResponseApiError(string @type, string message) + { + Type = @type; + Message = message; + } + + internal InternalRealtimeResponseApiError(string @type, string code, string message, string @param, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Code = code; + Message = message; + Param = @param; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Type { get; set; } + + public string Code { get; set; } + + public string Message { get; set; } + + public string Param { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs new file mode 100644 index 000000000..9dcf812ce --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseAudioContentPart : IJsonModel + { + internal InternalRealtimeResponseAudioContentPart() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Transcript != null) + { + writer.WritePropertyName("transcript"u8); + writer.WriteStringValue(Transcript); + } + else + { + writer.WriteNull("transcript"u8); + } + } + + InternalRealtimeResponseAudioContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseAudioContentPart)JsonModelCreateCore(ref reader, options); + + protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement, options); + } + + internal static InternalRealtimeResponseAudioContentPart DeserializeInternalRealtimeResponseAudioContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string transcript = default; + ConversationContentPartKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("transcript"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + transcript = null; + continue; + } + transcript = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseAudioContentPart(transcript, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseAudioContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseAudioContentPart)PersistableModelCreateCore(data, options); + + protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseAudioContentPart internalRealtimeResponseAudioContentPart) + { + return BinaryContent.Create(internalRealtimeResponseAudioContentPart, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseAudioContentPart(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseAudioContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs new file mode 100644 index 000000000..8bac16e56 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseAudioContentPart : ConversationContentPart + { + internal InternalRealtimeResponseAudioContentPart(string transcript) : base(ConversationContentPartKind.Audio) + { + Transcript = transcript; + } + + internal InternalRealtimeResponseAudioContentPart(string transcript, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Transcript = transcript; + } + + public string Transcript { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs new file mode 100644 index 000000000..ef831f515 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs @@ -0,0 +1,126 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseCancelledStatusDetails : IJsonModel + { + internal InternalRealtimeResponseCancelledStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); + } + + InternalRealtimeResponseCancelledStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseCancelledStatusDetails)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, options); + } + + internal static InternalRealtimeResponseCancelledStatusDetails DeserializeInternalRealtimeResponseCancelledStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseCancelledStatusDetailsReason reason = default; + ConversationStatus @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("reason"u8)) + { + reason = new InternalRealtimeResponseCancelledStatusDetailsReason(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseCancelledStatusDetails(reason, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseCancelledStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseCancelledStatusDetails)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseCancelledStatusDetails internalRealtimeResponseCancelledStatusDetails) + { + return BinaryContent.Create(internalRealtimeResponseCancelledStatusDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseCancelledStatusDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs new file mode 100644 index 000000000..642d44be6 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseCancelledStatusDetails : InternalRealtimeResponseStatusDetails + { + internal InternalRealtimeResponseCancelledStatusDetails(InternalRealtimeResponseCancelledStatusDetailsReason reason) : base(ConversationStatus.Cancelled) + { + Reason = reason; + } + + internal InternalRealtimeResponseCancelledStatusDetails(InternalRealtimeResponseCancelledStatusDetailsReason reason, ConversationStatus @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Reason = reason; + } + + public InternalRealtimeResponseCancelledStatusDetailsReason Reason { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs new file mode 100644 index 000000000..92e398b11 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetailsReason.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeResponseCancelledStatusDetailsReason : IEquatable + { + private readonly string _value; + private const string TurnDetectedValue = "turn_detected"; + private const string ClientCancelledValue = "client_cancelled"; + + public InternalRealtimeResponseCancelledStatusDetailsReason(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeResponseCancelledStatusDetailsReason TurnDetected { get; } = new InternalRealtimeResponseCancelledStatusDetailsReason(TurnDetectedValue); + + public static InternalRealtimeResponseCancelledStatusDetailsReason ClientCancelled { get; } = new InternalRealtimeResponseCancelledStatusDetailsReason(ClientCancelledValue); + + public static bool operator ==(InternalRealtimeResponseCancelledStatusDetailsReason left, InternalRealtimeResponseCancelledStatusDetailsReason right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeResponseCancelledStatusDetailsReason left, InternalRealtimeResponseCancelledStatusDetailsReason right) => !left.Equals(right); + + public static implicit operator InternalRealtimeResponseCancelledStatusDetailsReason(string value) => new InternalRealtimeResponseCancelledStatusDetailsReason(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeResponseCancelledStatusDetailsReason other && Equals(other); + + public bool Equals(InternalRealtimeResponseCancelledStatusDetailsReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs new file mode 100644 index 000000000..086f7411b --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs @@ -0,0 +1,196 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseError : IJsonModel + { + internal InternalRealtimeResponseError() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Param)) + { + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); + } + if (Optional.IsDefined(EventId)) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponseError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponseError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseError(document.RootElement, options); + } + + internal static InternalRealtimeResponseError DeserializeInternalRealtimeResponseError(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @type = default; + string code = default; + string message = default; + string @param = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("code"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("message"u8)) + { + message = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("param"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + @param = null; + continue; + } + @param = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseError( + @type, + code, + message, + @param, + eventId, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponseError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseError internalRealtimeResponseError) + { + return BinaryContent.Create(internalRealtimeResponseError, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseError(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseError(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs new file mode 100644 index 000000000..ad6264d6f --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseError + { + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalRealtimeResponseError(string @type, string message) + { + Type = @type; + Message = message; + } + + internal InternalRealtimeResponseError(string @type, string code, string message, string @param, string eventId, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Code = code; + Message = message; + Param = @param; + EventId = eventId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Type { get; set; } + + public string Code { get; set; } + + public string Message { get; set; } + + public string Param { get; set; } + + public string EventId { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs new file mode 100644 index 000000000..a9f77fc66 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -0,0 +1,175 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseFunctionCallItem : IJsonModel + { + internal InternalRealtimeResponseFunctionCallItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + } + + InternalRealtimeResponseFunctionCallItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallItem)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement, options); + } + + internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalRealtimeResponseFunctionCallItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string callId = default; + string arguments = default; + ConversationItemStatus status = default; + InternalRealtimeResponseItemObject @object = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("arguments"u8)) + { + arguments = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseFunctionCallItem( + name, + callId, + arguments, + status, + @object, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseFunctionCallItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallItem)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseFunctionCallItem internalRealtimeResponseFunctionCallItem) + { + return BinaryContent.Create(internalRealtimeResponseFunctionCallItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseFunctionCallItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseFunctionCallItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs new file mode 100644 index 000000000..41f84396c --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseFunctionCallItem : InternalRealtimeResponseItem + { + internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, string id) : base(InternalRealtimeRequestItemType.FunctionCall, id) + { + Name = name; + CallId = callId; + Arguments = arguments; + Status = status; + } + + internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + { + Name = name; + CallId = callId; + Arguments = arguments; + Status = status; + } + + public string Name { get; set; } + + public string CallId { get; set; } + + public string Arguments { get; set; } + + public ConversationItemStatus Status { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs new file mode 100644 index 000000000..bb1403811 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -0,0 +1,157 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseFunctionCallOutputItem : IJsonModel + { + internal InternalRealtimeResponseFunctionCallOutputItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); + } + + InternalRealtimeResponseFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallOutputItem)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement, options); + } + + internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeInternalRealtimeResponseFunctionCallOutputItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string callId = default; + string output = default; + InternalRealtimeResponseItemObject @object = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output"u8)) + { + output = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseFunctionCallOutputItem( + callId, + output, + @object, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseFunctionCallOutputItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallOutputItem)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseFunctionCallOutputItem internalRealtimeResponseFunctionCallOutputItem) + { + return BinaryContent.Create(internalRealtimeResponseFunctionCallOutputItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseFunctionCallOutputItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseFunctionCallOutputItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs new file mode 100644 index 000000000..0a3cdc0bd --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseFunctionCallOutputItem : InternalRealtimeResponseItem + { + internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, string id) : base(InternalRealtimeRequestItemType.FunctionCallOutput, id) + { + CallId = callId; + Output = output; + } + + internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + { + CallId = callId; + Output = output; + } + + public string CallId { get; set; } + + public string Output { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs new file mode 100644 index 000000000..6b0422664 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs @@ -0,0 +1,126 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseIncompleteStatusDetails : IJsonModel + { + internal InternalRealtimeResponseIncompleteStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); + } + + InternalRealtimeResponseIncompleteStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseIncompleteStatusDetails)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, options); + } + + internal static InternalRealtimeResponseIncompleteStatusDetails DeserializeInternalRealtimeResponseIncompleteStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseIncompleteStatusDetailsReason reason = default; + ConversationStatus @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("reason"u8)) + { + reason = new InternalRealtimeResponseIncompleteStatusDetailsReason(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseIncompleteStatusDetails(reason, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseIncompleteStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseIncompleteStatusDetails)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseIncompleteStatusDetails internalRealtimeResponseIncompleteStatusDetails) + { + return BinaryContent.Create(internalRealtimeResponseIncompleteStatusDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseIncompleteStatusDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs new file mode 100644 index 000000000..9594d54de --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseIncompleteStatusDetails : InternalRealtimeResponseStatusDetails + { + internal InternalRealtimeResponseIncompleteStatusDetails(InternalRealtimeResponseIncompleteStatusDetailsReason reason) : base(ConversationStatus.Incomplete) + { + Reason = reason; + } + + internal InternalRealtimeResponseIncompleteStatusDetails(InternalRealtimeResponseIncompleteStatusDetailsReason reason, ConversationStatus @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Reason = reason; + } + + public InternalRealtimeResponseIncompleteStatusDetailsReason Reason { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs new file mode 100644 index 000000000..c621c0038 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetailsReason.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeResponseIncompleteStatusDetailsReason : IEquatable + { + private readonly string _value; + private const string MaxOutputTokensValue = "max_output_tokens"; + private const string ContentFilterValue = "content_filter"; + + public InternalRealtimeResponseIncompleteStatusDetailsReason(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeResponseIncompleteStatusDetailsReason MaxOutputTokens { get; } = new InternalRealtimeResponseIncompleteStatusDetailsReason(MaxOutputTokensValue); + + public static InternalRealtimeResponseIncompleteStatusDetailsReason ContentFilter { get; } = new InternalRealtimeResponseIncompleteStatusDetailsReason(ContentFilterValue); + + public static bool operator ==(InternalRealtimeResponseIncompleteStatusDetailsReason left, InternalRealtimeResponseIncompleteStatusDetailsReason right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeResponseIncompleteStatusDetailsReason left, InternalRealtimeResponseIncompleteStatusDetailsReason right) => !left.Equals(right); + + public static implicit operator InternalRealtimeResponseIncompleteStatusDetailsReason(string value) => new InternalRealtimeResponseIncompleteStatusDetailsReason(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeResponseIncompleteStatusDetailsReason other && Equals(other); + + public bool Equals(InternalRealtimeResponseIncompleteStatusDetailsReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs new file mode 100644 index 000000000..902b4fddb --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -0,0 +1,143 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeResponseItem))] + internal abstract partial class InternalRealtimeResponseItem : IJsonModel + { + internal InternalRealtimeResponseItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{format}' format."); + } + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Id != null) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + else + { + writer.WriteNull("id"u8); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseItem(document.RootElement, options); + } + + internal static InternalRealtimeResponseItem DeserializeInternalRealtimeResponseItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "message": + return InternalRealtimeResponseMessageItem.DeserializeInternalRealtimeResponseMessageItem(element, options); + case "function_call": + return InternalRealtimeResponseFunctionCallItem.DeserializeInternalRealtimeResponseFunctionCallItem(element, options); + case "function_call_output": + return InternalRealtimeResponseFunctionCallOutputItem.DeserializeInternalRealtimeResponseFunctionCallOutputItem(element, options); + } + } + return UnknownRealtimeResponseItem.DeserializeUnknownRealtimeResponseItem(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseItem internalRealtimeResponseItem) + { + return BinaryContent.Create(internalRealtimeResponseItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs new file mode 100644 index 000000000..fa9acc164 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal abstract partial class InternalRealtimeResponseItem + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRealtimeResponseItem(InternalRealtimeRequestItemType @type, string id) + { + Type = @type; + Id = id; + } + + internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) + { + Object = @object; + Type = @type; + Id = id; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public InternalRealtimeResponseItemObject Object { get; } = "realtime.item"; + + internal InternalRealtimeRequestItemType Type { get; set; } + + public string Id { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs new file mode 100644 index 000000000..81279bbbf --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeResponseItemObject : IEquatable + { + private readonly string _value; + private const string RealtimeItemValue = "realtime.item"; + + public InternalRealtimeResponseItemObject(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeResponseItemObject RealtimeItem { get; } = new InternalRealtimeResponseItemObject(RealtimeItemValue); + + public static bool operator ==(InternalRealtimeResponseItemObject left, InternalRealtimeResponseItemObject right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeResponseItemObject left, InternalRealtimeResponseItemObject right) => !left.Equals(right); + + public static implicit operator InternalRealtimeResponseItemObject(string value) => new InternalRealtimeResponseItemObject(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeResponseItemObject other && Equals(other); + + public bool Equals(InternalRealtimeResponseItemObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs new file mode 100644 index 000000000..a40e91e66 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -0,0 +1,176 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseMessageItem : IJsonModel + { + internal InternalRealtimeResponseMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("role"u8); + writer.WriteObjectValue(Role, options); + } + + InternalRealtimeResponseMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseMessageItem)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseMessageItem(document.RootElement, options); + } + + internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeResponseMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList content = default; + ConversationItemStatus status = default; + ConversationMessageRole role = default; + InternalRealtimeResponseItemObject @object = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("role"u8)) + { + role = ConversationMessageRole.DeserializeConversationMessageRole(prop.Value, options); + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseMessageItem( + content, + status, + role, + @object, + @type, + id, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseMessageItem)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseMessageItem internalRealtimeResponseMessageItem) + { + return BinaryContent.Create(internalRealtimeResponseMessageItem, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseMessageItem(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseMessageItem(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs new file mode 100644 index 000000000..a6a2a2cc9 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseMessageItem : InternalRealtimeResponseItem + { + internal InternalRealtimeResponseMessageItem(IEnumerable content, ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeRequestItemType.Message, id) + { + Content = content.ToList(); + Status = status; + Role = role; + } + + internal InternalRealtimeResponseMessageItem(IList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + { + Content = content; + Status = status; + Role = role; + } + + public IList Content { get; } + + public ConversationItemStatus Status { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs new file mode 100644 index 000000000..300fecb98 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeResponseObject : IEquatable + { + private readonly string _value; + private const string RealtimeResponseValue = "realtime.response"; + + public InternalRealtimeResponseObject(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeResponseObject RealtimeResponse { get; } = new InternalRealtimeResponseObject(RealtimeResponseValue); + + public static bool operator ==(InternalRealtimeResponseObject left, InternalRealtimeResponseObject right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeResponseObject left, InternalRealtimeResponseObject right) => !left.Equals(right); + + public static implicit operator InternalRealtimeResponseObject(string value) => new InternalRealtimeResponseObject(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeResponseObject other && Equals(other); + + public bool Equals(InternalRealtimeResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs new file mode 100644 index 000000000..0f828d0f9 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -0,0 +1,299 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseSession : IJsonModel + { + internal InternalRealtimeResponseSession() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support writing '{format}' format."); + } + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.ToString()); + writer.WritePropertyName("input_audio_format"u8); + writer.WriteStringValue(InputAudioFormat.ToString()); + writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat.ToString()); + if (InputAudioTranscription != null) + { + writer.WritePropertyName("input_audio_transcription"u8); + writer.WriteObjectValue(InputAudioTranscription, options); + } + else + { + writer.WriteNull("inputAudioTranscription"u8); + } + writer.WritePropertyName("turn_detection"u8); + writer.WriteObjectValue(TurnDetection, options); + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ConversationTool item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("tool_choice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); + if (MaxResponseOutputTokens != null) + { + writer.WritePropertyName("max_response_output_tokens"u8); + writer.WriteObjectValue(MaxResponseOutputTokens, options); + } + else + { + writer.WriteNull("maxResponseOutputTokens"u8); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponseSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponseSession JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseSession(document.RootElement, options); + } + + internal static InternalRealtimeResponseSession DeserializeInternalRealtimeResponseSession(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseSessionObject @object = default; + string id = default; + string model = default; + IList modalities = default; + string instructions = default; + ConversationVoice voice = default; + ConversationAudioFormat inputAudioFormat = default; + ConversationAudioFormat outputAudioFormat = default; + ConversationInputTranscriptionOptions inputAudioTranscription = default; + ConversationTurnDetectionOptions turnDetection = default; + IList tools = default; + BinaryData toolChoice = default; + float temperature = default; + RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseSessionObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("modalities"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); + } + modalities = array; + continue; + } + if (prop.NameEquals("instructions"u8)) + { + instructions = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("voice"u8)) + { + voice = new ConversationVoice(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("input_audio_format"u8)) + { + inputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("output_audio_format"u8)) + { + outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("input_audio_transcription"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + inputAudioTranscription = null; + continue; + } + inputAudioTranscription = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("turn_detection"u8)) + { + turnDetection = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("tools"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationTool.DeserializeConversationTool(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("temperature"u8)) + { + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("max_response_output_tokens"u8)) + { + maxResponseOutputTokens = RealtimeConversation.ConversationMaxTokensChoice.DeserializeConversationMaxTokensChoice(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseSession( + @object, + id, + model, + modalities, + instructions, + voice, + inputAudioFormat, + outputAudioFormat, + inputAudioTranscription, + turnDetection, + tools, + toolChoice, + temperature, + maxResponseOutputTokens, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseSession IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponseSession PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseSession(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseSession internalRealtimeResponseSession) + { + return BinaryContent.Create(internalRealtimeResponseSession, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseSession(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseSession(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs new file mode 100644 index 000000000..1a4a640e3 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -0,0 +1,77 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseSession + { + private protected IDictionary _additionalBinaryDataProperties; + + internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens) + { + Id = id; + Model = model; + Modalities = modalities.ToList(); + Instructions = instructions; + Voice = voice; + InputAudioFormat = inputAudioFormat; + OutputAudioFormat = outputAudioFormat; + InputAudioTranscription = inputAudioTranscription; + TurnDetection = turnDetection; + Tools = tools.ToList(); + ToolChoice = toolChoice; + Temperature = temperature; + MaxResponseOutputTokens = maxResponseOutputTokens; + } + + internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IList tools, BinaryData toolChoice, float temperature, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) + { + Object = @object; + Id = id; + Model = model; + Modalities = modalities; + Instructions = instructions; + Voice = voice; + InputAudioFormat = inputAudioFormat; + OutputAudioFormat = outputAudioFormat; + InputAudioTranscription = inputAudioTranscription; + TurnDetection = turnDetection; + Tools = tools; + ToolChoice = toolChoice; + Temperature = temperature; + MaxResponseOutputTokens = maxResponseOutputTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public InternalRealtimeResponseSessionObject Object { get; } = "realtime.session"; + + public string Id { get; set; } + + public string Model { get; set; } + + public IList Modalities { get; } + + public string Instructions { get; set; } + + public ConversationVoice Voice { get; set; } + + public ConversationAudioFormat InputAudioFormat { get; set; } + + public ConversationAudioFormat OutputAudioFormat { get; set; } + + public ConversationInputTranscriptionOptions InputAudioTranscription { get; set; } + + public ConversationTurnDetectionOptions TurnDetection { get; set; } + + public IList Tools { get; } + + public BinaryData ToolChoice { get; set; } + + public float Temperature { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs new file mode 100644 index 000000000..25c95ee15 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal readonly partial struct InternalRealtimeResponseSessionObject : IEquatable + { + private readonly string _value; + private const string RealtimeSessionValue = "realtime.session"; + + public InternalRealtimeResponseSessionObject(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + public static InternalRealtimeResponseSessionObject RealtimeSession { get; } = new InternalRealtimeResponseSessionObject(RealtimeSessionValue); + + public static bool operator ==(InternalRealtimeResponseSessionObject left, InternalRealtimeResponseSessionObject right) => left.Equals(right); + + public static bool operator !=(InternalRealtimeResponseSessionObject left, InternalRealtimeResponseSessionObject right) => !left.Equals(right); + + public static implicit operator InternalRealtimeResponseSessionObject(string value) => new InternalRealtimeResponseSessionObject(value); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternalRealtimeResponseSessionObject other && Equals(other); + + public bool Equals(InternalRealtimeResponseSessionObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + public override string ToString() => _value; + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs new file mode 100644 index 000000000..7c3725c0f --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs @@ -0,0 +1,132 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeResponseStatusDetails))] + internal abstract partial class InternalRealtimeResponseStatusDetails : IJsonModel + { + internal InternalRealtimeResponseStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeResponseStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); + } + + internal static InternalRealtimeResponseStatusDetails DeserializeInternalRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "cancelled": + return InternalRealtimeResponseCancelledStatusDetails.DeserializeInternalRealtimeResponseCancelledStatusDetails(element, options); + case "incomplete": + return InternalRealtimeResponseIncompleteStatusDetails.DeserializeInternalRealtimeResponseIncompleteStatusDetails(element, options); + case "failed": + return RealtimeResponseFailedStatusDetails.DeserializeRealtimeResponseFailedStatusDetails(element, options); + } + } + return UnknownRealtimeResponseStatusDetails.DeserializeUnknownRealtimeResponseStatusDetails(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseStatusDetails internalRealtimeResponseStatusDetails) + { + return BinaryContent.Create(internalRealtimeResponseStatusDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseStatusDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs new file mode 100644 index 000000000..3dbd8e04f --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal abstract partial class InternalRealtimeResponseStatusDetails + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRealtimeResponseStatusDetails(ConversationStatus @type) + { + Type = @type; + } + + internal InternalRealtimeResponseStatusDetails(ConversationStatus @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal ConversationStatus Type { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs new file mode 100644 index 000000000..2d548ed1f --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -0,0 +1,126 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseTextContentPart : IJsonModel + { + internal InternalRealtimeResponseTextContentPart() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + + InternalRealtimeResponseTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseTextContentPart)JsonModelCreateCore(ref reader, options); + + protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement, options); + } + + internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealtimeResponseTextContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + ConversationContentPartKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("text"u8)) + { + text = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeResponseTextContentPart(text, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseTextContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseTextContentPart)PersistableModelCreateCore(data, options); + + protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeResponseTextContentPart internalRealtimeResponseTextContentPart) + { + return BinaryContent.Create(internalRealtimeResponseTextContentPart, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeResponseTextContentPart(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeResponseTextContentPart(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs new file mode 100644 index 000000000..53a4b91a8 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeResponseTextContentPart : ConversationContentPart + { + internal InternalRealtimeResponseTextContentPart(string text) : base(ConversationContentPartKind.Text) + { + Text = text; + } + + internal InternalRealtimeResponseTextContentPart(string text, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Text = text; + } + + public string Text { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs new file mode 100644 index 000000000..b43851056 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -0,0 +1,162 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeServerVadTurnDetection : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Threshold)) + { + writer.WritePropertyName("threshold"u8); + writer.WriteNumberValue(Threshold.Value); + } + if (Optional.IsDefined(PrefixPaddingMs)) + { + writer.WritePropertyName("prefix_padding_ms"u8); + this.SerializePrefixPaddingMs(writer, options); + } + if (Optional.IsDefined(SilenceDurationMs)) + { + writer.WritePropertyName("silence_duration_ms"u8); + this.SerializeSilenceDurationMs(writer, options); + } + } + + InternalRealtimeServerVadTurnDetection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerVadTurnDetection)JsonModelCreateCore(ref reader, options); + + protected override ConversationTurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement, options); + } + + internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealtimeServerVadTurnDetection(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float? threshold = default; + TimeSpan? prefixPaddingMs = default; + TimeSpan? silenceDurationMs = default; + RealtimeConversation.ConversationTurnDetectionKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("threshold"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("prefix_padding_ms"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + prefixPaddingMs = null; + continue; + } + DeserializeMillisecondDuration(prop, ref prefixPaddingMs); + continue; + } + if (prop.NameEquals("silence_duration_ms"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + silenceDurationMs = null; + continue; + } + DeserializeMillisecondDuration(prop, ref silenceDurationMs); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationTurnDetectionKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeServerVadTurnDetection(threshold, prefixPaddingMs, silenceDurationMs, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeServerVadTurnDetection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerVadTurnDetection)PersistableModelCreateCore(data, options); + + protected override ConversationTurnDetectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeServerVadTurnDetection internalRealtimeServerVadTurnDetection) + { + return BinaryContent.Create(internalRealtimeServerVadTurnDetection, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeServerVadTurnDetection(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeServerVadTurnDetection(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs new file mode 100644 index 000000000..1b4727ea7 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeServerVadTurnDetection : ConversationTurnDetectionOptions + { + public InternalRealtimeServerVadTurnDetection() + { + } + + internal InternalRealtimeServerVadTurnDetection(float? threshold, TimeSpan? prefixPaddingMs, TimeSpan? silenceDurationMs, RealtimeConversation.ConversationTurnDetectionKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + Threshold = threshold; + PrefixPaddingMs = prefixPaddingMs; + SilenceDurationMs = silenceDurationMs; + } + + public float? Threshold { get; set; } + + public TimeSpan? PrefixPaddingMs { get; set; } + + public TimeSpan? SilenceDurationMs { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs new file mode 100644 index 000000000..5dcefd4c0 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -0,0 +1,126 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeToolChoiceFunctionObject : IJsonModel + { + internal InternalRealtimeToolChoiceFunctionObject() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); + } + + InternalRealtimeToolChoiceFunctionObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeToolChoiceFunctionObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeToolChoiceObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement, options); + } + + internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalRealtimeToolChoiceFunctionObject(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeToolChoiceFunctionObjectFunction function = default; + ConversationToolKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("function"u8)) + { + function = InternalRealtimeToolChoiceFunctionObjectFunction.DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationToolKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeToolChoiceFunctionObject(function, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeToolChoiceFunctionObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeToolChoiceFunctionObject)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeToolChoiceObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeToolChoiceFunctionObject internalRealtimeToolChoiceFunctionObject) + { + return BinaryContent.Create(internalRealtimeToolChoiceFunctionObject, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeToolChoiceFunctionObject(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeToolChoiceFunctionObject(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs new file mode 100644 index 000000000..ec130f54a --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeToolChoiceFunctionObject : InternalRealtimeToolChoiceObject + { + public InternalRealtimeToolChoiceFunctionObject(InternalRealtimeToolChoiceFunctionObjectFunction function) : base(ConversationToolKind.Function) + { + Argument.AssertNotNull(function, nameof(function)); + + Function = function; + } + + internal InternalRealtimeToolChoiceFunctionObject(InternalRealtimeToolChoiceFunctionObjectFunction function, ConversationToolKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Function = function; + } + + public InternalRealtimeToolChoiceFunctionObjectFunction Function { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs new file mode 100644 index 000000000..b1babb920 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -0,0 +1,134 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeToolChoiceFunctionObjectFunction : IJsonModel + { + internal InternalRealtimeToolChoiceFunctionObjectFunction() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeToolChoiceFunctionObjectFunction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeToolChoiceFunctionObjectFunction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement, options); + } + + internal static InternalRealtimeToolChoiceFunctionObjectFunction DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InternalRealtimeToolChoiceFunctionObjectFunction(name, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeToolChoiceFunctionObjectFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeToolChoiceFunctionObjectFunction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeToolChoiceFunctionObjectFunction internalRealtimeToolChoiceFunctionObjectFunction) + { + return BinaryContent.Create(internalRealtimeToolChoiceFunctionObjectFunction, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeToolChoiceFunctionObjectFunction(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs new file mode 100644 index 000000000..0efa8494e --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class InternalRealtimeToolChoiceFunctionObjectFunction + { + private protected IDictionary _additionalBinaryDataProperties; + + public InternalRealtimeToolChoiceFunctionObjectFunction(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + internal InternalRealtimeToolChoiceFunctionObjectFunction(string name, IDictionary additionalBinaryDataProperties) + { + Name = name; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + public string Name { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs new file mode 100644 index 000000000..89a9c27f4 --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -0,0 +1,128 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + [PersistableModelProxy(typeof(UnknownRealtimeToolChoiceObject))] + internal abstract partial class InternalRealtimeToolChoiceObject : IJsonModel + { + internal InternalRealtimeToolChoiceObject() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeToolChoiceObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); + } + + internal static InternalRealtimeToolChoiceObject DeserializeInternalRealtimeToolChoiceObject(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "function": + return InternalRealtimeToolChoiceFunctionObject.DeserializeInternalRealtimeToolChoiceFunctionObject(element, options); + } + } + return UnknownRealtimeToolChoiceObject.DeserializeUnknownRealtimeToolChoiceObject(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual InternalRealtimeToolChoiceObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(InternalRealtimeToolChoiceObject internalRealtimeToolChoiceObject) + { + return BinaryContent.Create(internalRealtimeToolChoiceObject, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator InternalRealtimeToolChoiceObject(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs new file mode 100644 index 000000000..16ca335fe --- /dev/null +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal abstract partial class InternalRealtimeToolChoiceObject + { + private protected IDictionary _additionalBinaryDataProperties; + + private protected InternalRealtimeToolChoiceObject(ConversationToolKind @type) + { + Type = @type; + } + + internal InternalRealtimeToolChoiceObject(ConversationToolKind @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal ConversationToolKind Type { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 13fe9131c..1238f484d 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -53,7 +53,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Schema)) { writer.WritePropertyName("schema"u8); - writer.WriteObjectValue(Schema, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Schema); +#else + using (JsonDocument document = JsonDocument.Parse(Schema)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -127,9 +134,10 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe { if (prop.Value.ValueKind == JsonValueKind.Null) { + schema = null; continue; } - schema = BinaryData.DeserializeBinaryData(prop.Value, options); + schema = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 124ec7adb..337eb9a54 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -73,6 +73,11 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des } if (prop.NameEquals("logs"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + internalLogs = null; + continue; + } internalLogs = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index 4a049e7ff..1dc89b626 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -101,6 +101,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri { if (prop.Value.ValueKind == JsonValueKind.Null) { + rankingOptions = null; continue; } rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index 2780afb19..c62c71189 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -34,12 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (ToolDefinition item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + this.SerializeTools(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -88,12 +83,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J } if (prop.NameEquals("tools"u8)) { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; + DeserializeTools(prop, ref tools); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index d22c0f4d6..8e5dbf597 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -70,12 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteNumberValue((int)Role); writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (MessageContent item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + this.SerializeContent(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index ea437f5e6..cbe8aad44 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -27,6 +27,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModerationOptions)} does not support writing '{format}' format."); } + writer.WritePropertyName("input"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Input); +#else + using (JsonDocument document = JsonDocument.Parse(Input)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteObjectValue?>(Model, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +77,32 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme { return null; } + BinaryData input = default; + Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel? model = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("input"u8)) + { + input = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("model"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel?.DeserializeOpenAI.Moderations.InternalCreateModerationRequestModel(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ModerationOptions(additionalBinaryDataProperties); + return new ModerationOptions(input, model, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index 1f4e822d2..133d620c7 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -11,8 +11,10 @@ internal partial class ModerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ModerationOptions(IDictionary additionalBinaryDataProperties) + internal ModerationOptions(BinaryData input, Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) { + Input = input; + Model = model; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 83da2aac5..0fd195180 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -34,7 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("index"u8); writer.WriteNumberValue(Index); writer.WritePropertyName("embedding"u8); - writer.WriteObjectValue(EmbeddingProperty, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(EmbeddingProperty); +#else + using (JsonDocument document = JsonDocument.Parse(EmbeddingProperty)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,6 +82,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, } int index = default; BinaryData embeddingProperty = default; + InternalEmbeddingObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -83,7 +93,12 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, } if (prop.NameEquals("embedding"u8)) { - embeddingProperty = BinaryData.DeserializeBinaryData(prop.Value, options); + embeddingProperty = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("object"u8)) + { + @object = InternalEmbeddingObject.DeserializeInternalEmbeddingObject(prop.Value, options); continue; } if (options.Format != "W") @@ -91,7 +106,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OpenAIEmbedding(index, embeddingProperty, additionalBinaryDataProperties); + return new OpenAIEmbedding(index, embeddingProperty, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index 2c4ead79b..d8155e1bb 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -11,11 +11,11 @@ public partial class OpenAIEmbedding { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIEmbedding(int index, BinaryData embeddingProperty, IDictionary additionalBinaryDataProperties) + internal OpenAIEmbedding(int index, BinaryData embeddingProperty, InternalEmbeddingObject @object) { Index = index; EmbeddingProperty = embeddingProperty; - _additionalBinaryDataProperties = additionalBinaryDataProperties; + Object = @object; } public int Index { get; set; } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 6488974cf..87c430732 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -39,6 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Filename); writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToSerialString()); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (SizeInBytes != null) { writer.WritePropertyName("bytes"u8); @@ -48,6 +50,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("bytes"u8); } + writer.WritePropertyName("status"u8); + writer.WriteNumberValue((int)Status); + if (Optional.IsDefined(StatusDetails)) + { + writer.WritePropertyName("status_details"u8); + writer.WriteStringValue(StatusDetails); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -88,7 +97,10 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade DateTimeOffset createdAt = default; string filename = default; Files.FilePurpose purpose = default; + InternalOpenAIFileObject @object = default; int? sizeInBytes = default; + Files.FileStatus status = default; + string statusDetails = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -112,6 +124,11 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade purpose = prop.Value.GetString().ToFilePurpose(); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalOpenAIFileObject.DeserializeInternalOpenAIFileObject(prop.Value, options); + continue; + } if (prop.NameEquals("bytes"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -122,6 +139,21 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade sizeInBytes = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("status"u8)) + { + status = prop.Value.GetInt32().ToFileStatus(); + continue; + } + if (prop.NameEquals("status_details"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + statusDetails = null; + continue; + } + statusDetails = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -132,7 +164,10 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade createdAt, filename, purpose, + @object, sizeInBytes, + status, + statusDetails, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index b81b58b97..371219856 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -11,22 +11,27 @@ public partial class OpenAIFile { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes) + internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, InternalOpenAIFileObject @object, int? sizeInBytes, Files.FileStatus status) { Id = id; CreatedAt = createdAt; Filename = filename; Purpose = purpose; + Object = @object; SizeInBytes = sizeInBytes; + Status = status; } - internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes, IDictionary additionalBinaryDataProperties) + internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, InternalOpenAIFileObject @object, int? sizeInBytes, Files.FileStatus status, string statusDetails, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; Filename = filename; Purpose = purpose; + Object = @object; SizeInBytes = sizeInBytes; + Status = status; + StatusDetails = statusDetails; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 22fe922da..7d52004c8 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -19,6 +19,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support writing '{format}' format."); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index 27e4312a6..81e20b72c 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -11,8 +11,14 @@ public partial class OpenAIFileCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFileCollection(IDictionary additionalBinaryDataProperties) + internal OpenAIFileCollection(InternalListFilesResponseObject @object) { + Object = @object; + } + + internal OpenAIFileCollection(InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) + { + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index a19a827d2..0b6fa1ff9 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -35,6 +35,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Id); writer.WritePropertyName("owned_by"u8); writer.WriteStringValue(OwnedBy); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -75,6 +77,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea } string id = default; string ownedBy = default; + InternalModelObject @object = default; DateTimeOffset createdAt = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -89,6 +92,11 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea ownedBy = prop.Value.GetString(); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalModelObject.DeserializeInternalModelObject(prop.Value, options); + continue; + } if (prop.NameEquals("created"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -99,7 +107,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OpenAIModel(id, ownedBy, createdAt, additionalBinaryDataProperties); + return new OpenAIModel(id, ownedBy, @object, createdAt, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index 92a7136ca..439f54ad3 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -11,17 +11,19 @@ public partial class OpenAIModel { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt) + internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, DateTimeOffset createdAt) { Id = id; OwnedBy = ownedBy; + Object = @object; CreatedAt = createdAt; } - internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) + internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; OwnedBy = ownedBy; + Object = @object; CreatedAt = createdAt; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index d0827f745..ff8c5e6b2 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -19,6 +19,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support writing '{format}' format."); } + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index ad1eb54e4..3af33c0ff 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -11,8 +11,14 @@ public partial class OpenAIModelCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModelCollection(IDictionary additionalBinaryDataProperties) + internal OpenAIModelCollection(InternalListModelsResponseObject @object) { + Object = @object; + } + + internal OpenAIModelCollection(InternalListModelsResponseObject @object, IDictionary additionalBinaryDataProperties) + { + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs new file mode 100644 index 000000000..4c1adc531 --- /dev/null +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs @@ -0,0 +1,133 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class RealtimeResponseFailedStatusDetails : IJsonModel + { + internal RealtimeResponseFailedStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + + RealtimeResponseFailedStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (RealtimeResponseFailedStatusDetails)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); + } + + internal static RealtimeResponseFailedStatusDetails DeserializeRealtimeResponseFailedStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData error = default; + ConversationStatus @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("error"u8)) + { + error = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RealtimeResponseFailedStatusDetails(error, @type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + RealtimeResponseFailedStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (RealtimeResponseFailedStatusDetails)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(RealtimeResponseFailedStatusDetails realtimeResponseFailedStatusDetails) + { + return BinaryContent.Create(realtimeResponseFailedStatusDetails, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator RealtimeResponseFailedStatusDetails(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs new file mode 100644 index 000000000..4d00a9a00 --- /dev/null +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs @@ -0,0 +1,24 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class RealtimeResponseFailedStatusDetails : InternalRealtimeResponseStatusDetails + { + internal RealtimeResponseFailedStatusDetails(BinaryData error) : base(ConversationStatus.Failed) + { + Error = error; + } + + internal RealtimeResponseFailedStatusDetails(BinaryData error, ConversationStatus @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + { + Error = error; + } + + public BinaryData Error { get; set; } + } +} diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 67f317073..56572e8fc 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -128,6 +128,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("tools"u8); } } + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); + } + } + if (Optional.IsDefined(Temperature)) + { + if (Temperature != null) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + else + { + writer.WriteNull("temperature"u8); + } + } if (Optional.IsDefined(NucleusSamplingFactor)) { if (NucleusSamplingFactor != null) @@ -164,12 +199,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxCompletionTokens"u8); } } + if (Optional.IsDefined(TruncationStrategy)) + { + if (TruncationStrategy != null) + { + writer.WritePropertyName("truncation_strategy"u8); + writer.WriteObjectValue(TruncationStrategy, options); + } + else + { + writer.WriteNull("truncationStrategy"u8); + } + } if (Optional.IsDefined(ToolConstraint)) { if (ToolConstraint != null) { writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolConstraint, options); + this.SerializeToolConstraint(writer, options); } else { @@ -221,9 +268,12 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele IList internalMessages = default; bool? allowParallelToolCalls = default; IList toolsOverride = default; + IDictionary metadata = default; + float? temperature = default; float? nucleusSamplingFactor = default; int? maxInputTokenCount = default; int? maxOutputTokenCount = default; + RunTruncationStrategy truncationStrategy = default; ToolConstraint toolConstraint = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -247,6 +297,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele { if (prop.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); @@ -254,16 +305,31 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele } if (prop.NameEquals("model"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + modelOverride = null; + continue; + } modelOverride = prop.Value.GetString(); continue; } if (prop.NameEquals("instructions"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + instructionsOverride = null; + continue; + } instructionsOverride = prop.Value.GetString(); continue; } if (prop.NameEquals("additional_instructions"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + additionalInstructions = null; + continue; + } additionalInstructions = prop.Value.GetString(); continue; } @@ -305,6 +371,37 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele toolsOverride = array; continue; } + if (prop.NameEquals("metadata"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + metadata = dictionary; + continue; + } + if (prop.NameEquals("temperature"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + temperature = null; + continue; + } + temperature = prop.Value.GetSingle(); + continue; + } if (prop.NameEquals("top_p"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -335,10 +432,21 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele maxOutputTokenCount = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("truncation_strategy"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + truncationStrategy = null; + continue; + } + truncationStrategy = RunTruncationStrategy.DeserializeRunTruncationStrategy(prop.Value, options); + continue; + } if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolConstraint = null; continue; } toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); @@ -359,9 +467,12 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele internalMessages ?? new ChangeTrackingList(), allowParallelToolCalls, toolsOverride ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + temperature, nucleusSamplingFactor, maxInputTokenCount, maxOutputTokenCount, + truncationStrategy, toolConstraint, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index be2a9a20a..66f3818e3 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -11,7 +11,7 @@ public partial class RunCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? allowParallelToolCalls, IList toolsOverride, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) + internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Stream = stream; @@ -22,9 +22,12 @@ internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseF InternalMessages = internalMessages; AllowParallelToolCalls = allowParallelToolCalls; ToolsOverride = toolsOverride; + Metadata = metadata; + Temperature = temperature; NucleusSamplingFactor = nucleusSamplingFactor; MaxInputTokenCount = maxInputTokenCount; MaxOutputTokenCount = maxOutputTokenCount; + TruncationStrategy = truncationStrategy; ToolConstraint = toolConstraint; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 1888c1cf9..0f137171d 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -169,6 +169,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion { if (prop.Value.ValueKind == JsonValueKind.Null) { + usage = null; continue; } usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 7fbf4682a..45b5180a6 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(FunctionArgumentsUpdate)) { writer.WritePropertyName("arguments"u8); - writer.WriteObjectValue(FunctionArgumentsUpdate, options); + this.SerializeFunctionArgumentsUpdateValue(writer, options); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -80,6 +80,11 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction { if (prop.NameEquals("name"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + functionName = null; + continue; + } functionName = prop.Value.GetString(); continue; } @@ -87,9 +92,10 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction { if (prop.Value.ValueKind == JsonValueKind.Null) { + functionArgumentsUpdate = null; continue; } - functionArgumentsUpdate = BinaryData.DeserializeBinaryData(prop.Value, options); + DeserializeFunctionArgumentsUpdateValue(prop, ref functionArgumentsUpdate); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index a6c5958d4..309328bba 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -97,6 +97,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda { if (prop.Value.ValueKind == JsonValueKind.Null) { + function = null; continue; } function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); @@ -106,6 +107,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda { if (prop.Value.ValueKind == JsonValueKind.Null) { + kind = null; continue; } kind = prop.Value.GetInt32().ToChatToolCallKind(); @@ -113,6 +115,11 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda } if (prop.NameEquals("id"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolCallId = null; + continue; + } toolCallId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index 910d6c972..d784ccf22 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -73,6 +73,11 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme } if (prop.NameEquals("name"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + participantName = null; + continue; + } participantName = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index 438a920fc..de5236b59 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -139,6 +139,7 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolResources = null; continue; } toolResources = ToolResources.DeserializeToolResources(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index d8a24b966..1c1f9b1e2 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -115,6 +115,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Object, options); writer.WritePropertyName("role"u8); writer.WriteNumberValue((int)Role); + if (Attachments != null && Optional.IsCollectionDefined(Attachments)) + { + writer.WritePropertyName("attachments"u8); + writer.WriteStartArray(); + foreach (MessageCreationAttachment item in Attachments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("attachments"u8); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -164,6 +178,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode IDictionary metadata = default; InternalMessageObjectObject @object = default; Assistants.MessageRole role = default; + IReadOnlyList attachments = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -279,6 +294,16 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode role = prop.Value.GetInt32().ToMessageRole(); continue; } + if (prop.NameEquals("attachments"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(MessageCreationAttachment.DeserializeMessageCreationAttachment(item, options)); + } + attachments = array; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -298,6 +323,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode metadata, @object, role, + attachments, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 76b6ff196..33bdeb278 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -12,7 +12,7 @@ public partial class ThreadMessage { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IEnumerable attachments) { Id = id; CreatedAt = createdAt; @@ -27,9 +27,10 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes Metadata = metadata; Object = @object; Role = role; + Attachments = attachments.ToList(); } - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IList content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IDictionary additionalBinaryDataProperties) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IList content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IReadOnlyList attachments, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -44,6 +45,7 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes Metadata = metadata; Object = @object; Role = role; + Attachments = attachments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index e391ae723..17fb6d78f 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -128,6 +128,7 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J { if (prop.Value.ValueKind == JsonValueKind.Null) { + toolResources = null; continue; } toolResources = ToolResources.DeserializeToolResources(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index b42cd83d5..2b7958481 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -27,6 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolResources)} does not support writing '{format}' format."); } + if (Optional.IsDefined(CodeInterpreter)) + { + writer.WritePropertyName("code_interpreter"u8); + writer.WriteObjectValue(CodeInterpreter, options); + } + if (Optional.IsDefined(FileSearch)) + { + writer.WritePropertyName("file_search"u8); + this.SerializeFileSearch(writer, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +73,37 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode { return null; } + CodeInterpreterToolResources codeInterpreter = default; + FileSearchToolResources fileSearch = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("code_interpreter"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + codeInterpreter = null; + continue; + } + codeInterpreter = CodeInterpreterToolResources.DeserializeCodeInterpreterToolResources(prop.Value, options); + continue; + } + if (prop.NameEquals("file_search"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + fileSearch = null; + continue; + } + fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolResources(additionalBinaryDataProperties); + return new ToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ToolResources.cs b/.dotnet/src/Generated/Models/ToolResources.cs index 5805618c9..9eb9eb142 100644 --- a/.dotnet/src/Generated/Models/ToolResources.cs +++ b/.dotnet/src/Generated/Models/ToolResources.cs @@ -11,8 +11,10 @@ public partial class ToolResources { private protected IDictionary _additionalBinaryDataProperties; - internal ToolResources(IDictionary additionalBinaryDataProperties) + internal ToolResources(CodeInterpreterToolResources codeInterpreter, FileSearchToolResources fileSearch, IDictionary additionalBinaryDataProperties) { + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs new file mode 100644 index 000000000..cb3e19b71 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeContentPart : IJsonModel + { + internal UnknownRealtimeContentPart() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeContentPart)JsonModelCreateCore(ref reader, options); + + protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationContentPart(document.RootElement, options); + } + + internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationContentPartKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeContentPart(@type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{options.Format}' format."); + } + } + + ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeContentPart)PersistableModelCreateCore(data, options); + + protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationContentPart(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationContentPart)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs new file mode 100644 index 000000000..9bfe0301d --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeContentPart : ConversationContentPart + { + internal UnknownRealtimeContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs new file mode 100644 index 000000000..449c9e251 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs @@ -0,0 +1,116 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeRequestCommand : IJsonModel + { + internal UnknownRealtimeRequestCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeRequestCommand)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + } + + internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestCommandType kind = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeRequestCommand(kind, eventId, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeRequestCommand)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs new file mode 100644 index 000000000..dc3c69875 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeRequestCommand : InternalRealtimeRequestCommand + { + internal UnknownRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind != default ? kind : "unknown", eventId, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs new file mode 100644 index 000000000..37a2b7911 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -0,0 +1,116 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeRequestItem : IJsonModel + { + internal UnknownRealtimeRequestItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeRequestItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItem(document.RootElement, options); + } + + internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeRequestItem(@type, id, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{options.Format}' format."); + } + } + + ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeRequestItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs new file mode 100644 index 000000000..ec27f2635 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeRequestItem : ConversationItem + { + internal UnknownRealtimeRequestItem(InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", id, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs new file mode 100644 index 000000000..aab739953 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -0,0 +1,134 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; +using OpenAI.RealtimeConversation; + +namespace OpenAI.Models +{ + internal partial class UnknownRealtimeRequestMessageItem : IJsonModel + { + internal UnknownRealtimeRequestMessageItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeRequestMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeRequestMessageItem)JsonModelCreateCore(ref reader, options); + + protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); + } + + internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequestMessageItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeRequestMessageItem(role, status, @type, id, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeRequestMessageItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeRequestMessageItem)PersistableModelCreateCore(data, options); + + protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeRequestMessageItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs new file mode 100644 index 000000000..7e4bdfe02 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using OpenAI.RealtimeConversation; + +namespace OpenAI.Models +{ + internal partial class UnknownRealtimeRequestMessageItem : InternalRealtimeRequestMessageItem + { + internal UnknownRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role != default ? role : "unknown", status, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs new file mode 100644 index 000000000..fe4296da2 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs @@ -0,0 +1,116 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseCommand : IJsonModel + { + internal UnknownRealtimeResponseCommand() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseCommand)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationUpdate(document.RootElement, options); + } + + internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeResponseCommand(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationUpdateKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeResponseCommand(eventId, kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseCommand)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs new file mode 100644 index 000000000..3c7dd6f2e --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseCommand : ConversationUpdate + { + internal UnknownRealtimeResponseCommand(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs new file mode 100644 index 000000000..05f758941 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseItem : IJsonModel + { + internal UnknownRealtimeResponseItem() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseItem)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseItem(document.RootElement, options); + } + + internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalRealtimeResponseItemObject @object = default; + InternalRealtimeRequestItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("object"u8)) + { + @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeResponseItem(@object, @type, id, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseItem)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs new file mode 100644 index 000000000..408c767c8 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseItem : InternalRealtimeResponseItem + { + internal UnknownRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs new file mode 100644 index 000000000..daa5c4a99 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseStatusDetails : IJsonModel + { + internal UnknownRealtimeResponseStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeResponseStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); + } + + internal static UnknownRealtimeResponseStatusDetails DeserializeUnknownRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationStatus @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeResponseStatusDetails(@type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeResponseStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs new file mode 100644 index 000000000..2dafe7385 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseStatusDetails : InternalRealtimeResponseStatusDetails + { + internal UnknownRealtimeResponseStatusDetails(ConversationStatus @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs new file mode 100644 index 000000000..4fe841333 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeTool : IJsonModel + { + internal UnknownRealtimeTool() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeTool)JsonModelCreateCore(ref reader, options); + + protected override ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationTool(document.RootElement, options); + } + + internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationToolKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = ConversationToolKind.DeserializeConversationToolKind(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeTool(kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{options.Format}' format."); + } + } + + ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeTool)PersistableModelCreateCore(data, options); + + protected override ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationTool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs new file mode 100644 index 000000000..253769cb3 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeTool : ConversationTool + { + internal UnknownRealtimeTool(ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs new file mode 100644 index 000000000..04c6f8b5f --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeToolChoiceObject : IJsonModel + { + internal UnknownRealtimeToolChoiceObject() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeToolChoiceObject)JsonModelCreateCore(ref reader, options); + + protected override InternalRealtimeToolChoiceObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); + } + + internal static UnknownRealtimeToolChoiceObject DeserializeUnknownRealtimeToolChoiceObject(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationToolKind @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new ConversationToolKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeToolChoiceObject(@type, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{options.Format}' format."); + } + } + + InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeToolChoiceObject)PersistableModelCreateCore(data, options); + + protected override InternalRealtimeToolChoiceObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeInternalRealtimeToolChoiceObject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs new file mode 100644 index 000000000..b98513580 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeToolChoiceObject : InternalRealtimeToolChoiceObject + { + internal UnknownRealtimeToolChoiceObject(ConversationToolKind @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs new file mode 100644 index 000000000..87b8a57c9 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeTurnDetection : IJsonModel + { + internal UnknownRealtimeTurnDetection() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeTurnDetection)JsonModelCreateCore(ref reader, options); + + protected override ConversationTurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(document.RootElement, options); + } + + internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetection(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RealtimeConversation.ConversationTurnDetectionKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetInt32().ToConversationTurnDetectionKind(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeTurnDetection(kind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{options.Format}' format."); + } + } + + ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeTurnDetection)PersistableModelCreateCore(data, options); + + protected override ConversationTurnDetectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs new file mode 100644 index 000000000..e5706b570 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeTurnDetection : ConversationTurnDetectionOptions + { + internal UnknownRealtimeTurnDetection(RealtimeConversation.ConversationTurnDetectionKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 6fddf6e08..a18b18313 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -73,6 +73,11 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, } if (prop.NameEquals("name"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + participantName = null; + continue; + } participantName = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 2c336d4bc..f28ce043b 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -222,6 +222,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea { if (prop.Value.ValueKind == JsonValueKind.Null) { + expirationPolicy = null; continue; } expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 0f50899cf..0872bd35a 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -41,6 +41,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("id"u8); writer.WriteStringValue(BatchId); + writer.WritePropertyName("file_counts"u8); + writer.WriteObjectValue(FileCounts, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -82,6 +84,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE string vectorStoreId = default; VectorStoreBatchFileJobStatus status = default; string batchId = default; + VectorStoreFileCounts fileCounts = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -110,6 +113,11 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE batchId = prop.Value.GetString(); continue; } + if (prop.NameEquals("file_counts"u8)) + { + fileCounts = VectorStoreFileCounts.DeserializeVectorStoreFileCounts(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -121,6 +129,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE vectorStoreId, status, batchId, + fileCounts, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index 1dd7f3786..115b2235b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -11,21 +11,23 @@ public partial class VectorStoreBatchFileJob { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId) + internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts) { CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; BatchId = batchId; + FileCounts = fileCounts; } - internal VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, IDictionary additionalBinaryDataProperties) + internal VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, IDictionary additionalBinaryDataProperties) { Object = @object; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; BatchId = batchId; + FileCounts = fileCounts; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index bed62ab22..d69622ffd 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -152,6 +152,7 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J { if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 74531a83e..073fc0d65 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -180,6 +180,7 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { + expirationPolicy = null; continue; } expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); @@ -189,6 +190,7 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 9b1968baf..9af141b17 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -35,6 +35,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteBooleanValue(Deleted); writer.WritePropertyName("id"u8); writer.WriteStringValue(VectorStoreId); + writer.WritePropertyName("object"u8); + writer.WriteObjectValue(Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -73,6 +75,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J } bool deleted = default; string vectorStoreId = default; + InternalDeleteVectorStoreResponseObject @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -86,12 +89,17 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J vectorStoreId = prop.Value.GetString(); continue; } + if (prop.NameEquals("object"u8)) + { + @object = InternalDeleteVectorStoreResponseObject.DeserializeInternalDeleteVectorStoreResponseObject(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreDeletionResult(deleted, vectorStoreId, additionalBinaryDataProperties); + return new VectorStoreDeletionResult(deleted, vectorStoreId, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 873954b84..74cf85f83 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -11,16 +11,18 @@ public partial class VectorStoreDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreDeletionResult(bool deleted, string vectorStoreId) + internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalDeleteVectorStoreResponseObject @object) { Deleted = deleted; VectorStoreId = vectorStoreId; + Object = @object; } - internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, IDictionary additionalBinaryDataProperties) + internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalDeleteVectorStoreResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; VectorStoreId = vectorStoreId; + Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index f979aa7e3..054cbdfe7 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -27,6 +27,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); } + writer.WritePropertyName("anchor"u8); + writer.WriteNumberValue((int)Anchor); + writer.WritePropertyName("days"u8); + writer.WriteNumberValue(Days); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -63,15 +67,27 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli { return null; } + VectorStores.VectorStoreExpirationAnchor anchor = default; + int days = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("anchor"u8)) + { + anchor = prop.Value.GetInt32().ToVectorStoreExpirationAnchor(); + continue; + } + if (prop.NameEquals("days"u8)) + { + days = prop.Value.GetInt32(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VectorStoreExpirationPolicy(additionalBinaryDataProperties); + return new VectorStoreExpirationPolicy(anchor, days, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs index c47689180..af60e2adc 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs @@ -10,10 +10,5 @@ namespace OpenAI.VectorStores public partial class VectorStoreExpirationPolicy { private protected IDictionary _additionalBinaryDataProperties; - - internal VectorStoreExpirationPolicy(IDictionary additionalBinaryDataProperties) - { - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index 0ad53f177..abe83e18a 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -148,6 +148,7 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation { if (prop.Value.ValueKind == JsonValueKind.Null) { + chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index be19bf4c8..c7e6d3843 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -151,6 +151,7 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio { if (prop.Value.ValueKind == JsonValueKind.Null) { + expirationPolicy = null; continue; } expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 46f4ca606..899452575 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -16,6 +16,7 @@ using OpenAI.LegacyCompletions; using OpenAI.Models; using OpenAI.Moderations; +using OpenAI.RealtimeConversation; using OpenAI.VectorStores; namespace OpenAI @@ -38,6 +39,7 @@ public partial class OpenAIClient private InternalAssistantMessageClient _cachedInternalAssistantMessageClient; private OpenAIModelClient _cachedOpenAIModelClient; private ModerationClient _cachedModerationClient; + private RealtimeConversationClient _cachedRealtimeConversationClient; private InternalAssistantThreadClient _cachedInternalAssistantThreadClient; private InternalAssistantRunClient _cachedInternalAssistantRunClient; private VectorStoreClient _cachedVectorStoreClient; @@ -107,6 +109,11 @@ public virtual ModerationClient GetModerationClientClient() return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(_keyCredential, _endpoint), null) ?? _cachedModerationClient; } + public virtual RealtimeConversationClient GetRealtimeConversationClientClient() + { + return Volatile.Read(ref _cachedRealtimeConversationClient) ?? Interlocked.CompareExchange(ref _cachedRealtimeConversationClient, new RealtimeConversationClient(_keyCredential, _endpoint), null) ?? _cachedRealtimeConversationClient; + } + public virtual InternalAssistantThreadClient GetInternalAssistantThreadClientClient() { return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index ed22c549e..634f5a598 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -13,13 +13,14 @@ using OpenAI.Images; using OpenAI.Models; using OpenAI.Moderations; +using OpenAI.RealtimeConversation; using OpenAI.VectorStores; namespace OpenAI { public static partial class OpenAIModelFactory { - public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdAt = default, string filename = default, Files.FilePurpose purpose = default, int? sizeInBytes = default) + public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdAt = default, string filename = default, Files.FilePurpose purpose = default, InternalOpenAIFileObject @object = default, int? sizeInBytes = default, Files.FileStatus status = default, string statusDetails = default) { return new OpenAIFile( @@ -27,7 +28,10 @@ public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdA createdAt, filename, purpose, + @object, sizeInBytes, + status, + statusDetails, null); } @@ -62,10 +66,10 @@ public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = defau null); } - public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy() + public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy(VectorStores.VectorStoreExpirationAnchor anchor = default, int days = default) { - return new VectorStoreExpirationPolicy(null); + return new VectorStoreExpirationPolicy(anchor, days, null); } public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default, FileChunkingStrategy chunkingStrategy = default) @@ -89,10 +93,10 @@ public static VectorStoreModificationOptions VectorStoreModificationOptions(stri return new VectorStoreModificationOptions(name, metadata, expirationPolicy, null); } - public static VectorStoreDeletionResult VectorStoreDeletionResult(bool deleted = default, string vectorStoreId = default) + public static VectorStoreDeletionResult VectorStoreDeletionResult(bool deleted = default, string vectorStoreId = default, InternalDeleteVectorStoreResponseObject @object = default) { - return new VectorStoreDeletionResult(deleted, vectorStoreId, null); + return new VectorStoreDeletionResult(deleted, vectorStoreId, @object, null); } public static VectorStoreFileAssociation VectorStoreFileAssociation(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, InternalVectorStoreFileObjectObject @object = default, string fileId = default, int size = default, FileChunkingStrategy chunkingStrategy = default) @@ -134,7 +138,7 @@ public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string fileI return new FileFromStoreRemovalResult(fileId, removed, @object, null); } - public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default) + public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default, VectorStoreFileCounts fileCounts = default) { return new VectorStoreBatchFileJob( @@ -143,6 +147,7 @@ public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStor vectorStoreId, status, batchId, + fileCounts, null); } @@ -194,10 +199,10 @@ public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistan return new FileSearchToolDefinition(fileSearch, "file_search", null); } - public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default) + public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default, float scoreThreshold = default) { - return new FileSearchRankingOptions(ranker, null); + return new FileSearchRankingOptions(ranker, scoreThreshold, null); } public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition function = default) @@ -288,10 +293,11 @@ public static RunTokenUsage RunTokenUsage(int outputTokenCount = default, int in return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); } - public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, ToolConstraint toolConstraint = default) + public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, IDictionary metadata = default, float? temperature = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, RunTruncationStrategy truncationStrategy = default, ToolConstraint toolConstraint = default) { internalMessages ??= new ChangeTrackingList(); toolsOverride ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); return new RunCreationOptions( assistantId, @@ -303,9 +309,12 @@ public static RunCreationOptions RunCreationOptions(string assistantId = default internalMessages?.ToList(), allowParallelToolCalls, toolsOverride?.ToList(), + metadata, + temperature, nucleusSamplingFactor, maxInputTokenCount, maxOutputTokenCount, + truncationStrategy, toolConstraint, null); } @@ -384,11 +393,17 @@ public static RunStepTokenUsage RunStepTokenUsage(int outputTokenCount = default return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); } - public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IDictionary metadata = default, InternalThreadObjectObject @object = default) + public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IDictionary metadata = default, InternalThreadObjectObject @object = default, ToolResources toolResources = default) { metadata ??= new ChangeTrackingDictionary(); - return new AssistantThread(id, createdAt, metadata, @object, null); + return new AssistantThread( + id, + createdAt, + metadata, + @object, + toolResources, + null); } public static ThreadModificationOptions ThreadModificationOptions(IDictionary metadata = default, ToolResources toolResources = default) @@ -404,6 +419,371 @@ public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, return new ThreadDeletionResult(deleted, threadId, @object, null); } + public static ConversationSessionOptions ConversationSessionOptions(IEnumerable modalities = default, ConversationVoice? voice = default, string instructions = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, string model = default, RealtimeConversation.ConversationToolChoice toolChoice = default, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default) + { + modalities ??= new ChangeTrackingList(); + tools ??= new ChangeTrackingList(); + + return new ConversationSessionOptions( + modalities?.ToList(), + voice, + instructions, + inputAudioFormat, + outputAudioFormat, + tools?.ToList(), + temperature, + model, + toolChoice, + maxResponseOutputTokens, + turnDetectionOptions, + inputTranscriptionOptions, + null); + } + + public static ConversationInputTranscriptionOptions ConversationInputTranscriptionOptions(ConversationTranscriptionModel? model = default) + { + + return new ConversationInputTranscriptionOptions(model, null); + } + + public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind = default) + { + + return new UnknownRealtimeTurnDetection(kind, null); + } + + public static ConversationTool ConversationTool(ConversationToolKind kind = default) + { + + return new UnknownRealtimeTool(kind, null); + } + + public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default, ConversationToolKind kind = default) + { + + return new ConversationFunctionTool(name, description, parameters, kind, null); + } + + public static ConversationItem ConversationItem(string @type = default, string id = default) + { + + return new UnknownRealtimeRequestItem(new InternalRealtimeRequestItemType(@type), id, null); + } + + public static ConversationContentPart ConversationContentPart(string @type = default) + { + + return new UnknownRealtimeContentPart(new ConversationContentPartKind(@type), null); + } + + public static ConversationUpdate ConversationUpdate(string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new UnknownRealtimeResponseCommand(eventId, kind, null); + } + + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession session = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationSessionStartedUpdate(session, eventId, kind, null); + } + + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationSessionConfiguredUpdate(session, eventId, kind, null); + } + + public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationItemAcknowledgedUpdate(item, eventId, kind, null); + } + + public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationItemDeletedUpdate(itemId, eventId, kind, null); + } + + public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int audioEndMs = default, int index = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationItemTruncatedUpdate( + itemId, + audioEndMs, + index, + eventId, + kind, + null); + } + + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse response = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationResponseStartedUpdate(response, eventId, kind, null); + } + + public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) + { + + return new ConversationTokenUsage( + totalTokens, + inputTokens, + outputTokens, + inputTokenDetails, + outputTokenDetails, + null); + } + + public static ConversationInputTokenUsageDetails ConversationInputTokenUsageDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) + { + + return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, null); + } + + public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDetails(int textTokens = default, int audioTokens = default) + { + + return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, null); + } + + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse response = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationResponseFinishedUpdate(response, eventId, kind, null); + } + + public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + rateLimits ??= new ChangeTrackingList(); + + return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, kind, null); + } + + public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int limit = default, int remaining = default, float resetSeconds = default) + { + + return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, null); + } + + public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationItemStartedUpdate( + responseId, + outputIndex, + item, + eventId, + kind, + null); + } + + public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationItemFinishedUpdate( + responseId, + outputIndex, + item, + eventId, + kind, + null); + } + + public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart part = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationContentPartStartedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + part, + eventId, + kind, + null); + } + + public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart part = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationContentPartFinishedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + part, + eventId, + kind, + null); + } + + public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationAudioDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + null); + } + + public static ConversationAudioDoneUpdate ConversationAudioDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationAudioDoneUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + eventId, + kind, + null); + } + + public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationOutputTranscriptionDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + null); + } + + public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationOutputTranscriptionFinishedUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + eventId, + kind, + null); + } + + public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationTextDeltaUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + delta, + eventId, + kind, + null); + } + + public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string value = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationTextDoneUpdate( + responseId, + itemId, + outputIndex, + contentIndex, + value, + eventId, + kind, + null); + } + + public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationFunctionCallArgumentsDeltaUpdate( + responseId, + itemId, + outputIndex, + callId, + delta, + eventId, + kind, + null); + } + + public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string name = default, string arguments = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationFunctionCallArgumentsDoneUpdate( + responseId, + itemId, + outputIndex, + callId, + name, + arguments, + eventId, + kind, + null); + } + + public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(int audioStartMs = default, string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, kind, null); + } + + public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(int audioEndMs = default, string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, kind, null); + } + + public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputTranscriptionFinishedUpdate( + itemId, + contentIndex, + transcript, + eventId, + kind, + null); + } + + public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeResponseApiError error = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputTranscriptionFailedUpdate( + itemId, + contentIndex, + error, + eventId, + kind, + null); + } + + public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string itemId = default, string previousItemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, kind, null); + } + + public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationInputAudioBufferClearedUpdate(eventId, kind, null); + } + + public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeResponseError error = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + { + + return new ConversationErrorUpdate(error, eventId, kind, null); + } + public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default) { @@ -416,16 +796,16 @@ public static ModerationResult ModerationResult(bool flagged = default) return new ModerationResult(flagged, null); } - public static OpenAIModelCollection OpenAIModelCollection() + public static OpenAIModelCollection OpenAIModelCollection(InternalListModelsResponseObject @object = default) { - return new OpenAIModelCollection(null); + return new OpenAIModelCollection(@object, null); } - public static OpenAIModel OpenAIModel(string id = default, string ownedBy = default, DateTimeOffset createdAt = default) + public static OpenAIModel OpenAIModel(string id = default, string ownedBy = default, InternalModelObject @object = default, DateTimeOffset createdAt = default) { - return new OpenAIModel(id, ownedBy, createdAt, null); + return new OpenAIModel(id, ownedBy, @object, createdAt, null); } public static ModelDeletionResult ModelDeletionResult(bool deleted = default, string modelId = default, InternalDeleteModelResponseObject @object = default) @@ -434,10 +814,11 @@ public static ModelDeletionResult ModelDeletionResult(bool deleted = default, st return new ModelDeletionResult(deleted, modelId, @object, null); } - public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default) + public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default, IEnumerable attachments = default) { content ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); + attachments ??= new ChangeTrackingList(); return new ThreadMessage( id, @@ -453,6 +834,7 @@ public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset cr metadata, @object, role, + attachments?.ToList(), null); } @@ -475,7 +857,7 @@ public static MessageDeletionResult MessageDeletionResult(bool deleted = default return new MessageDeletionResult(deleted, messageId, @object, null); } - public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, string endUserId = default) + public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, Images.OpenAI.Images.InternalCreateImageRequestModel? model = default, string prompt = default, long? n = default, string endUserId = default) { return new ImageGenerationOptions( @@ -483,6 +865,9 @@ public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQualit responseFormat, size, style, + model, + prompt, + n, endUserId, null); } @@ -499,22 +884,38 @@ public static GeneratedImage GeneratedImage(string revisedPrompt = default, Bina return new GeneratedImage(revisedPrompt, imageBytes, imageUri, null); } - public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) + public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.InternalCreateImageEditRequestModel? model = default, BinaryData image = default, string prompt = default, BinaryData mask = default, long? n = default, Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) { - return new ImageEditOptions(size, responseFormat, endUserId, null); + return new ImageEditOptions( + model, + image, + prompt, + mask, + n, + size, + responseFormat, + endUserId, + null); } - public static ImageVariationOptions ImageVariationOptions(Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) + public static ImageVariationOptions ImageVariationOptions(Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model = default, BinaryData image = default, long? n = default, Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) { - return new ImageVariationOptions(size, responseFormat, endUserId, null); + return new ImageVariationOptions( + model, + image, + n, + size, + responseFormat, + endUserId, + null); } - public static OpenAIFileCollection OpenAIFileCollection() + public static OpenAIFileCollection OpenAIFileCollection(InternalListFilesResponseObject @object = default) { - return new OpenAIFileCollection(null); + return new OpenAIFileCollection(@object, null); } public static FileDeletionResult FileDeletionResult(bool deleted = default, string fileId = default, InternalDeleteFileResponseObject @object = default) @@ -523,10 +924,16 @@ public static FileDeletionResult FileDeletionResult(bool deleted = default, stri return new FileDeletionResult(deleted, fileId, @object, null); } - public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, string endUserId = default) + public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, string endUserId = default) { - return new EmbeddingGenerationOptions(dimensions, endUserId, null); + return new EmbeddingGenerationOptions( + dimensions, + input, + model, + encodingFormat, + endUserId, + null); } public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(string model = default, EmbeddingTokenUsage usage = default, InternalCreateEmbeddingResponseObject @object = default) @@ -535,10 +942,10 @@ public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(string model = return new OpenAIEmbeddingCollection(model, usage, @object, null); } - public static OpenAIEmbedding OpenAIEmbedding(int index = default, BinaryData embeddingProperty = default) + public static OpenAIEmbedding OpenAIEmbedding(int index = default, BinaryData embeddingProperty = default, InternalEmbeddingObject @object = default) { - return new OpenAIEmbedding(index, embeddingProperty, null); + return new OpenAIEmbedding(index, embeddingProperty, @object, null); } public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = default, int totalTokenCount = default) @@ -559,12 +966,13 @@ public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reason return new ChatOutputTokenUsageDetails(reasoningTokenCount, null); } - public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default) + public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default) { tools ??= new ChangeTrackingList(); messages ??= new ChangeTrackingList(); stopSequences ??= new ChangeTrackingList(); logitBiases ??= new ChangeTrackingDictionary(); + functions ??= new ChangeTrackingList(); return new ChatCompletionOptions( frequencyPenalty, @@ -587,8 +995,10 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt functionChoice, allowParallelToolCalls, endUserId, + seed, deprecatedMaxTokens, maxOutputTokenCount, + functions?.ToList(), null); } @@ -610,7 +1020,7 @@ public static UserChatMessage UserChatMessage(BinaryData content = default, stri return new UserChatMessage(content, participantName, role, null); } - public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, Chat.ChatMessageRole role = default) + public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, Chat.ChatMessageRole role = default) { toolCalls ??= new ChangeTrackingList(); @@ -619,6 +1029,7 @@ public static AssistantChatMessage AssistantChatMessage(BinaryData content = def refusal, participantName, toolCalls?.ToList(), + functionCall, role, null); } @@ -696,7 +1107,7 @@ public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetail return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); } - public static AssistantCreationOptions AssistantCreationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable tools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) + public static AssistantCreationOptions AssistantCreationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, string model = default, IEnumerable tools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { metadata ??= new ChangeTrackingDictionary(); tools ??= new ChangeTrackingList(); @@ -707,6 +1118,7 @@ public static AssistantCreationOptions AssistantCreationOptions(string name = de instructions, metadata, temperature, + model, tools?.ToList(), toolResources, responseFormat, @@ -714,7 +1126,7 @@ public static AssistantCreationOptions AssistantCreationOptions(string name = de null); } - public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, float? nucleusSamplingFactor = default) + public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -731,23 +1143,25 @@ public static Assistant Assistant(string id = default, DateTimeOffset createdAt metadata, temperature, @object, + responseFormat, nucleusSamplingFactor, null); } - public static ToolResources ToolResources() + public static ToolResources ToolResources(CodeInterpreterToolResources codeInterpreter = default, FileSearchToolResources fileSearch = default) { - return new ToolResources(null); + return new ToolResources(codeInterpreter, fileSearch, null); } - public static CodeInterpreterToolResources CodeInterpreterToolResources() + public static CodeInterpreterToolResources CodeInterpreterToolResources(IEnumerable fileIds = default) { + fileIds ??= new ChangeTrackingList(); - return new CodeInterpreterToolResources(null); + return new CodeInterpreterToolResources(fileIds?.ToList(), null); } - public static AssistantModificationOptions AssistantModificationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, IEnumerable defaultTools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) + public static AssistantModificationOptions AssistantModificationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, string model = default, IEnumerable defaultTools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { metadata ??= new ChangeTrackingDictionary(); defaultTools ??= new ChangeTrackingList(); @@ -758,6 +1172,7 @@ public static AssistantModificationOptions AssistantModificationOptions(string n instructions, metadata, temperature, + model, defaultTools?.ToList(), toolResources, responseFormat, @@ -783,7 +1198,7 @@ public static SpeechGenerationOptions SpeechGenerationOptions(GeneratedSpeechFor null); } - public static AudioTranscriptionOptions AudioTranscriptionOptions(string language = default, string prompt = default, AudioTranscriptionFormat? responseFormat = default, float? temperature = default, IEnumerable internalTimestampGranularities = default) + public static AudioTranscriptionOptions AudioTranscriptionOptions(string language = default, string prompt = default, AudioTranscriptionFormat? responseFormat = default, float? temperature = default, BinaryData @file = default, InternalCreateTranscriptionRequestModel model = default, IEnumerable internalTimestampGranularities = default) { internalTimestampGranularities ??= new ChangeTrackingList(); @@ -792,16 +1207,25 @@ public static AudioTranscriptionOptions AudioTranscriptionOptions(string languag prompt, responseFormat, temperature, + @file, + model, internalTimestampGranularities?.ToList(), null); } - public static AudioTranscription AudioTranscription(string language = default, string text = default, IEnumerable words = default, IEnumerable segments = default) + public static AudioTranscription AudioTranscription(string language = default, string text = default, IEnumerable words = default, IEnumerable segments = default, InternalCreateTranscriptionResponseVerboseJsonTask task = default, TimeSpan? duration = default) { words ??= new ChangeTrackingList(); segments ??= new ChangeTrackingList(); - return new AudioTranscription(language, text, words?.ToList(), segments?.ToList(), null); + return new AudioTranscription( + language, + text, + words?.ToList(), + segments?.ToList(), + task, + duration, + null); } public static TranscribedWord TranscribedWord(string word = default, TimeSpan startTime = default, TimeSpan endTime = default) @@ -828,17 +1252,29 @@ public static TranscribedSegment TranscribedSegment(int id = default, string tex null); } - public static AudioTranslationOptions AudioTranslationOptions(string prompt = default, AudioTranslationFormat? responseFormat = default, float? temperature = default) + public static AudioTranslationOptions AudioTranslationOptions(string prompt = default, AudioTranslationFormat? responseFormat = default, float? temperature = default, BinaryData @file = default, InternalCreateTranslationRequestModel model = default) { - return new AudioTranslationOptions(prompt, responseFormat, temperature, null); + return new AudioTranslationOptions( + prompt, + responseFormat, + temperature, + @file, + model, + null); } - public static AudioTranslation AudioTranslation(string language = default, string text = default, IEnumerable segments = default) + public static AudioTranslation AudioTranslation(string language = default, string text = default, IEnumerable segments = default, InternalCreateTranslationResponseVerboseJsonTask task = default, TimeSpan? duration = default) { segments ??= new ChangeTrackingList(); - return new AudioTranslation(language, text, segments?.ToList(), null); + return new AudioTranslation( + language, + text, + segments?.ToList(), + task, + duration, + null); } public static AssistantResponseFormat AssistantResponseFormat(string @type = default) @@ -859,6 +1295,12 @@ public static ChatToolChoice ChatToolChoice() return new ChatToolChoice(null); } + public static ChatMessageContent ChatMessageContent() + { + + return new ChatMessageContent(null); + } + public static ChatMessageContentPart ChatMessageContentPart() { diff --git a/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs new file mode 100644 index 000000000..ba2e1ce7f --- /dev/null +++ b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs @@ -0,0 +1,48 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class RealtimeConversationClient + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + private static OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx(); + + private class Classifier2xxAnd4xx : PipelineMessageClassifier + { + public override bool TryClassify(PipelineMessage message, out bool isError) + { + isError = false; + if (message.Response == null) + { + return false; + } + isError = message.Response.Status switch + { + >= 200 and < 300 => false, + >= 400 and < 500 => false, + _ => true + }; + return true; + } + + public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) + { + isRetryable = false; + return false; + } + } + } +} diff --git a/.dotnet/src/Generated/RealtimeConversationClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.cs new file mode 100644 index 000000000..24499e716 --- /dev/null +++ b/.dotnet/src/Generated/RealtimeConversationClient.cs @@ -0,0 +1,65 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class RealtimeConversationClient + { + private readonly Uri _endpoint; + private const string AuthorizationHeader = "Authorization"; + private readonly ApiKeyCredential _keyCredential; + private const string AuthorizationApiKeyPrefix = "Bearer"; + + protected RealtimeConversationClient() + { + } + + internal RealtimeConversationClient(ClientPipeline pipeline, ApiKeyCredential keyCredential, Uri endpoint) + { + _endpoint = endpoint; + Pipeline = pipeline; + _keyCredential = keyCredential; + } + + public ClientPipeline Pipeline { get; } + + public virtual ClientResult> StartRealtimeSession(IList requestMessages) + { + Argument.AssertNotNull(requestMessages, nameof(requestMessages)); + + using BinaryContent content = BinaryContentHelper.FromEnumerable(requestMessages); + ClientResult result = this.StartRealtimeSession(content, null); + IList value = new List(); + using JsonDocument document = JsonDocument.Parse(result.GetRawResponse().ContentStream); + foreach (var item in document.RootElement.EnumerateArray()) + { + value.Add(ConversationUpdate.DeserializeConversationUpdate(item, ModelSerializationExtensions.WireOptions)); + } + return ClientResult.FromValue(value, result.GetRawResponse()); + } + + public virtual async Task>> StartRealtimeSessionAsync(IList requestMessages) + { + Argument.AssertNotNull(requestMessages, nameof(requestMessages)); + + using BinaryContent content = BinaryContentHelper.FromEnumerable(requestMessages); + ClientResult result = await this.StartRealtimeSessionAsync(content, null).ConfigureAwait(false); + IList value = new List(); + using JsonDocument document = await JsonDocument.ParseAsync(result.GetRawResponse().ContentStream, default, default).ConfigureAwait(false); + foreach (var item in document.RootElement.EnumerateArray()) + { + value.Add(ConversationUpdate.DeserializeConversationUpdate(item, ModelSerializationExtensions.WireOptions)); + } + return ClientResult.FromValue(value, result.GetRawResponse()); + } + } +} From 742a3bef27deb578abcac7c0154361a4f55ff4f6 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 8 Oct 2024 14:54:52 -0700 Subject: [PATCH 06/54] More customization --- .../src/Custom/Batch/BatchClient.Protocol.cs | 20 ++-- .dotnet/src/Custom/Batch/BatchClient.cs | 10 +- .../AssistantChatMessage.Serialization.cs | 2 +- .../src/Custom/Chat/ChatClient.Protocol.cs | 4 +- .dotnet/src/Custom/Chat/ChatClient.cs | 6 -- .../Chat/ChatFunctionChoice.Serialization.cs | 2 +- .dotnet/src/Custom/Chat/ChatMessage.cs | 4 +- .dotnet/src/Custom/Chat/ChatMessageContent.cs | 5 +- .../ChatMessageContentPart.Serialization.cs | 2 +- .../src/Custom/Chat/ChatMessageContentPart.cs | 2 +- .dotnet/src/Custom/Chat/ChatResponseFormat.cs | 4 +- .dotnet/src/Custom/Chat/ChatTool.cs | 2 +- .dotnet/src/Custom/Chat/ChatToolCall.cs | 4 +- .../Chat/ChatToolChoice.Serialization.cs | 2 +- .dotnet/src/Custom/Chat/ChatToolChoice.cs | 2 +- .../Chat/FunctionChatMessage.Serialization.cs | 2 +- ...nRequestMessageContentPartImageImageUrl.cs | 2 +- ...tResponseFormatJsonObject.Serialization.cs | 6 +- ...tResponseFormatJsonSchema.Serialization.cs | 8 +- ...nalChatResponseFormatText.Serialization.cs | 6 +- ...nternalUnknownChatMessage.Serialization.cs | 2 +- ...UnknownChatResponseFormat.Serialization.cs | 6 +- .../src/Custom/Chat/OpenAIChatModelFactory.cs | 36 +++---- ...StreamingChatCompletionUpdateCollection.cs | 2 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- ...StreamingChatCompletionUpdateCollection.cs | 2 +- .../StreamingChatCompletionUpdate.cs | 12 +-- .../Streaming/StreamingChatToolCallUpdate.cs | 2 +- .../Chat/SystemChatMessage.Serialization.cs | 2 +- .../Chat/UserChatMessage.Serialization.cs | 2 +- .../Embeddings/EmbeddingClient.Protocol.cs | 4 +- .../src/Custom/Embeddings/EmbeddingClient.cs | 24 ++--- .../Custom/Files/OpenAIFileClient.Protocol.cs | 20 ++-- .dotnet/src/Custom/Files/OpenAIFileClient.cs | 34 +++---- .../Custom/Files/OpenAIFilesModelFactory.cs | 10 +- .../FineTuning/FineTuningClient.Protocol.cs | 16 +-- .../src/Custom/FineTuning/FineTuningClient.cs | 4 +- .../src/Custom/Images/GeneratedImageFormat.cs | 4 +- .../Custom/Images/GeneratedImageQuality.cs | 2 +- .../src/Custom/Images/GeneratedImageSize.cs | 2 - .../src/Custom/Images/ImageClient.Protocol.cs | 12 +-- .dotnet/src/Custom/Images/ImageClient.cs | 50 +++++----- .../Custom/Images/OpenAIImagesModelFactory.cs | 4 +- .../Models/OpenAIModelClient.Protocol.cs | 16 +-- .../src/Custom/Models/OpenAIModelClient.cs | 22 ++--- .../Custom/Models/OpenAIModelsModelFactory.cs | 10 +- .../Moderations/ModerationClient.Protocol.cs | 4 +- .../Custom/Moderations/ModerationClient.cs | 26 ++--- .dotnet/src/Custom/OpenAIClient.cs | 32 +++--- .../RealtimeConversationClient.cs | 1 - .../RealtimeConversationSession.cs | 2 +- .../AddFileToVectorStoreOperation.cs | 12 +-- .../CreateBatchFileJobOperation.cs | 16 +-- .../CreateVectorStoreOperation.cs | 12 +-- .../VectorStoreClient.Protocol.cs | 97 ++++++++++--------- .../Custom/VectorStores/VectorStoreClient.cs | 56 +++++------ .../VectorStoreCollectionOrder.cs | 4 +- ...ctorStoreFileAssociationCollectionOrder.cs | 4 +- .../Generated/AssistantClient.RestClient.cs | 4 +- .../src/Generated/AudioClient.RestClient.cs | 4 +- .../src/Generated/BatchClient.RestClient.cs | 4 +- .../src/Generated/ChatClient.RestClient.cs | 4 +- .../Generated/EmbeddingClient.RestClient.cs | 4 +- .dotnet/src/Generated/EmbeddingClient.cs | 3 + .../Generated/FineTuningClient.RestClient.cs | 4 +- .../src/Generated/ImageClient.RestClient.cs | 4 +- .dotnet/src/Generated/ImageClient.cs | 3 + ...ternalAssistantMessageClient.RestClient.cs | 4 +- .../InternalAssistantRunClient.RestClient.cs | 4 +- ...nternalAssistantThreadClient.RestClient.cs | 4 +- .../InternalUploadsClient.RestClient.cs | 4 +- .../LegacyCompletionClient.RestClient.cs | 4 +- ...eTuningJobHyperparameters.Serialization.cs | 10 +- .../TranscribedSegment.Serialization.cs | 10 +- .../Models/TranscribedWord.Serialization.cs | 10 +- .../Generated/ModerationClient.RestClient.cs | 4 +- .dotnet/src/Generated/ModerationClient.cs | 3 + .dotnet/src/Generated/OpenAIClient.cs | 37 +++---- .../Generated/OpenAIFileClient.RestClient.cs | 4 +- .dotnet/src/Generated/OpenAIFileClient.cs | 2 + .../Generated/OpenAIModelClient.RestClient.cs | 4 +- .dotnet/src/Generated/OpenAIModelClient.cs | 2 + .../RealtimeConversationClient.RestClient.cs | 5 +- .../Generated/VectorStoreClient.RestClient.cs | 4 +- .dotnet/src/Generated/VectorStoreClient.cs | 2 + 85 files changed, 394 insertions(+), 420 deletions(-) diff --git a/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs b/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs index 3bcf065f6..c6aecb1ec 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs @@ -29,7 +29,7 @@ public virtual async Task CreateBatchAsync(BinaryContent c using PipelineMessage message = CreateCreateBatchRequest(content, options); - PipelineResponse response = await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + PipelineResponse response = await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); using JsonDocument doc = JsonDocument.Parse(response.Content); string batchId = doc.RootElement.GetProperty("id"u8).GetString(); @@ -57,7 +57,7 @@ public virtual CreateBatchOperation CreateBatch(BinaryContent content, bool wait Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateBatchRequest(content, options); - PipelineResponse response = _pipeline.ProcessMessage(message, options); + PipelineResponse response = Pipeline.ProcessMessage(message, options); using JsonDocument doc = JsonDocument.Parse(response.Content); string batchId = doc.RootElement.GetProperty("id"u8).GetString(); @@ -77,7 +77,7 @@ public virtual CreateBatchOperation CreateBatch(BinaryContent content, bool wait /// The response returned from the service. public virtual AsyncCollectionResult GetBatchesAsync(string after, int? limit, RequestOptions options) { - return new AsyncBatchCollectionResult(this, _pipeline, options, limit, after); + return new AsyncBatchCollectionResult(this, Pipeline, options, limit, after); } /// @@ -90,7 +90,7 @@ public virtual AsyncCollectionResult GetBatchesAsync(string after, int? limit, R /// The response returned from the service. public virtual CollectionResult GetBatches(string after, int? limit, RequestOptions options) { - return new BatchCollectionResult(this, _pipeline, options, limit, after); + return new BatchCollectionResult(this, Pipeline, options, limit, after); } /// @@ -107,7 +107,7 @@ internal virtual async Task GetBatchAsync(string batchId, RequestO Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateRetrieveBatchRequest(batchId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -124,12 +124,12 @@ internal virtual ClientResult GetBatch(string batchId, RequestOptions options) Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateRetrieveBatchRequest(batchId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } internal virtual PipelineMessage CreateCreateBatchRequest(BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -146,7 +146,7 @@ internal virtual PipelineMessage CreateCreateBatchRequest(BinaryContent content, internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -169,7 +169,7 @@ internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limi internal virtual PipelineMessage CreateRetrieveBatchRequest(string batchId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -185,7 +185,7 @@ internal virtual PipelineMessage CreateRetrieveBatchRequest(string batchId, Requ internal virtual PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index ecb6354e4..5c018c51f 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -24,8 +24,8 @@ namespace OpenAI.Batch; [CodeGenSuppress("CancelBatchAsync", typeof(string))] [CodeGenSuppress("CancelBatch", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelBatchAsync", typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetBatches", typeof(string), typeof(int?))] -[CodeGenSuppress("GetBatchesAsync", typeof(string), typeof(int?))] +[CodeGenSuppress("ListBatches", typeof(string), typeof(int?))] +[CodeGenSuppress("ListBatchesAsync", typeof(string), typeof(int?))] public partial class BatchClient { // CUSTOM: Added as a convenience. @@ -66,7 +66,7 @@ public BatchClient(ApiKeyCredential credential, OpenAIClientOptions options) Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -83,12 +83,12 @@ protected internal BatchClient(ClientPipeline pipeline, OpenAIClientOptions opti Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } internal virtual CreateBatchOperation CreateCreateBatchOperation(string batchId, string status, PipelineResponse response) { - return new CreateBatchOperation(_pipeline, _endpoint, batchId, status, response); + return new CreateBatchOperation(Pipeline, _endpoint, batchId, status, response); } } diff --git a/.dotnet/src/Custom/Chat/AssistantChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/AssistantChatMessage.Serialization.cs index 8fac611b9..d5fac5775 100644 --- a/.dotnet/src/Custom/Chat/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/AssistantChatMessage.Serialization.cs @@ -44,7 +44,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteOptionalProperty("name"u8, ParticipantName, options); writer.WriteOptionalCollection("tool_calls"u8, ToolCalls, options); writer.WriteOptionalProperty("function_call"u8, FunctionCall, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Chat/ChatClient.Protocol.cs b/.dotnet/src/Custom/Chat/ChatClient.Protocol.cs index 21a03c811..6e3264c35 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.Protocol.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.Protocol.cs @@ -25,7 +25,7 @@ public virtual async Task CompleteChatAsync(BinaryContent content, Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateChatCompletionRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -42,6 +42,6 @@ public virtual ClientResult CompleteChat(BinaryContent content, RequestOptions o Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateChatCompletionRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Chat/ChatClient.cs b/.dotnet/src/Custom/Chat/ChatClient.cs index 58b0137b0..4a2d65a1d 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.cs @@ -23,12 +23,6 @@ public partial class ChatClient private readonly string _model; private readonly OpenTelemetrySource _telemetry; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . diff --git a/.dotnet/src/Custom/Chat/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Custom/Chat/ChatFunctionChoice.Serialization.cs index 0ad21b27b..d48adab0b 100644 --- a/.dotnet/src/Custom/Chat/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Custom/Chat/ChatFunctionChoice.Serialization.cs @@ -22,7 +22,7 @@ internal static void SerializeChatFunctionChoice(ChatFunctionChoice instance, Ut writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(instance._function.Name); - writer.WriteSerializedAdditionalRawData(instance.SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(instance._additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Chat/ChatMessage.cs b/.dotnet/src/Custom/Chat/ChatMessage.cs index c140b382f..b65834df6 100644 --- a/.dotnet/src/Custom/Chat/ChatMessage.cs +++ b/.dotnet/src/Custom/Chat/ChatMessage.cs @@ -126,10 +126,10 @@ internal ChatMessage(ChatMessageRole role, string content = null) : this(role) /// public static AssistantChatMessage CreateAssistantMessage(params ChatMessageContentPart[] contentParts) => new(contentParts); - /// + /// public static AssistantChatMessage CreateAssistantMessage(IEnumerable toolCalls) => new(toolCalls); - /// + /// public static AssistantChatMessage CreateAssistantMessage(ChatFunctionCall functionCall) => new(functionCall); /// diff --git a/.dotnet/src/Custom/Chat/ChatMessageContent.cs b/.dotnet/src/Custom/Chat/ChatMessageContent.cs index 03a98746d..f7a63114d 100644 --- a/.dotnet/src/Custom/Chat/ChatMessageContent.cs +++ b/.dotnet/src/Custom/Chat/ChatMessageContent.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -8,7 +9,7 @@ namespace OpenAI.Chat; public partial class ChatMessageContent : Collection { public ChatMessageContent() - : this([]) + : this(Array.Empty()) { } diff --git a/.dotnet/src/Custom/Chat/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Custom/Chat/ChatMessageContentPart.Serialization.cs index 9a1916087..eb2277bf6 100644 --- a/.dotnet/src/Custom/Chat/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Custom/Chat/ChatMessageContentPart.Serialization.cs @@ -33,7 +33,7 @@ internal static void WriteCoreContentPart(ChatMessageContentPart instance, Utf8J writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(instance._imageUri, options); } - writer.WriteSerializedAdditionalRawData(instance.SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(instance._additionalBinaryDataProperties, options); writer.WriteEndObject(); } diff --git a/.dotnet/src/Custom/Chat/ChatMessageContentPart.cs b/.dotnet/src/Custom/Chat/ChatMessageContentPart.cs index 59f120815..f170d8b83 100644 --- a/.dotnet/src/Custom/Chat/ChatMessageContentPart.cs +++ b/.dotnet/src/Custom/Chat/ChatMessageContentPart.cs @@ -42,7 +42,7 @@ internal ChatMessageContentPart(ChatMessageContentPartKind kind, string text, In _text = text; _imageUri = imageUri; _refusal = refusal; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; } /// The kind of content part. diff --git a/.dotnet/src/Custom/Chat/ChatResponseFormat.cs b/.dotnet/src/Custom/Chat/ChatResponseFormat.cs index 817ae5612..eb1f0f39d 100644 --- a/.dotnet/src/Custom/Chat/ChatResponseFormat.cs +++ b/.dotnet/src/Custom/Chat/ChatResponseFormat.cs @@ -97,9 +97,9 @@ public static ChatResponseFormat CreateJsonSchemaFormat(string jsonSchemaFormatN InternalResponseFormatJsonSchemaJsonSchema internalSchema = new( jsonSchemaFormatDescription, jsonSchemaFormatName, - jsonSchema, jsonSchemaIsStrict, - serializedAdditionalRawData: null); + schema: jsonSchema, + additionalBinaryDataProperties: null); return new InternalChatResponseFormatJsonSchema(internalSchema); } diff --git a/.dotnet/src/Custom/Chat/ChatTool.cs b/.dotnet/src/Custom/Chat/ChatTool.cs index e0630f395..6cdb2f64b 100644 --- a/.dotnet/src/Custom/Chat/ChatTool.cs +++ b/.dotnet/src/Custom/Chat/ChatTool.cs @@ -131,6 +131,6 @@ public static ChatTool CreateFunctionTool(string functionName, string functionDe return new( kind: ChatToolKind.Function, function: function, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } } diff --git a/.dotnet/src/Custom/Chat/ChatToolCall.cs b/.dotnet/src/Custom/Chat/ChatToolCall.cs index c0b2eb654..88df04d8c 100644 --- a/.dotnet/src/Custom/Chat/ChatToolCall.cs +++ b/.dotnet/src/Custom/Chat/ChatToolCall.cs @@ -6,7 +6,7 @@ namespace OpenAI.Chat; /// A tool call made by the model. /// /// -/// Call to create a +/// Call to create a /// representing a function call made by the model. /// /// @@ -60,6 +60,6 @@ public static ChatToolCall CreateFunctionToolCall(string id, string functionName id: id, kind: ChatToolCallKind.Function, function: function, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Chat/ChatToolChoice.Serialization.cs b/.dotnet/src/Custom/Chat/ChatToolChoice.Serialization.cs index 964fc7566..283d52199 100644 --- a/.dotnet/src/Custom/Chat/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Custom/Chat/ChatToolChoice.Serialization.cs @@ -24,7 +24,7 @@ internal static void SerializeChatToolChoice(ChatToolChoice instance, Utf8JsonWr writer.WriteStringValue(instance._type.ToString()); writer.WritePropertyName("function"u8); writer.WriteObjectValue(instance._function, options); - writer.WriteSerializedAdditionalRawData(instance.SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(instance._additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Chat/ChatToolChoice.cs b/.dotnet/src/Custom/Chat/ChatToolChoice.cs index b82850a78..178f11e60 100644 --- a/.dotnet/src/Custom/Chat/ChatToolChoice.cs +++ b/.dotnet/src/Custom/Chat/ChatToolChoice.cs @@ -49,7 +49,7 @@ internal ChatToolChoice(bool predefined, string predefinedValue, InternalChatCom _predefinedValue = predefinedValue; _type = type; _function = function; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; } /// diff --git a/.dotnet/src/Custom/Chat/FunctionChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/FunctionChatMessage.Serialization.cs index cf0404266..d3618bb1a 100644 --- a/.dotnet/src/Custom/Chat/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/FunctionChatMessage.Serialization.cs @@ -36,7 +36,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } } - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index 5e308a3cc..e671cfe1f 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -69,7 +69,7 @@ internal InternalChatCompletionRequestMessageContentPartImageImageUrl(string url Url = url; Detail = detail; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = serializedAdditionalRawData; } public Uri ImageUri => _imageUri; diff --git a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonObject.Serialization.cs index 586eaf06d..ffbb4950c 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonObject.Serialization.cs @@ -15,14 +15,14 @@ internal static void SerializeInternalChatResponseFormatJsonObject(InternalChatR internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (SerializedAdditionalRawData != null) + if (_additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { diff --git a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonSchema.Serialization.cs index e9b246f77..d6da14972 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -15,19 +15,19 @@ internal static void SerializeInternalChatResponseFormatJsonSchema(InternalChatR internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("json_schema") != true) + if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) { writer.WritePropertyName("json_schema"u8); writer.WriteObjectValue(JsonSchema, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (SerializedAdditionalRawData != null) + if (_additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { diff --git a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatText.Serialization.cs index 608844c67..54277f919 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalChatResponseFormatText.Serialization.cs @@ -15,14 +15,14 @@ internal static void SerializeInternalChatResponseFormatText(InternalChatRespons internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (SerializedAdditionalRawData != null) + if (_additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { diff --git a/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatMessage.Serialization.cs index 6379d9e4c..b753d8ef0 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatMessage.Serialization.cs @@ -42,7 +42,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } } - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatResponseFormat.Serialization.cs index 0f7f3cec4..909c525df 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalUnknownChatResponseFormat.Serialization.cs @@ -15,14 +15,14 @@ internal static void SerializeChatResponseFormat(InternalUnknownChatResponseForm internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (SerializedAdditionalRawData != null) + if (_additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { diff --git a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs index 524d66aeb..72af5fef4 100644 --- a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs +++ b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs @@ -30,17 +30,17 @@ public static ChatCompletion ChatCompletion( refusalTokenLogProbabilities ??= new List(); InternalChatCompletionResponseMessage message = new InternalChatCompletionResponseMessage( - content, refusal, toolCalls.ToList(), role, + content, functionCall, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); InternalCreateChatCompletionResponseChoiceLogprobs logprobs = new InternalCreateChatCompletionResponseChoiceLogprobs( contentTokenLogProbabilities.ToList(), refusalTokenLogProbabilities.ToList(), - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); IReadOnlyList choices = [ new InternalCreateChatCompletionResponseChoice( @@ -48,7 +48,7 @@ public static ChatCompletion ChatCompletion( index: 0, message, logprobs, - serializedAdditionalRawData: null) + additionalBinaryDataProperties: null) ]; return new ChatCompletion( @@ -60,7 +60,7 @@ public static ChatCompletion ChatCompletion( systemFingerprint, InternalCreateChatCompletionResponseObject.ChatCompletion, usage, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -74,7 +74,7 @@ public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(stri logProbability, utf8Bytes, topLogProbabilities.ToList(), - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -85,7 +85,7 @@ public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetail token, logProbability, utf8Bytes, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -97,14 +97,14 @@ public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount, totalTokenCount, outputTokenDetails, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . /// A new instance for mocking. public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, serializedAdditionalRawData: null); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -130,17 +130,17 @@ public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate( refusalTokenLogProbabilities ??= new List(); InternalChatCompletionStreamResponseDelta delta = new InternalChatCompletionStreamResponseDelta( - contentUpdate, functionCallUpdate, toolCallUpdates.ToList(), - role, refusalUpdate, - serializedAdditionalRawData: null); + role, + contentUpdate, + additionalBinaryDataProperties: null); InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs = new InternalCreateChatCompletionStreamResponseChoiceLogprobs( contentTokenLogProbabilities.ToList(), refusalTokenLogProbabilities.ToList(), - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); IReadOnlyList choices = [ new InternalCreateChatCompletionStreamResponseChoice( @@ -148,7 +148,7 @@ public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate( logprobs, finishReason, index: 0, - serializedAdditionalRawData: null) + additionalBinaryDataProperties: null) ]; return new StreamingChatCompletionUpdate( @@ -160,7 +160,7 @@ public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate( systemFingerprint, InternalCreateChatCompletionStreamResponseObject.ChatCompletionChunk, usage, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -171,7 +171,7 @@ public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(st return new StreamingChatFunctionCallUpdate( functionName, functionArgumentsUpdate, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -181,13 +181,13 @@ public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index InternalChatCompletionMessageToolCallChunkFunction function = new InternalChatCompletionMessageToolCallChunkFunction( functionName, functionArgumentsUpdate, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); return new StreamingChatToolCallUpdate( index, toolCallId, kind, function, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } } diff --git a/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs b/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs index ad391ccaf..f7dcf8c1d 100644 --- a/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs +++ b/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs @@ -107,7 +107,7 @@ async ValueTask IAsyncEnumerator.MoveNextAs } using JsonDocument doc = JsonDocument.Parse(_events.Current.Data); - List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement)]; + List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, null)]; _updates = updates.GetEnumerator(); if (_updates.MoveNext()) diff --git a/.dotnet/src/Custom/Chat/Streaming/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Custom/Chat/Streaming/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 69b0c4c46..50329ea7d 100644 --- a/.dotnet/src/Custom/Chat/Streaming/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Custom/Chat/Streaming/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -44,7 +44,7 @@ internal static void SerializeInternalCreateChatCompletionStreamResponseChoice(I } writer.WritePropertyName("index"u8); writer.WriteNumberValue(instance.Index); - writer.WriteSerializedAdditionalRawData(instance.SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(instance._additionalBinaryDataProperties, options); writer.WriteEndObject(); } diff --git a/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs b/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs index 8759ca4b3..9cb38f2b4 100644 --- a/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs +++ b/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs @@ -108,7 +108,7 @@ public bool MoveNext() } using JsonDocument doc = JsonDocument.Parse(_events.Current.Data); - List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement)]; + List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, null)]; _updates = updates.GetEnumerator(); if (_updates.MoveNext()) diff --git a/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs b/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs index f89167c0d..6e5cb765c 100644 --- a/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs @@ -8,9 +8,9 @@ namespace OpenAI.Chat; public partial class StreamingChatCompletionUpdate { private ChatMessageContent _contentUpdate; - private IReadOnlyList _toolCallUpdates; - private IReadOnlyList _contentTokenLogProbabilities; - private IReadOnlyList _refusalTokenLogProbabilities; + private IList _toolCallUpdates; + private IList _contentTokenLogProbabilities; + private IList _refusalTokenLogProbabilities; internal InternalCreateChatCompletionStreamResponseChoice InternalChoice => (Choices.Count > 0) ? Choices[0] : null; internal InternalChatCompletionStreamResponseDelta InternalChoiceDelta => InternalChoice?.Delta; @@ -70,14 +70,14 @@ public partial class StreamingChatCompletionUpdate // CUSTOM: Flattened choice logprobs property. /// The message content tokens with log probability information. - public IReadOnlyList ContentTokenLogProbabilities => + public IList ContentTokenLogProbabilities => _contentTokenLogProbabilities ??= InternalChoice?.Logprobs?.Content ?? new ChangeTrackingList(); // CUSTOM: Flattened choice logprobs property. /// The message refusal tokens with log probability information. - public IReadOnlyList RefusalTokenLogProbabilities => + public IList RefusalTokenLogProbabilities => _refusalTokenLogProbabilities ??= InternalChoice?.Logprobs?.Refusal ?? new ChangeTrackingList(); @@ -100,7 +100,7 @@ public partial class StreamingChatCompletionUpdate // CUSTOM: Flattened choice delta property. /// The tool calls generated by the model, such as function calls. - public IReadOnlyList ToolCallUpdates + public IList ToolCallUpdates => _toolCallUpdates ??= InternalChoiceDelta?.ToolCalls ?? new ChangeTrackingList(); diff --git a/.dotnet/src/Custom/Chat/Streaming/StreamingChatToolCallUpdate.cs b/.dotnet/src/Custom/Chat/Streaming/StreamingChatToolCallUpdate.cs index 639cbd57b..0256ac302 100644 --- a/.dotnet/src/Custom/Chat/Streaming/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Custom/Chat/Streaming/StreamingChatToolCallUpdate.cs @@ -21,7 +21,7 @@ public partial class StreamingChatToolCallUpdate // CUSTOM: Renamed. /// /// The unique identifier of the tool call being streamed, as used with e.g. - /// or + /// or /// . /// [CodeGenMember("Id")] diff --git a/.dotnet/src/Custom/Chat/SystemChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/SystemChatMessage.Serialization.cs index b663776a5..4907c78bc 100644 --- a/.dotnet/src/Custom/Chat/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/SystemChatMessage.Serialization.cs @@ -39,7 +39,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteOptionalProperty("name"u8, ParticipantName, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Chat/UserChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/UserChatMessage.Serialization.cs index 2528c6bda..615d62feb 100644 --- a/.dotnet/src/Custom/Chat/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/UserChatMessage.Serialization.cs @@ -38,7 +38,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteOptionalProperty("name"u8, ParticipantName, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.Protocol.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.Protocol.cs index 94dfb9d6f..f908d51f3 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.Protocol.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.Protocol.cs @@ -28,7 +28,7 @@ public virtual async Task GenerateEmbeddingsAsync(BinaryContent co Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateEmbeddingRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -49,6 +49,6 @@ public virtual ClientResult GenerateEmbeddings(BinaryContent content, RequestOpt Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateEmbeddingRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs index c24e5d903..927d4ef4c 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs @@ -21,12 +21,6 @@ public partial class EmbeddingClient { private readonly string _model; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . @@ -78,7 +72,7 @@ public EmbeddingClient(string model, ApiKeyCredential credential, OpenAIClientOp options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -100,7 +94,7 @@ protected internal EmbeddingClient(ClientPipeline pipeline, string model, OpenAI options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } @@ -120,7 +114,7 @@ public virtual async Task> GenerateEmbeddingAsync( using BinaryContent content = options; ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((OpenAIEmbeddingCollection)result).FirstOrDefault(), result.GetRawResponse()); } // CUSTOM: Added to simplify generating a single embedding from a string input. @@ -139,7 +133,7 @@ public virtual ClientResult GenerateEmbedding(string input, Emb using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((OpenAIEmbeddingCollection)result).FirstOrDefault(), result.GetRawResponse()); } // CUSTOM: Added to simplify passing the input as a collection of strings instead of BinaryData. @@ -158,7 +152,7 @@ public virtual async Task> GenerateEmbed using BinaryContent content = options; ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIEmbeddingCollection)result, result.GetRawResponse()); } @@ -178,7 +172,7 @@ public virtual ClientResult GenerateEmbeddings(IEnume using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIEmbeddingCollection)result, result.GetRawResponse()); } // CUSTOM: Added to simplify passing the input as a collection of ReadOnlyMemory tokens instead of BinaryData. @@ -195,9 +189,9 @@ public virtual async Task> GenerateEmbed options ??= new(); CreateEmbeddingGenerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options); + using BinaryContent content = options; ClientResult result = await GenerateEmbeddingsAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIEmbeddingCollection)result, result.GetRawResponse()); } // CUSTOM: Added to simplify passing the input as a collection of ReadOnlyMemory of tokens instead of BinaryData. @@ -216,7 +210,7 @@ public virtual ClientResult GenerateEmbeddings(IEnume using BinaryContent content = options; ClientResult result = GenerateEmbeddings(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIEmbeddingCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIEmbeddingCollection)result, result.GetRawResponse()); } private void CreateEmbeddingGenerationOptions(BinaryData input, ref EmbeddingGenerationOptions options) diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs index 6efcb5806..3fea8b77c 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs @@ -44,7 +44,7 @@ public virtual async Task UploadFileAsync(BinaryContent content, s Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateFileRequest(content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -72,7 +72,7 @@ public virtual ClientResult UploadFile(BinaryContent content, string contentType Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateFileRequest(content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -86,7 +86,7 @@ public virtual ClientResult UploadFile(BinaryContent content, string contentType public virtual async Task GetFilesAsync(string purpose, RequestOptions options) { using PipelineMessage message = CreateListFilesRequest(purpose, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -100,7 +100,7 @@ public virtual async Task GetFilesAsync(string purpose, RequestOpt public virtual ClientResult GetFiles(string purpose, RequestOptions options) { using PipelineMessage message = CreateListFilesRequest(purpose, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -118,7 +118,7 @@ public virtual async Task GetFileAsync(string fileId, RequestOptio Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateRetrieveFileRequest(fileId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -136,7 +136,7 @@ public virtual ClientResult GetFile(string fileId, RequestOptions options) Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateRetrieveFileRequest(fileId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -154,7 +154,7 @@ public virtual async Task DeleteFileAsync(string fileId, RequestOp Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDeleteFileRequest(fileId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -172,7 +172,7 @@ public virtual ClientResult DeleteFile(string fileId, RequestOptions options) Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDeleteFileRequest(fileId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -190,7 +190,7 @@ public virtual async Task DownloadFileAsync(string fileId, Request Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDownloadFileRequest(fileId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -208,7 +208,7 @@ public virtual ClientResult DownloadFile(string fileId, RequestOptions options) Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDownloadFileRequest(fileId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.cs index d671893d5..0d7a98e90 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.cs @@ -26,13 +26,7 @@ namespace OpenAI.Files; public partial class OpenAIFileClient { private InternalUploadsClient _internalUploadsClient; - - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - + // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -64,9 +58,9 @@ public OpenAIFileClient(ApiKeyCredential credential, OpenAIClientOptions options Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); - _internalUploadsClient = new(_pipeline, options); + _internalUploadsClient = new(Pipeline, options); } // CUSTOM: @@ -82,7 +76,7 @@ protected internal OpenAIFileClient(ClientPipeline pipeline, OpenAIClientOptions Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); _internalUploadsClient = new(pipeline, options); } @@ -111,7 +105,7 @@ public virtual async Task> UploadFileAsync(Stream file, using MultipartFormDataBinaryContent content = options.ToMultipartContent(file, filename); ClientResult result = await UploadFileAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIFile.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFile)result, result.GetRawResponse()); } /// Uploads a file that can be used across various operations. @@ -138,7 +132,7 @@ public virtual ClientResult UploadFile(Stream file, string filename, using MultipartFormDataBinaryContent content = options.ToMultipartContent(file, filename); ClientResult result = UploadFile(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIFile.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFile)result, result.GetRawResponse()); } /// Uploads a file that can be used across various operations. @@ -220,7 +214,7 @@ public virtual ClientResult UploadFile(string filePath, FileUploadPu public virtual async Task> GetFilesAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetFilesAsync(null, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIFileCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } /// Gets basic information about each of the files belonging to the user's organization. @@ -228,7 +222,7 @@ public virtual async Task> GetFilesAsync(Canc public virtual ClientResult GetFiles(CancellationToken cancellationToken = default) { ClientResult result = GetFiles(null, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIFileCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } /// Gets basic information about each of the files belonging to the user's organization. @@ -237,7 +231,7 @@ public virtual ClientResult GetFiles(CancellationToken can public virtual async Task> GetFilesAsync(FilePurpose purpose, CancellationToken cancellationToken = default) { ClientResult result = await GetFilesAsync(purpose.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIFileCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } /// Gets basic information about each of the files belonging to the user's organization. @@ -246,7 +240,7 @@ public virtual async Task> GetFilesAsync(File public virtual ClientResult GetFiles(FilePurpose purpose, CancellationToken cancellationToken = default) { ClientResult result = GetFiles(purpose.ToSerialString(), cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIFileCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); } /// Gets basic information about the specified file. @@ -259,7 +253,7 @@ public virtual async Task> GetFileAsync(string fileId, Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); ClientResult result = await GetFileAsync(fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIFile.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFile)result, result.GetRawResponse()); } /// Gets basic information about the specified file. @@ -272,7 +266,7 @@ public virtual ClientResult GetFile(string fileId, CancellationToken Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); ClientResult result = GetFile(fileId, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIFile.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIFile)result, result.GetRawResponse()); } /// Deletes the specified file. @@ -285,7 +279,7 @@ public virtual async Task> DeleteFileAsync(stri Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); ClientResult result = await DeleteFileAsync(fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(FileDeletionResult.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((FileDeletionResult)result, result.GetRawResponse()); } /// Deletes the specified file. @@ -298,7 +292,7 @@ public virtual ClientResult DeleteFile(string fileId, Cancel Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); ClientResult result = DeleteFile(fileId, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(FileDeletionResult.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((FileDeletionResult)result, result.GetRawResponse()); } /// Downloads the content of the specified file. diff --git a/.dotnet/src/Custom/Files/OpenAIFilesModelFactory.cs b/.dotnet/src/Custom/Files/OpenAIFilesModelFactory.cs index 115fdcca9..3dcaafacc 100644 --- a/.dotnet/src/Custom/Files/OpenAIFilesModelFactory.cs +++ b/.dotnet/src/Custom/Files/OpenAIFilesModelFactory.cs @@ -12,10 +12,10 @@ public static partial class OpenAIFilesModelFactory public static FileDeletionResult FileDeletionResult(string fileId = null, bool deleted = default) { return new FileDeletionResult( + deleted, fileId, InternalDeleteFileResponseObject.File, - deleted, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -24,14 +24,14 @@ public static OpenAIFile OpenAIFileInfo(string id = null, int? sizeInBytes = nul { return new OpenAIFile( id, - sizeInBytes, createdAt, filename, - @object: InternalOpenAIFileObject.File, purpose, + @object: InternalOpenAIFileObject.File, + sizeInBytes, status, statusDetails, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs index 110d8fd17..7962b6d5d 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs @@ -88,7 +88,7 @@ public virtual FineTuningJobOperation CreateFineTuningJob( Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateFineTuningJobRequest(content, options); - PipelineResponse response = _pipeline.ProcessMessage(message, options); + PipelineResponse response = Pipeline.ProcessMessage(message, options); using JsonDocument doc = JsonDocument.Parse(response.Content); string jobId = doc.RootElement.GetProperty("id"u8).GetString(); @@ -111,7 +111,7 @@ public virtual FineTuningJobOperation CreateFineTuningJob( /// The response returned from the service. public virtual AsyncCollectionResult GetJobsAsync(string after, int? limit, RequestOptions options) { - return new AsyncFineTuningJobCollectionResult(this, _pipeline, options, limit, after); + return new AsyncFineTuningJobCollectionResult(this, Pipeline, options, limit, after); } // CUSTOM: @@ -127,7 +127,7 @@ public virtual AsyncCollectionResult GetJobsAsync(string after, int? limit, Requ /// The response returned from the service. public virtual CollectionResult GetJobs(string after, int? limit, RequestOptions options) { - return new FineTuningJobCollectionResult(this, _pipeline, options, limit, after); + return new FineTuningJobCollectionResult(this, Pipeline, options, limit, after); } // CUSTOM: @@ -149,7 +149,7 @@ public virtual async Task GetJobAsync(string fineTuningJobId, Requ Argument.AssertNotNullOrEmpty(fineTuningJobId, nameof(fineTuningJobId)); using PipelineMessage message = CreateRetrieveFineTuningJobRequest(fineTuningJobId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -171,12 +171,12 @@ public virtual ClientResult GetJob(string fineTuningJobId, RequestOptions option Argument.AssertNotNullOrEmpty(fineTuningJobId, nameof(fineTuningJobId)); using PipelineMessage message = CreateRetrieveFineTuningJobRequest(fineTuningJobId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } internal virtual PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -193,7 +193,7 @@ internal virtual PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -216,7 +216,7 @@ internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string internal virtual PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index d937bdc7e..aa6bc896e 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -82,12 +82,12 @@ protected internal FineTuningClient(ClientPipeline pipeline, OpenAIClientOptions Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } internal virtual FineTuningJobOperation CreateCreateJobOperation(string jobId, string status, PipelineResponse response) { - return new FineTuningJobOperation(_pipeline, _endpoint, jobId, status, response); + return new FineTuningJobOperation(Pipeline, _endpoint, jobId, status, response); } } diff --git a/.dotnet/src/Custom/Images/GeneratedImageFormat.cs b/.dotnet/src/Custom/Images/GeneratedImageFormat.cs index 79984385b..499354405 100644 --- a/.dotnet/src/Custom/Images/GeneratedImageFormat.cs +++ b/.dotnet/src/Custom/Images/GeneratedImageFormat.cs @@ -8,7 +8,7 @@ public readonly partial struct GeneratedImageFormat // CUSTOM: Renamed. /// Returned as bytes in a base64-encoded string. [CodeGenMember("B64Json")] - public static GeneratedImageFormat Bytes { get; } = new GeneratedImageFormat(BytesValue); + public static GeneratedImageFormat Bytes { get; } = new GeneratedImageFormat(B64JsonValue); // CUSTOM: Renamed. /// @@ -16,5 +16,5 @@ public readonly partial struct GeneratedImageFormat /// only valid for 60 minutes after the image is generated. /// [CodeGenMember("Url")] - public static GeneratedImageFormat Uri { get; } = new GeneratedImageFormat(UriValue); + public static GeneratedImageFormat Uri { get; } = new GeneratedImageFormat(UrlValue); } \ No newline at end of file diff --git a/.dotnet/src/Custom/Images/GeneratedImageQuality.cs b/.dotnet/src/Custom/Images/GeneratedImageQuality.cs index df4a59e08..b769e599b 100644 --- a/.dotnet/src/Custom/Images/GeneratedImageQuality.cs +++ b/.dotnet/src/Custom/Images/GeneratedImageQuality.cs @@ -9,5 +9,5 @@ namespace OpenAI.Images; public readonly partial struct GeneratedImageQuality { [CodeGenMember("Hd")] - public static GeneratedImageQuality High { get; } = new GeneratedImageQuality(HighValue); + public static GeneratedImageQuality High { get; } = new GeneratedImageQuality(HdValue); } \ No newline at end of file diff --git a/.dotnet/src/Custom/Images/GeneratedImageSize.cs b/.dotnet/src/Custom/Images/GeneratedImageSize.cs index 8b16ccc39..b98432e51 100644 --- a/.dotnet/src/Custom/Images/GeneratedImageSize.cs +++ b/.dotnet/src/Custom/Images/GeneratedImageSize.cs @@ -9,8 +9,6 @@ namespace OpenAI.Images; [CodeGenSuppress("op_Implicit", typeof(string))] public readonly partial struct GeneratedImageSize : IEquatable { - private readonly string _value; - /// Initializes a new instance of . /// is null. internal GeneratedImageSize(string value) diff --git a/.dotnet/src/Custom/Images/ImageClient.Protocol.cs b/.dotnet/src/Custom/Images/ImageClient.Protocol.cs index b0ffff651..8cadc9996 100644 --- a/.dotnet/src/Custom/Images/ImageClient.Protocol.cs +++ b/.dotnet/src/Custom/Images/ImageClient.Protocol.cs @@ -32,7 +32,7 @@ public virtual async Task GenerateImagesAsync(BinaryContent conten Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateImageRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -53,7 +53,7 @@ public virtual ClientResult GenerateImages(BinaryContent content, RequestOptions Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateImageRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } // CUSTOM: @@ -79,7 +79,7 @@ public virtual async Task GenerateImageEditsAsync(BinaryContent co Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateImageEditRequest(content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -105,7 +105,7 @@ public virtual ClientResult GenerateImageEdits(BinaryContent content, string con Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateImageEditRequest(content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } // CUSTOM: @@ -131,7 +131,7 @@ public virtual async Task GenerateImageVariationsAsync(BinaryConte Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateImageVariationRequest(content, contentType, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } // CUSTOM: @@ -157,6 +157,6 @@ public virtual ClientResult GenerateImageVariations(BinaryContent content, strin Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); using PipelineMessage message = CreateCreateImageVariationRequest(content, contentType, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Images/ImageClient.cs b/.dotnet/src/Custom/Images/ImageClient.cs index 4d2f0f46a..a6d438dba 100644 --- a/.dotnet/src/Custom/Images/ImageClient.cs +++ b/.dotnet/src/Custom/Images/ImageClient.cs @@ -25,12 +25,6 @@ public partial class ImageClient { private readonly string _model; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . @@ -82,7 +76,7 @@ public ImageClient(string model, ApiKeyCredential credential, OpenAIClientOption options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -104,7 +98,7 @@ protected internal ImageClient(ClientPipeline pipeline, string model, OpenAIClie options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } @@ -123,9 +117,9 @@ public virtual async Task> GenerateImageAsync(strin options ??= new(); CreateImageGenerationOptions(prompt, null, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await GenerateImagesAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates an image based on a prompt. @@ -141,9 +135,9 @@ public virtual ClientResult GenerateImage(string prompt, ImageGe options ??= new(); CreateImageGenerationOptions(prompt, null, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateImages(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates images based on a prompt. @@ -160,9 +154,9 @@ public virtual async Task> GenerateImages options ??= new(); CreateImageGenerationOptions(prompt, imageCount, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await GenerateImagesAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates images based on a prompt. @@ -179,9 +173,9 @@ public virtual ClientResult GenerateImages(string prom options ??= new(); CreateImageGenerationOptions(prompt, imageCount, ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = GenerateImages(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } #endregion @@ -214,7 +208,7 @@ public virtual async Task> GenerateImageEditAsync(S using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, null, null); ClientResult result = await GenerateImageEditsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates an edited or extended image based on an original image and a prompt. @@ -243,7 +237,7 @@ public virtual ClientResult GenerateImageEdit(Stream image, stri using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, null, null); ClientResult result = GenerateImageEdits(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates an edited or extended image based on an original image and a prompt. @@ -320,7 +314,7 @@ public virtual async Task> GenerateImageEditAsync(S using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, mask, maskFilename); ClientResult result = await GenerateImageEditsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates an edited or extended image based on an original image, a prompt, and a mask. @@ -357,7 +351,7 @@ public virtual ClientResult GenerateImageEdit(Stream image, stri using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, mask, maskFilename); ClientResult result = GenerateImageEdits(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates an edited or extended image based on an original image, a prompt, and a mask. @@ -443,7 +437,7 @@ public virtual async Task> GenerateImageE using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, null, null); ClientResult result = await GenerateImageEditsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates edited or extended images based on an original image and a prompt. @@ -473,7 +467,7 @@ public virtual ClientResult GenerateImageEdits(Stream using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, null, null); ClientResult result = GenerateImageEdits(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates edited or extended images based on an original image and a prompt. @@ -553,7 +547,7 @@ public virtual async Task> GenerateImageE using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, mask, maskFilename); ClientResult result = await GenerateImageEditsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates edited or extended images based on an original image, a prompt, and a mask. @@ -591,7 +585,7 @@ public virtual ClientResult GenerateImageEdits(Stream using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename, mask, maskFilename); ClientResult result = GenerateImageEdits(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates edited or extended images based on an original image, a prompt, and a mask. @@ -677,7 +671,7 @@ public virtual async Task> GenerateImageVariationAs using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename); ClientResult result = await GenerateImageVariationsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates a variation of a given image. @@ -701,7 +695,7 @@ public virtual ClientResult GenerateImageVariation(Stream image, using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename); ClientResult result = GenerateImageVariations(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((GeneratedImageCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Generates a variation of a given image. @@ -762,7 +756,7 @@ public virtual async Task> GenerateImageV using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename); ClientResult result = await GenerateImageVariationsAsync(content, content.ContentType, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates variations of a given image. @@ -787,7 +781,7 @@ public virtual ClientResult GenerateImageVariations(St using MultipartFormDataBinaryContent content = options.ToMultipartContent(image, imageFilename); ClientResult result = GenerateImageVariations(content, content.ContentType, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(GeneratedImageCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((GeneratedImageCollection)result, result.GetRawResponse()); } /// Generates variations of a given image. diff --git a/.dotnet/src/Custom/Images/OpenAIImagesModelFactory.cs b/.dotnet/src/Custom/Images/OpenAIImagesModelFactory.cs index c318ff416..c84781c50 100644 --- a/.dotnet/src/Custom/Images/OpenAIImagesModelFactory.cs +++ b/.dotnet/src/Custom/Images/OpenAIImagesModelFactory.cs @@ -12,10 +12,10 @@ public static partial class OpenAIImagesModelFactory public static GeneratedImage GeneratedImage(BinaryData imageBytes = null, Uri imageUri = null, string revisedPrompt = null) { return new GeneratedImage( + revisedPrompt, imageBytes, imageUri, - revisedPrompt, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs index 8c5198774..85020ab01 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs @@ -24,8 +24,8 @@ public partial class OpenAIModelClient [EditorBrowsable(EditorBrowsableState.Never)] public virtual async Task GetModelsAsync(RequestOptions options) { - using PipelineMessage message = CreateGetModelsRequest(options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -38,8 +38,8 @@ public virtual async Task GetModelsAsync(RequestOptions options) [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult GetModels(RequestOptions options) { - using PipelineMessage message = CreateGetModelsRequest(options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + using PipelineMessage message = CreateListModelsRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -58,7 +58,7 @@ public virtual async Task GetModelAsync(string model, RequestOptio Argument.AssertNotNullOrEmpty(model, nameof(model)); using PipelineMessage message = CreateRetrieveModelRequest(model, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -77,7 +77,7 @@ public virtual ClientResult GetModel(string model, RequestOptions options) Argument.AssertNotNullOrEmpty(model, nameof(model)); using PipelineMessage message = CreateRetrieveModelRequest(model, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -95,7 +95,7 @@ public virtual async Task DeleteModelAsync(string model, RequestOp Argument.AssertNotNullOrEmpty(model, nameof(model)); using PipelineMessage message = CreateDeleteModelRequest(model, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -113,6 +113,6 @@ public virtual ClientResult DeleteModel(string model, RequestOptions options) Argument.AssertNotNullOrEmpty(model, nameof(model)); using PipelineMessage message = CreateDeleteModelRequest(model, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.cs index ca2ec515d..657899b37 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.cs @@ -22,12 +22,6 @@ namespace OpenAI.Models; public partial class OpenAIModelClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -58,7 +52,7 @@ public OpenAIModelClient(ApiKeyCredential credential, OpenAIClientOptions option Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -75,7 +69,7 @@ protected internal OpenAIModelClient(ClientPipeline pipeline, OpenAIClientOption Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } @@ -84,7 +78,7 @@ protected internal OpenAIModelClient(ClientPipeline pipeline, OpenAIClientOption public virtual async Task> GetModelsAsync(CancellationToken cancellationToken = default) { ClientResult result = await GetModelsAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIModelCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); } /// Gets basic information about each of the models that are currently available, such as their corresponding owner and availability. @@ -92,7 +86,7 @@ public virtual async Task> GetModelsAsync(Ca public virtual ClientResult GetModels(CancellationToken cancellationToken = default) { ClientResult result = GetModels(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIModelCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); } /// Gets basic information about the specified model, such as its owner and availability. @@ -105,7 +99,7 @@ public virtual async Task> GetModelAsync(string model, Argument.AssertNotNullOrEmpty(model, nameof(model)); ClientResult result = await GetModelAsync(model, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(OpenAIModel.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIModel)result, result.GetRawResponse()); } /// Gets basic information about the specified model, such as its owner and availability. @@ -118,7 +112,7 @@ public virtual ClientResult GetModel(string model, CancellationToke Argument.AssertNotNullOrEmpty(model, nameof(model)); ClientResult result = GetModel(model, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(OpenAIModel.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((OpenAIModel)result, result.GetRawResponse()); } /// Deletes the specified fine-tuned model. @@ -132,7 +126,7 @@ public virtual async Task> DeleteModelAsync(st Argument.AssertNotNullOrEmpty(model, nameof(model)); ClientResult result = await DeleteModelAsync(model, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(ModelDeletionResult.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((ModelDeletionResult)result, result.GetRawResponse()); } /// Deletes the specified fine-tuned model. @@ -146,6 +140,6 @@ public virtual ClientResult DeleteModel(string model, Cance Argument.AssertNotNullOrEmpty(model, nameof(model)); ClientResult result = DeleteModel(model, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(ModelDeletionResult.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((ModelDeletionResult)result, result.GetRawResponse()); } } diff --git a/.dotnet/src/Custom/Models/OpenAIModelsModelFactory.cs b/.dotnet/src/Custom/Models/OpenAIModelsModelFactory.cs index 8413b55c8..61c75e6fb 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelsModelFactory.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelsModelFactory.cs @@ -12,10 +12,10 @@ public static partial class OpenAIModelsModelFactory public static ModelDeletionResult ModelDeletionResult(string modelId = null, bool deleted = default) { return new ModelDeletionResult( - modelId, deleted, + modelId, InternalDeleteModelResponseObject.Model, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -24,10 +24,10 @@ public static OpenAIModel OpenAIModel(string id = null, DateTimeOffset createdAt { return new OpenAIModel( id, - createdAt, - InternalModelObject.Model, ownedBy, - serializedAdditionalRawData: null); + InternalModelObject.Model, + createdAt, + additionalBinaryDataProperties: null); } /// Initializes a new instance of . diff --git a/.dotnet/src/Custom/Moderations/ModerationClient.Protocol.cs b/.dotnet/src/Custom/Moderations/ModerationClient.Protocol.cs index fec631bd2..38e140cc2 100644 --- a/.dotnet/src/Custom/Moderations/ModerationClient.Protocol.cs +++ b/.dotnet/src/Custom/Moderations/ModerationClient.Protocol.cs @@ -24,7 +24,7 @@ public virtual async Task ClassifyTextAsync(BinaryContent content, Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateModerationRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -41,6 +41,6 @@ public virtual ClientResult ClassifyText(BinaryContent content, RequestOptions o Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateModerationRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Moderations/ModerationClient.cs b/.dotnet/src/Custom/Moderations/ModerationClient.cs index 37d6e5a23..f26f3bb3e 100644 --- a/.dotnet/src/Custom/Moderations/ModerationClient.cs +++ b/.dotnet/src/Custom/Moderations/ModerationClient.cs @@ -21,12 +21,6 @@ public partial class ModerationClient { private readonly string _model; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . @@ -78,7 +72,7 @@ public ModerationClient(string model, ApiKeyCredential credential, OpenAIClientO options ??= new OpenAIClientOptions(); _model = model; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -100,7 +94,7 @@ protected internal ModerationClient(ClientPipeline pipeline, string model, OpenA options ??= new OpenAIClientOptions(); _model = model; - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } @@ -116,9 +110,9 @@ public virtual async Task> ClassifyTextAsync(stri ModerationOptions options = new(); CreateModerationOptions(BinaryData.FromObjectAsJson(input), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await ClassifyTextAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(ModerationResultCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((ModerationResultCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Classifies if the text input is potentially harmful across several categories. @@ -133,9 +127,9 @@ public virtual ClientResult ClassifyText(string input, Cancell ModerationOptions options = new(); CreateModerationOptions(BinaryData.FromObjectAsJson(input), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = ClassifyText(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(ModerationResultCollection.FromResponse(result.GetRawResponse()).FirstOrDefault(), result.GetRawResponse()); + return ClientResult.FromValue(((ModerationResultCollection)result).FirstOrDefault(), result.GetRawResponse()); } /// Classifies if the text inputs are potentially harmful across several categories. @@ -150,9 +144,9 @@ public virtual async Task> ClassifyText ModerationOptions options = new(); CreateModerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = await ClassifyTextAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(ModerationResultCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((ModerationResultCollection)result, result.GetRawResponse()); } /// Classifies if the text inputs are potentially harmful across several categories. @@ -167,9 +161,9 @@ public virtual ClientResult ClassifyText(IEnumerable ModerationOptions options = new(); CreateModerationOptions(BinaryData.FromObjectAsJson(inputs), ref options); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult result = ClassifyText(content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(ModerationResultCollection.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((ModerationResultCollection)result, result.GetRawResponse()); } private void CreateModerationOptions(BinaryData input, ref ModerationOptions options) diff --git a/.dotnet/src/Custom/OpenAIClient.cs b/.dotnet/src/Custom/OpenAIClient.cs index 525f9cfe0..b261c542b 100644 --- a/.dotnet/src/Custom/OpenAIClient.cs +++ b/.dotnet/src/Custom/OpenAIClient.cs @@ -77,12 +77,6 @@ private static class KnownHeaderNames private readonly OpenAIClientOptions _options; - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -123,7 +117,7 @@ public OpenAIClient(ApiKeyCredential credential, OpenAIClientOptions options) options ??= new OpenAIClientOptions(); _keyCredential = credential; - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); _options = options; } @@ -138,7 +132,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); _options = options; } @@ -153,7 +147,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// /// A new . [Experimental("OPENAI001")] - public virtual AssistantClient GetAssistantClient() => new(_pipeline, _options); + public virtual AssistantClient GetAssistantClient() => new(Pipeline, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -164,7 +158,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual AudioClient GetAudioClient(string model) => new(_pipeline, model, _options); + public virtual AudioClient GetAudioClient(string model) => new(Pipeline, model, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -176,7 +170,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// /// A new . [Experimental("OPENAI001")] - public virtual BatchClient GetBatchClient() => new(_pipeline, _options); + public virtual BatchClient GetBatchClient() => new(Pipeline, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -187,7 +181,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual ChatClient GetChatClient(string model) => new(_pipeline, model, _options); + public virtual ChatClient GetChatClient(string model) => new(Pipeline, model, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -198,7 +192,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual EmbeddingClient GetEmbeddingClient(string model) => new(_pipeline, model, _options); + public virtual EmbeddingClient GetEmbeddingClient(string model) => new(Pipeline, model, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -209,7 +203,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual OpenAIFileClient GetOpenAIFileClient() => new(_pipeline, _options); + public virtual OpenAIFileClient GetOpenAIFileClient() => new(Pipeline, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -221,7 +215,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// /// A new . [Experimental("OPENAI001")] - public virtual FineTuningClient GetFineTuningClient() => new(_pipeline, _options); + public virtual FineTuningClient GetFineTuningClient() => new(Pipeline, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -232,7 +226,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual ImageClient GetImageClient(string model) => new(_pipeline, model, _options); + public virtual ImageClient GetImageClient(string model) => new(Pipeline, model, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -243,7 +237,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual OpenAIModelClient GetOpenAIModelClient() => new(_pipeline, _options); + public virtual OpenAIModelClient GetOpenAIModelClient() => new(Pipeline, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -254,7 +248,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// the same configuration details. /// /// A new . - public virtual ModerationClient GetModerationClient(string model) => new(_pipeline, model, _options); + public virtual ModerationClient GetModerationClient(string model) => new(Pipeline, model, _options); /// /// Gets a new instance of that reuses the client configuration details provided to @@ -266,7 +260,7 @@ protected internal OpenAIClient(ClientPipeline pipeline, OpenAIClientOptions opt /// /// A new . [Experimental("OPENAI001")] - public virtual VectorStoreClient GetVectorStoreClient() => new(_pipeline, _options); + public virtual VectorStoreClient GetVectorStoreClient() => new(Pipeline, _options); [Experimental("OPENAI002")] public virtual RealtimeConversationClient GetRealtimeConversationClient(string model) => new(model, _keyCredential, _options); diff --git a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs index 15665d03f..f2329a3ef 100644 --- a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs +++ b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs @@ -20,7 +20,6 @@ public partial class RealtimeConversationClient public event EventHandler OnSendingCommand; public event EventHandler OnReceivingCommand; - private readonly Uri _endpoint; private readonly ApiKeyCredential _credential; /// diff --git a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationSession.cs b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationSession.cs index 9ecc09870..3cbe5c41d 100644 --- a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationSession.cs +++ b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationSession.cs @@ -168,7 +168,7 @@ public async IAsyncEnumerable ReceiveUpdatesAsync([Enumerato { await foreach (ClientResult protocolEvent in ReceiveUpdatesAsync(cancellationToken.ToRequestOptions())) { - ConversationUpdate nextUpdate = ConversationUpdate.FromResponse(protocolEvent.GetRawResponse()); + ConversationUpdate nextUpdate = (ConversationUpdate)protocolEvent; yield return nextUpdate; } } diff --git a/.dotnet/src/Custom/VectorStores/AddFileToVectorStoreOperation.cs b/.dotnet/src/Custom/VectorStores/AddFileToVectorStoreOperation.cs index c0004a4d3..d160fb301 100644 --- a/.dotnet/src/Custom/VectorStores/AddFileToVectorStoreOperation.cs +++ b/.dotnet/src/Custom/VectorStores/AddFileToVectorStoreOperation.cs @@ -71,7 +71,7 @@ public static async Task RehydrateAsync(VectorSto ClientResult result = await client.GetFileAssociationAsync(token.VectorStoreId, token.FileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return client.CreateAddFileToVectorStoreOperation(ClientResult.FromValue(value, response)); } @@ -96,7 +96,7 @@ public static AddFileToVectorStoreOperation Rehydrate(VectorStoreClient client, ClientResult result = client.GetFileAssociation(token.VectorStoreId, token.FileId, cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return client.CreateAddFileToVectorStoreOperation(ClientResult.FromValue(value, response)); } @@ -107,7 +107,7 @@ public override async ValueTask UpdateStatusAsync(RequestOptions? ClientResult result = await GetFileAssociationAsync(options).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; ApplyUpdate(response, value); @@ -120,7 +120,7 @@ public override ClientResult UpdateStatus(RequestOptions? options = null) ClientResult result = GetFileAssociation(options); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; ApplyUpdate(response, value); @@ -167,7 +167,7 @@ public virtual async Task> GetFileAssoc { ClientResult result = await GetFileAssociationAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return ClientResult.FromValue(value, response); } @@ -181,7 +181,7 @@ public virtual ClientResult GetFileAssociation(Cance { ClientResult result = GetFileAssociation(cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return ClientResult.FromValue(value, response); } } diff --git a/.dotnet/src/Custom/VectorStores/CreateBatchFileJobOperation.cs b/.dotnet/src/Custom/VectorStores/CreateBatchFileJobOperation.cs index 59511d9f0..ad5acece8 100644 --- a/.dotnet/src/Custom/VectorStores/CreateBatchFileJobOperation.cs +++ b/.dotnet/src/Custom/VectorStores/CreateBatchFileJobOperation.cs @@ -74,7 +74,7 @@ public static async Task RehydrateAsync(VectorStore ClientResult result = await client.GetBatchFileJobAsync(token.VectorStoreId, token.BatchId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob job = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob job = (VectorStoreBatchFileJob) result; return client.CreateBatchFileJobOperation(ClientResult.FromValue(job, response)); } @@ -99,7 +99,7 @@ public static CreateBatchFileJobOperation Rehydrate(VectorStoreClient client, Co ClientResult result = client.GetBatchFileJob(token.VectorStoreId, token.BatchId, cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob job = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob job = (VectorStoreBatchFileJob) result; return client.CreateBatchFileJobOperation(ClientResult.FromValue(job, response)); } @@ -110,7 +110,7 @@ public override async ValueTask UpdateStatusAsync(RequestOptions? ClientResult result = await GetFileBatchAsync(options).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; ApplyUpdate(response, value); @@ -123,7 +123,7 @@ public override ClientResult UpdateStatus(RequestOptions? options = null) ClientResult result = GetFileBatch(options); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; ApplyUpdate(response, value); @@ -171,7 +171,7 @@ public virtual async Task> GetFileBatchAsy { ClientResult result = await GetFileBatchAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; return ClientResult.FromValue(value, response); } @@ -184,7 +184,7 @@ public virtual ClientResult GetFileBatch(CancellationTo { ClientResult result = GetFileBatch(cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; return ClientResult.FromValue(value, response); } @@ -197,7 +197,7 @@ public virtual async Task> CancelAsync(Can { ClientResult result = await CancelAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; return ClientResult.FromValue(value, response); } @@ -210,7 +210,7 @@ public virtual ClientResult Cancel(CancellationToken ca { ClientResult result = Cancel(cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob) result; return ClientResult.FromValue(value, response); } } \ No newline at end of file diff --git a/.dotnet/src/Custom/VectorStores/CreateVectorStoreOperation.cs b/.dotnet/src/Custom/VectorStores/CreateVectorStoreOperation.cs index 1171fd076..d140e7473 100644 --- a/.dotnet/src/Custom/VectorStores/CreateVectorStoreOperation.cs +++ b/.dotnet/src/Custom/VectorStores/CreateVectorStoreOperation.cs @@ -66,7 +66,7 @@ public static async Task RehydrateAsync(VectorStoreC ClientResult result = await client.GetVectorStoreAsync(token.VectorStoreId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStore vectorStore = VectorStore.FromResponse(response); + VectorStore vectorStore = (VectorStore)result; return client.CreateCreateVectorStoreOperation(ClientResult.FromValue(vectorStore, response)); } @@ -91,7 +91,7 @@ public static CreateVectorStoreOperation Rehydrate(VectorStoreClient client, Con ClientResult result = client.GetVectorStore(token.VectorStoreId, cancellationToken.ToRequestOptions()); PipelineResponse response = result.GetRawResponse(); - VectorStore vectorStore = VectorStore.FromResponse(response); + VectorStore vectorStore = (VectorStore)result; return client.CreateCreateVectorStoreOperation(ClientResult.FromValue(vectorStore, response)); } @@ -102,7 +102,7 @@ public override async ValueTask UpdateStatusAsync(RequestOptions? ClientResult result = await GetVectorStoreAsync(options).ConfigureAwait(false); PipelineResponse response = result.GetRawResponse(); - VectorStore value = VectorStore.FromResponse(response); + VectorStore value = (VectorStore)result; ApplyUpdate(response, value); @@ -115,7 +115,7 @@ public override ClientResult UpdateStatus(RequestOptions? options = null) ClientResult result = GetVectorStore(options); PipelineResponse response = result.GetRawResponse(); - VectorStore value = VectorStore.FromResponse(response); + VectorStore value = (VectorStore)result; ApplyUpdate(response, value); @@ -161,7 +161,7 @@ public virtual async Task> GetVectorStoreAsync(Cancell ClientResult result = await GetVectorStoreAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue( - VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + (VectorStore)result, result.GetRawResponse()); } /// @@ -172,6 +172,6 @@ ClientResult result public virtual ClientResult GetVectorStore(CancellationToken cancellationToken = default) { ClientResult result = GetVectorStore(cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); } } diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs index b27f330c4..16077719b 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs @@ -2,6 +2,7 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.ComponentModel; +using System.Text.Json; using System.Threading.Tasks; namespace OpenAI.VectorStores; @@ -51,7 +52,7 @@ public partial class VectorStoreClient [EditorBrowsable(EditorBrowsableState.Never)] public virtual AsyncCollectionResult GetVectorStoresAsync(int? limit, string order, string after, string before, RequestOptions options) { - return new AsyncVectorStoreCollectionResult(this, _pipeline, options, limit, order, after, before); + return new AsyncVectorStoreCollectionResult(this, Pipeline, options, limit, order, after, before); } /// @@ -81,7 +82,7 @@ public virtual AsyncCollectionResult GetVectorStoresAsync(int? limit, string ord [EditorBrowsable(EditorBrowsableState.Never)] public virtual CollectionResult GetVectorStores(int? limit, string order, string after, string before, RequestOptions options) { - return new VectorStoreCollectionResult(this, _pipeline, options, limit, order, after, before); + return new VectorStoreCollectionResult(this, Pipeline, options, limit, order, after, before); } /// @@ -101,8 +102,9 @@ public virtual CollectionResult GetVectorStores(int? limit, string order, string public virtual async Task CreateVectorStoreAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null) { using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); - PipelineResponse response = await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); - VectorStore value = VectorStore.FromResponse(response); + PipelineResponse response = await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStore value = VectorStore.DeserializeVectorStore(document.RootElement, ModelSerializationExtensions.WireOptions); CreateVectorStoreOperation operation = this.CreateCreateVectorStoreOperation(ClientResult.FromValue(value, response)); return await operation.WaitUntilAsync(waitUntilCompleted, options).ConfigureAwait(false); @@ -125,8 +127,9 @@ public virtual async Task CreateVectorStoreAsync(Bin public virtual CreateVectorStoreOperation CreateVectorStore(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null) { using PipelineMessage message = CreateCreateVectorStoreRequest(content, options); - PipelineResponse response = _pipeline.ProcessMessage(message, options); - VectorStore value = VectorStore.FromResponse(response); + PipelineResponse response = Pipeline.ProcessMessage(message, options); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStore value = VectorStore.DeserializeVectorStore(document.RootElement, ModelSerializationExtensions.WireOptions); CreateVectorStoreOperation operation = this.CreateCreateVectorStoreOperation(ClientResult.FromValue(value, response)); return operation.WaitUntil(waitUntilCompleted, options); @@ -146,7 +149,7 @@ internal virtual async Task GetVectorStoreAsync(string vectorStore Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); using PipelineMessage message = CreateGetVectorStoreRequest(vectorStoreId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -163,7 +166,7 @@ internal virtual ClientResult GetVectorStore(string vectorStoreId, RequestOption Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); using PipelineMessage message = CreateGetVectorStoreRequest(vectorStoreId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -183,7 +186,7 @@ public virtual async Task ModifyVectorStoreAsync(string vectorStor Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyVectorStoreRequest(vectorStoreId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -203,7 +206,7 @@ public virtual ClientResult ModifyVectorStore(string vectorStoreId, BinaryConten Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyVectorStoreRequest(vectorStoreId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -221,7 +224,7 @@ public virtual async Task DeleteVectorStoreAsync(string vectorStor Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); using PipelineMessage message = CreateDeleteVectorStoreRequest(vectorStoreId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -239,7 +242,7 @@ public virtual ClientResult DeleteVectorStore(string vectorStoreId, RequestOptio Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); using PipelineMessage message = CreateDeleteVectorStoreRequest(vectorStoreId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -275,7 +278,7 @@ public virtual AsyncCollectionResult GetFileAssociationsAsync(string vectorStore { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - return new AsyncVectorStoreFileCollectionResult(this, _pipeline, options, vectorStoreId, limit, order, after, before, filter); + return new AsyncVectorStoreFileCollectionResult(this, Pipeline, options, vectorStoreId, limit, order, after, before, filter); } /// @@ -311,7 +314,7 @@ public virtual CollectionResult GetFileAssociations(string vectorStoreId, int? l { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - return new VectorStoreFileCollectionResult(this, _pipeline, options, vectorStoreId, limit, order, after, before, filter); + return new VectorStoreFileCollectionResult(this, Pipeline, options, vectorStoreId, limit, order, after, before, filter); } @@ -337,8 +340,9 @@ public virtual async Task AddFileToVectorStoreAsy Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateVectorStoreFileRequest(vectorStoreId, content, options); - PipelineResponse response = await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + PipelineResponse response = await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStoreFileAssociation value = VectorStoreFileAssociation.DeserializeVectorStoreFileAssociation(document.RootElement, ModelSerializationExtensions.WireOptions); AddFileToVectorStoreOperation operation = this.CreateAddFileToVectorStoreOperation(ClientResult.FromValue(value, response)); return await operation.WaitUntilAsync(waitUntilCompleted, options).ConfigureAwait(false); @@ -366,8 +370,9 @@ public virtual AddFileToVectorStoreOperation AddFileToVectorStore(string vectorS Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateVectorStoreFileRequest(vectorStoreId, content, options); - PipelineResponse response = _pipeline.ProcessMessage(message, options); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + PipelineResponse response = Pipeline.ProcessMessage(message, options); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStoreFileAssociation value = VectorStoreFileAssociation.DeserializeVectorStoreFileAssociation(document.RootElement, ModelSerializationExtensions.WireOptions); AddFileToVectorStoreOperation operation = this.CreateAddFileToVectorStoreOperation(ClientResult.FromValue(value, response)); return operation.WaitUntil(waitUntilCompleted, options); @@ -390,7 +395,7 @@ public virtual async Task GetFileAssociationAsync(string vectorSto Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -410,7 +415,7 @@ public virtual ClientResult GetFileAssociation(string vectorStoreId, string file Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -430,7 +435,7 @@ public virtual async Task CancelBatchFileJobAsync(string vectorSto Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateCancelVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -450,7 +455,7 @@ public virtual ClientResult CancelBatchFileJob(string vectorStoreId, string batc Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateCancelVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -488,7 +493,7 @@ public virtual AsyncCollectionResult GetFileAssociationsAsync(string vectorStore Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - return new AsyncVectorStoreFileBatchCollectionResult(this, _pipeline, options, vectorStoreId, batchId, limit, order, after, before, filter); + return new AsyncVectorStoreFileBatchCollectionResult(this, Pipeline, options, vectorStoreId, batchId, limit, order, after, before, filter); } /// @@ -526,7 +531,7 @@ public virtual CollectionResult GetFileAssociations(string vectorStoreId, string Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - return new VectorStoreFileBatchCollectionResult(this, _pipeline, options, vectorStoreId, batchId, limit, order, after, before, filter); + return new VectorStoreFileBatchCollectionResult(this, Pipeline, options, vectorStoreId, batchId, limit, order, after, before, filter); } /// @@ -546,7 +551,7 @@ public virtual async Task RemoveFileFromStoreAsync(string vectorSt Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDeleteVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -566,7 +571,7 @@ public virtual ClientResult RemoveFileFromStore(string vectorStoreId, string fil Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); using PipelineMessage message = CreateDeleteVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -595,8 +600,9 @@ public virtual async Task CreateBatchFileJobAsync( Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateVectorStoreFileBatchRequest(vectorStoreId, content, options); - PipelineResponse response = await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); - VectorStoreBatchFileJob job = VectorStoreBatchFileJob.FromResponse(response); + PipelineResponse response = await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStoreBatchFileJob job = VectorStoreBatchFileJob.DeserializeVectorStoreBatchFileJob(document.RootElement, ModelSerializationExtensions.WireOptions); CreateBatchFileJobOperation operation = this.CreateBatchFileJobOperation(ClientResult.FromValue(job, response)); return await operation.WaitUntilAsync(waitUntilCompleted, options).ConfigureAwait(false); @@ -628,8 +634,9 @@ public virtual CreateBatchFileJobOperation CreateBatchFileJob( Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateCreateVectorStoreFileBatchRequest(vectorStoreId, content, options); - PipelineResponse response = _pipeline.ProcessMessage(message, options); - VectorStoreBatchFileJob job = VectorStoreBatchFileJob.FromResponse(response); + PipelineResponse response = Pipeline.ProcessMessage(message, options); + using JsonDocument document = JsonDocument.Parse(response.Content); + VectorStoreBatchFileJob job = VectorStoreBatchFileJob.DeserializeVectorStoreBatchFileJob(document.RootElement, ModelSerializationExtensions.WireOptions); CreateBatchFileJobOperation operation = this.CreateBatchFileJobOperation(ClientResult.FromValue(job, response)); return operation.WaitUntil(waitUntilCompleted, options); @@ -651,7 +658,7 @@ internal virtual async Task GetBatchFileJobAsync(string vectorStor Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -670,12 +677,12 @@ internal virtual ClientResult GetBatchFileJob(string vectorStoreId, string batch Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); using PipelineMessage message = CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } internal virtual PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -692,7 +699,7 @@ internal virtual PipelineMessage CreateCreateVectorStoreRequest(BinaryContent co internal virtual PipelineMessage CreateGetVectorStoresRequest(int? limit, string order, string after, string before, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -723,7 +730,7 @@ internal virtual PipelineMessage CreateGetVectorStoresRequest(int? limit, string internal virtual PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -739,7 +746,7 @@ internal virtual PipelineMessage CreateGetVectorStoreRequest(string vectorStoreI internal virtual PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -757,7 +764,7 @@ internal virtual PipelineMessage CreateModifyVectorStoreRequest(string vectorSto internal virtual PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "DELETE"; @@ -773,7 +780,7 @@ internal virtual PipelineMessage CreateDeleteVectorStoreRequest(string vectorSto internal virtual PipelineMessage CreateGetVectorStoreFilesRequest(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -810,7 +817,7 @@ internal virtual PipelineMessage CreateGetVectorStoreFilesRequest(string vectorS internal virtual PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -829,7 +836,7 @@ internal virtual PipelineMessage CreateCreateVectorStoreFileRequest(string vecto internal virtual PipelineMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "DELETE"; @@ -847,7 +854,7 @@ internal virtual PipelineMessage CreateDeleteVectorStoreFileRequest(string vecto internal virtual PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -866,7 +873,7 @@ internal virtual PipelineMessage CreateCancelVectorStoreFileBatchRequest(string internal virtual PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "POST"; @@ -885,7 +892,7 @@ internal virtual PipelineMessage CreateCreateVectorStoreFileBatchRequest(string internal virtual PipelineMessage CreateGetVectorStoreFileRequest(string vectorStoreId, string fileId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -903,7 +910,7 @@ internal virtual PipelineMessage CreateGetVectorStoreFileRequest(string vectorSt internal virtual PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; @@ -921,7 +928,7 @@ internal virtual PipelineMessage CreateGetVectorStoreFileBatchRequest(string vec internal virtual PipelineMessage CreateGetFilesInVectorStoreBatchesRequest(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - var message = _pipeline.CreateMessage(); + var message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; var request = message.Request; request.Method = "GET"; diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index 24d1bd0ec..3d2492032 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -43,12 +43,6 @@ namespace OpenAI.VectorStores; [CodeGenSuppress("GetFilesInVectorStoreBatches", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] public partial class VectorStoreClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. @@ -87,7 +81,7 @@ public VectorStoreClient(ApiKeyCredential credential, OpenAIClientOptions option Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -104,13 +98,13 @@ protected internal VectorStoreClient(ClientPipeline pipeline, OpenAIClientOption Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } internal virtual CreateVectorStoreOperation CreateCreateVectorStoreOperation(ClientResult result) { - return new CreateVectorStoreOperation(_pipeline, _endpoint, result); + return new CreateVectorStoreOperation(Pipeline, _endpoint, result); } internal virtual AddFileToVectorStoreOperation CreateAddFileToVectorStoreOperation(ClientResult result) @@ -135,7 +129,7 @@ internal virtual CreateBatchFileJobOperation CreateBatchFileJobOperation(ClientR /// the vector store creation to complete. public virtual async Task CreateVectorStoreAsync(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default) { - using BinaryContent content = vectorStore?.ToBinaryContent(); + using BinaryContent content = vectorStore; return await CreateVectorStoreAsync(content, waitUntilCompleted, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } @@ -151,7 +145,7 @@ public virtual async Task CreateVectorStoreAsync(boo /// the vector store creation to complete. public virtual CreateVectorStoreOperation CreateVectorStore(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default) { - using BinaryContent content = vectorStore?.ToBinaryContent(); + using BinaryContent content = vectorStore; return CreateVectorStore(content, waitUntilCompleted, cancellationToken.ToRequestOptions()); } @@ -168,7 +162,7 @@ internal virtual async Task> GetVectorStoreAsync(strin ClientResult result = await GetVectorStoreAsync(vectorStoreId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue( - VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + (VectorStore)result, result.GetRawResponse()); } /// @@ -182,7 +176,7 @@ public virtual ClientResult GetVectorStore(string vectorStoreId, Ca Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); ClientResult result = GetVectorStore(vectorStoreId, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); } /// @@ -197,9 +191,9 @@ public virtual async Task> ModifyVectorStoreAsync(stri Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(vectorStore, nameof(vectorStore)); - using BinaryContent content = vectorStore.ToBinaryContent(); + using BinaryContent content = vectorStore; ClientResult result = await ModifyVectorStoreAsync(vectorStoreId, content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); } /// @@ -214,9 +208,9 @@ public virtual ClientResult ModifyVectorStore(string vectorStoreId, Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(vectorStore, nameof(vectorStore)); - using BinaryContent content = vectorStore.ToBinaryContent(); + using BinaryContent content = vectorStore; ClientResult result = ModifyVectorStore(vectorStoreId, content, cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(VectorStore.FromResponse(result.GetRawResponse()), result.GetRawResponse()); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); } /// @@ -231,7 +225,7 @@ public virtual async Task> DeleteVectorS ClientResult protocolResult = await DeleteVectorStoreAsync(vectorStoreId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse rawProtocolResponse = protocolResult?.GetRawResponse(); - VectorStoreDeletionResult value = VectorStoreDeletionResult.FromResponse(rawProtocolResponse); + VectorStoreDeletionResult value = (VectorStoreDeletionResult)protocolResult; return ClientResult.FromValue(value, rawProtocolResponse); } @@ -247,7 +241,7 @@ public virtual ClientResult DeleteVectorStore(string ClientResult protocolResult = DeleteVectorStore(vectorStoreId, cancellationToken.ToRequestOptions()); PipelineResponse rawProtocolResponse = protocolResult?.GetRawResponse(); - VectorStoreDeletionResult value = VectorStoreDeletionResult.FromResponse(rawProtocolResponse); + VectorStoreDeletionResult value = (VectorStoreDeletionResult)protocolResult; return ClientResult.FromValue(value, rawProtocolResponse); } @@ -332,7 +326,7 @@ public virtual async Task AddFileToVectorStoreAsy Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); InternalCreateVectorStoreFileRequest internalRequest = new(fileId); - return await AddFileToVectorStoreAsync(vectorStoreId, internalRequest.ToBinaryContent(), waitUntilCompleted, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await AddFileToVectorStoreAsync(vectorStoreId, internalRequest, waitUntilCompleted, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } /// @@ -354,7 +348,7 @@ public virtual AddFileToVectorStoreOperation AddFileToVectorStore(string vectorS Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); InternalCreateVectorStoreFileRequest internalRequest = new(fileId); - return AddFileToVectorStore(vectorStoreId, internalRequest.ToBinaryContent(), waitUntilCompleted, cancellationToken.ToRequestOptions()); + return AddFileToVectorStore(vectorStoreId, internalRequest, waitUntilCompleted, cancellationToken.ToRequestOptions()); } /// @@ -451,7 +445,7 @@ public virtual async Task> GetFileAssoc ClientResult result = await GetFileAssociationAsync(vectorStoreId, fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result?.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return ClientResult.FromValue(value, response); } @@ -473,7 +467,7 @@ public virtual ClientResult GetFileAssociation( ClientResult result = GetFileAssociation(vectorStoreId, fileId, cancellationToken.ToRequestOptions()); PipelineResponse response = result?.GetRawResponse(); - VectorStoreFileAssociation value = VectorStoreFileAssociation.FromResponse(response); + VectorStoreFileAssociation value = (VectorStoreFileAssociation)result; return ClientResult.FromValue(value, response); } @@ -492,7 +486,7 @@ public virtual async Task> RemoveFileFr { ClientResult protocolResult = await RemoveFileFromStoreAsync(vectorStoreId, fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse protocolResponse = protocolResult?.GetRawResponse(); - FileFromStoreRemovalResult value = FileFromStoreRemovalResult.FromResponse(protocolResponse); + FileFromStoreRemovalResult value = (FileFromStoreRemovalResult)protocolResult; return ClientResult.FromValue(value, protocolResponse); } @@ -511,7 +505,7 @@ public virtual ClientResult RemoveFileFromStore(stri { ClientResult protocolResult = RemoveFileFromStore(vectorStoreId, fileId, cancellationToken.ToRequestOptions()); PipelineResponse protocolResponse = protocolResult?.GetRawResponse(); - FileFromStoreRemovalResult value = FileFromStoreRemovalResult.FromResponse(protocolResponse); + FileFromStoreRemovalResult value = (FileFromStoreRemovalResult)protocolResult; return ClientResult.FromValue(value, protocolResponse); } @@ -536,7 +530,7 @@ public virtual async Task CreateBatchFileJobAsync( Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(fileIds, nameof(fileIds)); - BinaryContent content = new InternalCreateVectorStoreFileBatchRequest(fileIds).ToBinaryContent(); + BinaryContent content = new InternalCreateVectorStoreFileBatchRequest(fileIds); RequestOptions options = cancellationToken.ToRequestOptions(); return await CreateBatchFileJobAsync(vectorStoreId, content, waitUntilCompleted, options).ConfigureAwait(false); @@ -563,7 +557,7 @@ public virtual CreateBatchFileJobOperation CreateBatchFileJob( Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(fileIds, nameof(fileIds)); - BinaryContent content = new InternalCreateVectorStoreFileBatchRequest(fileIds).ToBinaryContent(); + BinaryContent content = new InternalCreateVectorStoreFileBatchRequest(fileIds); RequestOptions options = cancellationToken.ToRequestOptions(); return CreateBatchFileJob(vectorStoreId, content, waitUntilCompleted, options); @@ -716,7 +710,7 @@ public virtual async Task> GetBatchFileJob ClientResult result = await GetBatchFileJobAsync(vectorStoreId, batchJobId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result?.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob)result; return ClientResult.FromValue(value, response); } @@ -734,7 +728,7 @@ public virtual ClientResult GetBatchFileJob(string vect ClientResult result = GetBatchFileJob(vectorStoreId, batchJobId, cancellationToken.ToRequestOptions()); PipelineResponse response = result?.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob)result; return ClientResult.FromValue(value, response); } @@ -756,7 +750,7 @@ public virtual async Task> CancelBatchFile ClientResult result = await CancelBatchFileJobAsync(vectorStoreId, batchJobId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); PipelineResponse response = result?.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob)result; return ClientResult.FromValue(value, response); } @@ -778,7 +772,7 @@ public virtual ClientResult CancelBatchFileJob(string v ClientResult result = CancelBatchFileJob(vectorStoreId, batchJobId, cancellationToken.ToRequestOptions()); PipelineResponse response = result?.GetRawResponse(); - VectorStoreBatchFileJob value = VectorStoreBatchFileJob.FromResponse(response); + VectorStoreBatchFileJob value = (VectorStoreBatchFileJob)result; return ClientResult.FromValue(value, response); } } diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreCollectionOrder.cs b/.dotnet/src/Custom/VectorStores/VectorStoreCollectionOrder.cs index d6f294c96..89aa5eda2 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreCollectionOrder.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct VectorStoreCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static VectorStoreCollectionOrder Ascending { get; } = new VectorStoreCollectionOrder(AscendingValue); + public static VectorStoreCollectionOrder Ascending { get; } = new VectorStoreCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static VectorStoreCollectionOrder Descending { get; } = new VectorStoreCollectionOrder(DescendingValue); + public static VectorStoreCollectionOrder Descending { get; } = new VectorStoreCollectionOrder(DescValue); } diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreFileAssociationCollectionOrder.cs b/.dotnet/src/Custom/VectorStores/VectorStoreFileAssociationCollectionOrder.cs index 888cf8322..a71f40fa3 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreFileAssociationCollectionOrder.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreFileAssociationCollectionOrder.cs @@ -9,9 +9,9 @@ public readonly partial struct VectorStoreFileAssociationCollectionOrder { // CUSTOM: Renamed. [CodeGenMember("Asc")] - public static VectorStoreFileAssociationCollectionOrder Ascending { get; } = new VectorStoreFileAssociationCollectionOrder(AscendingValue); + public static VectorStoreFileAssociationCollectionOrder Ascending { get; } = new VectorStoreFileAssociationCollectionOrder(AscValue); // CUSTOM: Renamed. [CodeGenMember("Desc")] - public static VectorStoreFileAssociationCollectionOrder Descending { get; } = new VectorStoreFileAssociationCollectionOrder(DescendingValue); + public static VectorStoreFileAssociationCollectionOrder Descending { get; } = new VectorStoreFileAssociationCollectionOrder(DescValue); } diff --git a/.dotnet/src/Generated/AssistantClient.RestClient.cs b/.dotnet/src/Generated/AssistantClient.RestClient.cs index 3605f5103..eba1b3325 100644 --- a/.dotnet/src/Generated/AssistantClient.RestClient.cs +++ b/.dotnet/src/Generated/AssistantClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class AssistantClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.AssistantClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.AssistantClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.AssistantClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateAssistantRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/AudioClient.RestClient.cs b/.dotnet/src/Generated/AudioClient.RestClient.cs index d04908c68..1fa68b9ff 100644 --- a/.dotnet/src/Generated/AudioClient.RestClient.cs +++ b/.dotnet/src/Generated/AudioClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class AudioClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.AudioClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.AudioClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.AudioClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateSpeechRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/BatchClient.RestClient.cs b/.dotnet/src/Generated/BatchClient.RestClient.cs index df8f7cd69..4145876a0 100644 --- a/.dotnet/src/Generated/BatchClient.RestClient.cs +++ b/.dotnet/src/Generated/BatchClient.RestClient.cs @@ -12,13 +12,13 @@ public partial class BatchClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.BatchClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.BatchClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.BatchClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateListBatchesRequest(string after, int? limit, RequestOptions options) { diff --git a/.dotnet/src/Generated/ChatClient.RestClient.cs b/.dotnet/src/Generated/ChatClient.RestClient.cs index aa5a49818..8c7fd5039 100644 --- a/.dotnet/src/Generated/ChatClient.RestClient.cs +++ b/.dotnet/src/Generated/ChatClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class ChatClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.ChatClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.ChatClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ChatClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/EmbeddingClient.RestClient.cs b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs index 6a5ff202a..bfa4e2cb6 100644 --- a/.dotnet/src/Generated/EmbeddingClient.RestClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class EmbeddingClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.EmbeddingClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.EmbeddingClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.EmbeddingClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateEmbeddingRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/EmbeddingClient.cs b/.dotnet/src/Generated/EmbeddingClient.cs index 2b97b2558..2e81fb221 100644 --- a/.dotnet/src/Generated/EmbeddingClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; namespace OpenAI.Embeddings { @@ -17,5 +18,7 @@ public partial class EmbeddingClient protected EmbeddingClient() { } + + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/FineTuningClient.RestClient.cs b/.dotnet/src/Generated/FineTuningClient.RestClient.cs index 7d8ad9a96..43042d504 100644 --- a/.dotnet/src/Generated/FineTuningClient.RestClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.RestClient.cs @@ -12,13 +12,13 @@ public partial class FineTuningClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.FineTuningClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.FineTuningClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.FineTuningClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateListPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) { diff --git a/.dotnet/src/Generated/ImageClient.RestClient.cs b/.dotnet/src/Generated/ImageClient.RestClient.cs index 8343f15bb..284ca85b0 100644 --- a/.dotnet/src/Generated/ImageClient.RestClient.cs +++ b/.dotnet/src/Generated/ImageClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class ImageClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.ImageClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.ImageClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ImageClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateImageRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/ImageClient.cs b/.dotnet/src/Generated/ImageClient.cs index 56d152802..baaaa6c0e 100644 --- a/.dotnet/src/Generated/ImageClient.cs +++ b/.dotnet/src/Generated/ImageClient.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; namespace OpenAI.Images { @@ -17,5 +18,7 @@ public partial class ImageClient protected ImageClient() { } + + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs index 765c31d74..58ec8f1b6 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -13,13 +13,13 @@ internal partial class InternalAssistantMessageClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantMessageClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateMessageRequest(string threadId, BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs index a3dfd878f..02fcb0e54 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -13,13 +13,13 @@ internal partial class InternalAssistantRunClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantRunClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs index 43cfe1c33..03895bed3 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -13,13 +13,13 @@ internal partial class InternalAssistantThreadClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalAssistantThreadClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs index cb7b48b2d..72fc9ae35 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs @@ -13,13 +13,13 @@ internal partial class InternalUploadsClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.InternalUploadsClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.InternalUploadsClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.InternalUploadsClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs index 9362b6a1a..7f6bdc73a 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs @@ -13,13 +13,13 @@ internal partial class LegacyCompletionClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.LegacyCompletionClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateCompletionRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index ed6755886..3a09ae672 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -24,7 +24,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteEndObject(); } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit FineTuningJobHyperparameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual FineTuningJobHyperparameters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + private FineTuningJobHyperparameters JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -92,7 +92,7 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame { if (element.ValueKind == JsonValueKind.Null) { - return null; + return default; } BinaryData nEpochs = default; BinaryData batchSize = default; @@ -125,7 +125,7 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + private BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) @@ -139,7 +139,7 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions FineTuningJobHyperparameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual FineTuningJobHyperparameters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + private FineTuningJobHyperparameters PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index f4e4621c1..2cce9ee54 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -24,7 +24,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndObject(); } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual TranscribedSegment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + private TranscribedSegment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -90,7 +90,7 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele { if (element.ValueKind == JsonValueKind.Null) { - return null; + return default; } int id = default; string text = default; @@ -185,7 +185,7 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + private BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) @@ -199,7 +199,7 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions TranscribedSegment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual TranscribedSegment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + private TranscribedSegment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index a9d89d89c..86797724c 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -24,7 +24,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteEndObject(); } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit TranscribedWord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual TranscribedWord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + private TranscribedWord JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -71,7 +71,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, { if (element.ValueKind == JsonValueKind.Null) { - return null; + return default; } string word = default; TimeSpan startTime = default; @@ -104,7 +104,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + private BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) @@ -118,7 +118,7 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions TranscribedWord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual TranscribedWord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + private TranscribedWord PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) diff --git a/.dotnet/src/Generated/ModerationClient.RestClient.cs b/.dotnet/src/Generated/ModerationClient.RestClient.cs index b89fd6345..a4feac46b 100644 --- a/.dotnet/src/Generated/ModerationClient.RestClient.cs +++ b/.dotnet/src/Generated/ModerationClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class ModerationClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.ModerationClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.ModerationClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.ModerationClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateModerationRequest(BinaryContent content, RequestOptions options) { diff --git a/.dotnet/src/Generated/ModerationClient.cs b/.dotnet/src/Generated/ModerationClient.cs index 667afbd2e..e9b11d1f4 100644 --- a/.dotnet/src/Generated/ModerationClient.cs +++ b/.dotnet/src/Generated/ModerationClient.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; namespace OpenAI.Moderations { @@ -17,5 +18,7 @@ public partial class ModerationClient protected ModerationClient() { } + + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 899452575..708a7745d 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using System.Threading; using OpenAI.Assistants; using OpenAI.Audio; @@ -49,89 +50,91 @@ protected OpenAIClient() { } + public ClientPipeline Pipeline { get; } + public virtual AudioClient GetAudioClientClient() { - return Volatile.Read(ref _cachedAudioClient) ?? Interlocked.CompareExchange(ref _cachedAudioClient, new AudioClient(_keyCredential, _endpoint), null) ?? _cachedAudioClient; + return Volatile.Read(ref _cachedAudioClient) ?? Interlocked.CompareExchange(ref _cachedAudioClient, new AudioClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAudioClient; } public virtual AssistantClient GetAssistantClientClient() { - return Volatile.Read(ref _cachedAssistantClient) ?? Interlocked.CompareExchange(ref _cachedAssistantClient, new AssistantClient(_keyCredential, _endpoint), null) ?? _cachedAssistantClient; + return Volatile.Read(ref _cachedAssistantClient) ?? Interlocked.CompareExchange(ref _cachedAssistantClient, new AssistantClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAssistantClient; } public virtual BatchClient GetBatchClientClient() { - return Volatile.Read(ref _cachedBatchClient) ?? Interlocked.CompareExchange(ref _cachedBatchClient, new BatchClient(_keyCredential, _endpoint), null) ?? _cachedBatchClient; + return Volatile.Read(ref _cachedBatchClient) ?? Interlocked.CompareExchange(ref _cachedBatchClient, new BatchClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedBatchClient; } public virtual ChatClient GetChatClientClient() { - return Volatile.Read(ref _cachedChatClient) ?? Interlocked.CompareExchange(ref _cachedChatClient, new ChatClient(_keyCredential, _endpoint), null) ?? _cachedChatClient; + return Volatile.Read(ref _cachedChatClient) ?? Interlocked.CompareExchange(ref _cachedChatClient, new ChatClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedChatClient; } public virtual LegacyCompletionClient GetLegacyCompletionClientClient() { - return Volatile.Read(ref _cachedLegacyCompletionClient) ?? Interlocked.CompareExchange(ref _cachedLegacyCompletionClient, new LegacyCompletionClient(_keyCredential, _endpoint), null) ?? _cachedLegacyCompletionClient; + return Volatile.Read(ref _cachedLegacyCompletionClient) ?? Interlocked.CompareExchange(ref _cachedLegacyCompletionClient, new LegacyCompletionClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedLegacyCompletionClient; } public virtual EmbeddingClient GetEmbeddingClientClient() { - return Volatile.Read(ref _cachedEmbeddingClient) ?? Interlocked.CompareExchange(ref _cachedEmbeddingClient, new EmbeddingClient(_keyCredential, _endpoint), null) ?? _cachedEmbeddingClient; + return Volatile.Read(ref _cachedEmbeddingClient) ?? Interlocked.CompareExchange(ref _cachedEmbeddingClient, new EmbeddingClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedEmbeddingClient; } public virtual OpenAIFileClient GetOpenAIFileClientClient() { - return Volatile.Read(ref _cachedOpenAIFileClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIFileClient, new OpenAIFileClient(_keyCredential, _endpoint), null) ?? _cachedOpenAIFileClient; + return Volatile.Read(ref _cachedOpenAIFileClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIFileClient, new OpenAIFileClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedOpenAIFileClient; } public virtual FineTuningClient GetFineTuningClientClient() { - return Volatile.Read(ref _cachedFineTuningClient) ?? Interlocked.CompareExchange(ref _cachedFineTuningClient, new FineTuningClient(_keyCredential, _endpoint), null) ?? _cachedFineTuningClient; + return Volatile.Read(ref _cachedFineTuningClient) ?? Interlocked.CompareExchange(ref _cachedFineTuningClient, new FineTuningClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedFineTuningClient; } public virtual ImageClient GetImageClientClient() { - return Volatile.Read(ref _cachedImageClient) ?? Interlocked.CompareExchange(ref _cachedImageClient, new ImageClient(_keyCredential, _endpoint), null) ?? _cachedImageClient; + return Volatile.Read(ref _cachedImageClient) ?? Interlocked.CompareExchange(ref _cachedImageClient, new ImageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedImageClient; } public virtual InternalAssistantMessageClient GetInternalAssistantMessageClientClient() { - return Volatile.Read(ref _cachedInternalAssistantMessageClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantMessageClient, new InternalAssistantMessageClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantMessageClient; + return Volatile.Read(ref _cachedInternalAssistantMessageClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantMessageClient, new InternalAssistantMessageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantMessageClient; } public virtual OpenAIModelClient GetOpenAIModelClientClient() { - return Volatile.Read(ref _cachedOpenAIModelClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIModelClient, new OpenAIModelClient(_keyCredential, _endpoint), null) ?? _cachedOpenAIModelClient; + return Volatile.Read(ref _cachedOpenAIModelClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIModelClient, new OpenAIModelClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedOpenAIModelClient; } public virtual ModerationClient GetModerationClientClient() { - return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(_keyCredential, _endpoint), null) ?? _cachedModerationClient; + return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedModerationClient; } public virtual RealtimeConversationClient GetRealtimeConversationClientClient() { - return Volatile.Read(ref _cachedRealtimeConversationClient) ?? Interlocked.CompareExchange(ref _cachedRealtimeConversationClient, new RealtimeConversationClient(_keyCredential, _endpoint), null) ?? _cachedRealtimeConversationClient; + return Volatile.Read(ref _cachedRealtimeConversationClient) ?? Interlocked.CompareExchange(ref _cachedRealtimeConversationClient, new RealtimeConversationClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedRealtimeConversationClient; } public virtual InternalAssistantThreadClient GetInternalAssistantThreadClientClient() { - return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; + return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; } public virtual InternalAssistantRunClient GetInternalAssistantRunClientClient() { - return Volatile.Read(ref _cachedInternalAssistantRunClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantRunClient, new InternalAssistantRunClient(_keyCredential, _endpoint), null) ?? _cachedInternalAssistantRunClient; + return Volatile.Read(ref _cachedInternalAssistantRunClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantRunClient, new InternalAssistantRunClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantRunClient; } public virtual VectorStoreClient GetVectorStoreClientClient() { - return Volatile.Read(ref _cachedVectorStoreClient) ?? Interlocked.CompareExchange(ref _cachedVectorStoreClient, new VectorStoreClient(_keyCredential, _endpoint), null) ?? _cachedVectorStoreClient; + return Volatile.Read(ref _cachedVectorStoreClient) ?? Interlocked.CompareExchange(ref _cachedVectorStoreClient, new VectorStoreClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedVectorStoreClient; } public virtual InternalUploadsClient GetInternalUploadsClientClient() { - return Volatile.Read(ref _cachedInternalUploadsClient) ?? Interlocked.CompareExchange(ref _cachedInternalUploadsClient, new InternalUploadsClient(_keyCredential, _endpoint), null) ?? _cachedInternalUploadsClient; + return Volatile.Read(ref _cachedInternalUploadsClient) ?? Interlocked.CompareExchange(ref _cachedInternalUploadsClient, new InternalUploadsClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalUploadsClient; } } } diff --git a/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs index ac5561391..e60ffbcf0 100644 --- a/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs @@ -13,13 +13,13 @@ public partial class OpenAIFileClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.OpenAIFileClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.OpenAIFileClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.OpenAIFileClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string contentType, RequestOptions options) { diff --git a/.dotnet/src/Generated/OpenAIFileClient.cs b/.dotnet/src/Generated/OpenAIFileClient.cs index a498cebdc..042df93e4 100644 --- a/.dotnet/src/Generated/OpenAIFileClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.cs @@ -20,6 +20,8 @@ protected OpenAIFileClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListFiles(string purpose, RequestOptions options) { using PipelineMessage message = CreateListFilesRequest(purpose, options); diff --git a/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs index 76b4352f2..dd0683963 100644 --- a/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs @@ -12,13 +12,13 @@ public partial class OpenAIModelClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.OpenAIModelClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.OpenAIModelClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.OpenAIModelClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateListModelsRequest(RequestOptions options) { diff --git a/.dotnet/src/Generated/OpenAIModelClient.cs b/.dotnet/src/Generated/OpenAIModelClient.cs index 930ebb7cd..e45c59aa3 100644 --- a/.dotnet/src/Generated/OpenAIModelClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.cs @@ -20,6 +20,8 @@ protected OpenAIModelClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListModels(RequestOptions options) { using PipelineMessage message = CreateListModelsRequest(options); diff --git a/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs index ba2e1ce7f..44191525d 100644 --- a/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs +++ b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs @@ -4,7 +4,6 @@ using System; using System.ClientModel.Primitives; -using OpenAI; namespace OpenAI.RealtimeConversation { @@ -12,13 +11,13 @@ public partial class RealtimeConversationClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.RealtimeConversationClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); private class Classifier2xxAnd4xx : PipelineMessageClassifier { diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs index 02f103b64..c1aa262e3 100644 --- a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -12,13 +12,13 @@ public partial class VectorStoreClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; private static PipelineMessageClassifier _pipelineMessageClassifier204; - private static OpenAI.VectorStoreClient.Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; + private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - private static OpenAI.VectorStoreClient.Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new OpenAI.VectorStoreClient.Classifier2xxAnd4xx(); + private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); internal PipelineMessage CreateListVectorStoresRequest(int? limit, string order, string after, string before, RequestOptions options) { diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 8f24b6659..3cf6f1afa 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -21,6 +21,8 @@ protected VectorStoreClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListVectorStores(int? limit, string order, string after, string before, RequestOptions options) { using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); From a5c38e8bf2b40ce19029e2224dc1136ca1576e70 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 15 Oct 2024 12:30:33 -0700 Subject: [PATCH 07/54] Regen --- .../src/Custom/Assistants/AssistantClient.cs | 8 +- .../FunctionToolDefinition.Serialization.cs | 2 +- .../InternalAssistantRunClient.Protocol.cs | 28 ++-- .../Internal/InternalAssistantRunClient.cs | 10 +- .../InternalAssistantThreadClient.Protocol.cs | 16 +-- .../Internal/InternalAssistantThreadClient.cs | 4 +- ...esponseMessageTextContent.Serialization.cs | 2 +- .../Pagination/AssistantCollectionResult.cs | 2 +- .../AsyncAssistantCollectionResult.cs | 2 +- .../AsyncMessageCollectionResult.cs | 4 +- .../Pagination/AsyncRunCollectionResult.cs | 4 +- .../AsyncRunStepCollectionResult.cs | 4 +- .../Pagination/MessageCollectionResult.cs | 4 +- .../Pagination/RunCollectionResult.cs | 4 +- .../Pagination/RunStepCollectionResult.cs | 4 +- .../src/Custom/Audio/GeneratedSpeechVoice.cs | 2 +- .../src/Custom/FineTuning/FineTuningClient.cs | 12 +- .dotnet/src/Generated/AssistantClient.cs | 17 ++- .dotnet/src/Generated/BatchClient.cs | 12 -- .dotnet/src/Generated/ChatClient.cs | 3 + .dotnet/src/Generated/FineTuningClient.cs | 44 ------- .../Generated/InternalAssistantRunClient.cs | 2 + .../Models/Assistant.Serialization.cs | 6 +- .dotnet/src/Generated/Models/Assistant.cs | 4 +- .../AssistantChatMessage.Serialization.cs | 43 ++---- .../Generated/Models/AssistantChatMessage.cs | 11 +- .../AssistantCreationOptions.Serialization.cs | 6 +- .../AssistantDeletionResult.Serialization.cs | 4 +- .../Models/AssistantDeletionResult.cs | 4 +- ...istantModificationOptions.Serialization.cs | 2 +- .../Models/AssistantThread.Serialization.cs | 4 +- .../src/Generated/Models/AssistantThread.cs | 4 +- .../AudioTranscription.Serialization.cs | 4 +- ...AudioTranscriptionOptions.Serialization.cs | 4 +- .../Models/AudioTranslation.Serialization.cs | 4 +- .../AudioTranslationOptions.Serialization.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 10 +- .../src/Generated/Models/ChatCompletion.cs | 6 +- .../ChatCompletionOptions.Serialization.cs | 64 ++++----- .../Generated/Models/ChatCompletionOptions.cs | 5 +- .../Models/ChatMessage.Serialization.cs | 5 + .dotnet/src/Generated/Models/ChatMessage.cs | 3 +- ...okenLogProbabilityDetails.Serialization.cs | 2 +- ...nTopLogProbabilityDetails.Serialization.cs | 2 +- .../Models/ChatTool.Serialization.cs | 4 +- .../Models/ChatToolCall.Serialization.cs | 4 +- ...versationAudioDeltaUpdate.Serialization.cs | 2 +- .../Models/ConversationAudioDeltaUpdate.cs | 2 +- ...nversationAudioDoneUpdate.Serialization.cs | 2 +- .../Models/ConversationAudioDoneUpdate.cs | 2 +- .../Models/ConversationContentPart.cs | 4 - ...ContentPartFinishedUpdate.Serialization.cs | 10 +- .../ConversationContentPartFinishedUpdate.cs | 8 +- ...nContentPartStartedUpdate.Serialization.cs | 10 +- .../ConversationContentPartStartedUpdate.cs | 8 +- .../ConversationErrorUpdate.Serialization.cs | 4 +- .../Models/ConversationErrorUpdate.cs | 6 +- ...nCallArgumentsDeltaUpdate.Serialization.cs | 2 +- ...rsationFunctionCallArgumentsDeltaUpdate.cs | 2 +- ...onCallArgumentsDoneUpdate.Serialization.cs | 2 +- ...ersationFunctionCallArgumentsDoneUpdate.cs | 2 +- .../ConversationFunctionTool.Serialization.cs | 14 +- .../Models/ConversationFunctionTool.cs | 10 +- ...tAudioBufferClearedUpdate.Serialization.cs | 2 +- ...nversationInputAudioBufferClearedUpdate.cs | 2 +- ...udioBufferCommittedUpdate.Serialization.cs | 2 +- ...ersationInputAudioBufferCommittedUpdate.cs | 2 +- ...InputSpeechFinishedUpdate.Serialization.cs | 2 +- .../ConversationInputSpeechFinishedUpdate.cs | 2 +- ...nInputSpeechStartedUpdate.Serialization.cs | 2 +- .../ConversationInputSpeechStartedUpdate.cs | 2 +- ...TranscriptionFailedUpdate.Serialization.cs | 4 +- ...versationInputTranscriptionFailedUpdate.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...rsationInputTranscriptionFinishedUpdate.cs | 2 +- ...ionItemAcknowledgedUpdate.Serialization.cs | 2 +- .../ConversationItemAcknowledgedUpdate.cs | 2 +- ...ersationItemDeletedUpdate.Serialization.cs | 2 +- .../Models/ConversationItemDeletedUpdate.cs | 2 +- ...rsationItemFinishedUpdate.Serialization.cs | 10 +- .../Models/ConversationItemFinishedUpdate.cs | 8 +- ...ersationItemStartedUpdate.Serialization.cs | 10 +- .../Models/ConversationItemStartedUpdate.cs | 8 +- ...sationItemTruncatedUpdate.Serialization.cs | 2 +- .../Models/ConversationItemTruncatedUpdate.cs | 2 +- ...tTranscriptionDeltaUpdate.Serialization.cs | 2 +- ...versationOutputTranscriptionDeltaUpdate.cs | 2 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...sationOutputTranscriptionFinishedUpdate.cs | 2 +- ...onRateLimitsUpdatedUpdate.Serialization.cs | 2 +- .../ConversationRateLimitsUpdatedUpdate.cs | 2 +- ...ionResponseFinishedUpdate.Serialization.cs | 10 +- .../ConversationResponseFinishedUpdate.cs | 8 +- ...tionResponseStartedUpdate.Serialization.cs | 10 +- .../ConversationResponseStartedUpdate.cs | 8 +- ...onSessionConfiguredUpdate.Serialization.cs | 10 +- .../ConversationSessionConfiguredUpdate.cs | 8 +- ...onversationSessionOptions.Serialization.cs | 122 ++++++++++-------- .../Models/ConversationSessionOptions.cs | 8 +- ...ationSessionStartedUpdate.Serialization.cs | 10 +- .../ConversationSessionStartedUpdate.cs | 8 +- ...nversationTextDeltaUpdate.Serialization.cs | 2 +- .../Models/ConversationTextDeltaUpdate.cs | 2 +- ...onversationTextDoneUpdate.Serialization.cs | 2 +- .../Models/ConversationTextDoneUpdate.cs | 2 +- .../Models/ConversationTool.Serialization.cs | 2 +- ...ationTurnDetectionOptions.Serialization.cs | 2 +- .../ConversationUpdate.Serialization.cs | 2 +- ...mbeddingGenerationOptions.Serialization.cs | 10 +- .../Models/EmbeddingGenerationOptions.cs | 2 +- .../FileDeletionResult.Serialization.cs | 4 +- .../Generated/Models/FileDeletionResult.cs | 4 +- ...ileFromStoreRemovalResult.Serialization.cs | 4 +- .../Models/FileFromStoreRemovalResult.cs | 4 +- .../FileSearchRankingOptions.Serialization.cs | 2 +- .../FileSearchToolDefinition.Serialization.cs | 4 +- .../Models/FileSearchToolDefinition.cs | 3 - .../FunctionChatMessage.Serialization.cs | 33 ++--- .../Generated/Models/FunctionChatMessage.cs | 11 +- .../FunctionToolDefinition.Serialization.cs | 8 +- .../Models/FunctionToolDefinition.cs | 5 +- .../GeneratedImageCollection.Serialization.cs | 2 + .../Models/GeneratedImageCollection.cs | 8 +- .../Generated/Models/GeneratedImageSize.cs | 10 -- .../Models/ImageEditOptions.Serialization.cs | 18 +-- .../src/Generated/Models/ImageEditOptions.cs | 2 +- .../ImageGenerationOptions.Serialization.cs | 6 +- .../Models/ImageGenerationOptions.cs | 2 +- .../ImageVariationOptions.Serialization.cs | 18 +-- .../Generated/Models/ImageVariationOptions.cs | 2 +- ...CompletionResponseMessage.Serialization.cs | 4 +- ...letionStreamResponseDelta.Serialization.cs | 6 +- ...ternalChatCompletionStreamResponseDelta.cs | 2 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- ...reateChatCompletionStreamResponseChoice.cs | 4 +- ...onRequestAssistantMessage.Serialization.cs | 24 ++-- ...neChatCompletionRequestAssistantMessage.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 8 +- .../Models/InternalMessageImageFileContent.cs | 14 +- ...nalMessageImageUrlContent.Serialization.cs | 8 +- .../Models/InternalMessageImageUrlContent.cs | 14 +- ...rnalMessageRefusalContent.Serialization.cs | 16 +-- .../Models/InternalMessageRefusalContent.cs | 8 +- ...meRequestAudioContentPart.Serialization.cs | 4 + ...InternalRealtimeRequestAudioContentPart.cs | 5 +- .../InternalRealtimeRequestTextContentPart.cs | 3 +- ...nternalRealtimeResponseAudioContentPart.cs | 2 +- ...altimeResponseMessageItem.Serialization.cs | 4 +- ...alRealtimeResponseSession.Serialization.cs | 15 ++- .../Models/InternalRealtimeResponseSession.cs | 6 +- ...InternalRealtimeResponseTextContentPart.cs | 2 +- ...imeServerVadTurnDetection.Serialization.cs | 6 +- .../InternalRealtimeServerVadTurnDetection.cs | 2 +- ...lRequiredFunctionToolCall.Serialization.cs | 14 +- .../InternalRequiredFunctionToolCall.cs | 11 +- ...esponseMessageTextContent.Serialization.cs | 8 +- .../InternalResponseMessageTextContent.cs | 14 +- ...InternalRunRequiredAction.Serialization.cs | 16 +-- .../Models/InternalRunRequiredAction.cs | 7 +- ...nterpreterToolCallDetails.Serialization.cs | 2 +- ...alRunStepCodeInterpreterToolCallDetails.cs | 4 - .../InternalRunStepDelta.Serialization.cs | 16 +-- .../Generated/Models/InternalRunStepDelta.cs | 7 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...rnalRunStepDetailsMessageCreationObject.cs | 4 - ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 4 - ...epFunctionToolCallDetails.Serialization.cs | 8 +- .../InternalRunStepFunctionToolCallDetails.cs | 8 +- ...nternalUnknownChatMessage.Serialization.cs | 13 +- .../Models/InternalUnknownChatMessage.cs | 2 +- .../MessageDeletionResult.Serialization.cs | 4 +- .../Generated/Models/MessageDeletionResult.cs | 4 +- .../ModelDeletionResult.Serialization.cs | 4 +- .../Generated/Models/ModelDeletionResult.cs | 4 +- .../Models/ModerationOptions.Serialization.cs | 6 +- .../src/Generated/Models/ModerationOptions.cs | 2 +- .../Models/OpenAIEmbedding.Serialization.cs | 4 +- .../src/Generated/Models/OpenAIEmbedding.cs | 2 +- ...OpenAIEmbeddingCollection.Serialization.cs | 2 +- .../Models/OpenAIEmbeddingCollection.cs | 4 +- .../Models/OpenAIFile.Serialization.cs | 6 +- .dotnet/src/Generated/Models/OpenAIFile.cs | 4 +- .../OpenAIFileCollection.Serialization.cs | 2 +- .../Generated/Models/OpenAIFileCollection.cs | 4 +- .../Models/OpenAIModel.Serialization.cs | 4 +- .dotnet/src/Generated/Models/OpenAIModel.cs | 4 +- .../OpenAIModelCollection.Serialization.cs | 2 +- .../Generated/Models/OpenAIModelCollection.cs | 4 +- .../RunCreationOptions.Serialization.cs | 32 ++--- .../Generated/Models/RunCreationOptions.cs | 4 +- .../Generated/Models/RunStep.Serialization.cs | 4 +- .dotnet/src/Generated/Models/RunStep.cs | 4 +- .../RunTruncationStrategy.Serialization.cs | 18 +-- .../Generated/Models/RunTruncationStrategy.cs | 5 +- .../SpeechGenerationOptions.Serialization.cs | 4 +- ...taticFileChunkingStrategy.Serialization.cs | 8 +- .../Models/StaticFileChunkingStrategy.cs | 5 +- ...amingChatCompletionUpdate.Serialization.cs | 10 +- .../Models/StreamingChatCompletionUpdate.cs | 6 +- ...reamingChatToolCallUpdate.Serialization.cs | 4 +- .../Models/SystemChatMessage.Serialization.cs | 28 ++-- .../src/Generated/Models/SystemChatMessage.cs | 11 +- .../ThreadDeletionResult.Serialization.cs | 4 +- .../Generated/Models/ThreadDeletionResult.cs | 4 +- .../Models/ThreadMessage.Serialization.cs | 4 +- .dotnet/src/Generated/Models/ThreadMessage.cs | 4 +- .../Models/ThreadRun.Serialization.cs | 49 ++++--- .dotnet/src/Generated/Models/ThreadRun.cs | 12 +- .../Models/ToolChatMessage.Serialization.cs | 28 ++-- .../src/Generated/Models/ToolChatMessage.cs | 9 +- .../Models/ToolConstraint.Serialization.cs | 4 +- .../src/Generated/Models/ToolConstraint.cs | 10 +- .../Models/UnknownRealtimeContentPart.cs | 2 +- ...wnRealtimeResponseCommand.Serialization.cs | 2 +- .../UnknownRealtimeTool.Serialization.cs | 2 +- ...nownRealtimeTurnDetection.Serialization.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 28 ++-- .../src/Generated/Models/UserChatMessage.cs | 11 +- .../Models/VectorStore.Serialization.cs | 4 +- .dotnet/src/Generated/Models/VectorStore.cs | 4 +- .../VectorStoreBatchFileJob.Serialization.cs | 18 +-- .../Models/VectorStoreBatchFileJob.cs | 7 +- ...VectorStoreDeletionResult.Serialization.cs | 4 +- .../Models/VectorStoreDeletionResult.cs | 4 +- ...ctorStoreExpirationPolicy.Serialization.cs | 6 +- ...ectorStoreFileAssociation.Serialization.cs | 4 +- .../Models/VectorStoreFileAssociation.cs | 4 +- ...rStoreModificationOptions.Serialization.cs | 2 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 122 +++++++++--------- 230 files changed, 830 insertions(+), 993 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 569a690d5..eb7e28622 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -16,14 +16,14 @@ namespace OpenAI.Assistants; [CodeGenSuppress("AssistantClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateAssistantAsync", typeof(AssistantCreationOptions))] [CodeGenSuppress("CreateAssistant", typeof(AssistantCreationOptions))] -[CodeGenSuppress("GetAssistantAsync", typeof(string))] -[CodeGenSuppress("GetAssistant", typeof(string))] +[CodeGenSuppress("ListAssistantAsync", typeof(string))] +[CodeGenSuppress("ListAssistant", typeof(string))] [CodeGenSuppress("ModifyAssistantAsync", typeof(string), typeof(AssistantModificationOptions))] [CodeGenSuppress("ModifyAssistant", typeof(string), typeof(AssistantModificationOptions))] [CodeGenSuppress("DeleteAssistantAsync", typeof(string))] [CodeGenSuppress("DeleteAssistant", typeof(string))] -[CodeGenSuppress("GetAssistantsAsync", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetAssistants", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListAssistantsAsync", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListAssistants", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] public partial class AssistantClient { private readonly InternalAssistantMessageClient _messageSubClient; diff --git a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs index cafdd5d47..a209f332e 100644 --- a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs @@ -19,7 +19,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteObjectValue(_internalFunction, options); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.Protocol.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.Protocol.cs index 4ffef5d1b..71b542d46 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.Protocol.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.Protocol.cs @@ -23,7 +23,7 @@ public virtual async Task CreateThreadAndRunAsync(BinaryContent co try { message = CreateCreateThreadAndRunRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } finally { @@ -50,7 +50,7 @@ public virtual ClientResult CreateThreadAndRun(BinaryContent content, RequestOpt try { message = CreateCreateThreadAndRunRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } finally { @@ -80,7 +80,7 @@ public virtual async Task CreateRunAsync(string threadId, BinaryCo try { message = CreateCreateRunRequest(threadId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } finally { @@ -110,7 +110,7 @@ public virtual ClientResult CreateRun(string threadId, BinaryContent content, Re try { message = CreateCreateRunRequest(threadId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } finally { @@ -137,7 +137,7 @@ public virtual async Task GetRunAsync(string threadId, string runI Argument.AssertNotNullOrEmpty(runId, nameof(runId)); using PipelineMessage message = CreateGetRunRequest(threadId, runId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -156,7 +156,7 @@ public virtual ClientResult GetRun(string threadId, string runId, RequestOptions Argument.AssertNotNullOrEmpty(runId, nameof(runId)); using PipelineMessage message = CreateGetRunRequest(threadId, runId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -177,7 +177,7 @@ public virtual async Task ModifyRunAsync(string threadId, string r Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyRunRequest(threadId, runId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -198,7 +198,7 @@ public virtual ClientResult ModifyRun(string threadId, string runId, BinaryConte Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyRunRequest(threadId, runId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -217,7 +217,7 @@ public virtual async Task CancelRunAsync(string threadId, string r Argument.AssertNotNullOrEmpty(runId, nameof(runId)); using PipelineMessage message = CreateCancelRunRequest(threadId, runId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -236,7 +236,7 @@ public virtual ClientResult CancelRun(string threadId, string runId, RequestOpti Argument.AssertNotNullOrEmpty(runId, nameof(runId)); using PipelineMessage message = CreateCancelRunRequest(threadId, runId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -262,7 +262,7 @@ public virtual async Task SubmitToolOutputsToRunAsync(string threa try { message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } finally { @@ -296,7 +296,7 @@ public virtual ClientResult SubmitToolOutputsToRun(string threadId, string runId try { message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } finally { @@ -325,7 +325,7 @@ public virtual async Task GetRunStepAsync(string threadId, string Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); using PipelineMessage message = CreateGetRunStepRequest(threadId, runId, stepId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -346,6 +346,6 @@ public virtual ClientResult GetRunStep(string threadId, string runId, string ste Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); using PipelineMessage message = CreateGetRunStepRequest(threadId, runId, stepId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index 78ea017a0..5d0e96b14 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -26,12 +26,6 @@ namespace OpenAI.Assistants; [CodeGenSuppress("GetRunStep", typeof(string), typeof(string), typeof(string))] internal partial class InternalAssistantRunClient { - // CUSTOM: Remove virtual keyword. - /// - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// - public ClientPipeline Pipeline => _pipeline; - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. @@ -54,7 +48,7 @@ public InternalAssistantRunClient(ApiKeyCredential credential, OpenAIClientOptio Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -71,7 +65,7 @@ protected internal InternalAssistantRunClient(ClientPipeline pipeline, OpenAICli Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.Protocol.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.Protocol.cs index 3986d26c8..770d07671 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.Protocol.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.Protocol.cs @@ -18,7 +18,7 @@ internal partial class InternalAssistantThreadClient public virtual async Task CreateThreadAsync(BinaryContent content, RequestOptions options = null) { using PipelineMessage message = CreateCreateThreadRequest(content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -32,7 +32,7 @@ public virtual async Task CreateThreadAsync(BinaryContent content, public virtual ClientResult CreateThread(BinaryContent content, RequestOptions options = null) { using PipelineMessage message = CreateCreateThreadRequest(content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -49,7 +49,7 @@ public virtual async Task GetThreadAsync(string threadId, RequestO Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); using PipelineMessage message = CreateGetThreadRequest(threadId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -66,7 +66,7 @@ public virtual ClientResult GetThread(string threadId, RequestOptions options) Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); using PipelineMessage message = CreateGetThreadRequest(threadId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -85,7 +85,7 @@ public virtual async Task ModifyThreadAsync(string threadId, Binar Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyThreadRequest(threadId, content, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -104,7 +104,7 @@ public virtual ClientResult ModifyThread(string threadId, BinaryContent content, Argument.AssertNotNull(content, nameof(content)); using PipelineMessage message = CreateModifyThreadRequest(threadId, content, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// @@ -121,7 +121,7 @@ public virtual async Task DeleteThreadAsync(string threadId, Reque Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); using PipelineMessage message = CreateDeleteThreadRequest(threadId, options); - return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// @@ -138,6 +138,6 @@ public virtual ClientResult DeleteThread(string threadId, RequestOptions options Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); using PipelineMessage message = CreateDeleteThreadRequest(threadId, options); - return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index cf21b52f0..bbb7a61c0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -38,7 +38,7 @@ public InternalAssistantThreadClient(ApiKeyCredential credential, OpenAIClientOp Argument.AssertNotNull(credential, nameof(credential)); options ??= new OpenAIClientOptions(); - _pipeline = OpenAIClient.CreatePipeline(credential, options); + Pipeline = OpenAIClient.CreatePipeline(credential, options); _endpoint = OpenAIClient.GetEndpoint(options); } @@ -55,7 +55,7 @@ protected internal InternalAssistantThreadClient(ClientPipeline pipeline, OpenAI Argument.AssertNotNull(pipeline, nameof(pipeline)); options ??= new OpenAIClientOptions(); - _pipeline = pipeline; + Pipeline = pipeline; _endpoint = OpenAIClient.GetEndpoint(options); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs index 0b1f5487a..e798a79e2 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs @@ -19,7 +19,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(_type); writer.WritePropertyName("text"u8); writer.WriteObjectValue(_text, options); - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantCollectionResult.cs index 9967fdb00..5e85eb83a 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantCollectionResult.cs @@ -90,7 +90,7 @@ public static bool HasNextPage(ClientResult result) internal virtual ClientResult GetAssistants(int? limit, string? order, string? after, string? before, RequestOptions? options) { - using PipelineMessage message = _assistantClient.CreateGetAssistantsRequest(limit, order, after, before, options); + using PipelineMessage message = _assistantClient.CreateListAssistantsRequest(limit, order, after, before, options); return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncAssistantCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncAssistantCollectionResult.cs index 09e446308..0ea0acc03 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncAssistantCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncAssistantCollectionResult.cs @@ -89,7 +89,7 @@ public static bool HasNextPage(ClientResult result) internal virtual async Task GetAssistantsAsync(int? limit, string? order, string? after, string? before, RequestOptions? options) { - using PipelineMessage message = _assistantClient.CreateGetAssistantsRequest(limit, order, after, before, options); + using PipelineMessage message = _assistantClient.CreateListAssistantsRequest(limit, order, after, before, options); return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } } diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncMessageCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncMessageCollectionResult.cs index dc23d3221..4f9c4c0a0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncMessageCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncMessageCollectionResult.cs @@ -67,7 +67,7 @@ protected override IAsyncEnumerable GetValuesFromPageAsync(Client } public async Task GetFirstPageAsync() - => await _messageClient.GetMessagesAsync(_threadId, _limit, _order, _after, _before, _options).ConfigureAwait(false); + => await _messageClient.ListMessagesAsync(_threadId, _limit, _order, _after, _before, _options).ConfigureAwait(false); public async Task GetNextPageAsync(ClientResult result) { @@ -78,7 +78,7 @@ public async Task GetNextPageAsync(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return await _messageClient.GetMessagesAsync(_threadId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); + return await _messageClient.ListMessagesAsync(_threadId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunCollectionResult.cs index 889f1a486..7617faddf 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunCollectionResult.cs @@ -66,7 +66,7 @@ protected override IAsyncEnumerable GetValuesFromPageAsync(ClientResu } public async Task GetFirstPageAsync() - => await _runClient.GetRunsAsync(_threadId, _limit, _order, _after, _before, _options).ConfigureAwait(false); + => await _runClient.ListRunsAsync(_threadId, _limit, _order, _after, _before, _options).ConfigureAwait(false); public async Task GetNextPageAsync(ClientResult result) { @@ -77,7 +77,7 @@ public async Task GetNextPageAsync(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return await _runClient.GetRunsAsync(_threadId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); + return await _runClient.ListRunsAsync(_threadId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunStepCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunStepCollectionResult.cs index 2de890853..5e2beaf98 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunStepCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AsyncRunStepCollectionResult.cs @@ -69,7 +69,7 @@ protected override IAsyncEnumerable GetValuesFromPageAsync(ClientResult } public async Task GetFirstPageAsync() - => await _runClient.GetRunStepsAsync(_threadId, _runId, _limit, _order, _after, _before, _options).ConfigureAwait(false); + => await _runClient.ListRunStepsAsync(_threadId, _runId, _limit, _order, _after, _before, _options).ConfigureAwait(false); public async Task GetNextPageAsync(ClientResult result) { @@ -80,7 +80,7 @@ public async Task GetNextPageAsync(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return await _runClient.GetRunStepsAsync(_threadId, _runId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); + return await _runClient.ListRunStepsAsync(_threadId, _runId, _limit, _order, lastId, _before, _options).ConfigureAwait(false); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessageCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessageCollectionResult.cs index a89b93ec7..fe9399ebc 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessageCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessageCollectionResult.cs @@ -63,7 +63,7 @@ protected override IEnumerable GetValuesFromPage(ClientResult pag } public ClientResult GetFirstPage() - => _messageClient.GetMessages(_threadId, _limit, _order, _after, _before, _options); + => _messageClient.ListMessages(_threadId, _limit, _order, _after, _before, _options); public ClientResult GetNextPage(ClientResult result) { @@ -74,7 +74,7 @@ public ClientResult GetNextPage(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return _messageClient.GetMessages(_threadId, _limit, _order, lastId, _before, _options); + return _messageClient.ListMessages(_threadId, _limit, _order, lastId, _before, _options); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunCollectionResult.cs index f7e53c921..9bf331a30 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunCollectionResult.cs @@ -62,7 +62,7 @@ protected override IEnumerable GetValuesFromPage(ClientResult page) } public ClientResult GetFirstPage() - => _runClient.GetRuns(_threadId, _limit, _order, _after, _before, _options); + => _runClient.ListRuns(_threadId, _limit, _order, _after, _before, _options); public ClientResult GetNextPage(ClientResult result) { @@ -73,7 +73,7 @@ public ClientResult GetNextPage(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return _runClient.GetRuns(_threadId, _limit, _order, lastId, _before, _options); + return _runClient.ListRuns(_threadId, _limit, _order, lastId, _before, _options); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepCollectionResult.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepCollectionResult.cs index a001a3446..3f7621422 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepCollectionResult.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepCollectionResult.cs @@ -65,7 +65,7 @@ protected override IEnumerable GetValuesFromPage(ClientResult page) } public ClientResult GetFirstPage() - => _runClient.GetRunSteps(_threadId, _runId, _limit, _order, _after, _before, _options); + => _runClient.ListRunSteps(_threadId, _runId, _limit, _order, _after, _before, _options); public ClientResult GetNextPage(ClientResult result) { @@ -76,7 +76,7 @@ public ClientResult GetNextPage(ClientResult result) using JsonDocument doc = JsonDocument.Parse(response.Content); string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; - return _runClient.GetRunSteps(_threadId, _runId, _limit, _order, lastId, _before, _options); + return _runClient.ListRunSteps(_threadId, _runId, _limit, _order, lastId, _before, _options); } public static bool HasNextPage(ClientResult result) diff --git a/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs b/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs index cecbea1bb..eaa900361 100644 --- a/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs +++ b/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs @@ -6,6 +6,6 @@ namespace OpenAI.Audio; /// text-to-speech guide. /// [CodeGenModel("CreateSpeechRequestVoice")] -public readonly partial struct GeneratedSpeechVoice +public partial struct GeneratedSpeechVoice { } \ No newline at end of file diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index aa6bc896e..94c152152 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -15,16 +15,16 @@ namespace OpenAI.FineTuning; [CodeGenSuppress("FineTuningClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateFineTuningJobAsync", typeof(FineTuningOptions))] [CodeGenSuppress("CreateFineTuningJob", typeof(FineTuningOptions))] -[CodeGenSuppress("GetPaginatedFineTuningJobsAsync", typeof(string), typeof(int?))] -[CodeGenSuppress("GetPaginatedFineTuningJobs", typeof(string), typeof(int?))] +[CodeGenSuppress("ListPaginatedFineTuningJobsAsync", typeof(string), typeof(int?))] +[CodeGenSuppress("ListPaginatedFineTuningJobs", typeof(string), typeof(int?))] [CodeGenSuppress("RetrieveFineTuningJobAsync", typeof(string))] [CodeGenSuppress("RetrieveFineTuningJob", typeof(string))] [CodeGenSuppress("CancelFineTuningJobAsync", typeof(string))] [CodeGenSuppress("CancelFineTuningJob", typeof(string))] -[CodeGenSuppress("GetFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?))] -[CodeGenSuppress("GetFineTuningEvents", typeof(string), typeof(string), typeof(int?))] -[CodeGenSuppress("GetFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?))] -[CodeGenSuppress("GetFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningEvents", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?))] public partial class FineTuningClient { // CUSTOM: Added as a convenience. diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index a967b2221..049a76f8a 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -6,6 +6,7 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Threading.Tasks; +using OpenAI; namespace OpenAI.Assistants { @@ -34,16 +35,20 @@ public virtual async Task ListAssistantsAsync(int? limit, string o return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListAssistants(int? limit, AssistantCollectionOrder? order, string after, string before) + public virtual ClientResult GetAssistant(string assistantId) { - ClientResult result = ListAssistants(limit, order.ToString(), after, before, null); - return ClientResult.FromValue((InternalListAssistantsResponse)result, result.GetRawResponse()); + Argument.AssertNotNull(assistantId, nameof(assistantId)); + + ClientResult result = this.GetAssistant(assistantId, null); + return ClientResult.FromValue((Assistant)result, result.GetRawResponse()); } - public virtual async Task> ListAssistantsAsync(int? limit, AssistantCollectionOrder? order, string after, string before) + public virtual async Task> GetAssistantAsync(string assistantId) { - ClientResult result = await ListAssistantsAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListAssistantsResponse)result, result.GetRawResponse()); + Argument.AssertNotNull(assistantId, nameof(assistantId)); + + ClientResult result = await this.GetAssistantAsync(assistantId, null).ConfigureAwait(false); + return ClientResult.FromValue((Assistant)result, result.GetRawResponse()); } } } diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index a491c4a50..30f2d7f88 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -33,17 +33,5 @@ public virtual async Task ListBatchesAsync(string after, int? limi using PipelineMessage message = CreateListBatchesRequest(after, limit, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - - public virtual ClientResult ListBatches(string after, int? limit) - { - ClientResult result = ListBatches(after, limit, null); - return ClientResult.FromValue((InternalListBatchesResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListBatchesAsync(string after, int? limit) - { - ClientResult result = await ListBatchesAsync(after, limit, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListBatchesResponse)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/ChatClient.cs b/.dotnet/src/Generated/ChatClient.cs index 8bc6baf3d..1812c542a 100644 --- a/.dotnet/src/Generated/ChatClient.cs +++ b/.dotnet/src/Generated/ChatClient.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; namespace OpenAI.Chat { @@ -17,5 +18,7 @@ public partial class ChatClient protected ChatClient() { } + + public ClientPipeline Pipeline { get; } } } diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index fcc634a7b..1babb0d59 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -35,18 +35,6 @@ public virtual async Task ListPaginatedFineTuningJobsAsync(string return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit) - { - ClientResult result = ListPaginatedFineTuningJobs(after, limit, null); - return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListPaginatedFineTuningJobsAsync(string after, int? limit) - { - ClientResult result = await ListPaginatedFineTuningJobsAsync(after, limit, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListPaginatedFineTuningJobsResponse)result, result.GetRawResponse()); - } - public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit, RequestOptions options) { Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); @@ -63,22 +51,6 @@ public virtual async Task ListFineTuningJobCheckpointsAsync(string return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - ClientResult result = ListFineTuningJobCheckpoints(fineTuningJobId, after, limit, null); - return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - ClientResult result = await ListFineTuningJobCheckpointsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListFineTuningJobCheckpointsResponse)result, result.GetRawResponse()); - } - public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit, RequestOptions options) { Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); @@ -94,21 +66,5 @@ public virtual async Task ListFineTuningEventsAsync(string fineTun using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - - public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - ClientResult result = ListFineTuningEvents(fineTuningJobId, after, limit, null); - return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - ClientResult result = await ListFineTuningEventsAsync(fineTuningJobId, after, limit, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListFineTuningJobEventsResponse)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index dba3d32f0..d47948c88 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -21,6 +21,8 @@ protected InternalAssistantRunClient() { } + public ClientPipeline Pipeline { get; } + public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNull(threadId, nameof(threadId)); diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index c530eed1a..e92031813 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -116,7 +116,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ResponseFormat)) { if (ResponseFormat != null) @@ -138,7 +138,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topP"u8); + writer.WriteNull("nucleusSamplingFactor"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -292,7 +292,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW } if (prop.NameEquals("object"u8)) { - @object = InternalAssistantObjectObject.DeserializeInternalAssistantObjectObject(prop.Value, options); + @object = new InternalAssistantObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("response_format"u8)) diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 09670a90f..2d4157287 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -22,7 +22,7 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Instructions = instructions; Tools = tools.ToList(); Metadata = metadata; - Object = @object; + this.Object = @object; } internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) @@ -37,7 +37,7 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc ToolResources = toolResources; Metadata = metadata; Temperature = temperature; - Object = @object; + this.Object = @object; ResponseFormat = responseFormat; NucleusSamplingFactor = nucleusSamplingFactor; _additionalBinaryDataProperties = additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index de441409d..87906e47d 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -21,25 +21,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Content)) - { - if (Content != null) - { - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("content"u8); - } - } if (Optional.IsDefined(Refusal)) { if (Refusal != null) @@ -100,25 +81,15 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement { return null; } - BinaryData content = default; string refusal = default; string participantName = default; IList toolCalls = default; ChatFunctionCall functionCall = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("refusal"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -168,18 +139,28 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new AssistantChatMessage( - content, refusal, participantName, toolCalls ?? new ChangeTrackingList(), functionCall, role, + content, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index fb0797f5b..a08fbf6d2 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -4,22 +4,25 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(BinaryData content, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + public AssistantChatMessage(Chat.ChatMessageRole role) : base(role) + { + ToolCalls = new ChangeTrackingList(); + } + + internal AssistantChatMessage(string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { - Content = content; Refusal = refusal; ParticipantName = participantName; ToolCalls = toolCalls; FunctionCall = functionCall; } - public BinaryData Content { get; set; } - public string Refusal { get; set; } } } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index bc9c4d01f..a6880ab77 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteStringValue(Model.ToSerialString()); if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); @@ -143,7 +143,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topP"u8); + writer.WriteNull("nucleusSamplingFactor"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -258,7 +258,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso } if (prop.NameEquals("model"u8)) { - model = prop.Value.GetString(); + model = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("tools"u8)) diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index ef080775e..85b2e9c42 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(AssistantId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteAssistantResponseObject.DeserializeInternalDeleteAssistantResponseObject(prop.Value, options); + @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index 94f7790a4..0b5d95dbc 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -15,14 +15,14 @@ internal AssistantDeletionResult(bool deleted, string assistantId, InternalDelet { Deleted = deleted; AssistantId = assistantId; - Object = @object; + this.Object = @object; } internal AssistantDeletionResult(bool deleted, string assistantId, InternalDeleteAssistantResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; AssistantId = assistantId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index 3114df161..bfc0ba116 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -146,7 +146,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topP"u8); + writer.WriteNull("nucleusSamplingFactor"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 3ff49abc2..1aea14657 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (ToolResources != null) { writer.WritePropertyName("tool_resources"u8); @@ -144,7 +144,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, } if (prop.NameEquals("object"u8)) { - @object = InternalThreadObjectObject.DeserializeInternalThreadObjectObject(prop.Value, options); + @object = new InternalThreadObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("tool_resources"u8)) diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index 77bbcf089..16d5cc040 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -16,7 +16,7 @@ internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary(Task, options); + writer.WriteStringValue(Task.ToString()); writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -144,7 +144,7 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele } if (prop.NameEquals("task"u8)) { - task = InternalCreateTranscriptionResponseVerboseJsonTask.DeserializeInternalCreateTranscriptionResponseVerboseJsonTask(prop.Value, options); + task = new InternalCreateTranscriptionResponseVerboseJsonTask(prop.Value.GetString()); continue; } if (prop.NameEquals("duration"u8)) diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 406aafc45..dde93723a 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file"u8); writer.WriteBase64StringValue(File.ToArray(), "D"); writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.ToString()); if (Optional.IsCollectionDefined(InternalTimestampGranularities)) { writer.WritePropertyName("timestamp_granularities"u8); @@ -166,7 +166,7 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J } if (prop.NameEquals("model"u8)) { - model = InternalCreateTranscriptionRequestModel.DeserializeInternalCreateTranscriptionRequestModel(prop.Value, options); + model = new InternalCreateTranscriptionRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("timestamp_granularities"u8)) diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index 0a3c6646a..74dfd0faf 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndArray(); } writer.WritePropertyName("task"u8); - writer.WriteObjectValue(Task, options); + writer.WriteStringValue(Task.ToString()); writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -119,7 +119,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element } if (prop.NameEquals("task"u8)) { - task = InternalCreateTranslationResponseVerboseJsonTask.DeserializeInternalCreateTranslationResponseVerboseJsonTask(prop.Value, options); + task = new InternalCreateTranslationResponseVerboseJsonTask(prop.Value.GetString()); continue; } if (prop.NameEquals("duration"u8)) diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index 5c4f32f86..ec8be9574 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -45,7 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file"u8); writer.WriteBase64StringValue(File.ToArray(), "D"); writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -127,7 +127,7 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE } if (prop.NameEquals("model"u8)) { - model = InternalCreateTranslationRequestModel.DeserializeInternalCreateTranslationRequestModel(prop.Value, options); + model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index dd208c966..35a5aed03 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -46,13 +46,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Usage, options); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ServiceTier)) { if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteObjectValue?>(ServiceTier, options); + writer.WriteObjectValue(ServiceTier, options); } else { @@ -109,7 +109,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo string systemFingerprint = default; ChatTokenUsage usage = default; InternalCreateChatCompletionResponseObject @object = default; - Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier = default; + InternalCreateChatCompletionResponseServiceTier? serviceTier = default; IReadOnlyList choices = default; DateTimeOffset createdAt = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -147,7 +147,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo } if (prop.NameEquals("object"u8)) { - @object = InternalCreateChatCompletionResponseObject.DeserializeInternalCreateChatCompletionResponseObject(prop.Value, options); + @object = new InternalCreateChatCompletionResponseObject(prop.Value.GetString()); continue; } if (prop.NameEquals("service_tier"u8)) @@ -157,7 +157,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo serviceTier = null; continue; } - serviceTier = Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier?.DeserializeOpenAI.Chat.InternalCreateChatCompletionResponseServiceTier(prop.Value, options); + serviceTier = Chat.InternalCreateChatCompletionResponseServiceTier?.DeserializeInternalCreateChatCompletionResponseServiceTier(prop.Value, options); continue; } if (prop.NameEquals("choices"u8)) diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 88157c46e..3199b9514 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -16,18 +16,18 @@ internal ChatCompletion(string id, string model, InternalCreateChatCompletionRes { Id = id; Model = model; - Object = @object; + this.Object = @object; Choices = choices.ToList(); CreatedAt = createdAt; } - internal ChatCompletion(string id, string model, string systemFingerprint, ChatTokenUsage usage, InternalCreateChatCompletionResponseObject @object, Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) + internal ChatCompletion(string id, string model, string systemFingerprint, ChatTokenUsage usage, InternalCreateChatCompletionResponseObject @object, InternalCreateChatCompletionResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) { Id = id; Model = model; SystemFingerprint = systemFingerprint; Usage = usage; - Object = @object; + this.Object = @object; ServiceTier = serviceTier; Choices = choices; CreatedAt = createdAt; diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index e5dcd8b62..22afef9d6 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -56,18 +56,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("response_format"u8); writer.WriteObjectValue(ResponseFormat, options); } - if (Optional.IsDefined(ServiceTier)) - { - if (ServiceTier != null) - { - writer.WritePropertyName("service_tier"u8); - writer.WriteStringValue(ServiceTier.Value.ToString()); - } - else - { - writer.WriteNull("serviceTier"u8); - } - } if (Optional.IsDefined(Temperature)) { if (Temperature != null) @@ -105,7 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("messages"u8); this.SerializeMessagesValue(writer, options); writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(N)) { if (N != null) @@ -151,7 +139,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("logprobs"u8); + writer.WriteNull("includeLogProbabilities"u8); } } if (Optional.IsDefined(TopLogProbabilityCount)) @@ -163,7 +151,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topLogprobs"u8); + writer.WriteNull("topLogProbabilityCount"u8); } } if (Optional.IsCollectionDefined(StopSequences)) @@ -175,7 +163,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("stop"u8); + writer.WriteNull("stopSequences"u8); } } if (Optional.IsCollectionDefined(LogitBiases)) @@ -187,7 +175,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("logitBias"u8); + writer.WriteNull("logitBiases"u8); } } if (Optional.IsDefined(ToolChoice)) @@ -231,7 +219,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxTokens"u8); + writer.WriteNull("deprecatedMaxTokens"u8); } } if (Optional.IsDefined(MaxOutputTokenCount)) @@ -243,7 +231,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxCompletionTokens"u8); + writer.WriteNull("maxOutputTokenCount"u8); } } if (Optional.IsCollectionDefined(Functions)) @@ -256,6 +244,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(_serviceTier)) + { + if (_serviceTier != null) + { + writer.WritePropertyName("service_tier"u8); + writer.WriteObjectValue(_serviceTier, options); + } + else + { + writer.WriteNull("serviceTier"u8); + } + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -295,7 +295,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme float? frequencyPenalty = default; float? presencePenalty = default; ChatResponseFormat responseFormat = default; - InternalCreateChatCompletionRequestServiceTier? serviceTier = default; float? temperature = default; float? topP = default; IList tools = default; @@ -316,6 +315,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme int? deprecatedMaxTokens = default; int? maxOutputTokenCount = default; IList functions = default; + InternalCreateChatCompletionRequestServiceTier? serviceTier = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -349,16 +349,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); continue; } - if (prop.NameEquals("service_tier"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - serviceTier = null; - continue; - } - serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); - continue; - } if (prop.NameEquals("temperature"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -405,7 +395,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } if (prop.NameEquals("model"u8)) { - model = InternalCreateChatCompletionRequestModel.DeserializeInternalCreateChatCompletionRequestModel(prop.Value, options); + model = new InternalCreateChatCompletionRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("n"u8)) @@ -560,6 +550,16 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme functions = array; continue; } + if (prop.NameEquals("service_tier"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + serviceTier = null; + continue; + } + serviceTier = Chat.InternalCreateChatCompletionRequestServiceTier?.DeserializeInternalCreateChatCompletionRequestServiceTier(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -569,7 +569,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme frequencyPenalty, presencePenalty, responseFormat, - serviceTier, temperature, topP, tools ?? new ChangeTrackingList(), @@ -590,6 +589,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme deprecatedMaxTokens, maxOutputTokenCount, functions ?? new ChangeTrackingList(), + serviceTier, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index d8081e39e..55f7e3999 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -11,12 +11,11 @@ public partial class ChatCompletionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, InternalCreateChatCompletionRequestServiceTier? serviceTier, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, IDictionary additionalBinaryDataProperties) + internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, InternalCreateChatCompletionRequestServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) { FrequencyPenalty = frequencyPenalty; PresencePenalty = presencePenalty; ResponseFormat = responseFormat; - ServiceTier = serviceTier; Temperature = temperature; TopP = topP; Tools = tools; @@ -46,8 +45,6 @@ internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, public ChatResponseFormat ResponseFormat { get; set; } - public InternalCreateChatCompletionRequestServiceTier? ServiceTier { get; set; } - public float? Temperature { get; set; } public float? TopP { get; set; } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 3d99718a8..280bc3e38 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -22,6 +22,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("role"u8); writer.WriteNumberValue((int)Role); + if (options.Format != "W" && Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + this.SerializeContentValue(writer, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 1a1061f8e..1643ece87 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -11,9 +11,10 @@ public abstract partial class ChatMessage { private protected IDictionary _additionalBinaryDataProperties; - internal ChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) + internal ChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { Role = role; + Content = content; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 0d291c3ad..560e9a9b3 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("bytes"u8); + writer.WriteNull("utf8Bytes"u8); } writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 510710bc5..34380bee4 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("bytes"u8); + writer.WriteNull("utf8Bytes"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index d57cc08c8..753e193fd 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); writer.WritePropertyName("type"u8); - writer.WriteNumberValue((int)Kind); + writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -83,7 +83,7 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToChatToolKind(); + kind = prop.Value.GetString().ToChatToolKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 15d9dbf36..7c994fae2 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); writer.WritePropertyName("type"u8); - writer.WriteNumberValue((int)Kind); + writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToChatToolCallKind(); + kind = prop.Value.GetString().ToChatToolCallKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs index b050c5545..7b23dcbac 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUp } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs index 74e813081..796d0a1d6 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationAudioDeltaUpdate : ConversationUpdate { - internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(eventId) + internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs index ecc92f758..698888f8a 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationAudioDoneUpdate DeserializeConversationAudioDoneUpda } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs index 1c7e3eab7..600dec791 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationAudioDoneUpdate : ConversationUpdate { - internal ConversationAudioDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId) + internal ConversationAudioDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs index 7e79890ed..dea0f1515 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -13,15 +13,11 @@ public abstract partial class ConversationContentPart private protected ConversationContentPart(ConversationContentPartKind @type) { - Type = @type; } internal ConversationContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) { - Type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - - internal ConversationContentPartKind Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs index cabdb391a..299fb5741 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs @@ -41,7 +41,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); writer.WritePropertyName("part"u8); - writer.WriteObjectValue(Part, options); + writer.WriteObjectValue(_internalContentPart, options); } ConversationContentPartFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)JsonModelCreateCore(ref reader, options); @@ -67,7 +67,7 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon string itemId = default; int outputIndex = default; int contentIndex = default; - ConversationContentPart part = default; + ConversationContentPart internalContentPart = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -95,7 +95,7 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon } if (prop.NameEquals("part"u8)) { - part = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); + internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -110,7 +110,7 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -123,7 +123,7 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon itemId, outputIndex, contentIndex, - part, + internalContentPart, eventId, kind, additionalBinaryDataProperties); diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs index fe18d4c68..3673dd649 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationContentPartFinishedUpdate : ConversationUpdate { - internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId) : base(eventId) + internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; - Part = part; } - internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; - Part = part; } public string ResponseId { get; set; } @@ -34,7 +32,5 @@ internal ConversationContentPartFinishedUpdate(string responseId, string itemId, public int OutputIndex { get; set; } public int ContentIndex { get; set; } - - public ConversationContentPart Part { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs index 70392abba..99e09f20f 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs @@ -41,7 +41,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); writer.WritePropertyName("part"u8); - writer.WriteObjectValue(Part, options); + writer.WriteObjectValue(_internalContentPart, options); } ConversationContentPartStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)JsonModelCreateCore(ref reader, options); @@ -67,7 +67,7 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont string itemId = default; int outputIndex = default; int contentIndex = default; - ConversationContentPart part = default; + ConversationContentPart internalContentPart = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -95,7 +95,7 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont } if (prop.NameEquals("part"u8)) { - part = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); + internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -110,7 +110,7 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -123,7 +123,7 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont itemId, outputIndex, contentIndex, - part, + internalContentPart, eventId, kind, additionalBinaryDataProperties); diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs index 77256c2a1..b4466961d 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationContentPartStartedUpdate : ConversationUpdate { - internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId) : base(eventId) + internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; - Part = part; } - internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart part, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; - Part = part; } public string ResponseId { get; set; } @@ -34,7 +32,5 @@ internal ConversationContentPartStartedUpdate(string responseId, string itemId, public int OutputIndex { get; set; } public int ContentIndex { get; set; } - - public ConversationContentPart Part { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 49b50ffc5..02111a5c1 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); + writer.WriteObjectValue(_error, options); } ConversationErrorUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationErrorUpdate)JsonModelCreateCore(ref reader, options); @@ -78,7 +78,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs index 5227a7409..c89ff45bb 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -9,16 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationErrorUpdate : ConversationUpdate { - internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId) : base(eventId) + internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { - Error = error; } internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Error = error; } - - public InternalRealtimeResponseError Error { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs index fe5bbb03c..ad6b2ab81 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversa } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs index 72d21b4e0..c36eab5ec 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionCallArgumentsDeltaUpdate : ConversationUpdate { - internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId) + internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs index 3e8f9c8f6..41349ff9c 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs @@ -118,7 +118,7 @@ internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversat } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs index 49d38df8a..40cd40332 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionCallArgumentsDoneUpdate : ConversationUpdate { - internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId) : base(eventId) + internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index 30ba818d9..1b328f67a 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -29,19 +29,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) + writer.WriteStringValue(_name); + if (Optional.IsDefined(_description)) { writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WriteStringValue(_description); } - if (Optional.IsDefined(Parameters)) + if (Optional.IsDefined(_parameters)) { writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Parameters); + writer.WriteRawValue(_parameters); #else - using (JsonDocument document = JsonDocument.Parse(Parameters)) + using (JsonDocument document = JsonDocument.Parse(_parameters)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -102,7 +102,7 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso } if (prop.NameEquals("type"u8)) { - kind = ConversationToolKind.DeserializeConversationToolKind(prop.Value, options); + kind = new ConversationToolKind(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs index f16f3fb3a..4f230d607 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs @@ -4,16 +4,20 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionTool : ConversationTool { + public ConversationFunctionTool(string name, ConversationToolKind kind) : base(kind) + { + Argument.AssertNotNull(name, nameof(name)); + + } + internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { - Name = name; - Description = description; - Parameters = parameters; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs index c47151ea6..c4ee9fe5b 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs @@ -70,7 +70,7 @@ internal static ConversationInputAudioBufferClearedUpdate DeserializeConversatio } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs index b8026f0c7..1bb62f212 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioBufferClearedUpdate : ConversationUpdate { - internal ConversationInputAudioBufferClearedUpdate(string eventId) : base(eventId) + internal ConversationInputAudioBufferClearedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs index 6ab30c023..efdd0a7a1 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversat } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs index 09c76128b..af887c80d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioBufferCommittedUpdate : ConversationUpdate { - internal ConversationInputAudioBufferCommittedUpdate(string itemId, string eventId) : base(eventId) + internal ConversationInputAudioBufferCommittedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 3ac67cd50..10d8e0e08 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -86,7 +86,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index 636d74230..e1fe25d6a 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate { - internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId) : base(eventId) + internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { AudioEndMs = audioEndMs; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index b28f1d5b3..b38cacf8a 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -86,7 +86,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index 96066cd37..c3a098ff8 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate { - internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId) : base(eventId) + internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { AudioStartMs = audioStartMs; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 30097cfaf..187ae9d82 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); + writer.WriteObjectValue(_error, options); } ConversationInputTranscriptionFailedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFailedUpdate)JsonModelCreateCore(ref reader, options); @@ -94,7 +94,7 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index 4cb4e05ae..0fafabad6 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -9,24 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId) : base(eventId) + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ItemId = itemId; ContentIndex = contentIndex; - Error = error; } internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; - Error = error; } public string ItemId { get; set; } public int ContentIndex { get; set; } - - public InternalRealtimeResponseApiError Error { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index e0728f1a6..cc386b52c 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index f07edda98..586be2053 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId) + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs index b6304d658..36579fc96 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs @@ -78,7 +78,7 @@ internal static ConversationItemAcknowledgedUpdate DeserializeConversationItemAc } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs index 72f66d568..facf44f3e 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemAcknowledgedUpdate : ConversationUpdate { - internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId) : base(eventId) + internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { Item = item; } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 904bc980b..ed2383655 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -78,7 +78,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index efbc25d2f..55512b26d 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemDeletedUpdate : ConversationUpdate { - internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId) + internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs index cb9661a82..e010e2a9d 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); writer.WritePropertyName("item"u8); - writer.WriteObjectValue(Item, options); + writer.WriteObjectValue(_internalItem, options); } ConversationItemFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemFinishedUpdate)JsonModelCreateCore(ref reader, options); @@ -61,7 +61,7 @@ internal static ConversationItemFinishedUpdate DeserializeConversationItemFinish } string responseId = default; int outputIndex = default; - InternalRealtimeResponseItem item = default; + InternalRealtimeResponseItem internalItem = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -79,7 +79,7 @@ internal static ConversationItemFinishedUpdate DeserializeConversationItemFinish } if (prop.NameEquals("item"u8)) { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -94,7 +94,7 @@ internal static ConversationItemFinishedUpdate DeserializeConversationItemFinish } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -105,7 +105,7 @@ internal static ConversationItemFinishedUpdate DeserializeConversationItemFinish return new ConversationItemFinishedUpdate( responseId, outputIndex, - item, + internalItem, eventId, kind, additionalBinaryDataProperties); diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs index 50a39b215..4b9be0139 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs @@ -9,24 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemFinishedUpdate : ConversationUpdate { - internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId) : base(eventId) + internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; OutputIndex = outputIndex; - Item = item; } - internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; - Item = item; } public string ResponseId { get; set; } public int OutputIndex { get; set; } - - public InternalRealtimeResponseItem Item { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs index b437179a0..b9a7cd571 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); writer.WritePropertyName("item"u8); - writer.WriteObjectValue(Item, options); + writer.WriteObjectValue(_internalItem, options); } ConversationItemStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStartedUpdate)JsonModelCreateCore(ref reader, options); @@ -61,7 +61,7 @@ internal static ConversationItemStartedUpdate DeserializeConversationItemStarted } string responseId = default; int outputIndex = default; - InternalRealtimeResponseItem item = default; + InternalRealtimeResponseItem internalItem = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -79,7 +79,7 @@ internal static ConversationItemStartedUpdate DeserializeConversationItemStarted } if (prop.NameEquals("item"u8)) { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -94,7 +94,7 @@ internal static ConversationItemStartedUpdate DeserializeConversationItemStarted } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -105,7 +105,7 @@ internal static ConversationItemStartedUpdate DeserializeConversationItemStarted return new ConversationItemStartedUpdate( responseId, outputIndex, - item, + internalItem, eventId, kind, additionalBinaryDataProperties); diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs index 9fafec5e4..e6b659ac6 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs @@ -9,24 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStartedUpdate : ConversationUpdate { - internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId) : base(eventId) + internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; OutputIndex = outputIndex; - Item = item; } - internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; - Item = item; } public string ResponseId { get; set; } public int OutputIndex { get; set; } - - public InternalRealtimeResponseItem Item { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 3c2d7b91a..17b2e2d91 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index bc566bcc5..a6565d15c 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemTruncatedUpdate : ConversationUpdate { - internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId) : base(eventId) + internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ItemId = itemId; AudioEndMs = audioEndMs; diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs index c0e9e79db..0353a0a4a 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversati } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs index 4cf469577..5a5ba2f06 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTranscriptionDeltaUpdate : ConversationUpdate { - internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId) + internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs index 9aa0a5277..72284d8a1 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs @@ -102,7 +102,7 @@ internal static ConversationOutputTranscriptionFinishedUpdate DeserializeConvers } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs index 473308e8d..df4472f1e 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId) + internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs index 52f649cf9..1caed7c0d 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs @@ -88,7 +88,7 @@ internal static ConversationRateLimitsUpdatedUpdate DeserializeConversationRateL } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs index f70e66286..58581bc54 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitsUpdatedUpdate : ConversationUpdate { - internal ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits, string eventId) : base(eventId) + internal ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { RateLimits = rateLimits.ToList(); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index e92fb0eb7..b9c053969 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response, options); + writer.WriteObjectValue(_internalResponse, options); } ConversationResponseFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseFinishedUpdate)JsonModelCreateCore(ref reader, options); @@ -55,7 +55,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon { return null; } - InternalRealtimeResponse response = default; + InternalRealtimeResponse internalResponse = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -63,7 +63,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon { if (prop.NameEquals("response"u8)) { - response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -78,7 +78,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -86,7 +86,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseFinishedUpdate(response, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs index ce568cba8..3a52288fe 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -9,16 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseFinishedUpdate : ConversationUpdate { - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse response, string eventId) : base(eventId) + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { - Response = response; } - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse response, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Response = response; } - - public InternalRealtimeResponse Response { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index cef281254..1f6e20c51 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response, options); + writer.WriteObjectValue(_internalResponse, options); } ConversationResponseStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseStartedUpdate)JsonModelCreateCore(ref reader, options); @@ -55,7 +55,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons { return null; } - InternalRealtimeResponse response = default; + InternalRealtimeResponse internalResponse = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -63,7 +63,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons { if (prop.NameEquals("response"u8)) { - response = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -78,7 +78,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -86,7 +86,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseStartedUpdate(response, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs index ed497b0c1..24f2bffc3 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -9,16 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseStartedUpdate : ConversationUpdate { - internal ConversationResponseStartedUpdate(InternalRealtimeResponse response, string eventId) : base(eventId) + internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { - Response = response; } - internal ConversationResponseStartedUpdate(InternalRealtimeResponse response, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Response = response; } - - public InternalRealtimeResponse Response { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index 4803e24ae..e6f3f4cec 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("session"u8); - writer.WriteObjectValue(Session, options); + writer.WriteObjectValue(_internalSession, options); } ConversationSessionConfiguredUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionConfiguredUpdate)JsonModelCreateCore(ref reader, options); @@ -55,7 +55,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi { return null; } - InternalRealtimeResponseSession session = default; + InternalRealtimeResponseSession internalSession = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -63,7 +63,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi { if (prop.NameEquals("session"u8)) { - session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -78,7 +78,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -86,7 +86,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionConfiguredUpdate(session, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs index d82e6e46d..6b90814cc 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -9,16 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionConfiguredUpdate : ConversationUpdate { - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session, string eventId) : base(eventId) + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { - Session = session; } - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Session = session; } - - public InternalRealtimeResponseSession Session { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index b7d396810..cf03be340 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -27,16 +27,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Modalities)) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Voice)) { writer.WritePropertyName("voice"u8); @@ -75,17 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Model)) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (Optional.IsDefined(ToolChoice)) - { - writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolChoice, options); - } - if (Optional.IsDefined(MaxResponseOutputTokens)) - { - writer.WritePropertyName("max_response_output_tokens"u8); - writer.WriteObjectValue(MaxResponseOutputTokens, options); + writer.WriteStringValue(Model.ToSerialString()); } if (Optional.IsDefined(TurnDetectionOptions)) { @@ -97,6 +77,40 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input_audio_transcription"u8); writer.WriteObjectValue(InputTranscriptionOptions, options); } + if (Optional.IsCollectionDefined(_internalModalities)) + { + writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in _internalModalities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(_internalToolChoice)) + { + writer.WritePropertyName("tool_choice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(_internalToolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(_internalToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(_maxResponseOutputTokens)) + { + writer.WritePropertyName("max_response_output_tokens"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(_maxResponseOutputTokens); +#else + using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -133,7 +147,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { return null; } - IList modalities = default; ConversationVoice? voice = default; string instructions = default; ConversationAudioFormat? inputAudioFormat = default; @@ -141,27 +154,14 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions IList tools = default; float? temperature = default; string model = default; - RealtimeConversation.ConversationToolChoice toolChoice = default; - RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default; ConversationTurnDetectionOptions turnDetectionOptions = default; ConversationInputTranscriptionOptions inputTranscriptionOptions = default; + IList internalModalities = default; + BinaryData internalToolChoice = default; + BinaryData maxResponseOutputTokens = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("modalities"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); - } - modalities = array; - continue; - } if (prop.NameEquals("voice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -233,47 +233,61 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions model = null; continue; } - model = prop.Value.GetString(); + model = prop.Value.GetString().ToString(); continue; } - if (prop.NameEquals("tool_choice"u8)) + if (prop.NameEquals("turn_detection"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; + turnDetectionOptions = null; continue; } - toolChoice = RealtimeConversation.ConversationToolChoice.DeserializeConversationToolChoice(prop.Value, options); + turnDetectionOptions = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); continue; } - if (prop.NameEquals("max_response_output_tokens"u8)) + if (prop.NameEquals("input_audio_transcription"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxResponseOutputTokens = null; + inputTranscriptionOptions = null; continue; } - maxResponseOutputTokens = RealtimeConversation.ConversationMaxTokensChoice.DeserializeConversationMaxTokensChoice(prop.Value, options); + inputTranscriptionOptions = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); continue; } - if (prop.NameEquals("turn_detection"u8)) + if (prop.NameEquals("modalities"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - turnDetectionOptions = null; continue; } - turnDetectionOptions = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InternalRealtimeRequestSessionUpdateCommandSessionModality.DeserializeInternalRealtimeRequestSessionUpdateCommandSessionModality(item, options)); + } + internalModalities = array; continue; } - if (prop.NameEquals("input_audio_transcription"u8)) + if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - inputTranscriptionOptions = null; + internalToolChoice = null; continue; } - inputTranscriptionOptions = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); + internalToolChoice = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("max_response_output_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + maxResponseOutputTokens = null; + continue; + } + maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") @@ -282,7 +296,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions } } return new ConversationSessionOptions( - modalities ?? new ChangeTrackingList(), voice, instructions, inputAudioFormat, @@ -290,10 +303,11 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions tools ?? new ChangeTrackingList(), temperature, model, - toolChoice, - maxResponseOutputTokens, turnDetectionOptions, inputTranscriptionOptions, + internalModalities, + internalToolChoice, + maxResponseOutputTokens, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs index 2beda2388..804c6c0fb 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -14,13 +14,11 @@ public partial class ConversationSessionOptions public ConversationSessionOptions() { - Modalities = new ChangeTrackingList(); Tools = new ChangeTrackingList(); } - internal ConversationSessionOptions(IList modalities, ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, string model, RealtimeConversation.ConversationToolChoice toolChoice, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IDictionary additionalBinaryDataProperties) + internal ConversationSessionOptions(ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, string model, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IList internalModalities, BinaryData internalToolChoice, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) { - Modalities = modalities; Voice = voice; Instructions = instructions; InputAudioFormat = inputAudioFormat; @@ -28,15 +26,11 @@ internal ConversationSessionOptions(IList Modalities { get; } - public ConversationVoice? Voice { get; set; } public string Instructions { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index e267bb865..b1f130421 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("session"u8); - writer.WriteObjectValue(Session, options); + writer.WriteObjectValue(_internalSession, options); } ConversationSessionStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionStartedUpdate)JsonModelCreateCore(ref reader, options); @@ -55,7 +55,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS { return null; } - InternalRealtimeResponseSession session = default; + InternalRealtimeResponseSession internalSession = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -63,7 +63,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS { if (prop.NameEquals("session"u8)) { - session = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } if (prop.NameEquals("event_id"u8)) @@ -78,7 +78,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") @@ -86,7 +86,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionStartedUpdate(session, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionStartedUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs index 94a0bca3a..5899ccb2f 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -9,16 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionStartedUpdate : ConversationUpdate { - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession session, string eventId) : base(eventId) + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { - Session = session; } - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession session, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Session = session; } - - public InternalRealtimeResponseSession Session { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs index 7bfa9ea78..e1c654053 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpda } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs index 0829a98f6..a2dcafeeb 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTextDeltaUpdate : ConversationUpdate { - internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId) + internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs index 28f1a4b59..949a8aaaa 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs @@ -110,7 +110,7 @@ internal static ConversationTextDoneUpdate DeserializeConversationTextDoneUpdate } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs index c50394f13..e1ec73204 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTextDoneUpdate : ConversationUpdate { - internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId) : base(eventId) + internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index d4d55aa52..ceac918ff 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); } writer.WritePropertyName("type"u8); - writer.WriteObjectValue(Kind, options); + writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index bc7a9e67f..641a3fa57 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); } writer.WritePropertyName("type"u8); - writer.WriteNumberValue((int)Kind); + writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index f5c34002f..7a505f96f 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("eventId"u8); } writer.WritePropertyName("type"u8); - writer.WriteNumberValue((int)Kind); + writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 419c295e3..294bf2973 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -42,11 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(EncodingFormat)) { writer.WritePropertyName("encoding_format"u8); - writer.WriteObjectValue?>(EncodingFormat, options); + writer.WriteObjectValue(EncodingFormat, options); } if (Optional.IsDefined(EndUserId)) { @@ -92,7 +92,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions int? dimensions = default; BinaryData input = default; InternalCreateEmbeddingRequestModel model = default; - Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default; + InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -114,7 +114,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions } if (prop.NameEquals("model"u8)) { - model = InternalCreateEmbeddingRequestModel.DeserializeInternalCreateEmbeddingRequestModel(prop.Value, options); + model = new InternalCreateEmbeddingRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("encoding_format"u8)) @@ -124,7 +124,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions encodingFormat = null; continue; } - encodingFormat = Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat?.DeserializeOpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat(prop.Value, options); + encodingFormat = Embeddings.InternalCreateEmbeddingRequestEncodingFormat?.DeserializeInternalCreateEmbeddingRequestEncodingFormat(prop.Value, options); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index bbf81d1ec..b81acc75f 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -11,7 +11,7 @@ public partial class EmbeddingGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalCreateEmbeddingRequestModel model, Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Dimensions = dimensions; Input = input; diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index b879c359b..b40007f1b 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(FileId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteFileResponseObject.DeserializeInternalDeleteFileResponseObject(prop.Value, options); + @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index f08b22a18..525da77c8 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -15,14 +15,14 @@ internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileRespo { Deleted = deleted; FileId = fileId; - Object = @object; + this.Object = @object; } internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; FileId = fileId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index 2b933fc23..c417472a1 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("deleted"u8); writer.WriteBooleanValue(Removed); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteVectorStoreFileResponseObject.DeserializeInternalDeleteVectorStoreFileResponseObject(prop.Value, options); + @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index ae39caa10..fa3f01cec 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -15,14 +15,14 @@ internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteV { FileId = fileId; Removed = removed; - Object = @object; + this.Object = @object; } internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object, IDictionary additionalBinaryDataProperties) { FileId = fileId; Removed = removed; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 30135303e..5e6fe10fe 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Ranker.Value.ToString()); } writer.WritePropertyName("score_threshold"u8); - writer.WriteNumberValue(ScoreThreshold); + writer.WriteNumberValue(_scoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 1c3686881..527374d44 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -21,10 +21,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(_fileSearch)) { writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); + writer.WriteObjectValue(_fileSearch, options); } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs index c14e09ca5..888c57ed8 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs @@ -11,9 +11,6 @@ public partial class FileSearchToolDefinition : ToolDefinition { internal FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - FileSearch = fileSearch; } - - public InternalAssistantToolsFileSearchFileSearch FileSearch { get; set; } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 7f71c939b..10e16e4cb 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -25,15 +25,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Content != null) - { - writer.WritePropertyName("content"u8); - writer.WriteStringValue(Content); - } - else - { - writer.WriteNull("content"u8); - } writer.WritePropertyName("name"u8); writer.WriteStringValue(FunctionName); } @@ -57,22 +48,12 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e { return null; } - string content = default; string functionName = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = prop.Value.GetString(); - continue; - } if (prop.NameEquals("name"u8)) { functionName = prop.Value.GetString(); @@ -83,12 +64,22 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionChatMessage(content, functionName, role, additionalBinaryDataProperties); + return new FunctionChatMessage(functionName, role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index 9fbed4864..95e9bbb36 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -4,17 +4,22 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Chat { public partial class FunctionChatMessage : ChatMessage { - internal FunctionChatMessage(string content, string functionName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + public FunctionChatMessage(string functionName, Chat.ChatMessageRole role) : base(role) { - Content = content; + Argument.AssertNotNull(functionName, nameof(functionName)); + FunctionName = functionName; } - public string Content { get; set; } + internal FunctionChatMessage(string functionName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + { + FunctionName = functionName; + } } } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index b20c91917..a542a969f 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -22,7 +22,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); + writer.WriteObjectValue(_internalFunction, options); } FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionToolDefinition)JsonModelCreateCore(ref reader, options); @@ -44,14 +44,14 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle { return null; } - InternalFunctionDefinition function = default; + InternalFunctionDefinition internalFunction = default; string @type = "function"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("function"u8)) { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); + internalFunction = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -64,7 +64,7 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionToolDefinition(function, @type, additionalBinaryDataProperties); + return new FunctionToolDefinition(internalFunction, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs index b43ca2092..963962467 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs @@ -10,11 +10,8 @@ namespace OpenAI.Assistants { public partial class FunctionToolDefinition : ToolDefinition { - internal FunctionToolDefinition(InternalFunctionDefinition function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal FunctionToolDefinition(InternalFunctionDefinition internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - Function = function; } - - public InternalFunctionDefinition Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 31f4d5cc0..23d72a848 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -19,6 +19,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support writing '{format}' format."); } + writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index c9ce6b76a..1805881db 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -11,8 +11,14 @@ public partial class GeneratedImageCollection { private protected IDictionary _additionalBinaryDataProperties; - internal GeneratedImageCollection(IDictionary additionalBinaryDataProperties) + internal GeneratedImageCollection(DateTimeOffset createdAt) { + CreatedAt = createdAt; + } + + internal GeneratedImageCollection(DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) + { + CreatedAt = createdAt; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageSize.cs b/.dotnet/src/Generated/Models/GeneratedImageSize.cs index 3335b46ac..07525d5fe 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageSize.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageSize.cs @@ -16,16 +16,6 @@ namespace OpenAI.Images private const string _1792x1024Value = "1792x1024"; private const string _1024x1792Value = "1024x1792"; - public static GeneratedImageSize _256x256 { get; } = new GeneratedImageSize(_256x256Value); - - public static GeneratedImageSize _512x512 { get; } = new GeneratedImageSize(_512x512Value); - - public static GeneratedImageSize _1024x1024 { get; } = new GeneratedImageSize(_1024x1024Value); - - public static GeneratedImageSize _1792x1024 { get; } = new GeneratedImageSize(_1792x1024Value); - - public static GeneratedImageSize _1024x1792 { get; } = new GeneratedImageSize(_1024x1792Value); - public static bool operator ==(GeneratedImageSize left, GeneratedImageSize right) => left.Equals(right); public static bool operator !=(GeneratedImageSize left, GeneratedImageSize right) => !left.Equals(right); diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index 8e9033763..d4c6f39ac 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue?>(Model, options); + writer.WriteObjectValue(Model, options); } else { @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteObjectValue?>(Size, options); + writer.WriteObjectValue(Size, options); } else { @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue?>(ResponseFormat, options); + writer.WriteObjectValue(ResponseFormat, options); } else { @@ -125,13 +125,13 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element { return null; } - Images.OpenAI.Images.InternalCreateImageEditRequestModel? model = default; + InternalCreateImageEditRequestModel? model = default; BinaryData image = default; string prompt = default; BinaryData mask = default; long? n = default; - Images.OpenAI.Images.GeneratedImageSize? size = default; - Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + GeneratedImageSize? size = default; + GeneratedImageFormat? responseFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -143,7 +143,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element model = null; continue; } - model = Images.OpenAI.Images.InternalCreateImageEditRequestModel?.DeserializeOpenAI.Images.InternalCreateImageEditRequestModel(prop.Value, options); + model = Images.InternalCreateImageEditRequestModel?.DeserializeInternalCreateImageEditRequestModel(prop.Value, options); continue; } if (prop.NameEquals("image"u8)) @@ -183,7 +183,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element size = null; continue; } - size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); + size = Images.GeneratedImageSize?.DeserializeGeneratedImageSize(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) @@ -193,7 +193,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element responseFormat = null; continue; } - responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); + responseFormat = Images.GeneratedImageFormat?.DeserializeGeneratedImageFormat(prop.Value, options); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index fcc652437..079005d29 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -11,7 +11,7 @@ public partial class ImageEditOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageEditOptions(Images.OpenAI.Images.InternalCreateImageEditRequestModel? model, BinaryData image, string prompt, BinaryData mask, long? n, Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageEditOptions(InternalCreateImageEditRequestModel? model, BinaryData image, string prompt, BinaryData mask, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Model = model; Image = image; diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index f4b08a309..ca3c29e1d 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue?>(Model, options); + writer.WriteObjectValue(Model, options); } else { @@ -139,7 +139,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle GeneratedImageFormat? responseFormat = default; GeneratedImageSize? size = default; GeneratedImageStyle? style = default; - Images.OpenAI.Images.InternalCreateImageRequestModel? model = default; + InternalCreateImageRequestModel? model = default; string prompt = default; long? n = default; string endUserId = default; @@ -193,7 +193,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle model = null; continue; } - model = Images.OpenAI.Images.InternalCreateImageRequestModel?.DeserializeOpenAI.Images.InternalCreateImageRequestModel(prop.Value, options); + model = Images.InternalCreateImageRequestModel?.DeserializeInternalCreateImageRequestModel(prop.Value, options); continue; } if (prop.NameEquals("prompt"u8)) diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index 1c1ea5ed2..dd679a7e2 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -11,7 +11,7 @@ public partial class ImageGenerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, Images.OpenAI.Images.InternalCreateImageRequestModel? model, string prompt, long? n, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, InternalCreateImageRequestModel? model, string prompt, long? n, string endUserId, IDictionary additionalBinaryDataProperties) { Quality = quality; ResponseFormat = responseFormat; diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index cc68e6e51..a14183eed 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue?>(Model, options); + writer.WriteObjectValue(Model, options); } else { @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteObjectValue?>(Size, options); + writer.WriteObjectValue(Size, options); } else { @@ -70,7 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue?>(ResponseFormat, options); + writer.WriteObjectValue(ResponseFormat, options); } else { @@ -118,11 +118,11 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme { return null; } - Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model = default; + InternalCreateImageVariationRequestModel? model = default; BinaryData image = default; long? n = default; - Images.OpenAI.Images.GeneratedImageSize? size = default; - Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default; + GeneratedImageSize? size = default; + GeneratedImageFormat? responseFormat = default; string endUserId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -134,7 +134,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme model = null; continue; } - model = Images.OpenAI.Images.InternalCreateImageVariationRequestModel?.DeserializeOpenAI.Images.InternalCreateImageVariationRequestModel(prop.Value, options); + model = Images.InternalCreateImageVariationRequestModel?.DeserializeInternalCreateImageVariationRequestModel(prop.Value, options); continue; } if (prop.NameEquals("image"u8)) @@ -159,7 +159,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme size = null; continue; } - size = Images.OpenAI.Images.GeneratedImageSize?.DeserializeOpenAI.Images.GeneratedImageSize(prop.Value, options); + size = Images.GeneratedImageSize?.DeserializeGeneratedImageSize(prop.Value, options); continue; } if (prop.NameEquals("response_format"u8)) @@ -169,7 +169,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme responseFormat = null; continue; } - responseFormat = Images.OpenAI.Images.GeneratedImageFormat?.DeserializeOpenAI.Images.GeneratedImageFormat(prop.Value, options); + responseFormat = Images.GeneratedImageFormat?.DeserializeGeneratedImageFormat(prop.Value, options); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 9e607db30..731fe2f10 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -11,7 +11,7 @@ public partial class ImageVariationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ImageVariationOptions(Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model, BinaryData image, long? n, Images.OpenAI.Images.GeneratedImageSize? size, Images.OpenAI.Images.GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) + internal ImageVariationOptions(InternalCreateImageVariationRequestModel? model, BinaryData image, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { Model = model; Image = image; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 4389bf944..5175c5781 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndArray(); } writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role); + writer.WriteStringValue(Role.ToSerialString()); if (Content != null) { writer.WritePropertyName("content"u8); @@ -136,7 +136,7 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index 954b2bb29..f95b5ece1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -57,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Role)) { writer.WritePropertyName("role"u8); - writer.WriteObjectValue?>(Role, options); + writer.WriteNumberValue((int)Role.Value); } if (Optional.IsDefined(Content)) { @@ -110,7 +110,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha StreamingChatFunctionCallUpdate functionCall = default; IList toolCalls = default; string refusal = default; - Chat.OpenAI.Chat.ChatMessageRole? role = default; + Chat.ChatMessageRole? role = default; ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -156,7 +156,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha role = null; continue; } - role = Chat.OpenAI.Chat.ChatMessageRole?.DeserializeOpenAI.Chat.ChatMessageRole(prop.Value, options); + role = prop.Value.GetInt32().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index 5d3ed0759..622d66405 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -11,7 +11,7 @@ internal partial class InternalChatCompletionStreamResponseDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.OpenAI.Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { FunctionCall = functionCall; ToolCalls = toolCalls; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 38e10b6b8..e9bf8c3db 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (FinishReason != null) { writer.WritePropertyName("finish_reason"u8); - writer.WriteObjectValue?>(FinishReason, options); + writer.WriteNumberValue((int)FinishReason.Value); } else { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index 35477fe01..bfa6faa33 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -11,14 +11,14 @@ internal partial class InternalCreateChatCompletionStreamResponseChoice { private protected IDictionary _additionalBinaryDataProperties; - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, int index, Chat.OpenAI.Chat.ChatFinishReason? finishReason) + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, int index, Chat.ChatFinishReason? finishReason) { Delta = delta; Index = index; FinishReason = finishReason; } - internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, int index, Chat.OpenAI.Chat.ChatFinishReason? finishReason, IDictionary additionalBinaryDataProperties) + internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, InternalCreateChatCompletionStreamResponseChoiceLogprobs logprobs, int index, Chat.ChatFinishReason? finishReason, IDictionary additionalBinaryDataProperties) { Delta = delta; Logprobs = logprobs; diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 4c10238a0..4a2b121ca 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -50,25 +50,15 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ { return null; } - BinaryData content = default; string refusal = default; string participantName = default; IList toolCalls = default; ChatFunctionCall functionCall = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("refusal"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -118,18 +108,28 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalFineTuneChatCompletionRequestAssistantMessage( - content, refusal, participantName, toolCalls ?? new ChangeTrackingList(), functionCall, role, + content, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index d0dd1e1b4..942a9090b 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -14,7 +14,7 @@ public InternalFineTuneChatCompletionRequestAssistantMessage() { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(BinaryData content, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(content, refusal, participantName, toolCalls, functionCall, role, additionalBinaryDataProperties) + internal InternalFineTuneChatCompletionRequestAssistantMessage(string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(refusal, participantName, toolCalls, functionCall, role, content, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 60381217c..41abdbf72 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -26,9 +26,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WriteStringValue(_type.ToSerialString()); writer.WritePropertyName("image_file"u8); - writer.WriteObjectValue(ImageFile, options); + writer.WriteObjectValue(_imageFile, options); } InternalMessageImageFileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageFileContent)JsonModelCreateCore(ref reader, options); @@ -50,14 +50,14 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF { return null; } - InternalMessageContentImageFileObjectType @type = default; + string @type = default; InternalMessageContentItemFileObjectImageFile imageFile = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = new InternalMessageContentImageFileObjectType(prop.Value.GetString()); + @type = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("image_file"u8)) diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs index 311f547bb..eb8c634fb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs @@ -4,19 +4,21 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageFileContent : MessageContent { - internal InternalMessageImageFileContent(InternalMessageContentImageFileObjectType @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + public InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile) { - Type = @type; - ImageFile = imageFile; - } + Argument.AssertNotNull(@type, nameof(@type)); + Argument.AssertNotNull(imageFile, nameof(imageFile)); - public InternalMessageContentImageFileObjectType Type { get; } = "image_file"; + } - public InternalMessageContentItemFileObjectImageFile ImageFile { get; set; } + internal InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + { + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index e8f0375b4..91f97073d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -26,9 +26,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WriteStringValue(_type.ToSerialString()); writer.WritePropertyName("image_url"u8); - writer.WriteObjectValue(ImageUrl, options); + writer.WriteObjectValue(_imageUrl, options); } InternalMessageImageUrlContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageUrlContent)JsonModelCreateCore(ref reader, options); @@ -50,14 +50,14 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr { return null; } - InternalMessageContentImageUrlObjectType @type = default; + string @type = default; InternalMessageContentImageUrlObjectImageUrl imageUrl = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = new InternalMessageContentImageUrlObjectType(prop.Value.GetString()); + @type = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("image_url"u8)) diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs index 2d228a6dd..e7adcb801 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs @@ -4,19 +4,21 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageUrlContent : MessageContent { - internal InternalMessageImageUrlContent(InternalMessageContentImageUrlObjectType @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + public InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl) { - Type = @type; - ImageUrl = imageUrl; - } + Argument.AssertNotNull(@type, nameof(@type)); + Argument.AssertNotNull(imageUrl, nameof(imageUrl)); - public InternalMessageContentImageUrlObjectType Type { get; } = "image_url"; + } - public InternalMessageContentImageUrlObjectImageUrl ImageUrl { get; set; } + internal InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + { + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index bddc5dc33..a8a5090b6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -25,10 +25,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageRefusalContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("refusal"u8); writer.WriteStringValue(InternalRefusal); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type.ToSerialString()); } InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)JsonModelCreateCore(ref reader, options); @@ -50,19 +50,19 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC { return null; } - InternalMessageContentRefusalObjectType @type = default; string internalRefusal = default; + string @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("refusal"u8)) { - @type = new InternalMessageContentRefusalObjectType(prop.Value.GetString()); + internalRefusal = prop.Value.GetString(); continue; } - if (prop.NameEquals("refusal"u8)) + if (prop.NameEquals("type"u8)) { - internalRefusal = prop.Value.GetString(); + @type = prop.Value.GetString().ToString(); continue; } if (options.Format != "W") @@ -70,7 +70,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageRefusalContent(@type, internalRefusal, additionalBinaryDataProperties); + return new InternalMessageRefusalContent(internalRefusal, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index f43d556d4..f6a8bb6e1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -10,19 +10,17 @@ namespace OpenAI.Assistants { internal partial class InternalMessageRefusalContent : MessageContent { - public InternalMessageRefusalContent(string internalRefusal) + public InternalMessageRefusalContent(string internalRefusal, string @type) { Argument.AssertNotNull(internalRefusal, nameof(internalRefusal)); + Argument.AssertNotNull(@type, nameof(@type)); InternalRefusal = internalRefusal; } - internal InternalMessageRefusalContent(InternalMessageContentRefusalObjectType @type, string internalRefusal, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalMessageRefusalContent(string internalRefusal, string @type, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { - Type = @type; InternalRefusal = internalRefusal; } - - public InternalMessageContentRefusalObjectType Type { get; } = "refusal"; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index 2676796e0..d7a6169b4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -13,6 +13,10 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAudioContentPart : IJsonModel { + internal InternalRealtimeRequestAudioContentPart() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs index 6809ff2c4..af377deb9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs @@ -4,13 +4,16 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAudioContentPart : ConversationContentPart { - public InternalRealtimeRequestAudioContentPart() : base(ConversationContentPartKind.InputAudio) + public InternalRealtimeRequestAudioContentPart(ConversationContentPartKind @type) : base(@type) { + Argument.AssertNotNull(@type, nameof(@type)); + } internal InternalRealtimeRequestAudioContentPart(string transcript, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs index f488771e9..2e6c0e794 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs @@ -10,9 +10,10 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestTextContentPart : ConversationContentPart { - public InternalRealtimeRequestTextContentPart(string text) : base(ConversationContentPartKind.InputText) + public InternalRealtimeRequestTextContentPart(string text, ConversationContentPartKind @type) : base(@type) { Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(@type, nameof(@type)); Text = text; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs index 8bac16e56..4175d986d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseAudioContentPart : ConversationContentPart { - internal InternalRealtimeResponseAudioContentPart(string transcript) : base(ConversationContentPartKind.Audio) + internal InternalRealtimeResponseAudioContentPart(string transcript, ConversationContentPartKind @type) : base(@type) { Transcript = transcript; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index a40e91e66..3c3d05a4b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -42,7 +42,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("role"u8); - writer.WriteObjectValue(Role, options); + writer.WriteStringValue(Role.ToString()); } InternalRealtimeResponseMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseMessageItem)JsonModelCreateCore(ref reader, options); @@ -90,7 +90,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR } if (prop.NameEquals("role"u8)) { - role = ConversationMessageRole.DeserializeConversationMessageRole(prop.Value, options); + role = new ConversationMessageRole(prop.Value.GetString()); continue; } if (prop.NameEquals("object"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 0f828d0f9..0f26aae88 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -81,10 +81,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature); - if (MaxResponseOutputTokens != null) + if (_maxResponseOutputTokens != null) { writer.WritePropertyName("max_response_output_tokens"u8); - writer.WriteObjectValue(MaxResponseOutputTokens, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(_maxResponseOutputTokens); +#else + using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } else { @@ -139,7 +146,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo IList tools = default; BinaryData toolChoice = default; float temperature = default; - RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default; + BinaryData maxResponseOutputTokens = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -225,7 +232,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo } if (prop.NameEquals("max_response_output_tokens"u8)) { - maxResponseOutputTokens = RealtimeConversation.ConversationMaxTokensChoice.DeserializeConversationMaxTokensChoice(prop.Value, options); + maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index 1a4a640e3..d3233c65b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -12,7 +12,7 @@ internal partial class InternalRealtimeResponseSession { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens) + internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) { Id = id; Model = model; @@ -26,10 +26,9 @@ internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IList tools, BinaryData toolChoice, float temperature, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) { Object = @object; Id = id; @@ -44,7 +43,6 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ Tools = tools; ToolChoice = toolChoice; Temperature = temperature; - MaxResponseOutputTokens = maxResponseOutputTokens; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs index 53a4b91a8..48dbc9025 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseTextContentPart : ConversationContentPart { - internal InternalRealtimeResponseTextContentPart(string text) : base(ConversationContentPartKind.Text) + internal InternalRealtimeResponseTextContentPart(string text, ConversationContentPartKind @type) : base(@type) { Text = text; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index b43851056..f6298d0e2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -13,6 +13,10 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerVadTurnDetection : IJsonModel { + internal InternalRealtimeServerVadTurnDetection() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -103,7 +107,7 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationTurnDetectionKind(); + kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs index 1b4727ea7..5aafe5c44 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerVadTurnDetection : ConversationTurnDetectionOptions { - public InternalRealtimeServerVadTurnDetection() + public InternalRealtimeServerVadTurnDetection(RealtimeConversation.ConversationTurnDetectionKind kind) : base(kind) { } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index 3fa04d455..6a9356589 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -34,9 +34,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WriteStringValue(_type.ToSerialString()); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); + writer.WriteObjectValue(_internalFunction, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,8 +74,8 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc return null; } string id = default; - InternalRunToolCallObjectType @type = default; - InternalRunToolCallObjectFunction function = default; + object @type = default; + InternalRunToolCallObjectFunction internalFunction = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -86,12 +86,12 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc } if (prop.NameEquals("type"u8)) { - @type = new InternalRunToolCallObjectType(prop.Value.GetString()); + @type = prop.Value.GetString().ToObject(); continue; } if (prop.NameEquals("function"u8)) { - function = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); + internalFunction = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRequiredFunctionToolCall(id, @type, function, additionalBinaryDataProperties); + return new InternalRequiredFunctionToolCall(id, @type, internalFunction, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index 647a9a1e5..a9e8f4c08 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -11,24 +11,17 @@ internal partial class InternalRequiredFunctionToolCall { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction function) + internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunToolCallObjectFunction internalFunction) { Id = id; - Function = function; } - internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectType @type, InternalRunToolCallObjectFunction function, IDictionary additionalBinaryDataProperties) + internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunToolCallObjectFunction internalFunction, IDictionary additionalBinaryDataProperties) { Id = id; - Type = @type; - Function = function; _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Id { get; set; } - - public InternalRunToolCallObjectType Type { get; } = "function"; - - public InternalRunToolCallObjectFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 242af7557..a6ccb91f0 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -26,9 +26,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WriteStringValue(_type.ToSerialString()); writer.WritePropertyName("text"u8); - writer.WriteObjectValue(Text, options); + writer.WriteObjectValue(_text, options); } InternalResponseMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseMessageTextContent)JsonModelCreateCore(ref reader, options); @@ -50,14 +50,14 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe { return null; } - InternalMessageContentTextObjectType @type = default; + string @type = default; InternalMessageContentTextObjectText text = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = new InternalMessageContentTextObjectType(prop.Value.GetString()); + @type = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("text"u8)) diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs index 75784e85a..7e3f99f2a 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs @@ -4,19 +4,21 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalResponseMessageTextContent : MessageContent { - internal InternalResponseMessageTextContent(InternalMessageContentTextObjectType @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + public InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text) { - Type = @type; - Text = text; - } + Argument.AssertNotNull(@type, nameof(@type)); + Argument.AssertNotNull(text, nameof(text)); - public InternalMessageContentTextObjectType Type { get; } = "text"; + } - public InternalMessageContentTextObjectText Text { get; set; } + internal InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + { + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index c79224331..ca0976bab 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -31,10 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunRequiredAction)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("submit_tool_outputs"u8); writer.WriteObjectValue(SubmitToolOutputs, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -71,19 +71,19 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J { return null; } - InternalRunObjectRequiredActionType @type = default; InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs = default; + object @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("submit_tool_outputs"u8)) { - @type = new InternalRunObjectRequiredActionType(prop.Value.GetString()); + submitToolOutputs = InternalRunObjectRequiredActionSubmitToolOutputs.DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(prop.Value, options); continue; } - if (prop.NameEquals("submit_tool_outputs"u8)) + if (prop.NameEquals("type"u8)) { - submitToolOutputs = InternalRunObjectRequiredActionSubmitToolOutputs.DeserializeInternalRunObjectRequiredActionSubmitToolOutputs(prop.Value, options); + @type = prop.Value.GetString().ToObject(); continue; } if (options.Format != "W") @@ -91,7 +91,7 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunRequiredAction(@type, submitToolOutputs, additionalBinaryDataProperties); + return new InternalRunRequiredAction(submitToolOutputs, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 1946552ea..e23b4152e 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -11,20 +11,17 @@ internal partial class InternalRunRequiredAction { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs) + internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type) { SubmitToolOutputs = submitToolOutputs; } - internal InternalRunRequiredAction(InternalRunObjectRequiredActionType @type, InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, IDictionary additionalBinaryDataProperties) + internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type, IDictionary additionalBinaryDataProperties) { - Type = @type; SubmitToolOutputs = submitToolOutputs; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunObjectRequiredActionType Type { get; } = "submit_tool_outputs"; - public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index 4e967a4ed..782715bcc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -35,7 +35,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); + writer.WriteObjectValue(_codeInterpreter, options); } InternalRunStepCodeInterpreterToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterToolCallDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs index 52fb4e256..b98ec333f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -12,17 +12,13 @@ internal partial class InternalRunStepCodeInterpreterToolCallDetails : RunStepTo internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base("code_interpreter") { Id = id; - CodeInterpreter = codeInterpreter; } internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; - CodeInterpreter = codeInterpreter; } public string Id { get; set; } - - public InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index 4fa2e3c7a..e4233bdff 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -33,10 +33,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("delta"u8); writer.WriteObjectValue(Delta, options); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,8 +74,8 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement return null; } string id = default; - InternalRunStepDeltaObjectObject @object = default; InternalRunStepDeltaObjectDelta delta = default; + object @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -84,14 +84,14 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement id = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("delta"u8)) { - @object = new InternalRunStepDeltaObjectObject(prop.Value.GetString()); + delta = InternalRunStepDeltaObjectDelta.DeserializeInternalRunStepDeltaObjectDelta(prop.Value, options); continue; } - if (prop.NameEquals("delta"u8)) + if (prop.NameEquals("object"u8)) { - delta = InternalRunStepDeltaObjectDelta.DeserializeInternalRunStepDeltaObjectDelta(prop.Value, options); + @object = prop.Value.GetString().ToObject(); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDelta(id, @object, delta, additionalBinaryDataProperties); + return new InternalRunStepDelta(id, delta, @object, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 92bfc67c6..04dab9fc6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -11,24 +11,21 @@ internal partial class InternalRunStepDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta) + internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, object @object) { Id = id; Delta = delta; } - internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectObject @object, InternalRunStepDeltaObjectDelta delta, IDictionary additionalBinaryDataProperties) + internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, object @object, IDictionary additionalBinaryDataProperties) { Id = id; - Object = @object; Delta = delta; _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Id { get; set; } - public InternalRunStepDeltaObjectObject Object { get; } = "thread.run.step.delta"; - public InternalRunStepDeltaObjectDelta Delta { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 8b1df2914..b4b67dcc8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("message_creation"u8); - writer.WriteObjectValue(MessageCreation, options); + writer.WriteObjectValue(_messageCreation, options); } InternalRunStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsMessageCreationObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs index bbeeca0aa..9bd882ba6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs @@ -11,14 +11,10 @@ internal partial class InternalRunStepDetailsMessageCreationObject : RunStepDeta { internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) : base("message_creation") { - MessageCreation = messageCreation; } internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - MessageCreation = messageCreation; } - - public InternalRunStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 6d848a709..9c8589287 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("image"u8); - writer.WriteObjectValue(Image, options); + writer.WriteObjectValue(_image, options); } InternalRunStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsCodeOutputImageObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs index 606f7c318..e295be878 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs @@ -11,14 +11,10 @@ internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObject : Ru { internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) : base("image") { - Image = image; } internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - Image = image; } - - public InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 7a07ce9c3..e72e3d5e3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -35,7 +35,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); + writer.WriteObjectValue(_internalFunction, options); } InternalRunStepFunctionToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepFunctionToolCallDetails)JsonModelCreateCore(ref reader, options); @@ -58,7 +58,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte return null; } string id = default; - InternalRunStepDetailsToolCallsFunctionObjectFunction function = default; + InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction = default; string @type = "function"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -70,7 +70,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte } if (prop.NameEquals("function"u8)) { - function = InternalRunStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); + internalFunction = InternalRunStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -83,7 +83,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepFunctionToolCallDetails(id, function, @type, additionalBinaryDataProperties); + return new InternalRunStepFunctionToolCallDetails(id, internalFunction, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs index 27f6336b8..6ffe6c231 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs @@ -9,20 +9,16 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepFunctionToolCallDetails : RunStepToolCall { - internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction function) : base("function") + internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction) : base("function") { Id = id; - Function = function; } - internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; - Function = function; } public string Id { get; set; } - - public InternalRunStepDetailsToolCallsFunctionObjectFunction Function { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 11c461633..8f0f979a7 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -46,6 +46,7 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage return null; } Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -54,12 +55,22 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalUnknownChatMessage(role, additionalBinaryDataProperties); + return new InternalUnknownChatMessage(role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs index 4586cc4c8..994ab4d56 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalUnknownChatMessage : ChatMessage { - internal InternalUnknownChatMessage(Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal InternalUnknownChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index a17792db1..b72b1a6d4 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(MessageId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteMessageResponseObject.DeserializeInternalDeleteMessageResponseObject(prop.Value, options); + @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index bf83c8127..be7178507 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -15,14 +15,14 @@ internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMes { Deleted = deleted; MessageId = messageId; - Object = @object; + this.Object = @object; } internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMessageResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; MessageId = messageId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 586181b81..94f6f1cb2 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(ModelId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteModelResponseObject.DeserializeInternalDeleteModelResponseObject(prop.Value, options); + @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index 4d76c6cea..94ff3e8d8 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -15,14 +15,14 @@ internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelRe { Deleted = deleted; ModelId = modelId; - Object = @object; + this.Object = @object; } internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; ModelId = modelId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index cbe8aad44..91397d1cc 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Model)) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue?>(Model, options); + writer.WriteStringValue(Model.Value.ToString()); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -78,7 +78,7 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme return null; } BinaryData input = default; - Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel? model = default; + InternalCreateModerationRequestModel? model = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -94,7 +94,7 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme model = null; continue; } - model = Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel?.DeserializeOpenAI.Moderations.InternalCreateModerationRequestModel(prop.Value, options); + model = new InternalCreateModerationRequestModel(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index 133d620c7..1739b2dcc 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -11,7 +11,7 @@ internal partial class ModerationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ModerationOptions(BinaryData input, Moderations.OpenAI.Moderations.InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) + internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) { Input = input; Model = model; diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 0fd195180..4a8aada5f 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -98,7 +98,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, } if (prop.NameEquals("object"u8)) { - @object = InternalEmbeddingObject.DeserializeInternalEmbeddingObject(prop.Value, options); + @object = new InternalEmbeddingObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index d8155e1bb..7d013d4d1 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -15,7 +15,7 @@ internal OpenAIEmbedding(int index, BinaryData embeddingProperty, InternalEmbedd { Index = index; EmbeddingProperty = embeddingProperty; - Object = @object; + this.Object = @object; } public int Index { get; set; } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index 238561b3b..fbdbceb75 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index 53cb19af2..01ce2f7c2 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -15,14 +15,14 @@ internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, Inte { Model = model; Usage = usage; - Object = @object; + this.Object = @object; } internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object, IDictionary additionalBinaryDataProperties) { Model = model; Usage = usage; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 87c430732..646796b25 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -40,7 +40,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToSerialString()); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (SizeInBytes != null) { writer.WritePropertyName("bytes"u8); @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("bytes"u8); + writer.WriteNull("sizeInBytes"u8); } writer.WritePropertyName("status"u8); writer.WriteNumberValue((int)Status); @@ -126,7 +126,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade } if (prop.NameEquals("object"u8)) { - @object = InternalOpenAIFileObject.DeserializeInternalOpenAIFileObject(prop.Value, options); + @object = new InternalOpenAIFileObject(prop.Value.GetString()); continue; } if (prop.NameEquals("bytes"u8)) diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index 371219856..a3b2c52e0 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -17,7 +17,7 @@ internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files. CreatedAt = createdAt; Filename = filename; Purpose = purpose; - Object = @object; + this.Object = @object; SizeInBytes = sizeInBytes; Status = status; } @@ -28,7 +28,7 @@ internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files. CreatedAt = createdAt; Filename = filename; Purpose = purpose; - Object = @object; + this.Object = @object; SizeInBytes = sizeInBytes; Status = status; StatusDetails = statusDetails; diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 7d52004c8..c5039ddaf 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -20,7 +20,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index 81e20b72c..fb10cd18c 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -13,12 +13,12 @@ public partial class OpenAIFileCollection internal OpenAIFileCollection(InternalListFilesResponseObject @object) { - Object = @object; + this.Object = @object; } internal OpenAIFileCollection(InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) { - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index 0b6fa1ff9..248f5759b 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("owned_by"u8); writer.WriteStringValue(OwnedBy); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -94,7 +94,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea } if (prop.NameEquals("object"u8)) { - @object = InternalModelObject.DeserializeInternalModelObject(prop.Value, options); + @object = new InternalModelObject(prop.Value.GetString()); continue; } if (prop.NameEquals("created"u8)) diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index 439f54ad3..ec366d021 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -15,7 +15,7 @@ internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, Dat { Id = id; OwnedBy = ownedBy; - Object = @object; + this.Object = @object; CreatedAt = createdAt; } @@ -23,7 +23,7 @@ internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, Dat { Id = id; OwnedBy = ownedBy; - Object = @object; + this.Object = @object; CreatedAt = createdAt; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index ff8c5e6b2..d0154fbdf 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -20,7 +20,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index 3af33c0ff..59f9b6a7f 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -13,12 +13,12 @@ public partial class OpenAIModelCollection internal OpenAIModelCollection(InternalListModelsResponseObject @object) { - Object = @object; + this.Object = @object; } internal OpenAIModelCollection(InternalListModelsResponseObject @object, IDictionary additionalBinaryDataProperties) { - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 56572e8fc..1382871ef 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("model"u8); + writer.WriteNull("modelOverride"u8); } } if (Optional.IsDefined(InstructionsOverride)) @@ -74,7 +74,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("instructions"u8); + writer.WriteNull("instructionsOverride"u8); } } if (Optional.IsDefined(AdditionalInstructions)) @@ -89,15 +89,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalInstructions"u8); } } - if (Optional.IsCollectionDefined(InternalMessages)) + if (Optional.IsCollectionDefined(AdditionalMessages)) { - if (InternalMessages != null) + if (AdditionalMessages != null) { writer.WritePropertyName("additional_messages"u8); writer.WriteStartArray(); - foreach (MessageCreationOptions item in InternalMessages) + foreach (Assistants.ThreadInitializationMessage item in AdditionalMessages) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -125,7 +125,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("tools"u8); + writer.WriteNull("toolsOverride"u8); } } if (Optional.IsCollectionDefined(Metadata)) @@ -172,7 +172,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topP"u8); + writer.WriteNull("nucleusSamplingFactor"u8); } } if (Optional.IsDefined(MaxInputTokenCount)) @@ -184,7 +184,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxPromptTokens"u8); + writer.WriteNull("maxInputTokenCount"u8); } } if (Optional.IsDefined(MaxOutputTokenCount)) @@ -196,7 +196,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxCompletionTokens"u8); + writer.WriteNull("maxOutputTokenCount"u8); } } if (Optional.IsDefined(TruncationStrategy)) @@ -220,7 +220,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("toolChoice"u8); + writer.WriteNull("toolConstraint"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -265,7 +265,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele string modelOverride = default; string instructionsOverride = default; string additionalInstructions = default; - IList internalMessages = default; + IList additionalMessages = default; bool? allowParallelToolCalls = default; IList toolsOverride = default; IDictionary metadata = default; @@ -339,12 +339,12 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); + array.Add(Assistants.ThreadInitializationMessage.DeserializeThreadInitializationMessage(item, options)); } - internalMessages = array; + additionalMessages = array; continue; } if (prop.NameEquals("parallel_tool_calls"u8)) @@ -464,7 +464,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele modelOverride, instructionsOverride, additionalInstructions, - internalMessages ?? new ChangeTrackingList(), + additionalMessages ?? new ChangeTrackingList(), allowParallelToolCalls, toolsOverride ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index 66f3818e3..f585bc031 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -11,7 +11,7 @@ public partial class RunCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) + internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList additionalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Stream = stream; @@ -19,7 +19,7 @@ internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseF ModelOverride = modelOverride; InstructionsOverride = instructionsOverride; AdditionalInstructions = additionalInstructions; - InternalMessages = internalMessages; + AdditionalMessages = additionalMessages; AllowParallelToolCalls = allowParallelToolCalls; ToolsOverride = toolsOverride; Metadata = metadata; diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index 28fa82d73..e92cae5bf 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -120,7 +120,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("usage"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(Details, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -297,7 +297,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite } if (prop.NameEquals("object"u8)) { - @object = InternalRunStepObjectObject.DeserializeInternalRunStepObjectObject(prop.Value, options); + @object = new InternalRunStepObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("step_details"u8)) diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index 0c8f4a4a5..ad62df4db 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -27,7 +27,7 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string CompletedAt = completedAt; Metadata = metadata; Usage = usage; - Object = @object; + this.Object = @object; Details = details; } @@ -47,7 +47,7 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string CompletedAt = completedAt; Metadata = metadata; Usage = usage; - Object = @object; + this.Object = @object; Details = details; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 5e4917360..e4a80fda9 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -31,8 +31,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunTruncationStrategy)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); if (Optional.IsDefined(LastMessages)) { if (LastMessages != null) @@ -45,6 +43,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("lastMessages"u8); } } + writer.WritePropertyName("type"u8); + writer.WriteObjectValue(_type, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -81,16 +81,11 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme { return null; } - InternalTruncationObjectType @type = default; int? lastMessages = default; + InternalTruncationObjectType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) - { - @type = new InternalTruncationObjectType(prop.Value.GetString()); - continue; - } if (prop.NameEquals("last_messages"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -101,12 +96,17 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme lastMessages = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("type"u8)) + { + @type = InternalTruncationObjectType.DeserializeInternalTruncationObjectType(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new RunTruncationStrategy(@type, lastMessages, additionalBinaryDataProperties); + return new RunTruncationStrategy(lastMessages, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs index a607b9667..63a6ce1c1 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs @@ -11,13 +11,10 @@ public partial class RunTruncationStrategy { private protected IDictionary _additionalBinaryDataProperties; - internal RunTruncationStrategy(InternalTruncationObjectType @type, int? lastMessages, IDictionary additionalBinaryDataProperties) + internal RunTruncationStrategy(int? lastMessages, InternalTruncationObjectType @type, IDictionary additionalBinaryDataProperties) { - Type = @type; LastMessages = lastMessages; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - - public InternalTruncationObjectType Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index eb5b48d79..15d9d08ed 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResponseFormat.Value.ToString()); } writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.ToString()); writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); writer.WritePropertyName("voice"u8); @@ -99,7 +99,7 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE } if (prop.NameEquals("model"u8)) { - model = InternalCreateSpeechRequestModel.DeserializeInternalCreateSpeechRequestModel(prop.Value, options); + model = new InternalCreateSpeechRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("input"u8)) diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index 26db524ca..cdacb800b 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("static"u8); - writer.WriteObjectValue(Static, options); + writer.WriteObjectValue(_internalDetails, options); } StaticFileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (StaticFileChunkingStrategy)JsonModelCreateCore(ref reader, options); @@ -55,14 +55,14 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy { return null; } - InternalStaticChunkingStrategyDetails @static = default; + InternalStaticChunkingStrategyDetails internalDetails = default; string @type = "static"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("static"u8)) { - @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); + internalDetails = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -75,7 +75,7 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new StaticFileChunkingStrategy(@static, @type, additionalBinaryDataProperties); + return new StaticFileChunkingStrategy(internalDetails, @type, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs index 507fda999..20b08f97e 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs @@ -9,11 +9,8 @@ namespace OpenAI.VectorStores { public partial class StaticFileChunkingStrategy : FileChunkingStrategy { - internal StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails @static, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { - Static = @static; } - - public InternalStaticChunkingStrategyDetails Static { get; set; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 0f137171d..ce01653d5 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(SystemFingerprint); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("id"u8); writer.WriteStringValue(CompletionId); if (Optional.IsDefined(ServiceTier)) @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteObjectValue?>(ServiceTier, options); + writer.WriteObjectValue(ServiceTier, options); } else { @@ -108,7 +108,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion string systemFingerprint = default; InternalCreateChatCompletionStreamResponseObject @object = default; string completionId = default; - Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; + InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default; IReadOnlyList choices = default; DateTimeOffset createdAt = default; ChatTokenUsage usage = default; @@ -132,7 +132,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion } if (prop.NameEquals("object"u8)) { - @object = InternalCreateChatCompletionStreamResponseObject.DeserializeInternalCreateChatCompletionStreamResponseObject(prop.Value, options); + @object = new InternalCreateChatCompletionStreamResponseObject(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) @@ -147,7 +147,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion serviceTier = null; continue; } - serviceTier = Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier?.DeserializeOpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier(prop.Value, options); + serviceTier = Chat.InternalCreateChatCompletionStreamResponseServiceTier?.DeserializeInternalCreateChatCompletionStreamResponseServiceTier(prop.Value, options); continue; } if (prop.NameEquals("choices"u8)) diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index 2776e90de..dd0b0f478 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -15,17 +15,17 @@ public partial class StreamingChatCompletionUpdate internal StreamingChatCompletionUpdate(string model, InternalCreateChatCompletionStreamResponseObject @object, string completionId, IEnumerable choices, DateTimeOffset createdAt) { Model = model; - Object = @object; + this.Object = @object; CompletionId = completionId; Choices = choices.ToList(); CreatedAt = createdAt; } - internal StreamingChatCompletionUpdate(string model, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, string completionId, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) + internal StreamingChatCompletionUpdate(string model, string systemFingerprint, InternalCreateChatCompletionStreamResponseObject @object, string completionId, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier, IReadOnlyList choices, DateTimeOffset createdAt, ChatTokenUsage usage, IDictionary additionalBinaryDataProperties) { Model = model; SystemFingerprint = systemFingerprint; - Object = @object; + this.Object = @object; CompletionId = completionId; ServiceTier = serviceTier; Choices = choices; diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 309328bba..bdc7ec0de 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Function, options); } writer.WritePropertyName("type"u8); - writer.WriteNumberValue((int)Kind); + writer.WriteStringValue(Kind.ToSerialString()); if (Optional.IsDefined(ToolCallId)) { writer.WritePropertyName("id"u8); @@ -110,7 +110,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda kind = null; continue; } - kind = prop.Value.GetInt32().ToChatToolCallKind(); + kind = prop.Value.GetString().ToChatToolCallKind(); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index d784ccf22..840f2f790 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -25,15 +25,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SystemChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif if (Optional.IsDefined(ParticipantName)) { writer.WritePropertyName("name"u8); @@ -60,17 +51,12 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme { return null; } - BinaryData content = default; string participantName = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - content = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("name"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -86,12 +72,22 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new SystemChatMessage(content, participantName, role, additionalBinaryDataProperties); + return new SystemChatMessage(participantName, role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index e52728cff..67b55ea8b 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -4,25 +4,18 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Chat { public partial class SystemChatMessage : ChatMessage { - public SystemChatMessage(BinaryData content) + public SystemChatMessage(Chat.ChatMessageRole role) : base(role) { - Argument.AssertNotNull(content, nameof(content)); - - Content = content; } - internal SystemChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal SystemChatMessage(string participantName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { - Content = content; ParticipantName = participantName; } - - public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index f8aa6ca97..87eee937f 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(ThreadId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteThreadResponseObject.DeserializeInternalDeleteThreadResponseObject(prop.Value, options); + @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index d48b1c9f2..c9a7fe7db 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -15,14 +15,14 @@ internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThrea { Deleted = deleted; ThreadId = threadId; - Object = @object; + this.Object = @object; } internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThreadResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; ThreadId = threadId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index 1c1f9b1e2..e64d2a476 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -112,7 +112,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("role"u8); writer.WriteNumberValue((int)Role); if (Attachments != null && Optional.IsCollectionDefined(Attachments)) @@ -286,7 +286,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode } if (prop.NameEquals("object"u8)) { - @object = InternalMessageObjectObject.DeserializeInternalMessageObjectObject(prop.Value, options); + @object = new InternalMessageObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("role"u8)) diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 33bdeb278..219093dc4 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -25,7 +25,7 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes AssistantId = assistantId; RunId = runId; Metadata = metadata; - Object = @object; + this.Object = @object; Role = role; Attachments = attachments.ToList(); } @@ -43,7 +43,7 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes AssistantId = assistantId; RunId = runId; Metadata = metadata; - Object = @object; + this.Object = @object; Role = role; Attachments = attachments; _additionalBinaryDataProperties = additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 56ad8b167..7d3aac20e 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -41,15 +41,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(AssistantId); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); - if (RequiredAction != null) - { - writer.WritePropertyName("required_action"u8); - writer.WriteObjectValue(RequiredAction, options); - } - else - { - writer.WriteNull("requiredAction"u8); - } if (LastError != null) { writer.WritePropertyName("last_error"u8); @@ -175,7 +166,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("truncationStrategy"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); @@ -192,7 +183,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("toolChoice"u8); + writer.WriteNull("toolConstraint"u8); } if (Optional.IsDefined(NucleusSamplingFactor)) { @@ -203,7 +194,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topP"u8); + writer.WriteNull("nucleusSamplingFactor"u8); } } writer.WritePropertyName("parallel_tool_calls"u8); @@ -215,7 +206,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxPromptTokens"u8); + writer.WriteNull("maxInputTokenCount"u8); } if (MaxOutputTokenCount != null) { @@ -224,7 +215,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxCompletionTokens"u8); + writer.WriteNull("maxOutputTokenCount"u8); + } + if (_internalRequiredAction != null) + { + writer.WritePropertyName("required_action"u8); + writer.WriteObjectValue(_internalRequiredAction, options); + } + else + { + writer.WriteNull("internalRequiredAction"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -267,7 +267,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW string threadId = default; string assistantId = default; RunStatus status = default; - InternalRunRequiredAction requiredAction = default; RunError lastError = default; DateTimeOffset? expiresAt = default; DateTimeOffset? startedAt = default; @@ -289,6 +288,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW bool? allowParallelToolCalls = default; int? maxInputTokenCount = default; int? maxOutputTokenCount = default; + InternalRunRequiredAction internalRequiredAction = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -317,16 +317,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW status = new RunStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("required_action"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - requiredAction = null; - continue; - } - requiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); - continue; - } if (prop.NameEquals("last_error"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -471,7 +461,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (prop.NameEquals("object"u8)) { - @object = InternalRunObjectObject.DeserializeInternalRunObjectObject(prop.Value, options); + @object = new InternalRunObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("response_format"u8)) @@ -524,6 +514,11 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW maxOutputTokenCount = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("required_action"u8)) + { + internalRequiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -535,7 +530,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW threadId, assistantId, status, - requiredAction, lastError, expiresAt, startedAt, @@ -557,6 +551,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW allowParallelToolCalls, maxInputTokenCount, maxOutputTokenCount, + internalRequiredAction, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 63aeaaa11..5bacc3478 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -12,14 +12,13 @@ public partial class ThreadRun { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) { Id = id; CreatedAt = createdAt; ThreadId = threadId; AssistantId = assistantId; Status = status; - RequiredAction = requiredAction; LastError = lastError; ExpiresAt = expiresAt; StartedAt = startedAt; @@ -33,7 +32,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string Metadata = metadata; Usage = usage; TruncationStrategy = truncationStrategy; - Object = @object; + this.Object = @object; ResponseFormat = responseFormat; ToolConstraint = toolConstraint; AllowParallelToolCalls = allowParallelToolCalls; @@ -41,14 +40,13 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string MaxOutputTokenCount = maxOutputTokenCount; } - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction requiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, IDictionary additionalBinaryDataProperties) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; ThreadId = threadId; AssistantId = assistantId; Status = status; - RequiredAction = requiredAction; LastError = lastError; ExpiresAt = expiresAt; StartedAt = startedAt; @@ -63,7 +61,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string Usage = usage; Temperature = temperature; TruncationStrategy = truncationStrategy; - Object = @object; + this.Object = @object; ResponseFormat = responseFormat; ToolConstraint = toolConstraint; NucleusSamplingFactor = nucleusSamplingFactor; @@ -83,8 +81,6 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string public RunStatus Status { get; set; } - public InternalRunRequiredAction RequiredAction { get; set; } - public RunError LastError { get; set; } public DateTimeOffset? ExpiresAt { get; set; } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 39717f3ea..86cc6b821 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -25,15 +25,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ToolChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif writer.WritePropertyName("tool_call_id"u8); writer.WriteStringValue(ToolCallId); } @@ -57,17 +48,12 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, { return null; } - BinaryData content = default; string toolCallId = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - content = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("tool_call_id"u8)) { toolCallId = prop.Value.GetString(); @@ -78,12 +64,22 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolChatMessage(content, toolCallId, role, additionalBinaryDataProperties); + return new ToolChatMessage(toolCallId, role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index 9d23b5d39..ff2c22a1c 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -10,23 +10,18 @@ namespace OpenAI.Chat { public partial class ToolChatMessage : ChatMessage { - public ToolChatMessage(BinaryData content, string toolCallId) + public ToolChatMessage(string toolCallId, Chat.ChatMessageRole role) : base(role) { - Argument.AssertNotNull(content, nameof(content)); Argument.AssertNotNull(toolCallId, nameof(toolCallId)); - Content = content; ToolCallId = toolCallId; } - internal ToolChatMessage(BinaryData content, string toolCallId, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal ToolChatMessage(string toolCallId, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { - Content = content; ToolCallId = toolCallId; } - public BinaryData Content { get; set; } - public string ToolCallId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 088265b9b..2c638f5bb 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -23,13 +23,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolConstraint)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); if (Optional.IsDefined(Function)) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(_objectType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ToolConstraint.cs b/.dotnet/src/Generated/Models/ToolConstraint.cs index 9c208bea9..476132b9e 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.cs @@ -11,18 +11,10 @@ public partial class ToolConstraint { private protected IDictionary _additionalBinaryDataProperties; - public ToolConstraint(InternalAssistantsNamedToolChoiceType @type) + internal ToolConstraint(InternalAssistantsNamedToolChoiceFunction function, string objectType, IDictionary additionalBinaryDataProperties) { - Type = @type; - } - - internal ToolConstraint(InternalAssistantsNamedToolChoiceType @type, InternalAssistantsNamedToolChoiceFunction function, IDictionary additionalBinaryDataProperties) - { - Type = @type; Function = function; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - - public InternalAssistantsNamedToolChoiceType Type { get; set; } } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs index 9bfe0301d..d3fb6ec7f 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeContentPart : ConversationContentPart { - internal UnknownRealtimeContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + internal UnknownRealtimeContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs index fe4296da2..045d1fafe 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs @@ -69,7 +69,7 @@ internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeRespons } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationUpdateKind(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs index 4fe841333..237a5e218 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -58,7 +58,7 @@ internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement e { if (prop.NameEquals("type"u8)) { - kind = ConversationToolKind.DeserializeConversationToolKind(prop.Value, options); + kind = new ConversationToolKind(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs index 87b8a57c9..364693674 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -58,7 +58,7 @@ internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetec { if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetInt32().ToConversationTurnDetectionKind(); + kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index a18b18313..f68ac4c26 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -25,15 +25,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(UserChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif if (Optional.IsDefined(ParticipantName)) { writer.WritePropertyName("name"u8); @@ -60,17 +51,12 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, { return null; } - BinaryData content = default; string participantName = default; Chat.ChatMessageRole role = default; + ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - content = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } if (prop.NameEquals("name"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -86,12 +72,22 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, role = prop.Value.GetInt32().ToChatMessageRole(); continue; } + if (prop.NameEquals("content"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + DeserializeContentValue(prop, ref content); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UserChatMessage(content, participantName, role, additionalBinaryDataProperties); + return new UserChatMessage(participantName, role, content, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index 1c28a187d..b70258d89 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -4,25 +4,18 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Chat { public partial class UserChatMessage : ChatMessage { - public UserChatMessage(BinaryData content) + public UserChatMessage(Chat.ChatMessageRole role) : base(role) { - Argument.AssertNotNull(content, nameof(content)); - - Content = content; } - internal UserChatMessage(BinaryData content, string participantName, Chat.ChatMessageRole role, IDictionary additionalBinaryDataProperties) : base(role, additionalBinaryDataProperties) + internal UserChatMessage(string participantName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { - Content = content; ParticipantName = participantName; } - - public BinaryData Content { get; set; } } } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index f28ce043b..799465cac 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -85,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ExpirationPolicy)) { writer.WritePropertyName("expires_after"u8); @@ -215,7 +215,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea } if (prop.NameEquals("object"u8)) { - @object = InternalVectorStoreObjectObject.DeserializeInternalVectorStoreObjectObject(prop.Value, options); + @object = new InternalVectorStoreObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("expires_after"u8)) diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index b5825722e..dcdf914ca 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -21,7 +21,7 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage Status = status; LastActiveAt = lastActiveAt; Metadata = metadata; - Object = @object; + this.Object = @object; } internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) @@ -35,7 +35,7 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage ExpiresAt = expiresAt; LastActiveAt = lastActiveAt; Metadata = metadata; - Object = @object; + this.Object = @object; ExpirationPolicy = expirationPolicy; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 0872bd35a..5ba11552f 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -31,8 +31,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreBatchFileJob)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("vector_store_id"u8); @@ -43,6 +41,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(BatchId); writer.WritePropertyName("file_counts"u8); writer.WriteObjectValue(FileCounts, options); + writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -79,20 +79,15 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE { return null; } - InternalVectorStoreFileBatchObjectObject @object = default; DateTimeOffset createdAt = default; string vectorStoreId = default; VectorStoreBatchFileJobStatus status = default; string batchId = default; VectorStoreFileCounts fileCounts = default; + object @object = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("object"u8)) - { - @object = new InternalVectorStoreFileBatchObjectObject(prop.Value.GetString()); - continue; - } if (prop.NameEquals("created_at"u8)) { createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -118,18 +113,23 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE fileCounts = VectorStoreFileCounts.DeserializeVectorStoreFileCounts(prop.Value, options); continue; } + if (prop.NameEquals("object"u8)) + { + @object = prop.Value.GetString().ToObject(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new VectorStoreBatchFileJob( - @object, createdAt, vectorStoreId, status, batchId, fileCounts, + @object, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index 115b2235b..c0159bdf1 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -11,7 +11,7 @@ public partial class VectorStoreBatchFileJob { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts) + internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, object @object) { CreatedAt = createdAt; VectorStoreId = vectorStoreId; @@ -20,9 +20,8 @@ internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, FileCounts = fileCounts; } - internal VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, IDictionary additionalBinaryDataProperties) + internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, object @object, IDictionary additionalBinaryDataProperties) { - Object = @object; CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; @@ -31,8 +30,6 @@ internal VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @objec _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalVectorStoreFileBatchObjectObject Object { get; } = "vector_store.files_batch"; - public DateTimeOffset CreatedAt { get; set; } public string VectorStoreId { get; set; } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 9af141b17..996d804f4 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(VectorStoreId); writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J } if (prop.NameEquals("object"u8)) { - @object = InternalDeleteVectorStoreResponseObject.DeserializeInternalDeleteVectorStoreResponseObject(prop.Value, options); + @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 74cf85f83..90a5d3e56 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -15,14 +15,14 @@ internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalD { Deleted = deleted; VectorStoreId = vectorStoreId; - Object = @object; + this.Object = @object; } internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalDeleteVectorStoreResponseObject @object, IDictionary additionalBinaryDataProperties) { Deleted = deleted; VectorStoreId = vectorStoreId; - Object = @object; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index 054cbdfe7..d72f44923 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -28,9 +28,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); } writer.WritePropertyName("anchor"u8); - writer.WriteNumberValue((int)Anchor); + writer.WriteStringValue(_anchor.ToSerialString()); writer.WritePropertyName("days"u8); - writer.WriteNumberValue(Days); + writer.WriteNumberValue(_days); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,7 +74,7 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli { if (prop.NameEquals("anchor"u8)) { - anchor = prop.Value.GetInt32().ToVectorStoreExpirationAnchor(); + anchor = prop.Value.GetString().ToVectorStoreExpirationAnchor(); continue; } if (prop.NameEquals("days"u8)) diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index abe83e18a..c512f1256 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("lastError"u8); } writer.WritePropertyName("object"u8); - writer.WriteObjectValue(Object, options); + writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("id"u8); writer.WriteStringValue(FileId); writer.WritePropertyName("usage_bytes"u8); @@ -131,7 +131,7 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation } if (prop.NameEquals("object"u8)) { - @object = InternalVectorStoreFileObjectObject.DeserializeInternalVectorStoreFileObjectObject(prop.Value, options); + @object = new InternalVectorStoreFileObjectObject(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index cfec2c075..8894024b4 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -17,7 +17,7 @@ internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStore VectorStoreId = vectorStoreId; Status = status; LastError = lastError; - Object = @object; + this.Object = @object; FileId = fileId; Size = size; } @@ -28,7 +28,7 @@ internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStore VectorStoreId = vectorStoreId; Status = status; LastError = lastError; - Object = @object; + this.Object = @object; FileId = fileId; Size = size; ChunkingStrategy = chunkingStrategy; diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index c7e6d3843..3e00bb659 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("expiresAfter"u8); + writer.WriteNull("expirationPolicy"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 634f5a598..f661bb8a9 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -18,7 +18,7 @@ namespace OpenAI { - public static partial class OpenAIModelFactory + internal static partial class OpenAIModelFactory { public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdAt = default, string filename = default, Files.FilePurpose purpose = default, InternalOpenAIFileObject @object = default, int? sizeInBytes = default, Files.FileStatus status = default, string statusDetails = default) { @@ -120,10 +120,10 @@ public static VectorStoreFileAssociationError VectorStoreFileAssociationError(Ve return new VectorStoreFileAssociationError(code, message, null); } - public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails @static = default) + public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails = default) { - return new StaticFileChunkingStrategy(@static, "static", null); + return new StaticFileChunkingStrategy(internalDetails, "static", null); } public static FileChunkingStrategy FileChunkingStrategy(string @type = default) @@ -138,16 +138,16 @@ public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string fileI return new FileFromStoreRemovalResult(fileId, removed, @object, null); } - public static VectorStoreBatchFileJob VectorStoreBatchFileJob(InternalVectorStoreFileBatchObjectObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default, VectorStoreFileCounts fileCounts = default) + public static VectorStoreBatchFileJob VectorStoreBatchFileJob(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default, VectorStoreFileCounts fileCounts = default, object @object = default) { return new VectorStoreBatchFileJob( - @object, createdAt, vectorStoreId, status, batchId, fileCounts, + @object, null); } @@ -205,10 +205,10 @@ public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker return new FileSearchRankingOptions(ranker, scoreThreshold, null); } - public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition function = default) + public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition internalFunction = default) { - return new FunctionToolDefinition(function, "function", null); + return new FunctionToolDefinition(internalFunction, "function", null); } public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable newVectorStores = default) @@ -227,19 +227,19 @@ public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default) + public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, InternalRunRequiredAction internalRequiredAction = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -250,7 +250,6 @@ public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt threadId, assistantId, status, - requiredAction, lastError, expiresAt, startedAt, @@ -272,6 +271,7 @@ public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt allowParallelToolCalls, maxInputTokenCount, maxOutputTokenCount, + internalRequiredAction, null); } @@ -293,9 +293,9 @@ public static RunTokenUsage RunTokenUsage(int outputTokenCount = default, int in return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); } - public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, IDictionary metadata = default, float? temperature = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, RunTruncationStrategy truncationStrategy = default, ToolConstraint toolConstraint = default) + public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable additionalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, IDictionary metadata = default, float? temperature = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, RunTruncationStrategy truncationStrategy = default, ToolConstraint toolConstraint = default) { - internalMessages ??= new ChangeTrackingList(); + additionalMessages ??= new ChangeTrackingList(); toolsOverride ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -306,7 +306,7 @@ public static RunCreationOptions RunCreationOptions(string assistantId = default modelOverride, instructionsOverride, additionalInstructions, - internalMessages?.ToList(), + additionalMessages?.ToList(), allowParallelToolCalls, toolsOverride?.ToList(), metadata, @@ -419,13 +419,12 @@ public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, return new ThreadDeletionResult(deleted, threadId, @object, null); } - public static ConversationSessionOptions ConversationSessionOptions(IEnumerable modalities = default, ConversationVoice? voice = default, string instructions = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, string model = default, RealtimeConversation.ConversationToolChoice toolChoice = default, RealtimeConversation.ConversationMaxTokensChoice maxResponseOutputTokens = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default) + public static ConversationSessionOptions ConversationSessionOptions(ConversationVoice? voice = default, string instructions = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, string model = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default, IEnumerable internalModalities = default, BinaryData internalToolChoice = default, BinaryData maxResponseOutputTokens = default) { - modalities ??= new ChangeTrackingList(); tools ??= new ChangeTrackingList(); + internalModalities ??= new ChangeTrackingList(); return new ConversationSessionOptions( - modalities?.ToList(), voice, instructions, inputAudioFormat, @@ -433,10 +432,11 @@ public static ConversationSessionOptions ConversationSessionOptions(IEnumerable< tools?.ToList(), temperature, model, - toolChoice, - maxResponseOutputTokens, turnDetectionOptions, inputTranscriptionOptions, + internalModalities?.ToList(), + internalToolChoice, + maxResponseOutputTokens, null); } @@ -470,10 +470,10 @@ public static ConversationItem ConversationItem(string @type = default, string i return new UnknownRealtimeRequestItem(new InternalRealtimeRequestItemType(@type), id, null); } - public static ConversationContentPart ConversationContentPart(string @type = default) + public static ConversationContentPart ConversationContentPart(ConversationContentPartKind @type = default) { - return new UnknownRealtimeContentPart(new ConversationContentPartKind(@type), null); + return new UnknownRealtimeContentPart(@type, null); } public static ConversationUpdate ConversationUpdate(string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) @@ -482,16 +482,16 @@ public static ConversationUpdate ConversationUpdate(string eventId = default, Re return new UnknownRealtimeResponseCommand(eventId, kind, null); } - public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession session = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { - return new ConversationSessionStartedUpdate(session, eventId, kind, null); + return new ConversationSessionStartedUpdate(internalSession, eventId, kind, null); } - public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession session = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { - return new ConversationSessionConfiguredUpdate(session, eventId, kind, null); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, null); } public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) @@ -518,10 +518,10 @@ public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(st null); } - public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse response = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { - return new ConversationResponseStartedUpdate(response, eventId, kind, null); + return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, null); } public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) @@ -548,10 +548,10 @@ public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDe return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, null); } - public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse response = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { - return new ConversationResponseFinishedUpdate(response, eventId, kind, null); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, null); } public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) @@ -567,31 +567,31 @@ public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem( return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, null); } - public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { return new ConversationItemStartedUpdate( responseId, outputIndex, - item, + internalItem, eventId, kind, null); } - public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { return new ConversationItemFinishedUpdate( responseId, outputIndex, - item, + internalItem, eventId, kind, null); } - public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart part = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { return new ConversationContentPartStartedUpdate( @@ -599,13 +599,13 @@ public static ConversationContentPartStartedUpdate ConversationContentPartStarte itemId, outputIndex, contentIndex, - part, + internalContentPart, eventId, kind, null); } - public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart part = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) { return new ConversationContentPartFinishedUpdate( @@ -613,7 +613,7 @@ public static ConversationContentPartFinishedUpdate ConversationContentPartFinis itemId, outputIndex, contentIndex, - part, + internalContentPart, eventId, kind, null); @@ -857,7 +857,7 @@ public static MessageDeletionResult MessageDeletionResult(bool deleted = default return new MessageDeletionResult(deleted, messageId, @object, null); } - public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, Images.OpenAI.Images.InternalCreateImageRequestModel? model = default, string prompt = default, long? n = default, string endUserId = default) + public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, InternalCreateImageRequestModel? model = default, string prompt = default, long? n = default, string endUserId = default) { return new ImageGenerationOptions( @@ -872,10 +872,10 @@ public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQualit null); } - public static GeneratedImageCollection GeneratedImageCollection() + public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset createdAt = default) { - return new GeneratedImageCollection(null); + return new GeneratedImageCollection(createdAt, null); } public static GeneratedImage GeneratedImage(string revisedPrompt = default, BinaryData imageBytes = default, Uri imageUri = default) @@ -884,7 +884,7 @@ public static GeneratedImage GeneratedImage(string revisedPrompt = default, Bina return new GeneratedImage(revisedPrompt, imageBytes, imageUri, null); } - public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.InternalCreateImageEditRequestModel? model = default, BinaryData image = default, string prompt = default, BinaryData mask = default, long? n = default, Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) + public static ImageEditOptions ImageEditOptions(InternalCreateImageEditRequestModel? model = default, BinaryData image = default, string prompt = default, BinaryData mask = default, long? n = default, GeneratedImageSize? size = default, GeneratedImageFormat? responseFormat = default, string endUserId = default) { return new ImageEditOptions( @@ -899,7 +899,7 @@ public static ImageEditOptions ImageEditOptions(Images.OpenAI.Images.InternalCre null); } - public static ImageVariationOptions ImageVariationOptions(Images.OpenAI.Images.InternalCreateImageVariationRequestModel? model = default, BinaryData image = default, long? n = default, Images.OpenAI.Images.GeneratedImageSize? size = default, Images.OpenAI.Images.GeneratedImageFormat? responseFormat = default, string endUserId = default) + public static ImageVariationOptions ImageVariationOptions(InternalCreateImageVariationRequestModel? model = default, BinaryData image = default, long? n = default, GeneratedImageSize? size = default, GeneratedImageFormat? responseFormat = default, string endUserId = default) { return new ImageVariationOptions( @@ -924,7 +924,7 @@ public static FileDeletionResult FileDeletionResult(bool deleted = default, stri return new FileDeletionResult(deleted, fileId, @object, null); } - public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, Embeddings.OpenAI.Embeddings.InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, string endUserId = default) + public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, string endUserId = default) { return new EmbeddingGenerationOptions( @@ -966,7 +966,7 @@ public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reason return new ChatOutputTokenUsageDetails(reasoningTokenCount, null); } - public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default) + public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default) { tools ??= new ChangeTrackingList(); messages ??= new ChangeTrackingList(); @@ -978,7 +978,6 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt frequencyPenalty, presencePenalty, responseFormat, - serviceTier, temperature, topP, tools?.ToList(), @@ -999,38 +998,39 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt deprecatedMaxTokens, maxOutputTokenCount, functions?.ToList(), + serviceTier, null); } - public static ChatMessage ChatMessage(Chat.ChatMessageRole role = default) + public static ChatMessage ChatMessage(Chat.ChatMessageRole role = default, ChatMessageContent content = default) { - return new InternalUnknownChatMessage(role, null); + return new InternalUnknownChatMessage(role, content, null); } - public static SystemChatMessage SystemChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) + public static SystemChatMessage SystemChatMessage(string participantName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) { - return new SystemChatMessage(content, participantName, role, null); + return new SystemChatMessage(participantName, role, content, null); } - public static UserChatMessage UserChatMessage(BinaryData content = default, string participantName = default, Chat.ChatMessageRole role = default) + public static UserChatMessage UserChatMessage(string participantName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) { - return new UserChatMessage(content, participantName, role, null); + return new UserChatMessage(participantName, role, content, null); } - public static AssistantChatMessage AssistantChatMessage(BinaryData content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, Chat.ChatMessageRole role = default) + public static AssistantChatMessage AssistantChatMessage(string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) { toolCalls ??= new ChangeTrackingList(); return new AssistantChatMessage( - content, refusal, participantName, toolCalls?.ToList(), functionCall, role, + content, null); } @@ -1046,16 +1046,16 @@ public static ChatFunctionCall ChatFunctionCall(string functionName = default, B return new ChatFunctionCall(functionName, functionArguments, null); } - public static ToolChatMessage ToolChatMessage(BinaryData content = default, string toolCallId = default, Chat.ChatMessageRole role = default) + public static ToolChatMessage ToolChatMessage(string toolCallId = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) { - return new ToolChatMessage(content, toolCallId, role, null); + return new ToolChatMessage(toolCallId, role, content, null); } - public static FunctionChatMessage FunctionChatMessage(string content = default, string functionName = default, Chat.ChatMessageRole role = default) + public static FunctionChatMessage FunctionChatMessage(string functionName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) { - return new FunctionChatMessage(content, functionName, role, null); + return new FunctionChatMessage(functionName, role, content, null); } public static ChatResponseFormat ChatResponseFormat(string @type = default) @@ -1076,7 +1076,7 @@ public static ChatFunction ChatFunction(string functionName = default, string fu return new ChatFunction(functionName, functionDescription, functionParameters, null); } - public static ChatCompletion ChatCompletion(string id = default, string model = default, string systemFingerprint = default, ChatTokenUsage usage = default, InternalCreateChatCompletionResponseObject @object = default, Chat.OpenAI.Chat.InternalCreateChatCompletionResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default) + public static ChatCompletion ChatCompletion(string id = default, string model = default, string systemFingerprint = default, ChatTokenUsage usage = default, InternalCreateChatCompletionResponseObject @object = default, InternalCreateChatCompletionResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default) { choices ??= new ChangeTrackingList(); @@ -1319,7 +1319,7 @@ public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index return new StreamingChatToolCallUpdate(index, function, kind, toolCallId, null); } - public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string model = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, string completionId = default, Chat.OpenAI.Chat.InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default, ChatTokenUsage usage = default) + public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string model = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, string completionId = default, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default, ChatTokenUsage usage = default) { choices ??= new ChangeTrackingList(); From 14dca304ab5768e834675209af26cb3ce960e36a Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 17 Oct 2024 10:09:55 -0700 Subject: [PATCH 08/54] Down to 66 errors! --- .../Assistants/RunTruncationStrategy.cs | 4 +- .../Assistants/ThreadInitializationMessage.cs | 2 +- .../VectorStoreClient.Protocol.cs | 16 +- .../Custom/VectorStores/VectorStoreClient.cs | 24 +- .../Generated/AssistantClient.RestClient.cs | 2 +- ...ternalAssistantMessageClient.RestClient.cs | 2 +- .../InternalAssistantRunClient.RestClient.cs | 4 +- .../Models/Assistant.Serialization.cs | 2 +- .../AssistantChatMessage.Serialization.cs | 2 +- .../Generated/Models/AssistantChatMessage.cs | 6 - .../AssistantCreationOptions.Serialization.cs | 2 +- ...istantModificationOptions.Serialization.cs | 2 +- .../Models/ChatCompletion.Serialization.cs | 4 +- .../ChatCompletionOptions.Serialization.cs | 16 +- .../Generated/Models/ChatCompletionOptions.cs | 1 + .../Models/ChatMessage.Serialization.cs | 2 +- ...okenLogProbabilityDetails.Serialization.cs | 2 +- ...nTopLogProbabilityDetails.Serialization.cs | 2 +- .../Models/ConversationAudioDeltaUpdate.cs | 2 +- .../Models/ConversationAudioDoneUpdate.cs | 2 +- .../Models/ConversationContentPart.cs | 2 + .../ConversationContentPartFinishedUpdate.cs | 4 +- .../ConversationContentPartStartedUpdate.cs | 4 +- .../Models/ConversationErrorUpdate.cs | 4 +- ...rsationFunctionCallArgumentsDeltaUpdate.cs | 2 +- ...ersationFunctionCallArgumentsDoneUpdate.cs | 2 +- .../Models/ConversationFunctionTool.cs | 10 +- ...nversationInputAudioBufferClearedUpdate.cs | 2 +- ...ersationInputAudioBufferCommittedUpdate.cs | 2 +- .../ConversationInputSpeechFinishedUpdate.cs | 2 +- .../ConversationInputSpeechStartedUpdate.cs | 2 +- ...versationInputTranscriptionFailedUpdate.cs | 4 +- ...rsationInputTranscriptionFinishedUpdate.cs | 2 +- .../ConversationItemAcknowledgedUpdate.cs | 2 +- .../Models/ConversationItemDeletedUpdate.cs | 2 +- .../Models/ConversationItemFinishedUpdate.cs | 4 +- .../Models/ConversationItemStartedUpdate.cs | 4 +- .../Models/ConversationItemTruncatedUpdate.cs | 2 +- ...versationOutputTranscriptionDeltaUpdate.cs | 2 +- ...sationOutputTranscriptionFinishedUpdate.cs | 2 +- .../ConversationRateLimitsUpdatedUpdate.cs | 2 +- .../ConversationResponseFinishedUpdate.cs | 4 +- .../ConversationResponseStartedUpdate.cs | 4 +- .../ConversationSessionConfiguredUpdate.cs | 4 +- .../Models/ConversationSessionOptions.cs | 4 + .../ConversationSessionStartedUpdate.cs | 4 +- .../Models/ConversationTextDeltaUpdate.cs | 2 +- .../Models/ConversationTextDoneUpdate.cs | 2 +- ...mbeddingGenerationOptions.Serialization.cs | 4 +- .../Models/FileSearchToolDefinition.cs | 1 + .../FunctionChatMessage.Serialization.cs | 2 +- .../Generated/Models/FunctionChatMessage.cs | 2 +- .../Models/FunctionToolDefinition.cs | 1 + .../Models/ImageEditOptions.Serialization.cs | 12 +- .../ImageGenerationOptions.Serialization.cs | 4 +- .../ImageVariationOptions.Serialization.cs | 12 +- ...nternalBatchRequestOutput.Serialization.cs | 2 +- .../Models/InternalBatchRequestOutput.cs | 2 +- ...letionStreamResponseDelta.Serialization.cs | 4 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- ...CreateThreadAndRunRequest.Serialization.cs | 4 +- ...InternalFileUploadOptions.Serialization.cs | 4 +- ...onRequestAssistantMessage.Serialization.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...ntItemFileObjectImageFile.Serialization.cs | 4 +- ...tImageFileObjectImageFile.Serialization.cs | 4 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...alMessageDeltaObjectDelta.Serialization.cs | 4 +- .../Models/InternalMessageImageFileContent.cs | 4 + .../Models/InternalMessageImageUrlContent.cs | 4 + .../Models/InternalMessageRefusalContent.cs | 2 + .../Models/InternalRealtimeResponseSession.cs | 2 + ...imeServerVadTurnDetection.Serialization.cs | 4 - .../InternalRealtimeServerVadTurnDetection.cs | 2 +- .../InternalRequiredFunctionToolCall.cs | 4 + .../InternalResponseMessageTextContent.cs | 4 + .../Models/InternalRunRequiredAction.cs | 2 + ...alRunStepCodeInterpreterToolCallDetails.cs | 2 + .../Generated/Models/InternalRunStepDelta.cs | 2 + ...rnalRunStepDetailsMessageCreationObject.cs | 2 + ...epDetailsToolCallsCodeOutputImageObject.cs | 2 + .../InternalRunStepFunctionToolCallDetails.cs | 2 + ...nternalUnknownChatMessage.Serialization.cs | 2 +- .../MessageCreationOptions.Serialization.cs | 4 +- .../Models/OpenAIFile.Serialization.cs | 6 +- .../RunCreationOptions.Serialization.cs | 18 +- .../RunTruncationStrategy.Serialization.cs | 4 +- .../Generated/Models/RunTruncationStrategy.cs | 1 + .../SpeechGenerationOptions.Serialization.cs | 4 +- .../Models/StaticFileChunkingStrategy.cs | 1 + ...amingChatCompletionUpdate.Serialization.cs | 4 +- .../Models/SystemChatMessage.Serialization.cs | 6 +- .../src/Generated/Models/SystemChatMessage.cs | 2 +- .../Models/ThreadMessage.Serialization.cs | 4 +- .../Models/ThreadRun.Serialization.cs | 10 +- .dotnet/src/Generated/Models/ThreadRun.cs | 2 + .../Models/ToolChatMessage.Serialization.cs | 2 +- .../src/Generated/Models/ToolChatMessage.cs | 2 +- .../Models/ToolConstraint.Serialization.cs | 2 +- .../src/Generated/Models/ToolConstraint.cs | 1 + .../Generated/Models/UnknownRealtimeTool.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 6 +- .../src/Generated/Models/UserChatMessage.cs | 2 +- .../Models/VectorStoreBatchFileJob.cs | 2 + ...rStoreModificationOptions.Serialization.cs | 2 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 145 +- .../Generated/VectorStoreClient.RestClient.cs | 10 +- .dotnet/src/Generated/VectorStoreClient.cs | 90 +- .dotnet/tspCodeModel.json | 2171 +++++++++-------- package-lock.json | 126 +- package.json | 2 +- 111 files changed, 1639 insertions(+), 1295 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs index d4328f349..01700e9f5 100644 --- a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs +++ b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs @@ -56,7 +56,7 @@ public partial class RunTruncationStrategy /// The default that will eliminate messages in the middle of the thread /// to fit within the context length of the model or the max prompt tokens. /// - public static RunTruncationStrategy Auto { get; } = new(InternalTruncationObjectType.Auto, 0, null); + public static RunTruncationStrategy Auto { get; } = new(0, InternalTruncationObjectType.Auto, null); /// /// Creates a new instance using the last_messages strategy type, @@ -65,6 +65,6 @@ public partial class RunTruncationStrategy /// The count of last messages that the run should evaluate. /// public static RunTruncationStrategy CreateLastMessagesStrategy(int lastMessageCount) - => new(InternalTruncationObjectType.LastMessages, lastMessageCount, null); + => new(lastMessageCount, InternalTruncationObjectType.LastMessages, null); } } diff --git a/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs b/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs index bcae23ac5..9fd846fa7 100644 --- a/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs +++ b/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs @@ -18,7 +18,7 @@ public ThreadInitializationMessage(MessageRole role, IEnumerable } internal ThreadInitializationMessage(MessageCreationOptions baseOptions) - : base(baseOptions.Role, baseOptions.Content, baseOptions.Attachments, baseOptions.Metadata, null) + : base(baseOptions.Attachments, baseOptions.Metadata, baseOptions.Role, baseOptions.Content, null) { } /// diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs index 16077719b..a305bb185 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs @@ -7,22 +7,22 @@ namespace OpenAI.VectorStores; -[CodeGenSuppress("GetVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetVectorStoreFiles", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFiles", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFile", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] -[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileBatch", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] -[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetFilesInVectorStoreBatchesAsync", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetFilesInVectorStoreBatches", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFilesInVectorStoreBatchesAsync", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFilesInVectorStoreBatches", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] public partial class VectorStoreClient { /// diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index 3d2492032..4eac3beb8 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -17,30 +17,30 @@ namespace OpenAI.VectorStores; [CodeGenSuppress("VectorStoreClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateVectorStoreAsync", typeof(VectorStoreCreationOptions))] [CodeGenSuppress("CreateVectorStore", typeof(VectorStoreCreationOptions))] -[CodeGenSuppress("GetVectorStoreAsync", typeof(string))] -[CodeGenSuppress("GetVectorStore", typeof(string))] +[CodeGenSuppress("ListVectorStoreAsync", typeof(string))] +[CodeGenSuppress("ListVectorStore", typeof(string))] [CodeGenSuppress("ModifyVectorStoreAsync", typeof(string), typeof(VectorStoreModificationOptions))] [CodeGenSuppress("ModifyVectorStore", typeof(string), typeof(VectorStoreModificationOptions))] [CodeGenSuppress("DeleteVectorStoreAsync", typeof(string))] [CodeGenSuppress("DeleteVectorStore", typeof(string))] -[CodeGenSuppress("GetVectorStoresAsync", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetVectorStores", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] -[CodeGenSuppress("GetVectorStoreFiles", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListVectorStoresAsync", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStores", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListVectorStoreFiles", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] [CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] [CodeGenSuppress("CreateVectorStoreFile", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] -[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string))] -[CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoreFileAsync", typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoreFile", typeof(string), typeof(string))] [CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string))] [CodeGenSuppress("DeleteVectorStoreFile", typeof(string), typeof(string))] [CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] [CodeGenSuppress("CreateVectorStoreFileBatch", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] -[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string))] -[CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoreFileBatchAsync", typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoreFileBatch", typeof(string), typeof(string))] [CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string))] [CodeGenSuppress("CancelVectorStoreFileBatch", typeof(string), typeof(string))] -[CodeGenSuppress("GetFilesInVectorStoreBatchesAsync", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] -[CodeGenSuppress("GetFilesInVectorStoreBatches", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListFilesInVectorStoreBatchAsync", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListFilesInVectorStoreBatch", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] public partial class VectorStoreClient { // CUSTOM: Added as a convenience. diff --git a/.dotnet/src/Generated/AssistantClient.RestClient.cs b/.dotnet/src/Generated/AssistantClient.RestClient.cs index eba1b3325..187e4c357 100644 --- a/.dotnet/src/Generated/AssistantClient.RestClient.cs +++ b/.dotnet/src/Generated/AssistantClient.RestClient.cs @@ -53,7 +53,7 @@ internal PipelineMessage CreateListAssistantsRequest(int? limit, string order, s } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs index 58ec8f1b6..06df51d73 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -57,7 +57,7 @@ internal PipelineMessage CreateListMessagesRequest(string threadId, int? limit, } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs index 02fcb0e54..746ef561f 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -74,7 +74,7 @@ internal PipelineMessage CreateListRunsRequest(string threadId, int? limit, stri } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { @@ -187,7 +187,7 @@ internal PipelineMessage CreateListRunStepsRequest(string threadId, string runId } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index e92031813..eef42be5c 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -138,7 +138,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("nucleusSamplingFactor"u8); + writer.WriteNull("topP"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 87906e47d..0ba3259df 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -136,7 +136,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index a08fbf6d2..a4f904e3a 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -4,17 +4,11 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - public AssistantChatMessage(Chat.ChatMessageRole role) : base(role) - { - ToolCalls = new ChangeTrackingList(); - } - internal AssistantChatMessage(string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) { Refusal = refusal; diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index a6880ab77..b7afca46f 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -143,7 +143,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("nucleusSamplingFactor"u8); + writer.WriteNull("topP"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index bfc0ba116..3114df161 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -146,7 +146,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("nucleusSamplingFactor"u8); + writer.WriteNull("topP"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 35a5aed03..e4a72568c 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteObjectValue(ServiceTier, options); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { @@ -157,7 +157,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo serviceTier = null; continue; } - serviceTier = Chat.InternalCreateChatCompletionResponseServiceTier?.DeserializeInternalCreateChatCompletionResponseServiceTier(prop.Value, options); + serviceTier = new InternalCreateChatCompletionResponseServiceTier(prop.Value.GetString()); continue; } if (prop.NameEquals("choices"u8)) diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 22afef9d6..6e5dfac4d 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -139,7 +139,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("includeLogProbabilities"u8); + writer.WriteNull("logprobs"u8); } } if (Optional.IsDefined(TopLogProbabilityCount)) @@ -151,7 +151,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("topLogProbabilityCount"u8); + writer.WriteNull("topLogprobs"u8); } } if (Optional.IsCollectionDefined(StopSequences)) @@ -163,7 +163,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("stopSequences"u8); + writer.WriteNull("stop"u8); } } if (Optional.IsCollectionDefined(LogitBiases)) @@ -175,7 +175,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("logitBiases"u8); + writer.WriteNull("logitBias"u8); } } if (Optional.IsDefined(ToolChoice)) @@ -219,7 +219,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("deprecatedMaxTokens"u8); + writer.WriteNull("maxTokens"u8); } } if (Optional.IsDefined(MaxOutputTokenCount)) @@ -231,7 +231,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxOutputTokenCount"u8); + writer.WriteNull("maxCompletionTokens"u8); } } if (Optional.IsCollectionDefined(Functions)) @@ -249,7 +249,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_serviceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteObjectValue(_serviceTier, options); + writer.WriteStringValue(_serviceTier.Value.ToString()); } else { @@ -557,7 +557,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme serviceTier = null; continue; } - serviceTier = Chat.InternalCreateChatCompletionRequestServiceTier?.DeserializeInternalCreateChatCompletionRequestServiceTier(prop.Value, options); + serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index 55f7e3999..e545a63df 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -36,6 +36,7 @@ internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, _deprecatedMaxTokens = deprecatedMaxTokens; MaxOutputTokenCount = maxOutputTokenCount; Functions = functions; + _serviceTier = serviceTier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 280bc3e38..aa83a90ad 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -21,7 +21,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role); + writer.WriteStringValue(Role.ToSerialString()); if (options.Format != "W" && Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 560e9a9b3..0d291c3ad 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("utf8Bytes"u8); + writer.WriteNull("bytes"u8); } writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 34380bee4..510710bc5 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("utf8Bytes"u8); + writer.WriteNull("bytes"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs index 796d0a1d6..482ef3161 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationAudioDeltaUpdate : ConversationUpdate { - internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs index 600dec791..3beea61fa 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationAudioDoneUpdate : ConversationUpdate { - internal ConversationAudioDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationAudioDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioDone) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs index dea0f1515..0e8c6fcbb 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -13,10 +13,12 @@ public abstract partial class ConversationContentPart private protected ConversationContentPart(ConversationContentPartKind @type) { + Type = @type; } internal ConversationContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) { + Type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs index 3673dd649..a877eb379 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs @@ -9,12 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationContentPartFinishedUpdate : ConversationUpdate { - internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ContentPartFinished) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; + _internalContentPart = internalContentPart; } internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) @@ -23,6 +24,7 @@ internal ConversationContentPartFinishedUpdate(string responseId, string itemId, ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; + _internalContentPart = internalContentPart; } public string ResponseId { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs index b4466961d..cba779cb9 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs @@ -9,12 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationContentPartStartedUpdate : ConversationUpdate { - internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ContentPartStarted) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; + _internalContentPart = internalContentPart; } internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) @@ -23,6 +24,7 @@ internal ConversationContentPartStartedUpdate(string responseId, string itemId, ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; + _internalContentPart = internalContentPart; } public string ResponseId { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs index c89ff45bb..226b21c77 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -9,12 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationErrorUpdate : ConversationUpdate { - internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) { + _error = error; } internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { + _error = error; } } } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs index c36eab5ec..5acf62c57 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionCallArgumentsDeltaUpdate : ConversationUpdate { - internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs index 40cd40332..7e2e0a33a 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionCallArgumentsDoneUpdate : ConversationUpdate { - internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs index 4f230d607..52e78c633 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs @@ -4,20 +4,16 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionTool : ConversationTool { - public ConversationFunctionTool(string name, ConversationToolKind kind) : base(kind) - { - Argument.AssertNotNull(name, nameof(name)); - - } - internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { + _name = name; + _description = description; + _parameters = parameters; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs index 1bb62f212..434dde58f 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioBufferClearedUpdate : ConversationUpdate { - internal ConversationInputAudioBufferClearedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputAudioBufferClearedUpdate(string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared) { } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs index af887c80d..8a6b5627f 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioBufferCommittedUpdate : ConversationUpdate { - internal ConversationInputAudioBufferCommittedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputAudioBufferCommittedUpdate(string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index e1fe25d6a..50d57e173 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate { - internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped) { AudioEndMs = audioEndMs; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index c3a098ff8..2c348eb03 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate { - internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted) { AudioStartMs = audioStartMs; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index 0fafabad6..ccad94e28 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -9,16 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed) { ItemId = itemId; ContentIndex = contentIndex; + _error = error; } internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; + _error = error; } public string ItemId { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index 586be2053..32acd272d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs index facf44f3e..99ec26251 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemAcknowledgedUpdate : ConversationUpdate { - internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationItemAcknowledgedUpdate(ConversationItem item, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemAcknowledged) { Item = item; } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index 55512b26d..906bf84e1 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemDeletedUpdate : ConversationUpdate { - internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs index 4b9be0139..fee6085f7 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs @@ -9,16 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemFinishedUpdate : ConversationUpdate { - internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemFinished) { ResponseId = responseId; OutputIndex = outputIndex; + _internalItem = internalItem; } internal ConversationItemFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; + _internalItem = internalItem; } public string ResponseId { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs index e6b659ac6..619142c91 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs @@ -9,16 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStartedUpdate : ConversationUpdate { - internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStarted) { ResponseId = responseId; OutputIndex = outputIndex; + _internalItem = internalItem; } internal ConversationItemStartedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; + _internalItem = internalItem; } public string ResponseId { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index a6565d15c..b3020a861 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemTruncatedUpdate : ConversationUpdate { - internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) { ItemId = itemId; AudioEndMs = audioEndMs; diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs index 5a5ba2f06..21efed398 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTranscriptionDeltaUpdate : ConversationUpdate { - internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs index df4472f1e..69681cbff 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs index 58581bc54..1ea62e661 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitsUpdatedUpdate : ConversationUpdate { - internal ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) { RateLimits = rateLimits.ToList(); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs index 3a52288fe..524f32a41 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -9,12 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseFinishedUpdate : ConversationUpdate { - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) { + _internalResponse = internalResponse; } internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { + _internalResponse = internalResponse; } } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs index 24f2bffc3..da6c59ead 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -9,12 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseStartedUpdate : ConversationUpdate { - internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) { + _internalResponse = internalResponse; } internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { + _internalResponse = internalResponse; } } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs index 6b90814cc..074658106 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -9,12 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionConfiguredUpdate : ConversationUpdate { - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) { + _internalSession = internalSession; } internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { + _internalSession = internalSession; } } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs index 804c6c0fb..40393124f 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -15,6 +15,7 @@ public partial class ConversationSessionOptions public ConversationSessionOptions() { Tools = new ChangeTrackingList(); + _internalModalities = new ChangeTrackingList(); } internal ConversationSessionOptions(ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, string model, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IList internalModalities, BinaryData internalToolChoice, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) @@ -28,6 +29,9 @@ internal ConversationSessionOptions(ConversationVoice? voice, string instruction Model = model; TurnDetectionOptions = turnDetectionOptions; InputTranscriptionOptions = inputTranscriptionOptions; + _internalModalities = internalModalities; + _internalToolChoice = internalToolChoice; + _maxResponseOutputTokens = maxResponseOutputTokens; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs index 5899ccb2f..8d28aead8 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -9,12 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionStartedUpdate : ConversationUpdate { - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) { + _internalSession = internalSession; } internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { + _internalSession = internalSession; } } } diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs index a2dcafeeb..b888ac21a 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTextDeltaUpdate : ConversationUpdate { - internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationTextDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseTextDelta) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs index e1ec73204..7d6092ae5 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTextDoneUpdate : ConversationUpdate { - internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId, RealtimeConversation.ConversationUpdateKind kind) : base(eventId, kind) + internal ConversationTextDoneUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string value, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseTextDone) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 294bf2973..6c41e8763 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(EncodingFormat)) { writer.WritePropertyName("encoding_format"u8); - writer.WriteObjectValue(EncodingFormat, options); + writer.WriteStringValue(EncodingFormat.Value.ToString()); } if (Optional.IsDefined(EndUserId)) { @@ -124,7 +124,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions encodingFormat = null; continue; } - encodingFormat = Embeddings.InternalCreateEmbeddingRequestEncodingFormat?.DeserializeInternalCreateEmbeddingRequestEncodingFormat(prop.Value, options); + encodingFormat = new InternalCreateEmbeddingRequestEncodingFormat(prop.Value.GetString()); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs index 888c57ed8..f94ad38ba 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs @@ -11,6 +11,7 @@ public partial class FileSearchToolDefinition : ToolDefinition { internal FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + _fileSearch = fileSearch; } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 10e16e4cb..16b71240a 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -61,7 +61,7 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index 95e9bbb36..351809176 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class FunctionChatMessage : ChatMessage { - public FunctionChatMessage(string functionName, Chat.ChatMessageRole role) : base(role) + public FunctionChatMessage(string functionName) : base(Chat.ChatMessageRole.Function) { Argument.AssertNotNull(functionName, nameof(functionName)); diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs index 963962467..180cf5b58 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs @@ -12,6 +12,7 @@ public partial class FunctionToolDefinition : ToolDefinition { internal FunctionToolDefinition(InternalFunctionDefinition internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + _internalFunction = internalFunction; } } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index d4c6f39ac..db345d158 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.Value.ToString()); } else { @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteObjectValue(Size, options); + writer.WriteStringValue(Size.Value.ToString()); } else { @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + writer.WriteStringValue(ResponseFormat.Value.ToString()); } else { @@ -143,7 +143,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element model = null; continue; } - model = Images.InternalCreateImageEditRequestModel?.DeserializeInternalCreateImageEditRequestModel(prop.Value, options); + model = new InternalCreateImageEditRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("image"u8)) @@ -183,7 +183,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element size = null; continue; } - size = Images.GeneratedImageSize?.DeserializeGeneratedImageSize(prop.Value, options); + size = new GeneratedImageSize(prop.Value.GetString()); continue; } if (prop.NameEquals("response_format"u8)) @@ -193,7 +193,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element responseFormat = null; continue; } - responseFormat = Images.GeneratedImageFormat?.DeserializeGeneratedImageFormat(prop.Value, options); + responseFormat = new GeneratedImageFormat(prop.Value.GetString()); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index ca3c29e1d..ac2e9861e 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.Value.ToString()); } else { @@ -193,7 +193,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle model = null; continue; } - model = Images.InternalCreateImageRequestModel?.DeserializeInternalCreateImageRequestModel(prop.Value, options); + model = new InternalCreateImageRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("prompt"u8)) diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index a14183eed..3ee3d60d6 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); + writer.WriteStringValue(Model.Value.ToString()); } else { @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Size != null) { writer.WritePropertyName("size"u8); - writer.WriteObjectValue(Size, options); + writer.WriteStringValue(Size.Value.ToString()); } else { @@ -70,7 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ResponseFormat != null) { writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); + writer.WriteStringValue(ResponseFormat.Value.ToString()); } else { @@ -134,7 +134,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme model = null; continue; } - model = Images.InternalCreateImageVariationRequestModel?.DeserializeInternalCreateImageVariationRequestModel(prop.Value, options); + model = new InternalCreateImageVariationRequestModel(prop.Value.GetString()); continue; } if (prop.NameEquals("image"u8)) @@ -159,7 +159,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme size = null; continue; } - size = Images.GeneratedImageSize?.DeserializeGeneratedImageSize(prop.Value, options); + size = new GeneratedImageSize(prop.Value.GetString()); continue; } if (prop.NameEquals("response_format"u8)) @@ -169,7 +169,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme responseFormat = null; continue; } - responseFormat = Images.GeneratedImageFormat?.DeserializeGeneratedImageFormat(prop.Value, options); + responseFormat = new GeneratedImageFormat(prop.Value.GetString()); continue; } if (prop.NameEquals("user"u8)) diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index 9ddfa0f69..a5f923c17 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestOutput)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Id)) + if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs index 986089f85..855f14bae 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs @@ -24,7 +24,7 @@ internal InternalBatchRequestOutput(string id, string customId, InternalBatchReq _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } public string CustomId { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index f95b5ece1..8c7c43777 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -57,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Role)) { writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role.Value); + writer.WriteStringValue(Role.Value.ToSerialString()); } if (Optional.IsDefined(Content)) { @@ -156,7 +156,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha role = null; continue; } - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index e9bf8c3db..b5cb1aad7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (FinishReason != null) { writer.WritePropertyName("finish_reason"u8); - writer.WriteNumberValue((int)FinishReason.Value); + writer.WriteStringValue(FinishReason.Value.ToSerialString()); } else { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 16ce1aa96..695cf4959 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -172,7 +172,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WriteStringValue(Model.ToSerialString()); } else { @@ -407,7 +407,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea model = null; continue; } - model = prop.Value.GetString(); + model = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("tool_resources"u8)) diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index a2768cf93..c800a8068 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif writer.WritePropertyName("purpose"u8); - writer.WriteObjectValue(Purpose, options); + writer.WriteStringValue(Purpose.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -87,7 +87,7 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J } if (prop.NameEquals("purpose"u8)) { - purpose = FileUploadPurpose.DeserializeFileUploadPurpose(prop.Value, options); + purpose = new FileUploadPurpose(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 4a2b121ca..b577d7e5d 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 6d747ac88..0484ef376 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.ToSerialString()); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -91,7 +91,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal detail = null; continue; } - detail = prop.Value.GetString(); + detail = prop.Value.GetString().ToString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index 212e1dddb..f0c30e1e8 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.ToSerialString()); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -91,7 +91,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna detail = null; continue; } - detail = prop.Value.GetString(); + detail = prop.Value.GetString().ToString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index d1cd16c04..d164c1e78 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.ToSerialString()); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -95,7 +95,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI detail = null; continue; } - detail = prop.Value.GetString(); + detail = prop.Value.GetString().ToString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 5ce2257e0..3bd96d738 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail); + writer.WriteStringValue(Detail.ToSerialString()); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -95,7 +95,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt detail = null; continue; } - detail = prop.Value.GetString(); + detail = prop.Value.GetString().ToString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 9c0137a68..df1f58abd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndArray(); } writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role); + writer.WriteStringValue(Role.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -101,7 +101,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO role = null; continue; } - role = prop.Value.GetInt32().ToMessageRole(); + role = prop.Value.GetString().ToMessageRole(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs index eb8c634fb..a1b162815 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs @@ -15,10 +15,14 @@ public InternalMessageImageFileContent(string @type, InternalMessageContentItemF Argument.AssertNotNull(@type, nameof(@type)); Argument.AssertNotNull(imageFile, nameof(imageFile)); + _type = @type; + _imageFile = imageFile; } internal InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { + _type = @type; + _imageFile = imageFile; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs index e7adcb801..cae0a7b33 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs @@ -15,10 +15,14 @@ public InternalMessageImageUrlContent(string @type, InternalMessageContentImageU Argument.AssertNotNull(@type, nameof(@type)); Argument.AssertNotNull(imageUrl, nameof(imageUrl)); + _type = @type; + _imageUrl = imageUrl; } internal InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { + _type = @type; + _imageUrl = imageUrl; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index f6a8bb6e1..ea6e5f516 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -16,11 +16,13 @@ public InternalMessageRefusalContent(string internalRefusal, string @type) Argument.AssertNotNull(@type, nameof(@type)); InternalRefusal = internalRefusal; + _type = @type; } internal InternalMessageRefusalContent(string internalRefusal, string @type, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { InternalRefusal = internalRefusal; + _type = @type; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index d3233c65b..e7958350f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -26,6 +26,7 @@ internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) @@ -43,6 +44,7 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ Tools = tools; ToolChoice = toolChoice; Temperature = temperature; + _maxResponseOutputTokens = maxResponseOutputTokens; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index f6298d0e2..73285b46f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerVadTurnDetection : IJsonModel { - internal InternalRealtimeServerVadTurnDetection() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs index 5aafe5c44..027692616 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerVadTurnDetection : ConversationTurnDetectionOptions { - public InternalRealtimeServerVadTurnDetection(RealtimeConversation.ConversationTurnDetectionKind kind) : base(kind) + public InternalRealtimeServerVadTurnDetection() : base(RealtimeConversation.ConversationTurnDetectionKind.ServerVoiceActivityDetection) { } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index a9e8f4c08..ffedfb2f5 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -14,11 +14,15 @@ internal partial class InternalRequiredFunctionToolCall internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunToolCallObjectFunction internalFunction) { Id = id; + _type = @type; + _internalFunction = internalFunction; } internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunToolCallObjectFunction internalFunction, IDictionary additionalBinaryDataProperties) { Id = id; + _type = @type; + _internalFunction = internalFunction; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs index 7e3f99f2a..85ed12bdd 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs @@ -15,10 +15,14 @@ public InternalResponseMessageTextContent(string @type, InternalMessageContentTe Argument.AssertNotNull(@type, nameof(@type)); Argument.AssertNotNull(text, nameof(text)); + _type = @type; + _text = text; } internal InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { + _type = @type; + _text = text; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index e23b4152e..4ce27d820 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -14,11 +14,13 @@ internal partial class InternalRunRequiredAction internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type) { SubmitToolOutputs = submitToolOutputs; + Type = @type; } internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type, IDictionary additionalBinaryDataProperties) { SubmitToolOutputs = submitToolOutputs; + Type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs index b98ec333f..408343bad 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -12,11 +12,13 @@ internal partial class InternalRunStepCodeInterpreterToolCallDetails : RunStepTo internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base("code_interpreter") { Id = id; + _codeInterpreter = codeInterpreter; } internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; + _codeInterpreter = codeInterpreter; } public string Id { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 04dab9fc6..04a1ae737 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -15,12 +15,14 @@ internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, { Id = id; Delta = delta; + this.Object = @object; } internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, object @object, IDictionary additionalBinaryDataProperties) { Id = id; Delta = delta; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs index 9bd882ba6..f65fa7177 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs @@ -11,10 +11,12 @@ internal partial class InternalRunStepDetailsMessageCreationObject : RunStepDeta { internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) : base("message_creation") { + _messageCreation = messageCreation; } internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + _messageCreation = messageCreation; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs index e295be878..428d5cb91 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs @@ -11,10 +11,12 @@ internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObject : Ru { internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) : base("image") { + _image = image; } internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + _image = image; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs index 6ffe6c231..635240a7a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs @@ -12,11 +12,13 @@ internal partial class InternalRunStepFunctionToolCallDetails : RunStepToolCall internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction) : base("function") { Id = id; + _internalFunction = internalFunction; } internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { Id = id; + _internalFunction = internalFunction; } public string Id { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 8f0f979a7..d03c3f01f 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -52,7 +52,7 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage { if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index 8e5dbf597..e8ab2b7f0 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role); + writer.WriteStringValue(Role.ToSerialString()); writer.WritePropertyName("content"u8); this.SerializeContent(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -151,7 +151,7 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToMessageRole(); + role = prop.Value.GetString().ToMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 646796b25..f2a82e4c0 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -48,10 +48,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("sizeInBytes"u8); + writer.WriteNull("bytes"u8); } writer.WritePropertyName("status"u8); - writer.WriteNumberValue((int)Status); + writer.WriteStringValue(Status.ToSerialString()); if (Optional.IsDefined(StatusDetails)) { writer.WritePropertyName("status_details"u8); @@ -141,7 +141,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade } if (prop.NameEquals("status"u8)) { - status = prop.Value.GetInt32().ToFileStatus(); + status = prop.Value.GetString().ToFileStatus(); continue; } if (prop.NameEquals("status_details"u8)) diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 1382871ef..9f9d131d4 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -58,11 +58,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ModelOverride != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(ModelOverride); + writer.WriteStringValue(ModelOverride.ToSerialString()); } else { - writer.WriteNull("modelOverride"u8); + writer.WriteNull("model"u8); } } if (Optional.IsDefined(InstructionsOverride)) @@ -74,7 +74,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("instructionsOverride"u8); + writer.WriteNull("instructions"u8); } } if (Optional.IsDefined(AdditionalInstructions)) @@ -125,7 +125,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("toolsOverride"u8); + writer.WriteNull("tools"u8); } } if (Optional.IsCollectionDefined(Metadata)) @@ -172,7 +172,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("nucleusSamplingFactor"u8); + writer.WriteNull("topP"u8); } } if (Optional.IsDefined(MaxInputTokenCount)) @@ -184,7 +184,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxInputTokenCount"u8); + writer.WriteNull("maxPromptTokens"u8); } } if (Optional.IsDefined(MaxOutputTokenCount)) @@ -196,7 +196,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxOutputTokenCount"u8); + writer.WriteNull("maxCompletionTokens"u8); } } if (Optional.IsDefined(TruncationStrategy)) @@ -220,7 +220,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("toolConstraint"u8); + writer.WriteNull("toolChoice"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -310,7 +310,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele modelOverride = null; continue; } - modelOverride = prop.Value.GetString(); + modelOverride = prop.Value.GetString().ToString(); continue; } if (prop.NameEquals("instructions"u8)) diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index e4a80fda9..268496b9c 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } writer.WritePropertyName("type"u8); - writer.WriteObjectValue(_type, options); + writer.WriteStringValue(_type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -98,7 +98,7 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme } if (prop.NameEquals("type"u8)) { - @type = InternalTruncationObjectType.DeserializeInternalTruncationObjectType(prop.Value, options); + @type = new InternalTruncationObjectType(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs index 63a6ce1c1..e4afdf2be 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs @@ -14,6 +14,7 @@ public partial class RunTruncationStrategy internal RunTruncationStrategy(int? lastMessages, InternalTruncationObjectType @type, IDictionary additionalBinaryDataProperties) { LastMessages = lastMessages; + _type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index 15d9d08ed..0b4ec4667 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); writer.WritePropertyName("voice"u8); - writer.WriteObjectValue(Voice, options); + writer.WriteStringValue(Voice.ToString()); if (Optional.IsDefined(SpeedRatio)) { writer.WritePropertyName("speed"u8); @@ -109,7 +109,7 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE } if (prop.NameEquals("voice"u8)) { - voice = GeneratedSpeechVoice.DeserializeGeneratedSpeechVoice(prop.Value, options); + voice = new GeneratedSpeechVoice(prop.Value.GetString()); continue; } if (prop.NameEquals("speed"u8)) diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs index 20b08f97e..a77781aab 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs @@ -11,6 +11,7 @@ public partial class StaticFileChunkingStrategy : FileChunkingStrategy { internal StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) { + _internalDetails = internalDetails; } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index ce01653d5..8ba7f69af 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ServiceTier != null) { writer.WritePropertyName("service_tier"u8); - writer.WriteObjectValue(ServiceTier, options); + writer.WriteStringValue(ServiceTier.Value.ToString()); } else { @@ -147,7 +147,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion serviceTier = null; continue; } - serviceTier = Chat.InternalCreateChatCompletionStreamResponseServiceTier?.DeserializeInternalCreateChatCompletionStreamResponseServiceTier(prop.Value, options); + serviceTier = new InternalCreateChatCompletionStreamResponseServiceTier(prop.Value.GetString()); continue; } if (prop.NameEquals("choices"u8)) diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index 840f2f790..a37034801 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Chat { public partial class SystemChatMessage : IJsonModel { - internal SystemChatMessage() - { - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -69,7 +65,7 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index 67b55ea8b..ae86a6216 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class SystemChatMessage : ChatMessage { - public SystemChatMessage(Chat.ChatMessageRole role) : base(role) + public SystemChatMessage() : base(Chat.ChatMessageRole.System) { } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index e64d2a476..c5216d06a 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -114,7 +114,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); writer.WritePropertyName("role"u8); - writer.WriteNumberValue((int)Role); + writer.WriteStringValue(Role.ToSerialString()); if (Attachments != null && Optional.IsCollectionDefined(Attachments)) { writer.WritePropertyName("attachments"u8); @@ -291,7 +291,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToMessageRole(); + role = prop.Value.GetString().ToMessageRole(); continue; } if (prop.NameEquals("attachments"u8)) diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 7d3aac20e..af9540297 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -183,7 +183,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("toolConstraint"u8); + writer.WriteNull("toolChoice"u8); } if (Optional.IsDefined(NucleusSamplingFactor)) { @@ -194,7 +194,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("nucleusSamplingFactor"u8); + writer.WriteNull("topP"u8); } } writer.WritePropertyName("parallel_tool_calls"u8); @@ -206,7 +206,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxInputTokenCount"u8); + writer.WriteNull("maxPromptTokens"u8); } if (MaxOutputTokenCount != null) { @@ -215,7 +215,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("maxOutputTokenCount"u8); + writer.WriteNull("maxCompletionTokens"u8); } if (_internalRequiredAction != null) { @@ -224,7 +224,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("internalRequiredAction"u8); + writer.WriteNull("requiredAction"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 5bacc3478..cf96ae0c6 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -38,6 +38,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string AllowParallelToolCalls = allowParallelToolCalls; MaxInputTokenCount = maxInputTokenCount; MaxOutputTokenCount = maxOutputTokenCount; + _internalRequiredAction = internalRequiredAction; } internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction, IDictionary additionalBinaryDataProperties) @@ -68,6 +69,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string AllowParallelToolCalls = allowParallelToolCalls; MaxInputTokenCount = maxInputTokenCount; MaxOutputTokenCount = maxOutputTokenCount; + _internalRequiredAction = internalRequiredAction; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 86cc6b821..94a63fab5 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -61,7 +61,7 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index ff2c22a1c..770c820f9 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ToolChatMessage : ChatMessage { - public ToolChatMessage(string toolCallId, Chat.ChatMessageRole role) : base(role) + public ToolChatMessage(string toolCallId) : base(Chat.ChatMessageRole.Tool) { Argument.AssertNotNull(toolCallId, nameof(toolCallId)); diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 2c638f5bb..ab0d1336f 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Function, options); } writer.WritePropertyName("type"u8); - writer.WriteStringValue(_objectType); + writer.WriteStringValue(_objectType.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ToolConstraint.cs b/.dotnet/src/Generated/Models/ToolConstraint.cs index 476132b9e..9680e8de4 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.cs @@ -14,6 +14,7 @@ public partial class ToolConstraint internal ToolConstraint(InternalAssistantsNamedToolChoiceFunction function, string objectType, IDictionary additionalBinaryDataProperties) { Function = function; + _objectType = objectType; _additionalBinaryDataProperties = additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs index 253769cb3..83eecfa1d 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeTool : ConversationTool { - internal UnknownRealtimeTool(ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal UnknownRealtimeTool(ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind != default ? kind : "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index f68ac4c26..3f383025d 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Chat { public partial class UserChatMessage : IJsonModel { - internal UserChatMessage() - { - } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -69,7 +65,7 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, } if (prop.NameEquals("role"u8)) { - role = prop.Value.GetInt32().ToChatMessageRole(); + role = prop.Value.GetString().ToChatMessageRole(); continue; } if (prop.NameEquals("content"u8)) diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index b70258d89..cd7988425 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class UserChatMessage : ChatMessage { - public UserChatMessage(Chat.ChatMessageRole role) : base(role) + public UserChatMessage() : base(Chat.ChatMessageRole.User) { } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index c0159bdf1..76c3cffe2 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -18,6 +18,7 @@ internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, Status = status; BatchId = batchId; FileCounts = fileCounts; + this.Object = @object; } internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, object @object, IDictionary additionalBinaryDataProperties) @@ -27,6 +28,7 @@ internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, Status = status; BatchId = batchId; FileCounts = fileCounts; + this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index 3e00bb659..c7e6d3843 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } else { - writer.WriteNull("expirationPolicy"u8); + writer.WriteNull("expiresAfter"u8); } } if (options.Format != "W" && _additionalBinaryDataProperties != null) diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index f661bb8a9..eb75214f0 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -446,10 +446,10 @@ public static ConversationInputTranscriptionOptions ConversationInputTranscripti return new ConversationInputTranscriptionOptions(model, null); } - public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind = default) + public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(int kind = default) { - return new UnknownRealtimeTurnDetection(kind, null); + return new UnknownRealtimeTurnDetection(kind.ToConversationTurnDetectionKind(), null); } public static ConversationTool ConversationTool(ConversationToolKind kind = default) @@ -458,10 +458,10 @@ public static ConversationTool ConversationTool(ConversationToolKind kind = defa return new UnknownRealtimeTool(kind, null); } - public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default, ConversationToolKind kind = default) + public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default) { - return new ConversationFunctionTool(name, description, parameters, kind, null); + return new ConversationFunctionTool(name, description, parameters, ConversationToolKind.Function, null); } public static ConversationItem ConversationItem(string @type = default, string id = default) @@ -476,37 +476,37 @@ public static ConversationContentPart ConversationContentPart(ConversationConten return new UnknownRealtimeContentPart(@type, null); } - public static ConversationUpdate ConversationUpdate(string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationUpdate ConversationUpdate(string eventId = default, int kind = default) { - return new UnknownRealtimeResponseCommand(eventId, kind, null); + return new UnknownRealtimeResponseCommand(eventId, kind.ToConversationUpdateKind(), null); } - public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionStartedUpdate(internalSession, eventId, kind, null); + return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, null); } - public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, null); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, null); } - public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default) { - return new ConversationItemAcknowledgedUpdate(item, eventId, kind, null); + return new ConversationItemAcknowledgedUpdate(item, eventId, RealtimeConversation.ConversationUpdateKind.ItemAcknowledged, null); } - public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default) { - return new ConversationItemDeletedUpdate(itemId, eventId, kind, null); + return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, null); } - public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int audioEndMs = default, int index = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int audioEndMs = default, int index = default, string eventId = default) { return new ConversationItemTruncatedUpdate( @@ -514,14 +514,14 @@ public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(st audioEndMs, index, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ItemTruncated, null); } - public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, null); + return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, null); } public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) @@ -548,17 +548,17 @@ public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDe return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, null); } - public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, null); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, null); } - public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default) { rateLimits ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, kind, null); + return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, null); } public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int limit = default, int remaining = default, float resetSeconds = default) @@ -567,7 +567,7 @@ public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem( return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, null); } - public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) { return new ConversationItemStartedUpdate( @@ -575,11 +575,11 @@ public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string outputIndex, internalItem, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ItemStarted, null); } - public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) { return new ConversationItemFinishedUpdate( @@ -587,11 +587,11 @@ public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(stri outputIndex, internalItem, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ItemFinished, null); } - public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) { return new ConversationContentPartStartedUpdate( @@ -601,11 +601,11 @@ public static ConversationContentPartStartedUpdate ConversationContentPartStarte contentIndex, internalContentPart, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ContentPartStarted, null); } - public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) { return new ConversationContentPartFinishedUpdate( @@ -615,11 +615,11 @@ public static ConversationContentPartFinishedUpdate ConversationContentPartFinis contentIndex, internalContentPart, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ContentPartFinished, null); } - public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default) { return new ConversationAudioDeltaUpdate( @@ -629,24 +629,25 @@ public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string r contentIndex, delta, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta, null); } - public static ConversationAudioDoneUpdate ConversationAudioDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationAudioDoneUpdate ConversationAudioDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) { return new ConversationAudioDoneUpdate( + RealtimeConversation.ConversationUpdateKind.ResponseAudioDone, responseId, itemId, outputIndex, contentIndex, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseAudioDone, null); } - public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) { return new ConversationOutputTranscriptionDeltaUpdate( @@ -656,11 +657,11 @@ public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTrans contentIndex, delta, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta, null); } - public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) { return new ConversationOutputTranscriptionFinishedUpdate( @@ -669,11 +670,11 @@ public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTr outputIndex, contentIndex, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone, null); } - public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) { return new ConversationTextDeltaUpdate( @@ -683,11 +684,11 @@ public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string res contentIndex, delta, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseTextDelta, null); } - public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string value = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string value = default, string eventId = default) { return new ConversationTextDoneUpdate( @@ -697,11 +698,11 @@ public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string respo contentIndex, value, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseTextDone, null); } - public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string delta = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string delta = default, string eventId = default) { return new ConversationFunctionCallArgumentsDeltaUpdate( @@ -711,11 +712,11 @@ public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionC callId, delta, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta, null); } - public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string name = default, string arguments = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string name = default, string arguments = default, string eventId = default) { return new ConversationFunctionCallArgumentsDoneUpdate( @@ -726,23 +727,23 @@ public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCa name, arguments, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone, null); } - public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(int audioStartMs = default, string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(int audioStartMs = default, string itemId = default, string eventId = default) { - return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, kind, null); + return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted, null); } - public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(int audioEndMs = default, string itemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(int audioEndMs = default, string itemId = default, string eventId = default) { - return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, kind, null); + return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped, null); } - public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default) { return new ConversationInputTranscriptionFinishedUpdate( @@ -750,11 +751,11 @@ public static ConversationInputTranscriptionFinishedUpdate ConversationInputTran contentIndex, transcript, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted, null); } - public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeResponseApiError error = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeResponseApiError error = default, string eventId = default) { return new ConversationInputTranscriptionFailedUpdate( @@ -762,26 +763,26 @@ public static ConversationInputTranscriptionFailedUpdate ConversationInputTransc contentIndex, error, eventId, - kind, + RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed, null); } - public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string itemId = default, string previousItemId = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string itemId = default, string previousItemId = default, string eventId = default) { - return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, kind, null); + return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted, null); } - public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = default) { - return new ConversationInputAudioBufferClearedUpdate(eventId, kind, null); + return new ConversationInputAudioBufferClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared, null); } - public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeResponseError error = default, string eventId = default, RealtimeConversation.ConversationUpdateKind kind = default) + public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeResponseError error = default, string eventId = default) { - return new ConversationErrorUpdate(error, eventId, kind, null); + return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, null); } public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default) @@ -1002,25 +1003,25 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt null); } - public static ChatMessage ChatMessage(Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static ChatMessage ChatMessage(int role = default, ChatMessageContent content = default) { - return new InternalUnknownChatMessage(role, content, null); + return new InternalUnknownChatMessage(role.ToChatMessageRole(), content, null); } - public static SystemChatMessage SystemChatMessage(string participantName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static SystemChatMessage SystemChatMessage(string participantName = default, ChatMessageContent content = default) { - return new SystemChatMessage(participantName, role, content, null); + return new SystemChatMessage(participantName, Chat.ChatMessageRole.System, content, null); } - public static UserChatMessage UserChatMessage(string participantName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static UserChatMessage UserChatMessage(string participantName = default, ChatMessageContent content = default) { - return new UserChatMessage(participantName, role, content, null); + return new UserChatMessage(participantName, Chat.ChatMessageRole.User, content, null); } - public static AssistantChatMessage AssistantChatMessage(string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static AssistantChatMessage AssistantChatMessage(string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, ChatMessageContent content = default) { toolCalls ??= new ChangeTrackingList(); @@ -1029,7 +1030,7 @@ public static AssistantChatMessage AssistantChatMessage(string refusal = default participantName, toolCalls?.ToList(), functionCall, - role, + Chat.ChatMessageRole.Assistant, content, null); } @@ -1046,16 +1047,16 @@ public static ChatFunctionCall ChatFunctionCall(string functionName = default, B return new ChatFunctionCall(functionName, functionArguments, null); } - public static ToolChatMessage ToolChatMessage(string toolCallId = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static ToolChatMessage ToolChatMessage(string toolCallId = default, ChatMessageContent content = default) { - return new ToolChatMessage(toolCallId, role, content, null); + return new ToolChatMessage(toolCallId, Chat.ChatMessageRole.Tool, content, null); } - public static FunctionChatMessage FunctionChatMessage(string functionName = default, Chat.ChatMessageRole role = default, ChatMessageContent content = default) + public static FunctionChatMessage FunctionChatMessage(string functionName = default, ChatMessageContent content = default) { - return new FunctionChatMessage(functionName, role, content, null); + return new FunctionChatMessage(functionName, Chat.ChatMessageRole.Function, content, null); } public static ChatResponseFormat ChatResponseFormat(string @type = default) diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs index c1aa262e3..9173d2894 100644 --- a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -35,7 +35,7 @@ internal PipelineMessage CreateListVectorStoresRequest(int? limit, string order, } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { @@ -68,7 +68,7 @@ internal PipelineMessage CreateListVectorStoreFilesRequest(string vectorStoreId, } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { @@ -80,7 +80,7 @@ internal PipelineMessage CreateListVectorStoreFilesRequest(string vectorStoreId, } if (filter != null) { - uri.AppendQuery("filter", TypeFormatters.ConvertToString(filter, null), true); + uri.AppendQuery("filter", filter, true); } request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -107,7 +107,7 @@ internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vectorS } if (order != null) { - uri.AppendQuery("order", TypeFormatters.ConvertToString(order, null), true); + uri.AppendQuery("order", order, true); } if (after != null) { @@ -119,7 +119,7 @@ internal PipelineMessage CreateListFilesInVectorStoreBatchRequest(string vectorS } if (filter != null) { - uri.AppendQuery("filter", TypeFormatters.ConvertToString(filter, null), true); + uri.AppendQuery("filter", filter, true); } request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 3cf6f1afa..caa26e4b5 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -35,18 +35,6 @@ public virtual async Task ListVectorStoresAsync(int? limit, string return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListVectorStores(int? limit, VectorStoreCollectionOrder? order, string after, string before) - { - ClientResult result = ListVectorStores(limit, order.ToString(), after, before, null); - return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListVectorStoresAsync(int? limit, VectorStoreCollectionOrder? order, string after, string before) - { - ClientResult result = await ListVectorStoresAsync(limit, order.ToString(), after, before, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListVectorStoresResponse)result, result.GetRawResponse()); - } - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); @@ -63,72 +51,110 @@ public virtual async Task CreateVectorStoreAsync(BinaryContent con return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual ClientResult GetVectorStore(string vectorStoreId) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); + ClientResult result = this.GetVectorStore(vectorStoreId, null); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); + } + + public virtual async Task> GetVectorStoreAsync(string vectorStoreId) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + ClientResult result = await this.GetVectorStoreAsync(vectorStoreId, null).ConfigureAwait(false); + return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); + } + + public virtual ClientResult GetVectorStoreFile(string vectorStoreId, string fileId, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(fileId, nameof(fileId)); + + using PipelineMessage message = this.CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListVectorStoreFilesAsync(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual async Task GetVectorStoreFileAsync(string vectorStoreId, string fileId, RequestOptions options) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(fileId, nameof(fileId)); - using PipelineMessage message = CreateListVectorStoreFilesRequest(vectorStoreId, limit, order, after, before, filter, options); + using PipelineMessage message = this.CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListVectorStoreFiles(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual ClientResult GetVectorStoreFile(string vectorStoreId, string fileId) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(fileId, nameof(fileId)); - ClientResult result = ListVectorStoreFiles(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null); - return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + ClientResult result = GetVectorStoreFile(vectorStoreId, fileId, null); + return ClientResult.FromValue((VectorStoreFileAssociation)result, result.GetRawResponse()); } - public virtual async Task> ListVectorStoreFilesAsync(string vectorStoreId, int? limit, VectorStoreFileAssociationCollectionOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual async Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(fileId, nameof(fileId)); - ClientResult result = await ListVectorStoreFilesAsync(vectorStoreId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + ClientResult result = await GetVectorStoreFileAsync(vectorStoreId, fileId, null).ConfigureAwait(false); + return ClientResult.FromValue((VectorStoreFileAssociation)result, result.GetRawResponse()); } - public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual ClientResult GetVectorStoreFileBatch(string vectorStoreId, string batchId, RequestOptions options) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(batchId, nameof(batchId)); - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + using PipelineMessage message = this.CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + public virtual async Task GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestOptions options) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(batchId, nameof(batchId)); - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + using PipelineMessage message = this.CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual ClientResult GetVectorStoreFileBatch(string vectorStoreId, string batchId) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + ClientResult result = GetVectorStoreFileBatch(vectorStoreId, batchId, null); + return ClientResult.FromValue((VectorStoreBatchFileJob)result, result.GetRawResponse()); + } + + public virtual async Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(batchId, nameof(batchId)); - ClientResult result = ListFilesInVectorStoreBatch(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null); - return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + ClientResult result = await GetVectorStoreFileBatchAsync(vectorStoreId, batchId, null).ConfigureAwait(false); + return ClientResult.FromValue((VectorStoreBatchFileJob)result, result.GetRawResponse()); } - public virtual async Task> ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, InternalListFilesInVectorStoreBatchRequestOrder? order, string after, string before, VectorStoreFileStatusFilter? filter) + public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNull(batchId, nameof(batchId)); - ClientResult result = await ListFilesInVectorStoreBatchAsync(vectorStoreId, batchId, limit, order.ToString(), after, before, filter.ToString(), null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListVectorStoreFilesResponse)result, result.GetRawResponse()); + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + public virtual async Task ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + Argument.AssertNotNull(batchId, nameof(batchId)); + + using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } } } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index 459999278..3f6ba448b 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -3866,7 +3866,6 @@ "enumType": { "$ref": "426" }, - "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", "decorators": [] } ], @@ -3906,7 +3905,6 @@ "decorators": [] } ], - "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", "isFixed": false, "isFlags": false, "usage": "Input,Output,Json", @@ -3940,7 +3938,6 @@ "enumType": { "$ref": "434" }, - "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", "decorators": [] }, { @@ -3958,7 +3955,6 @@ "enumType": { "$ref": "434" }, - "description": "Specifies that the model should call no tools whatsoever.", "decorators": [] }, { @@ -3976,11 +3972,9 @@ "enumType": { "$ref": "434" }, - "description": "Specifies that the model should call at least one tool.", "decorators": [] } ], - "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", "isFixed": false, "isFlags": false, "usage": "Input,Output,Json", @@ -11324,7 +11318,6 @@ } ], "access": "public", - "description": "The role of the author of a message", "isFixed": true, "isFlags": false, "usage": "Input,Output", @@ -11345,7 +11338,6 @@ "kind": "property", "name": "filename", "serializedName": "filename", - "description": "The name of the file to upload.", "type": { "$id": "1249", "kind": "string", @@ -11356,6 +11348,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" }, @@ -11364,13 +11357,13 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", "type": { "$ref": "2" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" }, @@ -11379,7 +11372,6 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", - "description": "The number of bytes in the file you are uploading.", "type": { "$id": "1252", "kind": "int32", @@ -11390,6 +11382,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" }, @@ -11398,7 +11391,6 @@ "kind": "property", "name": "mime_type", "serializedName": "mime_type", - "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", "type": { "$id": "1254", "kind": "string", @@ -11409,6 +11401,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" } @@ -11420,7 +11413,6 @@ "name": "Upload", "crossLanguageDefinitionId": "OpenAI.Upload", "usage": "Output,Json", - "description": "The Upload object can accept byte chunks in the form of Parts.", "decorators": [], "properties": [ { @@ -11428,7 +11420,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The Upload unique identifier, which can be referenced in API endpoints.", "type": { "$id": "1257", "kind": "string", @@ -11439,6 +11430,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.id" }, @@ -11447,7 +11439,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", "type": { "$id": "1259", "kind": "utcDateTime", @@ -11466,6 +11457,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.created_at" }, @@ -11474,7 +11466,6 @@ "kind": "property", "name": "filename", "serializedName": "filename", - "description": "The name of the file to be uploaded.", "type": { "$id": "1262", "kind": "string", @@ -11485,6 +11476,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.filename" }, @@ -11493,7 +11485,6 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", - "description": "The intended number of bytes to be uploaded.", "type": { "$id": "1264", "kind": "int32", @@ -11504,6 +11495,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.bytes" }, @@ -11512,7 +11504,6 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", - "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", "type": { "$id": "1266", "kind": "string", @@ -11523,6 +11514,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.purpose" }, @@ -11531,13 +11523,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the Upload.", "type": { "$ref": "12" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.status" }, @@ -11546,7 +11538,6 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", "type": { "$id": "1269", "kind": "utcDateTime", @@ -11565,6 +11556,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" }, @@ -11573,7 +11565,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"upload\".", "type": { "$id": "1272", "kind": "constant", @@ -11586,6 +11577,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.object" }, @@ -11594,7 +11586,6 @@ "kind": "property", "name": "file", "serializedName": "file", - "description": "The ready File object after the Upload is completed.", "type": { "$id": "1274", "kind": "nullable", @@ -11604,7 +11595,6 @@ "name": "OpenAIFile", "crossLanguageDefinitionId": "OpenAI.OpenAIFile", "usage": "Output,Json", - "description": "The `File` object represents a document that has been uploaded to OpenAI.", "decorators": [], "properties": [ { @@ -11612,7 +11602,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The file identifier, which can be referenced in the API endpoints.", "type": { "$id": "1277", "kind": "string", @@ -11623,6 +11612,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" }, @@ -11631,7 +11621,6 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", - "description": "The size of the file, in bytes.", "type": { "$id": "1279", "kind": "nullable", @@ -11646,6 +11635,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" }, @@ -11654,7 +11644,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the file was created.", "type": { "$id": "1282", "kind": "utcDateTime", @@ -11673,6 +11662,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" }, @@ -11681,7 +11671,6 @@ "kind": "property", "name": "filename", "serializedName": "filename", - "description": "The name of the file.", "type": { "$id": "1285", "kind": "string", @@ -11692,6 +11681,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" }, @@ -11700,7 +11690,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `file`.", "type": { "$id": "1287", "kind": "constant", @@ -11713,6 +11702,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" }, @@ -11721,13 +11711,13 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", - "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", "type": { "$ref": "28" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" }, @@ -11736,13 +11726,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", "type": { "$ref": "44" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" }, @@ -11751,7 +11741,6 @@ "kind": "property", "name": "status_details", "serializedName": "status_details", - "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", "type": { "$id": "1291", "kind": "string", @@ -11762,6 +11751,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" } @@ -11771,6 +11761,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Upload.file" } @@ -11819,6 +11810,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Error.code" }, @@ -11837,6 +11829,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Error.message" }, @@ -11859,6 +11852,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Error.param" }, @@ -11877,6 +11871,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Error.type" } @@ -11885,6 +11880,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" } @@ -11906,7 +11902,6 @@ "kind": "property", "name": "data", "serializedName": "data", - "description": "The chunk of bytes for this Part.", "type": { "$id": "1307", "kind": "bytes", @@ -11918,6 +11913,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" } @@ -11929,7 +11925,6 @@ "name": "UploadPart", "crossLanguageDefinitionId": "OpenAI.UploadPart", "usage": "Output,Json", - "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", "decorators": [], "properties": [ { @@ -11937,7 +11932,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The upload Part unique identifier, which can be referenced in API endpoints.", "type": { "$id": "1310", "kind": "string", @@ -11948,6 +11942,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UploadPart.id" }, @@ -11956,7 +11951,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Part was created.", "type": { "$id": "1312", "kind": "utcDateTime", @@ -11975,6 +11969,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" }, @@ -11983,7 +11978,6 @@ "kind": "property", "name": "upload_id", "serializedName": "upload_id", - "description": "The ID of the Upload object that this Part was added to.", "type": { "$id": "1315", "kind": "string", @@ -11994,6 +11988,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" }, @@ -12002,7 +11997,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `upload.part`.", "type": { "$id": "1317", "kind": "constant", @@ -12015,6 +12009,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UploadPart.object" } @@ -12033,7 +12028,6 @@ "kind": "property", "name": "part_ids", "serializedName": "part_ids", - "description": "The ordered list of Part IDs.", "type": { "$id": "1320", "kind": "array", @@ -12051,6 +12045,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" }, @@ -12059,7 +12054,6 @@ "kind": "property", "name": "md5", "serializedName": "md5", - "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", "type": { "$id": "1323", "kind": "string", @@ -12070,6 +12064,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" } @@ -12100,6 +12095,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" }, @@ -12118,7 +12114,6 @@ "name": "VectorStoreObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", "usage": "Output,Json", - "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", "decorators": [], "properties": [ { @@ -12126,7 +12121,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1331", "kind": "string", @@ -12137,6 +12131,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" }, @@ -12145,7 +12140,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `vector_store`.", "type": { "$id": "1333", "kind": "constant", @@ -12158,6 +12152,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" }, @@ -12166,7 +12161,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store was created.", "type": { "$id": "1335", "kind": "utcDateTime", @@ -12185,6 +12179,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" }, @@ -12193,7 +12188,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the vector store.", "type": { "$id": "1338", "kind": "string", @@ -12204,6 +12198,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" }, @@ -12212,7 +12207,6 @@ "kind": "property", "name": "usage_bytes", "serializedName": "usage_bytes", - "description": "The total number of bytes used by the files in the vector store.", "type": { "$id": "1340", "kind": "int32", @@ -12223,6 +12217,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" }, @@ -12244,7 +12239,6 @@ "kind": "property", "name": "in_progress", "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", "type": { "$id": "1344", "kind": "int32", @@ -12255,6 +12249,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" }, @@ -12263,7 +12258,6 @@ "kind": "property", "name": "completed", "serializedName": "completed", - "description": "The number of files that have been successfully processed.", "type": { "$id": "1346", "kind": "int32", @@ -12274,6 +12268,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" }, @@ -12282,7 +12277,6 @@ "kind": "property", "name": "failed", "serializedName": "failed", - "description": "The number of files that have failed to process.", "type": { "$id": "1348", "kind": "int32", @@ -12293,6 +12287,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" }, @@ -12301,7 +12296,6 @@ "kind": "property", "name": "cancelled", "serializedName": "cancelled", - "description": "The number of files that were cancelled.", "type": { "$id": "1350", "kind": "int32", @@ -12312,6 +12306,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" }, @@ -12320,7 +12315,6 @@ "kind": "property", "name": "total", "serializedName": "total", - "description": "The total number of files.", "type": { "$id": "1352", "kind": "int32", @@ -12331,6 +12325,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" } @@ -12339,6 +12334,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" }, @@ -12347,13 +12343,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", "type": { "$ref": "67" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" }, @@ -12368,7 +12364,6 @@ "name": "VectorStoreExpirationAfter", "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", "usage": "Input,Output,Json", - "description": "The expiration policy for a vector store.", "decorators": [], "properties": [ { @@ -12376,7 +12371,6 @@ "kind": "property", "name": "anchor", "serializedName": "anchor", - "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", "type": { "$id": "1357", "kind": "constant", @@ -12389,6 +12383,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" }, @@ -12397,7 +12392,6 @@ "kind": "property", "name": "days", "serializedName": "days", - "description": "The number of days after the anchor time that the vector store will expire.", "type": { "$id": "1359", "kind": "int32", @@ -12408,6 +12402,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" } @@ -12416,6 +12411,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" }, @@ -12424,7 +12420,6 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the vector store will expire.", "type": { "$id": "1361", "kind": "nullable", @@ -12447,6 +12442,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" }, @@ -12455,7 +12451,6 @@ "kind": "property", "name": "last_active_at", "serializedName": "last_active_at", - "description": "The Unix timestamp (in seconds) for when the vector store was last active.", "type": { "$id": "1365", "kind": "nullable", @@ -12478,6 +12473,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" }, @@ -12486,7 +12482,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1369", "kind": "nullable", @@ -12513,6 +12508,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" } @@ -12524,6 +12520,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" }, @@ -12542,6 +12539,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" }, @@ -12560,6 +12558,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" }, @@ -12578,6 +12577,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" } @@ -12605,7 +12605,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1381", "kind": "array", @@ -12623,6 +12622,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" }, @@ -12631,7 +12631,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the vector store.", "type": { "$id": "1384", "kind": "string", @@ -12642,6 +12641,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" }, @@ -12656,6 +12656,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" }, @@ -12664,7 +12665,6 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", "type": { "$id": "1387", "kind": "union", @@ -12676,7 +12676,6 @@ "name": "AutoChunkingStrategyRequestParam", "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", "usage": "Input,Json", - "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", "discriminatorValue": "auto", "decorators": [], "baseModel": { @@ -12701,6 +12700,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" }, @@ -12731,7 +12731,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `static`.", "type": { "$id": "1395", "kind": "constant", @@ -12748,6 +12747,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" }, @@ -12769,7 +12769,6 @@ "kind": "property", "name": "max_chunk_size_tokens", "serializedName": "max_chunk_size_tokens", - "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", "type": { "$id": "1400", "kind": "int32", @@ -12780,6 +12779,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" }, @@ -12788,7 +12788,6 @@ "kind": "property", "name": "chunk_overlap_tokens", "serializedName": "chunk_overlap_tokens", - "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", "type": { "$id": "1402", "kind": "int32", @@ -12799,6 +12798,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" } @@ -12807,6 +12807,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" } @@ -12820,7 +12821,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `auto`.", "type": { "$id": "1404", "kind": "constant", @@ -12837,6 +12837,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" } @@ -12851,6 +12852,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" }, @@ -12859,7 +12861,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1407", "kind": "nullable", @@ -12886,6 +12887,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" } @@ -12916,7 +12918,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the vector store.", "type": { "$id": "1413", "kind": "nullable", @@ -12931,6 +12932,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" }, @@ -12949,6 +12951,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" }, @@ -12957,7 +12960,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1418", "kind": "nullable", @@ -12984,6 +12986,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" } @@ -13012,6 +13015,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" }, @@ -13030,6 +13034,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" }, @@ -13050,6 +13055,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" } @@ -13080,6 +13086,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" }, @@ -13098,7 +13105,6 @@ "name": "VectorStoreFileObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", "usage": "Output,Json", - "description": "A list of files attached to a vector store.", "decorators": [], "properties": [ { @@ -13106,7 +13112,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1436", "kind": "string", @@ -13117,6 +13122,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" }, @@ -13125,7 +13131,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `vector_store.file`.", "type": { "$id": "1438", "kind": "constant", @@ -13138,6 +13143,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" }, @@ -13146,7 +13152,6 @@ "kind": "property", "name": "usage_bytes", "serializedName": "usage_bytes", - "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", "type": { "$id": "1440", "kind": "int32", @@ -13157,6 +13162,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" }, @@ -13165,7 +13171,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store file was created.", "type": { "$id": "1442", "kind": "utcDateTime", @@ -13184,6 +13189,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" }, @@ -13192,7 +13198,6 @@ "kind": "property", "name": "vector_store_id", "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", "type": { "$id": "1445", "kind": "string", @@ -13203,6 +13208,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" }, @@ -13211,13 +13217,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", "type": { "$ref": "103" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" }, @@ -13226,7 +13232,6 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", - "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", "type": { "$id": "1448", "kind": "nullable", @@ -13243,13 +13248,13 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", "type": { "$ref": "113" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" }, @@ -13258,7 +13263,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable description of the error.", "type": { "$id": "1452", "kind": "string", @@ -13269,6 +13273,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" } @@ -13278,6 +13283,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" }, @@ -13286,7 +13292,6 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", - "description": "The strategy used to chunk the file.", "type": { "$id": "1454", "kind": "union", @@ -13323,6 +13328,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" }, @@ -13342,7 +13348,6 @@ "name": "OtherChunkingStrategyResponseParam", "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", "usage": "Input,Output,Json", - "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", "discriminatorValue": "other", "decorators": [], "baseModel": { @@ -13354,7 +13359,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `other`.", "type": { "$id": "1462", "kind": "constant", @@ -13371,6 +13375,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" } @@ -13410,6 +13415,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" } @@ -13423,7 +13429,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `static`.", "type": { "$id": "1469", "kind": "constant", @@ -13440,6 +13445,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" }, @@ -13454,6 +13460,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" } @@ -13468,6 +13475,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" } @@ -13479,6 +13487,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" }, @@ -13497,6 +13506,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" }, @@ -13515,6 +13525,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" }, @@ -13533,6 +13544,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" } @@ -13569,7 +13581,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1480", "kind": "string", @@ -13580,6 +13591,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" }, @@ -13605,6 +13617,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" } @@ -13633,6 +13646,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" }, @@ -13651,6 +13665,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" }, @@ -13671,6 +13686,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" } @@ -13689,7 +13705,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1492", "kind": "array", @@ -13707,6 +13722,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" }, @@ -13732,6 +13748,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" } @@ -13743,7 +13760,6 @@ "name": "VectorStoreFileBatchObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", "usage": "Output,Json", - "description": "A batch of files attached to a vector store.", "decorators": [], "properties": [ { @@ -13751,7 +13767,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1498", "kind": "string", @@ -13762,6 +13777,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" }, @@ -13770,7 +13786,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `vector_store.file_batch`.", "type": { "$id": "1500", "kind": "constant", @@ -13783,6 +13798,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" }, @@ -13791,7 +13807,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", "type": { "$id": "1502", "kind": "utcDateTime", @@ -13810,6 +13825,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" }, @@ -13818,7 +13834,6 @@ "kind": "property", "name": "vector_store_id", "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", "type": { "$id": "1505", "kind": "string", @@ -13829,6 +13844,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" }, @@ -13837,13 +13853,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", "type": { "$ref": "127" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" }, @@ -13865,7 +13881,6 @@ "kind": "property", "name": "in_progress", "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", "type": { "$id": "1510", "kind": "int32", @@ -13876,6 +13891,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" }, @@ -13884,7 +13900,6 @@ "kind": "property", "name": "completed", "serializedName": "completed", - "description": "The number of files that have been processed.", "type": { "$id": "1512", "kind": "int32", @@ -13895,6 +13910,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" }, @@ -13903,7 +13919,6 @@ "kind": "property", "name": "failed", "serializedName": "failed", - "description": "The number of files that have failed to process.", "type": { "$id": "1514", "kind": "int32", @@ -13914,6 +13929,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" }, @@ -13922,7 +13938,6 @@ "kind": "property", "name": "cancelled", "serializedName": "cancelled", - "description": "The number of files that where cancelled.", "type": { "$id": "1516", "kind": "int32", @@ -13933,6 +13948,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" }, @@ -13941,7 +13957,6 @@ "kind": "property", "name": "total", "serializedName": "total", - "description": "The total number of files.", "type": { "$id": "1518", "kind": "int32", @@ -13952,6 +13967,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" } @@ -13960,6 +13976,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" } @@ -13981,7 +13998,6 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", "type": { "$id": "1521", "kind": "string", @@ -13992,6 +14008,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" }, @@ -14000,7 +14017,6 @@ "kind": "property", "name": "thread", "serializedName": "thread", - "description": "If no thread is provided, an empty thread will be created.", "type": { "$id": "1523", "kind": "model", @@ -14014,7 +14030,6 @@ "kind": "property", "name": "messages", "serializedName": "messages", - "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", "type": { "$id": "1525", "kind": "array", @@ -14032,13 +14047,13 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", "type": { "$ref": "143" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" }, @@ -14058,7 +14073,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContent", "access": "public", "usage": "Input,Output,Json", - "description": "Represents a single piece of content in an Assistants API message.", "decorators": [], "properties": [] }, @@ -14068,6 +14082,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" }, @@ -14076,7 +14091,6 @@ "kind": "property", "name": "attachments", "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they should be added to.", "type": { "$id": "1532", "kind": "nullable", @@ -14097,7 +14111,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", "type": { "$id": "1536", "kind": "string", @@ -14108,6 +14121,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" }, @@ -14116,7 +14130,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "The tools to add this file to.", "type": { "$id": "1538", "kind": "array", @@ -14156,6 +14169,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" }, @@ -14186,7 +14200,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool being defined: `file_search`", "type": { "$id": "1547", "kind": "constant", @@ -14203,6 +14216,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" }, @@ -14211,7 +14225,6 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", - "description": "Overrides for the file search tool.", "type": { "$id": "1550", "kind": "model", @@ -14225,7 +14238,6 @@ "kind": "property", "name": "max_num_results", "serializedName": "max_num_results", - "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "type": { "$id": "1552", "kind": "int32", @@ -14236,6 +14248,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" }, @@ -14250,7 +14263,6 @@ "name": "FileSearchRankingOptions", "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", "usage": "Input,Output,Json", - "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "decorators": [], "properties": [ { @@ -14258,13 +14270,13 @@ "kind": "property", "name": "ranker", "serializedName": "ranker", - "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", "type": { "$ref": "149" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" }, @@ -14273,7 +14285,6 @@ "kind": "property", "name": "score_threshold", "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", "type": { "$id": "1557", "kind": "float32", @@ -14284,6 +14295,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" } @@ -14292,6 +14304,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" } @@ -14300,6 +14313,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" } @@ -14322,7 +14336,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool being defined: `function`", "type": { "$id": "1560", "kind": "constant", @@ -14339,6 +14352,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" }, @@ -14360,7 +14374,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", "type": { "$id": "1565", "kind": "string", @@ -14371,6 +14384,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" }, @@ -14379,7 +14393,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "1567", "kind": "string", @@ -14390,6 +14403,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" }, @@ -14404,7 +14418,6 @@ "name": "FunctionParameters", "crossLanguageDefinitionId": "OpenAI.FunctionParameters", "usage": "Input,Output,Json", - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", "decorators": [], "additionalProperties": { "$id": "1570", @@ -14418,6 +14431,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" }, @@ -14426,7 +14440,6 @@ "kind": "property", "name": "strict", "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", "type": { "$id": "1572", "kind": "nullable", @@ -14441,6 +14454,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" } @@ -14449,6 +14463,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" } @@ -14462,7 +14477,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool being defined: `code_interpreter`", "type": { "$id": "1575", "kind": "constant", @@ -14479,6 +14493,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" } @@ -14497,7 +14512,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool being defined: `file_search`", "type": { "$id": "1579", "kind": "constant", @@ -14510,6 +14524,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" } @@ -14524,6 +14539,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" } @@ -14536,6 +14552,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" }, @@ -14544,7 +14561,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1581", "kind": "nullable", @@ -14571,6 +14587,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" } @@ -14582,6 +14599,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" }, @@ -14590,7 +14608,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "1586", "kind": "nullable", @@ -14620,7 +14637,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "1591", "kind": "array", @@ -14638,6 +14654,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" } @@ -14646,6 +14663,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" }, @@ -14667,7 +14685,6 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", "type": { "$id": "1596", "kind": "array", @@ -14685,6 +14702,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" }, @@ -14693,7 +14711,6 @@ "kind": "property", "name": "vector_stores", "serializedName": "vector_stores", - "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", "type": { "$id": "1599", "kind": "array", @@ -14711,7 +14728,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", "type": { "$id": "1602", "kind": "array", @@ -14729,6 +14745,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" }, @@ -14737,7 +14754,6 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", "type": { "$id": "1605", "kind": "union", @@ -14755,6 +14771,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" }, @@ -14763,7 +14780,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1607", "kind": "dict", @@ -14786,6 +14802,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" } @@ -14797,6 +14814,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" } @@ -14805,6 +14823,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" } @@ -14814,6 +14833,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" }, @@ -14822,7 +14842,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1611", "kind": "nullable", @@ -14849,6 +14868,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" } @@ -14857,6 +14877,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" }, @@ -14865,7 +14886,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", "type": { "$id": "1616", "kind": "nullable", @@ -14876,6 +14896,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" }, @@ -14884,7 +14905,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1618", "kind": "nullable", @@ -14899,6 +14919,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" }, @@ -14907,7 +14928,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1621", "kind": "nullable", @@ -14925,6 +14945,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" }, @@ -14933,7 +14954,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "1624", "kind": "nullable", @@ -14963,7 +14983,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "1629", "kind": "array", @@ -14981,6 +15000,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" } @@ -14989,6 +15009,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" }, @@ -15010,7 +15031,6 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", "type": { "$id": "1634", "kind": "array", @@ -15028,6 +15048,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" } @@ -15036,6 +15057,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" } @@ -15045,6 +15067,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" }, @@ -15053,7 +15076,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1637", "kind": "nullable", @@ -15080,6 +15102,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" }, @@ -15088,7 +15111,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "1642", "kind": "nullable", @@ -15103,6 +15125,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" }, @@ -15111,7 +15134,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "1645", "kind": "nullable", @@ -15126,6 +15148,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" }, @@ -15134,7 +15157,6 @@ "kind": "property", "name": "stream", "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1648", "kind": "nullable", @@ -15149,6 +15171,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" }, @@ -15157,7 +15180,6 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1651", "kind": "nullable", @@ -15172,6 +15194,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" }, @@ -15180,7 +15203,6 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1654", "kind": "nullable", @@ -15195,6 +15217,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" }, @@ -15212,7 +15235,6 @@ "name": "TruncationObject", "crossLanguageDefinitionId": "OpenAI.TruncationObject", "usage": "Input,Output,Json", - "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", "decorators": [], "properties": [ { @@ -15220,13 +15242,13 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", "type": { "$ref": "206" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" }, @@ -15235,7 +15257,6 @@ "kind": "property", "name": "last_messages", "serializedName": "last_messages", - "description": "The number of most recent messages from the thread when constructing the context for the run.", "type": { "$id": "1661", "kind": "nullable", @@ -15250,6 +15271,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" } @@ -15259,6 +15281,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" }, @@ -15284,7 +15307,6 @@ "name": "AssistantsNamedToolChoice", "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", "usage": "Input,Output,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", "decorators": [], "properties": [ { @@ -15292,13 +15314,13 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the tool. If type is `function`, the function name must be set", "type": { "$ref": "220" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" }, @@ -15320,7 +15342,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "1671", "kind": "string", @@ -15331,6 +15352,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" } @@ -15339,6 +15361,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" } @@ -15351,6 +15374,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" }, @@ -15369,6 +15393,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" }, @@ -15428,6 +15453,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" }, @@ -15458,7 +15484,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_object`", "type": { "$id": "1686", "kind": "constant", @@ -15475,6 +15500,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" } @@ -15497,7 +15523,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", "type": { "$id": "1690", "kind": "constant", @@ -15514,6 +15539,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" }, @@ -15535,7 +15561,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", "type": { "$id": "1695", "kind": "string", @@ -15546,6 +15571,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" }, @@ -15554,7 +15580,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "1697", "kind": "string", @@ -15565,6 +15590,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" }, @@ -15579,7 +15605,6 @@ "name": "ResponseFormatJsonSchemaSchema", "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", "usage": "Input,Output,Json", - "description": "The schema for the response format, described as a JSON Schema object.", "decorators": [], "additionalProperties": { "$id": "1700", @@ -15593,6 +15618,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" }, @@ -15601,7 +15627,6 @@ "kind": "property", "name": "strict", "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", "type": { "$id": "1702", "kind": "nullable", @@ -15616,6 +15641,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" } @@ -15624,6 +15650,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" } @@ -15637,7 +15664,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `text`", "type": { "$id": "1705", "kind": "constant", @@ -15654,6 +15680,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" } @@ -15672,6 +15699,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" } @@ -15770,7 +15798,6 @@ "name": "RunObject", "crossLanguageDefinitionId": "OpenAI.RunObject", "usage": "Output,Json", - "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", "decorators": [], "properties": [ { @@ -15778,7 +15805,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1709", "kind": "string", @@ -15789,6 +15815,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.id" }, @@ -15797,7 +15824,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread.run`.", "type": { "$id": "1711", "kind": "constant", @@ -15810,6 +15836,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.object" }, @@ -15818,7 +15845,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run was created.", "type": { "$id": "1713", "kind": "utcDateTime", @@ -15837,6 +15863,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" }, @@ -15845,7 +15872,6 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", "type": { "$id": "1716", "kind": "string", @@ -15856,6 +15882,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" }, @@ -15864,7 +15891,6 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", "type": { "$id": "1718", "kind": "string", @@ -15875,6 +15901,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" }, @@ -15883,13 +15910,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", "type": { "$ref": "231" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.status" }, @@ -15898,7 +15925,6 @@ "kind": "property", "name": "required_action", "serializedName": "required_action", - "description": "Details on the action required to continue the run. Will be `null` if no action is required.", "type": { "$id": "1721", "kind": "nullable", @@ -15915,7 +15941,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "For now, this is always `submit_tool_outputs`.", "type": { "$id": "1724", "kind": "constant", @@ -15928,6 +15953,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" }, @@ -15936,7 +15962,6 @@ "kind": "property", "name": "submit_tool_outputs", "serializedName": "submit_tool_outputs", - "description": "Details on the tool outputs needed for this run to continue.", "type": { "$id": "1726", "kind": "model", @@ -15950,7 +15975,6 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", - "description": "A list of the relevant tool calls.", "type": { "$id": "1728", "kind": "array", @@ -15961,7 +15985,6 @@ "name": "RunToolCallObject", "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", "usage": "Output,Json", - "description": "Tool call objects", "decorators": [], "properties": [ { @@ -15969,7 +15992,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", "type": { "$id": "1731", "kind": "string", @@ -15980,6 +16002,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" }, @@ -15988,7 +16011,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call the output is required for. For now, this is always `function`.", "type": { "$id": "1733", "kind": "constant", @@ -16001,6 +16023,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" }, @@ -16009,7 +16032,6 @@ "kind": "property", "name": "function", "serializedName": "function", - "description": "The function definition.", "type": { "$id": "1735", "kind": "model", @@ -16023,7 +16045,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function.", "type": { "$id": "1737", "kind": "string", @@ -16034,6 +16055,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" }, @@ -16042,7 +16064,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments that the model expects you to pass to the function.", "type": { "$id": "1739", "kind": "string", @@ -16053,6 +16074,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" } @@ -16061,6 +16083,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" } @@ -16072,6 +16095,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" } @@ -16080,6 +16104,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" } @@ -16089,6 +16114,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" }, @@ -16097,7 +16123,6 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", - "description": "The last error associated with this run. Will be `null` if there are no errors.", "type": { "$id": "1741", "kind": "nullable", @@ -16114,13 +16139,13 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", "type": { "$ref": "257" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" }, @@ -16129,7 +16154,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable description of the error.", "type": { "$id": "1745", "kind": "string", @@ -16140,6 +16164,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" } @@ -16149,6 +16174,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" }, @@ -16157,7 +16183,6 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the run will expire.", "type": { "$id": "1747", "kind": "nullable", @@ -16180,6 +16205,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" }, @@ -16188,7 +16214,6 @@ "kind": "property", "name": "started_at", "serializedName": "started_at", - "description": "The Unix timestamp (in seconds) for when the run was started.", "type": { "$id": "1751", "kind": "nullable", @@ -16211,6 +16236,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" }, @@ -16219,7 +16245,6 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run was cancelled.", "type": { "$id": "1755", "kind": "nullable", @@ -16242,6 +16267,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" }, @@ -16250,7 +16276,6 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run failed.", "type": { "$id": "1759", "kind": "nullable", @@ -16273,6 +16298,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" }, @@ -16281,7 +16307,6 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run was completed.", "type": { "$id": "1763", "kind": "nullable", @@ -16304,6 +16329,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" }, @@ -16312,7 +16338,6 @@ "kind": "property", "name": "incomplete_details", "serializedName": "incomplete_details", - "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", "type": { "$id": "1767", "kind": "nullable", @@ -16329,13 +16354,13 @@ "kind": "property", "name": "reason", "serializedName": "reason", - "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", "type": { "$ref": "265" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" } @@ -16345,6 +16370,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" }, @@ -16353,7 +16379,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1771", "kind": "string", @@ -16364,6 +16389,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.model" }, @@ -16372,7 +16398,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1773", "kind": "string", @@ -16383,6 +16408,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" }, @@ -16391,7 +16417,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1775", "kind": "array", @@ -16405,6 +16430,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.tools" }, @@ -16413,7 +16439,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1777", "kind": "nullable", @@ -16440,6 +16465,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" }, @@ -16457,7 +16483,6 @@ "name": "RunCompletionUsage", "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", "usage": "Output,Json", - "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", "decorators": [], "properties": [ { @@ -16465,7 +16490,6 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run.", "type": { "$id": "1785", "kind": "int32", @@ -16476,6 +16500,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" }, @@ -16484,7 +16509,6 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run.", "type": { "$id": "1787", "kind": "int32", @@ -16495,6 +16519,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" }, @@ -16503,7 +16528,6 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", "type": { "$id": "1789", "kind": "int32", @@ -16514,6 +16538,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" } @@ -16523,6 +16548,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.usage" }, @@ -16531,7 +16557,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "The sampling temperature used for this run. If not set, defaults to 1.", "type": { "$id": "1791", "kind": "nullable", @@ -16546,6 +16571,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" }, @@ -16554,7 +16580,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", "type": { "$id": "1794", "kind": "nullable", @@ -16569,6 +16594,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" }, @@ -16577,7 +16603,6 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", "type": { "$id": "1797", "kind": "nullable", @@ -16592,6 +16617,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" }, @@ -16600,7 +16626,6 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens specified to have been used over the course of the run.", "type": { "$id": "1800", "kind": "nullable", @@ -16615,6 +16640,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" }, @@ -16633,6 +16659,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" }, @@ -16662,6 +16689,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" }, @@ -16680,6 +16708,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" }, @@ -16725,6 +16754,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" } @@ -16764,7 +16794,6 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", "type": { "$id": "1816", "kind": "string", @@ -16775,6 +16804,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" }, @@ -16783,7 +16813,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", "type": { "$id": "1818", "kind": "nullable", @@ -16794,6 +16823,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" }, @@ -16802,7 +16832,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1820", "kind": "nullable", @@ -16817,6 +16846,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" }, @@ -16825,7 +16855,6 @@ "kind": "property", "name": "additional_instructions", "serializedName": "additional_instructions", - "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", "type": { "$id": "1823", "kind": "nullable", @@ -16840,6 +16869,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" }, @@ -16848,7 +16878,6 @@ "kind": "property", "name": "additional_messages", "serializedName": "additional_messages", - "description": "Adds additional messages to the thread before creating the run.", "type": { "$id": "1826", "kind": "nullable", @@ -16866,6 +16895,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" }, @@ -16874,7 +16904,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1829", "kind": "nullable", @@ -16892,6 +16921,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" }, @@ -16900,7 +16930,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1832", "kind": "nullable", @@ -16927,6 +16956,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" }, @@ -16935,7 +16965,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "1837", "kind": "nullable", @@ -16950,6 +16979,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" }, @@ -16958,7 +16988,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "1840", "kind": "nullable", @@ -16973,6 +17002,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" }, @@ -16981,7 +17011,6 @@ "kind": "property", "name": "stream", "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1843", "kind": "nullable", @@ -16996,6 +17025,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" }, @@ -17004,7 +17034,6 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1846", "kind": "nullable", @@ -17019,6 +17048,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" }, @@ -17027,7 +17057,6 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1849", "kind": "nullable", @@ -17042,6 +17071,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" }, @@ -17060,6 +17090,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" }, @@ -17089,6 +17120,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" }, @@ -17107,6 +17139,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" }, @@ -17152,6 +17185,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" } @@ -17182,6 +17216,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" }, @@ -17203,6 +17238,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" }, @@ -17221,6 +17257,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" }, @@ -17239,6 +17276,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" }, @@ -17257,6 +17295,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" } @@ -17275,7 +17314,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1876", "kind": "nullable", @@ -17302,6 +17340,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" } @@ -17320,7 +17359,6 @@ "kind": "property", "name": "tool_outputs", "serializedName": "tool_outputs", - "description": "A list of tools for which the outputs are being submitted.", "type": { "$id": "1882", "kind": "array", @@ -17338,7 +17376,6 @@ "kind": "property", "name": "tool_call_id", "serializedName": "tool_call_id", - "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", "type": { "$id": "1885", "kind": "string", @@ -17349,6 +17386,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" }, @@ -17357,7 +17395,6 @@ "kind": "property", "name": "output", "serializedName": "output", - "description": "The output of the tool call to be submitted to continue the run.", "type": { "$id": "1887", "kind": "string", @@ -17368,6 +17405,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" } @@ -17379,6 +17417,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" }, @@ -17387,7 +17426,6 @@ "kind": "property", "name": "stream", "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1889", "kind": "nullable", @@ -17402,6 +17440,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" } @@ -17435,6 +17474,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" }, @@ -17453,7 +17493,6 @@ "name": "RunStepObject", "crossLanguageDefinitionId": "OpenAI.RunStepObject", "usage": "Output,Json", - "description": "Represents a step in execution of a run.", "decorators": [], "properties": [ { @@ -17461,7 +17500,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", "type": { "$id": "1898", "kind": "string", @@ -17472,6 +17510,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" }, @@ -17480,7 +17519,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread.run.step`.", "type": { "$id": "1900", "kind": "constant", @@ -17493,6 +17531,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" }, @@ -17501,7 +17540,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run step was created.", "type": { "$id": "1902", "kind": "utcDateTime", @@ -17520,6 +17558,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" }, @@ -17528,7 +17567,6 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", "type": { "$id": "1905", "kind": "string", @@ -17539,6 +17577,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" }, @@ -17547,7 +17586,6 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "type": { "$id": "1907", "kind": "string", @@ -17558,6 +17596,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" }, @@ -17566,7 +17605,6 @@ "kind": "property", "name": "run_id", "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", "type": { "$id": "1909", "kind": "string", @@ -17577,6 +17615,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" }, @@ -17585,13 +17624,13 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", "type": { "$ref": "340" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" }, @@ -17600,13 +17639,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", "type": { "$ref": "346" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" }, @@ -17615,21 +17654,18 @@ "kind": "property", "name": "step_details", "serializedName": "step_details", - "description": "The details of the run step.", "type": { "$id": "1913", "kind": "model", "name": "RunStepObjectStepDetails", "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", "usage": "Output,Json", - "description": "Abstractly represents a run step details object.", "decorators": [], "discriminatorProperty": { "$id": "1914", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "1915", "kind": "string", @@ -17640,6 +17676,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" }, @@ -17656,7 +17693,6 @@ "name": "RunStepDetailsMessageCreationObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", "usage": "Output,Json", - "description": "Details of the message creation by the run step.", "discriminatorValue": "message_creation", "decorators": [], "baseModel": { @@ -17668,7 +17704,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `message_creation`.", "type": { "$id": "1919", "kind": "constant", @@ -17685,6 +17720,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" }, @@ -17706,7 +17742,6 @@ "kind": "property", "name": "message_id", "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", "type": { "$id": "1924", "kind": "string", @@ -17717,6 +17752,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" } @@ -17725,6 +17761,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" } @@ -17736,7 +17773,6 @@ "name": "RunStepDetailsToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", "usage": "Output,Json", - "description": "Details of the tool call.", "discriminatorValue": "tool_calls", "decorators": [], "baseModel": { @@ -17748,7 +17784,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `tool_calls`.", "type": { "$id": "1927", "kind": "constant", @@ -17765,6 +17800,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" }, @@ -17773,7 +17809,6 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "1930", "kind": "array", @@ -17784,14 +17819,12 @@ "name": "RunStepDetailsToolCallsObjectToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details inner object.", "decorators": [], "discriminatorProperty": { "$id": "1932", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "1933", "kind": "string", @@ -17802,6 +17835,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" }, @@ -17818,7 +17852,6 @@ "name": "RunStepDetailsToolCallsCodeObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", "usage": "Output,Json", - "description": "Details of the Code Interpreter tool call the run step was involved in.", "discriminatorValue": "code_interpreter", "decorators": [], "baseModel": { @@ -17830,7 +17863,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call.", "type": { "$id": "1937", "kind": "string", @@ -17841,6 +17873,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" }, @@ -17849,7 +17882,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", "type": { "$id": "1939", "kind": "constant", @@ -17866,6 +17898,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" }, @@ -17874,7 +17907,6 @@ "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", "type": { "$id": "1942", "kind": "model", @@ -17888,7 +17920,6 @@ "kind": "property", "name": "input", "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", "type": { "$id": "1944", "kind": "string", @@ -17899,6 +17930,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" }, @@ -17907,7 +17939,6 @@ "kind": "property", "name": "outputs", "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", "type": { "$id": "1946", "kind": "array", @@ -17918,14 +17949,12 @@ "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details code interpreter output.", "decorators": [], "discriminatorProperty": { "$id": "1948", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "1949", "kind": "string", @@ -17936,6 +17965,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" }, @@ -17952,7 +17982,6 @@ "name": "RunStepDetailsToolCallsCodeOutputLogsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", "usage": "Output,Json", - "description": "Text output from the Code Interpreter tool call as part of a run step.", "discriminatorValue": "logs", "decorators": [], "baseModel": { @@ -17964,7 +17993,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `logs`.", "type": { "$id": "1953", "kind": "constant", @@ -17981,6 +18009,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" }, @@ -17989,7 +18018,6 @@ "kind": "property", "name": "logs", "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", "type": { "$id": "1956", "kind": "string", @@ -18000,6 +18028,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" } @@ -18022,7 +18051,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `image`.", "type": { "$id": "1959", "kind": "constant", @@ -18039,6 +18067,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" }, @@ -18060,7 +18089,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", "type": { "$id": "1964", "kind": "string", @@ -18071,6 +18099,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" } @@ -18079,6 +18108,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" } @@ -18092,6 +18122,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" } @@ -18100,6 +18131,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" } @@ -18122,7 +18154,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call object.", "type": { "$id": "1967", "kind": "string", @@ -18133,6 +18164,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" }, @@ -18141,7 +18173,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", "type": { "$id": "1969", "kind": "constant", @@ -18158,6 +18189,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" }, @@ -18166,7 +18198,6 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", "type": { "$id": "1972", "kind": "model", @@ -18186,7 +18217,6 @@ "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", "usage": "Output,Json", - "description": "The ranking options for the file search.", "decorators": [], "properties": [ { @@ -18194,7 +18224,6 @@ "kind": "property", "name": "ranker", "serializedName": "ranker", - "description": "The ranker used for the file search.", "type": { "$id": "1976", "kind": "constant", @@ -18207,6 +18236,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" }, @@ -18215,7 +18245,6 @@ "kind": "property", "name": "score_threshold", "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", "type": { "$id": "1978", "kind": "float32", @@ -18226,6 +18255,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" } @@ -18234,6 +18264,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" }, @@ -18242,7 +18273,6 @@ "kind": "property", "name": "results", "serializedName": "results", - "description": "The results of the file search.", "type": { "$id": "1980", "kind": "array", @@ -18253,7 +18283,6 @@ "name": "RunStepDetailsToolCallsFileSearchResultObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", "usage": "Output,Json", - "description": "A result instance of the file search.", "decorators": [], "properties": [ { @@ -18261,7 +18290,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the file that result was found in.", "type": { "$id": "1983", "kind": "string", @@ -18272,6 +18300,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" }, @@ -18280,7 +18309,6 @@ "kind": "property", "name": "file_name", "serializedName": "file_name", - "description": "The name of the file that result was found in.", "type": { "$id": "1985", "kind": "string", @@ -18291,6 +18319,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" }, @@ -18299,7 +18328,6 @@ "kind": "property", "name": "score", "serializedName": "score", - "description": "The score of the result. All values must be a floating point number between 0 and 1.", "type": { "$id": "1987", "kind": "float32", @@ -18310,6 +18338,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" }, @@ -18318,7 +18347,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", "type": { "$id": "1989", "kind": "array", @@ -18336,7 +18364,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the content.", "type": { "$id": "1992", "kind": "constant", @@ -18349,6 +18376,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" }, @@ -18357,7 +18385,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text content of the file.", "type": { "$id": "1994", "kind": "string", @@ -18368,6 +18395,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" } @@ -18379,6 +18407,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" } @@ -18390,6 +18419,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" } @@ -18398,6 +18428,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" } @@ -18420,7 +18451,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call object.", "type": { "$id": "1997", "kind": "string", @@ -18431,6 +18461,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" }, @@ -18439,7 +18470,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", "type": { "$id": "1999", "kind": "constant", @@ -18456,6 +18486,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" }, @@ -18464,7 +18495,6 @@ "kind": "property", "name": "function", "serializedName": "function", - "description": "The definition of the function that was called.", "type": { "$id": "2002", "kind": "model", @@ -18478,7 +18508,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function.", "type": { "$id": "2004", "kind": "string", @@ -18489,6 +18518,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" }, @@ -18497,7 +18527,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments passed to the function.", "type": { "$id": "2006", "kind": "string", @@ -18508,6 +18537,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" }, @@ -18516,7 +18546,6 @@ "kind": "property", "name": "output", "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", "type": { "$id": "2008", "kind": "nullable", @@ -18531,6 +18560,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" } @@ -18539,6 +18569,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" } @@ -18552,6 +18583,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" } @@ -18562,6 +18594,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" }, @@ -18570,7 +18603,6 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", - "description": "The last error associated with this run step. Will be `null` if there are no errors.", "type": { "$id": "2011", "kind": "nullable", @@ -18587,13 +18619,13 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", "type": { "$ref": "364" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" }, @@ -18602,7 +18634,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable description of the error.", "type": { "$id": "2015", "kind": "string", @@ -18613,6 +18644,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" } @@ -18622,6 +18654,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" }, @@ -18630,7 +18663,6 @@ "kind": "property", "name": "expired_at", "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", "type": { "$id": "2017", "kind": "nullable", @@ -18653,6 +18685,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" }, @@ -18661,7 +18694,6 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", "type": { "$id": "2021", "kind": "nullable", @@ -18684,6 +18716,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" }, @@ -18692,7 +18725,6 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run step failed.", "type": { "$id": "2025", "kind": "nullable", @@ -18715,6 +18747,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" }, @@ -18723,7 +18756,6 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run step completed.", "type": { "$id": "2029", "kind": "nullable", @@ -18746,6 +18778,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" }, @@ -18754,7 +18787,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2033", "kind": "nullable", @@ -18781,6 +18813,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" }, @@ -18798,7 +18831,6 @@ "name": "RunStepCompletionUsage", "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", "usage": "Output,Json", - "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", "decorators": [], "properties": [ { @@ -18806,7 +18838,6 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run step.", "type": { "$id": "2041", "kind": "int32", @@ -18817,6 +18848,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" }, @@ -18825,7 +18857,6 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run step.", "type": { "$id": "2043", "kind": "int32", @@ -18836,6 +18867,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" }, @@ -18844,7 +18876,6 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", "type": { "$id": "2045", "kind": "int32", @@ -18855,6 +18886,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" } @@ -18864,6 +18896,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" } @@ -18875,6 +18908,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" }, @@ -18893,6 +18927,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" }, @@ -18911,6 +18946,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" }, @@ -18929,6 +18965,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" } @@ -19003,7 +19040,6 @@ "name": "ThreadObject", "crossLanguageDefinitionId": "OpenAI.ThreadObject", "usage": "Output,Json", - "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", "decorators": [], "properties": [ { @@ -19011,7 +19047,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "2054", "kind": "string", @@ -19022,6 +19057,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" }, @@ -19030,7 +19066,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread`.", "type": { "$id": "2056", "kind": "constant", @@ -19043,6 +19078,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" }, @@ -19051,7 +19087,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the thread was created.", "type": { "$id": "2058", "kind": "utcDateTime", @@ -19070,6 +19105,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" }, @@ -19078,7 +19114,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "2061", "kind": "nullable", @@ -19108,7 +19143,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "2066", "kind": "array", @@ -19126,6 +19160,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" } @@ -19134,6 +19169,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" }, @@ -19155,7 +19191,6 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", "type": { "$id": "2071", "kind": "array", @@ -19173,6 +19208,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" } @@ -19181,6 +19217,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" } @@ -19190,6 +19227,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" }, @@ -19198,7 +19236,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2074", "kind": "nullable", @@ -19225,6 +19262,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" } @@ -19252,7 +19290,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "2080", "kind": "nullable", @@ -19282,7 +19319,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "2085", "kind": "array", @@ -19300,6 +19336,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" } @@ -19308,6 +19345,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" }, @@ -19322,6 +19360,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" } @@ -19331,6 +19370,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" }, @@ -19339,7 +19379,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2089", "kind": "nullable", @@ -19366,6 +19405,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" } @@ -19400,6 +19440,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" }, @@ -19418,6 +19459,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" }, @@ -19438,6 +19480,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" } @@ -19449,7 +19492,6 @@ "name": "RealtimeRequestCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", "usage": "Input,Json", - "description": "A base representation for messages sent by the client to the service.", "decorators": [], "discriminatorProperty": { "$id": "2101", @@ -19462,6 +19504,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" }, @@ -19484,6 +19527,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" } @@ -19523,6 +19567,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" }, @@ -19550,6 +19595,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" }, @@ -19571,6 +19617,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" }, @@ -19585,6 +19632,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" }, @@ -19603,6 +19651,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" }, @@ -19617,6 +19666,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" }, @@ -19631,6 +19681,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" }, @@ -19658,6 +19709,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" } @@ -19666,6 +19718,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" }, @@ -19692,6 +19745,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" }, @@ -19735,6 +19789,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" }, @@ -19753,6 +19808,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" }, @@ -19779,6 +19835,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" }, @@ -19805,6 +19862,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" } @@ -19815,6 +19873,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" }, @@ -19833,7 +19892,6 @@ "name": "RealtimeTool", "crossLanguageDefinitionId": "OpenAI.RealtimeTool", "usage": "Input,Output,Json", - "description": "The base representation of a realtime tool definition.", "decorators": [], "discriminatorProperty": { "$id": "2141", @@ -19846,6 +19904,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" }, @@ -19862,7 +19921,6 @@ "name": "RealtimeFunctionTool", "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", "usage": "Input,Output,Json", - "description": "The definition of a function tool as used by the realtime endpoint.", "discriminatorValue": "function", "decorators": [], "baseModel": { @@ -19890,6 +19948,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" }, @@ -19908,6 +19967,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" }, @@ -19926,6 +19986,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" }, @@ -19944,6 +20005,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" } @@ -19957,6 +20019,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" }, @@ -19979,7 +20042,6 @@ "name": "RealtimeToolChoiceObject", "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", "usage": "Input,Output,Json", - "description": "A base representation for a realtime tool_choice selecting a named tool.", "decorators": [], "discriminatorProperty": { "$id": "2156", @@ -19992,6 +20054,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" }, @@ -20008,7 +20071,6 @@ "name": "RealtimeToolChoiceFunctionObject", "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", "usage": "Input,Output,Json", - "description": "The representation of a realtime tool_choice selecting a named function tool.", "discriminatorValue": "function", "decorators": [], "baseModel": { @@ -20026,6 +20088,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" }, @@ -20057,6 +20120,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" } @@ -20065,6 +20129,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" } @@ -20078,6 +20143,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" }, @@ -20096,6 +20162,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" }, @@ -20135,6 +20202,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" } @@ -20143,6 +20211,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" } @@ -20181,6 +20250,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" }, @@ -20200,6 +20270,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" } @@ -20238,6 +20309,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" } @@ -20276,6 +20348,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" } @@ -20314,6 +20387,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" }, @@ -20332,6 +20406,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" }, @@ -20358,6 +20433,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" }, @@ -20380,6 +20456,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" } @@ -20405,6 +20482,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" }, @@ -20433,6 +20511,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" }, @@ -20450,6 +20529,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" } @@ -20489,6 +20569,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" }, @@ -20527,6 +20608,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" }, @@ -20573,6 +20655,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" }, @@ -20591,6 +20674,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" } @@ -20629,6 +20713,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" }, @@ -20647,6 +20732,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" } @@ -20685,6 +20771,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" }, @@ -20707,6 +20794,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" } @@ -20736,6 +20824,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" }, @@ -20754,6 +20843,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" } @@ -20765,6 +20855,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" } @@ -20803,6 +20894,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" }, @@ -20835,6 +20927,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" } @@ -20873,6 +20966,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" }, @@ -20894,6 +20988,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" } @@ -20934,6 +21029,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" }, @@ -20952,6 +21048,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" }, @@ -20970,6 +21067,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" }, @@ -20988,6 +21086,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" }, @@ -21002,6 +21101,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" } @@ -21040,6 +21140,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" }, @@ -21058,6 +21159,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" }, @@ -21076,6 +21178,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" } @@ -21086,6 +21189,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" } @@ -21124,6 +21228,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" }, @@ -21142,6 +21247,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" } @@ -21180,6 +21286,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" }, @@ -21198,6 +21305,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" }, @@ -21216,6 +21324,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" }, @@ -21234,6 +21343,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" } @@ -21245,7 +21355,6 @@ "name": "RealtimeRequestResponseCreateCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", "usage": "Input,Json", - "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", "discriminatorValue": "response.create", "decorators": [], "baseModel": { @@ -21273,6 +21382,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" }, @@ -21304,6 +21414,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" }, @@ -21322,6 +21433,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" }, @@ -21343,6 +21455,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" }, @@ -21364,6 +21477,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" }, @@ -21382,6 +21496,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" }, @@ -21403,6 +21518,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" }, @@ -21417,6 +21533,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" }, @@ -21435,6 +21552,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" }, @@ -21478,6 +21596,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" }, @@ -21499,6 +21618,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" }, @@ -21524,6 +21644,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" }, @@ -21538,6 +21659,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" } @@ -21546,6 +21668,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" } @@ -21584,6 +21707,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" } @@ -21690,7 +21814,6 @@ "name": "RealtimeResponseCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", "usage": "Output,Json", - "description": "Base representation of a WebSocket message received from the service.", "decorators": [], "discriminatorProperty": { "$id": "2323", @@ -21703,6 +21826,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" }, @@ -21729,6 +21853,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" } @@ -21768,6 +21893,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" }, @@ -21801,6 +21927,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" }, @@ -21819,6 +21946,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" }, @@ -21837,6 +21965,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" }, @@ -21858,6 +21987,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" }, @@ -21876,6 +22006,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" }, @@ -21890,6 +22021,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" }, @@ -21904,6 +22036,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" }, @@ -21918,6 +22051,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" }, @@ -21936,6 +22070,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" }, @@ -21950,6 +22085,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" }, @@ -21971,6 +22107,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" }, @@ -21996,6 +22133,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" }, @@ -22014,6 +22152,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" }, @@ -22036,6 +22175,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" } @@ -22044,6 +22184,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" } @@ -22082,6 +22223,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" }, @@ -22096,6 +22238,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" } @@ -22134,6 +22277,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" }, @@ -22160,6 +22304,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" }, @@ -22181,6 +22326,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" }, @@ -22206,6 +22352,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" } @@ -22235,6 +22382,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" }, @@ -22249,6 +22397,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" }, @@ -22270,6 +22419,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" }, @@ -22284,6 +22434,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" } @@ -22312,6 +22463,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" }, @@ -22330,6 +22482,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" }, @@ -22348,6 +22501,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" }, @@ -22366,6 +22520,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" }, @@ -22380,6 +22535,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" } @@ -22408,6 +22564,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" }, @@ -22426,6 +22583,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" }, @@ -22444,6 +22602,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" } @@ -22454,6 +22613,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" } @@ -22492,6 +22652,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" }, @@ -22510,6 +22671,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" } @@ -22548,6 +22710,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" }, @@ -22566,6 +22729,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" }, @@ -22584,6 +22748,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" }, @@ -22602,6 +22767,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" } @@ -22640,6 +22806,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" }, @@ -22673,6 +22840,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" }, @@ -22691,6 +22859,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" }, @@ -22705,6 +22874,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" }, @@ -22734,6 +22904,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" }, @@ -22777,6 +22948,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" }, @@ -22791,6 +22963,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" } @@ -22829,6 +23002,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" }, @@ -22843,6 +23017,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" } @@ -22881,6 +23056,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" }, @@ -22899,6 +23075,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" } @@ -22910,6 +23087,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" }, @@ -22931,6 +23109,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" }, @@ -22962,6 +23141,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" }, @@ -22980,6 +23160,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" }, @@ -22998,6 +23179,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" }, @@ -23029,6 +23211,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" }, @@ -23047,6 +23230,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" }, @@ -23065,6 +23249,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" } @@ -23073,6 +23258,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" }, @@ -23104,6 +23290,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" }, @@ -23122,6 +23309,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" } @@ -23130,6 +23318,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" } @@ -23138,6 +23327,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" } @@ -23146,6 +23336,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" } @@ -23184,6 +23375,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" }, @@ -23198,6 +23390,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" } @@ -23236,6 +23429,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" }, @@ -23271,6 +23465,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" }, @@ -23289,6 +23484,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" }, @@ -23307,6 +23503,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" }, @@ -23325,6 +23522,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" } @@ -23336,6 +23534,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" } @@ -23374,6 +23573,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" }, @@ -23392,6 +23592,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" }, @@ -23410,6 +23611,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" }, @@ -23424,6 +23626,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" } @@ -23462,6 +23665,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" }, @@ -23480,6 +23684,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" }, @@ -23498,6 +23703,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" }, @@ -23512,6 +23718,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" } @@ -23550,6 +23757,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" }, @@ -23568,6 +23776,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" }, @@ -23586,6 +23795,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" }, @@ -23604,6 +23814,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" }, @@ -23622,6 +23833,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" }, @@ -23636,6 +23848,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" } @@ -23674,6 +23887,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" }, @@ -23692,6 +23906,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" }, @@ -23710,6 +23925,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" }, @@ -23728,6 +23944,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" }, @@ -23746,6 +23963,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" }, @@ -23760,6 +23978,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" } @@ -23798,6 +24017,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" }, @@ -23816,6 +24036,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" }, @@ -23834,6 +24055,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" }, @@ -23852,6 +24074,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" }, @@ -23870,6 +24093,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" }, @@ -23889,6 +24113,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" } @@ -23927,6 +24152,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" }, @@ -23945,6 +24171,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" }, @@ -23963,6 +24190,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" }, @@ -23981,6 +24209,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" }, @@ -23999,6 +24228,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" } @@ -24037,6 +24267,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" }, @@ -24055,6 +24286,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" }, @@ -24073,6 +24305,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" }, @@ -24091,6 +24324,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" }, @@ -24109,6 +24343,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" }, @@ -24127,6 +24362,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" } @@ -24165,6 +24401,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" }, @@ -24183,6 +24420,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" }, @@ -24201,6 +24439,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" }, @@ -24219,6 +24458,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" }, @@ -24237,6 +24477,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" } @@ -24275,6 +24516,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" }, @@ -24293,6 +24535,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" }, @@ -24311,6 +24554,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" }, @@ -24329,6 +24573,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" }, @@ -24347,6 +24592,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" }, @@ -24365,6 +24611,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" } @@ -24403,6 +24650,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" }, @@ -24421,6 +24669,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" }, @@ -24439,6 +24688,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" }, @@ -24457,6 +24707,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" }, @@ -24475,6 +24726,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" }, @@ -24493,6 +24745,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" } @@ -24531,6 +24784,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" }, @@ -24549,6 +24803,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" }, @@ -24567,6 +24822,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" }, @@ -24585,6 +24841,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" }, @@ -24603,6 +24860,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" }, @@ -24621,6 +24879,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" } @@ -24659,6 +24918,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" }, @@ -24677,6 +24937,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" }, @@ -24695,6 +24956,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" }, @@ -24713,6 +24975,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" }, @@ -24731,6 +24994,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" }, @@ -24749,6 +25013,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" }, @@ -24767,6 +25032,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" } @@ -24805,6 +25071,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" }, @@ -24823,6 +25090,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" }, @@ -24841,6 +25109,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" } @@ -24879,6 +25148,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" }, @@ -24897,6 +25167,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" }, @@ -24915,6 +25186,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" } @@ -24953,6 +25225,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" }, @@ -24971,6 +25244,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" }, @@ -24989,6 +25263,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" }, @@ -25007,6 +25282,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" } @@ -25045,6 +25321,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" }, @@ -25063,6 +25340,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" }, @@ -25081,6 +25359,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" }, @@ -25112,6 +25391,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" }, @@ -25130,6 +25410,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" }, @@ -25148,6 +25429,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" }, @@ -25166,6 +25448,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" } @@ -25174,6 +25457,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" } @@ -25212,6 +25496,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" }, @@ -25230,6 +25515,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" }, @@ -25248,6 +25534,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" } @@ -25286,6 +25573,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" } @@ -25297,7 +25585,6 @@ "name": "RealtimeResponseErrorCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", "usage": "Output,Json", - "description": "A command that describes an error encountered during a realtime operation.", "discriminatorValue": "error", "decorators": [], "baseModel": { @@ -25325,6 +25612,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" }, @@ -25356,6 +25644,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" }, @@ -25374,6 +25663,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" }, @@ -25392,6 +25682,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" }, @@ -25410,6 +25701,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" }, @@ -25428,6 +25720,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" } @@ -25436,6 +25729,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" } @@ -25585,7 +25879,6 @@ "kind": "property", "name": "input", "serializedName": "input", - "description": "The input text to classify", "type": { "$id": "2718", "kind": "union", @@ -25618,6 +25911,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" }, @@ -25626,13 +25920,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", "type": { "$ref": "565" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" } @@ -25644,7 +25938,6 @@ "name": "CreateModerationResponse", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", "usage": "Output,Json", - "description": "Represents if a given text input is potentially harmful.", "decorators": [], "properties": [ { @@ -25652,7 +25945,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The unique identifier for the moderation request.", "type": { "$id": "2725", "kind": "string", @@ -25663,6 +25955,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" }, @@ -25671,7 +25964,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model used to generate the moderation results.", "type": { "$id": "2727", "kind": "string", @@ -25682,6 +25974,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" }, @@ -25690,7 +25983,6 @@ "kind": "property", "name": "results", "serializedName": "results", - "description": "A list of moderation objects.", "type": { "$id": "2729", "kind": "array", @@ -25708,7 +26000,6 @@ "kind": "property", "name": "flagged", "serializedName": "flagged", - "description": "Whether any of the below categories are flagged.", "type": { "$id": "2732", "kind": "boolean", @@ -25719,6 +26010,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" }, @@ -25727,7 +26019,6 @@ "kind": "property", "name": "categories", "serializedName": "categories", - "description": "A list of the categories, and whether they are flagged or not.", "type": { "$id": "2734", "kind": "model", @@ -25741,7 +26032,6 @@ "kind": "property", "name": "hate", "serializedName": "hate", - "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", "type": { "$id": "2736", "kind": "boolean", @@ -25752,6 +26042,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" }, @@ -25760,7 +26051,6 @@ "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", - "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", "type": { "$id": "2738", "kind": "boolean", @@ -25771,6 +26061,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" }, @@ -25779,7 +26070,6 @@ "kind": "property", "name": "harassment", "serializedName": "harassment", - "description": "Content that expresses, incites, or promotes harassing language towards any target.", "type": { "$id": "2740", "kind": "boolean", @@ -25790,6 +26080,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" }, @@ -25798,7 +26089,6 @@ "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", - "description": "Harassment content that also includes violence or serious harm towards any target.", "type": { "$id": "2742", "kind": "boolean", @@ -25809,6 +26099,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" }, @@ -25817,7 +26108,6 @@ "kind": "property", "name": "self-harm", "serializedName": "self-harm", - "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { "$id": "2744", "kind": "boolean", @@ -25828,6 +26118,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" }, @@ -25836,7 +26127,6 @@ "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", - "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { "$id": "2746", "kind": "boolean", @@ -25847,6 +26137,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" }, @@ -25855,7 +26146,6 @@ "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", - "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", "type": { "$id": "2748", "kind": "boolean", @@ -25866,6 +26156,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" }, @@ -25874,7 +26165,6 @@ "kind": "property", "name": "sexual", "serializedName": "sexual", - "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", "type": { "$id": "2750", "kind": "boolean", @@ -25885,6 +26175,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" }, @@ -25893,7 +26184,6 @@ "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", - "description": "Sexual content that includes an individual who is under 18 years old.", "type": { "$id": "2752", "kind": "boolean", @@ -25904,6 +26194,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" }, @@ -25912,7 +26203,6 @@ "kind": "property", "name": "violence", "serializedName": "violence", - "description": "Content that depicts death, violence, or physical injury.", "type": { "$id": "2754", "kind": "boolean", @@ -25923,6 +26213,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" }, @@ -25931,7 +26222,6 @@ "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", - "description": "Content that depicts death, violence, or physical injury in graphic detail.", "type": { "$id": "2756", "kind": "boolean", @@ -25942,6 +26232,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" } @@ -25950,6 +26241,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" }, @@ -25958,7 +26250,6 @@ "kind": "property", "name": "category_scores", "serializedName": "category_scores", - "description": "A list of the categories along with their scores as predicted by model.", "type": { "$id": "2758", "kind": "model", @@ -25972,7 +26263,6 @@ "kind": "property", "name": "hate", "serializedName": "hate", - "description": "The score for the category 'hate'.", "type": { "$id": "2760", "kind": "float32", @@ -25983,6 +26273,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" }, @@ -25991,7 +26282,6 @@ "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", - "description": "The score for the category 'hate/threatening'.", "type": { "$id": "2762", "kind": "float32", @@ -26002,6 +26292,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" }, @@ -26010,7 +26301,6 @@ "kind": "property", "name": "harassment", "serializedName": "harassment", - "description": "The score for the category 'harassment'.", "type": { "$id": "2764", "kind": "float32", @@ -26021,6 +26311,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" }, @@ -26029,7 +26320,6 @@ "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", - "description": "The score for the category 'harassment/threatening'.", "type": { "$id": "2766", "kind": "float32", @@ -26040,6 +26330,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" }, @@ -26048,7 +26339,6 @@ "kind": "property", "name": "self-harm", "serializedName": "self-harm", - "description": "The score for the category 'self-harm'.", "type": { "$id": "2768", "kind": "float32", @@ -26059,6 +26349,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" }, @@ -26067,7 +26358,6 @@ "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", - "description": "The score for the category 'self-harm/intent'.", "type": { "$id": "2770", "kind": "float32", @@ -26078,6 +26368,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" }, @@ -26086,7 +26377,6 @@ "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", - "description": "The score for the category 'self-harm/instructions'.", "type": { "$id": "2772", "kind": "float32", @@ -26097,6 +26387,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" }, @@ -26105,7 +26396,6 @@ "kind": "property", "name": "sexual", "serializedName": "sexual", - "description": "The score for the category 'sexual'.", "type": { "$id": "2774", "kind": "float32", @@ -26116,6 +26406,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" }, @@ -26124,7 +26415,6 @@ "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", - "description": "The score for the category 'sexual/minors'.", "type": { "$id": "2776", "kind": "float32", @@ -26135,6 +26425,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" }, @@ -26143,7 +26434,6 @@ "kind": "property", "name": "violence", "serializedName": "violence", - "description": "The score for the category 'violence'.", "type": { "$id": "2778", "kind": "float32", @@ -26154,6 +26444,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" }, @@ -26162,7 +26453,6 @@ "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", - "description": "The score for the category 'violence/graphic'.", "type": { "$id": "2780", "kind": "float32", @@ -26173,6 +26463,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" } @@ -26181,6 +26472,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" } @@ -26192,6 +26484,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" } @@ -26231,6 +26524,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" }, @@ -26249,7 +26543,6 @@ "name": "Model", "crossLanguageDefinitionId": "OpenAI.Model", "usage": "Output,Json", - "description": "Describes an OpenAI model offering that can be used with the API.", "decorators": [], "properties": [ { @@ -26257,7 +26550,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The model identifier, which can be referenced in the API endpoints.", "type": { "$id": "2788", "kind": "string", @@ -26268,6 +26560,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Model.id" }, @@ -26276,7 +26569,6 @@ "kind": "property", "name": "created", "serializedName": "created", - "description": "The Unix timestamp (in seconds) when the model was created.", "type": { "$id": "2790", "kind": "utcDateTime", @@ -26295,6 +26587,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Model.created" }, @@ -26303,7 +26596,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"model\".", "type": { "$id": "2793", "kind": "constant", @@ -26316,6 +26608,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Model.object" }, @@ -26324,7 +26617,6 @@ "kind": "property", "name": "owned_by", "serializedName": "owned_by", - "description": "The organization that owns the model.", "type": { "$id": "2795", "kind": "string", @@ -26335,6 +26627,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Model.owned_by" } @@ -26346,6 +26639,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" } @@ -26377,6 +26671,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" }, @@ -26395,6 +26690,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" }, @@ -26415,6 +26711,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" } @@ -26426,7 +26723,6 @@ "name": "MessageObject", "crossLanguageDefinitionId": "OpenAI.MessageObject", "usage": "Output,Json", - "description": "Represents a message within a [thread](/docs/api-reference/threads).", "decorators": [], "properties": [ { @@ -26434,7 +26730,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "2805", "kind": "string", @@ -26445,6 +26740,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.id" }, @@ -26453,7 +26749,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread.message`.", "type": { "$id": "2807", "kind": "constant", @@ -26466,6 +26761,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.object" }, @@ -26474,7 +26770,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the message was created.", "type": { "$id": "2809", "kind": "utcDateTime", @@ -26493,6 +26788,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" }, @@ -26501,7 +26797,6 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", - "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", "type": { "$id": "2812", "kind": "string", @@ -26512,6 +26807,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" }, @@ -26520,13 +26816,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", "type": { "$ref": "583" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.status" }, @@ -26535,7 +26831,6 @@ "kind": "property", "name": "incomplete_details", "serializedName": "incomplete_details", - "description": "On an incomplete message, details about why the message is incomplete.", "type": { "$id": "2815", "kind": "nullable", @@ -26552,13 +26847,13 @@ "kind": "property", "name": "reason", "serializedName": "reason", - "description": "The reason the message is incomplete.", "type": { "$ref": "591" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" } @@ -26568,6 +26863,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" }, @@ -26576,7 +26872,6 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the message was completed.", "type": { "$id": "2819", "kind": "nullable", @@ -26599,6 +26894,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" }, @@ -26607,7 +26903,6 @@ "kind": "property", "name": "incomplete_at", "serializedName": "incomplete_at", - "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", "type": { "$id": "2823", "kind": "nullable", @@ -26630,6 +26925,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" }, @@ -26638,13 +26934,13 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { "$ref": "603" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.role" }, @@ -26653,7 +26949,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The content of the message in array of text and/or images.", "type": { "$id": "2828", "kind": "array", @@ -26667,6 +26962,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.content" }, @@ -26675,7 +26971,6 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", - "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", "type": { "$id": "2830", "kind": "nullable", @@ -26690,6 +26985,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" }, @@ -26698,7 +26994,6 @@ "kind": "property", "name": "run_id", "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", "type": { "$id": "2833", "kind": "nullable", @@ -26713,6 +27008,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" }, @@ -26721,7 +27017,6 @@ "kind": "property", "name": "attachments", "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they were added to.", "type": { "$id": "2836", "kind": "nullable", @@ -26742,7 +27037,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", "type": { "$id": "2840", "kind": "string", @@ -26753,6 +27047,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" }, @@ -26761,7 +27056,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "The tools to add this file to.", "type": { "$id": "2842", "kind": "array", @@ -26786,6 +27080,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" } @@ -26798,6 +27093,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" }, @@ -26806,7 +27102,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2845", "kind": "nullable", @@ -26833,6 +27128,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" } @@ -26869,6 +27165,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" }, @@ -26890,6 +27187,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" }, @@ -26908,6 +27206,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" }, @@ -26926,6 +27225,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" }, @@ -26944,6 +27244,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" } @@ -26962,7 +27263,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2862", "kind": "nullable", @@ -26989,6 +27289,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" } @@ -27017,6 +27318,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" }, @@ -27035,6 +27337,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" }, @@ -27055,6 +27358,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" } @@ -27073,7 +27377,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", "type": { "$id": "2875", "kind": "string", @@ -27084,6 +27387,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" }, @@ -27092,7 +27396,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model to use for image generation.", "type": { "$id": "2877", "kind": "nullable", @@ -27103,6 +27406,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" }, @@ -27111,7 +27415,6 @@ "kind": "property", "name": "n", "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { "$id": "2879", "kind": "nullable", @@ -27126,6 +27429,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" }, @@ -27134,13 +27438,13 @@ "kind": "property", "name": "quality", "serializedName": "quality", - "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", "type": { "$ref": "627" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" }, @@ -27149,7 +27453,6 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2883", "kind": "nullable", @@ -27160,6 +27463,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" }, @@ -27168,7 +27472,6 @@ "kind": "property", "name": "size", "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", "type": { "$id": "2885", "kind": "nullable", @@ -27179,6 +27482,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" }, @@ -27187,7 +27491,6 @@ "kind": "property", "name": "style", "serializedName": "style", - "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", "type": { "$id": "2887", "kind": "nullable", @@ -27198,6 +27501,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" }, @@ -27206,7 +27510,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2889", "kind": "string", @@ -27217,6 +27520,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" } @@ -27253,6 +27557,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" }, @@ -27271,7 +27576,6 @@ "name": "Image", "crossLanguageDefinitionId": "OpenAI.Image", "usage": "Output,Json", - "description": "Represents the url or the content of an image generated by the OpenAI API.", "decorators": [], "properties": [ { @@ -27279,7 +27583,6 @@ "kind": "property", "name": "b64_json", "serializedName": "b64_json", - "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "type": { "$id": "2898", "kind": "bytes", @@ -27291,6 +27594,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Image.b64_json" }, @@ -27299,7 +27603,6 @@ "kind": "property", "name": "url", "serializedName": "url", - "description": "The URL of the generated image, if `response_format` is `url` (default).", "type": { "$id": "2900", "kind": "url", @@ -27310,6 +27613,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Image.url" }, @@ -27318,7 +27622,6 @@ "kind": "property", "name": "revised_prompt", "serializedName": "revised_prompt", - "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", "type": { "$id": "2902", "kind": "string", @@ -27329,6 +27632,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" } @@ -27340,6 +27644,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" } @@ -27361,7 +27666,6 @@ "kind": "property", "name": "image", "serializedName": "image", - "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", "type": { "$id": "2905", "kind": "bytes", @@ -27373,6 +27677,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" }, @@ -27381,7 +27686,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters.", "type": { "$id": "2907", "kind": "string", @@ -27392,6 +27696,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" }, @@ -27400,7 +27705,6 @@ "kind": "property", "name": "mask", "serializedName": "mask", - "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", "type": { "$id": "2909", "kind": "bytes", @@ -27412,6 +27716,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" }, @@ -27420,7 +27725,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { "$id": "2911", "kind": "nullable", @@ -27431,6 +27735,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" }, @@ -27439,7 +27744,6 @@ "kind": "property", "name": "n", "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10.", "type": { "$id": "2913", "kind": "nullable", @@ -27454,6 +27758,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" }, @@ -27462,7 +27767,6 @@ "kind": "property", "name": "size", "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { "$id": "2916", "kind": "nullable", @@ -27473,6 +27777,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" }, @@ -27481,7 +27786,6 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2918", "kind": "nullable", @@ -27492,6 +27796,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" }, @@ -27500,7 +27805,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2920", "kind": "string", @@ -27511,6 +27815,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" } @@ -27529,7 +27834,6 @@ "kind": "property", "name": "image", "serializedName": "image", - "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", "type": { "$id": "2923", "kind": "bytes", @@ -27541,6 +27845,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" }, @@ -27549,7 +27854,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { "$id": "2925", "kind": "nullable", @@ -27560,6 +27864,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" }, @@ -27568,7 +27873,6 @@ "kind": "property", "name": "n", "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { "$id": "2927", "kind": "nullable", @@ -27583,6 +27887,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" }, @@ -27591,7 +27896,6 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2930", "kind": "nullable", @@ -27602,6 +27906,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" }, @@ -27610,7 +27915,6 @@ "kind": "property", "name": "size", "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { "$id": "2932", "kind": "nullable", @@ -27621,6 +27925,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" }, @@ -27629,7 +27934,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2934", "kind": "string", @@ -27640,6 +27944,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" } @@ -27658,13 +27963,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", "type": { "$ref": "693" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" }, @@ -27673,7 +27978,6 @@ "kind": "property", "name": "training_file", "serializedName": "training_file", - "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "2938", "kind": "string", @@ -27684,6 +27988,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" }, @@ -27692,7 +27997,6 @@ "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job.", "type": { "$id": "2940", "kind": "model", @@ -27706,7 +28010,6 @@ "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { "$id": "2942", "kind": "union", @@ -27728,6 +28031,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" }, @@ -27736,7 +28040,6 @@ "kind": "property", "name": "batch_size", "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { "$id": "2945", "kind": "union", @@ -27758,6 +28061,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" }, @@ -27766,7 +28070,6 @@ "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { "$id": "2948", "kind": "union", @@ -27788,6 +28091,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" } @@ -27796,6 +28100,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" }, @@ -27804,7 +28109,6 @@ "kind": "property", "name": "suffix", "serializedName": "suffix", - "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", "type": { "$id": "2951", "kind": "nullable", @@ -27819,6 +28123,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" }, @@ -27827,7 +28132,6 @@ "kind": "property", "name": "validation_file", "serializedName": "validation_file", - "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "2954", "kind": "nullable", @@ -27842,6 +28146,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" }, @@ -27850,7 +28155,6 @@ "kind": "property", "name": "integrations", "serializedName": "integrations", - "description": "A list of integrations to enable for your fine-tuning job.", "type": { "$id": "2957", "kind": "nullable", @@ -27880,6 +28184,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" }, @@ -27923,6 +28228,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" }, @@ -27954,6 +28260,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" }, @@ -27976,6 +28283,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" }, @@ -27998,6 +28306,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" }, @@ -28023,6 +28332,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" } @@ -28031,6 +28341,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" } @@ -28045,6 +28356,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" }, @@ -28053,7 +28365,6 @@ "kind": "property", "name": "seed", "serializedName": "seed", - "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", "type": { "$id": "2981", "kind": "nullable", @@ -28068,6 +28379,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" } @@ -28091,7 +28403,6 @@ "name": "FineTuningJob", "crossLanguageDefinitionId": "OpenAI.FineTuningJob", "usage": "Output,Json", - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", "decorators": [], "properties": [ { @@ -28099,7 +28410,6 @@ "kind": "property", "name": "user_provided_suffix", "serializedName": "user_provided_suffix", - "description": "The descriptive suffix applied to the job, as specified in the job creation request.", "type": { "$id": "2985", "kind": "nullable", @@ -28114,6 +28424,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" }, @@ -28122,7 +28433,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The object identifier, which can be referenced in the API endpoints.", "type": { "$id": "2988", "kind": "string", @@ -28133,6 +28443,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" }, @@ -28141,7 +28452,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "type": { "$id": "2990", "kind": "utcDateTime", @@ -28160,6 +28470,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" }, @@ -28168,7 +28479,6 @@ "kind": "property", "name": "error", "serializedName": "error", - "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", "type": { "$id": "2993", "kind": "nullable", @@ -28185,7 +28495,6 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "A machine-readable error code.", "type": { "$id": "2996", "kind": "string", @@ -28196,6 +28505,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" }, @@ -28204,7 +28514,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable error message.", "type": { "$id": "2998", "kind": "string", @@ -28215,6 +28524,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" }, @@ -28223,7 +28533,6 @@ "kind": "property", "name": "param", "serializedName": "param", - "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", "type": { "$id": "3000", "kind": "nullable", @@ -28238,6 +28547,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" } @@ -28247,6 +28557,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" }, @@ -28255,7 +28566,6 @@ "kind": "property", "name": "fine_tuned_model", "serializedName": "fine_tuned_model", - "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3003", "kind": "nullable", @@ -28270,6 +28580,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" }, @@ -28278,7 +28589,6 @@ "kind": "property", "name": "finished_at", "serializedName": "finished_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3006", "kind": "nullable", @@ -28301,6 +28611,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" }, @@ -28309,7 +28620,6 @@ "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "3010", "kind": "model", @@ -28323,7 +28633,6 @@ "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { "$id": "3012", "kind": "union", @@ -28345,6 +28654,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" }, @@ -28353,7 +28663,6 @@ "kind": "property", "name": "batch_size", "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { "$id": "3015", "kind": "union", @@ -28375,6 +28684,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" }, @@ -28383,7 +28693,6 @@ "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { "$id": "3018", "kind": "union", @@ -28405,6 +28714,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" } @@ -28413,6 +28723,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" }, @@ -28421,7 +28732,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The base model that is being fine-tuned.", "type": { "$id": "3021", "kind": "string", @@ -28432,6 +28742,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" }, @@ -28440,7 +28751,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job\".", "type": { "$id": "3023", "kind": "constant", @@ -28453,6 +28763,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" }, @@ -28461,7 +28772,6 @@ "kind": "property", "name": "organization_id", "serializedName": "organization_id", - "description": "The organization that owns the fine-tuning job.", "type": { "$id": "3025", "kind": "string", @@ -28472,6 +28782,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" }, @@ -28480,7 +28791,6 @@ "kind": "property", "name": "result_files", "serializedName": "result_files", - "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3027", "kind": "array", @@ -28498,6 +28808,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" }, @@ -28506,13 +28817,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", "type": { "$ref": "730" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" }, @@ -28521,7 +28832,6 @@ "kind": "property", "name": "trained_tokens", "serializedName": "trained_tokens", - "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3031", "kind": "nullable", @@ -28536,6 +28846,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" }, @@ -28544,7 +28855,6 @@ "kind": "property", "name": "training_file", "serializedName": "training_file", - "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3034", "kind": "string", @@ -28555,6 +28865,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" }, @@ -28563,7 +28874,6 @@ "kind": "property", "name": "validation_file", "serializedName": "validation_file", - "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3036", "kind": "nullable", @@ -28578,6 +28888,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" }, @@ -28586,7 +28897,6 @@ "kind": "property", "name": "integrations", "serializedName": "integrations", - "description": "A list of integrations to enable for this fine-tuning job.", "type": { "$id": "3039", "kind": "nullable", @@ -28616,6 +28926,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" }, @@ -28643,7 +28954,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the integration being enabled for the fine-tuning job", "type": { "$id": "3047", "kind": "constant", @@ -28660,6 +28970,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" }, @@ -28668,7 +28979,6 @@ "kind": "property", "name": "wandb", "serializedName": "wandb", - "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", "type": { "$id": "3050", "kind": "model", @@ -28682,7 +28992,6 @@ "kind": "property", "name": "project", "serializedName": "project", - "description": "The name of the project that the new run will be created under.", "type": { "$id": "3052", "kind": "string", @@ -28693,6 +29002,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" }, @@ -28701,7 +29011,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", "type": { "$id": "3054", "kind": "nullable", @@ -28716,6 +29025,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" }, @@ -28724,7 +29034,6 @@ "kind": "property", "name": "entity", "serializedName": "entity", - "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", "type": { "$id": "3057", "kind": "nullable", @@ -28739,6 +29048,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" }, @@ -28747,7 +29057,6 @@ "kind": "property", "name": "tags", "serializedName": "tags", - "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", "type": { "$id": "3060", "kind": "array", @@ -28765,6 +29074,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" } @@ -28773,6 +29083,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" } @@ -28787,6 +29098,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" }, @@ -28795,7 +29107,6 @@ "kind": "property", "name": "seed", "serializedName": "seed", - "description": "The seed used for the fine-tuning job.", "type": { "$id": "3063", "kind": "int32", @@ -28806,6 +29117,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" }, @@ -28814,7 +29126,6 @@ "kind": "property", "name": "estimated_finish", "serializedName": "estimated_finish", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", "type": { "$id": "3065", "kind": "nullable", @@ -28837,6 +29148,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" } @@ -28883,6 +29195,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" }, @@ -28901,6 +29214,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" }, @@ -28921,6 +29235,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" } @@ -28949,7 +29264,6 @@ "name": "FineTuningJobCheckpoint", "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", "usage": "Output,Json", - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", "decorators": [], "properties": [ { @@ -28957,7 +29271,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The checkpoint identifier, which can be referenced in the API endpoints.", "type": { "$id": "3080", "kind": "string", @@ -28968,6 +29281,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" }, @@ -28976,7 +29290,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", "type": { "$id": "3082", "kind": "utcDateTime", @@ -28995,6 +29308,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" }, @@ -29003,7 +29317,6 @@ "kind": "property", "name": "fine_tuned_model_checkpoint", "serializedName": "fine_tuned_model_checkpoint", - "description": "The name of the fine-tuned checkpoint model that is created.", "type": { "$id": "3085", "kind": "string", @@ -29014,6 +29327,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" }, @@ -29022,7 +29336,6 @@ "kind": "property", "name": "step_number", "serializedName": "step_number", - "description": "The step number that the checkpoint was created at.", "type": { "$id": "3087", "kind": "int32", @@ -29033,6 +29346,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" }, @@ -29041,7 +29355,6 @@ "kind": "property", "name": "metrics", "serializedName": "metrics", - "description": "Metrics at the step number during the fine-tuning job.", "type": { "$id": "3089", "kind": "model", @@ -29065,6 +29378,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" }, @@ -29083,6 +29397,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" }, @@ -29101,6 +29416,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" }, @@ -29119,6 +29435,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" }, @@ -29137,6 +29454,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" }, @@ -29155,6 +29473,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" }, @@ -29173,6 +29492,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" } @@ -29181,6 +29501,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" }, @@ -29189,7 +29510,6 @@ "kind": "property", "name": "fine_tuning_job_id", "serializedName": "fine_tuning_job_id", - "description": "The name of the fine-tuning job that this checkpoint was created from.", "type": { "$id": "3105", "kind": "string", @@ -29200,6 +29520,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" }, @@ -29208,7 +29529,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", "type": { "$id": "3107", "kind": "constant", @@ -29221,6 +29541,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" } @@ -29232,6 +29553,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" }, @@ -29252,6 +29574,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" }, @@ -29274,6 +29597,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" }, @@ -29296,6 +29620,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" }, @@ -29314,6 +29639,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" } @@ -29348,6 +29674,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" }, @@ -29366,7 +29693,6 @@ "name": "FineTuningJobEvent", "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", "usage": "Output,Json", - "description": "Fine-tuning job event object", "decorators": [], "properties": [ { @@ -29384,6 +29710,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" }, @@ -29410,6 +29737,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" }, @@ -29424,6 +29752,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" }, @@ -29442,6 +29771,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" }, @@ -29462,6 +29792,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" } @@ -29473,6 +29804,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" }, @@ -29493,6 +29825,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" } @@ -29514,7 +29847,6 @@ "kind": "property", "name": "file", "serializedName": "file", - "description": "The File object (not file name) to be uploaded.", "type": { "$id": "3138", "kind": "bytes", @@ -29526,6 +29858,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" }, @@ -29534,13 +29867,13 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", "type": { "$ref": "767" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" } @@ -29572,6 +29905,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" }, @@ -29592,6 +29926,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" } @@ -29620,6 +29955,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" }, @@ -29640,6 +29976,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" }, @@ -29658,6 +29995,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" } @@ -29676,7 +30014,6 @@ "kind": "property", "name": "input", "serializedName": "input", - "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { "$id": "3154", "kind": "union", @@ -29744,6 +30081,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" }, @@ -29752,13 +30090,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "783" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" }, @@ -29767,13 +30105,13 @@ "kind": "property", "name": "encoding_format", "serializedName": "encoding_format", - "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", "type": { "$ref": "791" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" }, @@ -29782,7 +30120,6 @@ "kind": "property", "name": "dimensions", "serializedName": "dimensions", - "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", "type": { "$id": "3166", "kind": "int32", @@ -29793,6 +30130,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" }, @@ -29801,7 +30139,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3168", "kind": "string", @@ -29812,6 +30149,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" } @@ -29830,7 +30168,6 @@ "kind": "property", "name": "data", "serializedName": "data", - "description": "The list of embeddings generated by the model.", "type": { "$id": "3171", "kind": "array", @@ -29841,7 +30178,6 @@ "name": "Embedding", "crossLanguageDefinitionId": "OpenAI.Embedding", "usage": "Output,Json", - "description": "Represents an embedding vector returned by embedding endpoint.", "decorators": [], "properties": [ { @@ -29849,7 +30185,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the embedding in the list of embeddings.", "type": { "$id": "3174", "kind": "int32", @@ -29860,6 +30195,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Embedding.index" }, @@ -29868,7 +30204,6 @@ "kind": "property", "name": "embedding", "serializedName": "embedding", - "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", "type": { "$id": "3176", "kind": "union", @@ -29901,6 +30236,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" }, @@ -29909,7 +30245,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"embedding\".", "type": { "$id": "3181", "kind": "constant", @@ -29922,6 +30257,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Embedding.object" } @@ -29933,6 +30269,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" }, @@ -29941,7 +30278,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The name of the model used to generate the embedding.", "type": { "$id": "3183", "kind": "string", @@ -29952,6 +30288,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" }, @@ -29960,7 +30297,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"list\".", "type": { "$id": "3185", "kind": "constant", @@ -29973,6 +30309,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" }, @@ -29981,7 +30318,6 @@ "kind": "property", "name": "usage", "serializedName": "usage", - "description": "The usage information for the request.", "type": { "$id": "3187", "kind": "model", @@ -29995,7 +30331,6 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", - "description": "The number of tokens used by the prompt.", "type": { "$id": "3189", "kind": "int32", @@ -30006,6 +30341,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" }, @@ -30014,7 +30350,6 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", - "description": "The total number of tokens used by the request.", "type": { "$id": "3191", "kind": "int32", @@ -30025,6 +30360,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" } @@ -30033,6 +30369,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" } @@ -30057,13 +30394,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "803" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" }, @@ -30072,7 +30409,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", "type": { "$id": "3195", "kind": "nullable", @@ -30144,6 +30480,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" }, @@ -30152,7 +30489,6 @@ "kind": "property", "name": "best_of", "serializedName": "best_of", - "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { "$id": "3206", "kind": "nullable", @@ -30167,6 +30503,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" }, @@ -30175,7 +30512,6 @@ "kind": "property", "name": "echo", "serializedName": "echo", - "description": "Echo back the prompt in addition to the completion", "type": { "$id": "3209", "kind": "nullable", @@ -30190,6 +30526,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" }, @@ -30198,7 +30535,6 @@ "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3212", "kind": "nullable", @@ -30213,6 +30549,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" }, @@ -30221,7 +30558,6 @@ "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", "type": { "$id": "3215", "kind": "nullable", @@ -30248,6 +30584,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" }, @@ -30256,7 +30593,6 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", - "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", "type": { "$id": "3220", "kind": "nullable", @@ -30271,6 +30607,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" }, @@ -30279,7 +30616,6 @@ "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { "$id": "3223", "kind": "nullable", @@ -30294,6 +30630,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" }, @@ -30302,7 +30639,6 @@ "kind": "property", "name": "n", "serializedName": "n", - "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { "$id": "3226", "kind": "nullable", @@ -30317,6 +30653,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" }, @@ -30325,7 +30662,6 @@ "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3229", "kind": "nullable", @@ -30340,6 +30676,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" }, @@ -30348,7 +30685,6 @@ "kind": "property", "name": "seed", "serializedName": "seed", - "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { "$id": "3232", "kind": "nullable", @@ -30363,6 +30699,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" }, @@ -30371,7 +30708,6 @@ "kind": "property", "name": "stop", "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", "type": { "$id": "3235", "kind": "nullable", @@ -30408,6 +30744,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" }, @@ -30416,7 +30753,6 @@ "kind": "property", "name": "stream", "serializedName": "stream", - "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { "$id": "3241", "kind": "nullable", @@ -30431,6 +30767,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" }, @@ -30448,7 +30785,6 @@ "name": "ChatCompletionStreamOptions", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", "usage": "Input,Json", - "description": "Options for streaming response. Only set this when you set `stream: true`.", "decorators": [], "properties": [ { @@ -30456,7 +30792,6 @@ "kind": "property", "name": "include_usage", "serializedName": "include_usage", - "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", "type": { "$id": "3247", "kind": "boolean", @@ -30467,6 +30802,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" } @@ -30476,6 +30812,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" }, @@ -30484,7 +30821,6 @@ "kind": "property", "name": "suffix", "serializedName": "suffix", - "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", "type": { "$id": "3249", "kind": "nullable", @@ -30499,6 +30835,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" }, @@ -30507,7 +30844,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { "$id": "3252", "kind": "nullable", @@ -30522,6 +30858,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" }, @@ -30530,7 +30867,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { "$id": "3255", "kind": "nullable", @@ -30545,6 +30881,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" }, @@ -30553,7 +30890,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3258", "kind": "string", @@ -30564,6 +30900,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" } @@ -30578,7 +30915,6 @@ "name": "CreateCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", "usage": "Output,Json", - "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", "decorators": [], "properties": [ { @@ -30586,7 +30922,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "A unique identifier for the completion.", "type": { "$id": "3261", "kind": "string", @@ -30597,6 +30932,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" }, @@ -30605,7 +30941,6 @@ "kind": "property", "name": "choices", "serializedName": "choices", - "description": "The list of completion choices the model generated for the input prompt.", "type": { "$id": "3263", "kind": "array", @@ -30623,13 +30958,13 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", "type": { "$ref": "811" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" }, @@ -30648,6 +30983,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" }, @@ -30689,6 +31025,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" }, @@ -30714,6 +31051,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" }, @@ -30739,6 +31077,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" }, @@ -30776,6 +31115,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" } @@ -30785,6 +31125,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" }, @@ -30803,6 +31144,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" } @@ -30814,6 +31156,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" }, @@ -30822,7 +31165,6 @@ "kind": "property", "name": "created", "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the completion was created.", "type": { "$id": "3288", "kind": "utcDateTime", @@ -30841,6 +31183,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" }, @@ -30849,7 +31192,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model used for completion.", "type": { "$id": "3291", "kind": "string", @@ -30860,6 +31202,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" }, @@ -30868,7 +31211,6 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3293", "kind": "string", @@ -30879,6 +31221,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" }, @@ -30887,7 +31230,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always \"text_completion\"", "type": { "$id": "3295", "kind": "constant", @@ -30900,6 +31242,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" }, @@ -30914,7 +31257,6 @@ "name": "CompletionUsage", "crossLanguageDefinitionId": "OpenAI.CompletionUsage", "usage": "Output,Json", - "description": "Usage statistics for the completion request.", "decorators": [], "properties": [ { @@ -30922,7 +31264,6 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", "type": { "$id": "3299", "kind": "int32", @@ -30933,6 +31274,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" }, @@ -30941,7 +31283,6 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", "type": { "$id": "3301", "kind": "int32", @@ -30952,6 +31293,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" }, @@ -30960,7 +31302,6 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", "type": { "$id": "3303", "kind": "int32", @@ -30971,6 +31312,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" }, @@ -30979,7 +31321,6 @@ "kind": "property", "name": "completion_tokens_details", "serializedName": "completion_tokens_details", - "description": "Breakdown of tokens used in a completion.", "type": { "$id": "3305", "kind": "model", @@ -30993,7 +31334,6 @@ "kind": "property", "name": "reasoning_tokens", "serializedName": "reasoning_tokens", - "description": "Tokens generated by the model for reasoning.", "type": { "$id": "3307", "kind": "int32", @@ -31004,6 +31344,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" } @@ -31012,6 +31353,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" } @@ -31020,6 +31362,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" } @@ -31050,7 +31393,6 @@ "kind": "property", "name": "messages", "serializedName": "messages", - "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", "type": { "$id": "3310", "kind": "array", @@ -31067,7 +31409,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the author of this message.", "type": { "$id": "3313", "kind": "string", @@ -31078,6 +31419,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" }, @@ -31105,7 +31447,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the system message.", "type": { "$id": "3317", "kind": "union", @@ -31140,7 +31481,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the content part.", "type": { "$id": "3323", "kind": "constant", @@ -31153,6 +31493,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" }, @@ -31161,7 +31502,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text content.", "type": { "$id": "3325", "kind": "string", @@ -31172,6 +31512,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" } @@ -31189,6 +31530,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" }, @@ -31197,7 +31539,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the messages author, in this case `system`.", "type": { "$id": "3327", "kind": "constant", @@ -31214,6 +31555,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" }, @@ -31222,7 +31564,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3330", "kind": "string", @@ -31233,6 +31574,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" } @@ -31255,7 +31597,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the user message.", "type": { "$id": "3333", "kind": "union", @@ -31293,7 +31634,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the content part.", "type": { "$id": "3339", "kind": "constant", @@ -31306,6 +31646,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" }, @@ -31327,7 +31668,6 @@ "kind": "property", "name": "url", "serializedName": "url", - "description": "Either a URL of the image or the base64 encoded image data.", "type": { "$id": "3343", "kind": "url", @@ -31338,6 +31678,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" }, @@ -31346,13 +31687,13 @@ "kind": "property", "name": "detail", "serializedName": "detail", - "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", "type": { "$ref": "828" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" } @@ -31361,6 +31702,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" } @@ -31378,6 +31720,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" }, @@ -31386,7 +31729,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the messages author, in this case `user`.", "type": { "$id": "3346", "kind": "constant", @@ -31403,6 +31745,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" }, @@ -31411,7 +31754,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3349", "kind": "string", @@ -31422,6 +31764,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" } @@ -31444,7 +31787,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", "type": { "$id": "3352", "kind": "nullable", @@ -31485,7 +31827,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the content part.", "type": { "$id": "3359", "kind": "constant", @@ -31498,6 +31839,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" }, @@ -31506,7 +31848,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "The refusal message generated by the model.", "type": { "$id": "3361", "kind": "string", @@ -31517,6 +31858,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" } @@ -31535,6 +31877,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" }, @@ -31543,7 +31886,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "The refusal message by the assistant.", "type": { "$id": "3363", "kind": "nullable", @@ -31558,6 +31900,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" }, @@ -31566,7 +31909,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the messages author, in this case `assistant`.", "type": { "$id": "3366", "kind": "constant", @@ -31583,6 +31925,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" }, @@ -31591,7 +31934,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3369", "kind": "string", @@ -31602,6 +31944,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" }, @@ -31627,7 +31970,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call.", "type": { "$id": "3374", "kind": "string", @@ -31638,6 +31980,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" }, @@ -31646,7 +31989,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3376", "kind": "constant", @@ -31659,6 +32001,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" }, @@ -31667,7 +32010,6 @@ "kind": "property", "name": "function", "serializedName": "function", - "description": "The function that the model called.", "type": { "$id": "3378", "kind": "model", @@ -31681,7 +32023,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3380", "kind": "string", @@ -31692,6 +32033,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" }, @@ -31700,7 +32042,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3382", "kind": "string", @@ -31711,6 +32052,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" } @@ -31719,6 +32061,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" } @@ -31730,6 +32073,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" }, @@ -31738,7 +32082,6 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3384", "kind": "nullable", @@ -31755,7 +32098,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3387", "kind": "string", @@ -31766,6 +32108,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" }, @@ -31774,7 +32117,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3389", "kind": "string", @@ -31785,6 +32127,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" } @@ -31794,6 +32137,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" } @@ -31816,7 +32160,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the messages author, in this case `tool`.", "type": { "$id": "3392", "kind": "constant", @@ -31833,6 +32176,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" }, @@ -31841,7 +32185,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the tool message.", "type": { "$id": "3395", "kind": "union", @@ -31878,6 +32221,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" }, @@ -31886,7 +32230,6 @@ "kind": "property", "name": "tool_call_id", "serializedName": "tool_call_id", - "description": "Tool call that this message is responding to.", "type": { "$id": "3400", "kind": "string", @@ -31897,6 +32240,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" } @@ -31920,7 +32264,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the messages author, in this case `function`.", "type": { "$id": "3403", "kind": "constant", @@ -31937,6 +32280,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" }, @@ -31945,7 +32289,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the function message.", "type": { "$id": "3406", "kind": "nullable", @@ -31960,6 +32303,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" }, @@ -31968,7 +32312,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3409", "kind": "string", @@ -31979,6 +32322,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" } @@ -31992,6 +32336,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" }, @@ -32000,13 +32345,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", "type": { "$ref": "842" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" }, @@ -32015,7 +32360,6 @@ "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3412", "kind": "nullable", @@ -32030,6 +32374,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" }, @@ -32038,7 +32383,6 @@ "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", "type": { "$id": "3415", "kind": "nullable", @@ -32065,6 +32409,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" }, @@ -32073,7 +32418,6 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", - "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", "type": { "$id": "3420", "kind": "nullable", @@ -32088,6 +32432,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" }, @@ -32096,7 +32441,6 @@ "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", - "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", "type": { "$id": "3423", "kind": "nullable", @@ -32111,6 +32455,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" }, @@ -32119,7 +32464,6 @@ "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", "type": { "$id": "3426", "kind": "nullable", @@ -32134,6 +32478,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" }, @@ -32142,7 +32487,6 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", - "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", "type": { "$id": "3429", "kind": "nullable", @@ -32157,6 +32501,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" }, @@ -32165,7 +32510,6 @@ "kind": "property", "name": "n", "serializedName": "n", - "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", "type": { "$id": "3432", "kind": "nullable", @@ -32180,6 +32524,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" }, @@ -32188,7 +32533,6 @@ "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3435", "kind": "nullable", @@ -32203,6 +32547,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" }, @@ -32211,7 +32556,6 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", "type": { "$id": "3438", "kind": "model", @@ -32234,6 +32578,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" }, @@ -32261,7 +32606,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `text`", "type": { "$id": "3444", "kind": "constant", @@ -32278,6 +32622,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" } @@ -32300,7 +32645,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_object`", "type": { "$id": "3448", "kind": "constant", @@ -32317,6 +32661,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" } @@ -32340,7 +32685,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", "type": { "$id": "3452", "kind": "constant", @@ -32357,6 +32701,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" }, @@ -32371,6 +32716,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" } @@ -32381,6 +32727,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" }, @@ -32389,7 +32736,6 @@ "kind": "property", "name": "seed", "serializedName": "seed", - "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { "$id": "3456", "kind": "nullable", @@ -32404,6 +32750,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" }, @@ -32412,7 +32759,6 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", - "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", "type": { "$id": "3459", "kind": "nullable", @@ -32423,6 +32769,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" }, @@ -32431,7 +32778,6 @@ "kind": "property", "name": "stop", "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens.", "type": { "$id": "3461", "kind": "nullable", @@ -32468,6 +32814,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" }, @@ -32476,7 +32823,6 @@ "kind": "property", "name": "stream", "serializedName": "stream", - "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { "$id": "3467", "kind": "nullable", @@ -32491,6 +32837,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" }, @@ -32509,6 +32856,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" }, @@ -32517,7 +32865,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { "$id": "3472", "kind": "nullable", @@ -32532,6 +32879,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" }, @@ -32540,7 +32888,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { "$id": "3475", "kind": "nullable", @@ -32555,6 +32902,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" }, @@ -32563,7 +32911,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", "type": { "$id": "3478", "kind": "array", @@ -32581,7 +32928,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3481", "kind": "constant", @@ -32594,6 +32940,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" }, @@ -32608,6 +32955,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" } @@ -32619,6 +32967,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" }, @@ -32641,7 +32990,6 @@ "name": "ChatCompletionNamedToolChoice", "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", "usage": "Input,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", "decorators": [], "properties": [ { @@ -32649,7 +32997,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3487", "kind": "constant", @@ -32662,6 +33009,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" }, @@ -32683,7 +33031,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3491", "kind": "string", @@ -32694,6 +33041,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" } @@ -32702,6 +33050,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" } @@ -32713,6 +33062,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" }, @@ -32731,6 +33081,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" }, @@ -32739,7 +33090,6 @@ "kind": "property", "name": "user", "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3495", "kind": "string", @@ -32750,6 +33100,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" }, @@ -32758,7 +33109,6 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", - "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", "type": { "$id": "3497", "kind": "union", @@ -32796,7 +33146,6 @@ "name": "ChatCompletionFunctionCallOption", "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", "usage": "Input,Json", - "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", "decorators": [], "properties": [ { @@ -32804,7 +33153,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3504", "kind": "string", @@ -32815,6 +33163,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" } @@ -32826,6 +33175,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" }, @@ -32834,7 +33184,6 @@ "kind": "property", "name": "functions", "serializedName": "functions", - "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", "type": { "$id": "3506", "kind": "array", @@ -32853,7 +33202,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", "type": { "$id": "3509", "kind": "string", @@ -32864,6 +33212,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" }, @@ -32872,7 +33221,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "3511", "kind": "string", @@ -32883,6 +33231,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" }, @@ -32897,6 +33246,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" } @@ -32908,6 +33258,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" } @@ -32985,7 +33336,6 @@ "name": "CreateChatCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", "usage": "Output,Json", - "description": "Represents a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -32993,7 +33343,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "A unique identifier for the chat completion.", "type": { "$id": "3515", "kind": "string", @@ -33004,6 +33353,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" }, @@ -33012,7 +33362,6 @@ "kind": "property", "name": "choices", "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { "$id": "3517", "kind": "array", @@ -33030,13 +33379,13 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { "$ref": "922" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" }, @@ -33045,7 +33394,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the choice in the list of choices.", "type": { "$id": "3521", "kind": "int32", @@ -33056,6 +33404,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" }, @@ -33070,7 +33419,6 @@ "name": "ChatCompletionResponseMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", "usage": "Output,Json", - "description": "A chat completion message generated by the model.", "decorators": [], "properties": [ { @@ -33078,7 +33426,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the message.", "type": { "$id": "3525", "kind": "nullable", @@ -33093,6 +33440,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" }, @@ -33101,7 +33449,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "The refusal message generated by the model.", "type": { "$id": "3528", "kind": "nullable", @@ -33116,6 +33463,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" }, @@ -33137,6 +33485,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" }, @@ -33145,7 +33494,6 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the author of this message.", "type": { "$id": "3533", "kind": "constant", @@ -33158,6 +33506,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" }, @@ -33166,7 +33515,6 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3535", "kind": "model", @@ -33180,7 +33528,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3537", "kind": "string", @@ -33191,6 +33538,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" }, @@ -33199,7 +33547,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3539", "kind": "string", @@ -33210,6 +33557,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" } @@ -33218,6 +33566,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" } @@ -33226,6 +33575,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" }, @@ -33234,7 +33584,6 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", - "description": "Log probability information for the choice.", "type": { "$id": "3541", "kind": "nullable", @@ -33251,7 +33600,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "A list of message content tokens with log probability information.", "type": { "$id": "3544", "kind": "nullable", @@ -33272,7 +33620,6 @@ "kind": "property", "name": "token", "serializedName": "token", - "description": "The token.", "type": { "$id": "3548", "kind": "string", @@ -33283,6 +33630,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" }, @@ -33291,7 +33639,6 @@ "kind": "property", "name": "logprob", "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { "$id": "3550", "kind": "float32", @@ -33302,6 +33649,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" }, @@ -33310,7 +33658,6 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { "$id": "3552", "kind": "nullable", @@ -33332,6 +33679,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" }, @@ -33340,7 +33688,6 @@ "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", - "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", "type": { "$id": "3556", "kind": "array", @@ -33358,7 +33705,6 @@ "kind": "property", "name": "token", "serializedName": "token", - "description": "The token.", "type": { "$id": "3559", "kind": "string", @@ -33369,6 +33715,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" }, @@ -33377,7 +33724,6 @@ "kind": "property", "name": "logprob", "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { "$id": "3561", "kind": "float32", @@ -33388,6 +33734,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" }, @@ -33396,7 +33743,6 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { "$id": "3563", "kind": "nullable", @@ -33418,6 +33764,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" } @@ -33429,6 +33776,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" } @@ -33441,6 +33789,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" }, @@ -33449,7 +33798,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", "type": { "$id": "3567", "kind": "nullable", @@ -33467,6 +33815,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" } @@ -33476,6 +33825,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" } @@ -33487,6 +33837,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" }, @@ -33495,7 +33846,6 @@ "kind": "property", "name": "created", "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { "$id": "3570", "kind": "utcDateTime", @@ -33514,6 +33864,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" }, @@ -33522,7 +33873,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model used for the chat completion.", "type": { "$id": "3573", "kind": "string", @@ -33533,6 +33883,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" }, @@ -33541,7 +33892,6 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { "$id": "3575", "kind": "nullable", @@ -33552,6 +33902,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" }, @@ -33560,7 +33911,6 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3577", "kind": "string", @@ -33571,6 +33921,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" }, @@ -33579,7 +33930,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", "type": { "$id": "3579", "kind": "constant", @@ -33592,6 +33942,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" }, @@ -33606,6 +33957,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" } @@ -33642,7 +33994,6 @@ "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", - "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", "type": { "$id": "3583", "kind": "string", @@ -33653,6 +34004,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" }, @@ -33661,13 +34013,13 @@ "kind": "property", "name": "endpoint", "serializedName": "endpoint", - "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", "type": { "$ref": "946" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" }, @@ -33676,7 +34028,6 @@ "kind": "property", "name": "completion_window", "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", "type": { "$id": "3586", "kind": "constant", @@ -33689,6 +34040,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" }, @@ -33697,7 +34049,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Optional custom metadata for the batch.", "type": { "$id": "3588", "kind": "nullable", @@ -33724,6 +34075,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" } @@ -33752,6 +34104,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.id" }, @@ -33760,7 +34113,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `batch`.", "type": { "$id": "3596", "kind": "constant", @@ -33773,6 +34125,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.object" }, @@ -33781,7 +34134,6 @@ "kind": "property", "name": "endpoint", "serializedName": "endpoint", - "description": "The OpenAI API endpoint used by the batch.", "type": { "$id": "3598", "kind": "string", @@ -33792,6 +34144,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" }, @@ -33813,7 +34166,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `list`.", "type": { "$id": "3602", "kind": "constant", @@ -33826,6 +34178,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" }, @@ -33851,7 +34204,6 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "An error code identifying the error type.", "type": { "$id": "3607", "kind": "string", @@ -33862,6 +34214,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" }, @@ -33870,7 +34223,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable message providing more details about the error.", "type": { "$id": "3609", "kind": "string", @@ -33881,6 +34233,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" }, @@ -33889,7 +34242,6 @@ "kind": "property", "name": "param", "serializedName": "param", - "description": "The name of the parameter that caused the error, if applicable.", "type": { "$id": "3611", "kind": "nullable", @@ -33904,6 +34256,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" }, @@ -33912,7 +34265,6 @@ "kind": "property", "name": "line", "serializedName": "line", - "description": "The line number of the input file where the error occurred, if applicable.", "type": { "$id": "3614", "kind": "nullable", @@ -33927,6 +34279,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" } @@ -33938,6 +34291,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" } @@ -33946,6 +34300,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.errors" }, @@ -33954,7 +34309,6 @@ "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", - "description": "The ID of the input file for the batch.", "type": { "$id": "3617", "kind": "string", @@ -33965,6 +34319,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" }, @@ -33973,7 +34328,6 @@ "kind": "property", "name": "completion_window", "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed.", "type": { "$id": "3619", "kind": "string", @@ -33984,6 +34338,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" }, @@ -33992,13 +34347,13 @@ "kind": "property", "name": "status", "serializedName": "status", - "description": "The current status of the batch.", "type": { "$ref": "961" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.status" }, @@ -34007,7 +34362,6 @@ "kind": "property", "name": "output_file_id", "serializedName": "output_file_id", - "description": "The ID of the file containing the outputs of successfully executed requests.", "type": { "$id": "3622", "kind": "string", @@ -34018,6 +34372,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" }, @@ -34026,7 +34381,6 @@ "kind": "property", "name": "error_file_id", "serializedName": "error_file_id", - "description": "The ID of the file containing the outputs of requests with errors.", "type": { "$id": "3624", "kind": "string", @@ -34037,6 +34391,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" }, @@ -34045,7 +34400,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the batch was created.", "type": { "$id": "3626", "kind": "utcDateTime", @@ -34064,6 +34418,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.created_at" }, @@ -34072,7 +34427,6 @@ "kind": "property", "name": "in_progress_at", "serializedName": "in_progress_at", - "description": "The Unix timestamp (in seconds) for when the batch started processing.", "type": { "$id": "3629", "kind": "utcDateTime", @@ -34091,6 +34445,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" }, @@ -34099,7 +34454,6 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the batch will expire.", "type": { "$id": "3632", "kind": "utcDateTime", @@ -34118,6 +34472,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" }, @@ -34126,7 +34481,6 @@ "kind": "property", "name": "finalizing_at", "serializedName": "finalizing_at", - "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", "type": { "$id": "3635", "kind": "utcDateTime", @@ -34145,6 +34499,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" }, @@ -34153,7 +34508,6 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the batch was completed.", "type": { "$id": "3638", "kind": "utcDateTime", @@ -34172,6 +34526,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" }, @@ -34180,7 +34535,6 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the batch failed.", "type": { "$id": "3641", "kind": "utcDateTime", @@ -34199,6 +34553,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" }, @@ -34207,7 +34562,6 @@ "kind": "property", "name": "expired_at", "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the batch expired.", "type": { "$id": "3644", "kind": "utcDateTime", @@ -34226,6 +34580,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" }, @@ -34234,7 +34589,6 @@ "kind": "property", "name": "cancelling_at", "serializedName": "cancelling_at", - "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", "type": { "$id": "3647", "kind": "utcDateTime", @@ -34253,6 +34607,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" }, @@ -34261,7 +34616,6 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", "type": { "$id": "3650", "kind": "utcDateTime", @@ -34280,6 +34634,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" }, @@ -34288,7 +34643,6 @@ "kind": "property", "name": "request_counts", "serializedName": "request_counts", - "description": "The request counts for different statuses within the batch.", "type": { "$id": "3653", "kind": "model", @@ -34302,7 +34656,6 @@ "kind": "property", "name": "total", "serializedName": "total", - "description": "Total number of requests in the batch.", "type": { "$id": "3655", "kind": "int32", @@ -34313,6 +34666,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" }, @@ -34321,7 +34675,6 @@ "kind": "property", "name": "completed", "serializedName": "completed", - "description": "Number of requests that have been completed successfully.", "type": { "$id": "3657", "kind": "int32", @@ -34332,6 +34685,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" }, @@ -34340,7 +34694,6 @@ "kind": "property", "name": "failed", "serializedName": "failed", - "description": "Number of requests that have failed.", "type": { "$id": "3659", "kind": "int32", @@ -34351,6 +34704,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" } @@ -34359,6 +34713,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" }, @@ -34367,7 +34722,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3661", "kind": "nullable", @@ -34394,6 +34748,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.Batch.metadata" } @@ -34434,6 +34789,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" }, @@ -34452,6 +34808,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" }, @@ -34470,6 +34827,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" }, @@ -34488,6 +34846,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" }, @@ -34508,6 +34867,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" } @@ -34526,13 +34886,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "982" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" }, @@ -34541,7 +34901,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3679", "kind": "nullable", @@ -34556,6 +34915,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" }, @@ -34564,7 +34924,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3682", "kind": "nullable", @@ -34579,6 +34938,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" }, @@ -34587,7 +34947,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3685", "kind": "nullable", @@ -34602,6 +34961,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" }, @@ -34610,7 +34970,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3688", "kind": "array", @@ -34624,6 +34983,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" }, @@ -34632,7 +34992,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3690", "kind": "nullable", @@ -34662,7 +35021,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3695", "kind": "array", @@ -34680,6 +35038,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" } @@ -34688,6 +35047,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" }, @@ -34702,6 +35062,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" } @@ -34711,6 +35072,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" }, @@ -34719,7 +35081,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3699", "kind": "nullable", @@ -34746,6 +35107,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" }, @@ -34754,7 +35116,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3704", "kind": "nullable", @@ -34769,6 +35130,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" }, @@ -34777,7 +35139,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3707", "kind": "nullable", @@ -34792,6 +35153,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" }, @@ -34837,6 +35199,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" } @@ -34854,7 +35217,6 @@ "name": "AssistantObject", "crossLanguageDefinitionId": "OpenAI.AssistantObject", "usage": "Output,Json", - "description": "Represents an `assistant` that can call the model and use tools.", "decorators": [], "properties": [ { @@ -34862,7 +35224,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "3716", "kind": "string", @@ -34873,6 +35234,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" }, @@ -34881,7 +35243,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `assistant`.", "type": { "$id": "3718", "kind": "constant", @@ -34894,6 +35255,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" }, @@ -34902,7 +35264,6 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the assistant was created.", "type": { "$id": "3720", "kind": "utcDateTime", @@ -34921,6 +35282,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" }, @@ -34929,7 +35291,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3723", "kind": "nullable", @@ -34944,6 +35305,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" }, @@ -34952,7 +35314,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3726", "kind": "nullable", @@ -34967,6 +35328,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" }, @@ -34975,7 +35337,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$id": "3729", "kind": "string", @@ -34986,6 +35347,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" }, @@ -34994,7 +35356,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3731", "kind": "nullable", @@ -35009,6 +35370,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" }, @@ -35017,7 +35379,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3734", "kind": "array", @@ -35031,6 +35392,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" }, @@ -35039,7 +35401,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3736", "kind": "nullable", @@ -35069,7 +35430,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3741", "kind": "array", @@ -35087,6 +35447,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" } @@ -35095,6 +35456,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" }, @@ -35109,6 +35471,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" } @@ -35118,6 +35481,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" }, @@ -35126,7 +35490,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3745", "kind": "nullable", @@ -35153,6 +35516,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" }, @@ -35161,7 +35525,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3750", "kind": "nullable", @@ -35176,6 +35539,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" }, @@ -35184,7 +35548,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3753", "kind": "nullable", @@ -35199,6 +35562,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" }, @@ -35244,6 +35608,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" } @@ -35280,6 +35645,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" }, @@ -35301,6 +35667,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" }, @@ -35319,6 +35686,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" }, @@ -35337,6 +35705,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" }, @@ -35355,6 +35724,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" } @@ -35373,7 +35743,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$id": "3773", "kind": "string", @@ -35384,6 +35753,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" }, @@ -35392,7 +35762,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3775", "kind": "nullable", @@ -35407,6 +35776,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" }, @@ -35415,7 +35785,6 @@ "kind": "property", "name": "description", "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3778", "kind": "nullable", @@ -35430,6 +35799,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" }, @@ -35438,7 +35808,6 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3781", "kind": "nullable", @@ -35453,6 +35822,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" }, @@ -35461,7 +35831,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3784", "kind": "array", @@ -35475,6 +35844,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" }, @@ -35483,7 +35853,6 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3786", "kind": "nullable", @@ -35513,7 +35882,6 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", - "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3791", "kind": "array", @@ -35531,6 +35899,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" } @@ -35539,6 +35908,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" }, @@ -35553,6 +35923,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" } @@ -35562,6 +35933,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" }, @@ -35570,7 +35942,6 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3795", "kind": "nullable", @@ -35597,6 +35968,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" }, @@ -35605,7 +35977,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3800", "kind": "nullable", @@ -35620,6 +35991,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" }, @@ -35628,7 +36000,6 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3803", "kind": "nullable", @@ -35643,6 +36014,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" }, @@ -35688,6 +36060,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" } @@ -35722,6 +36095,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" }, @@ -35740,6 +36114,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" }, @@ -35760,6 +36135,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" } @@ -35778,13 +36154,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", "type": { "$ref": "1045" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" }, @@ -35793,7 +36169,6 @@ "kind": "property", "name": "input", "serializedName": "input", - "description": "The text to generate audio for. The maximum length is 4096 characters.", "type": { "$id": "3820", "kind": "string", @@ -35804,6 +36179,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" }, @@ -35812,13 +36188,13 @@ "kind": "property", "name": "voice", "serializedName": "voice", - "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", "type": { "$ref": "1051" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" }, @@ -35827,13 +36203,13 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", "type": { "$ref": "1065" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" }, @@ -35842,7 +36218,6 @@ "kind": "property", "name": "speed", "serializedName": "speed", - "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", "type": { "$id": "3824", "kind": "float32", @@ -35853,6 +36228,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" } @@ -35871,7 +36247,6 @@ "kind": "property", "name": "file", "serializedName": "file", - "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { "$id": "3827", "kind": "bytes", @@ -35883,6 +36258,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" }, @@ -35891,13 +36267,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { "$ref": "1079" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" }, @@ -35906,7 +36282,6 @@ "kind": "property", "name": "language", "serializedName": "language", - "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", "type": { "$id": "3830", "kind": "string", @@ -35917,6 +36292,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" }, @@ -35925,7 +36301,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", "type": { "$id": "3832", "kind": "string", @@ -35936,6 +36311,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" }, @@ -35944,13 +36320,13 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { "$ref": "1083" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" }, @@ -35959,7 +36335,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { "$id": "3835", "kind": "float32", @@ -35970,6 +36345,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" }, @@ -35978,7 +36354,6 @@ "kind": "property", "name": "timestamp_granularities", "serializedName": "timestamp_granularities", - "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", "type": { "$id": "3837", "kind": "array", @@ -35992,6 +36367,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" } @@ -36003,7 +36379,6 @@ "name": "CreateTranscriptionResponseVerboseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", "usage": "Output,Json", - "description": "Represents a verbose json transcription response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -36011,7 +36386,6 @@ "kind": "property", "name": "task", "serializedName": "task", - "description": "The task label.", "type": { "$id": "3840", "kind": "constant", @@ -36024,6 +36398,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" }, @@ -36032,7 +36407,6 @@ "kind": "property", "name": "language", "serializedName": "language", - "description": "The language of the input audio.", "type": { "$id": "3842", "kind": "string", @@ -36043,6 +36417,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" }, @@ -36051,7 +36426,6 @@ "kind": "property", "name": "duration", "serializedName": "duration", - "description": "The duration of the input audio.", "type": { "$id": "3844", "kind": "duration", @@ -36070,6 +36444,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" }, @@ -36078,7 +36453,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The transcribed text.", "type": { "$id": "3847", "kind": "string", @@ -36089,6 +36463,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" }, @@ -36097,7 +36472,6 @@ "kind": "property", "name": "words", "serializedName": "words", - "description": "Extracted words and their corresponding timestamps.", "type": { "$id": "3849", "kind": "array", @@ -36115,7 +36489,6 @@ "kind": "property", "name": "word", "serializedName": "word", - "description": "The text content of the word.", "type": { "$id": "3852", "kind": "string", @@ -36126,6 +36499,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" }, @@ -36134,7 +36508,6 @@ "kind": "property", "name": "start", "serializedName": "start", - "description": "Start time of the word in seconds.", "type": { "$id": "3854", "kind": "duration", @@ -36153,6 +36526,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" }, @@ -36161,7 +36535,6 @@ "kind": "property", "name": "end", "serializedName": "end", - "description": "End time of the word in seconds.", "type": { "$id": "3857", "kind": "duration", @@ -36180,6 +36553,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" } @@ -36191,6 +36565,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" }, @@ -36199,7 +36574,6 @@ "kind": "property", "name": "segments", "serializedName": "segments", - "description": "Segments of the transcribed text and their corresponding details.", "type": { "$id": "3860", "kind": "array", @@ -36217,7 +36591,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "Unique identifier of the segment.", "type": { "$id": "3863", "kind": "int32", @@ -36228,6 +36601,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" }, @@ -36236,7 +36610,6 @@ "kind": "property", "name": "seek", "serializedName": "seek", - "description": "Seek offset of the segment.", "type": { "$id": "3865", "kind": "int32", @@ -36247,6 +36620,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" }, @@ -36255,7 +36629,6 @@ "kind": "property", "name": "start", "serializedName": "start", - "description": "Start time of the segment in seconds.", "type": { "$id": "3867", "kind": "duration", @@ -36274,6 +36647,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" }, @@ -36282,7 +36656,6 @@ "kind": "property", "name": "end", "serializedName": "end", - "description": "End time of the segment in seconds.", "type": { "$id": "3870", "kind": "duration", @@ -36301,6 +36674,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" }, @@ -36309,7 +36683,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "Text content of the segment.", "type": { "$id": "3873", "kind": "string", @@ -36320,6 +36693,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" }, @@ -36328,7 +36702,6 @@ "kind": "property", "name": "tokens", "serializedName": "tokens", - "description": "Array of token IDs for the text content.", "type": { "$id": "3875", "kind": "array", @@ -36346,6 +36719,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" }, @@ -36354,7 +36728,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "Temperature parameter used for generating the segment.", "type": { "$id": "3878", "kind": "float32", @@ -36365,6 +36738,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" }, @@ -36373,7 +36747,6 @@ "kind": "property", "name": "avg_logprob", "serializedName": "avg_logprob", - "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", "type": { "$id": "3880", "kind": "float32", @@ -36384,6 +36757,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" }, @@ -36392,7 +36766,6 @@ "kind": "property", "name": "compression_ratio", "serializedName": "compression_ratio", - "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", "type": { "$id": "3882", "kind": "float32", @@ -36403,6 +36776,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" }, @@ -36411,7 +36785,6 @@ "kind": "property", "name": "no_speech_prob", "serializedName": "no_speech_prob", - "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", "type": { "$id": "3884", "kind": "float32", @@ -36422,6 +36795,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" } @@ -36433,6 +36807,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" } @@ -36450,7 +36825,6 @@ "name": "CreateTranscriptionResponseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", "usage": "Output,Json", - "description": "Represents a transcription response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -36458,7 +36832,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The transcribed text.", "type": { "$id": "3887", "kind": "string", @@ -36469,6 +36842,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" } @@ -36487,7 +36861,6 @@ "kind": "property", "name": "file", "serializedName": "file", - "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { "$id": "3890", "kind": "bytes", @@ -36499,6 +36872,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" }, @@ -36507,13 +36881,13 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { "$ref": "1104" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" }, @@ -36522,7 +36896,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", "type": { "$id": "3893", "kind": "string", @@ -36533,6 +36906,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" }, @@ -36541,13 +36915,13 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { "$ref": "1108" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" }, @@ -36556,7 +36930,6 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { "$id": "3896", "kind": "float32", @@ -36567,6 +36940,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" } @@ -36585,7 +36959,6 @@ "kind": "property", "name": "task", "serializedName": "task", - "description": "The task label.", "type": { "$id": "3899", "kind": "constant", @@ -36598,6 +36971,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" }, @@ -36606,7 +36980,6 @@ "kind": "property", "name": "language", "serializedName": "language", - "description": "The language of the output translation (always `english`).", "type": { "$id": "3901", "kind": "string", @@ -36617,6 +36990,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" }, @@ -36625,7 +36999,6 @@ "kind": "property", "name": "duration", "serializedName": "duration", - "description": "The duration of the input audio.", "type": { "$id": "3903", "kind": "duration", @@ -36644,6 +37017,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" }, @@ -36652,7 +37026,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The translated text.", "type": { "$id": "3906", "kind": "string", @@ -36663,6 +37036,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" }, @@ -36671,7 +37045,6 @@ "kind": "property", "name": "segments", "serializedName": "segments", - "description": "Segments of the translated text and their corresponding details.", "type": { "$id": "3908", "kind": "array", @@ -36685,6 +37058,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" } @@ -36713,6 +37087,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" } @@ -36741,6 +37116,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" }, @@ -36768,7 +37144,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `text`", "type": { "$id": "3918", "kind": "constant", @@ -36785,6 +37160,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" } @@ -36807,7 +37183,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_object`", "type": { "$id": "3922", "kind": "constant", @@ -36824,6 +37199,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" } @@ -36846,7 +37222,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", "type": { "$id": "3926", "kind": "constant", @@ -36863,6 +37238,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" }, @@ -36877,6 +37253,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" } @@ -36900,7 +37277,6 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", "access": "public", "usage": "Input", - "description": "The per-line object of the batch input file", "decorators": [], "properties": [ { @@ -36908,7 +37284,6 @@ "kind": "property", "name": "custom_id", "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", "type": { "$id": "3931", "kind": "string", @@ -36919,6 +37294,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" }, @@ -36927,7 +37303,6 @@ "kind": "property", "name": "method", "serializedName": "method", - "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", "type": { "$id": "3933", "kind": "constant", @@ -36940,6 +37315,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" }, @@ -36948,7 +37324,6 @@ "kind": "property", "name": "url", "serializedName": "url", - "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", "type": { "$id": "3935", "kind": "url", @@ -36959,6 +37334,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" } @@ -36971,7 +37347,6 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", "access": "public", "usage": "Output", - "description": "The per-line object of the batch output and error files", "decorators": [], "properties": [ { @@ -36987,8 +37362,9 @@ "decorators": [] }, "optional": true, - "readOnly": false, + "readOnly": true, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" }, @@ -36997,7 +37373,6 @@ "kind": "property", "name": "custom_id", "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs.", "type": { "$id": "3940", "kind": "string", @@ -37008,6 +37383,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" }, @@ -37032,7 +37408,6 @@ "kind": "property", "name": "status_code", "serializedName": "status_code", - "description": "The HTTP status code of the response", "type": { "$id": "3945", "kind": "int32", @@ -37043,6 +37418,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" }, @@ -37051,7 +37427,6 @@ "kind": "property", "name": "request_id", "serializedName": "request_id", - "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", "type": { "$id": "3947", "kind": "string", @@ -37062,6 +37437,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" }, @@ -37070,7 +37446,6 @@ "kind": "property", "name": "body", "serializedName": "body", - "description": "The JSON body of the response", "type": { "$id": "3949", "kind": "dict", @@ -37093,6 +37468,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" } @@ -37102,6 +37478,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" }, @@ -37110,7 +37487,6 @@ "kind": "property", "name": "error", "serializedName": "error", - "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", "type": { "$id": "3953", "kind": "nullable", @@ -37127,7 +37503,6 @@ "kind": "property", "name": "code", "serializedName": "code", - "description": "A machine-readable error code.", "type": { "$id": "3956", "kind": "string", @@ -37138,6 +37513,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" }, @@ -37146,7 +37522,6 @@ "kind": "property", "name": "message", "serializedName": "message", - "description": "A human-readable error message.", "type": { "$id": "3958", "kind": "string", @@ -37157,6 +37532,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" } @@ -37166,6 +37542,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" } @@ -37224,7 +37601,6 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", "access": "public", "usage": "Output", - "description": "Represents a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -37232,7 +37608,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "A unique identifier for the chat completion.", "type": { "$id": "3965", "kind": "string", @@ -37243,6 +37618,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" }, @@ -37251,7 +37627,6 @@ "kind": "property", "name": "choices", "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { "$id": "3967", "kind": "array", @@ -37269,13 +37644,13 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", "type": { "$ref": "1126" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" }, @@ -37284,7 +37659,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the choice in the list of choices.", "type": { "$id": "3971", "kind": "int32", @@ -37295,6 +37669,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" }, @@ -37309,6 +37684,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" } @@ -37320,6 +37696,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" }, @@ -37328,7 +37705,6 @@ "kind": "property", "name": "created", "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { "$id": "3974", "kind": "utcDateTime", @@ -37347,6 +37723,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" }, @@ -37355,7 +37732,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model used for the chat completion.", "type": { "$id": "3977", "kind": "string", @@ -37366,6 +37742,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" }, @@ -37374,7 +37751,6 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3979", "kind": "string", @@ -37385,6 +37761,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" }, @@ -37393,7 +37770,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", "type": { "$id": "3981", "kind": "constant", @@ -37406,6 +37782,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" }, @@ -37420,6 +37797,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" } @@ -37434,7 +37812,6 @@ "name": "ChatCompletionStreamResponseDelta", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", "usage": "Output", - "description": "A chat completion delta generated by streamed model responses.", "decorators": [], "properties": [ { @@ -37442,7 +37819,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The contents of the chunk message.", "type": { "$id": "3985", "kind": "nullable", @@ -37457,6 +37833,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" }, @@ -37465,7 +37842,6 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3988", "kind": "model", @@ -37479,7 +37855,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "3990", "kind": "string", @@ -37490,6 +37865,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" }, @@ -37498,7 +37874,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3992", "kind": "string", @@ -37509,6 +37884,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" } @@ -37517,6 +37893,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" }, @@ -37552,6 +37929,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" }, @@ -37560,7 +37938,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call.", "type": { "$id": "3999", "kind": "string", @@ -37571,6 +37948,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" }, @@ -37579,7 +37957,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "4001", "kind": "constant", @@ -37592,6 +37969,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" }, @@ -37613,7 +37991,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function to call.", "type": { "$id": "4005", "kind": "string", @@ -37624,6 +38001,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" }, @@ -37632,7 +38010,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "4007", "kind": "string", @@ -37643,6 +38020,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" } @@ -37651,6 +38029,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" } @@ -37662,6 +38041,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" }, @@ -37670,13 +38050,13 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The role of the author of this message.", "type": { "$ref": "1142" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" }, @@ -37685,7 +38065,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "The refusal message generated by the model.", "type": { "$id": "4010", "kind": "nullable", @@ -37700,6 +38079,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" } @@ -37721,7 +38101,6 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", "access": "public", "usage": "Output", - "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -37729,7 +38108,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "A unique identifier for the chat completion. Each chunk has the same ID.", "type": { "$id": "4014", "kind": "string", @@ -37740,6 +38118,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" }, @@ -37748,7 +38127,6 @@ "kind": "property", "name": "choices", "serializedName": "choices", - "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", "type": { "$id": "4016", "kind": "array", @@ -37772,6 +38150,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" }, @@ -37780,7 +38159,6 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", - "description": "Log probability information for the choice.", "type": { "$id": "4020", "kind": "nullable", @@ -37797,7 +38175,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "A list of message content tokens with log probability information.", "type": { "$id": "4023", "kind": "nullable", @@ -37815,6 +38192,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" }, @@ -37823,7 +38201,6 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", "type": { "$id": "4026", "kind": "nullable", @@ -37841,6 +38218,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" } @@ -37850,6 +38228,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" }, @@ -37858,7 +38237,6 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { "$id": "4029", "kind": "nullable", @@ -37869,6 +38247,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" }, @@ -37877,7 +38256,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the choice in the list of choices.", "type": { "$id": "4031", "kind": "int32", @@ -37888,6 +38266,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" } @@ -37899,6 +38278,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" }, @@ -37907,7 +38287,6 @@ "kind": "property", "name": "created", "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", "type": { "$id": "4033", "kind": "utcDateTime", @@ -37926,6 +38305,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" }, @@ -37934,7 +38314,6 @@ "kind": "property", "name": "model", "serializedName": "model", - "description": "The model to generate the completion.", "type": { "$id": "4036", "kind": "string", @@ -37945,6 +38324,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" }, @@ -37953,7 +38333,6 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { "$id": "4038", "kind": "nullable", @@ -37964,6 +38343,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" }, @@ -37972,7 +38352,6 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "4040", "kind": "string", @@ -37983,6 +38362,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" }, @@ -37991,7 +38371,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `chat.completion.chunk`.", "type": { "$id": "4042", "kind": "constant", @@ -38004,6 +38383,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" }, @@ -38012,7 +38392,6 @@ "kind": "property", "name": "usage", "serializedName": "usage", - "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", "type": { "$id": "4044", "kind": "model", @@ -38026,7 +38405,6 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", "type": { "$id": "4046", "kind": "int32", @@ -38037,6 +38415,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" }, @@ -38045,7 +38424,6 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", "type": { "$id": "4048", "kind": "int32", @@ -38056,6 +38434,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" }, @@ -38064,7 +38443,6 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", "type": { "$id": "4050", "kind": "int32", @@ -38075,6 +38453,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" } @@ -38083,6 +38462,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" } @@ -38104,7 +38484,6 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", "access": "public", "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for chat models", "decorators": [], "properties": [ { @@ -38154,6 +38533,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" }, @@ -38162,7 +38542,6 @@ "kind": "property", "name": "tools", "serializedName": "tools", - "description": "A list of tools the model may generate JSON inputs for.", "type": { "$id": "4057", "kind": "array", @@ -38176,6 +38555,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" }, @@ -38194,6 +38574,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" }, @@ -38202,7 +38583,6 @@ "kind": "property", "name": "functions", "serializedName": "functions", - "description": "A list of functions the model may generate JSON inputs for.", "type": { "$id": "4061", "kind": "array", @@ -38216,6 +38596,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" } @@ -38231,7 +38612,6 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", "access": "public", "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for completions models", "decorators": [], "properties": [ { @@ -38239,7 +38619,6 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", - "description": "The input prompt for this training example.", "type": { "$id": "4064", "kind": "string", @@ -38250,6 +38629,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" }, @@ -38258,7 +38638,6 @@ "kind": "property", "name": "completion", "serializedName": "completion", - "description": "The desired completion for this training example.", "type": { "$id": "4066", "kind": "string", @@ -38269,6 +38648,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" } @@ -38287,7 +38667,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the content item.", "type": { "$id": "4069", "kind": "string", @@ -38298,6 +38677,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" }, @@ -38315,7 +38695,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", "access": "public", "usage": "Input,Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", "discriminatorValue": "file_citation", "decorators": [], "baseModel": { @@ -38327,7 +38706,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `file_citation`.", "type": { "$id": "4073", "kind": "constant", @@ -38344,6 +38722,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" }, @@ -38352,7 +38731,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4076", "kind": "string", @@ -38363,6 +38741,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" }, @@ -38384,7 +38763,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", "type": { "$id": "4080", "kind": "string", @@ -38395,6 +38773,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" } @@ -38403,6 +38782,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" }, @@ -38421,6 +38801,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" }, @@ -38439,6 +38820,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" } @@ -38451,7 +38833,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", "access": "public", "usage": "Input,Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", "discriminatorValue": "file_path", "decorators": [], "baseModel": { @@ -38463,7 +38844,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `file_path`.", "type": { "$id": "4087", "kind": "constant", @@ -38480,6 +38860,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" }, @@ -38488,7 +38869,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4090", "kind": "string", @@ -38499,6 +38879,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" }, @@ -38520,7 +38901,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the file that was generated.", "type": { "$id": "4094", "kind": "string", @@ -38531,6 +38911,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" } @@ -38539,6 +38920,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" }, @@ -38557,6 +38939,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" }, @@ -38575,6 +38958,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" } @@ -38601,14 +38985,12 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", "access": "public", "usage": "Output", - "description": "Represents a single piece of incremental content in an Assistants API streaming response.", "decorators": [], "discriminatorProperty": { "$id": "4100", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the content item.", "type": { "$id": "4101", "kind": "string", @@ -38619,6 +39001,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" }, @@ -38636,7 +39019,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", "access": "public", "usage": "Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", "discriminatorValue": "image_file", "decorators": [], "baseModel": { @@ -38648,7 +39030,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the content part in the message.", "type": { "$id": "4105", "kind": "int32", @@ -38659,6 +39040,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" }, @@ -38667,7 +39049,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `image_file`.", "type": { "$id": "4107", "kind": "constant", @@ -38684,6 +39065,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" }, @@ -38705,7 +39087,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { "$id": "4112", "kind": "string", @@ -38716,6 +39097,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" }, @@ -38724,13 +39106,13 @@ "kind": "property", "name": "detail", "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1173" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" } @@ -38739,6 +39121,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" } @@ -38751,7 +39134,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", "access": "public", "usage": "Output", - "description": "References an image URL in the content of a message.", "discriminatorValue": "image_url", "decorators": [], "baseModel": { @@ -38763,7 +39145,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the content part in the message.", "type": { "$id": "4116", "kind": "int32", @@ -38774,6 +39155,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" }, @@ -38782,7 +39164,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `image_url`.", "type": { "$id": "4118", "kind": "constant", @@ -38799,6 +39180,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" }, @@ -38820,7 +39202,6 @@ "kind": "property", "name": "url", "serializedName": "url", - "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { "$id": "4123", "kind": "url", @@ -38831,6 +39212,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" }, @@ -38839,13 +39221,13 @@ "kind": "property", "name": "detail", "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1181" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" } @@ -38854,6 +39236,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" } @@ -38866,7 +39249,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", "access": "public", "usage": "Output", - "description": "The text content that is part of a message.", "discriminatorValue": "text", "decorators": [], "baseModel": { @@ -38878,7 +39260,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the content part in the message.", "type": { "$id": "4127", "kind": "int32", @@ -38889,6 +39270,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" }, @@ -38897,7 +39279,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `text`.", "type": { "$id": "4129", "kind": "constant", @@ -38914,6 +39295,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" }, @@ -38935,7 +39317,6 @@ "kind": "property", "name": "value", "serializedName": "value", - "description": "The data that makes up the text.", "type": { "$id": "4134", "kind": "string", @@ -38946,6 +39327,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" }, @@ -38971,7 +39353,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the content item.", "type": { "$id": "4139", "kind": "string", @@ -38982,6 +39363,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" }, @@ -38999,7 +39381,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", "access": "public", "usage": "Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", "discriminatorValue": "file_citation", "decorators": [], "baseModel": { @@ -39011,7 +39392,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the annotation in the text content part.", "type": { "$id": "4143", "kind": "int32", @@ -39022,6 +39402,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" }, @@ -39030,7 +39411,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `file_citation`.", "type": { "$id": "4145", "kind": "constant", @@ -39047,6 +39427,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" }, @@ -39055,7 +39436,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4148", "kind": "string", @@ -39066,6 +39446,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" }, @@ -39087,7 +39468,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", "type": { "$id": "4152", "kind": "string", @@ -39098,6 +39478,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" }, @@ -39106,7 +39487,6 @@ "kind": "property", "name": "quote", "serializedName": "quote", - "description": "The specific quote in the file.", "type": { "$id": "4154", "kind": "string", @@ -39117,6 +39497,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" } @@ -39125,6 +39506,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" }, @@ -39143,6 +39525,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" }, @@ -39161,6 +39544,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" } @@ -39173,7 +39557,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", "access": "public", "usage": "Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", "discriminatorValue": "file_path", "decorators": [], "baseModel": { @@ -39185,7 +39568,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the annotation in the text content part.", "type": { "$id": "4161", "kind": "int32", @@ -39196,6 +39578,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" }, @@ -39204,7 +39587,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `file_path`.", "type": { "$id": "4163", "kind": "constant", @@ -39221,6 +39603,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" }, @@ -39229,7 +39612,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4166", "kind": "string", @@ -39240,6 +39622,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" }, @@ -39261,7 +39644,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The ID of the file that was generated.", "type": { "$id": "4170", "kind": "string", @@ -39272,6 +39654,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" } @@ -39280,6 +39663,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" }, @@ -39298,6 +39682,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" }, @@ -39316,6 +39701,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" } @@ -39329,6 +39715,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" } @@ -39337,6 +39724,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" } @@ -39348,7 +39736,6 @@ "name": "MessageDeltaContentRefusalObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", "usage": "Output", - "description": "The refusal content that is part of a message.", "discriminatorValue": "refusal", "decorators": [], "baseModel": { @@ -39360,7 +39747,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the refusal part in the message.", "type": { "$id": "4177", "kind": "int32", @@ -39371,6 +39757,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" }, @@ -39379,7 +39766,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `refusal`.", "type": { "$id": "4179", "kind": "constant", @@ -39396,6 +39782,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" }, @@ -39414,6 +39801,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" } @@ -39464,7 +39852,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", "access": "public", "usage": "Input,Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39475,7 +39862,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `image_file`.", "type": { "$id": "4185", "kind": "constant", @@ -39488,6 +39874,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" }, @@ -39509,7 +39896,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { "$id": "4189", "kind": "string", @@ -39520,6 +39906,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" }, @@ -39528,13 +39915,13 @@ "kind": "property", "name": "detail", "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1192" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" } @@ -39543,6 +39930,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" } @@ -39558,7 +39946,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", "access": "public", "usage": "Input,Output", - "description": "The text content that is part of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39569,7 +39956,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `text`.", "type": { "$id": "4193", "kind": "constant", @@ -39582,6 +39968,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" }, @@ -39603,7 +39990,6 @@ "kind": "property", "name": "value", "serializedName": "value", - "description": "The data that makes up the text.", "type": { "$id": "4197", "kind": "string", @@ -39614,6 +40000,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" }, @@ -39635,6 +40022,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" } @@ -39643,6 +40031,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" } @@ -39658,7 +40047,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", "access": "public", "usage": "Input,Output", - "description": "The refusal content generated by the assistant.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39669,7 +40057,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `refusal`.", "type": { "$id": "4202", "kind": "constant", @@ -39682,6 +40069,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" }, @@ -39700,6 +40088,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" } @@ -39712,7 +40101,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", "access": "public", "usage": "Input,Output", - "description": "References an image URL in the content of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39723,7 +40111,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of the content part.", "type": { "$id": "4207", "kind": "constant", @@ -39736,6 +40123,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" }, @@ -39757,7 +40145,6 @@ "kind": "property", "name": "url", "serializedName": "url", - "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { "$id": "4211", "kind": "url", @@ -39768,6 +40155,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" }, @@ -39776,13 +40164,13 @@ "kind": "property", "name": "detail", "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", "type": { "$ref": "1209" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" } @@ -39791,6 +40179,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" } @@ -39806,7 +40195,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", "access": "public", "usage": "Output", - "description": "Represents a message delta i.e. any changed fields on a message during streaming.", "decorators": [], "properties": [ { @@ -39814,7 +40202,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier of the message, which can be referenced in API endpoints.", "type": { "$id": "4215", "kind": "string", @@ -39825,6 +40212,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" }, @@ -39833,7 +40221,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread.message.delta`.", "type": { "$id": "4217", "kind": "constant", @@ -39846,6 +40233,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" }, @@ -39854,7 +40242,6 @@ "kind": "property", "name": "delta", "serializedName": "delta", - "description": "The delta containing the fields that have changed on the Message.", "type": { "$id": "4219", "kind": "model", @@ -39868,13 +40255,13 @@ "kind": "property", "name": "role", "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { "$ref": "1220" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" }, @@ -39883,7 +40270,6 @@ "kind": "property", "name": "content", "serializedName": "content", - "description": "The content of the message in array of text and/or images.", "type": { "$id": "4222", "kind": "array", @@ -39897,6 +40283,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" } @@ -39905,6 +40292,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" } @@ -39920,7 +40308,6 @@ "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", "access": "public", "usage": "Input,Output", - "description": "The text content that is part of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39931,7 +40318,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `text`.", "type": { "$id": "4225", "kind": "constant", @@ -39944,6 +40330,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" }, @@ -39952,7 +40339,6 @@ "kind": "property", "name": "text", "serializedName": "text", - "description": "Text content to be sent to the model", "type": { "$id": "4227", "kind": "string", @@ -39963,6 +40349,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" } @@ -39980,7 +40367,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "4230", "kind": "string", @@ -39991,6 +40377,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" }, @@ -40008,7 +40395,6 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", "access": "public", "usage": "Output", - "description": "Details of the message creation by the run step.", "discriminatorValue": "message_creation", "decorators": [], "baseModel": { @@ -40020,7 +40406,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `message_creation`.", "type": { "$id": "4234", "kind": "constant", @@ -40037,6 +40422,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" }, @@ -40058,7 +40444,6 @@ "kind": "property", "name": "message_id", "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", "type": { "$id": "4239", "kind": "string", @@ -40069,6 +40454,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" } @@ -40077,6 +40463,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" } @@ -40089,7 +40476,6 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", "access": "public", "usage": "Output", - "description": "Details of the tool call.", "discriminatorValue": "tool_calls", "decorators": [], "baseModel": { @@ -40101,7 +40487,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `tool_calls`.", "type": { "$id": "4242", "kind": "constant", @@ -40118,6 +40503,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" }, @@ -40126,7 +40512,6 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "4245", "kind": "array", @@ -40137,14 +40522,12 @@ "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "usage": "Output", - "description": "Abstractly represents a run step tool call details inner object.", "decorators": [], "discriminatorProperty": { "$id": "4247", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "4248", "kind": "string", @@ -40155,6 +40538,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" }, @@ -40172,7 +40556,6 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", "access": "public", "usage": "Output", - "description": "Details of the Code Interpreter tool call the run step was involved in.", "discriminatorValue": "code_interpreter", "decorators": [], "baseModel": { @@ -40184,7 +40567,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4252", "kind": "int32", @@ -40195,6 +40577,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" }, @@ -40203,7 +40586,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call.", "type": { "$id": "4254", "kind": "string", @@ -40214,6 +40596,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" }, @@ -40222,7 +40605,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", "type": { "$id": "4256", "kind": "constant", @@ -40239,6 +40621,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" }, @@ -40247,7 +40630,6 @@ "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", "type": { "$id": "4259", "kind": "model", @@ -40261,7 +40643,6 @@ "kind": "property", "name": "input", "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", "type": { "$id": "4261", "kind": "string", @@ -40272,6 +40653,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" }, @@ -40280,7 +40662,6 @@ "kind": "property", "name": "outputs", "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", "type": { "$id": "4263", "kind": "array", @@ -40291,14 +40672,12 @@ "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "usage": "Output", - "description": "Abstractly represents a run step tool call details code interpreter output.", "decorators": [], "discriminatorProperty": { "$id": "4265", "kind": "property", "name": "type", "serializedName": "type", - "description": "The discriminated type identifier for the details object.", "type": { "$id": "4266", "kind": "string", @@ -40309,6 +40688,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" }, @@ -40326,7 +40706,6 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", "access": "public", "usage": "Output", - "description": "Text output from the Code Interpreter tool call as part of a run step.", "discriminatorValue": "logs", "decorators": [], "baseModel": { @@ -40338,7 +40717,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the output in the outputs array.", "type": { "$id": "4270", "kind": "int32", @@ -40349,6 +40727,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" }, @@ -40357,7 +40736,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `logs`.", "type": { "$id": "4272", "kind": "constant", @@ -40374,6 +40752,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" }, @@ -40382,7 +40761,6 @@ "kind": "property", "name": "logs", "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", "type": { "$id": "4275", "kind": "string", @@ -40393,6 +40771,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" } @@ -40416,7 +40795,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the output in the outputs array.", "type": { "$id": "4278", "kind": "int32", @@ -40427,6 +40805,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" }, @@ -40435,7 +40814,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "Always `image`.", "type": { "$id": "4280", "kind": "constant", @@ -40452,6 +40830,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" }, @@ -40473,7 +40852,6 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", "type": { "$id": "4285", "kind": "string", @@ -40484,6 +40862,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" } @@ -40492,6 +40871,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" } @@ -40505,6 +40885,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" } @@ -40513,6 +40894,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" } @@ -40536,7 +40918,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4288", "kind": "int32", @@ -40547,6 +40928,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" }, @@ -40555,7 +40937,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call object.", "type": { "$id": "4290", "kind": "string", @@ -40566,6 +40947,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" }, @@ -40574,7 +40956,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", "type": { "$id": "4292", "kind": "constant", @@ -40591,6 +40972,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" }, @@ -40599,7 +40981,6 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", "type": { "$id": "4295", "kind": "dict", @@ -40622,6 +41003,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" } @@ -40645,7 +41027,6 @@ "kind": "property", "name": "index", "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4300", "kind": "int32", @@ -40656,6 +41037,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" }, @@ -40664,7 +41046,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The ID of the tool call object.", "type": { "$id": "4302", "kind": "string", @@ -40675,6 +41056,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" }, @@ -40683,7 +41065,6 @@ "kind": "property", "name": "type", "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", "type": { "$id": "4304", "kind": "constant", @@ -40700,6 +41081,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" }, @@ -40708,7 +41090,6 @@ "kind": "property", "name": "function", "serializedName": "function", - "description": "The definition of the function that was called.", "type": { "$id": "4307", "kind": "model", @@ -40722,7 +41103,6 @@ "kind": "property", "name": "name", "serializedName": "name", - "description": "The name of the function.", "type": { "$id": "4309", "kind": "string", @@ -40733,6 +41113,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" }, @@ -40741,7 +41122,6 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", - "description": "The arguments passed to the function.", "type": { "$id": "4311", "kind": "string", @@ -40752,6 +41132,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" }, @@ -40760,7 +41141,6 @@ "kind": "property", "name": "output", "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", "type": { "$id": "4313", "kind": "nullable", @@ -40775,6 +41155,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" } @@ -40783,6 +41164,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" } @@ -40796,6 +41178,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" } @@ -40849,7 +41232,6 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", "access": "public", "usage": "Output", - "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", "decorators": [], "properties": [ { @@ -40857,7 +41239,6 @@ "kind": "property", "name": "id", "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", "type": { "$id": "4317", "kind": "string", @@ -40868,6 +41249,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" }, @@ -40876,7 +41258,6 @@ "kind": "property", "name": "object", "serializedName": "object", - "description": "The object type, which is always `thread.run.step.delta`.", "type": { "$id": "4319", "kind": "constant", @@ -40889,6 +41270,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" }, @@ -40897,7 +41279,6 @@ "kind": "property", "name": "delta", "serializedName": "delta", - "description": "The delta containing the fields that have changed on the run step.", "type": { "$id": "4321", "kind": "model", @@ -40911,13 +41292,13 @@ "kind": "property", "name": "step_details", "serializedName": "step_details", - "description": "The details of the run step.", "type": { "$ref": "4228" }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" } @@ -40926,6 +41307,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" } @@ -40970,6 +41352,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" }, @@ -40991,6 +41374,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" }, @@ -41009,6 +41393,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" }, @@ -41027,6 +41412,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" }, @@ -41045,6 +41431,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" } @@ -41055,7 +41442,6 @@ { "$id": "4335", "Name": "OpenAIClient", - "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", "Operations": [], "Protocol": { "$id": "4336" @@ -41166,7 +41552,6 @@ "$id": "4350", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4351", "kind": "constant", @@ -41228,7 +41613,6 @@ "$id": "4356", "Name": "transferEncoding", "NameInResponse": "Transfer-Encoding", - "Description": "chunked", "Type": { "$id": "4357", "kind": "string", @@ -41633,7 +42017,6 @@ "$id": "4397", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4398", "kind": "constant", @@ -41746,7 +42129,6 @@ "$id": "4406", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4407", "kind": "int32", @@ -41768,7 +42150,6 @@ "$id": "4408", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "1033" }, @@ -41786,7 +42167,6 @@ "$id": "4409", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4410", "kind": "string", @@ -41808,7 +42188,6 @@ "$id": "4411", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4412", "kind": "string", @@ -41895,7 +42274,6 @@ "$id": "4418", "Name": "assistant_id", "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to retrieve.", "Type": { "$id": "4419", "kind": "string", @@ -41982,7 +42360,6 @@ "$id": "4425", "Name": "assistant_id", "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to modify.", "Type": { "$id": "4426", "kind": "string", @@ -42004,7 +42381,6 @@ "$id": "4427", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4428", "kind": "constant", @@ -42117,7 +42493,6 @@ "$id": "4436", "Name": "assistant_id", "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to delete.", "Type": { "$id": "4437", "kind": "string", @@ -42247,7 +42622,6 @@ "$id": "4449", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4450", "kind": "constant", @@ -42360,7 +42734,6 @@ "$id": "4458", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4459", "kind": "string", @@ -42382,7 +42755,6 @@ "$id": "4460", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4461", "kind": "int32", @@ -42469,7 +42841,6 @@ "$id": "4467", "Name": "batch_id", "NameInRequest": "batch_id", - "Description": "The ID of the batch to retrieve.", "Type": { "$id": "4468", "kind": "string", @@ -42556,7 +42927,6 @@ "$id": "4474", "Name": "batch_id", "NameInRequest": "batch_id", - "Description": "The ID of the batch to cancel.", "Type": { "$id": "4475", "kind": "string", @@ -42686,7 +43056,6 @@ "$id": "4487", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4488", "kind": "constant", @@ -42842,7 +43211,6 @@ "$id": "4502", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4503", "kind": "constant", @@ -42998,7 +43366,6 @@ "$id": "4517", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4518", "kind": "constant", @@ -43266,7 +43633,6 @@ "$id": "4541", "Name": "purpose", "NameInRequest": "purpose", - "Description": "Only return files with the given purpose.", "Type": { "$id": "4542", "kind": "string", @@ -43353,7 +43719,6 @@ "$id": "4548", "Name": "file_id", "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", "Type": { "$id": "4549", "kind": "string", @@ -43440,7 +43805,6 @@ "$id": "4555", "Name": "file_id", "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", "Type": { "$id": "4556", "kind": "string", @@ -43527,7 +43891,6 @@ "$id": "4562", "Name": "file_id", "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", "Type": { "$id": "4563", "kind": "string", @@ -43662,7 +44025,6 @@ "$id": "4576", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4577", "kind": "constant", @@ -43775,7 +44137,6 @@ "$id": "4585", "Name": "after", "NameInRequest": "after", - "Description": "Identifier for the last job from the previous pagination request.", "Type": { "$id": "4586", "kind": "string", @@ -43797,7 +44158,6 @@ "$id": "4587", "Name": "limit", "NameInRequest": "limit", - "Description": "Number of fine-tuning jobs to retrieve.", "Type": { "$id": "4588", "kind": "int32", @@ -43884,7 +44244,6 @@ "$id": "4594", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job.", "Type": { "$id": "4595", "kind": "string", @@ -43971,7 +44330,6 @@ "$id": "4601", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to cancel.", "Type": { "$id": "4602", "kind": "string", @@ -44058,7 +44416,6 @@ "$id": "4608", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get checkpoints for.", "Type": { "$id": "4609", "kind": "string", @@ -44080,7 +44437,6 @@ "$id": "4610", "Name": "after", "NameInRequest": "after", - "Description": "Identifier for the last checkpoint ID from the previous pagination request.", "Type": { "$id": "4611", "kind": "string", @@ -44102,7 +44458,6 @@ "$id": "4612", "Name": "limit", "NameInRequest": "limit", - "Description": "Number of checkpoints to retrieve.", "Type": { "$id": "4613", "kind": "int32", @@ -44189,7 +44544,6 @@ "$id": "4619", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get events for.", "Type": { "$id": "4620", "kind": "string", @@ -44211,7 +44565,6 @@ "$id": "4621", "Name": "after", "NameInRequest": "after", - "Description": "Identifier for the last event from the previous pagination request.", "Type": { "$id": "4622", "kind": "string", @@ -44233,7 +44586,6 @@ "$id": "4623", "Name": "limit", "NameInRequest": "limit", - "Description": "Number of events to retrieve.", "Type": { "$id": "4624", "kind": "int32", @@ -44363,7 +44715,6 @@ "$id": "4636", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4637", "kind": "constant", @@ -44743,7 +45094,6 @@ "$id": "4669", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", "Type": { "$id": "4670", "kind": "string", @@ -44765,7 +45115,6 @@ "$id": "4671", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4672", "kind": "constant", @@ -44878,7 +45227,6 @@ "$id": "4680", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", "Type": { "$id": "4681", "kind": "string", @@ -44900,7 +45248,6 @@ "$id": "4682", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4683", "kind": "int32", @@ -44922,7 +45269,6 @@ "$id": "4684", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "609" }, @@ -44940,7 +45286,6 @@ "$id": "4685", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4686", "kind": "string", @@ -44962,7 +45307,6 @@ "$id": "4687", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4688", "kind": "string", @@ -45049,7 +45393,6 @@ "$id": "4694", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", "Type": { "$id": "4695", "kind": "string", @@ -45071,7 +45414,6 @@ "$id": "4696", "Name": "message_id", "NameInRequest": "message_id", - "Description": "The ID of the message to retrieve.", "Type": { "$id": "4697", "kind": "string", @@ -45158,7 +45500,6 @@ "$id": "4703", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", "Type": { "$id": "4704", "kind": "string", @@ -45180,7 +45521,6 @@ "$id": "4705", "Name": "message_id", "NameInRequest": "message_id", - "Description": "The ID of the message to modify.", "Type": { "$id": "4706", "kind": "string", @@ -45202,7 +45542,6 @@ "$id": "4707", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4708", "kind": "constant", @@ -45315,7 +45654,6 @@ "$id": "4716", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", "Type": { "$id": "4717", "kind": "string", @@ -45337,7 +45675,6 @@ "$id": "4718", "Name": "message_id", "NameInRequest": "message_id", - "Description": "The ID of the message to delete.", "Type": { "$id": "4719", "kind": "string", @@ -45532,7 +45869,6 @@ "$id": "4736", "Name": "model", "NameInRequest": "model", - "Description": "The ID of the model to use for this request.", "Type": { "$id": "4737", "kind": "string", @@ -45619,7 +45955,6 @@ "$id": "4743", "Name": "model", "NameInRequest": "model", - "Description": "The model to delete", "Type": { "$id": "4744", "kind": "string", @@ -45749,7 +46084,6 @@ "$id": "4756", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4757", "kind": "constant", @@ -45878,7 +46212,6 @@ "$id": "4768", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4769", "kind": "constant", @@ -46075,7 +46408,6 @@ "$id": "4788", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4789", "kind": "constant", @@ -46188,7 +46520,6 @@ "$id": "4797", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to retrieve.", "Type": { "$id": "4798", "kind": "string", @@ -46275,7 +46606,6 @@ "$id": "4804", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", "Type": { "$id": "4805", "kind": "string", @@ -46297,7 +46627,6 @@ "$id": "4806", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4807", "kind": "constant", @@ -46410,7 +46739,6 @@ "$id": "4815", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to delete.", "Type": { "$id": "4816", "kind": "string", @@ -46540,7 +46868,6 @@ "$id": "4828", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4829", "kind": "constant", @@ -46653,7 +46980,6 @@ "$id": "4837", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to run.", "Type": { "$id": "4838", "kind": "string", @@ -46675,7 +47001,6 @@ "$id": "4839", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4840", "kind": "constant", @@ -46788,7 +47113,6 @@ "$id": "4848", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread the run belongs to.", "Type": { "$id": "4849", "kind": "string", @@ -46810,7 +47134,6 @@ "$id": "4850", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4851", "kind": "int32", @@ -46832,7 +47155,6 @@ "$id": "4852", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "319" }, @@ -46850,7 +47172,6 @@ "$id": "4853", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4854", "kind": "string", @@ -46872,7 +47193,6 @@ "$id": "4855", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4856", "kind": "string", @@ -46959,7 +47279,6 @@ "$id": "4862", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { "$id": "4863", "kind": "string", @@ -46981,7 +47300,6 @@ "$id": "4864", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run to retrieve.", "Type": { "$id": "4865", "kind": "string", @@ -47068,7 +47386,6 @@ "$id": "4871", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { "$id": "4872", "kind": "string", @@ -47090,7 +47407,6 @@ "$id": "4873", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run to modify.", "Type": { "$id": "4874", "kind": "string", @@ -47112,7 +47428,6 @@ "$id": "4875", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4876", "kind": "constant", @@ -47225,7 +47540,6 @@ "$id": "4884", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this run belongs.", "Type": { "$id": "4885", "kind": "string", @@ -47247,7 +47561,6 @@ "$id": "4886", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run to cancel.", "Type": { "$id": "4887", "kind": "string", @@ -47334,7 +47647,6 @@ "$id": "4893", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", "Type": { "$id": "4894", "kind": "string", @@ -47356,7 +47668,6 @@ "$id": "4895", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run that requires the tool output submission.", "Type": { "$id": "4896", "kind": "string", @@ -47378,7 +47689,6 @@ "$id": "4897", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4898", "kind": "constant", @@ -47491,7 +47801,6 @@ "$id": "4906", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread the run and run steps belong to.", "Type": { "$id": "4907", "kind": "string", @@ -47513,7 +47822,6 @@ "$id": "4908", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run the run steps belong to.", "Type": { "$id": "4909", "kind": "string", @@ -47535,7 +47843,6 @@ "$id": "4910", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4911", "kind": "int32", @@ -47557,7 +47864,6 @@ "$id": "4912", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "328" }, @@ -47575,7 +47881,6 @@ "$id": "4913", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4914", "kind": "string", @@ -47597,7 +47902,6 @@ "$id": "4915", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4916", "kind": "string", @@ -47684,7 +47988,6 @@ "$id": "4922", "Name": "thread_id", "NameInRequest": "thread_id", - "Description": "The ID of the thread to which the run and run step belongs.", "Type": { "$id": "4923", "kind": "string", @@ -47706,7 +48009,6 @@ "$id": "4924", "Name": "run_id", "NameInRequest": "run_id", - "Description": "The ID of the run to which the run step belongs.", "Type": { "$id": "4925", "kind": "string", @@ -47728,7 +48030,6 @@ "$id": "4926", "Name": "step_id", "NameInRequest": "step_id", - "Description": "The ID of the run step to retrieve.", "Type": { "$id": "4927", "kind": "string", @@ -47858,7 +48159,6 @@ "$id": "4939", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4940", "kind": "int32", @@ -47880,7 +48180,6 @@ "$id": "4941", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "55" }, @@ -47898,7 +48197,6 @@ "$id": "4942", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4943", "kind": "string", @@ -47920,7 +48218,6 @@ "$id": "4944", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4945", "kind": "string", @@ -48007,7 +48304,6 @@ "$id": "4951", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4952", "kind": "constant", @@ -48120,7 +48416,6 @@ "$id": "4960", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to retrieve.", "Type": { "$id": "4961", "kind": "string", @@ -48207,7 +48502,6 @@ "$id": "4967", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to modify.", "Type": { "$id": "4968", "kind": "string", @@ -48229,7 +48523,6 @@ "$id": "4969", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4970", "kind": "constant", @@ -48342,7 +48635,6 @@ "$id": "4978", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to delete.", "Type": { "$id": "4979", "kind": "string", @@ -48429,7 +48721,6 @@ "$id": "4985", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the files belong to.", "Type": { "$id": "4986", "kind": "string", @@ -48451,7 +48742,6 @@ "$id": "4987", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4988", "kind": "int32", @@ -48473,7 +48763,6 @@ "$id": "4989", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "81" }, @@ -48491,7 +48780,6 @@ "$id": "4990", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4991", "kind": "string", @@ -48513,7 +48801,6 @@ "$id": "4992", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4993", "kind": "string", @@ -48535,7 +48822,6 @@ "$id": "4994", "Name": "filter", "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", "Type": { "$ref": "87" }, @@ -48618,7 +48904,6 @@ "$id": "5000", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a File.", "Type": { "$id": "5001", "kind": "string", @@ -48640,7 +48925,6 @@ "$id": "5002", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5003", "kind": "constant", @@ -48753,7 +49037,6 @@ "$id": "5011", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", "Type": { "$id": "5012", "kind": "string", @@ -48775,7 +49058,6 @@ "$id": "5013", "Name": "file_id", "NameInRequest": "file_id", - "Description": "The ID of the file being retrieved.", "Type": { "$id": "5014", "kind": "string", @@ -48862,7 +49144,6 @@ "$id": "5020", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", "Type": { "$id": "5021", "kind": "string", @@ -48884,7 +49165,6 @@ "$id": "5022", "Name": "file_id", "NameInRequest": "file_id", - "Description": "The ID of the file to delete.", "Type": { "$id": "5023", "kind": "string", @@ -48971,7 +49251,6 @@ "$id": "5029", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a file batch.", "Type": { "$id": "5030", "kind": "string", @@ -48993,7 +49272,6 @@ "$id": "5031", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5032", "kind": "constant", @@ -49106,7 +49384,6 @@ "$id": "5040", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5041", "kind": "string", @@ -49128,7 +49405,6 @@ "$id": "5042", "Name": "batch_id", "NameInRequest": "batch_id", - "Description": "The ID of the file batch being retrieved.", "Type": { "$id": "5043", "kind": "string", @@ -49215,7 +49491,6 @@ "$id": "5049", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5050", "kind": "string", @@ -49237,7 +49512,6 @@ "$id": "5051", "Name": "batch_id", "NameInRequest": "batch_id", - "Description": "The ID of the file batch to cancel.", "Type": { "$id": "5052", "kind": "string", @@ -49324,7 +49598,6 @@ "$id": "5058", "Name": "vector_store_id", "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5059", "kind": "string", @@ -49346,7 +49619,6 @@ "$id": "5060", "Name": "batch_id", "NameInRequest": "batch_id", - "Description": "The ID of the file batch that the files belong to.", "Type": { "$id": "5061", "kind": "string", @@ -49368,7 +49640,6 @@ "$id": "5062", "Name": "limit", "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "5063", "kind": "int32", @@ -49390,7 +49661,6 @@ "$id": "5064", "Name": "order", "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "137" }, @@ -49408,7 +49678,6 @@ "$id": "5065", "Name": "after", "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "5066", "kind": "string", @@ -49430,7 +49699,6 @@ "$id": "5067", "Name": "before", "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "5068", "kind": "string", @@ -49452,7 +49720,6 @@ "$id": "5069", "Name": "filter", "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", "Type": { "$ref": "87" }, @@ -49578,7 +49845,6 @@ "$id": "5081", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5082", "kind": "constant", @@ -49845,7 +50111,6 @@ "$id": "5103", "Name": "contentType", "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5104", "kind": "constant", diff --git a/package-lock.json b/package-lock.json index a27dd4d61..43e90127b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "dependencies": { "@typespec/http-client-csharp": "latest", - "@typespec/openapi3": "^0.60.0", + "@typespec/openapi3": "^0.61.0", "openai-tsp": "file:" } }, @@ -19,23 +19,23 @@ "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.46.0.tgz", - "integrity": "sha512-BNE31enSHWtWlrdIKShBS6CNFGk3OYmHSBnWqobcFJkTGXC090EoV2u6otn4BMI99fZRSR4gpwp/kYU9KLE9Jw==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.47.0.tgz", + "integrity": "sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==", "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/rest": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/rest": "~0.61.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.2.tgz", - "integrity": "sha512-/HKeehCNDeylouOHMe7IwpcDcGJHRAuEy3a5FBnSY51m4EpMq4VMQzW9tka/8brFO2m5LLj7tyhOL/xnzi2fLg==", + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.2.tgz", + "integrity": "sha512-mOsgeOuJcJa5CrQrT/BzqpbLDnb/X1TgSmfljhV3tJFB2dzZT6awzeAp5clV03Or/4xCMGbmHEABi4kCWot9Qw==", "peer": true, "dependencies": { "change-case": "~5.4.4", @@ -45,12 +45,12 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.46.0", - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/openapi": "~0.60.0", - "@typespec/rest": "~0.60.0", - "@typespec/versioning": "~0.60.0" + "@azure-tools/typespec-azure-core": "~0.47.0", + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/openapi": "~0.61.0", + "@typespec/rest": "~0.61.0", + "@typespec/versioning": "~0.61.0" } }, "node_modules/@babel/code-frame": { @@ -288,9 +288,9 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@typespec/compiler": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.1.tgz", - "integrity": "sha512-I6Vcpvd7mBP7SI5vCBh9rZGXAtVy95BKhAd33Enw32psswiSzRpA7zdyZhOMekTOGVXNS/+E5l2PGGCzQddB4w==", + "version": "0.61.2", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.61.2.tgz", + "integrity": "sha512-6QxYJd09VWssd/BvY+8eBxTVv085s1UNK63FdPrgT2lgI+j8VMMcpNR9m5l1zWlgGDM7sniA/Or8VCdVA6jerg==", "peer": true, "dependencies": { "@babel/code-frame": "~7.24.7", @@ -298,14 +298,14 @@ "change-case": "~5.4.4", "globby": "~14.0.2", "mustache": "~4.2.0", - "picocolors": "~1.0.1", + "picocolors": "~1.1.0", "prettier": "~3.3.3", "prompts": "~2.4.2", "semver": "^7.6.3", "temporal-polyfill": "^0.2.5", "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.11", - "yaml": "~2.4.5", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.5.1", "yargs": "~17.7.2" }, "bin": { @@ -317,21 +317,27 @@ } }, "node_modules/@typespec/http": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.60.0.tgz", - "integrity": "sha512-ktfS9vpHfltyeAaQLNAZdqrn6Per3vmB/HDH/iyudYLA5wWblT1siKvpFCMWq53CJorRO7yeOKv+Q/M26zwEtg==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.61.0.tgz", + "integrity": "sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==", "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/streams": "~0.61.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241002.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241002.1.tgz", - "integrity": "sha512-3SJSq50s8OJkRX9ExUVMXUsvACVVGeC3mH2BoiW8wKMexxw0gRJzYuKjd/tmQpM51hGHKB9HtdK2zylXuD0PJQ==", + "version": "0.1.9-alpha.20241016.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241016.1.tgz", + "integrity": "sha512-xtqOHefyXxFwVoOQgzndeJEzjYinO0GbHXZtvlVJmj1LUYziNV9ChXzaREFbpMZWOr+xrGnFX9l9jKTizcxKlQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -346,25 +352,25 @@ } }, "node_modules/@typespec/openapi": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.60.0.tgz", - "integrity": "sha512-YVwLppgHY8r/MudHNSLSUXzdw+CIpjmb31gI2a0KDGnI6sWDwY7LSWfjGU4TY/ubt0+X0Tjoy330mTvw71YBTg==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.61.0.tgz", + "integrity": "sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==", "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" } }, "node_modules/@typespec/openapi3": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.60.0.tgz", - "integrity": "sha512-gvrTHZACdeQtV7GfhVOHqkyTgMFyM2nKAIiz2P83LIncMCDUc00bGKGmaBk+xpuwKtCJyxBeVpCbID31YAq96g==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.61.0.tgz", + "integrity": "sha512-ALLsTkK1UiJBzvygV1Zk/yZaym+lOWroGeEUhQNXYShsq+/GLZkK0rl8sd76Gigq+TVXKMOEwUUvgfws/LMUJw==", "dependencies": { "@readme/openapi-parser": "~2.6.0", - "yaml": "~2.4.5" + "yaml": "~2.5.1" }, "bin": { "tsp-openapi3": "cmd/tsp-openapi3.js" @@ -373,35 +379,35 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/openapi": "~0.60.0", - "@typespec/versioning": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/openapi": "~0.61.0", + "@typespec/versioning": "~0.61.0" } }, "node_modules/@typespec/rest": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.60.0.tgz", - "integrity": "sha512-mHYubyuBvwdV2xkHrJfPwV7b/Ksyb9lA1Q/AQwpVFa7Qu1X075TBVALmH+hK3V0EdUG1CGJZ5Sw4BWgl8ZS0BA==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.61.0.tgz", + "integrity": "sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==", "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" } }, "node_modules/@typespec/versioning": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.60.1.tgz", - "integrity": "sha512-HogYL7P9uOPoSvkLLDjF22S6E9td6EY3c6TcIHhCzDTAQoi54csikD0gNrtcCkFG0UeQk29HgQymV397j+vp4g==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.61.0.tgz", + "integrity": "sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==", "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0" + "@typespec/compiler": "~0.61.0" } }, "node_modules/ajv": { @@ -573,9 +579,9 @@ } }, "node_modules/fast-uri": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz", - "integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==" }, "node_modules/fastq": { "version": "1.17.1", @@ -817,9 +823,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -1154,9 +1160,9 @@ } }, "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", "bin": { "yaml": "bin.mjs" }, diff --git a/package.json b/package.json index b0edbcbce..a0329297e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "module", "dependencies": { "@typespec/http-client-csharp": "latest", - "@typespec/openapi3": "^0.60.0", + "@typespec/openapi3": "^0.61.0", "openai-tsp": "file:" }, "private": true From e15d4565fecdddfb2a75402417c72b3fb867b529 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 17 Oct 2024 14:53:33 -0700 Subject: [PATCH 09/54] respect usage --- .dotnet/src/Generated/Models/Assistant.cs | 18 ++++----- .../Models/AssistantDeletionResult.cs | 2 +- .../src/Generated/Models/AssistantThread.cs | 6 +-- .../Generated/Models/AudioTranscription.cs | 4 +- .../src/Generated/Models/AudioTranslation.cs | 4 +- .../src/Generated/Models/ChatCompletion.cs | 8 ++-- .../Models/ChatTokenLogProbabilityDetails.cs | 2 +- .../ChatTokenTopLogProbabilityDetails.cs | 2 +- .../Models/ConversationAudioDeltaUpdate.cs | 10 ++--- .../Models/ConversationAudioDoneUpdate.cs | 8 ++-- .../ConversationContentPartFinishedUpdate.cs | 8 ++-- .../ConversationContentPartStartedUpdate.cs | 8 ++-- ...rsationFunctionCallArgumentsDeltaUpdate.cs | 10 ++--- ...ersationFunctionCallArgumentsDoneUpdate.cs | 12 +++--- ...ersationInputAudioBufferCommittedUpdate.cs | 4 +- .../ConversationInputSpeechFinishedUpdate.cs | 4 +- .../ConversationInputSpeechStartedUpdate.cs | 4 +- .../ConversationInputTokenUsageDetails.cs | 6 +-- ...versationInputTranscriptionFailedUpdate.cs | 4 +- ...rsationInputTranscriptionFinishedUpdate.cs | 6 +-- .../Models/ConversationItemDeletedUpdate.cs | 2 +- .../Models/ConversationItemFinishedUpdate.cs | 4 +- .../Models/ConversationItemStartedUpdate.cs | 4 +- .../Models/ConversationItemTruncatedUpdate.cs | 6 +-- .../ConversationOutputTokenUsageDetails.cs | 4 +- ...versationOutputTranscriptionDeltaUpdate.cs | 10 ++--- ...sationOutputTranscriptionFinishedUpdate.cs | 8 ++-- .../ConversationRateLimitDetailsItem.cs | 8 ++-- .../Models/ConversationTextDeltaUpdate.cs | 10 ++--- .../Models/ConversationTextDoneUpdate.cs | 10 ++--- .../Models/ConversationTokenUsage.cs | 10 ++--- .../Generated/Models/ConversationUpdate.cs | 2 +- .../Generated/Models/FileDeletionResult.cs | 2 +- .../Models/FineTuningIntegrationWandbWandb.cs | 6 +-- .dotnet/src/Generated/Models/FineTuningJob.cs | 32 ++++++++-------- .../Generated/Models/FineTuningJobError.cs | 6 +-- .../Generated/Models/FineTuningJobEvent.cs | 8 ++-- .../src/Generated/Models/GeneratedImage.cs | 2 +- .../Generated/Models/InternalBatchError.cs | 8 ++-- .../Generated/Models/InternalBatchErrors.cs | 2 +- .../src/Generated/Models/InternalBatchJob.cs | 38 +++++++++---------- .../Models/InternalBatchRequestCounts.cs | 6 +-- .../Models/InternalBatchRequestOutput.cs | 6 +-- .../Models/InternalBatchRequestOutputError.cs | 4 +- .../InternalBatchRequestOutputResponse.cs | 4 +- ...tCompletionMessageToolCallChunkFunction.cs | 2 +- .../InternalChatCompletionResponseMessage.cs | 2 +- ...atCompletionResponseMessageFunctionCall.cs | 4 +- ...ternalChatCompletionStreamResponseDelta.cs | 4 +- .../Models/InternalCreateBatchRequest.cs | 6 +-- ...nalCreateChatCompletionFunctionResponse.cs | 10 ++--- ...ateChatCompletionFunctionResponseChoice.cs | 6 +-- ...ernalCreateChatCompletionResponseChoice.cs | 8 ++-- ...ateChatCompletionResponseChoiceLogprobs.cs | 4 +- ...reateChatCompletionStreamResponseChoice.cs | 6 +-- ...tCompletionStreamResponseChoiceLogprobs.cs | 4 +- ...CreateChatCompletionStreamResponseUsage.cs | 6 +-- .../InternalCreateCompletionResponse.cs | 10 ++--- .../InternalCreateCompletionResponseChoice.cs | 8 ++-- ...InternalCreateTranscriptionResponseJson.cs | 2 +- .../InternalCreateTranslationResponseJson.cs | 2 +- .../InternalFineTuningIntegrationWandb.cs | 2 +- .../Models/InternalFineTuningJobCheckpoint.cs | 12 +++--- .../InternalFineTuningJobCheckpointMetrics.cs | 14 +++---- .../Models/InternalListAssistantsResponse.cs | 6 +-- .../Models/InternalListBatchesResponse.cs | 6 +-- ...nalListFineTuningJobCheckpointsResponse.cs | 6 +-- ...InternalListFineTuningJobEventsResponse.cs | 2 +- .../Models/InternalListMessagesResponse.cs | 6 +-- ...rnalListPaginatedFineTuningJobsResponse.cs | 2 +- .../Models/InternalListRunStepsResponse.cs | 6 +-- .../Models/InternalListRunsResponse.cs | 6 +-- .../Models/InternalListThreadsResponse.cs | 6 +-- .../InternalListVectorStoreFilesResponse.cs | 6 +-- .../InternalListVectorStoresResponse.cs | 6 +-- ...ernalMessageDeltaContentImageFileObject.cs | 4 +- ...ageDeltaContentImageFileObjectImageFile.cs | 2 +- ...ternalMessageDeltaContentImageUrlObject.cs | 4 +- ...ssageDeltaContentImageUrlObjectImageUrl.cs | 2 +- ...nternalMessageDeltaContentRefusalObject.cs | 4 +- ...ontentTextAnnotationsFileCitationObject.cs | 10 ++--- ...notationsFileCitationObjectFileCitation.cs | 4 +- ...ltaContentTextAnnotationsFilePathObject.cs | 10 ++--- ...ntTextAnnotationsFilePathObjectFilePath.cs | 2 +- .../InternalMessageDeltaContentTextObject.cs | 4 +- ...ternalMessageDeltaContentTextObjectText.cs | 2 +- .../Models/InternalMessageDeltaObject.cs | 4 +- .../Models/InternalMessageObjectAttachment.cs | 2 +- .../Models/InternalModerationCategories.cs | 22 +++++------ .../InternalModerationCategoryScores.cs | 22 +++++------ .../Models/InternalRealtimeResponse.cs | 8 ++-- .../InternalRealtimeResponseApiError.cs | 8 ++-- ...nternalRealtimeResponseAudioContentPart.cs | 2 +- ...lRealtimeResponseCancelledStatusDetails.cs | 2 +- .../Models/InternalRealtimeResponseError.cs | 10 ++--- ...nternalRealtimeResponseFunctionCallItem.cs | 8 ++-- ...lRealtimeResponseFunctionCallOutputItem.cs | 4 +- ...RealtimeResponseIncompleteStatusDetails.cs | 2 +- .../Models/InternalRealtimeResponseItem.cs | 2 +- .../InternalRealtimeResponseMessageItem.cs | 2 +- .../Models/InternalRealtimeResponseSession.cs | 20 +++++----- ...InternalRealtimeResponseTextContentPart.cs | 2 +- .../InternalRequiredFunctionToolCall.cs | 2 +- .../Models/InternalRunRequiredAction.cs | 2 +- ...alRunStepCodeInterpreterToolCallDetails.cs | 2 +- .../Generated/Models/InternalRunStepDelta.cs | 4 +- .../Models/InternalRunStepDeltaObjectDelta.cs | 2 +- ...epDeltaStepDetailsMessageCreationObject.cs | 2 +- ...ilsMessageCreationObjectMessageCreation.cs | 2 +- ...StepDeltaStepDetailsToolCallsCodeObject.cs | 6 +-- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 2 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 4 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 2 +- ...tepDetailsToolCallsCodeOutputLogsObject.cs | 2 +- ...ltaStepDetailsToolCallsFileSearchObject.cs | 4 +- ...DeltaStepDetailsToolCallsFunctionObject.cs | 6 +-- ...pDetailsToolCallsFunctionObjectFunction.cs | 6 +-- ...ilsMessageCreationObjectMessageCreation.cs | 2 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 2 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 2 +- ...ToolCallsFileSearchRankingOptionsObject.cs | 2 +- ...sToolCallsFileSearchResultObjectContent.cs | 4 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 6 +-- ...nternalRunStepFileSearchToolCallDetails.cs | 4 +- .../InternalRunStepFunctionToolCallDetails.cs | 2 +- .../InternalRunToolCallObjectFunction.cs | 4 +- .../InternalThreadObjectToolResources.cs | 4 +- .../src/Generated/Models/InternalUpload.cs | 18 ++++----- .../Generated/Models/InternalUploadPart.cs | 6 +-- ...nalVectorStoreFileBatchObjectFileCounts.cs | 10 ++--- .../Generated/Models/MessageDeletionResult.cs | 2 +- .../Generated/Models/MessageFailureDetails.cs | 2 +- .../Generated/Models/ModelDeletionResult.cs | 2 +- .../src/Generated/Models/ModerationResult.cs | 2 +- .../Models/ModerationResultCollection.cs | 4 +- .../src/Generated/Models/OpenAIEmbedding.cs | 2 +- .../Models/OpenAIEmbeddingCollection.cs | 4 +- .dotnet/src/Generated/Models/OpenAIError.cs | 8 ++-- .../Generated/Models/OpenAIErrorResponse.cs | 2 +- .dotnet/src/Generated/Models/OpenAIFile.cs | 8 ++-- .dotnet/src/Generated/Models/OpenAIModel.cs | 4 +- .../RealtimeResponseFailedStatusDetails.cs | 2 +- .dotnet/src/Generated/Models/RunError.cs | 4 +- .../Generated/Models/RunIncompleteDetails.cs | 2 +- .dotnet/src/Generated/Models/RunStep.cs | 28 +++++++------- .dotnet/src/Generated/Models/RunStepError.cs | 4 +- .../Models/RunStepFileSearchResult.cs | 6 +-- .../Models/StreamingChatCompletionUpdate.cs | 4 +- .../Models/StreamingChatToolCallUpdate.cs | 2 +- .../Generated/Models/ThreadDeletionResult.cs | 2 +- .dotnet/src/Generated/Models/ThreadMessage.cs | 20 +++++----- .dotnet/src/Generated/Models/ThreadRun.cs | 36 +++++++++--------- .../Generated/Models/TranscribedSegment.cs | 8 ++-- .../src/Generated/Models/TranscribedWord.cs | 2 +- .dotnet/src/Generated/Models/VectorStore.cs | 18 ++++----- .../Models/VectorStoreBatchFileJob.cs | 6 +-- .../Models/VectorStoreDeletionResult.cs | 2 +- .../Models/VectorStoreFileAssociation.cs | 8 ++-- .../Models/VectorStoreFileAssociationError.cs | 4 +- .../Generated/Models/VectorStoreFileCounts.cs | 10 ++--- 160 files changed, 496 insertions(+), 496 deletions(-) diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 2d4157287..83a7e89a7 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -43,24 +43,24 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string Name { get; set; } + public string Name { get; } - public string Description { get; set; } + public string Description { get; } - public string Model { get; set; } + public string Model { get; } - public string Instructions { get; set; } + public string Instructions { get; } public IList Tools { get; } - public ToolResources ToolResources { get; set; } + public ToolResources ToolResources { get; } - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } - public float? Temperature { get; set; } + public float? Temperature { get; } } } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index 0b5d95dbc..ac662fc8c 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -26,6 +26,6 @@ internal AssistantDeletionResult(bool deleted, string assistantId, InternalDelet _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Deleted { get; set; } + public bool Deleted { get; } } } diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index 16d5cc040..6043e8ec9 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -30,10 +30,10 @@ internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index 50c80099e..1975fb357 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -33,9 +33,9 @@ internal AudioTranscription(string language, string text, IList _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Language { get; set; } + public string Language { get; } - public string Text { get; set; } + public string Text { get; } public IList Words { get; } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index c3d2acd75..27c836a49 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -31,9 +31,9 @@ internal AudioTranslation(string language, string text, IList Segments { get; } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 3199b9514..0052ad612 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -34,12 +34,12 @@ internal ChatCompletion(string id, string model, string systemFingerprint, ChatT _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public string Model { get; set; } + public string Model { get; } - public string SystemFingerprint { get; set; } + public string SystemFingerprint { get; } - public ChatTokenUsage Usage { get; set; } + public ChatTokenUsage Usage { get; } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs index 6267472f6..698a15fd3 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs @@ -29,6 +29,6 @@ internal ChatTokenLogProbabilityDetails(string token, float logProbability, Read _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Token { get; set; } + public string Token { get; } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs index e4b6370e0..0f95982aa 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs @@ -26,6 +26,6 @@ internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, R _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Token { get; set; } + public string Token { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs index 482ef3161..c12486756 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.cs @@ -27,14 +27,14 @@ internal ConversationAudioDeltaUpdate(string responseId, string itemId, int outp Delta = delta; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public BinaryData Delta { get; set; } + public BinaryData Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs index 3beea61fa..b9c715a79 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.cs @@ -28,12 +28,12 @@ internal ConversationAudioDoneUpdate(string @type, string responseId, string ite internal string Type { get; set; } = "response.audio.done"; - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs index a877eb379..fa0031cda 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.cs @@ -27,12 +27,12 @@ internal ConversationContentPartFinishedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs index cba779cb9..f2132c747 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.cs @@ -27,12 +27,12 @@ internal ConversationContentPartStartedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs index 5acf62c57..4090c64a3 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.cs @@ -27,14 +27,14 @@ internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string Delta = delta; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public string CallId { get; set; } + public string CallId { get; } - public string Delta { get; set; } + public string Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs index 7e2e0a33a..b3d1d7486 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.cs @@ -29,16 +29,16 @@ internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string i Arguments = arguments; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public string CallId { get; set; } + public string CallId { get; } - public string Name { get; set; } + public string Name { get; } - public string Arguments { get; set; } + public string Arguments { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs index 8a6b5627f..d649301b8 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.cs @@ -20,8 +20,8 @@ internal ConversationInputAudioBufferCommittedUpdate(string itemId, string previ PreviousItemId = previousItemId; } - public string ItemId { get; set; } + public string ItemId { get; } - public string PreviousItemId { get; set; } + public string PreviousItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index 50d57e173..6cc386c44 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -21,8 +21,8 @@ internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, st ItemId = itemId; } - public int AudioEndMs { get; set; } + public int AudioEndMs { get; } - public string ItemId { get; set; } + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index 2c348eb03..fc385197d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -21,8 +21,8 @@ internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, s ItemId = itemId; } - public int AudioStartMs { get; set; } + public int AudioStartMs { get; } - public string ItemId { get; set; } + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs index b1c17d736..8e70d26b0 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs @@ -26,10 +26,10 @@ internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, in _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int CachedTokens { get; set; } + public int CachedTokens { get; } - public int TextTokens { get; set; } + public int TextTokens { get; } - public int AudioTokens { get; set; } + public int AudioTokens { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index ccad94e28..3d130a89d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -23,8 +23,8 @@ internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIn _error = error; } - public string ItemId { get; set; } + public string ItemId { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index 32acd272d..299cf326b 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -23,10 +23,10 @@ internal ConversationInputTranscriptionFinishedUpdate(string itemId, int content Transcript = transcript; } - public string ItemId { get; set; } + public string ItemId { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public string Transcript { get; set; } + public string Transcript { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index 906bf84e1..5d40089a7 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -19,6 +19,6 @@ internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeCo ItemId = itemId; } - public string ItemId { get; set; } + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs index fee6085f7..c9f016f46 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.cs @@ -23,8 +23,8 @@ internal ConversationItemFinishedUpdate(string responseId, int outputIndex, Inte _internalItem = internalItem; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs index 619142c91..ddc291584 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.cs @@ -23,8 +23,8 @@ internal ConversationItemStartedUpdate(string responseId, int outputIndex, Inter _internalItem = internalItem; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index b3020a861..4f25810ec 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -23,10 +23,10 @@ internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int inde Index = index; } - public string ItemId { get; set; } + public string ItemId { get; } - public int AudioEndMs { get; set; } + public int AudioEndMs { get; } - public int Index { get; set; } + public int Index { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs index 56b28128b..f49b4f62e 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs @@ -24,8 +24,8 @@ internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens, ID _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int TextTokens { get; set; } + public int TextTokens { get; } - public int AudioTokens { get; set; } + public int AudioTokens { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs index 21efed398..e03c98c1e 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.cs @@ -27,14 +27,14 @@ internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string it Delta = delta; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public string Delta { get; set; } + public string Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs index 69681cbff..1460ee71c 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.cs @@ -25,12 +25,12 @@ internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string ContentIndex = contentIndex; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs index 1716014d3..cfb3a889f 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs @@ -28,12 +28,12 @@ internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } - public int Limit { get; set; } + public int Limit { get; } - public int Remaining { get; set; } + public int Remaining { get; } - public float ResetSeconds { get; set; } + public float ResetSeconds { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs index b888ac21a..faffdabca 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.cs @@ -27,14 +27,14 @@ internal ConversationTextDeltaUpdate(string responseId, string itemId, int outpu Delta = delta; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public string Delta { get; set; } + public string Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs index 7d6092ae5..437b25919 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.cs @@ -27,14 +27,14 @@ internal ConversationTextDoneUpdate(string responseId, string itemId, int output Value = value; } - public string ResponseId { get; set; } + public string ResponseId { get; } - public string ItemId { get; set; } + public string ItemId { get; } - public int OutputIndex { get; set; } + public int OutputIndex { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public string Value { get; set; } + public string Value { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs index 5df9d0d30..20bfb6d4f 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs @@ -30,14 +30,14 @@ internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputToke _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int TotalTokens { get; set; } + public int TotalTokens { get; } - public int InputTokens { get; set; } + public int InputTokens { get; } - public int OutputTokens { get; set; } + public int OutputTokens { get; } - public ConversationInputTokenUsageDetails InputTokenDetails { get; set; } + public ConversationInputTokenUsageDetails InputTokenDetails { get; } - public ConversationOutputTokenUsageDetails OutputTokenDetails { get; set; } + public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs index 5703c2ab0..964b27112 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -24,6 +24,6 @@ internal ConversationUpdate(string eventId, RealtimeConversation.ConversationUpd _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string EventId { get; set; } + public string EventId { get; } } } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index 525da77c8..1ad9a6c85 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -26,6 +26,6 @@ internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileRespo _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Deleted { get; set; } + public bool Deleted { get; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs index 91b4826b2..f81bb96d1 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs @@ -27,11 +27,11 @@ internal FineTuningIntegrationWandbWandb(string project, string name, string ent _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Project { get; set; } + public string Project { get; } - public string Name { get; set; } + public string Name { get; } - public string Entity { get; set; } + public string Entity { get; } public IList Tags { get; } } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.cs b/.dotnet/src/Generated/Models/FineTuningJob.cs index b61781d20..829d9d886 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.cs @@ -55,40 +55,40 @@ internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset crea _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string UserProvidedSuffix { get; set; } + public string UserProvidedSuffix { get; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public FineTuningJobError Error { get; set; } + public FineTuningJobError Error { get; } - public string FineTunedModel { get; set; } + public string FineTunedModel { get; } - public DateTimeOffset? FinishedAt { get; set; } + public DateTimeOffset? FinishedAt { get; } - public FineTuningJobHyperparameters Hyperparameters { get; set; } + public FineTuningJobHyperparameters Hyperparameters { get; } - public string Model { get; set; } + public string Model { get; } public InternalFineTuningJobObject Object { get; } = "fine_tuning.job"; - public string OrganizationId { get; set; } + public string OrganizationId { get; } public IList ResultFiles { get; } - public FineTuningJobStatus Status { get; set; } + public FineTuningJobStatus Status { get; } - public int? TrainedTokens { get; set; } + public int? TrainedTokens { get; } - public string TrainingFile { get; set; } + public string TrainingFile { get; } - public string ValidationFile { get; set; } + public string ValidationFile { get; } - public IList Integrations { get; set; } + public IList Integrations { get; } - public int Seed { get; set; } + public int Seed { get; } - public DateTimeOffset? EstimatedFinish { get; set; } + public DateTimeOffset? EstimatedFinish { get; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.cs b/.dotnet/src/Generated/Models/FineTuningJobError.cs index 706dc1b29..2d2fba3aa 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.cs @@ -26,10 +26,10 @@ internal FineTuningJobError(string code, string message, string @param, IDiction _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Code { get; set; } + public string Code { get; } - public string Message { get; set; } + public string Message { get; } - public string Param { get; set; } + public string Param { get; } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs index 6f204d6ff..994403334 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs @@ -29,13 +29,13 @@ internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.Fine _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public FineTuning.FineTuningJobEventLevel Level { get; set; } + public FineTuning.FineTuningJobEventLevel Level { get; } - public string Message { get; set; } + public string Message { get; } public InternalFineTuningJobEventObject Object { get; } = "fine_tuning.job.event"; } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.cs b/.dotnet/src/Generated/Models/GeneratedImage.cs index b977c0267..8861a28dc 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.cs @@ -23,6 +23,6 @@ internal GeneratedImage(string revisedPrompt, BinaryData imageBytes, Uri imageUr _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string RevisedPrompt { get; set; } + public string RevisedPrompt { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.cs b/.dotnet/src/Generated/Models/InternalBatchError.cs index 6ecc54596..a54ec5a30 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.cs @@ -24,12 +24,12 @@ internal InternalBatchError(string code, string message, string @param, int? lin _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Code { get; set; } + public string Code { get; } - public string Message { get; set; } + public string Message { get; } - public string Param { get; set; } + public string Param { get; } - public int? Line { get; set; } + public int? Line { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.cs index b2778afe9..fb99cef9b 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.cs @@ -24,7 +24,7 @@ internal InternalBatchErrors(InternalBatchErrorsObject? @object, IList Data { get; } } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.cs b/.dotnet/src/Generated/Models/InternalBatchJob.cs index 18ff5b4d2..323cb52ef 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.cs @@ -48,44 +48,44 @@ internal InternalBatchJob(string id, InternalBatchObject @object, string endpoin _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } public InternalBatchObject Object { get; } = "batch"; - public string Endpoint { get; set; } + public string Endpoint { get; } - public InternalBatchErrors Errors { get; set; } + public InternalBatchErrors Errors { get; } - public string InputFileId { get; set; } + public string InputFileId { get; } - public string CompletionWindow { get; set; } + public string CompletionWindow { get; } - public InternalBatchStatus Status { get; set; } + public InternalBatchStatus Status { get; } - public string OutputFileId { get; set; } + public string OutputFileId { get; } - public string ErrorFileId { get; set; } + public string ErrorFileId { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public DateTimeOffset? InProgressAt { get; set; } + public DateTimeOffset? InProgressAt { get; } - public DateTimeOffset? ExpiresAt { get; set; } + public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? FinalizingAt { get; set; } + public DateTimeOffset? FinalizingAt { get; } - public DateTimeOffset? CompletedAt { get; set; } + public DateTimeOffset? CompletedAt { get; } - public DateTimeOffset? FailedAt { get; set; } + public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? ExpiredAt { get; set; } + public DateTimeOffset? ExpiredAt { get; } - public DateTimeOffset? CancellingAt { get; set; } + public DateTimeOffset? CancellingAt { get; } - public DateTimeOffset? CancelledAt { get; set; } + public DateTimeOffset? CancelledAt { get; } - public InternalBatchRequestCounts RequestCounts { get; set; } + public InternalBatchRequestCounts RequestCounts { get; } - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs index 2a42bfa65..7ead7c644 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs @@ -26,10 +26,10 @@ internal InternalBatchRequestCounts(int total, int completed, int failed, IDicti _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int Total { get; set; } + public int Total { get; } - public int Completed { get; set; } + public int Completed { get; } - public int Failed { get; set; } + public int Failed { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs index 855f14bae..8c3115032 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs @@ -26,10 +26,10 @@ internal InternalBatchRequestOutput(string id, string customId, InternalBatchReq public string Id { get; } - public string CustomId { get; set; } + public string CustomId { get; } - public InternalBatchRequestOutputResponse Response { get; set; } + public InternalBatchRequestOutputResponse Response { get; } - public InternalBatchRequestOutputError Error { get; set; } + public InternalBatchRequestOutputError Error { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs index e00cdf7a8..1f993ea80 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs @@ -22,8 +22,8 @@ internal InternalBatchRequestOutputError(string code, string message, IDictionar _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Code { get; set; } + public string Code { get; } - public string Message { get; set; } + public string Message { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs index 8e8da580e..bdbc3ef5a 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs @@ -25,9 +25,9 @@ internal InternalBatchRequestOutputResponse(int? statusCode, string requestId, I _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int? StatusCode { get; set; } + public int? StatusCode { get; } - public string RequestId { get; set; } + public string RequestId { get; } public IDictionary Body { get; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index 2fc7e03f0..b78acecd3 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -22,6 +22,6 @@ internal InternalChatCompletionMessageToolCallChunkFunction(string name, BinaryD _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index f2ccf0c2c..c74fd42d6 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -30,7 +30,7 @@ internal InternalChatCompletionResponseMessage(string refusal, IList ToolCalls { get; } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index 70fd03ad0..b4881e187 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -24,8 +24,8 @@ internal InternalChatCompletionResponseMessageFunctionCall(string name, string a _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } - public string Arguments { get; set; } + public string Arguments { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index 622d66405..17e3e7448 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -21,10 +21,10 @@ internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpda _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public StreamingChatFunctionCallUpdate FunctionCall { get; set; } + public StreamingChatFunctionCallUpdate FunctionCall { get; } public IList ToolCalls { get; } - public string Refusal { get; set; } + public string Refusal { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs index 1acf8790e..cd248f24e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs @@ -28,12 +28,12 @@ internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchReque _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string InputFileId { get; set; } + public string InputFileId { get; } - public InternalCreateBatchRequestEndpoint Endpoint { get; set; } + public InternalCreateBatchRequestEndpoint Endpoint { get; } public InternalBatchCompletionTimeframe CompletionWindow { get; } = "24h"; - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs index a7302db76..0e381eca5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs @@ -32,18 +32,18 @@ internal InternalCreateChatCompletionFunctionResponse(string id, IList Choices { get; } - public DateTimeOffset Created { get; set; } + public DateTimeOffset Created { get; } - public string Model { get; set; } + public string Model { get; } - public string SystemFingerprint { get; set; } + public string SystemFingerprint { get; } public InternalCreateChatCompletionFunctionResponseObject Object { get; } = "chat.completion"; - public ChatTokenUsage Usage { get; set; } + public ChatTokenUsage Usage { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs index 05be19696..907762d6b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs @@ -26,10 +26,10 @@ internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCo _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalCreateChatCompletionFunctionResponseChoiceFinishReason FinishReason { get; set; } + public InternalCreateChatCompletionFunctionResponseChoiceFinishReason FinishReason { get; } - public int Index { get; set; } + public int Index { get; } - public InternalChatCompletionResponseMessage Message { get; set; } + public InternalChatCompletionResponseMessage Message { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs index 648b5e6fd..211ade5cf 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs @@ -28,12 +28,12 @@ internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finish _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public Chat.ChatFinishReason FinishReason { get; set; } + public Chat.ChatFinishReason FinishReason { get; } - public int Index { get; set; } + public int Index { get; } - public InternalChatCompletionResponseMessage Message { get; set; } + public InternalChatCompletionResponseMessage Message { get; } - public InternalCreateChatCompletionResponseChoiceLogprobs Logprobs { get; set; } + public InternalCreateChatCompletionResponseChoiceLogprobs Logprobs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs index 9d6da8f66..26d8e971b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs @@ -25,8 +25,8 @@ internal InternalCreateChatCompletionResponseChoiceLogprobs(IList Content { get; set; } + public IList Content { get; } - public IList Refusal { get; set; } + public IList Refusal { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index bfa6faa33..5cc99b42f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -27,10 +27,10 @@ internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletion _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalChatCompletionStreamResponseDelta Delta { get; set; } + public InternalChatCompletionStreamResponseDelta Delta { get; } - public InternalCreateChatCompletionStreamResponseChoiceLogprobs Logprobs { get; set; } + public InternalCreateChatCompletionStreamResponseChoiceLogprobs Logprobs { get; } - public int Index { get; set; } + public int Index { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs index 2799ed041..24effb5fc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs @@ -25,8 +25,8 @@ internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IList Content { get; set; } + public IList Content { get; } - public IList Refusal { get; set; } + public IList Refusal { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs index 3888a1726..542fa8575 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs @@ -26,10 +26,10 @@ internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, i _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int CompletionTokens { get; set; } + public int CompletionTokens { get; } - public int PromptTokens { get; set; } + public int PromptTokens { get; } - public int TotalTokens { get; set; } + public int TotalTokens { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs index c16c1c75b..850702677 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs @@ -33,18 +33,18 @@ internal InternalCreateCompletionResponse(string id, IList Choices { get; } - public DateTimeOffset Created { get; set; } + public DateTimeOffset Created { get; } - public string Model { get; set; } + public string Model { get; } - public string SystemFingerprint { get; set; } + public string SystemFingerprint { get; } public InternalCreateCompletionResponseObject Object { get; } = "text_completion"; - public ChatTokenUsage Usage { get; set; } + public ChatTokenUsage Usage { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs index 29fe49176..93d3dd847 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs @@ -28,12 +28,12 @@ internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponse _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalCreateCompletionResponseChoiceFinishReason FinishReason { get; set; } + public InternalCreateCompletionResponseChoiceFinishReason FinishReason { get; } - public int Index { get; set; } + public int Index { get; } - public InternalCreateCompletionResponseChoiceLogprobs Logprobs { get; set; } + public InternalCreateCompletionResponseChoiceLogprobs Logprobs { get; } - public string Text { get; set; } + public string Text { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs index 315b7cc31..e83d4ddf3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs @@ -22,6 +22,6 @@ internal InternalCreateTranscriptionResponseJson(string text, IDictionary Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs index a3ccd8aa7..b223e5c17 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs @@ -30,11 +30,11 @@ internal InternalListBatchesResponse(IList data, string firstI public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } public InternalListBatchesResponseObject Object { get; } = "list"; } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs index f94f4683d..c27eb7619 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs @@ -32,10 +32,10 @@ internal InternalListFineTuningJobCheckpointsResponse(IList Data { get; } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs index 0af91bdb1..ee1c2325c 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs @@ -34,10 +34,10 @@ internal InternalListMessagesResponse(InternalListMessagesResponseObject @object public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs index e54b9ce17..e4bea4612 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs @@ -28,7 +28,7 @@ internal InternalListPaginatedFineTuningJobsResponse(IList data, public IList Data { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } public InternalListPaginatedFineTuningJobsResponseObject Object { get; } = "list"; } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs index bdaf82d25..212eeb0b5 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs @@ -34,10 +34,10 @@ internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs index 683525eab..401e05d0a 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs @@ -34,10 +34,10 @@ internal InternalListRunsResponse(InternalListRunsResponseObject @object, IList< public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs index ef64e7a33..3486a95b1 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs @@ -34,10 +34,10 @@ internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs index 58584dbed..43f032261 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs @@ -34,10 +34,10 @@ internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesRespon public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs index 89bc2cf8c..45b218113 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs @@ -34,10 +34,10 @@ internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject public IList Data { get; } - public string FirstId { get; set; } + public string FirstId { get; } - public string LastId { get; set; } + public string LastId { get; } - public bool HasMore { get; set; } + public bool HasMore { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs index 91754591d..ad5291996 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs @@ -20,8 +20,8 @@ internal InternalMessageDeltaContentImageFileObject(int index, InternalMessageDe ImageFile = imageFile; } - public int Index { get; set; } + public int Index { get; } - public InternalMessageDeltaContentImageFileObjectImageFile ImageFile { get; set; } + public InternalMessageDeltaContentImageFileObjectImageFile ImageFile { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs index 2e9f78c0d..3aff79925 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs @@ -22,6 +22,6 @@ internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, stri _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs index bf9051931..0b82e3397 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs @@ -20,8 +20,8 @@ internal InternalMessageDeltaContentImageUrlObject(int index, InternalMessageDel ImageUrl = imageUrl; } - public int Index { get; set; } + public int Index { get; } - public InternalMessageDeltaContentImageUrlObjectImageUrl ImageUrl { get; set; } + public InternalMessageDeltaContentImageUrlObjectImageUrl ImageUrl { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs index 1a90cc599..7a55b408c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs @@ -22,6 +22,6 @@ internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, string detai _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public Uri Url { get; set; } + public Uri Url { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs index 1411b253d..54a1af558 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs @@ -20,8 +20,8 @@ internal InternalMessageDeltaContentRefusalObject(int index, string refusal, str Refusal = refusal; } - public int Index { get; set; } + public int Index { get; } - public string Refusal { get; set; } + public string Refusal { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs index 84bd901b1..807ee8b3a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs @@ -23,14 +23,14 @@ internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index, EndIndex = endIndex; } - public int Index { get; set; } + public int Index { get; } - public string Text { get; set; } + public string Text { get; } - public InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation FileCitation { get; set; } + public InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation FileCitation { get; } - public int? StartIndex { get; set; } + public int? StartIndex { get; } - public int? EndIndex { get; set; } + public int? EndIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs index 6c383c7e8..0d59b4552 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -22,8 +22,8 @@ internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitatio _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } - public string Quote { get; set; } + public string Quote { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs index bab46819b..c73b0cb4d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs @@ -23,14 +23,14 @@ internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index, str EndIndex = endIndex; } - public int Index { get; set; } + public int Index { get; } - public string Text { get; set; } + public string Text { get; } - public InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath FilePath { get; set; } + public InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath FilePath { get; } - public int? StartIndex { get; set; } + public int? StartIndex { get; } - public int? EndIndex { get; set; } + public int? EndIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs index 3fd2ece4d..503435dab 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs @@ -21,6 +21,6 @@ internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(string _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs index f84993fbf..f63f196eb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs @@ -20,8 +20,8 @@ internal InternalMessageDeltaContentTextObject(int index, InternalMessageDeltaCo Text = text; } - public int Index { get; set; } + public int Index { get; } - public InternalMessageDeltaContentTextObjectText Text { get; set; } + public InternalMessageDeltaContentTextObjectText Text { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs index 53f5d8e48..22fc478e1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs @@ -24,7 +24,7 @@ internal InternalMessageDeltaContentTextObjectText(string value, IList Annotations { get; } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs index fadfeec07..e74270a85 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs @@ -25,10 +25,10 @@ internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectObject _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } public InternalMessageDeltaObjectObject Object { get; } = "thread.message.delta"; - public InternalMessageDeltaObjectDelta Delta { get; set; } + public InternalMessageDeltaObjectDelta Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs index c392d0b7a..9ba55bae7 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs @@ -24,7 +24,7 @@ internal InternalMessageObjectAttachment(string fileId, IList tools, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } public IList Tools { get; } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.cs index 761c97fca..b318ee686 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.cs @@ -42,26 +42,26 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Hate { get; set; } + public bool Hate { get; } - public bool HateThreatening { get; set; } + public bool HateThreatening { get; } - public bool Harassment { get; set; } + public bool Harassment { get; } - public bool HarassmentThreatening { get; set; } + public bool HarassmentThreatening { get; } - public bool SelfHarm { get; set; } + public bool SelfHarm { get; } - public bool SelfHarmIntent { get; set; } + public bool SelfHarmIntent { get; } - public bool SelfHarmInstructions { get; set; } + public bool SelfHarmInstructions { get; } - public bool Sexual { get; set; } + public bool Sexual { get; } - public bool SexualMinors { get; set; } + public bool SexualMinors { get; } - public bool Violence { get; set; } + public bool Violence { get; } - public bool ViolenceGraphic { get; set; } + public bool ViolenceGraphic { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs index da2eb119c..7fe846332 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs @@ -42,26 +42,26 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public float Hate { get; set; } + public float Hate { get; } - public float HateThreatening { get; set; } + public float HateThreatening { get; } - public float Harassment { get; set; } + public float Harassment { get; } - public float HarassmentThreatening { get; set; } + public float HarassmentThreatening { get; } - public float SelfHarm { get; set; } + public float SelfHarm { get; } - public float SelfHarmIntent { get; set; } + public float SelfHarmIntent { get; } - public float SelfHarmInstructions { get; set; } + public float SelfHarmInstructions { get; } - public float Sexual { get; set; } + public float Sexual { get; } - public float SexualMinors { get; set; } + public float SexualMinors { get; } - public float Violence { get; set; } + public float Violence { get; } - public float ViolenceGraphic { get; set; } + public float ViolenceGraphic { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs index 913b825eb..5b4eaa7c6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs @@ -34,12 +34,12 @@ internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string public InternalRealtimeResponseObject Object { get; } = "realtime.response"; - public string Id { get; set; } + public string Id { get; } - public ConversationStatus Status { get; set; } + public ConversationStatus Status { get; } - public InternalRealtimeResponseStatusDetails StatusDetails { get; set; } + public InternalRealtimeResponseStatusDetails StatusDetails { get; } - public ConversationTokenUsage Usage { get; set; } + public ConversationTokenUsage Usage { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs index 610d17ab2..6ff8c43e2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs @@ -26,12 +26,12 @@ internal InternalRealtimeResponseApiError(string @type, string code, string mess _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Type { get; set; } + public string Type { get; } - public string Code { get; set; } + public string Code { get; } - public string Message { get; set; } + public string Message { get; } - public string Param { get; set; } + public string Param { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs index 4175d986d..d0954e1ac 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -19,6 +19,6 @@ internal InternalRealtimeResponseAudioContentPart(string transcript, Conversatio Transcript = transcript; } - public string Transcript { get; set; } + public string Transcript { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs index 642d44be6..1f8bdfa79 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.cs @@ -19,6 +19,6 @@ internal InternalRealtimeResponseCancelledStatusDetails(InternalRealtimeResponse Reason = reason; } - public InternalRealtimeResponseCancelledStatusDetailsReason Reason { get; set; } + public InternalRealtimeResponseCancelledStatusDetailsReason Reason { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs index ad6264d6f..d2f71b352 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs @@ -27,14 +27,14 @@ internal InternalRealtimeResponseError(string @type, string code, string message _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Type { get; set; } + public string Type { get; } - public string Code { get; set; } + public string Code { get; } - public string Message { get; set; } + public string Message { get; } - public string Param { get; set; } + public string Param { get; } - public string EventId { get; set; } + public string EventId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs index 41f84396c..9355180f6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs @@ -25,12 +25,12 @@ internal InternalRealtimeResponseFunctionCallItem(string name, string callId, st Status = status; } - public string Name { get; set; } + public string Name { get; } - public string CallId { get; set; } + public string CallId { get; } - public string Arguments { get; set; } + public string Arguments { get; } - public ConversationItemStatus Status { get; set; } + public ConversationItemStatus Status { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs index 0a3cdc0bd..051538599 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs @@ -21,8 +21,8 @@ internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string ou Output = output; } - public string CallId { get; set; } + public string CallId { get; } - public string Output { get; set; } + public string Output { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs index 9594d54de..d22ec167f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.cs @@ -19,6 +19,6 @@ internal InternalRealtimeResponseIncompleteStatusDetails(InternalRealtimeRespons Reason = reason; } - public InternalRealtimeResponseIncompleteStatusDetailsReason Reason { get; set; } + public InternalRealtimeResponseIncompleteStatusDetailsReason Reason { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs index fa9acc164..e965f8cb9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs @@ -29,6 +29,6 @@ internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object internal InternalRealtimeRequestItemType Type { get; set; } - public string Id { get; set; } + public string Id { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs index a6a2a2cc9..ad10471b4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs @@ -26,6 +26,6 @@ internal InternalRealtimeResponseMessageItem(IList cont public IList Content { get; } - public ConversationItemStatus Status { get; set; } + public ConversationItemStatus Status { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index e7958350f..dc3bb3c1d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -50,28 +50,28 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ public InternalRealtimeResponseSessionObject Object { get; } = "realtime.session"; - public string Id { get; set; } + public string Id { get; } - public string Model { get; set; } + public string Model { get; } public IList Modalities { get; } - public string Instructions { get; set; } + public string Instructions { get; } - public ConversationVoice Voice { get; set; } + public ConversationVoice Voice { get; } - public ConversationAudioFormat InputAudioFormat { get; set; } + public ConversationAudioFormat InputAudioFormat { get; } - public ConversationAudioFormat OutputAudioFormat { get; set; } + public ConversationAudioFormat OutputAudioFormat { get; } - public ConversationInputTranscriptionOptions InputAudioTranscription { get; set; } + public ConversationInputTranscriptionOptions InputAudioTranscription { get; } - public ConversationTurnDetectionOptions TurnDetection { get; set; } + public ConversationTurnDetectionOptions TurnDetection { get; } public IList Tools { get; } - public BinaryData ToolChoice { get; set; } + public BinaryData ToolChoice { get; } - public float Temperature { get; set; } + public float Temperature { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs index 48dbc9025..49de520dc 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -19,6 +19,6 @@ internal InternalRealtimeResponseTextContentPart(string text, ConversationConten Text = text; } - public string Text { get; set; } + public string Text { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index ffedfb2f5..15de61f38 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -26,6 +26,6 @@ internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunTo _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 4ce27d820..91fe965e0 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -24,6 +24,6 @@ internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutp _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; set; } + public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs index 408343bad..6c0032581 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -21,6 +21,6 @@ internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunSte _codeInterpreter = codeInterpreter; } - public string Id { get; set; } + public string Id { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 04a1ae737..4bdb4c9cc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -26,8 +26,8 @@ internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public InternalRunStepDeltaObjectDelta Delta { get; set; } + public InternalRunStepDeltaObjectDelta Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs index cbc7105d0..82332d9fc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs @@ -21,6 +21,6 @@ internal InternalRunStepDeltaObjectDelta(InternalRunStepDeltaStepDetails stepDet _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunStepDeltaStepDetails StepDetails { get; set; } + public InternalRunStepDeltaStepDetails StepDetails { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs index 18025db59..47d323824 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs @@ -18,6 +18,6 @@ internal InternalRunStepDeltaStepDetailsMessageCreationObject(InternalRunStepDel MessageCreation = messageCreation; } - public InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } + public InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs index 0cb96d3f9..944e00a08 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs @@ -21,6 +21,6 @@ internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(str _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string MessageId { get; set; } + public string MessageId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs index 94181af8a..b8248bc64 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs @@ -21,10 +21,10 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index, string id CodeInterpreter = codeInterpreter; } - public int Index { get; set; } + public int Index { get; } - public string Id { get; set; } + public string Id { get; } - public InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } + public InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 4e7c4d9f7..2e3d2cdf5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -24,7 +24,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(strin _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Input { get; set; } + public string Input { get; } public IList Outputs { get; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs index 77c77ae5c..d3aaecf4e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs @@ -20,8 +20,8 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index Image = image; } - public int Index { get; set; } + public int Index { get; } - public InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } + public InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage Image { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs index e4be793af..0245f53b1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -21,6 +21,6 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(stri _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs index edccc1acd..35e376051 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs @@ -20,6 +20,6 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index, InternalLogs = internalLogs; } - public int Index { get; set; } + public int Index { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs index 579e98ac2..d46308f6a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs @@ -22,9 +22,9 @@ internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, str FileSearch = fileSearch; } - public int Index { get; set; } + public int Index { get; } - public string Id { get; set; } + public string Id { get; } public IDictionary FileSearch { get; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs index 3b0050bf5..445dcf9cc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs @@ -21,10 +21,10 @@ internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index, strin Function = function; } - public int Index { get; set; } + public int Index { get; } - public string Id { get; set; } + public string Id { get; } - public InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction Function { get; set; } + public InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction Function { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs index 8af370fc4..1b1a526c1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs @@ -23,10 +23,10 @@ internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(string n _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } - public string Arguments { get; set; } + public string Arguments { get; } - public string Output { get; set; } + public string Output { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs index 12818dfc4..b9ab22c7d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs @@ -22,6 +22,6 @@ internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messa _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string MessageId { get; set; } + public string MessageId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 2b3e28945..5d1fc664b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -25,7 +25,7 @@ internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Input { get; set; } + public string Input { get; } public IList Outputs { get; } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs index 752be0192..2516f1748 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -22,6 +22,6 @@ internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs index 6fc64bbfa..9f201118c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs @@ -25,6 +25,6 @@ internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(InternalR public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker Ranker { get; } = "default_2024_08_21"; - public float ScoreThreshold { get; set; } + public float ScoreThreshold { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs index ea8869c9a..7820c5b7c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs @@ -22,8 +22,8 @@ internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent(InternalRu _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? Type { get; set; } + public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? Type { get; } - public string Text { get; set; } + public string Text { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs index 19b68a0a8..af129b8d9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs @@ -26,10 +26,10 @@ internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, stri _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } - public string Arguments { get; set; } + public string Arguments { get; } - public string Output { get; set; } + public string Output { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs index 0d850f153..37c58129b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs @@ -21,8 +21,8 @@ internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDeta FileSearch = fileSearch; } - public string Id { get; set; } + public string Id { get; } - public InternalRunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; set; } + public InternalRunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs index 635240a7a..20d6c82eb 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs @@ -21,6 +21,6 @@ internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetail _internalFunction = internalFunction; } - public string Id { get; set; } + public string Id { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs index 4ea964edb..5fdeb5cd6 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs @@ -24,8 +24,8 @@ internal InternalRunToolCallObjectFunction(string name, string arguments, IDicti _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } - public string Arguments { get; set; } + public string Arguments { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs index 5515ab7e4..501da870c 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs @@ -22,8 +22,8 @@ internal InternalThreadObjectToolResources(InternalThreadObjectToolResourcesCode _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalThreadObjectToolResourcesCodeInterpreter CodeInterpreter { get; set; } + public InternalThreadObjectToolResourcesCodeInterpreter CodeInterpreter { get; } - public InternalThreadObjectToolResourcesFileSearch FileSearch { get; set; } + public InternalThreadObjectToolResourcesFileSearch FileSearch { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalUpload.cs b/.dotnet/src/Generated/Models/InternalUpload.cs index fb6cfaf2a..1281bf7da 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.cs @@ -36,22 +36,22 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string Filename { get; set; } + public string Filename { get; } - public int Bytes { get; set; } + public int Bytes { get; } - public string Purpose { get; set; } + public string Purpose { get; } - public InternalUploadStatus Status { get; set; } + public InternalUploadStatus Status { get; } - public DateTimeOffset ExpiresAt { get; set; } + public DateTimeOffset ExpiresAt { get; } - public InternalUploadObject? Object { get; set; } + public InternalUploadObject? Object { get; } - public OpenAIFile File { get; set; } + public OpenAIFile File { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.cs b/.dotnet/src/Generated/Models/InternalUploadPart.cs index 5edb58fb8..0626250f0 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.cs @@ -27,11 +27,11 @@ internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string UploadId { get; set; } + public string UploadId { get; } public InternalUploadPartObject Object { get; } = "upload.part"; } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs index e6aca88b9..68dc3b109 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs @@ -30,14 +30,14 @@ internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int comple _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int InProgress { get; set; } + public int InProgress { get; } - public int Completed { get; set; } + public int Completed { get; } - public int Failed { get; set; } + public int Failed { get; } - public int Cancelled { get; set; } + public int Cancelled { get; } - public int Total { get; set; } + public int Total { get; } } } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index be7178507..fa596180a 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -26,6 +26,6 @@ internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMes _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Deleted { get; set; } + public bool Deleted { get; } } } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.cs index c141346a6..2d690f622 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.cs @@ -22,6 +22,6 @@ internal MessageFailureDetails(MessageFailureReason reason, IDictionary addition _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Flagged { get; set; } + public bool Flagged { get; } } } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.cs index 336bb11a3..b83c70732 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.cs @@ -24,8 +24,8 @@ internal ModerationResultCollection(string id, string model, IDictionary _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public OpenAIError Error { get; set; } + public OpenAIError Error { get; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index a3b2c52e0..3d899feec 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -35,12 +35,12 @@ internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files. _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string Filename { get; set; } + public string Filename { get; } - public Files.FilePurpose Purpose { get; set; } + public Files.FilePurpose Purpose { get; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index ec366d021..4f403c3e0 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -28,8 +28,8 @@ internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, Dat _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public string OwnedBy { get; set; } + public string OwnedBy { get; } } } diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs index 4d00a9a00..eb9defd95 100644 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.cs @@ -19,6 +19,6 @@ internal RealtimeResponseFailedStatusDetails(BinaryData error, ConversationStatu Error = error; } - public BinaryData Error { get; set; } + public BinaryData Error { get; } } } diff --git a/.dotnet/src/Generated/Models/RunError.cs b/.dotnet/src/Generated/Models/RunError.cs index e5aff9203..54e688da5 100644 --- a/.dotnet/src/Generated/Models/RunError.cs +++ b/.dotnet/src/Generated/Models/RunError.cs @@ -24,8 +24,8 @@ internal RunError(RunErrorCode code, string message, IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } - public RunStepTokenUsage Usage { get; set; } + public RunStepTokenUsage Usage { get; } } } diff --git a/.dotnet/src/Generated/Models/RunStepError.cs b/.dotnet/src/Generated/Models/RunStepError.cs index 2776c4682..09127a420 100644 --- a/.dotnet/src/Generated/Models/RunStepError.cs +++ b/.dotnet/src/Generated/Models/RunStepError.cs @@ -24,8 +24,8 @@ internal RunStepError(RunStepErrorCode code, string message, IDictionary Content { get; } - public string AssistantId { get; set; } + public string AssistantId { get; } - public string RunId { get; set; } + public string RunId { get; } - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index cf96ae0c6..db9b511e4 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -73,42 +73,42 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string ThreadId { get; set; } + public string ThreadId { get; } - public string AssistantId { get; set; } + public string AssistantId { get; } - public RunStatus Status { get; set; } + public RunStatus Status { get; } - public RunError LastError { get; set; } + public RunError LastError { get; } - public DateTimeOffset? ExpiresAt { get; set; } + public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? StartedAt { get; set; } + public DateTimeOffset? StartedAt { get; } - public DateTimeOffset? CancelledAt { get; set; } + public DateTimeOffset? CancelledAt { get; } - public DateTimeOffset? FailedAt { get; set; } + public DateTimeOffset? FailedAt { get; } - public DateTimeOffset? CompletedAt { get; set; } + public DateTimeOffset? CompletedAt { get; } - public RunIncompleteDetails IncompleteDetails { get; set; } + public RunIncompleteDetails IncompleteDetails { get; } - public string Model { get; set; } + public string Model { get; } - public string Instructions { get; set; } + public string Instructions { get; } public IList Tools { get; } - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } - public RunTokenUsage Usage { get; set; } + public RunTokenUsage Usage { get; } - public float? Temperature { get; set; } + public float? Temperature { get; } - public RunTruncationStrategy TruncationStrategy { get; set; } + public RunTruncationStrategy TruncationStrategy { get; } } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index c036fbcb6..139dacfae 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -40,12 +40,12 @@ internal TranscribedSegment(int id, string text, float temperature, float compre _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int Id { get; set; } + public int Id { get; } - public string Text { get; set; } + public string Text { get; } - public float Temperature { get; set; } + public float Temperature { get; } - public float CompressionRatio { get; set; } + public float CompressionRatio { get; } } } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index e00aa0377..6f8434241 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -26,6 +26,6 @@ internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime, IDic _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Word { get; set; } + public string Word { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index dcdf914ca..32fb32d7b 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -40,22 +40,22 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Id { get; set; } + public string Id { get; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string Name { get; set; } + public string Name { get; } - public int UsageBytes { get; set; } + public int UsageBytes { get; } - public VectorStoreFileCounts FileCounts { get; set; } + public VectorStoreFileCounts FileCounts { get; } - public VectorStores.VectorStoreStatus Status { get; set; } + public VectorStores.VectorStoreStatus Status { get; } - public DateTimeOffset? ExpiresAt { get; set; } + public DateTimeOffset? ExpiresAt { get; } - public DateTimeOffset? LastActiveAt { get; set; } + public DateTimeOffset? LastActiveAt { get; } - public IDictionary Metadata { get; set; } + public IDictionary Metadata { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index 76c3cffe2..aa88a1519 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -32,10 +32,10 @@ internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string VectorStoreId { get; set; } + public string VectorStoreId { get; } - public VectorStoreBatchFileJobStatus Status { get; set; } + public VectorStoreBatchFileJobStatus Status { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 90a5d3e56..5d3a10e00 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -26,6 +26,6 @@ internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalD _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public bool Deleted { get; set; } + public bool Deleted { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index 8894024b4..881c11e30 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -35,12 +35,12 @@ internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStore _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public DateTimeOffset CreatedAt { get; set; } + public DateTimeOffset CreatedAt { get; } - public string VectorStoreId { get; set; } + public string VectorStoreId { get; } - public VectorStores.VectorStoreFileAssociationStatus Status { get; set; } + public VectorStores.VectorStoreFileAssociationStatus Status { get; } - public VectorStoreFileAssociationError LastError { get; set; } + public VectorStoreFileAssociationError LastError { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs index dbf84187d..8fff82934 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs @@ -24,8 +24,8 @@ internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode cod _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public VectorStoreFileAssociationErrorCode Code { get; set; } + public VectorStoreFileAssociationErrorCode Code { get; } - public string Message { get; set; } + public string Message { get; } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs index e9d2a780e..ebc81317d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs @@ -30,14 +30,14 @@ internal VectorStoreFileCounts(int inProgress, int completed, int failed, int ca _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public int InProgress { get; set; } + public int InProgress { get; } - public int Completed { get; set; } + public int Completed { get; } - public int Failed { get; set; } + public int Failed { get; } - public int Cancelled { get; set; } + public int Cancelled { get; } - public int Total { get; set; } + public int Total { get; } } } From 9d2397d0e10e952a7bfdc15bac4d5b00dfab8e64 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 18 Oct 2024 10:45:09 -0700 Subject: [PATCH 10/54] Down to 38 --- .../Internal/ClientPipelineExtensions.cs | 5 ++ .../Generated/Internal/ClientUriBuilder.cs | 24 +++--- .dotnet/src/Generated/Models/Assistant.cs | 3 +- .../Models/AssistantDeletionResult.cs | 3 +- .../src/Generated/Models/AssistantThread.cs | 3 +- .../Generated/Models/AudioTranscription.cs | 3 +- .../src/Generated/Models/AudioTranslation.cs | 3 +- .../src/Generated/Models/ChatCompletion.cs | 3 +- .dotnet/src/Generated/Models/ChatTool.cs | 8 -- .dotnet/src/Generated/Models/ChatToolCall.cs | 11 --- .../Generated/Models/FileDeletionResult.cs | 3 +- .../Models/FileFromStoreRemovalResult.cs | 3 +- ...nternalBatchRequestOutput.Serialization.cs | 2 +- .../InternalChatCompletionResponseMessage.cs | 3 +- .../Models/InternalMessageImageFileContent.cs | 10 --- .../Models/InternalMessageImageUrlContent.cs | 10 --- .../Models/InternalMessageRefusalContent.cs | 4 +- .../InternalRequiredFunctionToolCall.cs | 3 +- .../InternalResponseMessageTextContent.cs | 10 --- .../Models/InternalRunRequiredAction.cs | 3 +- .../Generated/Models/InternalRunStepDelta.cs | 3 +- .../Generated/Models/MessageDeletionResult.cs | 3 +- .../Generated/Models/ModelDeletionResult.cs | 3 +- .../src/Generated/Models/OpenAIEmbedding.cs | 7 -- .../Models/OpenAIEmbeddingCollection.cs | 3 +- .dotnet/src/Generated/Models/OpenAIFile.cs | 3 +- .../Generated/Models/OpenAIFileCollection.cs | 5 -- .dotnet/src/Generated/Models/OpenAIModel.cs | 3 +- .../Generated/Models/OpenAIModelCollection.cs | 5 -- .dotnet/src/Generated/Models/RunStep.cs | 3 +- .../Models/StreamingChatCompletionUpdate.cs | 3 +- .../Generated/Models/ThreadDeletionResult.cs | 3 +- .dotnet/src/Generated/Models/ThreadMessage.cs | 3 +- .dotnet/src/Generated/Models/ThreadRun.cs | 3 +- .dotnet/src/Generated/Models/VectorStore.cs | 3 +- .../Models/VectorStoreBatchFileJob.cs | 3 +- .../Models/VectorStoreDeletionResult.cs | 3 +- .../Models/VectorStoreFileAssociation.cs | 3 +- .dotnet/src/Generated/OpenAIClient.cs | 86 ------------------- .../Generated/RealtimeConversationClient.cs | 34 -------- .dotnet/tspCodeModel.json | 2 +- 41 files changed, 46 insertions(+), 255 deletions(-) diff --git a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs index c51dd675b..ae7f6f693 100644 --- a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs +++ b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs @@ -37,5 +37,10 @@ public static ClientResult ProcessHeadAsBoolMessage(this ClientPipeline pi return new ErrorResult(response, new ClientResultException(response)); } } + + private static PipelineResponse ExtractResponseContent(PipelineMessage message) + { + return message.ExtractResponse(); + } } } diff --git a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs index eca3c63c1..ecfce6715 100644 --- a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs +++ b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs @@ -103,18 +103,6 @@ public void AppendQuery(string name, string value, bool escape) public void AppendQuery(string name, Guid value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, bool escape = true) - { - IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); - AppendQuery(name, string.Join(delimiter, stringValues), escape); - } - - public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, string format, bool escape = true) - { - IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); - AppendQuery(name, string.Join(delimiter, stringValues), escape); - } - public Uri ToUri() { if (_pathBuilder != null) @@ -127,5 +115,17 @@ public Uri ToUri() } return UriBuilder.Uri; } + + public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, bool escape = true) + { + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); + AppendQuery(name, string.Join(delimiter, stringValues), escape); + } + + public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, string format, bool escape = true) + { + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + AppendQuery(name, string.Join(delimiter, stringValues), escape); + } } } diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 83a7e89a7..b5491da9a 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -12,7 +12,7 @@ public partial class Assistant { private protected IDictionary _additionalBinaryDataProperties; - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata, InternalAssistantObjectObject @object) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) { Id = id; CreatedAt = createdAt; @@ -22,7 +22,6 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Instructions = instructions; Tools = tools.ToList(); Metadata = metadata; - this.Object = @object; } internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index ac662fc8c..a4f102947 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -11,11 +11,10 @@ public partial class AssistantDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantDeletionResult(bool deleted, string assistantId, InternalDeleteAssistantResponseObject @object) + internal AssistantDeletionResult(bool deleted, string assistantId) { Deleted = deleted; AssistantId = assistantId; - this.Object = @object; } internal AssistantDeletionResult(bool deleted, string assistantId, InternalDeleteAssistantResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index 6043e8ec9..2bbaaee42 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -11,12 +11,11 @@ public partial class AssistantThread { private protected IDictionary _additionalBinaryDataProperties; - internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, ToolResources toolResources) + internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, ToolResources toolResources) { Id = id; CreatedAt = createdAt; Metadata = metadata; - this.Object = @object; ToolResources = toolResources; } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index 1975fb357..b61d97d71 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -12,13 +12,12 @@ public partial class AudioTranscription { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranscription(string language, string text, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration) + internal AudioTranscription(string language, string text, TimeSpan? duration) { Language = language; Text = text; Words = new ChangeTrackingList(); Segments = new ChangeTrackingList(); - Task = task; Duration = duration; } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index 27c836a49..ae29adfd4 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -12,12 +12,11 @@ public partial class AudioTranslation { private protected IDictionary _additionalBinaryDataProperties; - internal AudioTranslation(string language, string text, InternalCreateTranslationResponseVerboseJsonTask task, TimeSpan? duration) + internal AudioTranslation(string language, string text, TimeSpan? duration) { Language = language; Text = text; Segments = new ChangeTrackingList(); - Task = task; Duration = duration; } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 0052ad612..e383c079d 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -12,11 +12,10 @@ public partial class ChatCompletion { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletion(string id, string model, InternalCreateChatCompletionResponseObject @object, IEnumerable choices, DateTimeOffset createdAt) + internal ChatCompletion(string id, string model, IEnumerable choices, DateTimeOffset createdAt) { Id = id; Model = model; - this.Object = @object; Choices = choices.ToList(); CreatedAt = createdAt; } diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index 79c02f726..927a8bbb2 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -12,14 +12,6 @@ public partial class ChatTool { private protected IDictionary _additionalBinaryDataProperties; - public ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind) - { - Argument.AssertNotNull(function, nameof(function)); - - Function = function; - Kind = kind; - } - internal ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind, IDictionary additionalBinaryDataProperties) { Function = function; diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index d7c2aaedf..c889ffd4f 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Chat { @@ -12,16 +11,6 @@ public partial class ChatToolCall { private protected IDictionary _additionalBinaryDataProperties; - public ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(function, nameof(function)); - - Id = id; - Function = function; - Kind = kind; - } - internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { Id = id; diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index 1ad9a6c85..c5fd69385 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -11,11 +11,10 @@ public partial class FileDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileResponseObject @object) + internal FileDeletionResult(bool deleted, string fileId) { Deleted = deleted; FileId = fileId; - this.Object = @object; } internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index fa3f01cec..76c67373c 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -11,11 +11,10 @@ public partial class FileFromStoreRemovalResult { private protected IDictionary _additionalBinaryDataProperties; - internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object) + internal FileFromStoreRemovalResult(string fileId, bool removed) { FileId = fileId; Removed = removed; - this.Object = @object; } internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteVectorStoreFileResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index a5f923c17..9ddfa0f69 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestOutput)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(Id)) + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index c74fd42d6..0bbb63717 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -12,11 +12,10 @@ internal partial class InternalChatCompletionResponseMessage { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionResponseMessage(string refusal, Chat.ChatMessageRole role, ChatMessageContent content) + internal InternalChatCompletionResponseMessage(string refusal, ChatMessageContent content) { Refusal = refusal; ToolCalls = new ChangeTrackingList(); - Role = role; Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs index a1b162815..1b071181e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs @@ -4,21 +4,11 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageFileContent : MessageContent { - public InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile) - { - Argument.AssertNotNull(@type, nameof(@type)); - Argument.AssertNotNull(imageFile, nameof(imageFile)); - - _type = @type; - _imageFile = imageFile; - } - internal InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { _type = @type; diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs index cae0a7b33..d7bd2e7ab 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs @@ -4,21 +4,11 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Assistants { internal partial class InternalMessageImageUrlContent : MessageContent { - public InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl) - { - Argument.AssertNotNull(@type, nameof(@type)); - Argument.AssertNotNull(imageUrl, nameof(imageUrl)); - - _type = @type; - _imageUrl = imageUrl; - } - internal InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { _type = @type; diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index ea6e5f516..173f50431 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -10,13 +10,11 @@ namespace OpenAI.Assistants { internal partial class InternalMessageRefusalContent : MessageContent { - public InternalMessageRefusalContent(string internalRefusal, string @type) + public InternalMessageRefusalContent(string internalRefusal) { Argument.AssertNotNull(internalRefusal, nameof(internalRefusal)); - Argument.AssertNotNull(@type, nameof(@type)); InternalRefusal = internalRefusal; - _type = @type; } internal InternalMessageRefusalContent(string internalRefusal, string @type, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index 15de61f38..dfe47c81d 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -11,10 +11,9 @@ internal partial class InternalRequiredFunctionToolCall { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunToolCallObjectFunction internalFunction) + internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction internalFunction) { Id = id; - _type = @type; _internalFunction = internalFunction; } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs index 85ed12bdd..820f23ec2 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs @@ -4,21 +4,11 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.Assistants { internal partial class InternalResponseMessageTextContent : MessageContent { - public InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text) - { - Argument.AssertNotNull(@type, nameof(@type)); - Argument.AssertNotNull(text, nameof(text)); - - _type = @type; - _text = text; - } - internal InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) { _type = @type; diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 91fe965e0..4a8ec3e5c 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -11,10 +11,9 @@ internal partial class InternalRunRequiredAction { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type) + internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs) { SubmitToolOutputs = submitToolOutputs; - Type = @type; } internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs, object @type, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 4bdb4c9cc..536e5f876 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -11,11 +11,10 @@ internal partial class InternalRunStepDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, object @object) + internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta) { Id = id; Delta = delta; - this.Object = @object; } internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, object @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index fa596180a..0448ece30 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -11,11 +11,10 @@ public partial class MessageDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMessageResponseObject @object) + internal MessageDeletionResult(bool deleted, string messageId) { Deleted = deleted; MessageId = messageId; - this.Object = @object; } internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMessageResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index 44ffb3cc1..9b87f2039 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -11,11 +11,10 @@ public partial class ModelDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelResponseObject @object) + internal ModelDeletionResult(bool deleted, string modelId) { Deleted = deleted; ModelId = modelId; - this.Object = @object; } internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index ee1a6ea6f..915e6d8c7 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -11,13 +11,6 @@ public partial class OpenAIEmbedding { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIEmbedding(int index, BinaryData embeddingProperty, InternalEmbeddingObject @object) - { - Index = index; - EmbeddingProperty = embeddingProperty; - this.Object = @object; - } - public int Index { get; } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index 99dbc8ef2..182ee5a4f 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -11,11 +11,10 @@ public partial class OpenAIEmbeddingCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object) + internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage) { Model = model; Usage = usage; - this.Object = @object; } internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index 3d899feec..49cd15b9d 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -11,13 +11,12 @@ public partial class OpenAIFile { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, InternalOpenAIFileObject @object, int? sizeInBytes, Files.FileStatus status) + internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes, Files.FileStatus status) { Id = id; CreatedAt = createdAt; Filename = filename; Purpose = purpose; - this.Object = @object; SizeInBytes = sizeInBytes; Status = status; } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index fb10cd18c..7c4d9176c 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -11,11 +11,6 @@ public partial class OpenAIFileCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIFileCollection(InternalListFilesResponseObject @object) - { - this.Object = @object; - } - internal OpenAIFileCollection(InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) { this.Object = @object; diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index 4f403c3e0..b0b105d0f 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -11,11 +11,10 @@ public partial class OpenAIModel { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, DateTimeOffset createdAt) + internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt) { Id = id; OwnedBy = ownedBy; - this.Object = @object; CreatedAt = createdAt; } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index 59f9b6a7f..90167012f 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -11,11 +11,6 @@ public partial class OpenAIModelCollection { private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModelCollection(InternalListModelsResponseObject @object) - { - this.Object = @object; - } - internal OpenAIModelCollection(InternalListModelsResponseObject @object, IDictionary additionalBinaryDataProperties) { this.Object = @object; diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index a143df158..9153da60a 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -11,7 +11,7 @@ public partial class RunStep { private protected IDictionary _additionalBinaryDataProperties; - internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, InternalRunStepObjectObject @object, RunStepDetails details) + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, RunStepDetails details) { Id = id; CreatedAt = createdAt; @@ -27,7 +27,6 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string CompletedAt = completedAt; Metadata = metadata; Usage = usage; - this.Object = @object; Details = details; } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index 54f3c8ced..dfc5e41b8 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -12,10 +12,9 @@ public partial class StreamingChatCompletionUpdate { private protected IDictionary _additionalBinaryDataProperties; - internal StreamingChatCompletionUpdate(string model, InternalCreateChatCompletionStreamResponseObject @object, string completionId, IEnumerable choices, DateTimeOffset createdAt) + internal StreamingChatCompletionUpdate(string model, string completionId, IEnumerable choices, DateTimeOffset createdAt) { Model = model; - this.Object = @object; CompletionId = completionId; Choices = choices.ToList(); CreatedAt = createdAt; diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index 78b729db8..7b53a598c 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -11,11 +11,10 @@ public partial class ThreadDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThreadResponseObject @object) + internal ThreadDeletionResult(bool deleted, string threadId) { Deleted = deleted; ThreadId = threadId; - this.Object = @object; } internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThreadResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index db0d6b9ca..734ba743c 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -12,7 +12,7 @@ public partial class ThreadMessage { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IEnumerable attachments) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, Assistants.MessageRole role, IEnumerable attachments) { Id = id; CreatedAt = createdAt; @@ -25,7 +25,6 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes AssistantId = assistantId; RunId = runId; Metadata = metadata; - this.Object = @object; Role = role; Attachments = attachments.ToList(); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index db9b511e4..12b71ebc9 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -12,7 +12,7 @@ public partial class ThreadRun { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) { Id = id; CreatedAt = createdAt; @@ -32,7 +32,6 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string Metadata = metadata; Usage = usage; TruncationStrategy = truncationStrategy; - this.Object = @object; ResponseFormat = responseFormat; ToolConstraint = toolConstraint; AllowParallelToolCalls = allowParallelToolCalls; diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index 32fb32d7b..75f2a8fa6 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -11,7 +11,7 @@ public partial class VectorStore { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object) + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) { Id = id; CreatedAt = createdAt; @@ -21,7 +21,6 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage Status = status; LastActiveAt = lastActiveAt; Metadata = metadata; - this.Object = @object; } internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index aa88a1519..09f44e467 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -11,14 +11,13 @@ public partial class VectorStoreBatchFileJob { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, object @object) + internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts) { CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; BatchId = batchId; FileCounts = fileCounts; - this.Object = @object; } internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts, object @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 5d3a10e00..bbdc21947 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -11,11 +11,10 @@ public partial class VectorStoreDeletionResult { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalDeleteVectorStoreResponseObject @object) + internal VectorStoreDeletionResult(bool deleted, string vectorStoreId) { Deleted = deleted; VectorStoreId = vectorStoreId; - this.Object = @object; } internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalDeleteVectorStoreResponseObject @object, IDictionary additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index 881c11e30..a65d73d7e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -11,13 +11,12 @@ public partial class VectorStoreFileAssociation { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, InternalVectorStoreFileObjectObject @object, string fileId, int size) + internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, string fileId, int size) { CreatedAt = createdAt; VectorStoreId = vectorStoreId; Status = status; LastError = lastError; - this.Object = @object; FileId = fileId; Size = size; } diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 708a7745d..7bafb3597 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading; using OpenAI.Assistants; using OpenAI.Audio; using OpenAI.Batch; @@ -51,90 +50,5 @@ protected OpenAIClient() } public ClientPipeline Pipeline { get; } - - public virtual AudioClient GetAudioClientClient() - { - return Volatile.Read(ref _cachedAudioClient) ?? Interlocked.CompareExchange(ref _cachedAudioClient, new AudioClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAudioClient; - } - - public virtual AssistantClient GetAssistantClientClient() - { - return Volatile.Read(ref _cachedAssistantClient) ?? Interlocked.CompareExchange(ref _cachedAssistantClient, new AssistantClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedAssistantClient; - } - - public virtual BatchClient GetBatchClientClient() - { - return Volatile.Read(ref _cachedBatchClient) ?? Interlocked.CompareExchange(ref _cachedBatchClient, new BatchClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedBatchClient; - } - - public virtual ChatClient GetChatClientClient() - { - return Volatile.Read(ref _cachedChatClient) ?? Interlocked.CompareExchange(ref _cachedChatClient, new ChatClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedChatClient; - } - - public virtual LegacyCompletionClient GetLegacyCompletionClientClient() - { - return Volatile.Read(ref _cachedLegacyCompletionClient) ?? Interlocked.CompareExchange(ref _cachedLegacyCompletionClient, new LegacyCompletionClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedLegacyCompletionClient; - } - - public virtual EmbeddingClient GetEmbeddingClientClient() - { - return Volatile.Read(ref _cachedEmbeddingClient) ?? Interlocked.CompareExchange(ref _cachedEmbeddingClient, new EmbeddingClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedEmbeddingClient; - } - - public virtual OpenAIFileClient GetOpenAIFileClientClient() - { - return Volatile.Read(ref _cachedOpenAIFileClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIFileClient, new OpenAIFileClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedOpenAIFileClient; - } - - public virtual FineTuningClient GetFineTuningClientClient() - { - return Volatile.Read(ref _cachedFineTuningClient) ?? Interlocked.CompareExchange(ref _cachedFineTuningClient, new FineTuningClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedFineTuningClient; - } - - public virtual ImageClient GetImageClientClient() - { - return Volatile.Read(ref _cachedImageClient) ?? Interlocked.CompareExchange(ref _cachedImageClient, new ImageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedImageClient; - } - - public virtual InternalAssistantMessageClient GetInternalAssistantMessageClientClient() - { - return Volatile.Read(ref _cachedInternalAssistantMessageClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantMessageClient, new InternalAssistantMessageClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantMessageClient; - } - - public virtual OpenAIModelClient GetOpenAIModelClientClient() - { - return Volatile.Read(ref _cachedOpenAIModelClient) ?? Interlocked.CompareExchange(ref _cachedOpenAIModelClient, new OpenAIModelClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedOpenAIModelClient; - } - - public virtual ModerationClient GetModerationClientClient() - { - return Volatile.Read(ref _cachedModerationClient) ?? Interlocked.CompareExchange(ref _cachedModerationClient, new ModerationClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedModerationClient; - } - - public virtual RealtimeConversationClient GetRealtimeConversationClientClient() - { - return Volatile.Read(ref _cachedRealtimeConversationClient) ?? Interlocked.CompareExchange(ref _cachedRealtimeConversationClient, new RealtimeConversationClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedRealtimeConversationClient; - } - - public virtual InternalAssistantThreadClient GetInternalAssistantThreadClientClient() - { - return Volatile.Read(ref _cachedInternalAssistantThreadClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantThreadClient, new InternalAssistantThreadClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantThreadClient; - } - - public virtual InternalAssistantRunClient GetInternalAssistantRunClientClient() - { - return Volatile.Read(ref _cachedInternalAssistantRunClient) ?? Interlocked.CompareExchange(ref _cachedInternalAssistantRunClient, new InternalAssistantRunClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalAssistantRunClient; - } - - public virtual VectorStoreClient GetVectorStoreClientClient() - { - return Volatile.Read(ref _cachedVectorStoreClient) ?? Interlocked.CompareExchange(ref _cachedVectorStoreClient, new VectorStoreClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedVectorStoreClient; - } - - public virtual InternalUploadsClient GetInternalUploadsClientClient() - { - return Volatile.Read(ref _cachedInternalUploadsClient) ?? Interlocked.CompareExchange(ref _cachedInternalUploadsClient, new InternalUploadsClient(Pipeline, _keyCredential, _endpoint), null) ?? _cachedInternalUploadsClient; - } } } diff --git a/.dotnet/src/Generated/RealtimeConversationClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.cs index 24499e716..6f43538da 100644 --- a/.dotnet/src/Generated/RealtimeConversationClient.cs +++ b/.dotnet/src/Generated/RealtimeConversationClient.cs @@ -5,10 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; -using OpenAI; namespace OpenAI.RealtimeConversation { @@ -31,35 +27,5 @@ internal RealtimeConversationClient(ClientPipeline pipeline, ApiKeyCredential ke } public ClientPipeline Pipeline { get; } - - public virtual ClientResult> StartRealtimeSession(IList requestMessages) - { - Argument.AssertNotNull(requestMessages, nameof(requestMessages)); - - using BinaryContent content = BinaryContentHelper.FromEnumerable(requestMessages); - ClientResult result = this.StartRealtimeSession(content, null); - IList value = new List(); - using JsonDocument document = JsonDocument.Parse(result.GetRawResponse().ContentStream); - foreach (var item in document.RootElement.EnumerateArray()) - { - value.Add(ConversationUpdate.DeserializeConversationUpdate(item, ModelSerializationExtensions.WireOptions)); - } - return ClientResult.FromValue(value, result.GetRawResponse()); - } - - public virtual async Task>> StartRealtimeSessionAsync(IList requestMessages) - { - Argument.AssertNotNull(requestMessages, nameof(requestMessages)); - - using BinaryContent content = BinaryContentHelper.FromEnumerable(requestMessages); - ClientResult result = await this.StartRealtimeSessionAsync(content, null).ConfigureAwait(false); - IList value = new List(); - using JsonDocument document = await JsonDocument.ParseAsync(result.GetRawResponse().ContentStream, default, default).ConfigureAwait(false); - foreach (var item in document.RootElement.EnumerateArray()) - { - value.Add(ConversationUpdate.DeserializeConversationUpdate(item, ModelSerializationExtensions.WireOptions)); - } - return ClientResult.FromValue(value, result.GetRawResponse()); - } } } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index 3f6ba448b..4e176ee9b 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -37362,7 +37362,7 @@ "decorators": [] }, "optional": true, - "readOnly": true, + "readOnly": false, "discriminator": false, "flatten": false, "decorators": [], From bb4129942438280ab2d0a9c3debf733d70d04fc1 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 18 Oct 2024 11:11:43 -0700 Subject: [PATCH 11/54] 12 errors --- ...nalListAssistantsResponse.Serialization.cs | 15 +- .../Models/InternalListAssistantsResponse.cs | 10 +- ...ernalListMessagesResponse.Serialization.cs | 15 +- .../Models/InternalListMessagesResponse.cs | 10 +- ...ernalListRunStepsResponse.Serialization.cs | 15 +- .../Models/InternalListRunStepsResponse.cs | 10 +- .../InternalListRunsResponse.Serialization.cs | 15 +- .../Models/InternalListRunsResponse.cs | 10 +- ...ternalListThreadsResponse.Serialization.cs | 15 +- .../Models/InternalListThreadsResponse.cs | 10 +- ...tVectorStoreFilesResponse.Serialization.cs | 15 +- .../InternalListVectorStoreFilesResponse.cs | 10 +- ...lListVectorStoresResponse.Serialization.cs | 15 +- .../InternalListVectorStoresResponse.cs | 10 +- .dotnet/tspCodeModel.json | 984 +++++++++++++++++- .openapi3/openapi3-openai.yaml | 7 + .typespec/assistants/client.tsp | 5 + .typespec/messages/client.tsp | 2 + .typespec/threads/client.tsp | 1 + .typespec/vector-stores/client.tsp | 3 + package-lock.json | 20 +- 21 files changed, 1103 insertions(+), 94 deletions(-) diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 1328d3fd8..57459d65f 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (Assistant item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (Assistant item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListAssistantsResponse DeserializeInternalListAssistants return null; } InternalListAssistantsResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs index a0fc3474c..c4e974945 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,15 +12,15 @@ internal partial class InternalListAssistantsResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListAssistantsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListAssistantsResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @ob public InternalListAssistantsResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index baeb183b9..0999bb3b0 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (ThreadMessage item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (ThreadMessage item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListMessagesResponse DeserializeInternalListMessagesResp return null; } InternalListMessagesResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs index ee1c2325c..bccbb5ba4 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,15 +12,15 @@ internal partial class InternalListMessagesResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListMessagesResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListMessagesResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListMessagesResponse(InternalListMessagesResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListMessagesResponse(InternalListMessagesResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListMessagesResponse(InternalListMessagesResponseObject @object public InternalListMessagesResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 964b6be92..bebe48bb5 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (RunStep item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (RunStep item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResp return null; } InternalListRunStepsResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs index 212eeb0b5..8753f6a0a 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,15 +12,15 @@ internal partial class InternalListRunStepsResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListRunStepsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListRunStepsResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object public InternalListRunStepsResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index f268e5882..ef00eb9df 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (ThreadRun item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (ThreadRun item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListRunsResponse DeserializeInternalListRunsResponse(Jso return null; } InternalListRunsResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs index 401e05d0a..36ab6ac2c 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,15 +12,15 @@ internal partial class InternalListRunsResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListRunsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListRunsResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListRunsResponse(InternalListRunsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListRunsResponse(InternalListRunsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListRunsResponse(InternalListRunsResponseObject @object, IList< public InternalListRunsResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index ff4a75e3f..6d8eb0cf3 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (AssistantThread item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (AssistantThread item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListThreadsResponse DeserializeInternalListThreadsRespon return null; } InternalListThreadsResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs index 3486a95b1..a494bbec7 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,15 +12,15 @@ internal partial class InternalListThreadsResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListThreadsResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListThreadsResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, public InternalListThreadsResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index f54962d94..aacbea164 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (VectorStoreFileAssociation item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (VectorStoreFileAssociation item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListVectorStoreFilesResponse DeserializeInternalListVect return null; } InternalListVectorStoreFilesResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs index 43f032261..d185fbd88 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.VectorStores { @@ -12,15 +12,15 @@ internal partial class InternalListVectorStoreFilesResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListVectorStoreFilesResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListVectorStoreFilesResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesRespon public InternalListVectorStoreFilesResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 23381a54e..a46142714 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (VectorStore item in Data) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (VectorStore item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); writer.WritePropertyName("last_id"u8); @@ -83,7 +86,7 @@ internal static InternalListVectorStoresResponse DeserializeInternalListVectorSt return null; } InternalListVectorStoresResponseObject @object = default; - IList data = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs index 45b218113..667f7ad1a 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.VectorStores { @@ -12,15 +12,15 @@ internal partial class InternalListVectorStoresResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalListVectorStoresResponse(IEnumerable data, string firstId, string lastId, bool hasMore) + internal InternalListVectorStoresResponse(string firstId, string lastId, bool hasMore) { - Data = data.ToList(); + Data = new ChangeTrackingList(); FirstId = firstId; LastId = lastId; HasMore = hasMore; } - internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject @object, IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) { Object = @object; Data = data; @@ -32,7 +32,7 @@ internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject public InternalListVectorStoresResponseObject Object { get; } = "list"; - public IList Data { get; } + public IReadOnlyList Data { get; } public string FirstId { get; } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index 4e176ee9b..13ebc4362 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -3866,6 +3866,7 @@ "enumType": { "$ref": "426" }, + "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", "decorators": [] } ], @@ -3905,6 +3906,7 @@ "decorators": [] } ], + "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", "isFixed": false, "isFlags": false, "usage": "Input,Output,Json", @@ -3938,6 +3940,7 @@ "enumType": { "$ref": "434" }, + "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", "decorators": [] }, { @@ -3955,6 +3958,7 @@ "enumType": { "$ref": "434" }, + "description": "Specifies that the model should call no tools whatsoever.", "decorators": [] }, { @@ -3972,9 +3976,11 @@ "enumType": { "$ref": "434" }, + "description": "Specifies that the model should call at least one tool.", "decorators": [] } ], + "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", "isFixed": false, "isFlags": false, "usage": "Input,Output,Json", @@ -11318,6 +11324,7 @@ } ], "access": "public", + "description": "The role of the author of a message", "isFixed": true, "isFlags": false, "usage": "Input,Output", @@ -11338,6 +11345,7 @@ "kind": "property", "name": "filename", "serializedName": "filename", + "description": "The name of the file to upload.", "type": { "$id": "1249", "kind": "string", @@ -11357,6 +11365,7 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", "type": { "$ref": "2" }, @@ -11372,6 +11381,7 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", + "description": "The number of bytes in the file you are uploading.", "type": { "$id": "1252", "kind": "int32", @@ -11391,6 +11401,7 @@ "kind": "property", "name": "mime_type", "serializedName": "mime_type", + "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", "type": { "$id": "1254", "kind": "string", @@ -11413,6 +11424,7 @@ "name": "Upload", "crossLanguageDefinitionId": "OpenAI.Upload", "usage": "Output,Json", + "description": "The Upload object can accept byte chunks in the form of Parts.", "decorators": [], "properties": [ { @@ -11420,6 +11432,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The Upload unique identifier, which can be referenced in API endpoints.", "type": { "$id": "1257", "kind": "string", @@ -11439,6 +11452,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", "type": { "$id": "1259", "kind": "utcDateTime", @@ -11466,6 +11480,7 @@ "kind": "property", "name": "filename", "serializedName": "filename", + "description": "The name of the file to be uploaded.", "type": { "$id": "1262", "kind": "string", @@ -11485,6 +11500,7 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", + "description": "The intended number of bytes to be uploaded.", "type": { "$id": "1264", "kind": "int32", @@ -11504,6 +11520,7 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", + "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", "type": { "$id": "1266", "kind": "string", @@ -11523,6 +11540,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the Upload.", "type": { "$ref": "12" }, @@ -11538,6 +11556,7 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", "type": { "$id": "1269", "kind": "utcDateTime", @@ -11565,6 +11584,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"upload\".", "type": { "$id": "1272", "kind": "constant", @@ -11586,6 +11606,7 @@ "kind": "property", "name": "file", "serializedName": "file", + "description": "The ready File object after the Upload is completed.", "type": { "$id": "1274", "kind": "nullable", @@ -11595,6 +11616,7 @@ "name": "OpenAIFile", "crossLanguageDefinitionId": "OpenAI.OpenAIFile", "usage": "Output,Json", + "description": "The `File` object represents a document that has been uploaded to OpenAI.", "decorators": [], "properties": [ { @@ -11602,6 +11624,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The file identifier, which can be referenced in the API endpoints.", "type": { "$id": "1277", "kind": "string", @@ -11621,6 +11644,7 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", + "description": "The size of the file, in bytes.", "type": { "$id": "1279", "kind": "nullable", @@ -11644,6 +11668,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the file was created.", "type": { "$id": "1282", "kind": "utcDateTime", @@ -11671,6 +11696,7 @@ "kind": "property", "name": "filename", "serializedName": "filename", + "description": "The name of the file.", "type": { "$id": "1285", "kind": "string", @@ -11690,6 +11716,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `file`.", "type": { "$id": "1287", "kind": "constant", @@ -11711,6 +11738,7 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", + "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", "type": { "$ref": "28" }, @@ -11726,6 +11754,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", "type": { "$ref": "44" }, @@ -11741,6 +11770,7 @@ "kind": "property", "name": "status_details", "serializedName": "status_details", + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", "type": { "$id": "1291", "kind": "string", @@ -11902,6 +11932,7 @@ "kind": "property", "name": "data", "serializedName": "data", + "description": "The chunk of bytes for this Part.", "type": { "$id": "1307", "kind": "bytes", @@ -11925,6 +11956,7 @@ "name": "UploadPart", "crossLanguageDefinitionId": "OpenAI.UploadPart", "usage": "Output,Json", + "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", "decorators": [], "properties": [ { @@ -11932,6 +11964,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The upload Part unique identifier, which can be referenced in API endpoints.", "type": { "$id": "1310", "kind": "string", @@ -11951,6 +11984,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Part was created.", "type": { "$id": "1312", "kind": "utcDateTime", @@ -11978,6 +12012,7 @@ "kind": "property", "name": "upload_id", "serializedName": "upload_id", + "description": "The ID of the Upload object that this Part was added to.", "type": { "$id": "1315", "kind": "string", @@ -11997,6 +12032,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `upload.part`.", "type": { "$id": "1317", "kind": "constant", @@ -12028,6 +12064,7 @@ "kind": "property", "name": "part_ids", "serializedName": "part_ids", + "description": "The ordered list of Part IDs.", "type": { "$id": "1320", "kind": "array", @@ -12054,6 +12091,7 @@ "kind": "property", "name": "md5", "serializedName": "md5", + "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", "type": { "$id": "1323", "kind": "string", @@ -12114,6 +12152,7 @@ "name": "VectorStoreObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", "usage": "Output,Json", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", "decorators": [], "properties": [ { @@ -12121,6 +12160,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1331", "kind": "string", @@ -12140,6 +12180,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `vector_store`.", "type": { "$id": "1333", "kind": "constant", @@ -12161,6 +12202,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store was created.", "type": { "$id": "1335", "kind": "utcDateTime", @@ -12188,6 +12230,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the vector store.", "type": { "$id": "1338", "kind": "string", @@ -12207,6 +12250,7 @@ "kind": "property", "name": "usage_bytes", "serializedName": "usage_bytes", + "description": "The total number of bytes used by the files in the vector store.", "type": { "$id": "1340", "kind": "int32", @@ -12239,6 +12283,7 @@ "kind": "property", "name": "in_progress", "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", "type": { "$id": "1344", "kind": "int32", @@ -12258,6 +12303,7 @@ "kind": "property", "name": "completed", "serializedName": "completed", + "description": "The number of files that have been successfully processed.", "type": { "$id": "1346", "kind": "int32", @@ -12277,6 +12323,7 @@ "kind": "property", "name": "failed", "serializedName": "failed", + "description": "The number of files that have failed to process.", "type": { "$id": "1348", "kind": "int32", @@ -12296,6 +12343,7 @@ "kind": "property", "name": "cancelled", "serializedName": "cancelled", + "description": "The number of files that were cancelled.", "type": { "$id": "1350", "kind": "int32", @@ -12315,6 +12363,7 @@ "kind": "property", "name": "total", "serializedName": "total", + "description": "The total number of files.", "type": { "$id": "1352", "kind": "int32", @@ -12343,6 +12392,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", "type": { "$ref": "67" }, @@ -12364,6 +12414,7 @@ "name": "VectorStoreExpirationAfter", "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", "usage": "Input,Output,Json", + "description": "The expiration policy for a vector store.", "decorators": [], "properties": [ { @@ -12371,6 +12422,7 @@ "kind": "property", "name": "anchor", "serializedName": "anchor", + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", "type": { "$id": "1357", "kind": "constant", @@ -12392,6 +12444,7 @@ "kind": "property", "name": "days", "serializedName": "days", + "description": "The number of days after the anchor time that the vector store will expire.", "type": { "$id": "1359", "kind": "int32", @@ -12420,6 +12473,7 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", "type": { "$id": "1361", "kind": "nullable", @@ -12451,6 +12505,7 @@ "kind": "property", "name": "last_active_at", "serializedName": "last_active_at", + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", "type": { "$id": "1365", "kind": "nullable", @@ -12482,6 +12537,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1369", "kind": "nullable", @@ -12518,7 +12574,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -12605,6 +12661,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1381", "kind": "array", @@ -12631,6 +12688,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the vector store.", "type": { "$id": "1384", "kind": "string", @@ -12665,6 +12723,7 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", "type": { "$id": "1387", "kind": "union", @@ -12676,6 +12735,7 @@ "name": "AutoChunkingStrategyRequestParam", "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", "usage": "Input,Json", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", "discriminatorValue": "auto", "decorators": [], "baseModel": { @@ -12731,6 +12791,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `static`.", "type": { "$id": "1395", "kind": "constant", @@ -12769,6 +12830,7 @@ "kind": "property", "name": "max_chunk_size_tokens", "serializedName": "max_chunk_size_tokens", + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", "type": { "$id": "1400", "kind": "int32", @@ -12788,6 +12850,7 @@ "kind": "property", "name": "chunk_overlap_tokens", "serializedName": "chunk_overlap_tokens", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", "type": { "$id": "1402", "kind": "int32", @@ -12821,6 +12884,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `auto`.", "type": { "$id": "1404", "kind": "constant", @@ -12861,6 +12925,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1407", "kind": "nullable", @@ -12918,6 +12983,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the vector store.", "type": { "$id": "1413", "kind": "nullable", @@ -12960,6 +13026,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1418", "kind": "nullable", @@ -13105,6 +13172,7 @@ "name": "VectorStoreFileObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", "usage": "Output,Json", + "description": "A list of files attached to a vector store.", "decorators": [], "properties": [ { @@ -13112,6 +13180,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1436", "kind": "string", @@ -13131,6 +13200,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `vector_store.file`.", "type": { "$id": "1438", "kind": "constant", @@ -13152,6 +13222,7 @@ "kind": "property", "name": "usage_bytes", "serializedName": "usage_bytes", + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", "type": { "$id": "1440", "kind": "int32", @@ -13171,6 +13242,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", "type": { "$id": "1442", "kind": "utcDateTime", @@ -13198,6 +13270,7 @@ "kind": "property", "name": "vector_store_id", "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", "type": { "$id": "1445", "kind": "string", @@ -13217,6 +13290,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", "type": { "$ref": "103" }, @@ -13232,6 +13306,7 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", "type": { "$id": "1448", "kind": "nullable", @@ -13248,6 +13323,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", "type": { "$ref": "113" }, @@ -13263,6 +13339,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable description of the error.", "type": { "$id": "1452", "kind": "string", @@ -13292,6 +13369,7 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", + "description": "The strategy used to chunk the file.", "type": { "$id": "1454", "kind": "union", @@ -13348,6 +13426,7 @@ "name": "OtherChunkingStrategyResponseParam", "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", "usage": "Input,Output,Json", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", "discriminatorValue": "other", "decorators": [], "baseModel": { @@ -13359,6 +13438,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `other`.", "type": { "$id": "1462", "kind": "constant", @@ -13429,6 +13509,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `static`.", "type": { "$id": "1469", "kind": "constant", @@ -13485,7 +13566,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -13581,6 +13662,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1480", "kind": "string", @@ -13705,6 +13787,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "type": { "$id": "1492", "kind": "array", @@ -13760,6 +13843,7 @@ "name": "VectorStoreFileBatchObject", "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", "usage": "Output,Json", + "description": "A batch of files attached to a vector store.", "decorators": [], "properties": [ { @@ -13767,6 +13851,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1498", "kind": "string", @@ -13786,6 +13871,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `vector_store.file_batch`.", "type": { "$id": "1500", "kind": "constant", @@ -13807,6 +13893,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", "type": { "$id": "1502", "kind": "utcDateTime", @@ -13834,6 +13921,7 @@ "kind": "property", "name": "vector_store_id", "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", "type": { "$id": "1505", "kind": "string", @@ -13853,6 +13941,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", "type": { "$ref": "127" }, @@ -13881,6 +13970,7 @@ "kind": "property", "name": "in_progress", "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", "type": { "$id": "1510", "kind": "int32", @@ -13900,6 +13990,7 @@ "kind": "property", "name": "completed", "serializedName": "completed", + "description": "The number of files that have been processed.", "type": { "$id": "1512", "kind": "int32", @@ -13919,6 +14010,7 @@ "kind": "property", "name": "failed", "serializedName": "failed", + "description": "The number of files that have failed to process.", "type": { "$id": "1514", "kind": "int32", @@ -13938,6 +14030,7 @@ "kind": "property", "name": "cancelled", "serializedName": "cancelled", + "description": "The number of files that where cancelled.", "type": { "$id": "1516", "kind": "int32", @@ -13957,6 +14050,7 @@ "kind": "property", "name": "total", "serializedName": "total", + "description": "The total number of files.", "type": { "$id": "1518", "kind": "int32", @@ -13998,6 +14092,7 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", "type": { "$id": "1521", "kind": "string", @@ -14017,6 +14112,7 @@ "kind": "property", "name": "thread", "serializedName": "thread", + "description": "If no thread is provided, an empty thread will be created.", "type": { "$id": "1523", "kind": "model", @@ -14030,6 +14126,7 @@ "kind": "property", "name": "messages", "serializedName": "messages", + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", "type": { "$id": "1525", "kind": "array", @@ -14047,6 +14144,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", "type": { "$ref": "143" }, @@ -14073,6 +14171,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContent", "access": "public", "usage": "Input,Output,Json", + "description": "Represents a single piece of content in an Assistants API message.", "decorators": [], "properties": [] }, @@ -14091,6 +14190,7 @@ "kind": "property", "name": "attachments", "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they should be added to.", "type": { "$id": "1532", "kind": "nullable", @@ -14111,6 +14211,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", "type": { "$id": "1536", "kind": "string", @@ -14130,6 +14231,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "The tools to add this file to.", "type": { "$id": "1538", "kind": "array", @@ -14200,6 +14302,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool being defined: `file_search`", "type": { "$id": "1547", "kind": "constant", @@ -14225,6 +14328,7 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", + "description": "Overrides for the file search tool.", "type": { "$id": "1550", "kind": "model", @@ -14238,6 +14342,7 @@ "kind": "property", "name": "max_num_results", "serializedName": "max_num_results", + "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "type": { "$id": "1552", "kind": "int32", @@ -14263,6 +14368,7 @@ "name": "FileSearchRankingOptions", "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", "usage": "Input,Output,Json", + "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", "decorators": [], "properties": [ { @@ -14270,6 +14376,7 @@ "kind": "property", "name": "ranker", "serializedName": "ranker", + "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", "type": { "$ref": "149" }, @@ -14285,6 +14392,7 @@ "kind": "property", "name": "score_threshold", "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", "type": { "$id": "1557", "kind": "float32", @@ -14336,6 +14444,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool being defined: `function`", "type": { "$id": "1560", "kind": "constant", @@ -14374,6 +14483,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", "type": { "$id": "1565", "kind": "string", @@ -14393,6 +14503,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "1567", "kind": "string", @@ -14418,6 +14529,7 @@ "name": "FunctionParameters", "crossLanguageDefinitionId": "OpenAI.FunctionParameters", "usage": "Input,Output,Json", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", "decorators": [], "additionalProperties": { "$id": "1570", @@ -14440,6 +14552,7 @@ "kind": "property", "name": "strict", "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", "type": { "$id": "1572", "kind": "nullable", @@ -14477,6 +14590,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool being defined: `code_interpreter`", "type": { "$id": "1575", "kind": "constant", @@ -14512,6 +14626,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool being defined: `file_search`", "type": { "$id": "1579", "kind": "constant", @@ -14561,6 +14676,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1581", "kind": "nullable", @@ -14608,6 +14724,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "1586", "kind": "nullable", @@ -14637,6 +14754,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "1591", "kind": "array", @@ -14685,6 +14803,7 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", "type": { "$id": "1596", "kind": "array", @@ -14711,6 +14830,7 @@ "kind": "property", "name": "vector_stores", "serializedName": "vector_stores", + "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", "type": { "$id": "1599", "kind": "array", @@ -14728,6 +14848,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", "type": { "$id": "1602", "kind": "array", @@ -14754,6 +14875,7 @@ "kind": "property", "name": "chunking_strategy", "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", "type": { "$id": "1605", "kind": "union", @@ -14780,6 +14902,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1607", "kind": "dict", @@ -14842,6 +14965,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1611", "kind": "nullable", @@ -14886,6 +15010,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", "type": { "$id": "1616", "kind": "nullable", @@ -14905,6 +15030,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1618", "kind": "nullable", @@ -14928,6 +15054,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1621", "kind": "nullable", @@ -14954,6 +15081,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "1624", "kind": "nullable", @@ -14983,6 +15111,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "1629", "kind": "array", @@ -15031,6 +15160,7 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", "type": { "$id": "1634", "kind": "array", @@ -15076,6 +15206,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1637", "kind": "nullable", @@ -15111,6 +15242,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "1642", "kind": "nullable", @@ -15134,6 +15266,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "1645", "kind": "nullable", @@ -15157,6 +15290,7 @@ "kind": "property", "name": "stream", "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1648", "kind": "nullable", @@ -15180,6 +15314,7 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1651", "kind": "nullable", @@ -15203,6 +15338,7 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1654", "kind": "nullable", @@ -15235,6 +15371,7 @@ "name": "TruncationObject", "crossLanguageDefinitionId": "OpenAI.TruncationObject", "usage": "Input,Output,Json", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", "decorators": [], "properties": [ { @@ -15242,6 +15379,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", "type": { "$ref": "206" }, @@ -15257,6 +15395,7 @@ "kind": "property", "name": "last_messages", "serializedName": "last_messages", + "description": "The number of most recent messages from the thread when constructing the context for the run.", "type": { "$id": "1661", "kind": "nullable", @@ -15307,6 +15446,7 @@ "name": "AssistantsNamedToolChoice", "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", "usage": "Input,Output,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", "decorators": [], "properties": [ { @@ -15314,6 +15454,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the tool. If type is `function`, the function name must be set", "type": { "$ref": "220" }, @@ -15342,6 +15483,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "1671", "kind": "string", @@ -15484,6 +15626,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_object`", "type": { "$id": "1686", "kind": "constant", @@ -15523,6 +15666,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", "type": { "$id": "1690", "kind": "constant", @@ -15561,6 +15705,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", "type": { "$id": "1695", "kind": "string", @@ -15580,6 +15725,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "1697", "kind": "string", @@ -15605,6 +15751,7 @@ "name": "ResponseFormatJsonSchemaSchema", "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", "usage": "Input,Output,Json", + "description": "The schema for the response format, described as a JSON Schema object.", "decorators": [], "additionalProperties": { "$id": "1700", @@ -15627,6 +15774,7 @@ "kind": "property", "name": "strict", "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", "type": { "$id": "1702", "kind": "nullable", @@ -15664,6 +15812,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `text`", "type": { "$id": "1705", "kind": "constant", @@ -15798,6 +15947,7 @@ "name": "RunObject", "crossLanguageDefinitionId": "OpenAI.RunObject", "usage": "Output,Json", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", "decorators": [], "properties": [ { @@ -15805,6 +15955,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "1709", "kind": "string", @@ -15824,6 +15975,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread.run`.", "type": { "$id": "1711", "kind": "constant", @@ -15845,6 +15997,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run was created.", "type": { "$id": "1713", "kind": "utcDateTime", @@ -15872,6 +16025,7 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", "type": { "$id": "1716", "kind": "string", @@ -15891,6 +16045,7 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", "type": { "$id": "1718", "kind": "string", @@ -15910,6 +16065,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", "type": { "$ref": "231" }, @@ -15925,6 +16081,7 @@ "kind": "property", "name": "required_action", "serializedName": "required_action", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", "type": { "$id": "1721", "kind": "nullable", @@ -15941,6 +16098,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "For now, this is always `submit_tool_outputs`.", "type": { "$id": "1724", "kind": "constant", @@ -15962,6 +16120,7 @@ "kind": "property", "name": "submit_tool_outputs", "serializedName": "submit_tool_outputs", + "description": "Details on the tool outputs needed for this run to continue.", "type": { "$id": "1726", "kind": "model", @@ -15975,6 +16134,7 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", + "description": "A list of the relevant tool calls.", "type": { "$id": "1728", "kind": "array", @@ -15985,6 +16145,7 @@ "name": "RunToolCallObject", "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", "usage": "Output,Json", + "description": "Tool call objects", "decorators": [], "properties": [ { @@ -15992,6 +16153,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", "type": { "$id": "1731", "kind": "string", @@ -16011,6 +16173,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call the output is required for. For now, this is always `function`.", "type": { "$id": "1733", "kind": "constant", @@ -16032,6 +16195,7 @@ "kind": "property", "name": "function", "serializedName": "function", + "description": "The function definition.", "type": { "$id": "1735", "kind": "model", @@ -16045,6 +16209,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function.", "type": { "$id": "1737", "kind": "string", @@ -16064,6 +16229,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments that the model expects you to pass to the function.", "type": { "$id": "1739", "kind": "string", @@ -16123,6 +16289,7 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", + "description": "The last error associated with this run. Will be `null` if there are no errors.", "type": { "$id": "1741", "kind": "nullable", @@ -16139,6 +16306,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", "type": { "$ref": "257" }, @@ -16154,6 +16322,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable description of the error.", "type": { "$id": "1745", "kind": "string", @@ -16183,6 +16352,7 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the run will expire.", "type": { "$id": "1747", "kind": "nullable", @@ -16214,6 +16384,7 @@ "kind": "property", "name": "started_at", "serializedName": "started_at", + "description": "The Unix timestamp (in seconds) for when the run was started.", "type": { "$id": "1751", "kind": "nullable", @@ -16245,6 +16416,7 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", "type": { "$id": "1755", "kind": "nullable", @@ -16276,6 +16448,7 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run failed.", "type": { "$id": "1759", "kind": "nullable", @@ -16307,6 +16480,7 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run was completed.", "type": { "$id": "1763", "kind": "nullable", @@ -16338,6 +16512,7 @@ "kind": "property", "name": "incomplete_details", "serializedName": "incomplete_details", + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", "type": { "$id": "1767", "kind": "nullable", @@ -16354,6 +16529,7 @@ "kind": "property", "name": "reason", "serializedName": "reason", + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", "type": { "$ref": "265" }, @@ -16379,6 +16555,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1771", "kind": "string", @@ -16398,6 +16575,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1773", "kind": "string", @@ -16417,6 +16595,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", "type": { "$id": "1775", "kind": "array", @@ -16439,6 +16618,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1777", "kind": "nullable", @@ -16483,6 +16663,7 @@ "name": "RunCompletionUsage", "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", "usage": "Output,Json", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", "decorators": [], "properties": [ { @@ -16490,6 +16671,7 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run.", "type": { "$id": "1785", "kind": "int32", @@ -16509,6 +16691,7 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run.", "type": { "$id": "1787", "kind": "int32", @@ -16528,6 +16711,7 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", "type": { "$id": "1789", "kind": "int32", @@ -16557,6 +16741,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "The sampling temperature used for this run. If not set, defaults to 1.", "type": { "$id": "1791", "kind": "nullable", @@ -16580,6 +16765,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", "type": { "$id": "1794", "kind": "nullable", @@ -16603,6 +16789,7 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", "type": { "$id": "1797", "kind": "nullable", @@ -16626,6 +16813,7 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens specified to have been used over the course of the run.", "type": { "$id": "1800", "kind": "nullable", @@ -16794,6 +16982,7 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", "type": { "$id": "1816", "kind": "string", @@ -16813,6 +17002,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", "type": { "$id": "1818", "kind": "nullable", @@ -16832,6 +17022,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1820", "kind": "nullable", @@ -16855,6 +17046,7 @@ "kind": "property", "name": "additional_instructions", "serializedName": "additional_instructions", + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", "type": { "$id": "1823", "kind": "nullable", @@ -16878,6 +17070,7 @@ "kind": "property", "name": "additional_messages", "serializedName": "additional_messages", + "description": "Adds additional messages to the thread before creating the run.", "type": { "$id": "1826", "kind": "nullable", @@ -16904,6 +17097,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", "type": { "$id": "1829", "kind": "nullable", @@ -16930,6 +17124,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1832", "kind": "nullable", @@ -16965,6 +17160,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "1837", "kind": "nullable", @@ -16988,6 +17184,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "1840", "kind": "nullable", @@ -17011,6 +17208,7 @@ "kind": "property", "name": "stream", "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1843", "kind": "nullable", @@ -17034,6 +17232,7 @@ "kind": "property", "name": "max_prompt_tokens", "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1846", "kind": "nullable", @@ -17057,6 +17256,7 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "type": { "$id": "1849", "kind": "nullable", @@ -17236,7 +17436,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -17314,6 +17514,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "1876", "kind": "nullable", @@ -17359,6 +17560,7 @@ "kind": "property", "name": "tool_outputs", "serializedName": "tool_outputs", + "description": "A list of tools for which the outputs are being submitted.", "type": { "$id": "1882", "kind": "array", @@ -17376,6 +17578,7 @@ "kind": "property", "name": "tool_call_id", "serializedName": "tool_call_id", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", "type": { "$id": "1885", "kind": "string", @@ -17395,6 +17598,7 @@ "kind": "property", "name": "output", "serializedName": "output", + "description": "The output of the tool call to be submitted to continue the run.", "type": { "$id": "1887", "kind": "string", @@ -17426,6 +17630,7 @@ "kind": "property", "name": "stream", "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", "type": { "$id": "1889", "kind": "nullable", @@ -17493,6 +17698,7 @@ "name": "RunStepObject", "crossLanguageDefinitionId": "OpenAI.RunStepObject", "usage": "Output,Json", + "description": "Represents a step in execution of a run.", "decorators": [], "properties": [ { @@ -17500,6 +17706,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", "type": { "$id": "1898", "kind": "string", @@ -17519,6 +17726,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread.run.step`.", "type": { "$id": "1900", "kind": "constant", @@ -17540,6 +17748,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run step was created.", "type": { "$id": "1902", "kind": "utcDateTime", @@ -17567,6 +17776,7 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", "type": { "$id": "1905", "kind": "string", @@ -17586,6 +17796,7 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "type": { "$id": "1907", "kind": "string", @@ -17605,6 +17816,7 @@ "kind": "property", "name": "run_id", "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", "type": { "$id": "1909", "kind": "string", @@ -17624,6 +17836,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", "type": { "$ref": "340" }, @@ -17639,6 +17852,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", "type": { "$ref": "346" }, @@ -17654,18 +17868,21 @@ "kind": "property", "name": "step_details", "serializedName": "step_details", + "description": "The details of the run step.", "type": { "$id": "1913", "kind": "model", "name": "RunStepObjectStepDetails", "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", "usage": "Output,Json", + "description": "Abstractly represents a run step details object.", "decorators": [], "discriminatorProperty": { "$id": "1914", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "1915", "kind": "string", @@ -17693,6 +17910,7 @@ "name": "RunStepDetailsMessageCreationObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", "usage": "Output,Json", + "description": "Details of the message creation by the run step.", "discriminatorValue": "message_creation", "decorators": [], "baseModel": { @@ -17704,6 +17922,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `message_creation`.", "type": { "$id": "1919", "kind": "constant", @@ -17742,6 +17961,7 @@ "kind": "property", "name": "message_id", "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", "type": { "$id": "1924", "kind": "string", @@ -17773,6 +17993,7 @@ "name": "RunStepDetailsToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", "usage": "Output,Json", + "description": "Details of the tool call.", "discriminatorValue": "tool_calls", "decorators": [], "baseModel": { @@ -17784,6 +18005,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `tool_calls`.", "type": { "$id": "1927", "kind": "constant", @@ -17809,6 +18031,7 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "1930", "kind": "array", @@ -17819,12 +18042,14 @@ "name": "RunStepDetailsToolCallsObjectToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details inner object.", "decorators": [], "discriminatorProperty": { "$id": "1932", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "1933", "kind": "string", @@ -17852,6 +18077,7 @@ "name": "RunStepDetailsToolCallsCodeObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", "usage": "Output,Json", + "description": "Details of the Code Interpreter tool call the run step was involved in.", "discriminatorValue": "code_interpreter", "decorators": [], "baseModel": { @@ -17863,6 +18089,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call.", "type": { "$id": "1937", "kind": "string", @@ -17882,6 +18109,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", "type": { "$id": "1939", "kind": "constant", @@ -17907,6 +18135,7 @@ "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", "type": { "$id": "1942", "kind": "model", @@ -17920,6 +18149,7 @@ "kind": "property", "name": "input", "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", "type": { "$id": "1944", "kind": "string", @@ -17939,6 +18169,7 @@ "kind": "property", "name": "outputs", "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", "type": { "$id": "1946", "kind": "array", @@ -17949,12 +18180,14 @@ "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details code interpreter output.", "decorators": [], "discriminatorProperty": { "$id": "1948", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "1949", "kind": "string", @@ -17982,6 +18215,7 @@ "name": "RunStepDetailsToolCallsCodeOutputLogsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", "usage": "Output,Json", + "description": "Text output from the Code Interpreter tool call as part of a run step.", "discriminatorValue": "logs", "decorators": [], "baseModel": { @@ -17993,6 +18227,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `logs`.", "type": { "$id": "1953", "kind": "constant", @@ -18018,6 +18253,7 @@ "kind": "property", "name": "logs", "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", "type": { "$id": "1956", "kind": "string", @@ -18051,6 +18287,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `image`.", "type": { "$id": "1959", "kind": "constant", @@ -18089,6 +18326,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", "type": { "$id": "1964", "kind": "string", @@ -18154,6 +18392,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call object.", "type": { "$id": "1967", "kind": "string", @@ -18173,6 +18412,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", "type": { "$id": "1969", "kind": "constant", @@ -18198,6 +18438,7 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", "type": { "$id": "1972", "kind": "model", @@ -18217,6 +18458,7 @@ "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", "usage": "Output,Json", + "description": "The ranking options for the file search.", "decorators": [], "properties": [ { @@ -18224,6 +18466,7 @@ "kind": "property", "name": "ranker", "serializedName": "ranker", + "description": "The ranker used for the file search.", "type": { "$id": "1976", "kind": "constant", @@ -18245,6 +18488,7 @@ "kind": "property", "name": "score_threshold", "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", "type": { "$id": "1978", "kind": "float32", @@ -18273,6 +18517,7 @@ "kind": "property", "name": "results", "serializedName": "results", + "description": "The results of the file search.", "type": { "$id": "1980", "kind": "array", @@ -18283,6 +18528,7 @@ "name": "RunStepDetailsToolCallsFileSearchResultObject", "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", "usage": "Output,Json", + "description": "A result instance of the file search.", "decorators": [], "properties": [ { @@ -18290,6 +18536,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the file that result was found in.", "type": { "$id": "1983", "kind": "string", @@ -18309,6 +18556,7 @@ "kind": "property", "name": "file_name", "serializedName": "file_name", + "description": "The name of the file that result was found in.", "type": { "$id": "1985", "kind": "string", @@ -18328,6 +18576,7 @@ "kind": "property", "name": "score", "serializedName": "score", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", "type": { "$id": "1987", "kind": "float32", @@ -18347,6 +18596,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", "type": { "$id": "1989", "kind": "array", @@ -18364,6 +18614,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the content.", "type": { "$id": "1992", "kind": "constant", @@ -18385,6 +18636,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text content of the file.", "type": { "$id": "1994", "kind": "string", @@ -18451,6 +18703,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call object.", "type": { "$id": "1997", "kind": "string", @@ -18470,6 +18723,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", "type": { "$id": "1999", "kind": "constant", @@ -18495,6 +18749,7 @@ "kind": "property", "name": "function", "serializedName": "function", + "description": "The definition of the function that was called.", "type": { "$id": "2002", "kind": "model", @@ -18508,6 +18763,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function.", "type": { "$id": "2004", "kind": "string", @@ -18527,6 +18783,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments passed to the function.", "type": { "$id": "2006", "kind": "string", @@ -18546,6 +18803,7 @@ "kind": "property", "name": "output", "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", "type": { "$id": "2008", "kind": "nullable", @@ -18603,6 +18861,7 @@ "kind": "property", "name": "last_error", "serializedName": "last_error", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", "type": { "$id": "2011", "kind": "nullable", @@ -18619,6 +18878,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", "type": { "$ref": "364" }, @@ -18634,6 +18894,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable description of the error.", "type": { "$id": "2015", "kind": "string", @@ -18663,6 +18924,7 @@ "kind": "property", "name": "expired_at", "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", "type": { "$id": "2017", "kind": "nullable", @@ -18694,6 +18956,7 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", "type": { "$id": "2021", "kind": "nullable", @@ -18725,6 +18988,7 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run step failed.", "type": { "$id": "2025", "kind": "nullable", @@ -18756,6 +19020,7 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run step completed.", "type": { "$id": "2029", "kind": "nullable", @@ -18787,6 +19052,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2033", "kind": "nullable", @@ -18831,6 +19097,7 @@ "name": "RunStepCompletionUsage", "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", "usage": "Output,Json", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", "decorators": [], "properties": [ { @@ -18838,6 +19105,7 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run step.", "type": { "$id": "2041", "kind": "int32", @@ -18857,6 +19125,7 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run step.", "type": { "$id": "2043", "kind": "int32", @@ -18876,6 +19145,7 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", "type": { "$id": "2045", "kind": "int32", @@ -18906,7 +19176,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -19040,6 +19310,7 @@ "name": "ThreadObject", "crossLanguageDefinitionId": "OpenAI.ThreadObject", "usage": "Output,Json", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", "decorators": [], "properties": [ { @@ -19047,6 +19318,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "2054", "kind": "string", @@ -19066,6 +19338,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread`.", "type": { "$id": "2056", "kind": "constant", @@ -19087,6 +19360,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the thread was created.", "type": { "$id": "2058", "kind": "utcDateTime", @@ -19114,6 +19388,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "2061", "kind": "nullable", @@ -19143,6 +19418,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "2066", "kind": "array", @@ -19191,6 +19467,7 @@ "kind": "property", "name": "vector_store_ids", "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", "type": { "$id": "2071", "kind": "array", @@ -19236,6 +19513,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2074", "kind": "nullable", @@ -19290,6 +19568,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "2080", "kind": "nullable", @@ -19319,6 +19598,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "2085", "kind": "array", @@ -19379,6 +19659,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2089", "kind": "nullable", @@ -19492,6 +19773,7 @@ "name": "RealtimeRequestCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", "usage": "Input,Json", + "description": "A base representation for messages sent by the client to the service.", "decorators": [], "discriminatorProperty": { "$id": "2101", @@ -19892,6 +20174,7 @@ "name": "RealtimeTool", "crossLanguageDefinitionId": "OpenAI.RealtimeTool", "usage": "Input,Output,Json", + "description": "The base representation of a realtime tool definition.", "decorators": [], "discriminatorProperty": { "$id": "2141", @@ -19921,6 +20204,7 @@ "name": "RealtimeFunctionTool", "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", "usage": "Input,Output,Json", + "description": "The definition of a function tool as used by the realtime endpoint.", "discriminatorValue": "function", "decorators": [], "baseModel": { @@ -20042,6 +20326,7 @@ "name": "RealtimeToolChoiceObject", "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", "usage": "Input,Output,Json", + "description": "A base representation for a realtime tool_choice selecting a named tool.", "decorators": [], "discriminatorProperty": { "$id": "2156", @@ -20071,6 +20356,7 @@ "name": "RealtimeToolChoiceFunctionObject", "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", "usage": "Input,Output,Json", + "description": "The representation of a realtime tool_choice selecting a named function tool.", "discriminatorValue": "function", "decorators": [], "baseModel": { @@ -21355,6 +21641,7 @@ "name": "RealtimeRequestResponseCreateCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", "usage": "Input,Json", + "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", "discriminatorValue": "response.create", "decorators": [], "baseModel": { @@ -21814,6 +22101,7 @@ "name": "RealtimeResponseCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", "usage": "Output,Json", + "description": "Base representation of a WebSocket message received from the service.", "decorators": [], "discriminatorProperty": { "$id": "2323", @@ -25585,6 +25873,7 @@ "name": "RealtimeResponseErrorCommand", "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", "usage": "Output,Json", + "description": "A command that describes an error encountered during a realtime operation.", "discriminatorValue": "error", "decorators": [], "baseModel": { @@ -25879,6 +26168,7 @@ "kind": "property", "name": "input", "serializedName": "input", + "description": "The input text to classify", "type": { "$id": "2718", "kind": "union", @@ -25920,6 +26210,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", "type": { "$ref": "565" }, @@ -25938,6 +26229,7 @@ "name": "CreateModerationResponse", "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", "usage": "Output,Json", + "description": "Represents if a given text input is potentially harmful.", "decorators": [], "properties": [ { @@ -25945,6 +26237,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The unique identifier for the moderation request.", "type": { "$id": "2725", "kind": "string", @@ -25964,6 +26257,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model used to generate the moderation results.", "type": { "$id": "2727", "kind": "string", @@ -25983,6 +26277,7 @@ "kind": "property", "name": "results", "serializedName": "results", + "description": "A list of moderation objects.", "type": { "$id": "2729", "kind": "array", @@ -26000,6 +26295,7 @@ "kind": "property", "name": "flagged", "serializedName": "flagged", + "description": "Whether any of the below categories are flagged.", "type": { "$id": "2732", "kind": "boolean", @@ -26019,6 +26315,7 @@ "kind": "property", "name": "categories", "serializedName": "categories", + "description": "A list of the categories, and whether they are flagged or not.", "type": { "$id": "2734", "kind": "model", @@ -26032,6 +26329,7 @@ "kind": "property", "name": "hate", "serializedName": "hate", + "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", "type": { "$id": "2736", "kind": "boolean", @@ -26051,6 +26349,7 @@ "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", + "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", "type": { "$id": "2738", "kind": "boolean", @@ -26070,6 +26369,7 @@ "kind": "property", "name": "harassment", "serializedName": "harassment", + "description": "Content that expresses, incites, or promotes harassing language towards any target.", "type": { "$id": "2740", "kind": "boolean", @@ -26089,6 +26389,7 @@ "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", + "description": "Harassment content that also includes violence or serious harm towards any target.", "type": { "$id": "2742", "kind": "boolean", @@ -26108,6 +26409,7 @@ "kind": "property", "name": "self-harm", "serializedName": "self-harm", + "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { "$id": "2744", "kind": "boolean", @@ -26127,6 +26429,7 @@ "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", + "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", "type": { "$id": "2746", "kind": "boolean", @@ -26146,6 +26449,7 @@ "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", + "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", "type": { "$id": "2748", "kind": "boolean", @@ -26165,6 +26469,7 @@ "kind": "property", "name": "sexual", "serializedName": "sexual", + "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", "type": { "$id": "2750", "kind": "boolean", @@ -26184,6 +26489,7 @@ "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", + "description": "Sexual content that includes an individual who is under 18 years old.", "type": { "$id": "2752", "kind": "boolean", @@ -26203,6 +26509,7 @@ "kind": "property", "name": "violence", "serializedName": "violence", + "description": "Content that depicts death, violence, or physical injury.", "type": { "$id": "2754", "kind": "boolean", @@ -26222,6 +26529,7 @@ "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", + "description": "Content that depicts death, violence, or physical injury in graphic detail.", "type": { "$id": "2756", "kind": "boolean", @@ -26250,6 +26558,7 @@ "kind": "property", "name": "category_scores", "serializedName": "category_scores", + "description": "A list of the categories along with their scores as predicted by model.", "type": { "$id": "2758", "kind": "model", @@ -26263,6 +26572,7 @@ "kind": "property", "name": "hate", "serializedName": "hate", + "description": "The score for the category 'hate'.", "type": { "$id": "2760", "kind": "float32", @@ -26282,6 +26592,7 @@ "kind": "property", "name": "hate/threatening", "serializedName": "hate/threatening", + "description": "The score for the category 'hate/threatening'.", "type": { "$id": "2762", "kind": "float32", @@ -26301,6 +26612,7 @@ "kind": "property", "name": "harassment", "serializedName": "harassment", + "description": "The score for the category 'harassment'.", "type": { "$id": "2764", "kind": "float32", @@ -26320,6 +26632,7 @@ "kind": "property", "name": "harassment/threatening", "serializedName": "harassment/threatening", + "description": "The score for the category 'harassment/threatening'.", "type": { "$id": "2766", "kind": "float32", @@ -26339,6 +26652,7 @@ "kind": "property", "name": "self-harm", "serializedName": "self-harm", + "description": "The score for the category 'self-harm'.", "type": { "$id": "2768", "kind": "float32", @@ -26358,6 +26672,7 @@ "kind": "property", "name": "self-harm/intent", "serializedName": "self-harm/intent", + "description": "The score for the category 'self-harm/intent'.", "type": { "$id": "2770", "kind": "float32", @@ -26377,6 +26692,7 @@ "kind": "property", "name": "self-harm/instructions", "serializedName": "self-harm/instructions", + "description": "The score for the category 'self-harm/instructions'.", "type": { "$id": "2772", "kind": "float32", @@ -26396,6 +26712,7 @@ "kind": "property", "name": "sexual", "serializedName": "sexual", + "description": "The score for the category 'sexual'.", "type": { "$id": "2774", "kind": "float32", @@ -26415,6 +26732,7 @@ "kind": "property", "name": "sexual/minors", "serializedName": "sexual/minors", + "description": "The score for the category 'sexual/minors'.", "type": { "$id": "2776", "kind": "float32", @@ -26434,6 +26752,7 @@ "kind": "property", "name": "violence", "serializedName": "violence", + "description": "The score for the category 'violence'.", "type": { "$id": "2778", "kind": "float32", @@ -26453,6 +26772,7 @@ "kind": "property", "name": "violence/graphic", "serializedName": "violence/graphic", + "description": "The score for the category 'violence/graphic'.", "type": { "$id": "2780", "kind": "float32", @@ -26543,6 +26863,7 @@ "name": "Model", "crossLanguageDefinitionId": "OpenAI.Model", "usage": "Output,Json", + "description": "Describes an OpenAI model offering that can be used with the API.", "decorators": [], "properties": [ { @@ -26550,6 +26871,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The model identifier, which can be referenced in the API endpoints.", "type": { "$id": "2788", "kind": "string", @@ -26569,6 +26891,7 @@ "kind": "property", "name": "created", "serializedName": "created", + "description": "The Unix timestamp (in seconds) when the model was created.", "type": { "$id": "2790", "kind": "utcDateTime", @@ -26596,6 +26919,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"model\".", "type": { "$id": "2793", "kind": "constant", @@ -26617,6 +26941,7 @@ "kind": "property", "name": "owned_by", "serializedName": "owned_by", + "description": "The organization that owns the model.", "type": { "$id": "2795", "kind": "string", @@ -26723,6 +27048,7 @@ "name": "MessageObject", "crossLanguageDefinitionId": "OpenAI.MessageObject", "usage": "Output,Json", + "description": "Represents a message within a [thread](/docs/api-reference/threads).", "decorators": [], "properties": [ { @@ -26730,6 +27056,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "2805", "kind": "string", @@ -26749,6 +27076,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread.message`.", "type": { "$id": "2807", "kind": "constant", @@ -26770,6 +27098,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the message was created.", "type": { "$id": "2809", "kind": "utcDateTime", @@ -26797,6 +27126,7 @@ "kind": "property", "name": "thread_id", "serializedName": "thread_id", + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", "type": { "$id": "2812", "kind": "string", @@ -26816,6 +27146,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", "type": { "$ref": "583" }, @@ -26831,6 +27162,7 @@ "kind": "property", "name": "incomplete_details", "serializedName": "incomplete_details", + "description": "On an incomplete message, details about why the message is incomplete.", "type": { "$id": "2815", "kind": "nullable", @@ -26847,6 +27179,7 @@ "kind": "property", "name": "reason", "serializedName": "reason", + "description": "The reason the message is incomplete.", "type": { "$ref": "591" }, @@ -26872,6 +27205,7 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the message was completed.", "type": { "$id": "2819", "kind": "nullable", @@ -26903,6 +27237,7 @@ "kind": "property", "name": "incomplete_at", "serializedName": "incomplete_at", + "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", "type": { "$id": "2823", "kind": "nullable", @@ -26934,6 +27269,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { "$ref": "603" }, @@ -26949,6 +27285,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The content of the message in array of text and/or images.", "type": { "$id": "2828", "kind": "array", @@ -26971,6 +27308,7 @@ "kind": "property", "name": "assistant_id", "serializedName": "assistant_id", + "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", "type": { "$id": "2830", "kind": "nullable", @@ -26994,6 +27332,7 @@ "kind": "property", "name": "run_id", "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", "type": { "$id": "2833", "kind": "nullable", @@ -27017,6 +27356,7 @@ "kind": "property", "name": "attachments", "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they were added to.", "type": { "$id": "2836", "kind": "nullable", @@ -27037,6 +27377,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", "type": { "$id": "2840", "kind": "string", @@ -27056,6 +27397,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "The tools to add this file to.", "type": { "$id": "2842", "kind": "array", @@ -27102,6 +27444,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2845", "kind": "nullable", @@ -27185,7 +27528,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -27263,6 +27606,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "2862", "kind": "nullable", @@ -27377,6 +27721,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", "type": { "$id": "2875", "kind": "string", @@ -27396,6 +27741,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model to use for image generation.", "type": { "$id": "2877", "kind": "nullable", @@ -27415,6 +27761,7 @@ "kind": "property", "name": "n", "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { "$id": "2879", "kind": "nullable", @@ -27438,6 +27785,7 @@ "kind": "property", "name": "quality", "serializedName": "quality", + "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", "type": { "$ref": "627" }, @@ -27453,6 +27801,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2883", "kind": "nullable", @@ -27472,6 +27821,7 @@ "kind": "property", "name": "size", "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", "type": { "$id": "2885", "kind": "nullable", @@ -27491,6 +27841,7 @@ "kind": "property", "name": "style", "serializedName": "style", + "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", "type": { "$id": "2887", "kind": "nullable", @@ -27510,6 +27861,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2889", "kind": "string", @@ -27576,6 +27928,7 @@ "name": "Image", "crossLanguageDefinitionId": "OpenAI.Image", "usage": "Output,Json", + "description": "Represents the url or the content of an image generated by the OpenAI API.", "decorators": [], "properties": [ { @@ -27583,6 +27936,7 @@ "kind": "property", "name": "b64_json", "serializedName": "b64_json", + "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "type": { "$id": "2898", "kind": "bytes", @@ -27603,6 +27957,7 @@ "kind": "property", "name": "url", "serializedName": "url", + "description": "The URL of the generated image, if `response_format` is `url` (default).", "type": { "$id": "2900", "kind": "url", @@ -27622,6 +27977,7 @@ "kind": "property", "name": "revised_prompt", "serializedName": "revised_prompt", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", "type": { "$id": "2902", "kind": "string", @@ -27666,6 +28022,7 @@ "kind": "property", "name": "image", "serializedName": "image", + "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", "type": { "$id": "2905", "kind": "bytes", @@ -27686,6 +28043,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters.", "type": { "$id": "2907", "kind": "string", @@ -27705,6 +28063,7 @@ "kind": "property", "name": "mask", "serializedName": "mask", + "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", "type": { "$id": "2909", "kind": "bytes", @@ -27725,6 +28084,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { "$id": "2911", "kind": "nullable", @@ -27744,6 +28104,7 @@ "kind": "property", "name": "n", "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10.", "type": { "$id": "2913", "kind": "nullable", @@ -27767,6 +28128,7 @@ "kind": "property", "name": "size", "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { "$id": "2916", "kind": "nullable", @@ -27786,6 +28148,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2918", "kind": "nullable", @@ -27805,6 +28168,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2920", "kind": "string", @@ -27834,6 +28198,7 @@ "kind": "property", "name": "image", "serializedName": "image", + "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", "type": { "$id": "2923", "kind": "bytes", @@ -27854,6 +28219,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", "type": { "$id": "2925", "kind": "nullable", @@ -27873,6 +28239,7 @@ "kind": "property", "name": "n", "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", "type": { "$id": "2927", "kind": "nullable", @@ -27896,6 +28263,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", "type": { "$id": "2930", "kind": "nullable", @@ -27915,6 +28283,7 @@ "kind": "property", "name": "size", "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "type": { "$id": "2932", "kind": "nullable", @@ -27934,6 +28303,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "2934", "kind": "string", @@ -27963,6 +28333,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", "type": { "$ref": "693" }, @@ -27978,6 +28349,7 @@ "kind": "property", "name": "training_file", "serializedName": "training_file", + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "2938", "kind": "string", @@ -27997,6 +28369,7 @@ "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job.", "type": { "$id": "2940", "kind": "model", @@ -28010,6 +28383,7 @@ "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { "$id": "2942", "kind": "union", @@ -28040,6 +28414,7 @@ "kind": "property", "name": "batch_size", "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { "$id": "2945", "kind": "union", @@ -28070,6 +28445,7 @@ "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { "$id": "2948", "kind": "union", @@ -28109,6 +28485,7 @@ "kind": "property", "name": "suffix", "serializedName": "suffix", + "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", "type": { "$id": "2951", "kind": "nullable", @@ -28132,6 +28509,7 @@ "kind": "property", "name": "validation_file", "serializedName": "validation_file", + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "2954", "kind": "nullable", @@ -28155,6 +28533,7 @@ "kind": "property", "name": "integrations", "serializedName": "integrations", + "description": "A list of integrations to enable for your fine-tuning job.", "type": { "$id": "2957", "kind": "nullable", @@ -28365,6 +28744,7 @@ "kind": "property", "name": "seed", "serializedName": "seed", + "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", "type": { "$id": "2981", "kind": "nullable", @@ -28403,6 +28783,7 @@ "name": "FineTuningJob", "crossLanguageDefinitionId": "OpenAI.FineTuningJob", "usage": "Output,Json", + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", "decorators": [], "properties": [ { @@ -28410,6 +28791,7 @@ "kind": "property", "name": "user_provided_suffix", "serializedName": "user_provided_suffix", + "description": "The descriptive suffix applied to the job, as specified in the job creation request.", "type": { "$id": "2985", "kind": "nullable", @@ -28433,6 +28815,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The object identifier, which can be referenced in the API endpoints.", "type": { "$id": "2988", "kind": "string", @@ -28452,6 +28835,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "type": { "$id": "2990", "kind": "utcDateTime", @@ -28479,6 +28863,7 @@ "kind": "property", "name": "error", "serializedName": "error", + "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", "type": { "$id": "2993", "kind": "nullable", @@ -28495,6 +28880,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "A machine-readable error code.", "type": { "$id": "2996", "kind": "string", @@ -28514,6 +28900,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable error message.", "type": { "$id": "2998", "kind": "string", @@ -28533,6 +28920,7 @@ "kind": "property", "name": "param", "serializedName": "param", + "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", "type": { "$id": "3000", "kind": "nullable", @@ -28566,6 +28954,7 @@ "kind": "property", "name": "fine_tuned_model", "serializedName": "fine_tuned_model", + "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3003", "kind": "nullable", @@ -28589,6 +28978,7 @@ "kind": "property", "name": "finished_at", "serializedName": "finished_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3006", "kind": "nullable", @@ -28620,6 +29010,7 @@ "kind": "property", "name": "hyperparameters", "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "type": { "$id": "3010", "kind": "model", @@ -28633,6 +29024,7 @@ "kind": "property", "name": "n_epochs", "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", "type": { "$id": "3012", "kind": "union", @@ -28663,6 +29055,7 @@ "kind": "property", "name": "batch_size", "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", "type": { "$id": "3015", "kind": "union", @@ -28693,6 +29086,7 @@ "kind": "property", "name": "learning_rate_multiplier", "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", "type": { "$id": "3018", "kind": "union", @@ -28732,6 +29126,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The base model that is being fine-tuned.", "type": { "$id": "3021", "kind": "string", @@ -28751,6 +29146,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job\".", "type": { "$id": "3023", "kind": "constant", @@ -28772,6 +29168,7 @@ "kind": "property", "name": "organization_id", "serializedName": "organization_id", + "description": "The organization that owns the fine-tuning job.", "type": { "$id": "3025", "kind": "string", @@ -28791,6 +29188,7 @@ "kind": "property", "name": "result_files", "serializedName": "result_files", + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3027", "kind": "array", @@ -28817,6 +29215,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", "type": { "$ref": "730" }, @@ -28832,6 +29231,7 @@ "kind": "property", "name": "trained_tokens", "serializedName": "trained_tokens", + "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", "type": { "$id": "3031", "kind": "nullable", @@ -28855,6 +29255,7 @@ "kind": "property", "name": "training_file", "serializedName": "training_file", + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3034", "kind": "string", @@ -28874,6 +29275,7 @@ "kind": "property", "name": "validation_file", "serializedName": "validation_file", + "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", "type": { "$id": "3036", "kind": "nullable", @@ -28897,6 +29299,7 @@ "kind": "property", "name": "integrations", "serializedName": "integrations", + "description": "A list of integrations to enable for this fine-tuning job.", "type": { "$id": "3039", "kind": "nullable", @@ -28954,6 +29357,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the integration being enabled for the fine-tuning job", "type": { "$id": "3047", "kind": "constant", @@ -28979,6 +29383,7 @@ "kind": "property", "name": "wandb", "serializedName": "wandb", + "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", "type": { "$id": "3050", "kind": "model", @@ -28992,6 +29397,7 @@ "kind": "property", "name": "project", "serializedName": "project", + "description": "The name of the project that the new run will be created under.", "type": { "$id": "3052", "kind": "string", @@ -29011,6 +29417,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", "type": { "$id": "3054", "kind": "nullable", @@ -29034,6 +29441,7 @@ "kind": "property", "name": "entity", "serializedName": "entity", + "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", "type": { "$id": "3057", "kind": "nullable", @@ -29057,6 +29465,7 @@ "kind": "property", "name": "tags", "serializedName": "tags", + "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", "type": { "$id": "3060", "kind": "array", @@ -29107,6 +29516,7 @@ "kind": "property", "name": "seed", "serializedName": "seed", + "description": "The seed used for the fine-tuning job.", "type": { "$id": "3063", "kind": "int32", @@ -29126,6 +29536,7 @@ "kind": "property", "name": "estimated_finish", "serializedName": "estimated_finish", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", "type": { "$id": "3065", "kind": "nullable", @@ -29264,6 +29675,7 @@ "name": "FineTuningJobCheckpoint", "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", "usage": "Output,Json", + "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", "decorators": [], "properties": [ { @@ -29271,6 +29683,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The checkpoint identifier, which can be referenced in the API endpoints.", "type": { "$id": "3080", "kind": "string", @@ -29290,6 +29703,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", "type": { "$id": "3082", "kind": "utcDateTime", @@ -29317,6 +29731,7 @@ "kind": "property", "name": "fine_tuned_model_checkpoint", "serializedName": "fine_tuned_model_checkpoint", + "description": "The name of the fine-tuned checkpoint model that is created.", "type": { "$id": "3085", "kind": "string", @@ -29336,6 +29751,7 @@ "kind": "property", "name": "step_number", "serializedName": "step_number", + "description": "The step number that the checkpoint was created at.", "type": { "$id": "3087", "kind": "int32", @@ -29355,6 +29771,7 @@ "kind": "property", "name": "metrics", "serializedName": "metrics", + "description": "Metrics at the step number during the fine-tuning job.", "type": { "$id": "3089", "kind": "model", @@ -29510,6 +29927,7 @@ "kind": "property", "name": "fine_tuning_job_id", "serializedName": "fine_tuning_job_id", + "description": "The name of the fine-tuning job that this checkpoint was created from.", "type": { "$id": "3105", "kind": "string", @@ -29529,6 +29947,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", "type": { "$id": "3107", "kind": "constant", @@ -29693,6 +30112,7 @@ "name": "FineTuningJobEvent", "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", "usage": "Output,Json", + "description": "Fine-tuning job event object", "decorators": [], "properties": [ { @@ -29847,6 +30267,7 @@ "kind": "property", "name": "file", "serializedName": "file", + "description": "The File object (not file name) to be uploaded.", "type": { "$id": "3138", "kind": "bytes", @@ -29867,6 +30288,7 @@ "kind": "property", "name": "purpose", "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", "type": { "$ref": "767" }, @@ -30014,6 +30436,7 @@ "kind": "property", "name": "input", "serializedName": "input", + "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { "$id": "3154", "kind": "union", @@ -30090,6 +30513,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "783" }, @@ -30105,6 +30529,7 @@ "kind": "property", "name": "encoding_format", "serializedName": "encoding_format", + "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", "type": { "$ref": "791" }, @@ -30120,6 +30545,7 @@ "kind": "property", "name": "dimensions", "serializedName": "dimensions", + "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", "type": { "$id": "3166", "kind": "int32", @@ -30139,6 +30565,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3168", "kind": "string", @@ -30168,6 +30595,7 @@ "kind": "property", "name": "data", "serializedName": "data", + "description": "The list of embeddings generated by the model.", "type": { "$id": "3171", "kind": "array", @@ -30178,6 +30606,7 @@ "name": "Embedding", "crossLanguageDefinitionId": "OpenAI.Embedding", "usage": "Output,Json", + "description": "Represents an embedding vector returned by embedding endpoint.", "decorators": [], "properties": [ { @@ -30185,6 +30614,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the embedding in the list of embeddings.", "type": { "$id": "3174", "kind": "int32", @@ -30204,6 +30634,7 @@ "kind": "property", "name": "embedding", "serializedName": "embedding", + "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", "type": { "$id": "3176", "kind": "union", @@ -30245,6 +30676,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"embedding\".", "type": { "$id": "3181", "kind": "constant", @@ -30278,6 +30710,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The name of the model used to generate the embedding.", "type": { "$id": "3183", "kind": "string", @@ -30297,6 +30730,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"list\".", "type": { "$id": "3185", "kind": "constant", @@ -30318,6 +30752,7 @@ "kind": "property", "name": "usage", "serializedName": "usage", + "description": "The usage information for the request.", "type": { "$id": "3187", "kind": "model", @@ -30331,6 +30766,7 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", + "description": "The number of tokens used by the prompt.", "type": { "$id": "3189", "kind": "int32", @@ -30350,6 +30786,7 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", + "description": "The total number of tokens used by the request.", "type": { "$id": "3191", "kind": "int32", @@ -30394,6 +30831,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "803" }, @@ -30409,6 +30847,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", "type": { "$id": "3195", "kind": "nullable", @@ -30489,6 +30928,7 @@ "kind": "property", "name": "best_of", "serializedName": "best_of", + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { "$id": "3206", "kind": "nullable", @@ -30512,6 +30952,7 @@ "kind": "property", "name": "echo", "serializedName": "echo", + "description": "Echo back the prompt in addition to the completion", "type": { "$id": "3209", "kind": "nullable", @@ -30535,6 +30976,7 @@ "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3212", "kind": "nullable", @@ -30558,6 +31000,7 @@ "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", "type": { "$id": "3215", "kind": "nullable", @@ -30593,6 +31036,7 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", + "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", "type": { "$id": "3220", "kind": "nullable", @@ -30616,6 +31060,7 @@ "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", "type": { "$id": "3223", "kind": "nullable", @@ -30639,6 +31084,7 @@ "kind": "property", "name": "n", "serializedName": "n", + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "type": { "$id": "3226", "kind": "nullable", @@ -30662,6 +31108,7 @@ "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3229", "kind": "nullable", @@ -30685,6 +31132,7 @@ "kind": "property", "name": "seed", "serializedName": "seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { "$id": "3232", "kind": "nullable", @@ -30708,6 +31156,7 @@ "kind": "property", "name": "stop", "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", "type": { "$id": "3235", "kind": "nullable", @@ -30753,6 +31202,7 @@ "kind": "property", "name": "stream", "serializedName": "stream", + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { "$id": "3241", "kind": "nullable", @@ -30785,6 +31235,7 @@ "name": "ChatCompletionStreamOptions", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", "usage": "Input,Json", + "description": "Options for streaming response. Only set this when you set `stream: true`.", "decorators": [], "properties": [ { @@ -30792,6 +31243,7 @@ "kind": "property", "name": "include_usage", "serializedName": "include_usage", + "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", "type": { "$id": "3247", "kind": "boolean", @@ -30821,6 +31273,7 @@ "kind": "property", "name": "suffix", "serializedName": "suffix", + "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", "type": { "$id": "3249", "kind": "nullable", @@ -30844,6 +31297,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { "$id": "3252", "kind": "nullable", @@ -30867,6 +31321,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { "$id": "3255", "kind": "nullable", @@ -30890,6 +31345,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3258", "kind": "string", @@ -30915,6 +31371,7 @@ "name": "CreateCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", "usage": "Output,Json", + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", "decorators": [], "properties": [ { @@ -30922,6 +31379,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "A unique identifier for the completion.", "type": { "$id": "3261", "kind": "string", @@ -30941,6 +31399,7 @@ "kind": "property", "name": "choices", "serializedName": "choices", + "description": "The list of completion choices the model generated for the input prompt.", "type": { "$id": "3263", "kind": "array", @@ -30958,6 +31417,7 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", "type": { "$ref": "811" }, @@ -31165,6 +31625,7 @@ "kind": "property", "name": "created", "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the completion was created.", "type": { "$id": "3288", "kind": "utcDateTime", @@ -31192,6 +31653,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model used for completion.", "type": { "$id": "3291", "kind": "string", @@ -31211,6 +31673,7 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3293", "kind": "string", @@ -31230,6 +31693,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always \"text_completion\"", "type": { "$id": "3295", "kind": "constant", @@ -31257,6 +31721,7 @@ "name": "CompletionUsage", "crossLanguageDefinitionId": "OpenAI.CompletionUsage", "usage": "Output,Json", + "description": "Usage statistics for the completion request.", "decorators": [], "properties": [ { @@ -31264,6 +31729,7 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", "type": { "$id": "3299", "kind": "int32", @@ -31283,6 +31749,7 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", "type": { "$id": "3301", "kind": "int32", @@ -31302,6 +31769,7 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", "type": { "$id": "3303", "kind": "int32", @@ -31321,6 +31789,7 @@ "kind": "property", "name": "completion_tokens_details", "serializedName": "completion_tokens_details", + "description": "Breakdown of tokens used in a completion.", "type": { "$id": "3305", "kind": "model", @@ -31334,6 +31803,7 @@ "kind": "property", "name": "reasoning_tokens", "serializedName": "reasoning_tokens", + "description": "Tokens generated by the model for reasoning.", "type": { "$id": "3307", "kind": "int32", @@ -31393,6 +31863,7 @@ "kind": "property", "name": "messages", "serializedName": "messages", + "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", "type": { "$id": "3310", "kind": "array", @@ -31409,6 +31880,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the author of this message.", "type": { "$id": "3313", "kind": "string", @@ -31447,6 +31919,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the system message.", "type": { "$id": "3317", "kind": "union", @@ -31481,6 +31954,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the content part.", "type": { "$id": "3323", "kind": "constant", @@ -31502,6 +31976,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text content.", "type": { "$id": "3325", "kind": "string", @@ -31539,6 +32014,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the messages author, in this case `system`.", "type": { "$id": "3327", "kind": "constant", @@ -31564,6 +32040,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3330", "kind": "string", @@ -31597,6 +32074,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the user message.", "type": { "$id": "3333", "kind": "union", @@ -31634,6 +32112,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the content part.", "type": { "$id": "3339", "kind": "constant", @@ -31668,6 +32147,7 @@ "kind": "property", "name": "url", "serializedName": "url", + "description": "Either a URL of the image or the base64 encoded image data.", "type": { "$id": "3343", "kind": "url", @@ -31687,6 +32167,7 @@ "kind": "property", "name": "detail", "serializedName": "detail", + "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", "type": { "$ref": "828" }, @@ -31729,6 +32210,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the messages author, in this case `user`.", "type": { "$id": "3346", "kind": "constant", @@ -31754,6 +32236,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3349", "kind": "string", @@ -31787,6 +32270,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", "type": { "$id": "3352", "kind": "nullable", @@ -31827,6 +32311,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the content part.", "type": { "$id": "3359", "kind": "constant", @@ -31848,6 +32333,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "The refusal message generated by the model.", "type": { "$id": "3361", "kind": "string", @@ -31886,6 +32372,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "The refusal message by the assistant.", "type": { "$id": "3363", "kind": "nullable", @@ -31909,6 +32396,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the messages author, in this case `assistant`.", "type": { "$id": "3366", "kind": "constant", @@ -31934,6 +32422,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", "type": { "$id": "3369", "kind": "string", @@ -31970,6 +32459,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call.", "type": { "$id": "3374", "kind": "string", @@ -31989,6 +32479,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3376", "kind": "constant", @@ -32010,6 +32501,7 @@ "kind": "property", "name": "function", "serializedName": "function", + "description": "The function that the model called.", "type": { "$id": "3378", "kind": "model", @@ -32023,6 +32515,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3380", "kind": "string", @@ -32042,6 +32535,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3382", "kind": "string", @@ -32082,6 +32576,7 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3384", "kind": "nullable", @@ -32098,6 +32593,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3387", "kind": "string", @@ -32117,6 +32613,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3389", "kind": "string", @@ -32160,6 +32657,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the messages author, in this case `tool`.", "type": { "$id": "3392", "kind": "constant", @@ -32185,6 +32683,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the tool message.", "type": { "$id": "3395", "kind": "union", @@ -32230,6 +32729,7 @@ "kind": "property", "name": "tool_call_id", "serializedName": "tool_call_id", + "description": "Tool call that this message is responding to.", "type": { "$id": "3400", "kind": "string", @@ -32264,6 +32764,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the messages author, in this case `function`.", "type": { "$id": "3403", "kind": "constant", @@ -32289,6 +32790,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the function message.", "type": { "$id": "3406", "kind": "nullable", @@ -32312,6 +32814,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3409", "kind": "string", @@ -32345,6 +32848,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", "type": { "$ref": "842" }, @@ -32360,6 +32864,7 @@ "kind": "property", "name": "frequency_penalty", "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3412", "kind": "nullable", @@ -32383,6 +32888,7 @@ "kind": "property", "name": "logit_bias", "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", "type": { "$id": "3415", "kind": "nullable", @@ -32418,6 +32924,7 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", + "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", "type": { "$id": "3420", "kind": "nullable", @@ -32441,6 +32948,7 @@ "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", + "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", "type": { "$id": "3423", "kind": "nullable", @@ -32464,6 +32972,7 @@ "kind": "property", "name": "max_tokens", "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", "type": { "$id": "3426", "kind": "nullable", @@ -32487,6 +32996,7 @@ "kind": "property", "name": "max_completion_tokens", "serializedName": "max_completion_tokens", + "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", "type": { "$id": "3429", "kind": "nullable", @@ -32510,6 +33020,7 @@ "kind": "property", "name": "n", "serializedName": "n", + "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", "type": { "$id": "3432", "kind": "nullable", @@ -32533,6 +33044,7 @@ "kind": "property", "name": "presence_penalty", "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", "type": { "$id": "3435", "kind": "nullable", @@ -32556,6 +33068,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", "type": { "$id": "3438", "kind": "model", @@ -32606,6 +33119,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `text`", "type": { "$id": "3444", "kind": "constant", @@ -32645,6 +33159,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_object`", "type": { "$id": "3448", "kind": "constant", @@ -32685,6 +33200,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", "type": { "$id": "3452", "kind": "constant", @@ -32736,6 +33252,7 @@ "kind": "property", "name": "seed", "serializedName": "seed", + "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", "type": { "$id": "3456", "kind": "nullable", @@ -32759,6 +33276,7 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", + "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", "type": { "$id": "3459", "kind": "nullable", @@ -32778,6 +33296,7 @@ "kind": "property", "name": "stop", "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens.", "type": { "$id": "3461", "kind": "nullable", @@ -32823,6 +33342,7 @@ "kind": "property", "name": "stream", "serializedName": "stream", + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", "type": { "$id": "3467", "kind": "nullable", @@ -32865,6 +33385,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "type": { "$id": "3472", "kind": "nullable", @@ -32888,6 +33409,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "type": { "$id": "3475", "kind": "nullable", @@ -32911,6 +33433,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", "type": { "$id": "3478", "kind": "array", @@ -32928,6 +33451,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3481", "kind": "constant", @@ -32990,6 +33514,7 @@ "name": "ChatCompletionNamedToolChoice", "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", "usage": "Input,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", "decorators": [], "properties": [ { @@ -32997,6 +33522,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "3487", "kind": "constant", @@ -33031,6 +33557,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3491", "kind": "string", @@ -33090,6 +33617,7 @@ "kind": "property", "name": "user", "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "type": { "$id": "3495", "kind": "string", @@ -33109,6 +33637,7 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", "type": { "$id": "3497", "kind": "union", @@ -33146,6 +33675,7 @@ "name": "ChatCompletionFunctionCallOption", "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", "usage": "Input,Json", + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", "decorators": [], "properties": [ { @@ -33153,6 +33683,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3504", "kind": "string", @@ -33184,6 +33715,7 @@ "kind": "property", "name": "functions", "serializedName": "functions", + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", "type": { "$id": "3506", "kind": "array", @@ -33202,6 +33734,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", "type": { "$id": "3509", "kind": "string", @@ -33221,6 +33754,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", "type": { "$id": "3511", "kind": "string", @@ -33336,6 +33870,7 @@ "name": "CreateChatCompletionResponse", "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", "usage": "Output,Json", + "description": "Represents a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -33343,6 +33878,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "A unique identifier for the chat completion.", "type": { "$id": "3515", "kind": "string", @@ -33362,6 +33898,7 @@ "kind": "property", "name": "choices", "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { "$id": "3517", "kind": "array", @@ -33379,6 +33916,7 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { "$ref": "922" }, @@ -33394,6 +33932,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the choice in the list of choices.", "type": { "$id": "3521", "kind": "int32", @@ -33419,6 +33958,7 @@ "name": "ChatCompletionResponseMessage", "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", "usage": "Output,Json", + "description": "A chat completion message generated by the model.", "decorators": [], "properties": [ { @@ -33426,6 +33966,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the message.", "type": { "$id": "3525", "kind": "nullable", @@ -33449,6 +33990,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "The refusal message generated by the model.", "type": { "$id": "3528", "kind": "nullable", @@ -33494,6 +34036,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the author of this message.", "type": { "$id": "3533", "kind": "constant", @@ -33515,6 +34058,7 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3535", "kind": "model", @@ -33528,6 +34072,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3537", "kind": "string", @@ -33547,6 +34092,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3539", "kind": "string", @@ -33584,6 +34130,7 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", + "description": "Log probability information for the choice.", "type": { "$id": "3541", "kind": "nullable", @@ -33600,6 +34147,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "A list of message content tokens with log probability information.", "type": { "$id": "3544", "kind": "nullable", @@ -33620,6 +34168,7 @@ "kind": "property", "name": "token", "serializedName": "token", + "description": "The token.", "type": { "$id": "3548", "kind": "string", @@ -33639,6 +34188,7 @@ "kind": "property", "name": "logprob", "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { "$id": "3550", "kind": "float32", @@ -33658,6 +34208,7 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { "$id": "3552", "kind": "nullable", @@ -33688,6 +34239,7 @@ "kind": "property", "name": "top_logprobs", "serializedName": "top_logprobs", + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", "type": { "$id": "3556", "kind": "array", @@ -33705,6 +34257,7 @@ "kind": "property", "name": "token", "serializedName": "token", + "description": "The token.", "type": { "$id": "3559", "kind": "string", @@ -33724,6 +34277,7 @@ "kind": "property", "name": "logprob", "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", "type": { "$id": "3561", "kind": "float32", @@ -33743,6 +34297,7 @@ "kind": "property", "name": "bytes", "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", "type": { "$id": "3563", "kind": "nullable", @@ -33798,6 +34353,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", "type": { "$id": "3567", "kind": "nullable", @@ -33846,6 +34402,7 @@ "kind": "property", "name": "created", "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { "$id": "3570", "kind": "utcDateTime", @@ -33873,6 +34430,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model used for the chat completion.", "type": { "$id": "3573", "kind": "string", @@ -33892,6 +34450,7 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { "$id": "3575", "kind": "nullable", @@ -33911,6 +34470,7 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3577", "kind": "string", @@ -33930,6 +34490,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", "type": { "$id": "3579", "kind": "constant", @@ -33994,6 +34555,7 @@ "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", + "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", "type": { "$id": "3583", "kind": "string", @@ -34013,6 +34575,7 @@ "kind": "property", "name": "endpoint", "serializedName": "endpoint", + "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", "type": { "$ref": "946" }, @@ -34028,6 +34591,7 @@ "kind": "property", "name": "completion_window", "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", "type": { "$id": "3586", "kind": "constant", @@ -34049,6 +34613,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Optional custom metadata for the batch.", "type": { "$id": "3588", "kind": "nullable", @@ -34113,6 +34678,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `batch`.", "type": { "$id": "3596", "kind": "constant", @@ -34134,6 +34700,7 @@ "kind": "property", "name": "endpoint", "serializedName": "endpoint", + "description": "The OpenAI API endpoint used by the batch.", "type": { "$id": "3598", "kind": "string", @@ -34166,6 +34733,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `list`.", "type": { "$id": "3602", "kind": "constant", @@ -34204,6 +34772,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "An error code identifying the error type.", "type": { "$id": "3607", "kind": "string", @@ -34223,6 +34792,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable message providing more details about the error.", "type": { "$id": "3609", "kind": "string", @@ -34242,6 +34812,7 @@ "kind": "property", "name": "param", "serializedName": "param", + "description": "The name of the parameter that caused the error, if applicable.", "type": { "$id": "3611", "kind": "nullable", @@ -34265,6 +34836,7 @@ "kind": "property", "name": "line", "serializedName": "line", + "description": "The line number of the input file where the error occurred, if applicable.", "type": { "$id": "3614", "kind": "nullable", @@ -34309,6 +34881,7 @@ "kind": "property", "name": "input_file_id", "serializedName": "input_file_id", + "description": "The ID of the input file for the batch.", "type": { "$id": "3617", "kind": "string", @@ -34328,6 +34901,7 @@ "kind": "property", "name": "completion_window", "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed.", "type": { "$id": "3619", "kind": "string", @@ -34347,6 +34921,7 @@ "kind": "property", "name": "status", "serializedName": "status", + "description": "The current status of the batch.", "type": { "$ref": "961" }, @@ -34362,6 +34937,7 @@ "kind": "property", "name": "output_file_id", "serializedName": "output_file_id", + "description": "The ID of the file containing the outputs of successfully executed requests.", "type": { "$id": "3622", "kind": "string", @@ -34381,6 +34957,7 @@ "kind": "property", "name": "error_file_id", "serializedName": "error_file_id", + "description": "The ID of the file containing the outputs of requests with errors.", "type": { "$id": "3624", "kind": "string", @@ -34400,6 +34977,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the batch was created.", "type": { "$id": "3626", "kind": "utcDateTime", @@ -34427,6 +35005,7 @@ "kind": "property", "name": "in_progress_at", "serializedName": "in_progress_at", + "description": "The Unix timestamp (in seconds) for when the batch started processing.", "type": { "$id": "3629", "kind": "utcDateTime", @@ -34454,6 +35033,7 @@ "kind": "property", "name": "expires_at", "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the batch will expire.", "type": { "$id": "3632", "kind": "utcDateTime", @@ -34481,6 +35061,7 @@ "kind": "property", "name": "finalizing_at", "serializedName": "finalizing_at", + "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", "type": { "$id": "3635", "kind": "utcDateTime", @@ -34508,6 +35089,7 @@ "kind": "property", "name": "completed_at", "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the batch was completed.", "type": { "$id": "3638", "kind": "utcDateTime", @@ -34535,6 +35117,7 @@ "kind": "property", "name": "failed_at", "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the batch failed.", "type": { "$id": "3641", "kind": "utcDateTime", @@ -34562,6 +35145,7 @@ "kind": "property", "name": "expired_at", "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the batch expired.", "type": { "$id": "3644", "kind": "utcDateTime", @@ -34589,6 +35173,7 @@ "kind": "property", "name": "cancelling_at", "serializedName": "cancelling_at", + "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", "type": { "$id": "3647", "kind": "utcDateTime", @@ -34616,6 +35201,7 @@ "kind": "property", "name": "cancelled_at", "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", "type": { "$id": "3650", "kind": "utcDateTime", @@ -34643,6 +35229,7 @@ "kind": "property", "name": "request_counts", "serializedName": "request_counts", + "description": "The request counts for different statuses within the batch.", "type": { "$id": "3653", "kind": "model", @@ -34656,6 +35243,7 @@ "kind": "property", "name": "total", "serializedName": "total", + "description": "Total number of requests in the batch.", "type": { "$id": "3655", "kind": "int32", @@ -34675,6 +35263,7 @@ "kind": "property", "name": "completed", "serializedName": "completed", + "description": "Number of requests that have been completed successfully.", "type": { "$id": "3657", "kind": "int32", @@ -34694,6 +35283,7 @@ "kind": "property", "name": "failed", "serializedName": "failed", + "description": "Number of requests that have failed.", "type": { "$id": "3659", "kind": "int32", @@ -34722,6 +35312,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3661", "kind": "nullable", @@ -34886,6 +35477,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$ref": "982" }, @@ -34901,6 +35493,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3679", "kind": "nullable", @@ -34924,6 +35517,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3682", "kind": "nullable", @@ -34947,6 +35541,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3685", "kind": "nullable", @@ -34970,6 +35565,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3688", "kind": "array", @@ -34992,6 +35588,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3690", "kind": "nullable", @@ -35021,6 +35618,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3695", "kind": "array", @@ -35081,6 +35679,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3699", "kind": "nullable", @@ -35116,6 +35715,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3704", "kind": "nullable", @@ -35139,6 +35739,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3707", "kind": "nullable", @@ -35217,6 +35818,7 @@ "name": "AssistantObject", "crossLanguageDefinitionId": "OpenAI.AssistantObject", "usage": "Output,Json", + "description": "Represents an `assistant` that can call the model and use tools.", "decorators": [], "properties": [ { @@ -35224,6 +35826,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", "type": { "$id": "3716", "kind": "string", @@ -35243,6 +35846,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `assistant`.", "type": { "$id": "3718", "kind": "constant", @@ -35264,6 +35868,7 @@ "kind": "property", "name": "created_at", "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the assistant was created.", "type": { "$id": "3720", "kind": "utcDateTime", @@ -35291,6 +35896,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3723", "kind": "nullable", @@ -35314,6 +35920,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3726", "kind": "nullable", @@ -35337,6 +35944,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$id": "3729", "kind": "string", @@ -35356,6 +35964,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3731", "kind": "nullable", @@ -35379,6 +35988,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3734", "kind": "array", @@ -35401,6 +36011,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3736", "kind": "nullable", @@ -35430,6 +36041,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3741", "kind": "array", @@ -35490,6 +36102,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3745", "kind": "nullable", @@ -35525,6 +36138,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3750", "kind": "nullable", @@ -35548,6 +36162,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3753", "kind": "nullable", @@ -35665,7 +36280,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -35743,6 +36358,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", "type": { "$id": "3773", "kind": "string", @@ -35762,6 +36378,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", "type": { "$id": "3775", "kind": "nullable", @@ -35785,6 +36402,7 @@ "kind": "property", "name": "description", "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", "type": { "$id": "3778", "kind": "nullable", @@ -35808,6 +36426,7 @@ "kind": "property", "name": "instructions", "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", "type": { "$id": "3781", "kind": "nullable", @@ -35831,6 +36450,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "3784", "kind": "array", @@ -35853,6 +36473,7 @@ "kind": "property", "name": "tool_resources", "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "type": { "$id": "3786", "kind": "nullable", @@ -35882,6 +36503,7 @@ "kind": "property", "name": "file_ids", "serializedName": "file_ids", + "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", "type": { "$id": "3791", "kind": "array", @@ -35942,6 +36564,7 @@ "kind": "property", "name": "metadata", "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", "type": { "$id": "3795", "kind": "nullable", @@ -35977,6 +36600,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", "type": { "$id": "3800", "kind": "nullable", @@ -36000,6 +36624,7 @@ "kind": "property", "name": "top_p", "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "type": { "$id": "3803", "kind": "nullable", @@ -36154,6 +36779,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", "type": { "$ref": "1045" }, @@ -36169,6 +36795,7 @@ "kind": "property", "name": "input", "serializedName": "input", + "description": "The text to generate audio for. The maximum length is 4096 characters.", "type": { "$id": "3820", "kind": "string", @@ -36188,6 +36815,7 @@ "kind": "property", "name": "voice", "serializedName": "voice", + "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", "type": { "$ref": "1051" }, @@ -36203,6 +36831,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", "type": { "$ref": "1065" }, @@ -36218,6 +36847,7 @@ "kind": "property", "name": "speed", "serializedName": "speed", + "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", "type": { "$id": "3824", "kind": "float32", @@ -36247,6 +36877,7 @@ "kind": "property", "name": "file", "serializedName": "file", + "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { "$id": "3827", "kind": "bytes", @@ -36267,6 +36898,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { "$ref": "1079" }, @@ -36282,6 +36914,7 @@ "kind": "property", "name": "language", "serializedName": "language", + "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", "type": { "$id": "3830", "kind": "string", @@ -36301,6 +36934,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", "type": { "$id": "3832", "kind": "string", @@ -36320,6 +36954,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { "$ref": "1083" }, @@ -36335,6 +36970,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { "$id": "3835", "kind": "float32", @@ -36354,6 +36990,7 @@ "kind": "property", "name": "timestamp_granularities", "serializedName": "timestamp_granularities", + "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", "type": { "$id": "3837", "kind": "array", @@ -36379,6 +37016,7 @@ "name": "CreateTranscriptionResponseVerboseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", "usage": "Output,Json", + "description": "Represents a verbose json transcription response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -36386,6 +37024,7 @@ "kind": "property", "name": "task", "serializedName": "task", + "description": "The task label.", "type": { "$id": "3840", "kind": "constant", @@ -36407,6 +37046,7 @@ "kind": "property", "name": "language", "serializedName": "language", + "description": "The language of the input audio.", "type": { "$id": "3842", "kind": "string", @@ -36426,6 +37066,7 @@ "kind": "property", "name": "duration", "serializedName": "duration", + "description": "The duration of the input audio.", "type": { "$id": "3844", "kind": "duration", @@ -36453,6 +37094,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The transcribed text.", "type": { "$id": "3847", "kind": "string", @@ -36472,6 +37114,7 @@ "kind": "property", "name": "words", "serializedName": "words", + "description": "Extracted words and their corresponding timestamps.", "type": { "$id": "3849", "kind": "array", @@ -36489,6 +37132,7 @@ "kind": "property", "name": "word", "serializedName": "word", + "description": "The text content of the word.", "type": { "$id": "3852", "kind": "string", @@ -36508,6 +37152,7 @@ "kind": "property", "name": "start", "serializedName": "start", + "description": "Start time of the word in seconds.", "type": { "$id": "3854", "kind": "duration", @@ -36535,6 +37180,7 @@ "kind": "property", "name": "end", "serializedName": "end", + "description": "End time of the word in seconds.", "type": { "$id": "3857", "kind": "duration", @@ -36574,6 +37220,7 @@ "kind": "property", "name": "segments", "serializedName": "segments", + "description": "Segments of the transcribed text and their corresponding details.", "type": { "$id": "3860", "kind": "array", @@ -36591,6 +37238,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "Unique identifier of the segment.", "type": { "$id": "3863", "kind": "int32", @@ -36610,6 +37258,7 @@ "kind": "property", "name": "seek", "serializedName": "seek", + "description": "Seek offset of the segment.", "type": { "$id": "3865", "kind": "int32", @@ -36629,6 +37278,7 @@ "kind": "property", "name": "start", "serializedName": "start", + "description": "Start time of the segment in seconds.", "type": { "$id": "3867", "kind": "duration", @@ -36656,6 +37306,7 @@ "kind": "property", "name": "end", "serializedName": "end", + "description": "End time of the segment in seconds.", "type": { "$id": "3870", "kind": "duration", @@ -36683,6 +37334,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "Text content of the segment.", "type": { "$id": "3873", "kind": "string", @@ -36702,6 +37354,7 @@ "kind": "property", "name": "tokens", "serializedName": "tokens", + "description": "Array of token IDs for the text content.", "type": { "$id": "3875", "kind": "array", @@ -36728,6 +37381,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "Temperature parameter used for generating the segment.", "type": { "$id": "3878", "kind": "float32", @@ -36747,6 +37401,7 @@ "kind": "property", "name": "avg_logprob", "serializedName": "avg_logprob", + "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", "type": { "$id": "3880", "kind": "float32", @@ -36766,6 +37421,7 @@ "kind": "property", "name": "compression_ratio", "serializedName": "compression_ratio", + "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", "type": { "$id": "3882", "kind": "float32", @@ -36785,6 +37441,7 @@ "kind": "property", "name": "no_speech_prob", "serializedName": "no_speech_prob", + "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", "type": { "$id": "3884", "kind": "float32", @@ -36825,6 +37482,7 @@ "name": "CreateTranscriptionResponseJson", "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", "usage": "Output,Json", + "description": "Represents a transcription response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -36832,6 +37490,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The transcribed text.", "type": { "$id": "3887", "kind": "string", @@ -36861,6 +37520,7 @@ "kind": "property", "name": "file", "serializedName": "file", + "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", "type": { "$id": "3890", "kind": "bytes", @@ -36881,6 +37541,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", "type": { "$ref": "1104" }, @@ -36896,6 +37557,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", "type": { "$id": "3893", "kind": "string", @@ -36915,6 +37577,7 @@ "kind": "property", "name": "response_format", "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", "type": { "$ref": "1108" }, @@ -36930,6 +37593,7 @@ "kind": "property", "name": "temperature", "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", "type": { "$id": "3896", "kind": "float32", @@ -36959,6 +37623,7 @@ "kind": "property", "name": "task", "serializedName": "task", + "description": "The task label.", "type": { "$id": "3899", "kind": "constant", @@ -36980,6 +37645,7 @@ "kind": "property", "name": "language", "serializedName": "language", + "description": "The language of the output translation (always `english`).", "type": { "$id": "3901", "kind": "string", @@ -36999,6 +37665,7 @@ "kind": "property", "name": "duration", "serializedName": "duration", + "description": "The duration of the input audio.", "type": { "$id": "3903", "kind": "duration", @@ -37026,6 +37693,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The translated text.", "type": { "$id": "3906", "kind": "string", @@ -37045,6 +37713,7 @@ "kind": "property", "name": "segments", "serializedName": "segments", + "description": "Segments of the translated text and their corresponding details.", "type": { "$id": "3908", "kind": "array", @@ -37144,6 +37813,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `text`", "type": { "$id": "3918", "kind": "constant", @@ -37183,6 +37853,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_object`", "type": { "$id": "3922", "kind": "constant", @@ -37222,6 +37893,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", "type": { "$id": "3926", "kind": "constant", @@ -37277,6 +37949,7 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", "access": "public", "usage": "Input", + "description": "The per-line object of the batch input file", "decorators": [], "properties": [ { @@ -37284,6 +37957,7 @@ "kind": "property", "name": "custom_id", "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", "type": { "$id": "3931", "kind": "string", @@ -37303,6 +37977,7 @@ "kind": "property", "name": "method", "serializedName": "method", + "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", "type": { "$id": "3933", "kind": "constant", @@ -37324,6 +37999,7 @@ "kind": "property", "name": "url", "serializedName": "url", + "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", "type": { "$id": "3935", "kind": "url", @@ -37347,6 +38023,7 @@ "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", "access": "public", "usage": "Output", + "description": "The per-line object of the batch output and error files", "decorators": [], "properties": [ { @@ -37373,6 +38050,7 @@ "kind": "property", "name": "custom_id", "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs.", "type": { "$id": "3940", "kind": "string", @@ -37408,6 +38086,7 @@ "kind": "property", "name": "status_code", "serializedName": "status_code", + "description": "The HTTP status code of the response", "type": { "$id": "3945", "kind": "int32", @@ -37427,6 +38106,7 @@ "kind": "property", "name": "request_id", "serializedName": "request_id", + "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", "type": { "$id": "3947", "kind": "string", @@ -37446,6 +38126,7 @@ "kind": "property", "name": "body", "serializedName": "body", + "description": "The JSON body of the response", "type": { "$id": "3949", "kind": "dict", @@ -37487,6 +38168,7 @@ "kind": "property", "name": "error", "serializedName": "error", + "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", "type": { "$id": "3953", "kind": "nullable", @@ -37503,6 +38185,7 @@ "kind": "property", "name": "code", "serializedName": "code", + "description": "A machine-readable error code.", "type": { "$id": "3956", "kind": "string", @@ -37522,6 +38205,7 @@ "kind": "property", "name": "message", "serializedName": "message", + "description": "A human-readable error message.", "type": { "$id": "3958", "kind": "string", @@ -37601,6 +38285,7 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", "access": "public", "usage": "Output", + "description": "Represents a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -37608,6 +38293,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "A unique identifier for the chat completion.", "type": { "$id": "3965", "kind": "string", @@ -37627,6 +38313,7 @@ "kind": "property", "name": "choices", "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "type": { "$id": "3967", "kind": "array", @@ -37644,6 +38331,7 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", "type": { "$ref": "1126" }, @@ -37659,6 +38347,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the choice in the list of choices.", "type": { "$id": "3971", "kind": "int32", @@ -37705,6 +38394,7 @@ "kind": "property", "name": "created", "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", "type": { "$id": "3974", "kind": "utcDateTime", @@ -37732,6 +38422,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model used for the chat completion.", "type": { "$id": "3977", "kind": "string", @@ -37751,6 +38442,7 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "3979", "kind": "string", @@ -37770,6 +38462,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", "type": { "$id": "3981", "kind": "constant", @@ -37812,6 +38505,7 @@ "name": "ChatCompletionStreamResponseDelta", "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", "usage": "Output", + "description": "A chat completion delta generated by streamed model responses.", "decorators": [], "properties": [ { @@ -37819,6 +38513,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The contents of the chunk message.", "type": { "$id": "3985", "kind": "nullable", @@ -37842,6 +38537,7 @@ "kind": "property", "name": "function_call", "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", "type": { "$id": "3988", "kind": "model", @@ -37855,6 +38551,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "3990", "kind": "string", @@ -37874,6 +38571,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "3992", "kind": "string", @@ -37938,6 +38636,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call.", "type": { "$id": "3999", "kind": "string", @@ -37957,6 +38656,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", "type": { "$id": "4001", "kind": "constant", @@ -37991,6 +38691,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function to call.", "type": { "$id": "4005", "kind": "string", @@ -38010,6 +38711,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", "type": { "$id": "4007", "kind": "string", @@ -38050,6 +38752,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The role of the author of this message.", "type": { "$ref": "1142" }, @@ -38065,6 +38768,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "The refusal message generated by the model.", "type": { "$id": "4010", "kind": "nullable", @@ -38101,6 +38805,7 @@ "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", "access": "public", "usage": "Output", + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", "decorators": [], "properties": [ { @@ -38108,6 +38813,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "A unique identifier for the chat completion. Each chunk has the same ID.", "type": { "$id": "4014", "kind": "string", @@ -38127,6 +38833,7 @@ "kind": "property", "name": "choices", "serializedName": "choices", + "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", "type": { "$id": "4016", "kind": "array", @@ -38159,6 +38866,7 @@ "kind": "property", "name": "logprobs", "serializedName": "logprobs", + "description": "Log probability information for the choice.", "type": { "$id": "4020", "kind": "nullable", @@ -38175,6 +38883,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "A list of message content tokens with log probability information.", "type": { "$id": "4023", "kind": "nullable", @@ -38201,6 +38910,7 @@ "kind": "property", "name": "refusal", "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", "type": { "$id": "4026", "kind": "nullable", @@ -38237,6 +38947,7 @@ "kind": "property", "name": "finish_reason", "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", "type": { "$id": "4029", "kind": "nullable", @@ -38256,6 +38967,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the choice in the list of choices.", "type": { "$id": "4031", "kind": "int32", @@ -38287,6 +38999,7 @@ "kind": "property", "name": "created", "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", "type": { "$id": "4033", "kind": "utcDateTime", @@ -38314,6 +39027,7 @@ "kind": "property", "name": "model", "serializedName": "model", + "description": "The model to generate the completion.", "type": { "$id": "4036", "kind": "string", @@ -38333,6 +39047,7 @@ "kind": "property", "name": "service_tier", "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", "type": { "$id": "4038", "kind": "nullable", @@ -38352,6 +39067,7 @@ "kind": "property", "name": "system_fingerprint", "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", "type": { "$id": "4040", "kind": "string", @@ -38371,6 +39087,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `chat.completion.chunk`.", "type": { "$id": "4042", "kind": "constant", @@ -38392,6 +39109,7 @@ "kind": "property", "name": "usage", "serializedName": "usage", + "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", "type": { "$id": "4044", "kind": "model", @@ -38405,6 +39123,7 @@ "kind": "property", "name": "completion_tokens", "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", "type": { "$id": "4046", "kind": "int32", @@ -38424,6 +39143,7 @@ "kind": "property", "name": "prompt_tokens", "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", "type": { "$id": "4048", "kind": "int32", @@ -38443,6 +39163,7 @@ "kind": "property", "name": "total_tokens", "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", "type": { "$id": "4050", "kind": "int32", @@ -38484,6 +39205,7 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", "access": "public", "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for chat models", "decorators": [], "properties": [ { @@ -38542,6 +39264,7 @@ "kind": "property", "name": "tools", "serializedName": "tools", + "description": "A list of tools the model may generate JSON inputs for.", "type": { "$id": "4057", "kind": "array", @@ -38583,6 +39306,7 @@ "kind": "property", "name": "functions", "serializedName": "functions", + "description": "A list of functions the model may generate JSON inputs for.", "type": { "$id": "4061", "kind": "array", @@ -38612,6 +39336,7 @@ "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", "access": "public", "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for completions models", "decorators": [], "properties": [ { @@ -38619,6 +39344,7 @@ "kind": "property", "name": "prompt", "serializedName": "prompt", + "description": "The input prompt for this training example.", "type": { "$id": "4064", "kind": "string", @@ -38638,6 +39364,7 @@ "kind": "property", "name": "completion", "serializedName": "completion", + "description": "The desired completion for this training example.", "type": { "$id": "4066", "kind": "string", @@ -38667,6 +39394,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the content item.", "type": { "$id": "4069", "kind": "string", @@ -38695,6 +39423,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", "access": "public", "usage": "Input,Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", "discriminatorValue": "file_citation", "decorators": [], "baseModel": { @@ -38706,6 +39435,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `file_citation`.", "type": { "$id": "4073", "kind": "constant", @@ -38731,6 +39461,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4076", "kind": "string", @@ -38763,6 +39494,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", "type": { "$id": "4080", "kind": "string", @@ -38833,6 +39565,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", "access": "public", "usage": "Input,Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", "discriminatorValue": "file_path", "decorators": [], "baseModel": { @@ -38844,6 +39577,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `file_path`.", "type": { "$id": "4087", "kind": "constant", @@ -38869,6 +39603,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4090", "kind": "string", @@ -38901,6 +39636,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the file that was generated.", "type": { "$id": "4094", "kind": "string", @@ -38985,12 +39721,14 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", "access": "public", "usage": "Output", + "description": "Represents a single piece of incremental content in an Assistants API streaming response.", "decorators": [], "discriminatorProperty": { "$id": "4100", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the content item.", "type": { "$id": "4101", "kind": "string", @@ -39019,6 +39757,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", "access": "public", "usage": "Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", "discriminatorValue": "image_file", "decorators": [], "baseModel": { @@ -39030,6 +39769,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the content part in the message.", "type": { "$id": "4105", "kind": "int32", @@ -39049,6 +39789,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `image_file`.", "type": { "$id": "4107", "kind": "constant", @@ -39087,6 +39828,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { "$id": "4112", "kind": "string", @@ -39106,6 +39848,7 @@ "kind": "property", "name": "detail", "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1173" }, @@ -39134,6 +39877,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", "access": "public", "usage": "Output", + "description": "References an image URL in the content of a message.", "discriminatorValue": "image_url", "decorators": [], "baseModel": { @@ -39145,6 +39889,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the content part in the message.", "type": { "$id": "4116", "kind": "int32", @@ -39164,6 +39909,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `image_url`.", "type": { "$id": "4118", "kind": "constant", @@ -39202,6 +39948,7 @@ "kind": "property", "name": "url", "serializedName": "url", + "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { "$id": "4123", "kind": "url", @@ -39221,6 +39968,7 @@ "kind": "property", "name": "detail", "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1181" }, @@ -39249,6 +39997,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", "access": "public", "usage": "Output", + "description": "The text content that is part of a message.", "discriminatorValue": "text", "decorators": [], "baseModel": { @@ -39260,6 +40009,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the content part in the message.", "type": { "$id": "4127", "kind": "int32", @@ -39279,6 +40029,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `text`.", "type": { "$id": "4129", "kind": "constant", @@ -39317,6 +40068,7 @@ "kind": "property", "name": "value", "serializedName": "value", + "description": "The data that makes up the text.", "type": { "$id": "4134", "kind": "string", @@ -39353,6 +40105,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the content item.", "type": { "$id": "4139", "kind": "string", @@ -39381,6 +40134,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", "access": "public", "usage": "Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", "discriminatorValue": "file_citation", "decorators": [], "baseModel": { @@ -39392,6 +40146,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the annotation in the text content part.", "type": { "$id": "4143", "kind": "int32", @@ -39411,6 +40166,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `file_citation`.", "type": { "$id": "4145", "kind": "constant", @@ -39436,6 +40192,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4148", "kind": "string", @@ -39468,6 +40225,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", "type": { "$id": "4152", "kind": "string", @@ -39487,6 +40245,7 @@ "kind": "property", "name": "quote", "serializedName": "quote", + "description": "The specific quote in the file.", "type": { "$id": "4154", "kind": "string", @@ -39557,6 +40316,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", "access": "public", "usage": "Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", "discriminatorValue": "file_path", "decorators": [], "baseModel": { @@ -39568,6 +40328,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the annotation in the text content part.", "type": { "$id": "4161", "kind": "int32", @@ -39587,6 +40348,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `file_path`.", "type": { "$id": "4163", "kind": "constant", @@ -39612,6 +40374,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", "type": { "$id": "4166", "kind": "string", @@ -39644,6 +40407,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The ID of the file that was generated.", "type": { "$id": "4170", "kind": "string", @@ -39736,6 +40500,7 @@ "name": "MessageDeltaContentRefusalObject", "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", "usage": "Output", + "description": "The refusal content that is part of a message.", "discriminatorValue": "refusal", "decorators": [], "baseModel": { @@ -39747,6 +40512,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the refusal part in the message.", "type": { "$id": "4177", "kind": "int32", @@ -39766,6 +40532,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `refusal`.", "type": { "$id": "4179", "kind": "constant", @@ -39852,6 +40619,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", "access": "public", "usage": "Input,Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39862,6 +40630,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `image_file`.", "type": { "$id": "4185", "kind": "constant", @@ -39896,6 +40665,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", "type": { "$id": "4189", "kind": "string", @@ -39915,6 +40685,7 @@ "kind": "property", "name": "detail", "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", "type": { "$ref": "1192" }, @@ -39946,6 +40717,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", "access": "public", "usage": "Input,Output", + "description": "The text content that is part of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -39956,6 +40728,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `text`.", "type": { "$id": "4193", "kind": "constant", @@ -39990,6 +40763,7 @@ "kind": "property", "name": "value", "serializedName": "value", + "description": "The data that makes up the text.", "type": { "$id": "4197", "kind": "string", @@ -40047,6 +40821,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", "access": "public", "usage": "Input,Output", + "description": "The refusal content generated by the assistant.", "decorators": [], "baseModel": { "$ref": "1530" @@ -40057,6 +40832,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `refusal`.", "type": { "$id": "4202", "kind": "constant", @@ -40101,6 +40877,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", "access": "public", "usage": "Input,Output", + "description": "References an image URL in the content of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -40111,6 +40888,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of the content part.", "type": { "$id": "4207", "kind": "constant", @@ -40145,6 +40923,7 @@ "kind": "property", "name": "url", "serializedName": "url", + "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", "type": { "$id": "4211", "kind": "url", @@ -40164,6 +40943,7 @@ "kind": "property", "name": "detail", "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", "type": { "$ref": "1209" }, @@ -40195,6 +40975,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", "access": "public", "usage": "Output", + "description": "Represents a message delta i.e. any changed fields on a message during streaming.", "decorators": [], "properties": [ { @@ -40202,6 +40983,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier of the message, which can be referenced in API endpoints.", "type": { "$id": "4215", "kind": "string", @@ -40221,6 +41003,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread.message.delta`.", "type": { "$id": "4217", "kind": "constant", @@ -40242,6 +41025,7 @@ "kind": "property", "name": "delta", "serializedName": "delta", + "description": "The delta containing the fields that have changed on the Message.", "type": { "$id": "4219", "kind": "model", @@ -40255,6 +41039,7 @@ "kind": "property", "name": "role", "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", "type": { "$ref": "1220" }, @@ -40270,6 +41055,7 @@ "kind": "property", "name": "content", "serializedName": "content", + "description": "The content of the message in array of text and/or images.", "type": { "$id": "4222", "kind": "array", @@ -40308,6 +41094,7 @@ "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", "access": "public", "usage": "Input,Output", + "description": "The text content that is part of a message.", "decorators": [], "baseModel": { "$ref": "1530" @@ -40318,6 +41105,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `text`.", "type": { "$id": "4225", "kind": "constant", @@ -40339,6 +41127,7 @@ "kind": "property", "name": "text", "serializedName": "text", + "description": "Text content to be sent to the model", "type": { "$id": "4227", "kind": "string", @@ -40367,6 +41156,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "4230", "kind": "string", @@ -40395,6 +41185,7 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", "access": "public", "usage": "Output", + "description": "Details of the message creation by the run step.", "discriminatorValue": "message_creation", "decorators": [], "baseModel": { @@ -40406,6 +41197,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `message_creation`.", "type": { "$id": "4234", "kind": "constant", @@ -40444,6 +41236,7 @@ "kind": "property", "name": "message_id", "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", "type": { "$id": "4239", "kind": "string", @@ -40476,6 +41269,7 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", "access": "public", "usage": "Output", + "description": "Details of the tool call.", "discriminatorValue": "tool_calls", "decorators": [], "baseModel": { @@ -40487,6 +41281,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `tool_calls`.", "type": { "$id": "4242", "kind": "constant", @@ -40512,6 +41307,7 @@ "kind": "property", "name": "tool_calls", "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", "type": { "$id": "4245", "kind": "array", @@ -40522,12 +41318,14 @@ "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", "usage": "Output", + "description": "Abstractly represents a run step tool call details inner object.", "decorators": [], "discriminatorProperty": { "$id": "4247", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "4248", "kind": "string", @@ -40556,6 +41354,7 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", "access": "public", "usage": "Output", + "description": "Details of the Code Interpreter tool call the run step was involved in.", "discriminatorValue": "code_interpreter", "decorators": [], "baseModel": { @@ -40567,6 +41366,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4252", "kind": "int32", @@ -40586,6 +41386,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call.", "type": { "$id": "4254", "kind": "string", @@ -40605,6 +41406,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", "type": { "$id": "4256", "kind": "constant", @@ -40630,6 +41432,7 @@ "kind": "property", "name": "code_interpreter", "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", "type": { "$id": "4259", "kind": "model", @@ -40643,6 +41446,7 @@ "kind": "property", "name": "input", "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", "type": { "$id": "4261", "kind": "string", @@ -40662,6 +41466,7 @@ "kind": "property", "name": "outputs", "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", "type": { "$id": "4263", "kind": "array", @@ -40672,12 +41477,14 @@ "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", "usage": "Output", + "description": "Abstractly represents a run step tool call details code interpreter output.", "decorators": [], "discriminatorProperty": { "$id": "4265", "kind": "property", "name": "type", "serializedName": "type", + "description": "The discriminated type identifier for the details object.", "type": { "$id": "4266", "kind": "string", @@ -40706,6 +41513,7 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", "access": "public", "usage": "Output", + "description": "Text output from the Code Interpreter tool call as part of a run step.", "discriminatorValue": "logs", "decorators": [], "baseModel": { @@ -40717,6 +41525,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the output in the outputs array.", "type": { "$id": "4270", "kind": "int32", @@ -40736,6 +41545,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `logs`.", "type": { "$id": "4272", "kind": "constant", @@ -40761,6 +41571,7 @@ "kind": "property", "name": "logs", "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", "type": { "$id": "4275", "kind": "string", @@ -40795,6 +41606,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the output in the outputs array.", "type": { "$id": "4278", "kind": "int32", @@ -40814,6 +41626,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "Always `image`.", "type": { "$id": "4280", "kind": "constant", @@ -40852,6 +41665,7 @@ "kind": "property", "name": "file_id", "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", "type": { "$id": "4285", "kind": "string", @@ -40918,6 +41732,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4288", "kind": "int32", @@ -40937,6 +41752,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call object.", "type": { "$id": "4290", "kind": "string", @@ -40956,6 +41772,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", "type": { "$id": "4292", "kind": "constant", @@ -40981,6 +41798,7 @@ "kind": "property", "name": "file_search", "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", "type": { "$id": "4295", "kind": "dict", @@ -41027,6 +41845,7 @@ "kind": "property", "name": "index", "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", "type": { "$id": "4300", "kind": "int32", @@ -41046,6 +41865,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The ID of the tool call object.", "type": { "$id": "4302", "kind": "string", @@ -41065,6 +41885,7 @@ "kind": "property", "name": "type", "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", "type": { "$id": "4304", "kind": "constant", @@ -41090,6 +41911,7 @@ "kind": "property", "name": "function", "serializedName": "function", + "description": "The definition of the function that was called.", "type": { "$id": "4307", "kind": "model", @@ -41103,6 +41925,7 @@ "kind": "property", "name": "name", "serializedName": "name", + "description": "The name of the function.", "type": { "$id": "4309", "kind": "string", @@ -41122,6 +41945,7 @@ "kind": "property", "name": "arguments", "serializedName": "arguments", + "description": "The arguments passed to the function.", "type": { "$id": "4311", "kind": "string", @@ -41141,6 +41965,7 @@ "kind": "property", "name": "output", "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", "type": { "$id": "4313", "kind": "nullable", @@ -41232,6 +42057,7 @@ "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", "access": "public", "usage": "Output", + "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", "decorators": [], "properties": [ { @@ -41239,6 +42065,7 @@ "kind": "property", "name": "id", "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", "type": { "$id": "4317", "kind": "string", @@ -41258,6 +42085,7 @@ "kind": "property", "name": "object", "serializedName": "object", + "description": "The object type, which is always `thread.run.step.delta`.", "type": { "$id": "4319", "kind": "constant", @@ -41279,6 +42107,7 @@ "kind": "property", "name": "delta", "serializedName": "delta", + "description": "The delta containing the fields that have changed on the run step.", "type": { "$id": "4321", "kind": "model", @@ -41292,6 +42121,7 @@ "kind": "property", "name": "step_details", "serializedName": "step_details", + "description": "The details of the run step.", "type": { "$ref": "4228" }, @@ -41372,7 +42202,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -41442,6 +42272,7 @@ { "$id": "4335", "Name": "OpenAIClient", + "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", "Operations": [], "Protocol": { "$id": "4336" @@ -41451,6 +42282,7 @@ "$id": "4337", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4338", "kind": "url", @@ -41495,6 +42327,7 @@ "$id": "4343", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4344", "kind": "url", @@ -41552,6 +42385,7 @@ "$id": "4350", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4351", "kind": "constant", @@ -41613,6 +42447,7 @@ "$id": "4356", "Name": "transferEncoding", "NameInResponse": "Transfer-Encoding", + "Description": "chunked", "Type": { "$id": "4357", "kind": "string", @@ -41960,6 +42795,7 @@ "$id": "4390", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4391", "kind": "url", @@ -42017,6 +42853,7 @@ "$id": "4397", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4398", "kind": "constant", @@ -42129,6 +42966,7 @@ "$id": "4406", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4407", "kind": "int32", @@ -42150,6 +42988,7 @@ "$id": "4408", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "1033" }, @@ -42167,6 +43006,7 @@ "$id": "4409", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4410", "kind": "string", @@ -42188,6 +43028,7 @@ "$id": "4411", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4412", "kind": "string", @@ -42274,6 +43115,7 @@ "$id": "4418", "Name": "assistant_id", "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to retrieve.", "Type": { "$id": "4419", "kind": "string", @@ -42360,6 +43202,7 @@ "$id": "4425", "Name": "assistant_id", "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to modify.", "Type": { "$id": "4426", "kind": "string", @@ -42381,6 +43224,7 @@ "$id": "4427", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4428", "kind": "constant", @@ -42493,6 +43337,7 @@ "$id": "4436", "Name": "assistant_id", "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to delete.", "Type": { "$id": "4437", "kind": "string", @@ -42565,6 +43410,7 @@ "$id": "4442", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4443", "kind": "url", @@ -42622,6 +43468,7 @@ "$id": "4449", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4450", "kind": "constant", @@ -42734,6 +43581,7 @@ "$id": "4458", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4459", "kind": "string", @@ -42755,6 +43603,7 @@ "$id": "4460", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4461", "kind": "int32", @@ -42841,6 +43690,7 @@ "$id": "4467", "Name": "batch_id", "NameInRequest": "batch_id", + "Description": "The ID of the batch to retrieve.", "Type": { "$id": "4468", "kind": "string", @@ -42927,6 +43777,7 @@ "$id": "4474", "Name": "batch_id", "NameInRequest": "batch_id", + "Description": "The ID of the batch to cancel.", "Type": { "$id": "4475", "kind": "string", @@ -42999,6 +43850,7 @@ "$id": "4480", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4481", "kind": "url", @@ -43056,6 +43908,7 @@ "$id": "4487", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4488", "kind": "constant", @@ -43154,6 +44007,7 @@ "$id": "4495", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4496", "kind": "url", @@ -43211,6 +44065,7 @@ "$id": "4502", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4503", "kind": "constant", @@ -43309,6 +44164,7 @@ "$id": "4510", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4511", "kind": "url", @@ -43366,6 +44222,7 @@ "$id": "4517", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4518", "kind": "constant", @@ -43464,6 +44321,7 @@ "$id": "4525", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4526", "kind": "url", @@ -43633,6 +44491,7 @@ "$id": "4541", "Name": "purpose", "NameInRequest": "purpose", + "Description": "Only return files with the given purpose.", "Type": { "$id": "4542", "kind": "string", @@ -43719,6 +44578,7 @@ "$id": "4548", "Name": "file_id", "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", "Type": { "$id": "4549", "kind": "string", @@ -43805,6 +44665,7 @@ "$id": "4555", "Name": "file_id", "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", "Type": { "$id": "4556", "kind": "string", @@ -43891,6 +44752,7 @@ "$id": "4562", "Name": "file_id", "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", "Type": { "$id": "4563", "kind": "string", @@ -43968,6 +44830,7 @@ "$id": "4569", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4570", "kind": "url", @@ -44025,6 +44888,7 @@ "$id": "4576", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4577", "kind": "constant", @@ -44137,6 +45001,7 @@ "$id": "4585", "Name": "after", "NameInRequest": "after", + "Description": "Identifier for the last job from the previous pagination request.", "Type": { "$id": "4586", "kind": "string", @@ -44158,6 +45023,7 @@ "$id": "4587", "Name": "limit", "NameInRequest": "limit", + "Description": "Number of fine-tuning jobs to retrieve.", "Type": { "$id": "4588", "kind": "int32", @@ -44244,6 +45110,7 @@ "$id": "4594", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job.", "Type": { "$id": "4595", "kind": "string", @@ -44330,6 +45197,7 @@ "$id": "4601", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to cancel.", "Type": { "$id": "4602", "kind": "string", @@ -44416,6 +45284,7 @@ "$id": "4608", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get checkpoints for.", "Type": { "$id": "4609", "kind": "string", @@ -44437,6 +45306,7 @@ "$id": "4610", "Name": "after", "NameInRequest": "after", + "Description": "Identifier for the last checkpoint ID from the previous pagination request.", "Type": { "$id": "4611", "kind": "string", @@ -44458,6 +45328,7 @@ "$id": "4612", "Name": "limit", "NameInRequest": "limit", + "Description": "Number of checkpoints to retrieve.", "Type": { "$id": "4613", "kind": "int32", @@ -44544,6 +45415,7 @@ "$id": "4619", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get events for.", "Type": { "$id": "4620", "kind": "string", @@ -44565,6 +45437,7 @@ "$id": "4621", "Name": "after", "NameInRequest": "after", + "Description": "Identifier for the last event from the previous pagination request.", "Type": { "$id": "4622", "kind": "string", @@ -44586,6 +45459,7 @@ "$id": "4623", "Name": "limit", "NameInRequest": "limit", + "Description": "Number of events to retrieve.", "Type": { "$id": "4624", "kind": "int32", @@ -44658,6 +45532,7 @@ "$id": "4629", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4630", "kind": "url", @@ -44715,6 +45590,7 @@ "$id": "4636", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4637", "kind": "constant", @@ -45037,6 +45913,7 @@ "$id": "4662", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4663", "kind": "url", @@ -45094,6 +45971,7 @@ "$id": "4669", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", "Type": { "$id": "4670", "kind": "string", @@ -45115,6 +45993,7 @@ "$id": "4671", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4672", "kind": "constant", @@ -45227,6 +46106,7 @@ "$id": "4680", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", "Type": { "$id": "4681", "kind": "string", @@ -45248,6 +46128,7 @@ "$id": "4682", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4683", "kind": "int32", @@ -45269,6 +46150,7 @@ "$id": "4684", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "609" }, @@ -45286,6 +46168,7 @@ "$id": "4685", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4686", "kind": "string", @@ -45307,6 +46190,7 @@ "$id": "4687", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4688", "kind": "string", @@ -45393,6 +46277,7 @@ "$id": "4694", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", "Type": { "$id": "4695", "kind": "string", @@ -45414,6 +46299,7 @@ "$id": "4696", "Name": "message_id", "NameInRequest": "message_id", + "Description": "The ID of the message to retrieve.", "Type": { "$id": "4697", "kind": "string", @@ -45500,6 +46386,7 @@ "$id": "4703", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", "Type": { "$id": "4704", "kind": "string", @@ -45521,6 +46408,7 @@ "$id": "4705", "Name": "message_id", "NameInRequest": "message_id", + "Description": "The ID of the message to modify.", "Type": { "$id": "4706", "kind": "string", @@ -45542,6 +46430,7 @@ "$id": "4707", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4708", "kind": "constant", @@ -45654,6 +46543,7 @@ "$id": "4716", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", "Type": { "$id": "4717", "kind": "string", @@ -45675,6 +46565,7 @@ "$id": "4718", "Name": "message_id", "NameInRequest": "message_id", + "Description": "The ID of the message to delete.", "Type": { "$id": "4719", "kind": "string", @@ -45747,6 +46638,7 @@ "$id": "4724", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4725", "kind": "url", @@ -45869,6 +46761,7 @@ "$id": "4736", "Name": "model", "NameInRequest": "model", + "Description": "The ID of the model to use for this request.", "Type": { "$id": "4737", "kind": "string", @@ -45955,6 +46848,7 @@ "$id": "4743", "Name": "model", "NameInRequest": "model", + "Description": "The model to delete", "Type": { "$id": "4744", "kind": "string", @@ -46027,6 +46921,7 @@ "$id": "4749", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4750", "kind": "url", @@ -46084,6 +46979,7 @@ "$id": "4756", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4757", "kind": "constant", @@ -46182,6 +47078,7 @@ "$id": "4764", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4765", "kind": "url", @@ -46212,6 +47109,7 @@ "$id": "4768", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4769", "kind": "constant", @@ -46351,6 +47249,7 @@ "$id": "4781", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4782", "kind": "url", @@ -46408,6 +47307,7 @@ "$id": "4788", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4789", "kind": "constant", @@ -46520,6 +47420,7 @@ "$id": "4797", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to retrieve.", "Type": { "$id": "4798", "kind": "string", @@ -46606,6 +47507,7 @@ "$id": "4804", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", "Type": { "$id": "4805", "kind": "string", @@ -46627,6 +47529,7 @@ "$id": "4806", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4807", "kind": "constant", @@ -46739,6 +47642,7 @@ "$id": "4815", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to delete.", "Type": { "$id": "4816", "kind": "string", @@ -46811,6 +47715,7 @@ "$id": "4821", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4822", "kind": "url", @@ -46868,6 +47773,7 @@ "$id": "4828", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4829", "kind": "constant", @@ -46980,6 +47886,7 @@ "$id": "4837", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to run.", "Type": { "$id": "4838", "kind": "string", @@ -47001,6 +47908,7 @@ "$id": "4839", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4840", "kind": "constant", @@ -47113,6 +48021,7 @@ "$id": "4848", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread the run belongs to.", "Type": { "$id": "4849", "kind": "string", @@ -47134,6 +48043,7 @@ "$id": "4850", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4851", "kind": "int32", @@ -47155,6 +48065,7 @@ "$id": "4852", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "319" }, @@ -47172,6 +48083,7 @@ "$id": "4853", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4854", "kind": "string", @@ -47193,6 +48105,7 @@ "$id": "4855", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4856", "kind": "string", @@ -47279,6 +48192,7 @@ "$id": "4862", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { "$id": "4863", "kind": "string", @@ -47300,6 +48214,7 @@ "$id": "4864", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run to retrieve.", "Type": { "$id": "4865", "kind": "string", @@ -47386,6 +48301,7 @@ "$id": "4871", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", "Type": { "$id": "4872", "kind": "string", @@ -47407,6 +48323,7 @@ "$id": "4873", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run to modify.", "Type": { "$id": "4874", "kind": "string", @@ -47428,6 +48345,7 @@ "$id": "4875", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4876", "kind": "constant", @@ -47540,6 +48458,7 @@ "$id": "4884", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this run belongs.", "Type": { "$id": "4885", "kind": "string", @@ -47561,6 +48480,7 @@ "$id": "4886", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run to cancel.", "Type": { "$id": "4887", "kind": "string", @@ -47647,6 +48567,7 @@ "$id": "4893", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", "Type": { "$id": "4894", "kind": "string", @@ -47668,6 +48589,7 @@ "$id": "4895", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run that requires the tool output submission.", "Type": { "$id": "4896", "kind": "string", @@ -47689,6 +48611,7 @@ "$id": "4897", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4898", "kind": "constant", @@ -47801,6 +48724,7 @@ "$id": "4906", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread the run and run steps belong to.", "Type": { "$id": "4907", "kind": "string", @@ -47822,6 +48746,7 @@ "$id": "4908", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run the run steps belong to.", "Type": { "$id": "4909", "kind": "string", @@ -47843,6 +48768,7 @@ "$id": "4910", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4911", "kind": "int32", @@ -47864,6 +48790,7 @@ "$id": "4912", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "328" }, @@ -47881,6 +48808,7 @@ "$id": "4913", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4914", "kind": "string", @@ -47902,6 +48830,7 @@ "$id": "4915", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4916", "kind": "string", @@ -47988,6 +48917,7 @@ "$id": "4922", "Name": "thread_id", "NameInRequest": "thread_id", + "Description": "The ID of the thread to which the run and run step belongs.", "Type": { "$id": "4923", "kind": "string", @@ -48009,6 +48939,7 @@ "$id": "4924", "Name": "run_id", "NameInRequest": "run_id", + "Description": "The ID of the run to which the run step belongs.", "Type": { "$id": "4925", "kind": "string", @@ -48030,6 +48961,7 @@ "$id": "4926", "Name": "step_id", "NameInRequest": "step_id", + "Description": "The ID of the run step to retrieve.", "Type": { "$id": "4927", "kind": "string", @@ -48102,6 +49034,7 @@ "$id": "4932", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "4933", "kind": "url", @@ -48159,6 +49092,7 @@ "$id": "4939", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4940", "kind": "int32", @@ -48180,6 +49114,7 @@ "$id": "4941", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "55" }, @@ -48197,6 +49132,7 @@ "$id": "4942", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4943", "kind": "string", @@ -48218,6 +49154,7 @@ "$id": "4944", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4945", "kind": "string", @@ -48304,6 +49241,7 @@ "$id": "4951", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4952", "kind": "constant", @@ -48416,6 +49354,7 @@ "$id": "4960", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to retrieve.", "Type": { "$id": "4961", "kind": "string", @@ -48502,6 +49441,7 @@ "$id": "4967", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to modify.", "Type": { "$id": "4968", "kind": "string", @@ -48523,6 +49463,7 @@ "$id": "4969", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "4970", "kind": "constant", @@ -48635,6 +49576,7 @@ "$id": "4978", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to delete.", "Type": { "$id": "4979", "kind": "string", @@ -48721,6 +49663,7 @@ "$id": "4985", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the files belong to.", "Type": { "$id": "4986", "kind": "string", @@ -48742,6 +49685,7 @@ "$id": "4987", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "4988", "kind": "int32", @@ -48763,6 +49707,7 @@ "$id": "4989", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "81" }, @@ -48780,6 +49725,7 @@ "$id": "4990", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "4991", "kind": "string", @@ -48801,6 +49747,7 @@ "$id": "4992", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "4993", "kind": "string", @@ -48822,6 +49769,7 @@ "$id": "4994", "Name": "filter", "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", "Type": { "$ref": "87" }, @@ -48904,6 +49852,7 @@ "$id": "5000", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a File.", "Type": { "$id": "5001", "kind": "string", @@ -48925,6 +49874,7 @@ "$id": "5002", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5003", "kind": "constant", @@ -49037,6 +49987,7 @@ "$id": "5011", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", "Type": { "$id": "5012", "kind": "string", @@ -49058,6 +50009,7 @@ "$id": "5013", "Name": "file_id", "NameInRequest": "file_id", + "Description": "The ID of the file being retrieved.", "Type": { "$id": "5014", "kind": "string", @@ -49144,6 +50096,7 @@ "$id": "5020", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", "Type": { "$id": "5021", "kind": "string", @@ -49165,6 +50118,7 @@ "$id": "5022", "Name": "file_id", "NameInRequest": "file_id", + "Description": "The ID of the file to delete.", "Type": { "$id": "5023", "kind": "string", @@ -49251,6 +50205,7 @@ "$id": "5029", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a file batch.", "Type": { "$id": "5030", "kind": "string", @@ -49272,6 +50227,7 @@ "$id": "5031", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5032", "kind": "constant", @@ -49384,6 +50340,7 @@ "$id": "5040", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5041", "kind": "string", @@ -49405,6 +50362,7 @@ "$id": "5042", "Name": "batch_id", "NameInRequest": "batch_id", + "Description": "The ID of the file batch being retrieved.", "Type": { "$id": "5043", "kind": "string", @@ -49491,6 +50449,7 @@ "$id": "5049", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5050", "kind": "string", @@ -49512,6 +50471,7 @@ "$id": "5051", "Name": "batch_id", "NameInRequest": "batch_id", + "Description": "The ID of the file batch to cancel.", "Type": { "$id": "5052", "kind": "string", @@ -49598,6 +50558,7 @@ "$id": "5058", "Name": "vector_store_id", "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", "Type": { "$id": "5059", "kind": "string", @@ -49619,6 +50580,7 @@ "$id": "5060", "Name": "batch_id", "NameInRequest": "batch_id", + "Description": "The ID of the file batch that the files belong to.", "Type": { "$id": "5061", "kind": "string", @@ -49640,6 +50602,7 @@ "$id": "5062", "Name": "limit", "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "Type": { "$id": "5063", "kind": "int32", @@ -49661,6 +50624,7 @@ "$id": "5064", "Name": "order", "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "Type": { "$ref": "137" }, @@ -49678,6 +50642,7 @@ "$id": "5065", "Name": "after", "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "Type": { "$id": "5066", "kind": "string", @@ -49699,6 +50664,7 @@ "$id": "5067", "Name": "before", "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "Type": { "$id": "5068", "kind": "string", @@ -49720,6 +50686,7 @@ "$id": "5069", "Name": "filter", "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", "Type": { "$ref": "87" }, @@ -49788,6 +50755,7 @@ "$id": "5074", "Name": "endpoint", "NameInRequest": "endpoint", + "Description": "Service host", "Type": { "$id": "5075", "kind": "url", @@ -49845,6 +50813,7 @@ "$id": "5081", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5082", "kind": "constant", @@ -50111,6 +51080,7 @@ "$id": "5103", "Name": "contentType", "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", "Type": { "$id": "5104", "kind": "constant", diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index 935e61eff..3cd338145 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -7236,6 +7236,7 @@ components: type: array items: $ref: '#/components/schemas/AssistantObject' + readOnly: true first_id: type: string last_id: @@ -7357,6 +7358,7 @@ components: type: array items: $ref: '#/components/schemas/MessageObject' + readOnly: true first_id: type: string last_id: @@ -7411,6 +7413,7 @@ components: type: array items: $ref: '#/components/schemas/RunStepObject' + readOnly: true first_id: type: string last_id: @@ -7434,6 +7437,7 @@ components: type: array items: $ref: '#/components/schemas/RunObject' + readOnly: true first_id: type: string last_id: @@ -7457,6 +7461,7 @@ components: type: array items: $ref: '#/components/schemas/ThreadObject' + readOnly: true first_id: type: string last_id: @@ -7489,6 +7494,7 @@ components: type: array items: $ref: '#/components/schemas/VectorStoreFileObject' + readOnly: true first_id: type: string last_id: @@ -7512,6 +7518,7 @@ components: type: array items: $ref: '#/components/schemas/VectorStoreObject' + readOnly: true first_id: type: string last_id: diff --git a/.typespec/assistants/client.tsp b/.typespec/assistants/client.tsp index 1e238b5ec..390fb1146 100644 --- a/.typespec/assistants/client.tsp +++ b/.typespec/assistants/client.tsp @@ -10,3 +10,8 @@ using OpenAI; @@access(ToolResourcesFileSearchVectorStoreCreationHelper, Access.public); @@usage(ToolResourcesFileSearchVectorStoreCreationHelper, Usage.input); + +@@visibility(ListAssistantsResponse.data, "read"); +@@visibility(ListRunStepsResponse.data, "read"); +@@visibility(ListRunsResponse.data, "read"); + diff --git a/.typespec/messages/client.tsp b/.typespec/messages/client.tsp index fdf340460..f475b1753 100644 --- a/.typespec/messages/client.tsp +++ b/.typespec/messages/client.tsp @@ -63,3 +63,5 @@ using OpenAI; @@access(MessageDeltaContentTextAnnotationsFilePathObject, Access.public); @@usage(MessageDeltaContentTextAnnotationsFilePathObject, Usage.output); + +@@visibility(ListMessagesResponse.data, "read"); \ No newline at end of file diff --git a/.typespec/threads/client.tsp b/.typespec/threads/client.tsp index b1519d63c..53c643d6e 100644 --- a/.typespec/threads/client.tsp +++ b/.typespec/threads/client.tsp @@ -7,6 +7,7 @@ using OpenAI; @@access(ListThreadsResponse, Access.public); @@usage(ListThreadsResponse, Usage.output); +@@visibility(ListThreadsResponse.data, "read"); @@access(CreateThreadRequestToolResourcesFileSearchBase, Access.public); @@usage(CreateThreadRequestToolResourcesFileSearchBase, Usage.input); diff --git a/.typespec/vector-stores/client.tsp b/.typespec/vector-stores/client.tsp index 81c3d5c86..956e4c80c 100644 --- a/.typespec/vector-stores/client.tsp +++ b/.typespec/vector-stores/client.tsp @@ -11,3 +11,6 @@ using OpenAI; // TODO: Auto should only be an input. @@access(AutoChunkingStrategyResponseParam, Access.public); @@usage(AutoChunkingStrategyResponseParam, Usage.input | Usage.output); + +@@visibility(ListVectorStoresResponse.data, "read"); +@@visibility(ListVectorStoreFilesResponse.data, "read"); diff --git a/package-lock.json b/package-lock.json index 43e90127b..b251297e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -335,20 +335,20 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241016.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241016.1.tgz", - "integrity": "sha512-xtqOHefyXxFwVoOQgzndeJEzjYinO0GbHXZtvlVJmj1LUYziNV9ChXzaREFbpMZWOr+xrGnFX9l9jKTizcxKlQ==", + "version": "0.1.9-alpha.20241018.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241018.1.tgz", + "integrity": "sha512-CpRUgLcwmztK901ngNPxM3nb3c8gdlFkvNerL+0LFYf2nK0xrVTE2ydj+qpzSXNecGOJzVpUTrNYOo76yZ6bdQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", - "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0", - "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0", - "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0", - "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0", - "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0" + "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0 || ~0.48.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.47.1 <1.0.0 || ~0.48.0-0", + "@typespec/compiler": ">=0.61.2 <1.0.0 || ~0.62.0-0", + "@typespec/http": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/openapi": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/rest": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/versioning": ">=0.61.0 <1.0.0 || ~0.62.0-0" } }, "node_modules/@typespec/openapi": { From bbd48fe4a6cb0d293f9c82a3383204290e852063 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 18 Oct 2024 11:21:45 -0700 Subject: [PATCH 12/54] Delete tspCodeModel/Configuration.json --- .dotnet/Configuration.json | 8 - .dotnet/tspCodeModel.json | 51262 ----------------------------------- 2 files changed, 51270 deletions(-) delete mode 100644 .dotnet/Configuration.json delete mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json deleted file mode 100644 index 85fab5a06..000000000 --- a/.dotnet/Configuration.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "output-folder": ".", - "namespace": "OpenAI", - "library-name": "OpenAI", - "unreferenced-types-handling": "keepAll", - "use-model-reader-writer": true, - "disable-xml-docs": true -} diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json deleted file mode 100644 index 13ebc4362..000000000 --- a/.dotnet/tspCodeModel.json +++ /dev/null @@ -1,51262 +0,0 @@ -{ - "$id": "1", - "Name": "OpenAI", - "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "kind": "enum", - "name": "CreateUploadRequestPurpose", - "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "5", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "6", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "7", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "8", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "9", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "10", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "11", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "12", - "kind": "enum", - "name": "UploadStatus", - "crossLanguageDefinitionId": "Upload.status.anonymous", - "valueType": { - "$id": "13", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "14", - "kind": "enumvalue", - "name": "pending", - "value": "pending", - "valueType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "16", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "18", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "20", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "21", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "22", - "kind": "enum", - "name": "Upload_object", - "valueType": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "24", - "kind": "enumvalue", - "name": "upload", - "value": "upload", - "description": "upload", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Upload_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "25", - "kind": "enum", - "name": "OpenAIFile_object", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "27", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "26" - }, - "enumType": { - "$ref": "25" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The OpenAIFile_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "28", - "kind": "enum", - "name": "OpenAIFilePurpose", - "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", - "valueType": { - "$id": "29", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "30", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "32", - "kind": "enumvalue", - "name": "assistants_output", - "value": "assistants_output", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "34", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "35", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "36", - "kind": "enumvalue", - "name": "batch_output", - "value": "batch_output", - "valueType": { - "$id": "37", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "38", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "40", - "kind": "enumvalue", - "name": "fine-tune-results", - "value": "fine-tune-results", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "42", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "44", - "kind": "enum", - "name": "OpenAIFileStatus", - "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", - "valueType": { - "$id": "45", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "46", - "kind": "enumvalue", - "name": "uploaded", - "value": "uploaded", - "valueType": { - "$id": "47", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "48", - "kind": "enumvalue", - "name": "processed", - "value": "processed", - "valueType": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "50", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "51", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "52", - "kind": "enum", - "name": "UploadPart_object", - "valueType": { - "$id": "53", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "54", - "kind": "enumvalue", - "name": "upload.part", - "value": "upload.part", - "description": "upload.part", - "valueType": { - "$ref": "53" - }, - "enumType": { - "$ref": "52" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The UploadPart_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "55", - "kind": "enum", - "name": "ListVectorStoresRequestOrder", - "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "57", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - }, - { - "$id": "59", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "61", - "kind": "enum", - "name": "ListVectorStoresResponse_object", - "valueType": { - "$id": "62", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "63", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "62" - }, - "enumType": { - "$ref": "61" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoresResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "64", - "kind": "enum", - "name": "VectorStoreObject_object", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "66", - "kind": "enumvalue", - "name": "vector_store", - "value": "vector_store", - "description": "vector_store", - "valueType": { - "$ref": "65" - }, - "enumType": { - "$ref": "64" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "67", - "kind": "enum", - "name": "VectorStoreObjectStatus", - "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", - "valueType": { - "$id": "68", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "69", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "70", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "71", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "72", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "73", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "74", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "75", - "kind": "enum", - "name": "VectorStoreExpirationAfter_anchor", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "77", - "kind": "enumvalue", - "name": "last_active_at", - "value": "last_active_at", - "description": "last_active_at", - "valueType": { - "$ref": "76" - }, - "enumType": { - "$ref": "75" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreExpirationAfter_anchor", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "78", - "kind": "enum", - "name": "DeleteVectorStoreResponse_object", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "80", - "kind": "enumvalue", - "name": "vector_store.deleted", - "value": "vector_store.deleted", - "description": "vector_store.deleted", - "valueType": { - "$ref": "79" - }, - "enumType": { - "$ref": "78" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "81", - "kind": "enum", - "name": "ListVectorStoreFilesRequestOrder", - "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", - "valueType": { - "$id": "82", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "83", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "84", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - }, - { - "$id": "85", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "87", - "kind": "enum", - "name": "ListVectorStoreFilesFilter", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", - "valueType": { - "$id": "88", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "89", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "90", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "91", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "92", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "93", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "95", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "96", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "97", - "kind": "enum", - "name": "ListVectorStoreFilesResponse_object", - "valueType": { - "$id": "98", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "99", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "98" - }, - "enumType": { - "$ref": "97" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoreFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "100", - "kind": "enum", - "name": "VectorStoreFileObject_object", - "valueType": { - "$id": "101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "102", - "kind": "enumvalue", - "name": "vector_store.file", - "value": "vector_store.file", - "description": "vector_store.file", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "103", - "kind": "enum", - "name": "VectorStoreFileObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", - "valueType": { - "$id": "104", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "105", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "107", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "109", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "111", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "113", - "kind": "enum", - "name": "VectorStoreFileObjectLastErrorCode", - "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", - "valueType": { - "$id": "114", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "115", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "117", - "kind": "enumvalue", - "name": "unsupported_file", - "value": "unsupported_file", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "119", - "kind": "enumvalue", - "name": "invalid_file", - "value": "invalid_file", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "121", - "kind": "enum", - "name": "DeleteVectorStoreFileResponse_object", - "valueType": { - "$id": "122", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "123", - "kind": "enumvalue", - "name": "vector_store.file.deleted", - "value": "vector_store.file.deleted", - "description": "vector_store.file.deleted", - "valueType": { - "$ref": "122" - }, - "enumType": { - "$ref": "121" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "124", - "kind": "enum", - "name": "VectorStoreFileBatchObject_object", - "valueType": { - "$id": "125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "126", - "kind": "enumvalue", - "name": "vector_store.files_batch", - "value": "vector_store.files_batch", - "description": "vector_store.files_batch", - "valueType": { - "$ref": "125" - }, - "enumType": { - "$ref": "124" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileBatchObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "127", - "kind": "enum", - "name": "VectorStoreFileBatchObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", - "valueType": { - "$id": "128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "129", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "131", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "133", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "135", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "137", - "kind": "enum", - "name": "ListFilesInVectorStoreBatchRequestOrder", - "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", - "valueType": { - "$id": "138", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "139", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - }, - { - "$id": "141", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "143", - "kind": "enum", - "name": "CreateMessageRequestRole", - "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "145", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - }, - { - "$id": "147", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "149", - "kind": "enum", - "name": "FileSearchRankingOptionsRanker", - "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "151", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - }, - { - "$id": "153", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "valueType": { - "$id": "154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "155", - "kind": "enum", - "name": "AssistantToolsFileSearchTypeOnly_type", - "valueType": { - "$id": "156", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "157", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "description": "file_search", - "valueType": { - "$ref": "156" - }, - "enumType": { - "$ref": "155" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantToolsFileSearchTypeOnly_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "158", - "kind": "enum", - "name": "CreateThreadAndRunRequestModel", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", - "valueType": { - "$id": "159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "160", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "162", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "164", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "166", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "168", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "170", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "172", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "173", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "174", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "175", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "176", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "177", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "178", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "180", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "182", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "184", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "185", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "186", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "187", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "188", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "190", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "191", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "192", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "194", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "196", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "198", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "200", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "202", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "203", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "204", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "205", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "206", - "kind": "enum", - "name": "TruncationObjectType", - "crossLanguageDefinitionId": "TruncationObject.type.anonymous", - "valueType": { - "$id": "207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "208", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - }, - { - "$id": "210", - "kind": "enumvalue", - "name": "last_messages", - "value": "last_messages", - "valueType": { - "$id": "211", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "212", - "kind": "enum", - "name": "CreateThreadAndRunRequestToolChoice", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", - "valueType": { - "$id": "213", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "214", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "216", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "218", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "220", - "kind": "enum", - "name": "AssistantsNamedToolChoiceType", - "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", - "valueType": { - "$id": "221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "222", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "224", - "kind": "enumvalue", - "name": "code_interpreter", - "value": "code_interpreter", - "valueType": { - "$id": "225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "226", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "valueType": { - "$id": "227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "228", - "kind": "enum", - "name": "RunObject_object", - "valueType": { - "$id": "229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "230", - "kind": "enumvalue", - "name": "thread.run", - "value": "thread.run", - "description": "thread.run", - "valueType": { - "$ref": "229" - }, - "enumType": { - "$ref": "228" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "231", - "kind": "enum", - "name": "RunObjectStatus", - "crossLanguageDefinitionId": "RunObject.status.anonymous", - "valueType": { - "$id": "232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "233", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "235", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "237", - "kind": "enumvalue", - "name": "requires_action", - "value": "requires_action", - "valueType": { - "$id": "238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "239", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "241", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "243", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "245", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "247", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "249", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "251", - "kind": "enum", - "name": "RunObjectRequiredAction_type", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "253", - "kind": "enumvalue", - "name": "submit_tool_outputs", - "value": "submit_tool_outputs", - "description": "submit_tool_outputs", - "valueType": { - "$ref": "252" - }, - "enumType": { - "$ref": "251" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObjectRequiredAction_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "254", - "kind": "enum", - "name": "RunToolCallObject_type", - "valueType": { - "$id": "255", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "256", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "255" - }, - "enumType": { - "$ref": "254" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunToolCallObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "257", - "kind": "enum", - "name": "RunObjectLastErrorCode", - "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", - "valueType": { - "$id": "258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "259", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "261", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "263", - "kind": "enumvalue", - "name": "invalid_prompt", - "value": "invalid_prompt", - "valueType": { - "$id": "264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "265", - "kind": "enum", - "name": "RunObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "267", - "kind": "enumvalue", - "name": "max_completion_tokens", - "value": "max_completion_tokens", - "valueType": { - "$id": "268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - }, - { - "$id": "269", - "kind": "enumvalue", - "name": "max_prompt_tokens", - "value": "max_prompt_tokens", - "valueType": { - "$id": "270", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "271", - "kind": "enum", - "name": "CreateRunRequestModel", - "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", - "valueType": { - "$id": "272", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "273", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "274", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "275", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "277", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "278", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "279", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "280", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "281", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "282", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "283", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "284", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "285", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "287", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "289", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "291", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "292", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "293", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "294", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "295", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "297", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "298", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "299", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "300", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "301", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "303", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "305", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "306", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "307", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "308", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "309", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "311", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "313", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "315", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "316", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "317", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "319", - "kind": "enum", - "name": "ListRunsRequestOrder", - "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", - "valueType": { - "$id": "320", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "321", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "322", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - }, - { - "$id": "323", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "325", - "kind": "enum", - "name": "ListRunsResponse_object", - "valueType": { - "$id": "326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "327", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "326" - }, - "enumType": { - "$ref": "325" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "328", - "kind": "enum", - "name": "ListRunStepsRequestOrder", - "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", - "valueType": { - "$id": "329", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "330", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - }, - { - "$id": "332", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "333", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "334", - "kind": "enum", - "name": "ListRunStepsResponse_object", - "valueType": { - "$id": "335", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "336", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "335" - }, - "enumType": { - "$ref": "334" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunStepsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "337", - "kind": "enum", - "name": "RunStepObject_object", - "valueType": { - "$id": "338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "339", - "kind": "enumvalue", - "name": "thread.run.step", - "value": "thread.run.step", - "description": "thread.run.step", - "valueType": { - "$ref": "338" - }, - "enumType": { - "$ref": "337" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "340", - "kind": "enum", - "name": "RunStepObjectType", - "crossLanguageDefinitionId": "RunStepObject.type.anonymous", - "valueType": { - "$id": "341", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "342", - "kind": "enumvalue", - "name": "message_creation", - "value": "message_creation", - "valueType": { - "$id": "343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - }, - { - "$id": "344", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "345", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "346", - "kind": "enum", - "name": "RunStepObjectStatus", - "crossLanguageDefinitionId": "RunStepObject.status.anonymous", - "valueType": { - "$id": "347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "348", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "350", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "351", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "352", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "353", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "354", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "355", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "356", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "358", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "valueType": { - "$id": "359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "360", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "description": "default_2024_08_21", - "valueType": { - "$ref": "359" - }, - "enumType": { - "$ref": "358" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "361", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "valueType": { - "$id": "362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "363", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "362" - }, - "enumType": { - "$ref": "361" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "364", - "kind": "enum", - "name": "RunStepObjectLastErrorCode", - "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", - "valueType": { - "$id": "365", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "366", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - }, - { - "$id": "368", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "370", - "kind": "enum", - "name": "ThreadObject_object", - "valueType": { - "$id": "371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "372", - "kind": "enumvalue", - "name": "thread", - "value": "thread", - "description": "thread", - "valueType": { - "$ref": "371" - }, - "enumType": { - "$ref": "370" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ThreadObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "373", - "kind": "enum", - "name": "DeleteThreadResponse_object", - "valueType": { - "$id": "374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "375", - "kind": "enumvalue", - "name": "thread.deleted", - "value": "thread.deleted", - "description": "thread.deleted", - "valueType": { - "$ref": "374" - }, - "enumType": { - "$ref": "373" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteThreadResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "376", - "kind": "enum", - "name": "RealtimeRequestCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", - "valueType": { - "$id": "377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "378", - "kind": "enumvalue", - "name": "session_update", - "value": "session.update", - "valueType": { - "$id": "379", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "380", - "kind": "enumvalue", - "name": "input_audio_buffer_append", - "value": "input_audio_buffer.append", - "valueType": { - "$id": "381", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "382", - "kind": "enumvalue", - "name": "input_audio_buffer_commit", - "value": "input_audio_buffer.commit", - "valueType": { - "$id": "383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "384", - "kind": "enumvalue", - "name": "input_audio_buffer_clear", - "value": "input_audio_buffer.clear", - "valueType": { - "$id": "385", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "386", - "kind": "enumvalue", - "name": "item_create", - "value": "conversation.item.create", - "valueType": { - "$id": "387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "388", - "kind": "enumvalue", - "name": "item_delete", - "value": "conversation.item.delete", - "valueType": { - "$id": "389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "390", - "kind": "enumvalue", - "name": "item_truncate", - "value": "conversation.item.truncate", - "valueType": { - "$id": "391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "392", - "kind": "enumvalue", - "name": "response_create", - "value": "response.create", - "valueType": { - "$id": "393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "394", - "kind": "enumvalue", - "name": "response_cancel", - "value": "response.cancel", - "valueType": { - "$id": "395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "396", - "kind": "enum", - "name": "RealtimeRequestModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "398", - "kind": "enumvalue", - "name": "gpt_4o_realtime", - "value": "gpt-4o-realtime", - "valueType": { - "$id": "399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "396" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "400", - "kind": "enum", - "name": "RealtimeRequestSessionUpdateCommandSessionModality", - "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", - "valueType": { - "$id": "401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "402", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - }, - { - "$id": "404", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "406", - "kind": "enum", - "name": "RealtimeVoice", - "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", - "valueType": { - "$id": "407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "408", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "410", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "411", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "412", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "413", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "414", - "kind": "enum", - "name": "RealtimeAudioFormat", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", - "valueType": { - "$id": "415", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "416", - "kind": "enumvalue", - "name": "pcm16", - "value": "pcm16", - "valueType": { - "$id": "417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "418", - "kind": "enumvalue", - "name": "g711_ulaw", - "value": "g711_ulaw", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "420", - "kind": "enumvalue", - "name": "g711_alaw", - "value": "g711_alaw", - "valueType": { - "$id": "421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "422", - "kind": "enum", - "name": "RealtimeAudioInputTranscriptionModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", - "valueType": { - "$id": "423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "424", - "kind": "enumvalue", - "name": "whisper_1", - "value": "whisper-1", - "valueType": { - "$id": "425", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "422" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "426", - "kind": "enum", - "name": "RealtimeTurnDetectionType", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", - "valueType": { - "$id": "427", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "428", - "kind": "enumvalue", - "name": "server_vad", - "value": "server_vad", - "valueType": { - "$id": "429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "426" - }, - "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "430", - "kind": "enum", - "name": "RealtimeToolType", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", - "valueType": { - "$id": "431", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "432", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "430" - }, - "decorators": [] - } - ], - "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "434", - "kind": "enum", - "name": "RealtimeToolChoiceLiteral", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", - "valueType": { - "$id": "435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "436", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", - "decorators": [] - }, - { - "$id": "438", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "439", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call no tools whatsoever.", - "decorators": [] - }, - { - "$id": "440", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "441", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call at least one tool.", - "decorators": [] - } - ], - "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "442", - "kind": "enum", - "name": "RealtimeItemType", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", - "valueType": { - "$id": "443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "444", - "kind": "enumvalue", - "name": "message", - "value": "message", - "valueType": { - "$id": "445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "446", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "447", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "448", - "kind": "enumvalue", - "name": "function_call_output", - "value": "function_call_output", - "valueType": { - "$id": "449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "450", - "kind": "enum", - "name": "RealtimeMessageRole", - "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", - "valueType": { - "$id": "451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "452", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "454", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "455", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "456", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "458", - "kind": "enum", - "name": "RealtimeItemStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", - "valueType": { - "$id": "459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "460", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "462", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "464", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "466", - "kind": "enum", - "name": "RealtimeContentPartType", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", - "valueType": { - "$id": "467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "468", - "kind": "enumvalue", - "name": "input_text", - "value": "input_text", - "valueType": { - "$id": "469", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "470", - "kind": "enumvalue", - "name": "input_audio", - "value": "input_audio", - "valueType": { - "$id": "471", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "472", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "474", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "476", - "kind": "enum", - "name": "RealtimeResponseCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", - "valueType": { - "$id": "477", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "478", - "kind": "enumvalue", - "name": "session_created", - "value": "session.created", - "valueType": { - "$id": "479", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "480", - "kind": "enumvalue", - "name": "session_updated", - "value": "session.updated", - "valueType": { - "$id": "481", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "482", - "kind": "enumvalue", - "name": "item_created", - "value": "conversation.item.created", - "valueType": { - "$id": "483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "484", - "kind": "enumvalue", - "name": "item_deleted", - "value": "conversation.item.deleted", - "valueType": { - "$id": "485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "486", - "kind": "enumvalue", - "name": "item_truncated", - "value": "conversation.item.truncated", - "valueType": { - "$id": "487", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "488", - "kind": "enumvalue", - "name": "response_created", - "value": "response.created", - "valueType": { - "$id": "489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "490", - "kind": "enumvalue", - "name": "response_done", - "value": "response.done", - "valueType": { - "$id": "491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "492", - "kind": "enumvalue", - "name": "rate_limits_updated", - "value": "rate_limits.updated", - "valueType": { - "$id": "493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "494", - "kind": "enumvalue", - "name": "response_output_item_added", - "value": "response.output_item.added", - "valueType": { - "$id": "495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "496", - "kind": "enumvalue", - "name": "response_output_item_done", - "value": "response.output_item.done", - "valueType": { - "$id": "497", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "498", - "kind": "enumvalue", - "name": "response_content_part_added", - "value": "response.content_part.added", - "valueType": { - "$id": "499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "500", - "kind": "enumvalue", - "name": "response_content_part_done", - "value": "response.content_part.done", - "valueType": { - "$id": "501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "502", - "kind": "enumvalue", - "name": "response_audio_delta", - "value": "response.audio.delta", - "valueType": { - "$id": "503", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "504", - "kind": "enumvalue", - "name": "response_audio_done", - "value": "response.audio.done", - "valueType": { - "$id": "505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "506", - "kind": "enumvalue", - "name": "response_audio_transcript_delta", - "value": "response.audio_transcript.delta", - "valueType": { - "$id": "507", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "508", - "kind": "enumvalue", - "name": "response_audio_transcript_done", - "value": "response.audio_transcript.done", - "valueType": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "510", - "kind": "enumvalue", - "name": "response_text_delta", - "value": "response.text.delta", - "valueType": { - "$id": "511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "512", - "kind": "enumvalue", - "name": "response_text_done", - "value": "response.text.done", - "valueType": { - "$id": "513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "514", - "kind": "enumvalue", - "name": "response_function_call_arguments_delta", - "value": "response.function_call_arguments.delta", - "valueType": { - "$id": "515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "516", - "kind": "enumvalue", - "name": "response_function_call_arguments_done", - "value": "response.function_call_arguments.done", - "valueType": { - "$id": "517", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "518", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_started", - "value": "input_audio_buffer.speech_started", - "valueType": { - "$id": "519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "520", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_stopped", - "value": "input_audio_buffer.speech_stopped", - "valueType": { - "$id": "521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "522", - "kind": "enumvalue", - "name": "item_input_audio_transcription_completed", - "value": "conversation.item.input_audio_transcription.completed", - "valueType": { - "$id": "523", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "524", - "kind": "enumvalue", - "name": "item_input_audio_transcription_failed", - "value": "conversation.item.input_audio_transcription.failed", - "valueType": { - "$id": "525", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "526", - "kind": "enumvalue", - "name": "input_audio_buffer_committed", - "value": "input_audio_buffer.committed", - "valueType": { - "$id": "527", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "528", - "kind": "enumvalue", - "name": "input_audio_buffer_cleared", - "value": "input_audio_buffer.cleared", - "valueType": { - "$id": "529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "530", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "532", - "kind": "enum", - "name": "RealtimeResponseSession_object", - "valueType": { - "$id": "533", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "534", - "kind": "enumvalue", - "name": "realtime.session", - "value": "realtime.session", - "description": "realtime.session", - "valueType": { - "$ref": "533" - }, - "enumType": { - "$ref": "532" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseSession_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "535", - "kind": "enum", - "name": "RealtimeResponseItem_object", - "valueType": { - "$id": "536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "537", - "kind": "enumvalue", - "name": "realtime.item", - "value": "realtime.item", - "description": "realtime.item", - "valueType": { - "$ref": "536" - }, - "enumType": { - "$ref": "535" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseItem_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "538", - "kind": "enum", - "name": "RealtimeResponse_object", - "valueType": { - "$id": "539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "540", - "kind": "enumvalue", - "name": "realtime.response", - "value": "realtime.response", - "description": "realtime.response", - "valueType": { - "$ref": "539" - }, - "enumType": { - "$ref": "538" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "541", - "kind": "enum", - "name": "RealtimeResponseStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", - "valueType": { - "$id": "542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "543", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "544", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "545", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "546", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "547", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "549", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "550", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "551", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "552", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "553", - "kind": "enum", - "name": "RealtimeResponseCancelledStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", - "valueType": { - "$id": "554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "555", - "kind": "enumvalue", - "name": "turn_detected", - "value": "turn_detected", - "valueType": { - "$id": "556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - }, - { - "$id": "557", - "kind": "enumvalue", - "name": "client_cancelled", - "value": "client_cancelled", - "valueType": { - "$id": "558", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "559", - "kind": "enum", - "name": "RealtimeResponseIncompleteStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", - "valueType": { - "$id": "560", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "561", - "kind": "enumvalue", - "name": "max_output_tokens", - "value": "max_output_tokens", - "valueType": { - "$id": "562", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - }, - { - "$id": "563", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "564", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "565", - "kind": "enum", - "name": "CreateModerationRequestModel", - "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", - "valueType": { - "$id": "566", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "567", - "kind": "enumvalue", - "name": "text-moderation-latest", - "value": "text-moderation-latest", - "valueType": { - "$id": "568", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - }, - { - "$id": "569", - "kind": "enumvalue", - "name": "text-moderation-stable", - "value": "text-moderation-stable", - "valueType": { - "$id": "570", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "571", - "kind": "enum", - "name": "ListModelsResponse_object", - "valueType": { - "$id": "572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "573", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "572" - }, - "enumType": { - "$ref": "571" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListModelsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "574", - "kind": "enum", - "name": "Model_object", - "valueType": { - "$id": "575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "576", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "575" - }, - "enumType": { - "$ref": "574" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Model_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "577", - "kind": "enum", - "name": "DeleteModelResponse_object", - "valueType": { - "$id": "578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "579", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "578" - }, - "enumType": { - "$ref": "577" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteModelResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "580", - "kind": "enum", - "name": "MessageObject_object", - "valueType": { - "$id": "581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "582", - "kind": "enumvalue", - "name": "thread.message", - "value": "thread.message", - "description": "thread.message", - "valueType": { - "$ref": "581" - }, - "enumType": { - "$ref": "580" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "583", - "kind": "enum", - "name": "MessageObjectStatus", - "crossLanguageDefinitionId": "MessageObject.status.anonymous", - "valueType": { - "$id": "584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "585", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "587", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "588", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "589", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "591", - "kind": "enum", - "name": "MessageObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "593", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "595", - "kind": "enumvalue", - "name": "max_tokens", - "value": "max_tokens", - "valueType": { - "$id": "596", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "597", - "kind": "enumvalue", - "name": "run_cancelled", - "value": "run_cancelled", - "valueType": { - "$id": "598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "599", - "kind": "enumvalue", - "name": "run_expired", - "value": "run_expired", - "valueType": { - "$id": "600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "601", - "kind": "enumvalue", - "name": "run_failed", - "value": "run_failed", - "valueType": { - "$id": "602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "603", - "kind": "enum", - "name": "MessageObjectRole", - "crossLanguageDefinitionId": "MessageObject.role.anonymous", - "valueType": { - "$id": "604", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "605", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "606", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - }, - { - "$id": "607", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "609", - "kind": "enum", - "name": "ListMessagesRequestOrder", - "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", - "valueType": { - "$id": "610", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "611", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - }, - { - "$id": "613", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "615", - "kind": "enum", - "name": "ListMessagesResponse_object", - "valueType": { - "$id": "616", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "617", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "616" - }, - "enumType": { - "$ref": "615" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListMessagesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "618", - "kind": "enum", - "name": "DeleteMessageResponse_object", - "valueType": { - "$id": "619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "620", - "kind": "enumvalue", - "name": "thread.message.deleted", - "value": "thread.message.deleted", - "description": "thread.message.deleted", - "valueType": { - "$ref": "619" - }, - "enumType": { - "$ref": "618" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteMessageResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "621", - "kind": "enum", - "name": "CreateImageRequestModel", - "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", - "valueType": { - "$id": "622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "623", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - }, - { - "$id": "625", - "kind": "enumvalue", - "name": "dall-e-3", - "value": "dall-e-3", - "valueType": { - "$id": "626", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "627", - "kind": "enum", - "name": "CreateImageRequestQuality", - "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", - "valueType": { - "$id": "628", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "629", - "kind": "enumvalue", - "name": "standard", - "value": "standard", - "valueType": { - "$id": "630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - }, - { - "$id": "631", - "kind": "enumvalue", - "name": "hd", - "value": "hd", - "valueType": { - "$id": "632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "633", - "kind": "enum", - "name": "CreateImageRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", - "valueType": { - "$id": "634", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "635", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "636", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - }, - { - "$id": "637", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "639", - "kind": "enum", - "name": "CreateImageRequestSize", - "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", - "valueType": { - "$id": "640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "641", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "642", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "643", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "645", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "646", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "647", - "kind": "enumvalue", - "name": "1792x1024", - "value": "1792x1024", - "valueType": { - "$id": "648", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "649", - "kind": "enumvalue", - "name": "1024x1792", - "value": "1024x1792", - "valueType": { - "$id": "650", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "651", - "kind": "enum", - "name": "CreateImageRequestStyle", - "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", - "valueType": { - "$id": "652", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "653", - "kind": "enumvalue", - "name": "vivid", - "value": "vivid", - "valueType": { - "$id": "654", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - }, - { - "$id": "655", - "kind": "enumvalue", - "name": "natural", - "value": "natural", - "valueType": { - "$id": "656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "657", - "kind": "enum", - "name": "CreateImageEditRequestModel", - "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", - "valueType": { - "$id": "658", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "659", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "660", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "657" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "661", - "kind": "enum", - "name": "CreateImageEditRequestSize", - "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", - "valueType": { - "$id": "662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "663", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "665", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "666", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "667", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "669", - "kind": "enum", - "name": "CreateImageEditRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", - "valueType": { - "$id": "670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "671", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "672", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - }, - { - "$id": "673", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "674", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "675", - "kind": "enum", - "name": "CreateImageVariationRequestModel", - "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", - "valueType": { - "$id": "676", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "677", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "675" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "679", - "kind": "enum", - "name": "CreateImageVariationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", - "valueType": { - "$id": "680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "681", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - }, - { - "$id": "683", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "684", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "685", - "kind": "enum", - "name": "CreateImageVariationRequestSize", - "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", - "valueType": { - "$id": "686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "687", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "689", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "690", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "691", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "692", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "693", - "kind": "enum", - "name": "CreateFineTuningJobRequestModel", - "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", - "valueType": { - "$id": "694", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "695", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "697", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "698", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "699", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "700", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "701", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "703", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "705", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "703" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "707", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "708", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "709", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "710", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "707" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "711", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "712", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "713", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "714", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "711" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "715", - "kind": "enum", - "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "717", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "715" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "719", - "kind": "enum", - "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "720", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "721", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "722", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "719" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "723", - "kind": "enum", - "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "725", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "726", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "723" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "727", - "kind": "enum", - "name": "FineTuningJob_object", - "valueType": { - "$id": "728", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "729", - "kind": "enumvalue", - "name": "fine_tuning.job", - "value": "fine_tuning.job", - "description": "fine_tuning.job", - "valueType": { - "$ref": "728" - }, - "enumType": { - "$ref": "727" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJob_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "730", - "kind": "enum", - "name": "FineTuningJobStatus", - "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", - "valueType": { - "$id": "731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "732", - "kind": "enumvalue", - "name": "validating_files", - "value": "validating_files", - "valueType": { - "$id": "733", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "734", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "736", - "kind": "enumvalue", - "name": "running", - "value": "running", - "valueType": { - "$id": "737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "738", - "kind": "enumvalue", - "name": "succeeded", - "value": "succeeded", - "valueType": { - "$id": "739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "740", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "741", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "742", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "743", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "744", - "kind": "enum", - "name": "ListPaginatedFineTuningJobsResponse_object", - "valueType": { - "$id": "745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "746", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "745" - }, - "enumType": { - "$ref": "744" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListPaginatedFineTuningJobsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "747", - "kind": "enum", - "name": "FineTuningJobCheckpoint_object", - "valueType": { - "$id": "748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "749", - "kind": "enumvalue", - "name": "fine_tuning.job.checkpoint", - "value": "fine_tuning.job.checkpoint", - "description": "fine_tuning.job.checkpoint", - "valueType": { - "$ref": "748" - }, - "enumType": { - "$ref": "747" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobCheckpoint_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "750", - "kind": "enum", - "name": "ListFineTuningJobCheckpointsResponse_object", - "valueType": { - "$id": "751", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "752", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "751" - }, - "enumType": { - "$ref": "750" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobCheckpointsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "753", - "kind": "enum", - "name": "FineTuningJobEventLevel", - "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", - "valueType": { - "$id": "754", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "755", - "kind": "enumvalue", - "name": "info", - "value": "info", - "valueType": { - "$id": "756", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "757", - "kind": "enumvalue", - "name": "warn", - "value": "warn", - "valueType": { - "$id": "758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "759", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "760", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "761", - "kind": "enum", - "name": "FineTuningJobEvent_object", - "valueType": { - "$id": "762", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "763", - "kind": "enumvalue", - "name": "fine_tuning.job.event", - "value": "fine_tuning.job.event", - "description": "fine_tuning.job.event", - "valueType": { - "$ref": "762" - }, - "enumType": { - "$ref": "761" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobEvent_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "764", - "kind": "enum", - "name": "ListFineTuningJobEventsResponse_object", - "valueType": { - "$id": "765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "766", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "765" - }, - "enumType": { - "$ref": "764" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobEventsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "767", - "kind": "enum", - "name": "CreateFileRequestPurpose", - "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", - "valueType": { - "$id": "768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "769", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "771", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "772", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "773", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "774", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "775", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "777", - "kind": "enum", - "name": "ListFilesResponse_object", - "valueType": { - "$id": "778", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "779", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "778" - }, - "enumType": { - "$ref": "777" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "780", - "kind": "enum", - "name": "DeleteFileResponse_object", - "valueType": { - "$id": "781", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "782", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "781" - }, - "enumType": { - "$ref": "780" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "783", - "kind": "enum", - "name": "CreateEmbeddingRequestModel", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", - "valueType": { - "$id": "784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "785", - "kind": "enumvalue", - "name": "text-embedding-ada-002", - "value": "text-embedding-ada-002", - "valueType": { - "$id": "786", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "787", - "kind": "enumvalue", - "name": "text-embedding-3-small", - "value": "text-embedding-3-small", - "valueType": { - "$id": "788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "789", - "kind": "enumvalue", - "name": "text-embedding-3-large", - "value": "text-embedding-3-large", - "valueType": { - "$id": "790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "791", - "kind": "enum", - "name": "CreateEmbeddingRequestEncodingFormat", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", - "valueType": { - "$id": "792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "793", - "kind": "enumvalue", - "name": "float", - "value": "float", - "valueType": { - "$id": "794", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - }, - { - "$id": "795", - "kind": "enumvalue", - "name": "base64", - "value": "base64", - "valueType": { - "$id": "796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "797", - "kind": "enum", - "name": "Embedding_object", - "valueType": { - "$id": "798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "799", - "kind": "enumvalue", - "name": "embedding", - "value": "embedding", - "description": "embedding", - "valueType": { - "$ref": "798" - }, - "enumType": { - "$ref": "797" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Embedding_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "800", - "kind": "enum", - "name": "CreateEmbeddingResponse_object", - "valueType": { - "$id": "801", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "802", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "801" - }, - "enumType": { - "$ref": "800" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateEmbeddingResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "803", - "kind": "enum", - "name": "CreateCompletionRequestModel", - "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", - "valueType": { - "$id": "804", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "805", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-instruct", - "value": "gpt-3.5-turbo-instruct", - "valueType": { - "$id": "806", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "807", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "809", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "810", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "811", - "kind": "enum", - "name": "CreateCompletionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "813", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "815", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "817", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "818", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "819", - "kind": "enum", - "name": "CreateCompletionResponse_object", - "valueType": { - "$id": "820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "821", - "kind": "enumvalue", - "name": "text_completion", - "value": "text_completion", - "description": "text_completion", - "valueType": { - "$ref": "820" - }, - "enumType": { - "$ref": "819" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "822", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartText_type", - "valueType": { - "$id": "823", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "824", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "823" - }, - "enumType": { - "$ref": "822" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartText_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "825", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImage_type", - "valueType": { - "$id": "826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "827", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "826" - }, - "enumType": { - "$ref": "825" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartImage_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "828", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", - "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", - "valueType": { - "$id": "829", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "830", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "832", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "833", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "834", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "836", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartRefusal_type", - "valueType": { - "$id": "837", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "838", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "837" - }, - "enumType": { - "$ref": "836" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartRefusal_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "839", - "kind": "enum", - "name": "ChatCompletionMessageToolCall_type", - "valueType": { - "$id": "840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "841", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "840" - }, - "enumType": { - "$ref": "839" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCall_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "842", - "kind": "enum", - "name": "CreateChatCompletionRequestModel", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", - "valueType": { - "$id": "843", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "844", - "kind": "enumvalue", - "name": "o1-preview", - "value": "o1-preview", - "valueType": { - "$id": "845", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "846", - "kind": "enumvalue", - "name": "o1-preview-2024-09-12", - "value": "o1-preview-2024-09-12", - "valueType": { - "$id": "847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "848", - "kind": "enumvalue", - "name": "o1-mini", - "value": "o1-mini", - "valueType": { - "$id": "849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "850", - "kind": "enumvalue", - "name": "o1-mini-2024-09-12", - "value": "o1-mini-2024-09-12", - "valueType": { - "$id": "851", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "852", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "853", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "854", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "856", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "858", - "kind": "enumvalue", - "name": "chatgpt-4o-latest", - "value": "chatgpt-4o-latest", - "valueType": { - "$id": "859", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "860", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "862", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "864", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "866", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "867", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "868", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "870", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "872", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "874", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "876", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "878", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "880", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "881", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "882", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "884", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "886", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "888", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "890", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "891", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "892", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0301", - "value": "gpt-3.5-turbo-0301", - "valueType": { - "$id": "893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "894", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "895", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "896", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "897", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "898", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "900", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "902", - "kind": "enum", - "name": "CreateChatCompletionRequestServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", - "valueType": { - "$id": "903", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "904", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - }, - { - "$id": "906", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "908", - "kind": "enum", - "name": "ChatCompletionTool_type", - "valueType": { - "$id": "909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "910", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "909" - }, - "enumType": { - "$ref": "908" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionTool_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "911", - "kind": "enum", - "name": "CreateChatCompletionRequestToolChoice", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", - "valueType": { - "$id": "912", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "913", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "915", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "917", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "918", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "919", - "kind": "enum", - "name": "ChatCompletionNamedToolChoice_type", - "valueType": { - "$id": "920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "921", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "920" - }, - "enumType": { - "$ref": "919" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionNamedToolChoice_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "922", - "kind": "enum", - "name": "CreateChatCompletionResponseChoiceFinishReason1", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "924", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "926", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "928", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "929", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "930", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "932", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "934", - "kind": "enum", - "name": "ChatCompletionResponseMessage_role", - "valueType": { - "$id": "935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "936", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "935" - }, - "enumType": { - "$ref": "934" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionResponseMessage_role", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "937", - "kind": "enum", - "name": "CreateChatCompletionResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", - "valueType": { - "$id": "938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "939", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - }, - { - "$id": "941", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "942", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "943", - "kind": "enum", - "name": "CreateChatCompletionResponse_object", - "valueType": { - "$id": "944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "945", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "944" - }, - "enumType": { - "$ref": "943" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "946", - "kind": "enum", - "name": "CreateBatchRequestEndpoint", - "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", - "valueType": { - "$id": "947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "948", - "kind": "enumvalue", - "name": "/v1/chat/completions", - "value": "/v1/chat/completions", - "valueType": { - "$id": "949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - }, - { - "$id": "950", - "kind": "enumvalue", - "name": "/v1/embeddings", - "value": "/v1/embeddings", - "valueType": { - "$id": "951", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "952", - "kind": "enum", - "name": "CreateBatchRequest_completion_window", - "valueType": { - "$id": "953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "954", - "kind": "enumvalue", - "name": "24h", - "value": "24h", - "description": "24h", - "valueType": { - "$ref": "953" - }, - "enumType": { - "$ref": "952" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateBatchRequest_completion_window", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "955", - "kind": "enum", - "name": "Batch_object", - "valueType": { - "$id": "956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "957", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "description": "batch", - "valueType": { - "$ref": "956" - }, - "enumType": { - "$ref": "955" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Batch_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "958", - "kind": "enum", - "name": "BatchErrors_object", - "valueType": { - "$id": "959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "960", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "959" - }, - "enumType": { - "$ref": "958" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchErrors_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "961", - "kind": "enum", - "name": "BatchStatus", - "crossLanguageDefinitionId": "Batch.status.anonymous", - "valueType": { - "$id": "962", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "963", - "kind": "enumvalue", - "name": "validating", - "value": "validating", - "valueType": { - "$id": "964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "965", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "967", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "969", - "kind": "enumvalue", - "name": "finalizing", - "value": "finalizing", - "valueType": { - "$id": "970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "971", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "972", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "973", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "974", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "975", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "977", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "978", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "979", - "kind": "enum", - "name": "ListBatchesResponse_object", - "valueType": { - "$id": "980", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "981", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "980" - }, - "enumType": { - "$ref": "979" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListBatchesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "982", - "kind": "enum", - "name": "CreateAssistantRequestModel", - "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", - "valueType": { - "$id": "983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "984", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "986", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "987", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "988", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "989", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "990", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "992", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "994", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "995", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "996", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "998", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1000", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "1001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1002", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "1003", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1004", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "1005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1006", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "1007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1008", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "1009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1010", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "1011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1012", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "1013", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1014", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "1015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1016", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "1017", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1018", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "1019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1020", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "1021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1022", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "1023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1024", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "1025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1026", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "1027", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1028", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "1029", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1030", - "kind": "enum", - "name": "AssistantObject_object", - "valueType": { - "$id": "1031", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1032", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "1031" - }, - "enumType": { - "$ref": "1030" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1033", - "kind": "enum", - "name": "ListAssistantsRequestOrder", - "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", - "valueType": { - "$id": "1034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1035", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "1036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - }, - { - "$id": "1037", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "1038", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1039", - "kind": "enum", - "name": "ListAssistantsResponse_object", - "valueType": { - "$id": "1040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1041", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1040" - }, - "enumType": { - "$ref": "1039" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListAssistantsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1042", - "kind": "enum", - "name": "DeleteAssistantResponse_object", - "valueType": { - "$id": "1043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1044", - "kind": "enumvalue", - "name": "assistant.deleted", - "value": "assistant.deleted", - "description": "assistant.deleted", - "valueType": { - "$ref": "1043" - }, - "enumType": { - "$ref": "1042" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteAssistantResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1045", - "kind": "enum", - "name": "CreateSpeechRequestModel", - "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", - "valueType": { - "$id": "1046", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1047", - "kind": "enumvalue", - "name": "tts-1", - "value": "tts-1", - "valueType": { - "$id": "1048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - }, - { - "$id": "1049", - "kind": "enumvalue", - "name": "tts-1-hd", - "value": "tts-1-hd", - "valueType": { - "$id": "1050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1051", - "kind": "enum", - "name": "CreateSpeechRequestVoice", - "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", - "valueType": { - "$id": "1052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1053", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "1054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1055", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "1056", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1057", - "kind": "enumvalue", - "name": "fable", - "value": "fable", - "valueType": { - "$id": "1058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1059", - "kind": "enumvalue", - "name": "onyx", - "value": "onyx", - "valueType": { - "$id": "1060", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1061", - "kind": "enumvalue", - "name": "nova", - "value": "nova", - "valueType": { - "$id": "1062", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1063", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "1064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1065", - "kind": "enum", - "name": "CreateSpeechRequestResponseFormat", - "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", - "valueType": { - "$id": "1066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1067", - "kind": "enumvalue", - "name": "mp3", - "value": "mp3", - "valueType": { - "$id": "1068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1069", - "kind": "enumvalue", - "name": "opus", - "value": "opus", - "valueType": { - "$id": "1070", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1071", - "kind": "enumvalue", - "name": "aac", - "value": "aac", - "valueType": { - "$id": "1072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1073", - "kind": "enumvalue", - "name": "flac", - "value": "flac", - "valueType": { - "$id": "1074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1075", - "kind": "enumvalue", - "name": "wav", - "value": "wav", - "valueType": { - "$id": "1076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1077", - "kind": "enumvalue", - "name": "pcm", - "value": "pcm", - "valueType": { - "$id": "1078", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1079", - "kind": "enum", - "name": "CreateTranscriptionRequestModel", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", - "valueType": { - "$id": "1080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1081", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1082", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1079" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1083", - "kind": "enum", - "name": "CreateTranscriptionRequestResponseFormat1", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", - "valueType": { - "$id": "1084", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1085", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1087", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1089", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1091", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1093", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1095", - "kind": "enum", - "name": "CreateTranscriptionRequestTimestampGranularity", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", - "valueType": { - "$id": "1096", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1097", - "kind": "enumvalue", - "name": "word", - "value": "word", - "valueType": { - "$id": "1098", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - }, - { - "$id": "1099", - "kind": "enumvalue", - "name": "segment", - "value": "segment", - "valueType": { - "$id": "1100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1101", - "kind": "enum", - "name": "CreateTranscriptionResponseVerboseJson_task", - "valueType": { - "$id": "1102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1103", - "kind": "enumvalue", - "name": "transcribe", - "value": "transcribe", - "description": "transcribe", - "valueType": { - "$ref": "1102" - }, - "enumType": { - "$ref": "1101" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranscriptionResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1104", - "kind": "enum", - "name": "CreateTranslationRequestModel", - "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", - "valueType": { - "$id": "1105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1106", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1107", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1104" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1108", - "kind": "enum", - "name": "CreateTranslationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", - "valueType": { - "$id": "1109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1110", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1112", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1114", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1116", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1118", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1120", - "kind": "enum", - "name": "CreateTranslationResponseVerboseJson_task", - "valueType": { - "$id": "1121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1122", - "kind": "enumvalue", - "name": "translate", - "value": "translate", - "description": "translate", - "valueType": { - "$ref": "1121" - }, - "enumType": { - "$ref": "1120" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranslationResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1123", - "kind": "enum", - "name": "BatchRequestInput_method", - "valueType": { - "$id": "1124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1125", - "kind": "enumvalue", - "name": "POST", - "value": "POST", - "description": "POST", - "valueType": { - "$ref": "1124" - }, - "enumType": { - "$ref": "1123" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchRequestInput_method", - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1126", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1127", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1128", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1130", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1132", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1133", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1134", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1135", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1136", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponse_object", - "valueType": { - "$id": "1137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1138", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "1137" - }, - "enumType": { - "$ref": "1136" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionFunctionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1139", - "kind": "enum", - "name": "ChatCompletionMessageToolCallChunk_type", - "valueType": { - "$id": "1140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1141", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "1140" - }, - "enumType": { - "$ref": "1139" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCallChunk_type", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1142", - "kind": "enum", - "name": "ChatCompletionStreamResponseDeltaRole", - "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", - "valueType": { - "$id": "1143", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1144", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1145", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1146", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1148", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1149", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1150", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1152", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1153", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1154", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1156", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1158", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "1159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1160", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1162", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1164", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", - "valueType": { - "$id": "1165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1166", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "1167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - }, - { - "$id": "1168", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "1169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1170", - "kind": "enum", - "name": "CreateChatCompletionStreamResponse_object", - "valueType": { - "$id": "1171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1172", - "kind": "enumvalue", - "name": "chat.completion.chunk", - "value": "chat.completion.chunk", - "description": "chat.completion.chunk", - "valueType": { - "$ref": "1171" - }, - "enumType": { - "$ref": "1170" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionStreamResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1173", - "kind": "enum", - "name": "MessageDeltaContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1175", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1177", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1178", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1179", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1181", - "kind": "enum", - "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1183", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1185", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1186", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1187", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1189", - "kind": "enum", - "name": "MessageContentImageFileObject_type", - "valueType": { - "$id": "1190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1191", - "kind": "enumvalue", - "name": "image_file", - "value": "image_file", - "description": "image_file", - "valueType": { - "$ref": "1190" - }, - "enumType": { - "$ref": "1189" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageFileObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1192", - "kind": "enum", - "name": "MessageContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1194", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1196", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1198", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1200", - "kind": "enum", - "name": "MessageContentTextObject_type", - "valueType": { - "$id": "1201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1202", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1201" - }, - "enumType": { - "$ref": "1200" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1203", - "kind": "enum", - "name": "MessageContentRefusalObject_type", - "valueType": { - "$id": "1204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1205", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "1204" - }, - "enumType": { - "$ref": "1203" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentRefusalObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1206", - "kind": "enum", - "name": "MessageContentImageUrlObject_type", - "valueType": { - "$id": "1207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1208", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "1207" - }, - "enumType": { - "$ref": "1206" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageUrlObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1209", - "kind": "enum", - "name": "MessageContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1211", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1213", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1215", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1217", - "kind": "enum", - "name": "MessageDeltaObject_object", - "valueType": { - "$id": "1218", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1219", - "kind": "enumvalue", - "name": "thread.message.delta", - "value": "thread.message.delta", - "description": "thread.message.delta", - "valueType": { - "$ref": "1218" - }, - "enumType": { - "$ref": "1217" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1220", - "kind": "enum", - "name": "MessageDeltaObjectDeltaRole", - "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", - "valueType": { - "$id": "1221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1222", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - }, - { - "$id": "1224", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1226", - "kind": "enum", - "name": "MessageRequestContentTextObject_type", - "valueType": { - "$id": "1227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1228", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1227" - }, - "enumType": { - "$ref": "1226" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageRequestContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1229", - "kind": "enum", - "name": "RunStepDeltaObject_object", - "valueType": { - "$id": "1230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1231", - "kind": "enumvalue", - "name": "thread.run.step.delta", - "value": "thread.run.step.delta", - "description": "thread.run.step.delta", - "valueType": { - "$ref": "1230" - }, - "enumType": { - "$ref": "1229" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1232", - "kind": "enum", - "name": "ListThreadsResponse_object", - "valueType": { - "$id": "1233", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1234", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1233" - }, - "enumType": { - "$ref": "1232" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListThreadsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1235", - "kind": "enum", - "name": "ChatCompletionRole", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", - "valueType": { - "$id": "1236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1237", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1239", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1241", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1243", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1245", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "1246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - } - ], - "access": "public", - "description": "The role of the author of a message", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - } - ], - "Models": [ - { - "$id": "1247", - "kind": "model", - "name": "CreateUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1248", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to upload.", - "type": { - "$id": "1249", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" - }, - { - "$id": "1250", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", - "type": { - "$ref": "2" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" - }, - { - "$id": "1251", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The number of bytes in the file you are uploading.", - "type": { - "$id": "1252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" - }, - { - "$id": "1253", - "kind": "property", - "name": "mime_type", - "serializedName": "mime_type", - "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", - "type": { - "$id": "1254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" - } - ] - }, - { - "$id": "1255", - "kind": "model", - "name": "Upload", - "crossLanguageDefinitionId": "OpenAI.Upload", - "usage": "Output,Json", - "description": "The Upload object can accept byte chunks in the form of Parts.", - "decorators": [], - "properties": [ - { - "$id": "1256", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The Upload unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.id" - }, - { - "$id": "1258", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1259", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1260", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.created_at" - }, - { - "$id": "1261", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to be uploaded.", - "type": { - "$id": "1262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.filename" - }, - { - "$id": "1263", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The intended number of bytes to be uploaded.", - "type": { - "$id": "1264", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.bytes" - }, - { - "$id": "1265", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", - "type": { - "$id": "1266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.purpose" - }, - { - "$id": "1267", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the Upload.", - "type": { - "$ref": "12" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.status" - }, - { - "$id": "1268", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1269", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" - }, - { - "$id": "1271", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"upload\".", - "type": { - "$id": "1272", - "kind": "constant", - "valueType": { - "$ref": "22" - }, - "value": "upload", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.object" - }, - { - "$id": "1273", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The ready File object after the Upload is completed.", - "type": { - "$id": "1274", - "kind": "nullable", - "type": { - "$id": "1275", - "kind": "model", - "name": "OpenAIFile", - "crossLanguageDefinitionId": "OpenAI.OpenAIFile", - "usage": "Output,Json", - "description": "The `File` object represents a document that has been uploaded to OpenAI.", - "decorators": [], - "properties": [ - { - "$id": "1276", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The file identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "1277", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" - }, - { - "$id": "1278", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The size of the file, in bytes.", - "type": { - "$id": "1279", - "kind": "nullable", - "type": { - "$id": "1280", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" - }, - { - "$id": "1281", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the file was created.", - "type": { - "$id": "1282", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" - }, - { - "$id": "1284", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file.", - "type": { - "$id": "1285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" - }, - { - "$id": "1286", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `file`.", - "type": { - "$id": "1287", - "kind": "constant", - "valueType": { - "$ref": "25" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" - }, - { - "$id": "1288", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", - "type": { - "$ref": "28" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" - }, - { - "$id": "1289", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", - "type": { - "$ref": "44" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" - }, - { - "$id": "1290", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", - "type": { - "$id": "1291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.file" - } - ] - }, - { - "$ref": "1275" - }, - { - "$id": "1292", - "kind": "model", - "name": "ErrorResponse", - "crossLanguageDefinitionId": "OpenAI.ErrorResponse", - "usage": "Output,Error,Json", - "decorators": [], - "properties": [ - { - "$id": "1293", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "1294", - "kind": "model", - "name": "Error", - "crossLanguageDefinitionId": "OpenAI.Error", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1295", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "1296", - "kind": "nullable", - "type": { - "$id": "1297", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.code" - }, - { - "$id": "1298", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "1299", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.message" - }, - { - "$id": "1300", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "1301", - "kind": "nullable", - "type": { - "$id": "1302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.param" - }, - { - "$id": "1303", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.type" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" - } - ] - }, - { - "$ref": "1294" - }, - { - "$id": "1305", - "kind": "model", - "name": "AddUploadPartRequest", - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "1306", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The chunk of bytes for this Part.", - "type": { - "$id": "1307", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" - } - ] - }, - { - "$id": "1308", - "kind": "model", - "name": "UploadPart", - "crossLanguageDefinitionId": "OpenAI.UploadPart", - "usage": "Output,Json", - "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", - "decorators": [], - "properties": [ - { - "$id": "1309", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The upload Part unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.id" - }, - { - "$id": "1311", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Part was created.", - "type": { - "$id": "1312", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1313", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" - }, - { - "$id": "1314", - "kind": "property", - "name": "upload_id", - "serializedName": "upload_id", - "description": "The ID of the Upload object that this Part was added to.", - "type": { - "$id": "1315", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" - }, - { - "$id": "1316", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `upload.part`.", - "type": { - "$id": "1317", - "kind": "constant", - "valueType": { - "$ref": "52" - }, - "value": "upload.part", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.object" - } - ] - }, - { - "$id": "1318", - "kind": "model", - "name": "CompleteUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1319", - "kind": "property", - "name": "part_ids", - "serializedName": "part_ids", - "description": "The ordered list of Part IDs.", - "type": { - "$id": "1320", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" - }, - { - "$id": "1322", - "kind": "property", - "name": "md5", - "serializedName": "md5", - "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", - "type": { - "$id": "1323", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" - } - ] - }, - { - "$id": "1324", - "kind": "model", - "name": "ListVectorStoresResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1326", - "kind": "constant", - "valueType": { - "$ref": "61" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" - }, - { - "$id": "1327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1328", - "kind": "array", - "name": "ArrayVectorStoreObject", - "valueType": { - "$id": "1329", - "kind": "model", - "name": "VectorStoreObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", - "usage": "Output,Json", - "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", - "decorators": [], - "properties": [ - { - "$id": "1330", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" - }, - { - "$id": "1332", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store`.", - "type": { - "$id": "1333", - "kind": "constant", - "valueType": { - "$ref": "64" - }, - "value": "vector_store", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" - }, - { - "$id": "1334", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store was created.", - "type": { - "$id": "1335", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1336", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" - }, - { - "$id": "1337", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" - }, - { - "$id": "1339", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total number of bytes used by the files in the vector store.", - "type": { - "$id": "1340", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" - }, - { - "$id": "1341", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1342", - "kind": "model", - "name": "VectorStoreObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1343", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1344", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1345", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been successfully processed.", - "type": { - "$id": "1346", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" - }, - { - "$id": "1347", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1348", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" - }, - { - "$id": "1349", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that were cancelled.", - "type": { - "$id": "1350", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1351", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1352", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" - }, - { - "$id": "1353", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", - "type": { - "$ref": "67" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" - }, - { - "$id": "1354", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1355", - "kind": "model", - "name": "VectorStoreExpirationAfter", - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", - "usage": "Input,Output,Json", - "description": "The expiration policy for a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1356", - "kind": "property", - "name": "anchor", - "serializedName": "anchor", - "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", - "type": { - "$id": "1357", - "kind": "constant", - "valueType": { - "$ref": "75" - }, - "value": "last_active_at", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" - }, - { - "$id": "1358", - "kind": "property", - "name": "days", - "serializedName": "days", - "description": "The number of days after the anchor time that the vector store will expire.", - "type": { - "$id": "1359", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" - }, - { - "$id": "1360", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the vector store will expire.", - "type": { - "$id": "1361", - "kind": "nullable", - "type": { - "$id": "1362", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1363", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" - }, - { - "$id": "1364", - "kind": "property", - "name": "last_active_at", - "serializedName": "last_active_at", - "description": "The Unix timestamp (in seconds) for when the vector store was last active.", - "type": { - "$id": "1365", - "kind": "nullable", - "type": { - "$id": "1366", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1367", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" - }, - { - "$id": "1368", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1369", - "kind": "nullable", - "type": { - "$id": "1370", - "kind": "dict", - "keyType": { - "$id": "1371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1372", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" - }, - { - "$id": "1373", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" - }, - { - "$id": "1375", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1376", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" - }, - { - "$id": "1377", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1378", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" - } - ] - }, - { - "$ref": "1329" - }, - { - "$ref": "1342" - }, - { - "$ref": "1355" - }, - { - "$id": "1379", - "kind": "model", - "name": "CreateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1380", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1381", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" - }, - { - "$id": "1383", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1384", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" - }, - { - "$id": "1385", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$ref": "1355" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" - }, - { - "$id": "1386", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1387", - "kind": "union", - "name": "CreateVectorStoreRequestChunkingStrategy", - "variantTypes": [ - { - "$id": "1388", - "kind": "model", - "name": "AutoChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", - "usage": "Input,Json", - "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$id": "1389", - "kind": "model", - "name": "FileChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1390", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" - }, - "properties": [ - { - "$ref": "1390" - } - ], - "discriminatedSubtypes": { - "$id": "1392", - "auto": { - "$ref": "1388" - }, - "static": { - "$id": "1393", - "kind": "model", - "name": "StaticChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", - "usage": "Input,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$ref": "1389" - }, - "properties": [ - { - "$id": "1394", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1395", - "kind": "constant", - "valueType": { - "$id": "1396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" - }, - { - "$id": "1397", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$id": "1398", - "kind": "model", - "name": "StaticChunkingStrategy", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1399", - "kind": "property", - "name": "max_chunk_size_tokens", - "serializedName": "max_chunk_size_tokens", - "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", - "type": { - "$id": "1400", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" - }, - { - "$id": "1401", - "kind": "property", - "name": "chunk_overlap_tokens", - "serializedName": "chunk_overlap_tokens", - "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", - "type": { - "$id": "1402", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" - } - ] - } - } - }, - "properties": [ - { - "$id": "1403", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `auto`.", - "type": { - "$id": "1404", - "kind": "constant", - "valueType": { - "$id": "1405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" - } - ] - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" - }, - { - "$id": "1406", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1407", - "kind": "nullable", - "type": { - "$id": "1408", - "kind": "dict", - "keyType": { - "$id": "1409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" - } - ] - }, - { - "$ref": "1388" - }, - { - "$ref": "1389" - }, - { - "$ref": "1393" - }, - { - "$ref": "1398" - }, - { - "$id": "1411", - "kind": "model", - "name": "UpdateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1412", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1413", - "kind": "nullable", - "type": { - "$id": "1414", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" - }, - { - "$id": "1415", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1416", - "kind": "nullable", - "type": { - "$ref": "1355" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" - }, - { - "$id": "1417", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1418", - "kind": "nullable", - "type": { - "$id": "1419", - "kind": "dict", - "keyType": { - "$id": "1420", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" - } - ] - }, - { - "$id": "1422", - "kind": "model", - "name": "DeleteVectorStoreResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1423", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" - }, - { - "$id": "1425", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1426", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" - }, - { - "$id": "1427", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1428", - "kind": "constant", - "valueType": { - "$ref": "78" - }, - "value": "vector_store.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" - } - ] - }, - { - "$id": "1429", - "kind": "model", - "name": "ListVectorStoreFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1430", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1431", - "kind": "constant", - "valueType": { - "$ref": "97" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" - }, - { - "$id": "1432", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1433", - "kind": "array", - "name": "ArrayVectorStoreFileObject", - "valueType": { - "$id": "1434", - "kind": "model", - "name": "VectorStoreFileObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", - "usage": "Output,Json", - "description": "A list of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1435", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1436", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" - }, - { - "$id": "1437", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file`.", - "type": { - "$id": "1438", - "kind": "constant", - "valueType": { - "$ref": "100" - }, - "value": "vector_store.file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" - }, - { - "$id": "1439", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", - "type": { - "$id": "1440", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" - }, - { - "$id": "1441", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store file was created.", - "type": { - "$id": "1442", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1443", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" - }, - { - "$id": "1444", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" - }, - { - "$id": "1446", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", - "type": { - "$ref": "103" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" - }, - { - "$id": "1447", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", - "type": { - "$id": "1448", - "kind": "nullable", - "type": { - "$id": "1449", - "kind": "model", - "name": "VectorStoreFileObjectLastError", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1450", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "113" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" - }, - { - "$id": "1451", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1452", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" - }, - { - "$id": "1453", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The strategy used to chunk the file.", - "type": { - "$id": "1454", - "kind": "union", - "name": "VectorStoreFileObjectChunkingStrategy", - "variantTypes": [ - { - "$id": "1455", - "kind": "model", - "name": "StaticChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$id": "1456", - "kind": "model", - "name": "FileChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1457", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1458", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" - }, - "properties": [ - { - "$ref": "1457" - } - ], - "discriminatedSubtypes": { - "$id": "1459", - "static": { - "$ref": "1455" - }, - "other": { - "$id": "1460", - "kind": "model", - "name": "OtherChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", - "discriminatorValue": "other", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1461", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `other`.", - "type": { - "$id": "1462", - "kind": "constant", - "valueType": { - "$id": "1463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "other", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" - } - ] - }, - "auto": { - "$id": "1464", - "kind": "model", - "name": "AutoChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1465", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1466", - "kind": "constant", - "valueType": { - "$id": "1467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" - } - ] - } - } - }, - "properties": [ - { - "$id": "1468", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1469", - "kind": "constant", - "valueType": { - "$id": "1470", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" - }, - { - "$id": "1471", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$ref": "1398" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" - } - ] - }, - { - "$ref": "1460" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" - }, - { - "$id": "1472", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" - }, - { - "$id": "1474", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" - }, - { - "$id": "1476", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1477", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" - } - ] - }, - { - "$ref": "1434" - }, - { - "$ref": "1449" - }, - { - "$ref": "1455" - }, - { - "$ref": "1456" - }, - { - "$ref": "1460" - }, - { - "$ref": "1464" - }, - { - "$id": "1478", - "kind": "model", - "name": "CreateVectorStoreFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1479", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1480", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" - }, - { - "$id": "1481", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1482", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" - } - ] - }, - { - "$id": "1483", - "kind": "model", - "name": "DeleteVectorStoreFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1484", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" - }, - { - "$id": "1486", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1487", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" - }, - { - "$id": "1488", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1489", - "kind": "constant", - "valueType": { - "$ref": "121" - }, - "value": "vector_store.file.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" - } - ] - }, - { - "$id": "1490", - "kind": "model", - "name": "CreateVectorStoreFileBatchRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1491", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1492", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" - }, - { - "$id": "1494", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1495", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" - } - ] - }, - { - "$id": "1496", - "kind": "model", - "name": "VectorStoreFileBatchObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", - "usage": "Output,Json", - "description": "A batch of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1497", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" - }, - { - "$id": "1499", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file_batch`.", - "type": { - "$id": "1500", - "kind": "constant", - "valueType": { - "$ref": "124" - }, - "value": "vector_store.files_batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" - }, - { - "$id": "1501", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", - "type": { - "$id": "1502", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1503", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" - }, - { - "$id": "1504", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" - }, - { - "$id": "1506", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", - "type": { - "$ref": "127" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" - }, - { - "$id": "1507", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1508", - "kind": "model", - "name": "VectorStoreFileBatchObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1509", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1510", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1511", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been processed.", - "type": { - "$id": "1512", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" - }, - { - "$id": "1513", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1514", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" - }, - { - "$id": "1515", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that where cancelled.", - "type": { - "$id": "1516", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1517", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1518", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" - } - ] - }, - { - "$ref": "1508" - }, - { - "$id": "1519", - "kind": "model", - "name": "CreateThreadAndRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1520", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" - }, - { - "$id": "1522", - "kind": "property", - "name": "thread", - "serializedName": "thread", - "description": "If no thread is provided, an empty thread will be created.", - "type": { - "$id": "1523", - "kind": "model", - "name": "CreateThreadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1524", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", - "type": { - "$id": "1525", - "kind": "array", - "name": "ArrayCreateMessageRequest", - "valueType": { - "$id": "1526", - "kind": "model", - "name": "CreateMessageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1527", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", - "type": { - "$ref": "143" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" - }, - { - "$id": "1528", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "1529", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$id": "1530", - "kind": "model", - "name": "MessageContent", - "crossLanguageDefinitionId": "OpenAI.MessageContent", - "access": "public", - "usage": "Input,Output,Json", - "description": "Represents a single piece of content in an Assistants API message.", - "decorators": [], - "properties": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" - }, - { - "$id": "1531", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they should be added to.", - "type": { - "$id": "1532", - "kind": "nullable", - "type": { - "$id": "1533", - "kind": "array", - "name": "CreateMessageRequestAttachments", - "valueType": { - "$id": "1534", - "kind": "model", - "name": "CreateMessageRequestAttachment", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1535", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "1536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" - }, - { - "$id": "1537", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "1538", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1539", - "kind": "union", - "name": "CreateMessageRequestAttachmentTool", - "variantTypes": [ - { - "$id": "1540", - "kind": "model", - "name": "AssistantToolsCode", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", - "usage": "Input,Output,Json", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$id": "1541", - "kind": "model", - "name": "AssistantToolDefinition", - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1542", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1543", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" - }, - "properties": [ - { - "$ref": "1542" - } - ], - "discriminatedSubtypes": { - "$id": "1544", - "code_interpreter": { - "$ref": "1540" - }, - "file_search": { - "$id": "1545", - "kind": "model", - "name": "AssistantToolsFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", - "usage": "Input,Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1546", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1547", - "kind": "constant", - "valueType": { - "$id": "1548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" - }, - { - "$id": "1549", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "Overrides for the file search tool.", - "type": { - "$id": "1550", - "kind": "model", - "name": "AssistantToolsFileSearchFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1551", - "kind": "property", - "name": "max_num_results", - "serializedName": "max_num_results", - "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "type": { - "$id": "1552", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" - }, - { - "$id": "1553", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1554", - "kind": "model", - "name": "FileSearchRankingOptions", - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", - "usage": "Input,Output,Json", - "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "decorators": [], - "properties": [ - { - "$id": "1555", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", - "type": { - "$ref": "149" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" - }, - { - "$id": "1556", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1557", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" - } - ] - }, - "function": { - "$id": "1558", - "kind": "model", - "name": "AssistantToolsFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", - "usage": "Input,Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1559", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `function`", - "type": { - "$id": "1560", - "kind": "constant", - "valueType": { - "$id": "1561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" - }, - { - "$id": "1562", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1563", - "kind": "model", - "name": "FunctionObject", - "crossLanguageDefinitionId": "OpenAI.FunctionObject", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1564", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "1565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" - }, - { - "$id": "1566", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" - }, - { - "$id": "1568", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "1569", - "kind": "model", - "name": "FunctionParameters", - "crossLanguageDefinitionId": "OpenAI.FunctionParameters", - "usage": "Input,Output,Json", - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", - "decorators": [], - "additionalProperties": { - "$id": "1570", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" - }, - { - "$id": "1571", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", - "type": { - "$id": "1572", - "kind": "nullable", - "type": { - "$id": "1573", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" - } - ] - } - } - }, - "properties": [ - { - "$id": "1574", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `code_interpreter`", - "type": { - "$id": "1575", - "kind": "constant", - "valueType": { - "$id": "1576", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" - } - ] - }, - { - "$id": "1577", - "kind": "model", - "name": "AssistantToolsFileSearchTypeOnly", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1578", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1579", - "kind": "constant", - "valueType": { - "$ref": "155" - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" - }, - { - "$id": "1580", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1581", - "kind": "nullable", - "type": { - "$id": "1582", - "kind": "dict", - "keyType": { - "$id": "1583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" - }, - { - "$id": "1585", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1586", - "kind": "nullable", - "type": { - "$id": "1587", - "kind": "model", - "name": "CreateThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1588", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1589", - "kind": "model", - "name": "CreateThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1590", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1591", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1593", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1594", - "kind": "model", - "name": "ToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1595", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1596", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1597", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" - }, - { - "$id": "1598", - "kind": "property", - "name": "vector_stores", - "serializedName": "vector_stores", - "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", - "type": { - "$id": "1599", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1600", - "kind": "model", - "name": "ToolResourcesFileSearchVectorStore", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1601", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", - "type": { - "$id": "1602", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" - }, - { - "$id": "1604", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1605", - "kind": "union", - "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" - }, - { - "$id": "1606", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1607", - "kind": "dict", - "keyType": { - "$id": "1608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" - }, - { - "$id": "1610", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1611", - "kind": "nullable", - "type": { - "$id": "1612", - "kind": "dict", - "keyType": { - "$id": "1613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" - }, - { - "$id": "1615", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1616", - "kind": "nullable", - "type": { - "$ref": "158" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" - }, - { - "$id": "1617", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1618", - "kind": "nullable", - "type": { - "$id": "1619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" - }, - { - "$id": "1620", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1621", - "kind": "nullable", - "type": { - "$id": "1622", - "kind": "array", - "name": "CreateThreadAndRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" - }, - { - "$id": "1623", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1624", - "kind": "nullable", - "type": { - "$id": "1625", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1626", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1627", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1628", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1629", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1631", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1632", - "kind": "model", - "name": "ToolResourcesFileSearchIdsOnly", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1633", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1634", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" - }, - { - "$id": "1636", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1637", - "kind": "nullable", - "type": { - "$id": "1638", - "kind": "dict", - "keyType": { - "$id": "1639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" - }, - { - "$id": "1641", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1642", - "kind": "nullable", - "type": { - "$id": "1643", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" - }, - { - "$id": "1644", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1645", - "kind": "nullable", - "type": { - "$id": "1646", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" - }, - { - "$id": "1647", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1648", - "kind": "nullable", - "type": { - "$id": "1649", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" - }, - { - "$id": "1650", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1651", - "kind": "nullable", - "type": { - "$id": "1652", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" - }, - { - "$id": "1653", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1654", - "kind": "nullable", - "type": { - "$id": "1655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" - }, - { - "$id": "1656", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1657", - "kind": "nullable", - "type": { - "$id": "1658", - "kind": "model", - "name": "TruncationObject", - "crossLanguageDefinitionId": "OpenAI.TruncationObject", - "usage": "Input,Output,Json", - "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", - "decorators": [], - "properties": [ - { - "$id": "1659", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", - "type": { - "$ref": "206" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" - }, - { - "$id": "1660", - "kind": "property", - "name": "last_messages", - "serializedName": "last_messages", - "description": "The number of most recent messages from the thread when constructing the context for the run.", - "type": { - "$id": "1661", - "kind": "nullable", - "type": { - "$id": "1662", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" - }, - { - "$id": "1663", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1664", - "kind": "nullable", - "type": { - "$id": "1665", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$id": "1666", - "kind": "model", - "name": "AssistantsNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", - "usage": "Input,Output,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", - "decorators": [], - "properties": [ - { - "$id": "1667", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. If type is `function`, the function name must be set", - "type": { - "$ref": "220" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" - }, - { - "$id": "1668", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1669", - "kind": "model", - "name": "AssistantsNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1670", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "1671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" - }, - { - "$id": "1672", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" - }, - { - "$id": "1674", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1675", - "kind": "nullable", - "type": { - "$id": "1676", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1677", - "kind": "constant", - "valueType": { - "$id": "1678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "1679", - "kind": "model", - "name": "ResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", - "usage": "Input,Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$id": "1680", - "kind": "model", - "name": "OmniTypedResponseFormat", - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1681", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" - }, - "properties": [ - { - "$ref": "1681" - } - ], - "discriminatedSubtypes": { - "$id": "1683", - "text": { - "$ref": "1679" - }, - "json_object": { - "$id": "1684", - "kind": "model", - "name": "ResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", - "usage": "Input,Output,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1685", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "1686", - "kind": "constant", - "valueType": { - "$id": "1687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "1688", - "kind": "model", - "name": "ResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", - "usage": "Input,Output,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1689", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "1690", - "kind": "constant", - "valueType": { - "$id": "1691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" - }, - { - "$id": "1692", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$id": "1693", - "kind": "model", - "name": "ResponseFormatJsonSchemaJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1694", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", - "type": { - "$id": "1695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" - }, - { - "$id": "1696", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" - }, - { - "$id": "1698", - "kind": "property", - "name": "schema", - "serializedName": "schema", - "type": { - "$id": "1699", - "kind": "model", - "name": "ResponseFormatJsonSchemaSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", - "usage": "Input,Output,Json", - "description": "The schema for the response format, described as a JSON Schema object.", - "decorators": [], - "additionalProperties": { - "$id": "1700", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" - }, - { - "$id": "1701", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", - "type": { - "$id": "1702", - "kind": "nullable", - "type": { - "$id": "1703", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "properties": [ - { - "$id": "1704", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "1705", - "kind": "constant", - "valueType": { - "$id": "1706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" - } - ] - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" - } - ] - }, - { - "$ref": "1523" - }, - { - "$ref": "1526" - }, - { - "$ref": "1530" - }, - { - "$ref": "1534" - }, - { - "$ref": "1540" - }, - { - "$ref": "1541" - }, - { - "$ref": "1545" - }, - { - "$ref": "1550" - }, - { - "$ref": "1554" - }, - { - "$ref": "1558" - }, - { - "$ref": "1563" - }, - { - "$ref": "1569" - }, - { - "$ref": "1577" - }, - { - "$ref": "1587" - }, - { - "$ref": "1589" - }, - { - "$ref": "1594" - }, - { - "$ref": "1600" - }, - { - "$ref": "1625" - }, - { - "$ref": "1627" - }, - { - "$ref": "1632" - }, - { - "$ref": "1658" - }, - { - "$ref": "1666" - }, - { - "$ref": "1669" - }, - { - "$ref": "1679" - }, - { - "$ref": "1680" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - }, - { - "$ref": "1693" - }, - { - "$ref": "1699" - }, - { - "$id": "1707", - "kind": "model", - "name": "RunObject", - "crossLanguageDefinitionId": "OpenAI.RunObject", - "usage": "Output,Json", - "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "1708", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.id" - }, - { - "$id": "1710", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run`.", - "type": { - "$id": "1711", - "kind": "constant", - "valueType": { - "$ref": "228" - }, - "value": "thread.run", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.object" - }, - { - "$id": "1712", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run was created.", - "type": { - "$id": "1713", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1714", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" - }, - { - "$id": "1715", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", - "type": { - "$id": "1716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" - }, - { - "$id": "1717", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", - "type": { - "$id": "1718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" - }, - { - "$id": "1719", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", - "type": { - "$ref": "231" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.status" - }, - { - "$id": "1720", - "kind": "property", - "name": "required_action", - "serializedName": "required_action", - "description": "Details on the action required to continue the run. Will be `null` if no action is required.", - "type": { - "$id": "1721", - "kind": "nullable", - "type": { - "$id": "1722", - "kind": "model", - "name": "RunObjectRequiredAction", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1723", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "For now, this is always `submit_tool_outputs`.", - "type": { - "$id": "1724", - "kind": "constant", - "valueType": { - "$ref": "251" - }, - "value": "submit_tool_outputs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" - }, - { - "$id": "1725", - "kind": "property", - "name": "submit_tool_outputs", - "serializedName": "submit_tool_outputs", - "description": "Details on the tool outputs needed for this run to continue.", - "type": { - "$id": "1726", - "kind": "model", - "name": "RunObjectRequiredActionSubmitToolOutputs", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1727", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "A list of the relevant tool calls.", - "type": { - "$id": "1728", - "kind": "array", - "name": "ArrayRunToolCallObject", - "valueType": { - "$id": "1729", - "kind": "model", - "name": "RunToolCallObject", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", - "usage": "Output,Json", - "description": "Tool call objects", - "decorators": [], - "properties": [ - { - "$id": "1730", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", - "type": { - "$id": "1731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" - }, - { - "$id": "1732", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call the output is required for. For now, this is always `function`.", - "type": { - "$id": "1733", - "kind": "constant", - "valueType": { - "$ref": "254" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" - }, - { - "$id": "1734", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function definition.", - "type": { - "$id": "1735", - "kind": "model", - "name": "RunToolCallObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1736", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "1737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" - }, - { - "$id": "1738", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments that the model expects you to pass to the function.", - "type": { - "$id": "1739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" - }, - { - "$id": "1740", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run. Will be `null` if there are no errors.", - "type": { - "$id": "1741", - "kind": "nullable", - "type": { - "$id": "1742", - "kind": "model", - "name": "RunObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1743", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", - "type": { - "$ref": "257" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" - }, - { - "$id": "1744", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" - }, - { - "$id": "1746", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the run will expire.", - "type": { - "$id": "1747", - "kind": "nullable", - "type": { - "$id": "1748", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1749", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" - }, - { - "$id": "1750", - "kind": "property", - "name": "started_at", - "serializedName": "started_at", - "description": "The Unix timestamp (in seconds) for when the run was started.", - "type": { - "$id": "1751", - "kind": "nullable", - "type": { - "$id": "1752", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1753", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" - }, - { - "$id": "1754", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run was cancelled.", - "type": { - "$id": "1755", - "kind": "nullable", - "type": { - "$id": "1756", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1757", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" - }, - { - "$id": "1758", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run failed.", - "type": { - "$id": "1759", - "kind": "nullable", - "type": { - "$id": "1760", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1761", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" - }, - { - "$id": "1762", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run was completed.", - "type": { - "$id": "1763", - "kind": "nullable", - "type": { - "$id": "1764", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1765", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" - }, - { - "$id": "1766", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", - "type": { - "$id": "1767", - "kind": "nullable", - "type": { - "$id": "1768", - "kind": "model", - "name": "RunObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1769", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", - "type": { - "$ref": "265" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" - }, - { - "$id": "1770", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1771", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.model" - }, - { - "$id": "1772", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" - }, - { - "$id": "1774", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1775", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tools" - }, - { - "$id": "1776", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1777", - "kind": "nullable", - "type": { - "$id": "1778", - "kind": "dict", - "keyType": { - "$id": "1779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1780", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" - }, - { - "$id": "1781", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "1782", - "kind": "nullable", - "type": { - "$id": "1783", - "kind": "model", - "name": "RunCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", - "decorators": [], - "properties": [ - { - "$id": "1784", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run.", - "type": { - "$id": "1785", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" - }, - { - "$id": "1786", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run.", - "type": { - "$id": "1787", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" - }, - { - "$id": "1788", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "1789", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.usage" - }, - { - "$id": "1790", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature used for this run. If not set, defaults to 1.", - "type": { - "$id": "1791", - "kind": "nullable", - "type": { - "$id": "1792", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" - }, - { - "$id": "1793", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", - "type": { - "$id": "1794", - "kind": "nullable", - "type": { - "$id": "1795", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" - }, - { - "$id": "1796", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", - "type": { - "$id": "1797", - "kind": "nullable", - "type": { - "$id": "1798", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" - }, - { - "$id": "1799", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens specified to have been used over the course of the run.", - "type": { - "$id": "1800", - "kind": "nullable", - "type": { - "$id": "1801", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" - }, - { - "$id": "1802", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1803", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" - }, - { - "$id": "1804", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1805", - "kind": "nullable", - "type": { - "$id": "1806", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" - }, - { - "$id": "1807", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1808", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" - }, - { - "$id": "1809", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1810", - "kind": "nullable", - "type": { - "$id": "1811", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1812", - "kind": "constant", - "valueType": { - "$id": "1813", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" - } - ] - }, - { - "$ref": "1722" - }, - { - "$ref": "1726" - }, - { - "$ref": "1729" - }, - { - "$ref": "1735" - }, - { - "$ref": "1742" - }, - { - "$ref": "1768" - }, - { - "$ref": "1783" - }, - { - "$id": "1814", - "kind": "model", - "name": "CreateRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1815", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" - }, - { - "$id": "1817", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1818", - "kind": "nullable", - "type": { - "$ref": "271" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" - }, - { - "$id": "1819", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1820", - "kind": "nullable", - "type": { - "$id": "1821", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" - }, - { - "$id": "1822", - "kind": "property", - "name": "additional_instructions", - "serializedName": "additional_instructions", - "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", - "type": { - "$id": "1823", - "kind": "nullable", - "type": { - "$id": "1824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" - }, - { - "$id": "1825", - "kind": "property", - "name": "additional_messages", - "serializedName": "additional_messages", - "description": "Adds additional messages to the thread before creating the run.", - "type": { - "$id": "1826", - "kind": "nullable", - "type": { - "$id": "1827", - "kind": "array", - "name": "CreateRunRequestAdditional_messages", - "valueType": { - "$ref": "1526" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" - }, - { - "$id": "1828", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1829", - "kind": "nullable", - "type": { - "$id": "1830", - "kind": "array", - "name": "CreateRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" - }, - { - "$id": "1831", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1832", - "kind": "nullable", - "type": { - "$id": "1833", - "kind": "dict", - "keyType": { - "$id": "1834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" - }, - { - "$id": "1836", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1837", - "kind": "nullable", - "type": { - "$id": "1838", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" - }, - { - "$id": "1839", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1840", - "kind": "nullable", - "type": { - "$id": "1841", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" - }, - { - "$id": "1842", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1843", - "kind": "nullable", - "type": { - "$id": "1844", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" - }, - { - "$id": "1845", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1846", - "kind": "nullable", - "type": { - "$id": "1847", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" - }, - { - "$id": "1848", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1849", - "kind": "nullable", - "type": { - "$id": "1850", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" - }, - { - "$id": "1851", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1852", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" - }, - { - "$id": "1853", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1854", - "kind": "nullable", - "type": { - "$id": "1855", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" - }, - { - "$id": "1856", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1857", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" - }, - { - "$id": "1858", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1859", - "kind": "nullable", - "type": { - "$id": "1860", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1861", - "kind": "constant", - "valueType": { - "$id": "1862", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" - } - ] - }, - { - "$id": "1863", - "kind": "model", - "name": "ListRunsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1864", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1865", - "kind": "constant", - "valueType": { - "$ref": "325" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" - }, - { - "$id": "1866", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1867", - "kind": "array", - "name": "ArrayRunObject", - "valueType": { - "$ref": "1707" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" - }, - { - "$id": "1868", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" - }, - { - "$id": "1870", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" - }, - { - "$id": "1872", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1873", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" - } - ] - }, - { - "$id": "1874", - "kind": "model", - "name": "ModifyRunRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1875", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1876", - "kind": "nullable", - "type": { - "$id": "1877", - "kind": "dict", - "keyType": { - "$id": "1878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" - } - ] - }, - { - "$id": "1880", - "kind": "model", - "name": "SubmitToolOutputsRunRequest", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1881", - "kind": "property", - "name": "tool_outputs", - "serializedName": "tool_outputs", - "description": "A list of tools for which the outputs are being submitted.", - "type": { - "$id": "1882", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1883", - "kind": "model", - "name": "SubmitToolOutputsRunRequestToolOutput", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1884", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", - "type": { - "$id": "1885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" - }, - { - "$id": "1886", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the tool call to be submitted to continue the run.", - "type": { - "$id": "1887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" - }, - { - "$id": "1888", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1889", - "kind": "nullable", - "type": { - "$id": "1890", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" - } - ] - }, - { - "$ref": "1883" - }, - { - "$id": "1891", - "kind": "model", - "name": "ListRunStepsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1892", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1893", - "kind": "constant", - "valueType": { - "$ref": "334" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" - }, - { - "$id": "1894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1895", - "kind": "array", - "name": "ArrayRunStepObject", - "valueType": { - "$id": "1896", - "kind": "model", - "name": "RunStepObject", - "crossLanguageDefinitionId": "OpenAI.RunStepObject", - "usage": "Output,Json", - "description": "Represents a step in execution of a run.", - "decorators": [], - "properties": [ - { - "$id": "1897", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "1898", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" - }, - { - "$id": "1899", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step`.", - "type": { - "$id": "1900", - "kind": "constant", - "valueType": { - "$ref": "337" - }, - "value": "thread.run.step", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" - }, - { - "$id": "1901", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run step was created.", - "type": { - "$id": "1902", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1903", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" - }, - { - "$id": "1904", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", - "type": { - "$id": "1905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" - }, - { - "$id": "1906", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "type": { - "$id": "1907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" - }, - { - "$id": "1908", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", - "type": { - "$id": "1909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" - }, - { - "$id": "1910", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", - "type": { - "$ref": "340" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" - }, - { - "$id": "1911", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", - "type": { - "$ref": "346" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" - }, - { - "$id": "1912", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$id": "1913", - "kind": "model", - "name": "RunStepObjectStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", - "usage": "Output,Json", - "description": "Abstractly represents a run step details object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1914", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1915", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" - }, - "properties": [ - { - "$ref": "1914" - } - ], - "discriminatedSubtypes": { - "$id": "1916", - "message_creation": { - "$id": "1917", - "kind": "model", - "name": "RunStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", - "usage": "Output,Json", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1918", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "1919", - "kind": "constant", - "valueType": { - "$id": "1920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" - }, - { - "$id": "1921", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "1922", - "kind": "model", - "name": "RunStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1923", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "1924", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "1925", - "kind": "model", - "name": "RunStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", - "usage": "Output,Json", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1926", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "1927", - "kind": "constant", - "valueType": { - "$id": "1928", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" - }, - { - "$id": "1929", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "1930", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "1931", - "kind": "model", - "name": "RunStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1932", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "1932" - } - ], - "discriminatedSubtypes": { - "$id": "1934", - "code_interpreter": { - "$id": "1935", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", - "usage": "Output,Json", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1936", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "1937", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "1938", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "1939", - "kind": "constant", - "valueType": { - "$id": "1940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "1941", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "1942", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1943", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "1944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "1945", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "1946", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "1947", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "1948", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "1948" - } - ], - "discriminatedSubtypes": { - "$id": "1950", - "logs": { - "$id": "1951", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", - "usage": "Output,Json", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1952", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "1953", - "kind": "constant", - "valueType": { - "$id": "1954", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "1955", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "1956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "1957", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", - "usage": "Output,Json", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1958", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "1959", - "kind": "constant", - "valueType": { - "$id": "1960", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "1961", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "1962", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1963", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "1964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "1965", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", - "usage": "Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1966", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1967", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "1968", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "1969", - "kind": "constant", - "valueType": { - "$id": "1970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "1971", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "1972", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1973", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1974", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "usage": "Output,Json", - "description": "The ranking options for the file search.", - "decorators": [], - "properties": [ - { - "$id": "1975", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker used for the file search.", - "type": { - "$id": "1976", - "kind": "constant", - "valueType": { - "$ref": "358" - }, - "value": "default_2024_08_21", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" - }, - { - "$id": "1977", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1978", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" - }, - { - "$id": "1979", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "The results of the file search.", - "type": { - "$id": "1980", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", - "valueType": { - "$id": "1981", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", - "usage": "Output,Json", - "description": "A result instance of the file search.", - "decorators": [], - "properties": [ - { - "$id": "1982", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that result was found in.", - "type": { - "$id": "1983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" - }, - { - "$id": "1984", - "kind": "property", - "name": "file_name", - "serializedName": "file_name", - "description": "The name of the file that result was found in.", - "type": { - "$id": "1985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" - }, - { - "$id": "1986", - "kind": "property", - "name": "score", - "serializedName": "score", - "description": "The score of the result. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1987", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" - }, - { - "$id": "1988", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", - "type": { - "$id": "1989", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1990", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1991", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content.", - "type": { - "$id": "1992", - "kind": "constant", - "valueType": { - "$ref": "361" - }, - "value": "text", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" - }, - { - "$id": "1993", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content of the file.", - "type": { - "$id": "1994", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "1995", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", - "usage": "Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1996", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "1998", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "1999", - "kind": "constant", - "valueType": { - "$id": "2000", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "2001", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "2002", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2003", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "2004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "2005", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "2006", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "2007", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "2008", - "kind": "nullable", - "type": { - "$id": "2009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" - }, - { - "$id": "2010", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run step. Will be `null` if there are no errors.", - "type": { - "$id": "2011", - "kind": "nullable", - "type": { - "$id": "2012", - "kind": "model", - "name": "RunStepObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2013", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "364" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" - }, - { - "$id": "2014", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "2015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" - }, - { - "$id": "2016", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", - "type": { - "$id": "2017", - "kind": "nullable", - "type": { - "$id": "2018", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2019", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" - }, - { - "$id": "2020", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", - "type": { - "$id": "2021", - "kind": "nullable", - "type": { - "$id": "2022", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2023", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" - }, - { - "$id": "2024", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run step failed.", - "type": { - "$id": "2025", - "kind": "nullable", - "type": { - "$id": "2026", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2027", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" - }, - { - "$id": "2028", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run step completed.", - "type": { - "$id": "2029", - "kind": "nullable", - "type": { - "$id": "2030", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" - }, - { - "$id": "2032", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2033", - "kind": "nullable", - "type": { - "$id": "2034", - "kind": "dict", - "keyType": { - "$id": "2035", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" - }, - { - "$id": "2037", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2038", - "kind": "nullable", - "type": { - "$id": "2039", - "kind": "model", - "name": "RunStepCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", - "decorators": [], - "properties": [ - { - "$id": "2040", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run step.", - "type": { - "$id": "2041", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" - }, - { - "$id": "2042", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run step.", - "type": { - "$id": "2043", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" - }, - { - "$id": "2044", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "2045", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" - }, - { - "$id": "2046", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2047", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" - }, - { - "$id": "2048", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2049", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" - }, - { - "$id": "2050", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2051", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" - } - ] - }, - { - "$ref": "1896" - }, - { - "$ref": "1913" - }, - { - "$ref": "1917" - }, - { - "$ref": "1922" - }, - { - "$ref": "1925" - }, - { - "$ref": "1931" - }, - { - "$ref": "1935" - }, - { - "$ref": "1942" - }, - { - "$ref": "1947" - }, - { - "$ref": "1951" - }, - { - "$ref": "1957" - }, - { - "$ref": "1962" - }, - { - "$ref": "1965" - }, - { - "$ref": "1972" - }, - { - "$ref": "1974" - }, - { - "$ref": "1981" - }, - { - "$ref": "1990" - }, - { - "$ref": "1995" - }, - { - "$ref": "2002" - }, - { - "$ref": "2012" - }, - { - "$ref": "2039" - }, - { - "$id": "2052", - "kind": "model", - "name": "ThreadObject", - "crossLanguageDefinitionId": "OpenAI.ThreadObject", - "usage": "Output,Json", - "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", - "decorators": [], - "properties": [ - { - "$id": "2053", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" - }, - { - "$id": "2055", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread`.", - "type": { - "$id": "2056", - "kind": "constant", - "valueType": { - "$ref": "370" - }, - "value": "thread", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" - }, - { - "$id": "2057", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the thread was created.", - "type": { - "$id": "2058", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2059", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" - }, - { - "$id": "2060", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2061", - "kind": "nullable", - "type": { - "$id": "2062", - "kind": "model", - "name": "ThreadObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2063", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2064", - "kind": "model", - "name": "ThreadObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2065", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2066", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2067", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2068", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "2069", - "kind": "model", - "name": "ThreadObjectToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2070", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", - "type": { - "$id": "2071", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" - }, - { - "$id": "2073", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2074", - "kind": "nullable", - "type": { - "$id": "2075", - "kind": "dict", - "keyType": { - "$id": "2076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" - } - ] - }, - { - "$ref": "2062" - }, - { - "$ref": "2064" - }, - { - "$ref": "2069" - }, - { - "$id": "2078", - "kind": "model", - "name": "ModifyThreadRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2079", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2080", - "kind": "nullable", - "type": { - "$id": "2081", - "kind": "model", - "name": "ModifyThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2082", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2083", - "kind": "model", - "name": "ModifyThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2084", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2085", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2087", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" - }, - { - "$id": "2088", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2089", - "kind": "nullable", - "type": { - "$id": "2090", - "kind": "dict", - "keyType": { - "$id": "2091", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" - } - ] - }, - { - "$ref": "2081" - }, - { - "$ref": "2083" - }, - { - "$id": "2093", - "kind": "model", - "name": "DeleteThreadResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2094", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2095", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" - }, - { - "$id": "2096", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2097", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" - }, - { - "$id": "2098", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2099", - "kind": "constant", - "valueType": { - "$ref": "373" - }, - "value": "thread.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" - } - ] - }, - { - "$id": "2100", - "kind": "model", - "name": "RealtimeRequestCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", - "usage": "Input,Json", - "description": "A base representation for messages sent by the client to the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2101", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "376" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" - }, - "properties": [ - { - "$ref": "2101" - }, - { - "$id": "2102", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2103", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2104", - "session.update": { - "$id": "2105", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", - "usage": "Input,Json", - "discriminatorValue": "session.update", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2106", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2107", - "kind": "constant", - "valueType": { - "$id": "2108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.update", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" - }, - { - "$id": "2109", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2110", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommandSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2111", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "396" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" - }, - { - "$id": "2112", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2113", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" - }, - { - "$id": "2114", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" - }, - { - "$id": "2115", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" - }, - { - "$id": "2117", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" - }, - { - "$id": "2118", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" - }, - { - "$id": "2119", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2120", - "kind": "model", - "name": "RealtimeAudioInputTranscriptionSettings", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2121", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "422" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" - }, - { - "$id": "2122", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$id": "2123", - "kind": "model", - "name": "RealtimeTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2124", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "426" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" - }, - "properties": [ - { - "$ref": "2124" - } - ], - "discriminatedSubtypes": { - "$id": "2125", - "server_vad": { - "$id": "2126", - "kind": "model", - "name": "RealtimeServerVadTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", - "usage": "Input,Output,Json", - "discriminatorValue": "server_vad", - "decorators": [], - "baseModel": { - "$ref": "2123" - }, - "properties": [ - { - "$id": "2127", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2128", - "kind": "constant", - "valueType": { - "$id": "2129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "server_vad", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" - }, - { - "$id": "2130", - "kind": "property", - "name": "threshold", - "serializedName": "threshold", - "type": { - "$id": "2131", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" - }, - { - "$id": "2132", - "kind": "property", - "name": "prefix_padding_ms", - "serializedName": "prefix_padding_ms", - "type": { - "$id": "2133", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" - }, - { - "$id": "2135", - "kind": "property", - "name": "silence_duration_ms", - "serializedName": "silence_duration_ms", - "type": { - "$id": "2136", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" - }, - { - "$id": "2138", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2139", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$id": "2140", - "kind": "model", - "name": "RealtimeTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeTool", - "usage": "Input,Output,Json", - "description": "The base representation of a realtime tool definition.", - "decorators": [], - "discriminatorProperty": { - "$id": "2141", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" - }, - "properties": [ - { - "$ref": "2141" - } - ], - "discriminatedSubtypes": { - "$id": "2142", - "function": { - "$id": "2143", - "kind": "model", - "name": "RealtimeFunctionTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", - "usage": "Input,Output,Json", - "description": "The definition of a function tool as used by the realtime endpoint.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2140" - }, - "properties": [ - { - "$id": "2144", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2145", - "kind": "constant", - "valueType": { - "$id": "2146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" - }, - { - "$id": "2147", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" - }, - { - "$id": "2149", - "kind": "property", - "name": "description", - "serializedName": "description", - "type": { - "$id": "2150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" - }, - { - "$id": "2151", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "2152", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" - }, - { - "$id": "2153", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2154", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$id": "2155", - "kind": "model", - "name": "RealtimeToolChoiceObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", - "usage": "Input,Output,Json", - "description": "A base representation for a realtime tool_choice selecting a named tool.", - "decorators": [], - "discriminatorProperty": { - "$id": "2156", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" - }, - "properties": [ - { - "$ref": "2156" - } - ], - "discriminatedSubtypes": { - "$id": "2157", - "function": { - "$id": "2158", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", - "usage": "Input,Output,Json", - "description": "The representation of a realtime tool_choice selecting a named function tool.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2155" - }, - "properties": [ - { - "$id": "2159", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2145" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" - }, - { - "$id": "2160", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "2161", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2162", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" - } - ] - } - } - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" - }, - { - "$id": "2164", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2165", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" - }, - { - "$id": "2166", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2167", - "kind": "union", - "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", - "variantTypes": [ - { - "$id": "2168", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2169", - "kind": "constant", - "valueType": { - "$id": "2170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" - } - ] - }, - "input_audio_buffer.append": { - "$id": "2171", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferAppendCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.append", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2172", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2173", - "kind": "constant", - "valueType": { - "$id": "2174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.append", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" - }, - { - "$id": "2175", - "kind": "property", - "name": "audio", - "serializedName": "audio", - "type": { - "$id": "2176", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" - } - ] - }, - "input_audio_buffer.commit": { - "$id": "2177", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferCommitCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.commit", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2178", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2179", - "kind": "constant", - "valueType": { - "$id": "2180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.commit", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" - } - ] - }, - "input_audio_buffer.clear": { - "$id": "2181", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferClearCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.clear", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2182", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2183", - "kind": "constant", - "valueType": { - "$id": "2184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.clear", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" - } - ] - }, - "conversation.item.create": { - "$id": "2185", - "kind": "model", - "name": "RealtimeRequestItemCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2186", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2187", - "kind": "constant", - "valueType": { - "$id": "2188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" - }, - { - "$id": "2189", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" - }, - { - "$id": "2191", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2192", - "kind": "model", - "name": "RealtimeRequestItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2193", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" - }, - "properties": [ - { - "$ref": "2193" - }, - { - "$id": "2194", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2196", - "message": { - "$id": "2197", - "kind": "model", - "name": "RealtimeRequestMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", - "usage": "Input,Json", - "discriminatorValue": "message", - "decorators": [], - "discriminatorProperty": { - "$id": "2198", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" - }, - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2199", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2200", - "kind": "constant", - "valueType": { - "$id": "2201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" - }, - { - "$ref": "2198" - }, - { - "$id": "2202", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" - } - ], - "discriminatedSubtypes": { - "$id": "2203", - "system": { - "$id": "2204", - "kind": "model", - "name": "RealtimeRequestSystemMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2205", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2206", - "kind": "constant", - "valueType": { - "$id": "2207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" - }, - { - "$id": "2208", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2209", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$id": "2210", - "kind": "model", - "name": "RealtimeRequestTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_text", - "decorators": [], - "baseModel": { - "$id": "2211", - "kind": "model", - "name": "RealtimeContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2212", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "466" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" - }, - "properties": [ - { - "$ref": "2212" - } - ], - "discriminatedSubtypes": { - "$id": "2213", - "input_text": { - "$ref": "2210" - }, - "input_audio": { - "$id": "2214", - "kind": "model", - "name": "RealtimeRequestAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2215", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2216", - "kind": "constant", - "valueType": { - "$id": "2217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" - }, - { - "$id": "2218", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" - } - ] - }, - "text": { - "$id": "2220", - "kind": "model", - "name": "RealtimeResponseTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", - "usage": "Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2221", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2222", - "kind": "constant", - "valueType": { - "$id": "2223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" - }, - { - "$id": "2224", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" - } - ] - }, - "audio": { - "$id": "2226", - "kind": "model", - "name": "RealtimeResponseAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", - "usage": "Output,Json", - "discriminatorValue": "audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2227", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2228", - "kind": "constant", - "valueType": { - "$id": "2229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" - }, - { - "$id": "2230", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2231", - "kind": "nullable", - "type": { - "$id": "2232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" - } - ] - } - } - }, - "properties": [ - { - "$id": "2233", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2234", - "kind": "constant", - "valueType": { - "$id": "2235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" - }, - { - "$id": "2236", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" - } - ] - }, - "user": { - "$id": "2238", - "kind": "model", - "name": "RealtimeRequestUserMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2239", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2240", - "kind": "constant", - "valueType": { - "$id": "2241", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" - }, - { - "$id": "2242", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2243", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2244", - "kind": "union", - "name": "RealtimeRequestUserMessageItemContent", - "variantTypes": [ - { - "$ref": "2210" - }, - { - "$ref": "2214" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" - } - ] - }, - "assistant": { - "$id": "2245", - "kind": "model", - "name": "RealtimeRequestAssistantMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2246", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2247", - "kind": "constant", - "valueType": { - "$id": "2248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" - }, - { - "$id": "2249", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2250", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$ref": "2210" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" - } - ] - } - } - }, - "function_call": { - "$id": "2251", - "kind": "model", - "name": "RealtimeRequestFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", - "usage": "Input,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2252", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2253", - "kind": "constant", - "valueType": { - "$id": "2254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" - }, - { - "$id": "2255", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" - }, - { - "$id": "2257", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" - }, - { - "$id": "2259", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" - }, - { - "$id": "2261", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2262", - "kind": "model", - "name": "RealtimeRequestFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", - "usage": "Input,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2263", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2264", - "kind": "constant", - "valueType": { - "$id": "2265", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call_output", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" - }, - { - "$id": "2266", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2267", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" - }, - { - "$id": "2268", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2269", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" - } - ] - }, - "conversation.item.delete": { - "$id": "2270", - "kind": "model", - "name": "RealtimeRequestItemDeleteCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.delete", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2271", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2272", - "kind": "constant", - "valueType": { - "$id": "2273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.delete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" - }, - { - "$id": "2274", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" - } - ] - }, - "conversation.item.truncate": { - "$id": "2276", - "kind": "model", - "name": "RealtimeRequestItemTruncateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.truncate", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2277", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2278", - "kind": "constant", - "valueType": { - "$id": "2279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" - }, - { - "$id": "2280", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" - }, - { - "$id": "2282", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" - }, - { - "$id": "2284", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2285", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" - } - ] - }, - "response.create": { - "$id": "2286", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", - "usage": "Input,Json", - "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", - "discriminatorValue": "response.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2287", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2288", - "kind": "constant", - "valueType": { - "$id": "2289", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" - }, - { - "$id": "2290", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2291", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommandResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2292", - "kind": "property", - "name": "commit", - "serializedName": "commit", - "type": { - "$id": "2293", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" - }, - { - "$id": "2294", - "kind": "property", - "name": "cancel_previous", - "serializedName": "cancel_previous", - "type": { - "$id": "2295", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" - }, - { - "$id": "2296", - "kind": "property", - "name": "append_input_items", - "serializedName": "append_input_items", - "type": { - "$id": "2297", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" - }, - { - "$id": "2298", - "kind": "property", - "name": "input_items", - "serializedName": "input_items", - "type": { - "$id": "2299", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" - }, - { - "$id": "2300", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2301", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" - }, - { - "$id": "2302", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2303", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" - }, - { - "$id": "2304", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" - }, - { - "$id": "2305", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2306", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" - }, - { - "$id": "2307", - "kind": "property", - "name": "max_output_tokens", - "serializedName": "max_output_tokens", - "type": { - "$id": "2308", - "kind": "nullable", - "type": { - "$id": "2309", - "kind": "union", - "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", - "variantTypes": [ - { - "$id": "2310", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2311", - "kind": "constant", - "valueType": { - "$id": "2312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" - }, - { - "$id": "2313", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2314", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" - }, - { - "$id": "2315", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2316", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" - }, - { - "$id": "2317", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" - } - ] - }, - "response.cancel": { - "$id": "2318", - "kind": "model", - "name": "RealtimeRequestResponseCancelCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", - "usage": "Input,Json", - "discriminatorValue": "response.cancel", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2319", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2320", - "kind": "constant", - "valueType": { - "$id": "2321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.cancel", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" - } - ] - } - } - }, - { - "$ref": "2105" - }, - { - "$ref": "2110" - }, - { - "$ref": "2120" - }, - { - "$ref": "2123" - }, - { - "$ref": "2126" - }, - { - "$ref": "2140" - }, - { - "$ref": "2143" - }, - { - "$ref": "2155" - }, - { - "$ref": "2158" - }, - { - "$ref": "2161" - }, - { - "$ref": "2171" - }, - { - "$ref": "2177" - }, - { - "$ref": "2181" - }, - { - "$ref": "2185" - }, - { - "$ref": "2192" - }, - { - "$ref": "2197" - }, - { - "$ref": "2204" - }, - { - "$ref": "2210" - }, - { - "$ref": "2211" - }, - { - "$ref": "2214" - }, - { - "$ref": "2220" - }, - { - "$ref": "2226" - }, - { - "$ref": "2238" - }, - { - "$ref": "2245" - }, - { - "$ref": "2251" - }, - { - "$ref": "2262" - }, - { - "$ref": "2270" - }, - { - "$ref": "2276" - }, - { - "$ref": "2286" - }, - { - "$ref": "2291" - }, - { - "$ref": "2318" - }, - { - "$id": "2322", - "kind": "model", - "name": "RealtimeResponseCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", - "usage": "Output,Json", - "description": "Base representation of a WebSocket message received from the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2323", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "476" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" - }, - "properties": [ - { - "$ref": "2323" - }, - { - "$id": "2324", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2325", - "kind": "nullable", - "type": { - "$id": "2326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2327", - "session.created": { - "$id": "2328", - "kind": "model", - "name": "RealtimeResponseSessionCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2329", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2330", - "kind": "constant", - "valueType": { - "$id": "2331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" - }, - { - "$id": "2332", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2333", - "kind": "model", - "name": "RealtimeResponseSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2334", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2335", - "kind": "constant", - "valueType": { - "$ref": "532" - }, - "value": "realtime.session", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" - }, - { - "$id": "2336", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2337", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" - }, - { - "$id": "2338", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$id": "2339", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" - }, - { - "$id": "2340", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2341", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" - }, - { - "$id": "2342", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" - }, - { - "$id": "2344", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" - }, - { - "$id": "2345", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" - }, - { - "$id": "2346", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" - }, - { - "$id": "2347", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2348", - "kind": "nullable", - "type": { - "$ref": "2120" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" - }, - { - "$id": "2349", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$ref": "2123" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" - }, - { - "$id": "2350", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2351", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" - }, - { - "$id": "2352", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2353", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" - }, - { - "$id": "2354", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2355", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" - }, - { - "$id": "2356", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2357", - "kind": "nullable", - "type": { - "$id": "2358", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" - } - ] - }, - "session.updated": { - "$id": "2359", - "kind": "model", - "name": "RealtimeResponseSessionUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2360", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2361", - "kind": "constant", - "valueType": { - "$id": "2362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" - }, - { - "$id": "2363", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$ref": "2333" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" - } - ] - }, - "conversation.item.created": { - "$id": "2364", - "kind": "model", - "name": "RealtimeResponseItemCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2365", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2366", - "kind": "constant", - "valueType": { - "$id": "2367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" - }, - { - "$id": "2368", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2369", - "kind": "model", - "name": "RealtimeResponseItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2370", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" - }, - "properties": [ - { - "$id": "2371", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2372", - "kind": "constant", - "valueType": { - "$ref": "535" - }, - "value": "realtime.item", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" - }, - { - "$ref": "2370" - }, - { - "$id": "2373", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2374", - "kind": "nullable", - "type": { - "$id": "2375", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2376", - "message": { - "$id": "2377", - "kind": "model", - "name": "RealtimeResponseMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", - "usage": "Output,Json", - "discriminatorValue": "message", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2378", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2200" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" - }, - { - "$id": "2379", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" - }, - { - "$id": "2380", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2381", - "kind": "array", - "name": "ArrayRealtimeContentPart", - "valueType": { - "$ref": "2211" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" - }, - { - "$id": "2382", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" - } - ] - }, - "function_call": { - "$id": "2383", - "kind": "model", - "name": "RealtimeResponseFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", - "usage": "Output,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2384", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2253" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" - }, - { - "$id": "2385", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" - }, - { - "$id": "2387", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2388", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" - }, - { - "$id": "2389", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2390", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" - }, - { - "$id": "2391", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2392", - "kind": "model", - "name": "RealtimeResponseFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", - "usage": "Output,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2393", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2264" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" - }, - { - "$id": "2394", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" - }, - { - "$id": "2396", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" - } - ] - }, - "conversation.item.deleted": { - "$id": "2398", - "kind": "model", - "name": "RealtimeResponseItemDeletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.deleted", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2399", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2400", - "kind": "constant", - "valueType": { - "$id": "2401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" - }, - { - "$id": "2402", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" - } - ] - }, - "conversation.item.truncated": { - "$id": "2404", - "kind": "model", - "name": "RealtimeResponseItemTruncatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.truncated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2405", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2406", - "kind": "constant", - "valueType": { - "$id": "2407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" - }, - { - "$id": "2408", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" - }, - { - "$id": "2410", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2411", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" - }, - { - "$id": "2412", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "2413", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" - } - ] - }, - "response.created": { - "$id": "2414", - "kind": "model", - "name": "RealtimeResponseCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2415", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2416", - "kind": "constant", - "valueType": { - "$id": "2417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" - }, - { - "$id": "2418", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2419", - "kind": "model", - "name": "RealtimeResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2420", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2421", - "kind": "constant", - "valueType": { - "$ref": "538" - }, - "value": "realtime.response", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" - }, - { - "$id": "2422", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" - }, - { - "$id": "2424", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" - }, - { - "$id": "2425", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "type": { - "$id": "2426", - "kind": "nullable", - "type": { - "$id": "2427", - "kind": "model", - "name": "RealtimeResponseStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2428", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" - }, - "properties": [ - { - "$ref": "2428" - } - ], - "discriminatedSubtypes": { - "$id": "2429", - "cancelled": { - "$id": "2430", - "kind": "model", - "name": "RealtimeResponseCancelledStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "cancelled", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2431", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2432", - "kind": "constant", - "valueType": { - "$id": "2433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "cancelled", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" - }, - { - "$id": "2434", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "553" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" - } - ] - }, - "incomplete": { - "$id": "2435", - "kind": "model", - "name": "RealtimeResponseIncompleteStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "incomplete", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2436", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2437", - "kind": "constant", - "valueType": { - "$id": "2438", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "incomplete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" - }, - { - "$id": "2439", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "559" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" - } - ] - }, - "failed": { - "$id": "2440", - "kind": "model", - "name": "RealtimeResponseFailedStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "failed", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2441", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2442", - "kind": "constant", - "valueType": { - "$id": "2443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" - }, - { - "$id": "2444", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2445", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" - } - ] - } - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" - }, - { - "$id": "2446", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2447", - "kind": "array", - "name": "ArrayRealtimeResponseItem", - "valueType": { - "$ref": "2369" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" - }, - { - "$id": "2448", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2449", - "kind": "model", - "name": "RealtimeResponseUsage", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2450", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "type": { - "$id": "2451", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" - }, - { - "$id": "2452", - "kind": "property", - "name": "input_tokens", - "serializedName": "input_tokens", - "type": { - "$id": "2453", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" - }, - { - "$id": "2454", - "kind": "property", - "name": "output_tokens", - "serializedName": "output_tokens", - "type": { - "$id": "2455", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" - }, - { - "$id": "2456", - "kind": "property", - "name": "input_token_details", - "serializedName": "input_token_details", - "type": { - "$id": "2457", - "kind": "model", - "name": "RealtimeResponseUsageInputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2458", - "kind": "property", - "name": "cached_tokens", - "serializedName": "cached_tokens", - "type": { - "$id": "2459", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" - }, - { - "$id": "2460", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" - }, - { - "$id": "2462", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2463", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" - }, - { - "$id": "2464", - "kind": "property", - "name": "output_token_details", - "serializedName": "output_token_details", - "type": { - "$id": "2465", - "kind": "model", - "name": "RealtimeResponseUsageOutputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2466", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2467", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" - }, - { - "$id": "2468", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2469", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" - } - ] - }, - "response.done": { - "$id": "2470", - "kind": "model", - "name": "RealtimeResponseDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2471", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2472", - "kind": "constant", - "valueType": { - "$id": "2473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" - }, - { - "$id": "2474", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$ref": "2419" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" - } - ] - }, - "rate_limits.updated": { - "$id": "2475", - "kind": "model", - "name": "RealtimeResponseRateLimitsUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "rate_limits.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2476", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2477", - "kind": "constant", - "valueType": { - "$id": "2478", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "rate_limits.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" - }, - { - "$id": "2479", - "kind": "property", - "name": "rate_limits", - "serializedName": "rate_limits", - "type": { - "$id": "2480", - "kind": "array", - "name": "ArrayRealtimeResponseRateLimitDetailsItem", - "valueType": { - "$id": "2481", - "kind": "model", - "name": "RealtimeResponseRateLimitDetailsItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2482", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" - }, - { - "$id": "2484", - "kind": "property", - "name": "limit", - "serializedName": "limit", - "type": { - "$id": "2485", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" - }, - { - "$id": "2486", - "kind": "property", - "name": "remaining", - "serializedName": "remaining", - "type": { - "$id": "2487", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" - }, - { - "$id": "2488", - "kind": "property", - "name": "reset_seconds", - "serializedName": "reset_seconds", - "type": { - "$id": "2489", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" - } - ] - }, - "response.output_item.added": { - "$id": "2490", - "kind": "model", - "name": "RealtimeResponseOutputItemAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2491", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2492", - "kind": "constant", - "valueType": { - "$id": "2493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" - }, - { - "$id": "2494", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" - }, - { - "$id": "2496", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2497", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" - }, - { - "$id": "2498", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" - } - ] - }, - "response.output_item.done": { - "$id": "2499", - "kind": "model", - "name": "RealtimeResponseOutputItemDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2500", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2501", - "kind": "constant", - "valueType": { - "$id": "2502", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" - }, - { - "$id": "2503", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" - }, - { - "$id": "2505", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2506", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" - }, - { - "$id": "2507", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" - } - ] - }, - "response.content_part.added": { - "$id": "2508", - "kind": "model", - "name": "RealtimeResponseContentPartAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2509", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2510", - "kind": "constant", - "valueType": { - "$id": "2511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" - }, - { - "$id": "2512", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" - }, - { - "$id": "2514", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" - }, - { - "$id": "2516", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2517", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" - }, - { - "$id": "2518", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2519", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" - }, - { - "$id": "2520", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" - } - ] - }, - "response.content_part.done": { - "$id": "2521", - "kind": "model", - "name": "RealtimeResponseContentPartDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2522", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2523", - "kind": "constant", - "valueType": { - "$id": "2524", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" - }, - { - "$id": "2525", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" - }, - { - "$id": "2527", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" - }, - { - "$id": "2529", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2530", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" - }, - { - "$id": "2531", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2532", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" - }, - { - "$id": "2533", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" - } - ] - }, - "response.audio.delta": { - "$id": "2534", - "kind": "model", - "name": "RealtimeResponseAudioDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2535", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2536", - "kind": "constant", - "valueType": { - "$id": "2537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" - }, - { - "$id": "2538", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" - }, - { - "$id": "2540", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2541", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" - }, - { - "$id": "2542", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2543", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" - }, - { - "$id": "2544", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2545", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" - }, - { - "$id": "2546", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2547", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" - } - ] - }, - "response.audio.done": { - "$id": "2548", - "kind": "model", - "name": "RealtimeResponseAudioDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2549", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2550", - "kind": "constant", - "valueType": { - "$id": "2551", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" - }, - { - "$id": "2552", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2553", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" - }, - { - "$id": "2554", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2555", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" - }, - { - "$id": "2556", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2557", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" - }, - { - "$id": "2558", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2559", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" - } - ] - }, - "response.audio_transcript.delta": { - "$id": "2560", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2561", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2562", - "kind": "constant", - "valueType": { - "$id": "2563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" - }, - { - "$id": "2564", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" - }, - { - "$id": "2566", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" - }, - { - "$id": "2568", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2569", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" - }, - { - "$id": "2570", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" - }, - { - "$id": "2572", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" - } - ] - }, - "response.audio_transcript.done": { - "$id": "2574", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2575", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2576", - "kind": "constant", - "valueType": { - "$id": "2577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" - }, - { - "$id": "2578", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2579", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" - }, - { - "$id": "2580", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" - }, - { - "$id": "2582", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2583", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" - }, - { - "$id": "2584", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2585", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" - } - ] - }, - "response.text.delta": { - "$id": "2586", - "kind": "model", - "name": "RealtimeResponseTextDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2587", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2588", - "kind": "constant", - "valueType": { - "$id": "2589", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" - }, - { - "$id": "2590", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" - }, - { - "$id": "2592", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" - }, - { - "$id": "2594", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2595", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" - }, - { - "$id": "2596", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2597", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" - }, - { - "$id": "2598", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2599", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" - } - ] - }, - "response.text.done": { - "$id": "2600", - "kind": "model", - "name": "RealtimeResponseTextDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2601", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2602", - "kind": "constant", - "valueType": { - "$id": "2603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" - }, - { - "$id": "2604", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2605", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" - }, - { - "$id": "2606", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" - }, - { - "$id": "2608", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2609", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" - }, - { - "$id": "2610", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2611", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" - }, - { - "$id": "2612", - "kind": "property", - "name": "value", - "serializedName": "value", - "type": { - "$id": "2613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" - } - ] - }, - "response.function_call_arguments.delta": { - "$id": "2614", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2615", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2616", - "kind": "constant", - "valueType": { - "$id": "2617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" - }, - { - "$id": "2618", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" - }, - { - "$id": "2620", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2621", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" - }, - { - "$id": "2622", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2623", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" - }, - { - "$id": "2624", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2625", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" - }, - { - "$id": "2626", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2627", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" - } - ] - }, - "response.function_call_arguments.done": { - "$id": "2628", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2629", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2630", - "kind": "constant", - "valueType": { - "$id": "2631", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" - }, - { - "$id": "2632", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2633", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" - }, - { - "$id": "2634", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" - }, - { - "$id": "2636", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2637", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" - }, - { - "$id": "2638", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" - }, - { - "$id": "2640", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2641", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" - }, - { - "$id": "2642", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2643", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" - } - ] - }, - "input_audio_buffer.speech_started": { - "$id": "2644", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_started", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2645", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2646", - "kind": "constant", - "valueType": { - "$id": "2647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_started", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" - }, - { - "$id": "2648", - "kind": "property", - "name": "audio_start_ms", - "serializedName": "audio_start_ms", - "type": { - "$id": "2649", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" - }, - { - "$id": "2650", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2651", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" - } - ] - }, - "input_audio_buffer.speech_stopped": { - "$id": "2652", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_stopped", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2653", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2654", - "kind": "constant", - "valueType": { - "$id": "2655", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_stopped", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" - }, - { - "$id": "2656", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" - }, - { - "$id": "2658", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2659", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" - } - ] - }, - "conversation.item.input_audio_transcription.completed": { - "$id": "2660", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.completed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2661", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2662", - "kind": "constant", - "valueType": { - "$id": "2663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.completed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" - }, - { - "$id": "2664", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" - }, - { - "$id": "2666", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2667", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" - }, - { - "$id": "2668", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" - } - ] - }, - "conversation.item.input_audio_transcription.failed": { - "$id": "2670", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.failed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2671", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2672", - "kind": "constant", - "valueType": { - "$id": "2673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" - }, - { - "$id": "2674", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2675", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" - }, - { - "$id": "2676", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2677", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" - }, - { - "$id": "2678", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2679", - "kind": "model", - "name": "RealtimeResponseApiError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2680", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" - }, - { - "$id": "2682", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" - }, - { - "$id": "2684", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2685", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" - }, - { - "$id": "2686", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" - } - ] - }, - "input_audio_buffer.committed": { - "$id": "2688", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferCommittedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.committed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2689", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2690", - "kind": "constant", - "valueType": { - "$id": "2691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.committed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" - }, - { - "$id": "2692", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" - }, - { - "$id": "2694", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" - } - ] - }, - "input_audio_buffer.cleared": { - "$id": "2696", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferClearedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.cleared", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2697", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2698", - "kind": "constant", - "valueType": { - "$id": "2699", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.cleared", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" - } - ] - }, - "error": { - "$id": "2700", - "kind": "model", - "name": "RealtimeResponseErrorCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", - "usage": "Output,Json", - "description": "A command that describes an error encountered during a realtime operation.", - "discriminatorValue": "error", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2701", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2702", - "kind": "constant", - "valueType": { - "$id": "2703", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "error", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" - }, - { - "$id": "2704", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2705", - "kind": "model", - "name": "RealtimeResponseError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2706", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2707", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" - }, - { - "$id": "2708", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" - }, - { - "$id": "2710", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2711", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" - }, - { - "$id": "2712", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" - }, - { - "$id": "2714", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" - } - ] - } - } - }, - { - "$ref": "2328" - }, - { - "$ref": "2333" - }, - { - "$ref": "2359" - }, - { - "$ref": "2364" - }, - { - "$ref": "2369" - }, - { - "$ref": "2377" - }, - { - "$ref": "2383" - }, - { - "$ref": "2392" - }, - { - "$ref": "2398" - }, - { - "$ref": "2404" - }, - { - "$ref": "2414" - }, - { - "$ref": "2419" - }, - { - "$ref": "2427" - }, - { - "$ref": "2430" - }, - { - "$ref": "2435" - }, - { - "$ref": "2440" - }, - { - "$ref": "2449" - }, - { - "$ref": "2457" - }, - { - "$ref": "2465" - }, - { - "$ref": "2470" - }, - { - "$ref": "2475" - }, - { - "$ref": "2481" - }, - { - "$ref": "2490" - }, - { - "$ref": "2499" - }, - { - "$ref": "2508" - }, - { - "$ref": "2521" - }, - { - "$ref": "2534" - }, - { - "$ref": "2548" - }, - { - "$ref": "2560" - }, - { - "$ref": "2574" - }, - { - "$ref": "2586" - }, - { - "$ref": "2600" - }, - { - "$ref": "2614" - }, - { - "$ref": "2628" - }, - { - "$ref": "2644" - }, - { - "$ref": "2652" - }, - { - "$ref": "2660" - }, - { - "$ref": "2670" - }, - { - "$ref": "2679" - }, - { - "$ref": "2688" - }, - { - "$ref": "2696" - }, - { - "$ref": "2700" - }, - { - "$ref": "2705" - }, - { - "$id": "2716", - "kind": "model", - "name": "CreateModerationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2717", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input text to classify", - "type": { - "$id": "2718", - "kind": "union", - "name": "CreateModerationRequestInput", - "variantTypes": [ - { - "$id": "2719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "2720", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2721", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" - }, - { - "$id": "2722", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", - "type": { - "$ref": "565" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" - } - ] - }, - { - "$id": "2723", - "kind": "model", - "name": "CreateModerationResponse", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", - "usage": "Output,Json", - "description": "Represents if a given text input is potentially harmful.", - "decorators": [], - "properties": [ - { - "$id": "2724", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The unique identifier for the moderation request.", - "type": { - "$id": "2725", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" - }, - { - "$id": "2726", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used to generate the moderation results.", - "type": { - "$id": "2727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" - }, - { - "$id": "2728", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "A list of moderation objects.", - "type": { - "$id": "2729", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2730", - "kind": "model", - "name": "CreateModerationResponseResult", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2731", - "kind": "property", - "name": "flagged", - "serializedName": "flagged", - "description": "Whether any of the below categories are flagged.", - "type": { - "$id": "2732", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" - }, - { - "$id": "2733", - "kind": "property", - "name": "categories", - "serializedName": "categories", - "description": "A list of the categories, and whether they are flagged or not.", - "type": { - "$id": "2734", - "kind": "model", - "name": "CreateModerationResponseResultCategories", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2735", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", - "type": { - "$id": "2736", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" - }, - { - "$id": "2737", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", - "type": { - "$id": "2738", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" - }, - { - "$id": "2739", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "Content that expresses, incites, or promotes harassing language towards any target.", - "type": { - "$id": "2740", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" - }, - { - "$id": "2741", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "Harassment content that also includes violence or serious harm towards any target.", - "type": { - "$id": "2742", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" - }, - { - "$id": "2743", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2744", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" - }, - { - "$id": "2745", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2746", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" - }, - { - "$id": "2747", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", - "type": { - "$id": "2748", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" - }, - { - "$id": "2749", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", - "type": { - "$id": "2750", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" - }, - { - "$id": "2751", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "Sexual content that includes an individual who is under 18 years old.", - "type": { - "$id": "2752", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" - }, - { - "$id": "2753", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "Content that depicts death, violence, or physical injury.", - "type": { - "$id": "2754", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" - }, - { - "$id": "2755", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "Content that depicts death, violence, or physical injury in graphic detail.", - "type": { - "$id": "2756", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" - }, - { - "$id": "2757", - "kind": "property", - "name": "category_scores", - "serializedName": "category_scores", - "description": "A list of the categories along with their scores as predicted by model.", - "type": { - "$id": "2758", - "kind": "model", - "name": "CreateModerationResponseResultCategoryScores", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2759", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "The score for the category 'hate'.", - "type": { - "$id": "2760", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" - }, - { - "$id": "2761", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "The score for the category 'hate/threatening'.", - "type": { - "$id": "2762", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" - }, - { - "$id": "2763", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "The score for the category 'harassment'.", - "type": { - "$id": "2764", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" - }, - { - "$id": "2765", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "The score for the category 'harassment/threatening'.", - "type": { - "$id": "2766", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" - }, - { - "$id": "2767", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "The score for the category 'self-harm'.", - "type": { - "$id": "2768", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" - }, - { - "$id": "2769", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "The score for the category 'self-harm/intent'.", - "type": { - "$id": "2770", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" - }, - { - "$id": "2771", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "The score for the category 'self-harm/instructions'.", - "type": { - "$id": "2772", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" - }, - { - "$id": "2773", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "The score for the category 'sexual'.", - "type": { - "$id": "2774", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" - }, - { - "$id": "2775", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "The score for the category 'sexual/minors'.", - "type": { - "$id": "2776", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" - }, - { - "$id": "2777", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "The score for the category 'violence'.", - "type": { - "$id": "2778", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" - }, - { - "$id": "2779", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "The score for the category 'violence/graphic'.", - "type": { - "$id": "2780", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" - } - ] - }, - { - "$ref": "2730" - }, - { - "$ref": "2734" - }, - { - "$ref": "2758" - }, - { - "$id": "2781", - "kind": "model", - "name": "ListModelsResponse", - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2782", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2783", - "kind": "constant", - "valueType": { - "$ref": "571" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" - }, - { - "$id": "2784", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2785", - "kind": "array", - "name": "ArrayModel", - "valueType": { - "$id": "2786", - "kind": "model", - "name": "Model", - "crossLanguageDefinitionId": "OpenAI.Model", - "usage": "Output,Json", - "description": "Describes an OpenAI model offering that can be used with the API.", - "decorators": [], - "properties": [ - { - "$id": "2787", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The model identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.id" - }, - { - "$id": "2789", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) when the model was created.", - "type": { - "$id": "2790", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2791", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.created" - }, - { - "$id": "2792", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"model\".", - "type": { - "$id": "2793", - "kind": "constant", - "valueType": { - "$ref": "574" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.object" - }, - { - "$id": "2794", - "kind": "property", - "name": "owned_by", - "serializedName": "owned_by", - "description": "The organization that owns the model.", - "type": { - "$id": "2795", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.owned_by" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" - } - ] - }, - { - "$ref": "2786" - }, - { - "$id": "2796", - "kind": "model", - "name": "DeleteModelResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2797", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" - }, - { - "$id": "2799", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2800", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" - }, - { - "$id": "2801", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2802", - "kind": "constant", - "valueType": { - "$ref": "577" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" - } - ] - }, - { - "$id": "2803", - "kind": "model", - "name": "MessageObject", - "crossLanguageDefinitionId": "OpenAI.MessageObject", - "usage": "Output,Json", - "description": "Represents a message within a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "2804", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.id" - }, - { - "$id": "2806", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message`.", - "type": { - "$id": "2807", - "kind": "constant", - "valueType": { - "$ref": "580" - }, - "value": "thread.message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.object" - }, - { - "$id": "2808", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the message was created.", - "type": { - "$id": "2809", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2810", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" - }, - { - "$id": "2811", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", - "type": { - "$id": "2812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" - }, - { - "$id": "2813", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", - "type": { - "$ref": "583" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.status" - }, - { - "$id": "2814", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "On an incomplete message, details about why the message is incomplete.", - "type": { - "$id": "2815", - "kind": "nullable", - "type": { - "$id": "2816", - "kind": "model", - "name": "MessageObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2817", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason the message is incomplete.", - "type": { - "$ref": "591" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" - }, - { - "$id": "2818", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the message was completed.", - "type": { - "$id": "2819", - "kind": "nullable", - "type": { - "$id": "2820", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2821", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" - }, - { - "$id": "2822", - "kind": "property", - "name": "incomplete_at", - "serializedName": "incomplete_at", - "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", - "type": { - "$id": "2823", - "kind": "nullable", - "type": { - "$id": "2824", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2825", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" - }, - { - "$id": "2826", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "603" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.role" - }, - { - "$id": "2827", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "2828", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$ref": "1530" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.content" - }, - { - "$id": "2829", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", - "type": { - "$id": "2830", - "kind": "nullable", - "type": { - "$id": "2831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" - }, - { - "$id": "2832", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", - "type": { - "$id": "2833", - "kind": "nullable", - "type": { - "$id": "2834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" - }, - { - "$id": "2835", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they were added to.", - "type": { - "$id": "2836", - "kind": "nullable", - "type": { - "$id": "2837", - "kind": "array", - "name": "MessageObjectAttachments", - "valueType": { - "$id": "2838", - "kind": "model", - "name": "MessageObjectAttachment", - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2839", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "2840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" - }, - { - "$id": "2841", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "2842", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2843", - "kind": "union", - "name": "MessageObjectAttachmentTool", - "variantTypes": [ - { - "$ref": "1540" - }, - { - "$ref": "1577" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" - }, - { - "$id": "2844", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2845", - "kind": "nullable", - "type": { - "$id": "2846", - "kind": "dict", - "keyType": { - "$id": "2847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2848", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" - } - ] - }, - { - "$ref": "2816" - }, - { - "$ref": "2838" - }, - { - "$id": "2849", - "kind": "model", - "name": "ListMessagesResponse", - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2850", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2851", - "kind": "constant", - "valueType": { - "$ref": "615" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" - }, - { - "$id": "2852", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2853", - "kind": "array", - "name": "ArrayMessageObject", - "valueType": { - "$ref": "2803" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" - }, - { - "$id": "2854", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" - }, - { - "$id": "2856", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" - }, - { - "$id": "2858", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2859", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" - } - ] - }, - { - "$id": "2860", - "kind": "model", - "name": "ModifyMessageRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2861", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2862", - "kind": "nullable", - "type": { - "$id": "2863", - "kind": "dict", - "keyType": { - "$id": "2864", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" - } - ] - }, - { - "$id": "2866", - "kind": "model", - "name": "DeleteMessageResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2867", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2868", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" - }, - { - "$id": "2869", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2870", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" - }, - { - "$id": "2871", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2872", - "kind": "constant", - "valueType": { - "$ref": "618" - }, - "value": "thread.message.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" - } - ] - }, - { - "$id": "2873", - "kind": "model", - "name": "CreateImageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2874", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", - "type": { - "$id": "2875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" - }, - { - "$id": "2876", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation.", - "type": { - "$id": "2877", - "kind": "nullable", - "type": { - "$ref": "621" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" - }, - { - "$id": "2878", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2879", - "kind": "nullable", - "type": { - "$id": "2880", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" - }, - { - "$id": "2881", - "kind": "property", - "name": "quality", - "serializedName": "quality", - "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", - "type": { - "$ref": "627" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" - }, - { - "$id": "2882", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2883", - "kind": "nullable", - "type": { - "$ref": "633" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" - }, - { - "$id": "2884", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", - "type": { - "$id": "2885", - "kind": "nullable", - "type": { - "$ref": "639" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" - }, - { - "$id": "2886", - "kind": "property", - "name": "style", - "serializedName": "style", - "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", - "type": { - "$id": "2887", - "kind": "nullable", - "type": { - "$ref": "651" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" - }, - { - "$id": "2888", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" - } - ] - }, - { - "$id": "2890", - "kind": "model", - "name": "ImagesResponse", - "crossLanguageDefinitionId": "OpenAI.ImagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2891", - "kind": "property", - "name": "created", - "serializedName": "created", - "type": { - "$id": "2892", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2893", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" - }, - { - "$id": "2894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2895", - "kind": "array", - "name": "ArrayImage", - "valueType": { - "$id": "2896", - "kind": "model", - "name": "Image", - "crossLanguageDefinitionId": "OpenAI.Image", - "usage": "Output,Json", - "description": "Represents the url or the content of an image generated by the OpenAI API.", - "decorators": [], - "properties": [ - { - "$id": "2897", - "kind": "property", - "name": "b64_json", - "serializedName": "b64_json", - "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", - "type": { - "$id": "2898", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.b64_json" - }, - { - "$id": "2899", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the generated image, if `response_format` is `url` (default).", - "type": { - "$id": "2900", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.url" - }, - { - "$id": "2901", - "kind": "property", - "name": "revised_prompt", - "serializedName": "revised_prompt", - "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", - "type": { - "$id": "2902", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" - } - ] - }, - { - "$ref": "2896" - }, - { - "$id": "2903", - "kind": "model", - "name": "CreateImageEditRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2904", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", - "type": { - "$id": "2905", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" - }, - { - "$id": "2906", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters.", - "type": { - "$id": "2907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" - }, - { - "$id": "2908", - "kind": "property", - "name": "mask", - "serializedName": "mask", - "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", - "type": { - "$id": "2909", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" - }, - { - "$id": "2910", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2911", - "kind": "nullable", - "type": { - "$ref": "657" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" - }, - { - "$id": "2912", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10.", - "type": { - "$id": "2913", - "kind": "nullable", - "type": { - "$id": "2914", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" - }, - { - "$id": "2915", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2916", - "kind": "nullable", - "type": { - "$ref": "661" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" - }, - { - "$id": "2917", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2918", - "kind": "nullable", - "type": { - "$ref": "669" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" - }, - { - "$id": "2919", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" - } - ] - }, - { - "$id": "2921", - "kind": "model", - "name": "CreateImageVariationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2922", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", - "type": { - "$id": "2923", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" - }, - { - "$id": "2924", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2925", - "kind": "nullable", - "type": { - "$ref": "675" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" - }, - { - "$id": "2926", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2927", - "kind": "nullable", - "type": { - "$id": "2928", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" - }, - { - "$id": "2929", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2930", - "kind": "nullable", - "type": { - "$ref": "679" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" - }, - { - "$id": "2931", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2932", - "kind": "nullable", - "type": { - "$ref": "685" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" - }, - { - "$id": "2933", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2934", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" - } - ] - }, - { - "$id": "2935", - "kind": "model", - "name": "CreateFineTuningJobRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2936", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", - "type": { - "$ref": "693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" - }, - { - "$id": "2937", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" - }, - { - "$id": "2939", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job.", - "type": { - "$id": "2940", - "kind": "model", - "name": "CreateFineTuningJobRequestHyperparameters", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2941", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "2942", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "703" - }, - { - "$id": "2943", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" - }, - { - "$id": "2944", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "2945", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "707" - }, - { - "$id": "2946", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" - }, - { - "$id": "2947", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "2948", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "711" - }, - { - "$id": "2949", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" - }, - { - "$id": "2950", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", - "type": { - "$id": "2951", - "kind": "nullable", - "type": { - "$id": "2952", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" - }, - { - "$id": "2953", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2954", - "kind": "nullable", - "type": { - "$id": "2955", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" - }, - { - "$id": "2956", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for your fine-tuning job.", - "type": { - "$id": "2957", - "kind": "nullable", - "type": { - "$id": "2958", - "kind": "array", - "name": "CreateFineTuningJobRequestIntegrations", - "valueType": { - "$id": "2959", - "kind": "model", - "name": "CreateFineTuningJobRequestIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2960", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" - }, - "properties": [ - { - "$ref": "2960" - } - ], - "discriminatedSubtypes": { - "$id": "2962", - "wandb": { - "$id": "2963", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", - "usage": "Input,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "2959" - }, - "properties": [ - { - "$id": "2964", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2965", - "kind": "constant", - "valueType": { - "$id": "2966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" - }, - { - "$id": "2967", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "type": { - "$id": "2968", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2969", - "kind": "property", - "name": "project", - "serializedName": "project", - "type": { - "$id": "2970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" - }, - { - "$id": "2971", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2972", - "kind": "nullable", - "type": { - "$id": "2973", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" - }, - { - "$id": "2974", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "type": { - "$id": "2975", - "kind": "nullable", - "type": { - "$id": "2976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" - }, - { - "$id": "2977", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "type": { - "$id": "2978", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" - }, - { - "$id": "2980", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", - "type": { - "$id": "2981", - "kind": "nullable", - "type": { - "$id": "2982", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" - } - ] - }, - { - "$ref": "2940" - }, - { - "$ref": "2959" - }, - { - "$ref": "2963" - }, - { - "$ref": "2968" - }, - { - "$id": "2983", - "kind": "model", - "name": "FineTuningJob", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob", - "usage": "Output,Json", - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", - "decorators": [], - "properties": [ - { - "$id": "2984", - "kind": "property", - "name": "user_provided_suffix", - "serializedName": "user_provided_suffix", - "description": "The descriptive suffix applied to the job, as specified in the job creation request.", - "type": { - "$id": "2985", - "kind": "nullable", - "type": { - "$id": "2986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" - }, - { - "$id": "2987", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The object identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2988", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" - }, - { - "$id": "2989", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", - "type": { - "$id": "2990", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2991", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" - }, - { - "$id": "2992", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", - "type": { - "$id": "2993", - "kind": "nullable", - "type": { - "$id": "2994", - "kind": "model", - "name": "FineTuningJobError", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2995", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "2996", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" - }, - { - "$id": "2997", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "2998", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" - }, - { - "$id": "2999", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", - "type": { - "$id": "3000", - "kind": "nullable", - "type": { - "$id": "3001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" - }, - { - "$id": "3002", - "kind": "property", - "name": "fine_tuned_model", - "serializedName": "fine_tuned_model", - "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3003", - "kind": "nullable", - "type": { - "$id": "3004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" - }, - { - "$id": "3005", - "kind": "property", - "name": "finished_at", - "serializedName": "finished_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3006", - "kind": "nullable", - "type": { - "$id": "3007", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3008", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" - }, - { - "$id": "3009", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "3010", - "kind": "model", - "name": "FineTuningJobHyperparameters", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3011", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "3012", - "kind": "union", - "name": "FineTuningJobHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "715" - }, - { - "$id": "3013", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" - }, - { - "$id": "3014", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "3015", - "kind": "union", - "name": "FineTuningJobHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "719" - }, - { - "$id": "3016", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" - }, - { - "$id": "3017", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "3018", - "kind": "union", - "name": "FineTuningJobHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "723" - }, - { - "$id": "3019", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" - }, - { - "$id": "3020", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The base model that is being fine-tuned.", - "type": { - "$id": "3021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" - }, - { - "$id": "3022", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job\".", - "type": { - "$id": "3023", - "kind": "constant", - "valueType": { - "$ref": "727" - }, - "value": "fine_tuning.job", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" - }, - { - "$id": "3024", - "kind": "property", - "name": "organization_id", - "serializedName": "organization_id", - "description": "The organization that owns the fine-tuning job.", - "type": { - "$id": "3025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" - }, - { - "$id": "3026", - "kind": "property", - "name": "result_files", - "serializedName": "result_files", - "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3027", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" - }, - { - "$id": "3029", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", - "type": { - "$ref": "730" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" - }, - { - "$id": "3030", - "kind": "property", - "name": "trained_tokens", - "serializedName": "trained_tokens", - "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3031", - "kind": "nullable", - "type": { - "$id": "3032", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" - }, - { - "$id": "3033", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" - }, - { - "$id": "3035", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3036", - "kind": "nullable", - "type": { - "$id": "3037", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" - }, - { - "$id": "3038", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for this fine-tuning job.", - "type": { - "$id": "3039", - "kind": "nullable", - "type": { - "$id": "3040", - "kind": "array", - "name": "FineTuningJobIntegrations", - "valueType": { - "$id": "3041", - "kind": "model", - "name": "FineTuningIntegration", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3042", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" - }, - "properties": [ - { - "$ref": "3042" - } - ], - "discriminatedSubtypes": { - "$id": "3044", - "wandb": { - "$id": "3045", - "kind": "model", - "name": "FineTuningIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", - "usage": "Output,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "3041" - }, - "properties": [ - { - "$id": "3046", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the integration being enabled for the fine-tuning job", - "type": { - "$id": "3047", - "kind": "constant", - "valueType": { - "$id": "3048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" - }, - { - "$id": "3049", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", - "type": { - "$id": "3050", - "kind": "model", - "name": "FineTuningIntegrationWandbWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3051", - "kind": "property", - "name": "project", - "serializedName": "project", - "description": "The name of the project that the new run will be created under.", - "type": { - "$id": "3052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" - }, - { - "$id": "3053", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", - "type": { - "$id": "3054", - "kind": "nullable", - "type": { - "$id": "3055", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" - }, - { - "$id": "3056", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", - "type": { - "$id": "3057", - "kind": "nullable", - "type": { - "$id": "3058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" - }, - { - "$id": "3059", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", - "type": { - "$id": "3060", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" - }, - { - "$id": "3062", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed used for the fine-tuning job.", - "type": { - "$id": "3063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" - }, - { - "$id": "3064", - "kind": "property", - "name": "estimated_finish", - "serializedName": "estimated_finish", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", - "type": { - "$id": "3065", - "kind": "nullable", - "type": { - "$id": "3066", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3067", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" - } - ] - }, - { - "$ref": "2994" - }, - { - "$ref": "3010" - }, - { - "$ref": "3041" - }, - { - "$ref": "3045" - }, - { - "$ref": "3050" - }, - { - "$id": "3068", - "kind": "model", - "name": "ListPaginatedFineTuningJobsResponse", - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3069", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3070", - "kind": "array", - "name": "ArrayFineTuningJob", - "valueType": { - "$ref": "2983" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" - }, - { - "$id": "3071", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3072", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" - }, - { - "$id": "3073", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3074", - "kind": "constant", - "valueType": { - "$ref": "744" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" - } - ] - }, - { - "$id": "3075", - "kind": "model", - "name": "ListFineTuningJobCheckpointsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3076", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3077", - "kind": "array", - "name": "ArrayFineTuningJobCheckpoint", - "valueType": { - "$id": "3078", - "kind": "model", - "name": "FineTuningJobCheckpoint", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", - "usage": "Output,Json", - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", - "decorators": [], - "properties": [ - { - "$id": "3079", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The checkpoint identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "3080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" - }, - { - "$id": "3081", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", - "type": { - "$id": "3082", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3083", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" - }, - { - "$id": "3084", - "kind": "property", - "name": "fine_tuned_model_checkpoint", - "serializedName": "fine_tuned_model_checkpoint", - "description": "The name of the fine-tuned checkpoint model that is created.", - "type": { - "$id": "3085", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" - }, - { - "$id": "3086", - "kind": "property", - "name": "step_number", - "serializedName": "step_number", - "description": "The step number that the checkpoint was created at.", - "type": { - "$id": "3087", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" - }, - { - "$id": "3088", - "kind": "property", - "name": "metrics", - "serializedName": "metrics", - "description": "Metrics at the step number during the fine-tuning job.", - "type": { - "$id": "3089", - "kind": "model", - "name": "FineTuningJobCheckpointMetrics", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3090", - "kind": "property", - "name": "step", - "serializedName": "step", - "type": { - "$id": "3091", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" - }, - { - "$id": "3092", - "kind": "property", - "name": "train_loss", - "serializedName": "train_loss", - "type": { - "$id": "3093", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" - }, - { - "$id": "3094", - "kind": "property", - "name": "train_mean_token_accuracy", - "serializedName": "train_mean_token_accuracy", - "type": { - "$id": "3095", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" - }, - { - "$id": "3096", - "kind": "property", - "name": "valid_loss", - "serializedName": "valid_loss", - "type": { - "$id": "3097", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" - }, - { - "$id": "3098", - "kind": "property", - "name": "valid_mean_token_accuracy", - "serializedName": "valid_mean_token_accuracy", - "type": { - "$id": "3099", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" - }, - { - "$id": "3100", - "kind": "property", - "name": "full_valid_loss", - "serializedName": "full_valid_loss", - "type": { - "$id": "3101", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" - }, - { - "$id": "3102", - "kind": "property", - "name": "full_valid_mean_token_accuracy", - "serializedName": "full_valid_mean_token_accuracy", - "type": { - "$id": "3103", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" - }, - { - "$id": "3104", - "kind": "property", - "name": "fine_tuning_job_id", - "serializedName": "fine_tuning_job_id", - "description": "The name of the fine-tuning job that this checkpoint was created from.", - "type": { - "$id": "3105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" - }, - { - "$id": "3106", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "type": { - "$id": "3107", - "kind": "constant", - "valueType": { - "$ref": "747" - }, - "value": "fine_tuning.job.checkpoint", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" - }, - { - "$id": "3108", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3109", - "kind": "constant", - "valueType": { - "$ref": "750" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" - }, - { - "$id": "3110", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3111", - "kind": "nullable", - "type": { - "$id": "3112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" - }, - { - "$id": "3113", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3114", - "kind": "nullable", - "type": { - "$id": "3115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" - }, - { - "$id": "3116", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3117", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" - } - ] - }, - { - "$ref": "3078" - }, - { - "$ref": "3089" - }, - { - "$id": "3118", - "kind": "model", - "name": "ListFineTuningJobEventsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3119", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3120", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" - }, - { - "$id": "3121", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3122", - "kind": "array", - "name": "ArrayFineTuningJobEvent", - "valueType": { - "$id": "3123", - "kind": "model", - "name": "FineTuningJobEvent", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", - "usage": "Output,Json", - "description": "Fine-tuning job event object", - "decorators": [], - "properties": [ - { - "$id": "3124", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" - }, - { - "$id": "3126", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "type": { - "$id": "3127", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3128", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" - }, - { - "$id": "3129", - "kind": "property", - "name": "level", - "serializedName": "level", - "type": { - "$ref": "753" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" - }, - { - "$id": "3130", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" - }, - { - "$id": "3132", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3133", - "kind": "constant", - "valueType": { - "$ref": "761" - }, - "value": "fine_tuning.job.event", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" - }, - { - "$id": "3134", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3135", - "kind": "constant", - "valueType": { - "$ref": "764" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" - } - ] - }, - { - "$ref": "3123" - }, - { - "$id": "3136", - "kind": "model", - "name": "CreateFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3137", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The File object (not file name) to be uploaded.", - "type": { - "$id": "3138", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" - }, - { - "$id": "3139", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", - "type": { - "$ref": "767" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" - } - ] - }, - { - "$id": "3140", - "kind": "model", - "name": "ListFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3141", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3142", - "kind": "array", - "name": "ArrayOpenAiFile", - "valueType": { - "$ref": "1275" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" - }, - { - "$id": "3143", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3144", - "kind": "constant", - "valueType": { - "$ref": "777" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" - } - ] - }, - { - "$id": "3145", - "kind": "model", - "name": "DeleteFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3146", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" - }, - { - "$id": "3148", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3149", - "kind": "constant", - "valueType": { - "$ref": "780" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" - }, - { - "$id": "3150", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3151", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" - } - ] - }, - { - "$id": "3152", - "kind": "model", - "name": "CreateEmbeddingRequest", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3153", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3154", - "kind": "union", - "name": "CreateEmbeddingRequestInput", - "variantTypes": [ - { - "$id": "3155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3156", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3158", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3159", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3160", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3161", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3162", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" - }, - { - "$id": "3163", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "783" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" - }, - { - "$id": "3164", - "kind": "property", - "name": "encoding_format", - "serializedName": "encoding_format", - "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", - "type": { - "$ref": "791" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" - }, - { - "$id": "3165", - "kind": "property", - "name": "dimensions", - "serializedName": "dimensions", - "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", - "type": { - "$id": "3166", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" - }, - { - "$id": "3167", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3168", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" - } - ] - }, - { - "$id": "3169", - "kind": "model", - "name": "CreateEmbeddingResponse", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3170", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The list of embeddings generated by the model.", - "type": { - "$id": "3171", - "kind": "array", - "name": "ArrayEmbedding", - "valueType": { - "$id": "3172", - "kind": "model", - "name": "Embedding", - "crossLanguageDefinitionId": "OpenAI.Embedding", - "usage": "Output,Json", - "description": "Represents an embedding vector returned by embedding endpoint.", - "decorators": [], - "properties": [ - { - "$id": "3173", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the embedding in the list of embeddings.", - "type": { - "$id": "3174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.index" - }, - { - "$id": "3175", - "kind": "property", - "name": "embedding", - "serializedName": "embedding", - "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", - "type": { - "$id": "3176", - "kind": "union", - "name": "EmbeddingEmbedding", - "variantTypes": [ - { - "$id": "3177", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3178", - "kind": "float", - "name": "float", - "crossLanguageDefinitionId": "TypeSpec.float", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" - }, - { - "$id": "3180", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"embedding\".", - "type": { - "$id": "3181", - "kind": "constant", - "valueType": { - "$ref": "797" - }, - "value": "embedding", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" - }, - { - "$id": "3182", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model used to generate the embedding.", - "type": { - "$id": "3183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" - }, - { - "$id": "3184", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"list\".", - "type": { - "$id": "3185", - "kind": "constant", - "valueType": { - "$ref": "800" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" - }, - { - "$id": "3186", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "The usage information for the request.", - "type": { - "$id": "3187", - "kind": "model", - "name": "CreateEmbeddingResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3188", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "The number of tokens used by the prompt.", - "type": { - "$id": "3189", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "3190", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "The total number of tokens used by the request.", - "type": { - "$id": "3191", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" - } - ] - }, - { - "$ref": "3172" - }, - { - "$ref": "3187" - }, - { - "$id": "3192", - "kind": "model", - "name": "CreateCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3193", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "803" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" - }, - { - "$id": "3194", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", - "type": { - "$id": "3195", - "kind": "nullable", - "type": { - "$id": "3196", - "kind": "union", - "name": "CreateCompletionRequestPrompt", - "variantTypes": [ - { - "$id": "3197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3198", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3200", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3201", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3202", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3203", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3204", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" - }, - { - "$id": "3205", - "kind": "property", - "name": "best_of", - "serializedName": "best_of", - "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3206", - "kind": "nullable", - "type": { - "$id": "3207", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" - }, - { - "$id": "3208", - "kind": "property", - "name": "echo", - "serializedName": "echo", - "description": "Echo back the prompt in addition to the completion", - "type": { - "$id": "3209", - "kind": "nullable", - "type": { - "$id": "3210", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" - }, - { - "$id": "3211", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3212", - "kind": "nullable", - "type": { - "$id": "3213", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" - }, - { - "$id": "3214", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", - "type": { - "$id": "3215", - "kind": "nullable", - "type": { - "$id": "3216", - "kind": "dict", - "keyType": { - "$id": "3217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3218", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" - }, - { - "$id": "3219", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", - "type": { - "$id": "3220", - "kind": "nullable", - "type": { - "$id": "3221", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" - }, - { - "$id": "3222", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3223", - "kind": "nullable", - "type": { - "$id": "3224", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" - }, - { - "$id": "3225", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3226", - "kind": "nullable", - "type": { - "$id": "3227", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" - }, - { - "$id": "3228", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3229", - "kind": "nullable", - "type": { - "$id": "3230", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" - }, - { - "$id": "3231", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3232", - "kind": "nullable", - "type": { - "$id": "3233", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" - }, - { - "$id": "3234", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", - "type": { - "$id": "3235", - "kind": "nullable", - "type": { - "$id": "3236", - "kind": "union", - "name": "CreateCompletionRequestStop", - "variantTypes": [ - { - "$id": "3237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3238", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" - }, - { - "$id": "3240", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3241", - "kind": "nullable", - "type": { - "$id": "3242", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" - }, - { - "$id": "3243", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3244", - "kind": "nullable", - "type": { - "$id": "3245", - "kind": "model", - "name": "ChatCompletionStreamOptions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", - "usage": "Input,Json", - "description": "Options for streaming response. Only set this when you set `stream: true`.", - "decorators": [], - "properties": [ - { - "$id": "3246", - "kind": "property", - "name": "include_usage", - "serializedName": "include_usage", - "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", - "type": { - "$id": "3247", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" - }, - { - "$id": "3248", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", - "type": { - "$id": "3249", - "kind": "nullable", - "type": { - "$id": "3250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" - }, - { - "$id": "3251", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3252", - "kind": "nullable", - "type": { - "$id": "3253", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" - }, - { - "$id": "3254", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3255", - "kind": "nullable", - "type": { - "$id": "3256", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" - }, - { - "$id": "3257", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" - } - ] - }, - { - "$ref": "3245" - }, - { - "$id": "3259", - "kind": "model", - "name": "CreateCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", - "usage": "Output,Json", - "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", - "decorators": [], - "properties": [ - { - "$id": "3260", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the completion.", - "type": { - "$id": "3261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" - }, - { - "$id": "3262", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "The list of completion choices the model generated for the input prompt.", - "type": { - "$id": "3263", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3264", - "kind": "model", - "name": "CreateCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3265", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", - "type": { - "$ref": "811" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3266", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3267", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3268", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "type": { - "$id": "3269", - "kind": "nullable", - "type": { - "$id": "3270", - "kind": "model", - "name": "CreateCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3271", - "kind": "property", - "name": "text_offset", - "serializedName": "text_offset", - "type": { - "$id": "3272", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3273", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" - }, - { - "$id": "3274", - "kind": "property", - "name": "token_logprobs", - "serializedName": "token_logprobs", - "type": { - "$id": "3275", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3276", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" - }, - { - "$id": "3277", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "type": { - "$id": "3278", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" - }, - { - "$id": "3280", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "type": { - "$id": "3281", - "kind": "array", - "name": "ArrayRecord", - "valueType": { - "$id": "3282", - "kind": "dict", - "keyType": { - "$id": "3283", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3284", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" - }, - { - "$id": "3285", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" - }, - { - "$id": "3287", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the completion was created.", - "type": { - "$id": "3288", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3289", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" - }, - { - "$id": "3290", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for completion.", - "type": { - "$id": "3291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" - }, - { - "$id": "3292", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" - }, - { - "$id": "3294", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"text_completion\"", - "type": { - "$id": "3295", - "kind": "constant", - "valueType": { - "$ref": "819" - }, - "value": "text_completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" - }, - { - "$id": "3296", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "3297", - "kind": "model", - "name": "CompletionUsage", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics for the completion request.", - "decorators": [], - "properties": [ - { - "$id": "3298", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "3299", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" - }, - { - "$id": "3300", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "3301", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" - }, - { - "$id": "3302", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "3303", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" - }, - { - "$id": "3304", - "kind": "property", - "name": "completion_tokens_details", - "serializedName": "completion_tokens_details", - "description": "Breakdown of tokens used in a completion.", - "type": { - "$id": "3305", - "kind": "model", - "name": "CompletionUsageCompletionTokensDetails", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3306", - "kind": "property", - "name": "reasoning_tokens", - "serializedName": "reasoning_tokens", - "description": "Tokens generated by the model for reasoning.", - "type": { - "$id": "3307", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" - } - ] - }, - { - "$ref": "3264" - }, - { - "$ref": "3270" - }, - { - "$ref": "3297" - }, - { - "$ref": "3305" - }, - { - "$id": "3308", - "kind": "model", - "name": "CreateChatCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3309", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", - "type": { - "$id": "3310", - "kind": "array", - "name": "ArrayChatCompletionRequestMessage", - "valueType": { - "$id": "3311", - "kind": "model", - "name": "ChatCompletionRequestMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3312", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" - }, - "properties": [ - { - "$ref": "3312" - } - ], - "discriminatedSubtypes": { - "$id": "3314", - "system": { - "$id": "3315", - "kind": "model", - "name": "ChatCompletionRequestSystemMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3316", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the system message.", - "type": { - "$id": "3317", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContent", - "variantTypes": [ - { - "$id": "3318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3319", - "kind": "array", - "name": "ArrayChatCompletionRequestSystemMessageContentPart", - "valueType": { - "$id": "3320", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContentPart", - "variantTypes": [ - { - "$id": "3321", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartText", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3322", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3323", - "kind": "constant", - "valueType": { - "$ref": "822" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" - }, - { - "$id": "3324", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content.", - "type": { - "$id": "3325", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" - }, - { - "$id": "3326", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `system`.", - "type": { - "$id": "3327", - "kind": "constant", - "valueType": { - "$id": "3328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" - }, - { - "$id": "3329", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" - } - ] - }, - "user": { - "$id": "3331", - "kind": "model", - "name": "ChatCompletionRequestUserMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3332", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the user message.", - "type": { - "$id": "3333", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContent", - "variantTypes": [ - { - "$id": "3334", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3335", - "kind": "array", - "name": "ArrayChatCompletionRequestUserMessageContentPart", - "valueType": { - "$id": "3336", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3337", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3338", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3339", - "kind": "constant", - "valueType": { - "$ref": "825" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" - }, - { - "$id": "3340", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "3341", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImageImageUrl", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3342", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "Either a URL of the image or the base64 encoded image data.", - "type": { - "$id": "3343", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" - }, - { - "$id": "3344", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", - "type": { - "$ref": "828" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" - }, - { - "$id": "3345", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `user`.", - "type": { - "$id": "3346", - "kind": "constant", - "valueType": { - "$id": "3347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" - }, - { - "$id": "3348", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" - } - ] - }, - "assistant": { - "$id": "3350", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3351", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", - "type": { - "$id": "3352", - "kind": "nullable", - "type": { - "$id": "3353", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContent", - "variantTypes": [ - { - "$id": "3354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3355", - "kind": "array", - "name": "ArrayChatCompletionRequestAssistantMessageContentPart", - "valueType": { - "$id": "3356", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3357", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartRefusal", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3358", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3359", - "kind": "constant", - "valueType": { - "$ref": "836" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" - }, - { - "$id": "3360", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3361", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" - }, - { - "$id": "3362", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message by the assistant.", - "type": { - "$id": "3363", - "kind": "nullable", - "type": { - "$id": "3364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" - }, - { - "$id": "3365", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `assistant`.", - "type": { - "$id": "3366", - "kind": "constant", - "valueType": { - "$id": "3367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" - }, - { - "$id": "3368", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" - }, - { - "$id": "3370", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3371", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$id": "3372", - "kind": "model", - "name": "ChatCompletionMessageToolCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3373", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" - }, - { - "$id": "3375", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3376", - "kind": "constant", - "valueType": { - "$ref": "839" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" - }, - { - "$id": "3377", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function that the model called.", - "type": { - "$id": "3378", - "kind": "model", - "name": "ChatCompletionMessageToolCallFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3379", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" - }, - { - "$id": "3381", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" - }, - { - "$id": "3383", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3384", - "kind": "nullable", - "type": { - "$id": "3385", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3386", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" - }, - { - "$id": "3388", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" - } - ] - }, - "tool": { - "$id": "3390", - "kind": "model", - "name": "ChatCompletionRequestToolMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", - "usage": "Input,Json", - "discriminatorValue": "tool", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3391", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `tool`.", - "type": { - "$id": "3392", - "kind": "constant", - "valueType": { - "$id": "3393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" - }, - { - "$id": "3394", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the tool message.", - "type": { - "$id": "3395", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContent", - "variantTypes": [ - { - "$id": "3396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3397", - "kind": "array", - "name": "ArrayChatCompletionRequestToolMessageContentPart", - "valueType": { - "$id": "3398", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" - }, - { - "$id": "3399", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "Tool call that this message is responding to.", - "type": { - "$id": "3400", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" - } - ] - }, - "function": { - "$id": "3401", - "kind": "model", - "name": "ChatCompletionRequestFunctionMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3402", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `function`.", - "type": { - "$id": "3403", - "kind": "constant", - "valueType": { - "$id": "3404", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" - }, - { - "$id": "3405", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the function message.", - "type": { - "$id": "3406", - "kind": "nullable", - "type": { - "$id": "3407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" - }, - { - "$id": "3408", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" - }, - { - "$id": "3410", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", - "type": { - "$ref": "842" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" - }, - { - "$id": "3411", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3412", - "kind": "nullable", - "type": { - "$id": "3413", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" - }, - { - "$id": "3414", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", - "type": { - "$id": "3415", - "kind": "nullable", - "type": { - "$id": "3416", - "kind": "dict", - "keyType": { - "$id": "3417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3418", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" - }, - { - "$id": "3419", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", - "type": { - "$id": "3420", - "kind": "nullable", - "type": { - "$id": "3421", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" - }, - { - "$id": "3422", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", - "type": { - "$id": "3423", - "kind": "nullable", - "type": { - "$id": "3424", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" - }, - { - "$id": "3425", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", - "type": { - "$id": "3426", - "kind": "nullable", - "type": { - "$id": "3427", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" - }, - { - "$id": "3428", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", - "type": { - "$id": "3429", - "kind": "nullable", - "type": { - "$id": "3430", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" - }, - { - "$id": "3431", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", - "type": { - "$id": "3432", - "kind": "nullable", - "type": { - "$id": "3433", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" - }, - { - "$id": "3434", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3435", - "kind": "nullable", - "type": { - "$id": "3436", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" - }, - { - "$id": "3437", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", - "type": { - "$id": "3438", - "kind": "model", - "name": "ChatResponseFormat", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3439", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3440", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" - }, - "properties": [ - { - "$ref": "3439" - } - ], - "discriminatedSubtypes": { - "$id": "3441", - "text": { - "$id": "3442", - "kind": "model", - "name": "ChatResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", - "usage": "Input,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3443", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3444", - "kind": "constant", - "valueType": { - "$id": "3445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3446", - "kind": "model", - "name": "ChatResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", - "usage": "Input,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3447", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3448", - "kind": "constant", - "valueType": { - "$id": "3449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3450", - "kind": "model", - "name": "ChatResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", - "access": "public", - "usage": "Input,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3451", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3452", - "kind": "constant", - "valueType": { - "$id": "3453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" - }, - { - "$id": "3454", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" - }, - { - "$id": "3455", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3456", - "kind": "nullable", - "type": { - "$id": "3457", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" - }, - { - "$id": "3458", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", - "type": { - "$id": "3459", - "kind": "nullable", - "type": { - "$ref": "902" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" - }, - { - "$id": "3460", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens.", - "type": { - "$id": "3461", - "kind": "nullable", - "type": { - "$id": "3462", - "kind": "union", - "name": "CreateChatCompletionRequestStop", - "variantTypes": [ - { - "$id": "3463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3464", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" - }, - { - "$id": "3466", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3467", - "kind": "nullable", - "type": { - "$id": "3468", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" - }, - { - "$id": "3469", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3470", - "kind": "nullable", - "type": { - "$ref": "3245" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" - }, - { - "$id": "3471", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3472", - "kind": "nullable", - "type": { - "$id": "3473", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" - }, - { - "$id": "3474", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3475", - "kind": "nullable", - "type": { - "$id": "3476", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" - }, - { - "$id": "3477", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", - "type": { - "$id": "3478", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$id": "3479", - "kind": "model", - "name": "ChatCompletionTool", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3480", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3481", - "kind": "constant", - "valueType": { - "$ref": "908" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" - }, - { - "$id": "3482", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$ref": "1563" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" - }, - { - "$id": "3483", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "3484", - "kind": "union", - "name": "ChatCompletionToolChoiceOption", - "variantTypes": [ - { - "$ref": "911" - }, - { - "$id": "3485", - "kind": "model", - "name": "ChatCompletionNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", - "usage": "Input,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", - "decorators": [], - "properties": [ - { - "$id": "3486", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3487", - "kind": "constant", - "valueType": { - "$ref": "919" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" - }, - { - "$id": "3488", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "3489", - "kind": "model", - "name": "ChatCompletionNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3490", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" - }, - { - "$id": "3492", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "3493", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" - }, - { - "$id": "3494", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" - }, - { - "$id": "3496", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", - "type": { - "$id": "3497", - "kind": "union", - "name": "CreateChatCompletionRequestFunctionCall", - "variantTypes": [ - { - "$id": "3498", - "kind": "constant", - "valueType": { - "$id": "3499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "none", - "decorators": [] - }, - { - "$id": "3500", - "kind": "constant", - "valueType": { - "$id": "3501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "3502", - "kind": "model", - "name": "ChatCompletionFunctionCallOption", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", - "usage": "Input,Json", - "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", - "decorators": [], - "properties": [ - { - "$id": "3503", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" - }, - { - "$id": "3505", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", - "type": { - "$id": "3506", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$id": "3507", - "kind": "model", - "name": "ChatCompletionFunctions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "decorators": [], - "properties": [ - { - "$id": "3508", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "3509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" - }, - { - "$id": "3510", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "3511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" - }, - { - "$id": "3512", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$ref": "1569" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" - } - ] - }, - { - "$ref": "3311" - }, - { - "$ref": "3315" - }, - { - "$ref": "3321" - }, - { - "$ref": "3331" - }, - { - "$ref": "3337" - }, - { - "$ref": "3341" - }, - { - "$ref": "3350" - }, - { - "$ref": "3357" - }, - { - "$ref": "3372" - }, - { - "$ref": "3378" - }, - { - "$ref": "3385" - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - }, - { - "$ref": "3438" - }, - { - "$ref": "3442" - }, - { - "$ref": "3446" - }, - { - "$ref": "3450" - }, - { - "$ref": "3479" - }, - { - "$ref": "3485" - }, - { - "$ref": "3489" - }, - { - "$ref": "3502" - }, - { - "$ref": "3507" - }, - { - "$id": "3513", - "kind": "model", - "name": "CreateChatCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", - "usage": "Output,Json", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3514", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" - }, - { - "$id": "3516", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3517", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3518", - "kind": "model", - "name": "CreateChatCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3519", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$ref": "922" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3520", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3521", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3522", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3523", - "kind": "model", - "name": "ChatCompletionResponseMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", - "usage": "Output,Json", - "description": "A chat completion message generated by the model.", - "decorators": [], - "properties": [ - { - "$id": "3524", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the message.", - "type": { - "$id": "3525", - "kind": "nullable", - "type": { - "$id": "3526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" - }, - { - "$id": "3527", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3528", - "kind": "nullable", - "type": { - "$id": "3529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" - }, - { - "$id": "3530", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3531", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$ref": "3372" - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" - }, - { - "$id": "3532", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3533", - "kind": "constant", - "valueType": { - "$ref": "934" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" - }, - { - "$id": "3534", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3535", - "kind": "model", - "name": "ChatCompletionResponseMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3536", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" - }, - { - "$id": "3538", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" - }, - { - "$id": "3540", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "3541", - "kind": "nullable", - "type": { - "$id": "3542", - "kind": "model", - "name": "CreateChatCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3543", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "3544", - "kind": "nullable", - "type": { - "$id": "3545", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$id": "3546", - "kind": "model", - "name": "ChatCompletionTokenLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3547", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" - }, - { - "$id": "3549", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3550", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" - }, - { - "$id": "3551", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3552", - "kind": "nullable", - "type": { - "$id": "3553", - "kind": "array", - "name": "ChatCompletionTokenLogprobBytes", - "valueType": { - "$id": "3554", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" - }, - { - "$id": "3555", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", - "type": { - "$id": "3556", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3557", - "kind": "model", - "name": "ChatCompletionTokenLogprobTopLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3558", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3559", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" - }, - { - "$id": "3560", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3561", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" - }, - { - "$id": "3562", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3563", - "kind": "nullable", - "type": { - "$id": "3564", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3565", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "3566", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "3567", - "kind": "nullable", - "type": { - "$id": "3568", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" - }, - { - "$id": "3569", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3570", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" - }, - { - "$id": "3572", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" - }, - { - "$id": "3574", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "3575", - "kind": "nullable", - "type": { - "$ref": "937" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" - }, - { - "$id": "3576", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" - }, - { - "$id": "3578", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3579", - "kind": "constant", - "valueType": { - "$ref": "943" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" - }, - { - "$id": "3580", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" - } - ] - }, - { - "$ref": "3518" - }, - { - "$ref": "3523" - }, - { - "$ref": "3535" - }, - { - "$ref": "3542" - }, - { - "$ref": "3546" - }, - { - "$ref": "3557" - }, - { - "$id": "3581", - "kind": "model", - "name": "CreateBatchRequest", - "crossLanguageDefinitionId": "createBatch.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ - { - "$id": "3582", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", - "type": { - "$id": "3583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" - }, - { - "$id": "3584", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", - "type": { - "$ref": "946" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" - }, - { - "$id": "3585", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", - "type": { - "$id": "3586", - "kind": "constant", - "valueType": { - "$ref": "952" - }, - "value": "24h", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" - }, - { - "$id": "3587", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Optional custom metadata for the batch.", - "type": { - "$id": "3588", - "kind": "nullable", - "type": { - "$id": "3589", - "kind": "dict", - "keyType": { - "$id": "3590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" - } - ] - }, - { - "$id": "3592", - "kind": "model", - "name": "Batch", - "crossLanguageDefinitionId": "OpenAI.Batch", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3593", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.id" - }, - { - "$id": "3595", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `batch`.", - "type": { - "$id": "3596", - "kind": "constant", - "valueType": { - "$ref": "955" - }, - "value": "batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.object" - }, - { - "$id": "3597", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The OpenAI API endpoint used by the batch.", - "type": { - "$id": "3598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" - }, - { - "$id": "3599", - "kind": "property", - "name": "errors", - "serializedName": "errors", - "type": { - "$id": "3600", - "kind": "model", - "name": "BatchErrors", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3601", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `list`.", - "type": { - "$id": "3602", - "kind": "constant", - "valueType": { - "$ref": "958" - }, - "value": "list", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" - }, - { - "$id": "3603", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3604", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3605", - "kind": "model", - "name": "BatchErrorsDatum", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3606", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "An error code identifying the error type.", - "type": { - "$id": "3607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" - }, - { - "$id": "3608", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable message providing more details about the error.", - "type": { - "$id": "3609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" - }, - { - "$id": "3610", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The name of the parameter that caused the error, if applicable.", - "type": { - "$id": "3611", - "kind": "nullable", - "type": { - "$id": "3612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" - }, - { - "$id": "3613", - "kind": "property", - "name": "line", - "serializedName": "line", - "description": "The line number of the input file where the error occurred, if applicable.", - "type": { - "$id": "3614", - "kind": "nullable", - "type": { - "$id": "3615", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors" - }, - { - "$id": "3616", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of the input file for the batch.", - "type": { - "$id": "3617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" - }, - { - "$id": "3618", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed.", - "type": { - "$id": "3619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" - }, - { - "$id": "3620", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the batch.", - "type": { - "$ref": "961" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.status" - }, - { - "$id": "3621", - "kind": "property", - "name": "output_file_id", - "serializedName": "output_file_id", - "description": "The ID of the file containing the outputs of successfully executed requests.", - "type": { - "$id": "3622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" - }, - { - "$id": "3623", - "kind": "property", - "name": "error_file_id", - "serializedName": "error_file_id", - "description": "The ID of the file containing the outputs of requests with errors.", - "type": { - "$id": "3624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" - }, - { - "$id": "3625", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the batch was created.", - "type": { - "$id": "3626", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3627", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.created_at" - }, - { - "$id": "3628", - "kind": "property", - "name": "in_progress_at", - "serializedName": "in_progress_at", - "description": "The Unix timestamp (in seconds) for when the batch started processing.", - "type": { - "$id": "3629", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3630", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" - }, - { - "$id": "3631", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the batch will expire.", - "type": { - "$id": "3632", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3633", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" - }, - { - "$id": "3634", - "kind": "property", - "name": "finalizing_at", - "serializedName": "finalizing_at", - "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", - "type": { - "$id": "3635", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3636", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" - }, - { - "$id": "3637", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the batch was completed.", - "type": { - "$id": "3638", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3639", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" - }, - { - "$id": "3640", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the batch failed.", - "type": { - "$id": "3641", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3642", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" - }, - { - "$id": "3643", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the batch expired.", - "type": { - "$id": "3644", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3645", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" - }, - { - "$id": "3646", - "kind": "property", - "name": "cancelling_at", - "serializedName": "cancelling_at", - "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", - "type": { - "$id": "3647", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3648", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" - }, - { - "$id": "3649", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", - "type": { - "$id": "3650", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3651", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" - }, - { - "$id": "3652", - "kind": "property", - "name": "request_counts", - "serializedName": "request_counts", - "description": "The request counts for different statuses within the batch.", - "type": { - "$id": "3653", - "kind": "model", - "name": "BatchRequestCounts", - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3654", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "Total number of requests in the batch.", - "type": { - "$id": "3655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" - }, - { - "$id": "3656", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "Number of requests that have been completed successfully.", - "type": { - "$id": "3657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" - }, - { - "$id": "3658", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "Number of requests that have failed.", - "type": { - "$id": "3659", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" - }, - { - "$id": "3660", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3661", - "kind": "nullable", - "type": { - "$id": "3662", - "kind": "dict", - "keyType": { - "$id": "3663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.metadata" - } - ] - }, - { - "$ref": "3600" - }, - { - "$ref": "3605" - }, - { - "$ref": "3653" - }, - { - "$id": "3665", - "kind": "model", - "name": "ListBatchesResponse", - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3666", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3667", - "kind": "array", - "name": "ArrayBatch", - "valueType": { - "$ref": "3592" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" - }, - { - "$id": "3668", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" - }, - { - "$id": "3670", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" - }, - { - "$id": "3672", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" - }, - { - "$id": "3674", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3675", - "kind": "constant", - "valueType": { - "$ref": "979" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" - } - ] - }, - { - "$id": "3676", - "kind": "model", - "name": "CreateAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3677", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "982" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" - }, - { - "$id": "3678", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3679", - "kind": "nullable", - "type": { - "$id": "3680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" - }, - { - "$id": "3681", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3682", - "kind": "nullable", - "type": { - "$id": "3683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" - }, - { - "$id": "3684", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3685", - "kind": "nullable", - "type": { - "$id": "3686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" - }, - { - "$id": "3687", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3688", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" - }, - { - "$id": "3689", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3690", - "kind": "nullable", - "type": { - "$id": "3691", - "kind": "model", - "name": "CreateAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3692", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3693", - "kind": "model", - "name": "CreateAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3694", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3695", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3697", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1594" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" - }, - { - "$id": "3698", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3699", - "kind": "nullable", - "type": { - "$id": "3700", - "kind": "dict", - "keyType": { - "$id": "3701", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" - }, - { - "$id": "3703", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3704", - "kind": "nullable", - "type": { - "$id": "3705", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" - }, - { - "$id": "3706", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3707", - "kind": "nullable", - "type": { - "$id": "3708", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" - }, - { - "$id": "3709", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3710", - "kind": "nullable", - "type": { - "$id": "3711", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3712", - "kind": "constant", - "valueType": { - "$id": "3713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3691" - }, - { - "$ref": "3693" - }, - { - "$id": "3714", - "kind": "model", - "name": "AssistantObject", - "crossLanguageDefinitionId": "OpenAI.AssistantObject", - "usage": "Output,Json", - "description": "Represents an `assistant` that can call the model and use tools.", - "decorators": [], - "properties": [ - { - "$id": "3715", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "3716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" - }, - { - "$id": "3717", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `assistant`.", - "type": { - "$id": "3718", - "kind": "constant", - "valueType": { - "$ref": "1030" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" - }, - { - "$id": "3719", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the assistant was created.", - "type": { - "$id": "3720", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3721", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" - }, - { - "$id": "3722", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3723", - "kind": "nullable", - "type": { - "$id": "3724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" - }, - { - "$id": "3725", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3726", - "kind": "nullable", - "type": { - "$id": "3727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" - }, - { - "$id": "3728", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3729", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" - }, - { - "$id": "3730", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3731", - "kind": "nullable", - "type": { - "$id": "3732", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" - }, - { - "$id": "3733", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3734", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" - }, - { - "$id": "3735", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3736", - "kind": "nullable", - "type": { - "$id": "3737", - "kind": "model", - "name": "AssistantObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3738", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3739", - "kind": "model", - "name": "AssistantObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3740", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3741", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3743", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" - }, - { - "$id": "3744", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3745", - "kind": "nullable", - "type": { - "$id": "3746", - "kind": "dict", - "keyType": { - "$id": "3747", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" - }, - { - "$id": "3749", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3750", - "kind": "nullable", - "type": { - "$id": "3751", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" - }, - { - "$id": "3752", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3753", - "kind": "nullable", - "type": { - "$id": "3754", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" - }, - { - "$id": "3755", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3756", - "kind": "nullable", - "type": { - "$id": "3757", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3758", - "kind": "constant", - "valueType": { - "$id": "3759", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" - } - ] - }, - { - "$ref": "3737" - }, - { - "$ref": "3739" - }, - { - "$id": "3760", - "kind": "model", - "name": "ListAssistantsResponse", - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3761", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3762", - "kind": "constant", - "valueType": { - "$ref": "1039" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" - }, - { - "$id": "3763", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3764", - "kind": "array", - "name": "ArrayAssistantObject", - "valueType": { - "$ref": "3714" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" - }, - { - "$id": "3765", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3766", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" - }, - { - "$id": "3767", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" - }, - { - "$id": "3769", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3770", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" - } - ] - }, - { - "$id": "3771", - "kind": "model", - "name": "ModifyAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3772", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" - }, - { - "$id": "3774", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3775", - "kind": "nullable", - "type": { - "$id": "3776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" - }, - { - "$id": "3777", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3778", - "kind": "nullable", - "type": { - "$id": "3779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" - }, - { - "$id": "3780", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3781", - "kind": "nullable", - "type": { - "$id": "3782", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" - }, - { - "$id": "3783", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3784", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" - }, - { - "$id": "3785", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3786", - "kind": "nullable", - "type": { - "$id": "3787", - "kind": "model", - "name": "ModifyAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3788", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3789", - "kind": "model", - "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3790", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3791", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3793", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" - }, - { - "$id": "3794", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3795", - "kind": "nullable", - "type": { - "$id": "3796", - "kind": "dict", - "keyType": { - "$id": "3797", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" - }, - { - "$id": "3799", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3800", - "kind": "nullable", - "type": { - "$id": "3801", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" - }, - { - "$id": "3802", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3803", - "kind": "nullable", - "type": { - "$id": "3804", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" - }, - { - "$id": "3805", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3806", - "kind": "nullable", - "type": { - "$id": "3807", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3808", - "kind": "constant", - "valueType": { - "$id": "3809", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3787" - }, - { - "$ref": "3789" - }, - { - "$id": "3810", - "kind": "model", - "name": "DeleteAssistantResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3811", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" - }, - { - "$id": "3813", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3814", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" - }, - { - "$id": "3815", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3816", - "kind": "constant", - "valueType": { - "$ref": "1042" - }, - "value": "assistant.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" - } - ] - }, - { - "$id": "3817", - "kind": "model", - "name": "CreateSpeechRequest", - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3818", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", - "type": { - "$ref": "1045" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" - }, - { - "$id": "3819", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The text to generate audio for. The maximum length is 4096 characters.", - "type": { - "$id": "3820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" - }, - { - "$id": "3821", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", - "type": { - "$ref": "1051" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" - }, - { - "$id": "3822", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", - "type": { - "$ref": "1065" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" - }, - { - "$id": "3823", - "kind": "property", - "name": "speed", - "serializedName": "speed", - "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", - "type": { - "$id": "3824", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" - } - ] - }, - { - "$id": "3825", - "kind": "model", - "name": "CreateTranscriptionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3826", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3827", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" - }, - { - "$id": "3828", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1079" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" - }, - { - "$id": "3829", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", - "type": { - "$id": "3830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" - }, - { - "$id": "3831", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", - "type": { - "$id": "3832", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" - }, - { - "$id": "3833", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1083" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" - }, - { - "$id": "3834", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3835", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" - }, - { - "$id": "3836", - "kind": "property", - "name": "timestamp_granularities", - "serializedName": "timestamp_granularities", - "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", - "type": { - "$id": "3837", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "1095" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" - } - ] - }, - { - "$id": "3838", - "kind": "model", - "name": "CreateTranscriptionResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", - "usage": "Output,Json", - "description": "Represents a verbose json transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3839", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3840", - "kind": "constant", - "valueType": { - "$ref": "1101" - }, - "value": "transcribe", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" - }, - { - "$id": "3841", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio.", - "type": { - "$id": "3842", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" - }, - { - "$id": "3843", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3844", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3845", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" - }, - { - "$id": "3846", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" - }, - { - "$id": "3848", - "kind": "property", - "name": "words", - "serializedName": "words", - "description": "Extracted words and their corresponding timestamps.", - "type": { - "$id": "3849", - "kind": "array", - "name": "ArrayTranscriptionWord", - "valueType": { - "$id": "3850", - "kind": "model", - "name": "TranscriptionWord", - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3851", - "kind": "property", - "name": "word", - "serializedName": "word", - "description": "The text content of the word.", - "type": { - "$id": "3852", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" - }, - { - "$id": "3853", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the word in seconds.", - "type": { - "$id": "3854", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3855", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" - }, - { - "$id": "3856", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the word in seconds.", - "type": { - "$id": "3857", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3858", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" - }, - { - "$id": "3859", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the transcribed text and their corresponding details.", - "type": { - "$id": "3860", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$id": "3861", - "kind": "model", - "name": "TranscriptionSegment", - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3862", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "Unique identifier of the segment.", - "type": { - "$id": "3863", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" - }, - { - "$id": "3864", - "kind": "property", - "name": "seek", - "serializedName": "seek", - "description": "Seek offset of the segment.", - "type": { - "$id": "3865", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" - }, - { - "$id": "3866", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the segment in seconds.", - "type": { - "$id": "3867", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3868", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" - }, - { - "$id": "3869", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the segment in seconds.", - "type": { - "$id": "3870", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3871", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" - }, - { - "$id": "3872", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content of the segment.", - "type": { - "$id": "3873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" - }, - { - "$id": "3874", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "description": "Array of token IDs for the text content.", - "type": { - "$id": "3875", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3876", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" - }, - { - "$id": "3877", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "Temperature parameter used for generating the segment.", - "type": { - "$id": "3878", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" - }, - { - "$id": "3879", - "kind": "property", - "name": "avg_logprob", - "serializedName": "avg_logprob", - "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", - "type": { - "$id": "3880", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" - }, - { - "$id": "3881", - "kind": "property", - "name": "compression_ratio", - "serializedName": "compression_ratio", - "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", - "type": { - "$id": "3882", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" - }, - { - "$id": "3883", - "kind": "property", - "name": "no_speech_prob", - "serializedName": "no_speech_prob", - "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", - "type": { - "$id": "3884", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" - } - ] - }, - { - "$ref": "3850" - }, - { - "$ref": "3861" - }, - { - "$id": "3885", - "kind": "model", - "name": "CreateTranscriptionResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", - "usage": "Output,Json", - "description": "Represents a transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3886", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" - } - ] - }, - { - "$id": "3888", - "kind": "model", - "name": "CreateTranslationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3889", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3890", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" - }, - { - "$id": "3891", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1104" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" - }, - { - "$id": "3892", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", - "type": { - "$id": "3893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" - }, - { - "$id": "3894", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1108" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" - }, - { - "$id": "3895", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3896", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" - } - ] - }, - { - "$id": "3897", - "kind": "model", - "name": "CreateTranslationResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3898", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3899", - "kind": "constant", - "valueType": { - "$ref": "1120" - }, - "value": "translate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" - }, - { - "$id": "3900", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the output translation (always `english`).", - "type": { - "$id": "3901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" - }, - { - "$id": "3902", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3903", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3904", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" - }, - { - "$id": "3905", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The translated text.", - "type": { - "$id": "3906", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" - }, - { - "$id": "3907", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the translated text and their corresponding details.", - "type": { - "$id": "3908", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$ref": "3861" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" - } - ] - }, - { - "$id": "3909", - "kind": "model", - "name": "CreateTranslationResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3910", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3911", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" - } - ] - }, - { - "$id": "3912", - "kind": "model", - "name": "AssistantResponseFormat", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", - "access": "public", - "usage": "Input", - "decorators": [], - "discriminatorProperty": { - "$id": "3913", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" - }, - "properties": [ - { - "$ref": "3913" - } - ], - "discriminatedSubtypes": { - "$id": "3915", - "text": { - "$id": "3916", - "kind": "model", - "name": "AssistantResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", - "usage": "Input", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3917", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3918", - "kind": "constant", - "valueType": { - "$id": "3919", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3920", - "kind": "model", - "name": "AssistantResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", - "usage": "Input", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3921", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3922", - "kind": "constant", - "valueType": { - "$id": "3923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3924", - "kind": "model", - "name": "AssistantResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", - "usage": "Input", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3925", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3926", - "kind": "constant", - "valueType": { - "$id": "3927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" - }, - { - "$id": "3928", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - { - "$ref": "3916" - }, - { - "$ref": "3920" - }, - { - "$ref": "3924" - }, - { - "$id": "3929", - "kind": "model", - "name": "BatchRequestInput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line object of the batch input file", - "decorators": [], - "properties": [ - { - "$id": "3930", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", - "type": { - "$id": "3931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" - }, - { - "$id": "3932", - "kind": "property", - "name": "method", - "serializedName": "method", - "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", - "type": { - "$id": "3933", - "kind": "constant", - "valueType": { - "$ref": "1123" - }, - "value": "POST", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" - }, - { - "$id": "3934", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", - "type": { - "$id": "3935", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" - } - ] - }, - { - "$id": "3936", - "kind": "model", - "name": "BatchRequestOutput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", - "access": "public", - "usage": "Output", - "description": "The per-line object of the batch output and error files", - "decorators": [], - "properties": [ - { - "$id": "3937", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" - }, - { - "$id": "3939", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs.", - "type": { - "$id": "3940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" - }, - { - "$id": "3941", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "3942", - "kind": "nullable", - "type": { - "$id": "3943", - "kind": "model", - "name": "BatchRequestOutputResponse", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3944", - "kind": "property", - "name": "status_code", - "serializedName": "status_code", - "description": "The HTTP status code of the response", - "type": { - "$id": "3945", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" - }, - { - "$id": "3946", - "kind": "property", - "name": "request_id", - "serializedName": "request_id", - "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", - "type": { - "$id": "3947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" - }, - { - "$id": "3948", - "kind": "property", - "name": "body", - "serializedName": "body", - "description": "The JSON body of the response", - "type": { - "$id": "3949", - "kind": "dict", - "keyType": { - "$id": "3950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3951", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" - }, - { - "$id": "3952", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", - "type": { - "$id": "3953", - "kind": "nullable", - "type": { - "$id": "3954", - "kind": "model", - "name": "BatchRequestOutputError", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3955", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "3956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" - }, - { - "$id": "3957", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "3958", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" - } - ] - }, - { - "$ref": "3943" - }, - { - "$ref": "3954" - }, - { - "$id": "3959", - "kind": "model", - "name": "ChatCompletionFunctionChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3960", - "kind": "model", - "name": "ChatCompletionToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3961", - "kind": "model", - "name": "ChatMessageContent", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3962", - "kind": "model", - "name": "ChatMessageContentPart", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3963", - "kind": "model", - "name": "CreateChatCompletionFunctionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", - "access": "public", - "usage": "Output", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3964", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3965", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" - }, - { - "$id": "3966", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3967", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3968", - "kind": "model", - "name": "CreateChatCompletionFunctionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3969", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", - "type": { - "$ref": "1126" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3970", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3971", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" - }, - { - "$id": "3972", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$ref": "3523" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" - }, - { - "$id": "3973", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3974", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3975", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" - }, - { - "$id": "3976", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" - }, - { - "$id": "3978", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" - }, - { - "$id": "3980", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3981", - "kind": "constant", - "valueType": { - "$ref": "1136" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" - }, - { - "$id": "3982", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" - } - ] - }, - { - "$ref": "3968" - }, - { - "$id": "3983", - "kind": "model", - "name": "ChatCompletionStreamResponseDelta", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", - "usage": "Output", - "description": "A chat completion delta generated by streamed model responses.", - "decorators": [], - "properties": [ - { - "$id": "3984", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the chunk message.", - "type": { - "$id": "3985", - "kind": "nullable", - "type": { - "$id": "3986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" - }, - { - "$id": "3987", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3988", - "kind": "model", - "name": "ChatCompletionStreamResponseDeltaFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3989", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3990", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" - }, - { - "$id": "3991", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3992", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" - }, - { - "$id": "3993", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3994", - "kind": "array", - "name": "ArrayChatCompletionMessageToolCallChunk", - "valueType": { - "$id": "3995", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunk", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3996", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3997", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" - }, - { - "$id": "3998", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" - }, - { - "$id": "4000", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "4001", - "kind": "constant", - "valueType": { - "$ref": "1139" - }, - "value": "function", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" - }, - { - "$id": "4002", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "4003", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunkFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4004", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "4005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" - }, - { - "$id": "4006", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "4007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" - }, - { - "$id": "4008", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$ref": "1142" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" - }, - { - "$id": "4009", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "4010", - "kind": "nullable", - "type": { - "$id": "4011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" - } - ] - }, - { - "$ref": "3988" - }, - { - "$ref": "3995" - }, - { - "$ref": "4003" - }, - { - "$id": "4012", - "kind": "model", - "name": "CreateChatCompletionStreamResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", - "access": "public", - "usage": "Output", - "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "4013", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion. Each chunk has the same ID.", - "type": { - "$id": "4014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" - }, - { - "$id": "4015", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", - "type": { - "$id": "4016", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4017", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4018", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$ref": "3983" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" - }, - { - "$id": "4019", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "4020", - "kind": "nullable", - "type": { - "$id": "4021", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4022", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "4023", - "kind": "nullable", - "type": { - "$id": "4024", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "4025", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "4026", - "kind": "nullable", - "type": { - "$id": "4027", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" - }, - { - "$id": "4028", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$id": "4029", - "kind": "nullable", - "type": { - "$ref": "1152" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" - }, - { - "$id": "4030", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "4031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" - }, - { - "$id": "4032", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", - "type": { - "$id": "4033", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "4034", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" - }, - { - "$id": "4035", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to generate the completion.", - "type": { - "$id": "4036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" - }, - { - "$id": "4037", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "4038", - "kind": "nullable", - "type": { - "$ref": "1164" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" - }, - { - "$id": "4039", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "4040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" - }, - { - "$id": "4041", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion.chunk`.", - "type": { - "$id": "4042", - "kind": "constant", - "valueType": { - "$ref": "1170" - }, - "value": "chat.completion.chunk", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" - }, - { - "$id": "4043", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", - "type": { - "$id": "4044", - "kind": "model", - "name": "CreateChatCompletionStreamResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4045", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "4046", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" - }, - { - "$id": "4047", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "4048", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "4049", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "4050", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" - } - ] - }, - { - "$ref": "4017" - }, - { - "$ref": "4021" - }, - { - "$ref": "4044" - }, - { - "$id": "4051", - "kind": "model", - "name": "FinetuneChatRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for chat models", - "decorators": [], - "properties": [ - { - "$id": "4052", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "type": { - "$id": "4053", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4054", - "kind": "union", - "name": "FinetuneChatRequestInputMessage", - "variantTypes": [ - { - "$ref": "3315" - }, - { - "$ref": "3331" - }, - { - "$id": "4055", - "kind": "model", - "name": "FineTuneChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", - "usage": "Input", - "decorators": [], - "baseModel": { - "$ref": "3350" - }, - "properties": [] - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" - }, - { - "$id": "4056", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may generate JSON inputs for.", - "type": { - "$id": "4057", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$ref": "3479" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" - }, - { - "$id": "4058", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "4059", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" - }, - { - "$id": "4060", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "A list of functions the model may generate JSON inputs for.", - "type": { - "$id": "4061", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$ref": "3507" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" - } - ] - }, - { - "$ref": "4055" - }, - { - "$id": "4062", - "kind": "model", - "name": "FinetuneCompletionRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for completions models", - "decorators": [], - "properties": [ - { - "$id": "4063", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The input prompt for this training example.", - "type": { - "$id": "4064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" - }, - { - "$id": "4065", - "kind": "property", - "name": "completion", - "serializedName": "completion", - "description": "The desired completion for this training example.", - "type": { - "$id": "4066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" - } - ] - }, - { - "$id": "4067", - "kind": "model", - "name": "MessageContentTextObjectAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4068", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4069", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" - }, - "properties": [ - { - "$ref": "4068" - } - ], - "discriminatedSubtypes": { - "$id": "4070", - "file_citation": { - "$id": "4071", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Input,Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4072", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4073", - "kind": "constant", - "valueType": { - "$id": "4074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4075", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4077", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4078", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4079", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4081", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4082", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4083", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4084", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4085", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Input,Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4086", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4087", - "kind": "constant", - "valueType": { - "$id": "4088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4089", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4091", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4092", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4093", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4095", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4096", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4097", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4098", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - { - "$ref": "4071" - }, - { - "$ref": "4078" - }, - { - "$ref": "4085" - }, - { - "$ref": "4092" - }, - { - "$id": "4099", - "kind": "model", - "name": "MessageDeltaContent", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", - "access": "public", - "usage": "Output", - "description": "Represents a single piece of incremental content in an Assistants API streaming response.", - "decorators": [], - "discriminatorProperty": { - "$id": "4100", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" - }, - "properties": [ - { - "$ref": "4100" - } - ], - "discriminatedSubtypes": { - "$id": "4102", - "image_file": { - "$id": "4103", - "kind": "model", - "name": "MessageDeltaContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", - "access": "public", - "usage": "Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "discriminatorValue": "image_file", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4104", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4105", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" - }, - { - "$id": "4106", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4107", - "kind": "constant", - "valueType": { - "$id": "4108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" - }, - { - "$id": "4109", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4110", - "kind": "model", - "name": "MessageDeltaContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4111", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4113", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1173" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" - } - ] - }, - "image_url": { - "$id": "4114", - "kind": "model", - "name": "MessageDeltaContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", - "access": "public", - "usage": "Output", - "description": "References an image URL in the content of a message.", - "discriminatorValue": "image_url", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4115", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4116", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" - }, - { - "$id": "4117", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_url`.", - "type": { - "$id": "4118", - "kind": "constant", - "valueType": { - "$id": "4119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" - }, - { - "$id": "4120", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4121", - "kind": "model", - "name": "MessageDeltaContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4122", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4123", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4124", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1181" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" - } - ] - }, - "text": { - "$id": "4125", - "kind": "model", - "name": "MessageDeltaContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", - "access": "public", - "usage": "Output", - "description": "The text content that is part of a message.", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4126", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4127", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" - }, - { - "$id": "4128", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4129", - "kind": "constant", - "valueType": { - "$id": "4130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" - }, - { - "$id": "4131", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4132", - "kind": "model", - "name": "MessageDeltaContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4133", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" - }, - { - "$id": "4135", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4136", - "kind": "array", - "name": "ArrayMessageDeltaTextContentAnnotation", - "valueType": { - "$id": "4137", - "kind": "model", - "name": "MessageDeltaTextContentAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", - "access": "public", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4138", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4139", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" - }, - "properties": [ - { - "$ref": "4138" - } - ], - "discriminatedSubtypes": { - "$id": "4140", - "file_citation": { - "$id": "4141", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4142", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4143", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" - }, - { - "$id": "4144", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4145", - "kind": "constant", - "valueType": { - "$id": "4146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4147", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4149", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4150", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4151", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - }, - { - "$id": "4153", - "kind": "property", - "name": "quote", - "serializedName": "quote", - "description": "The specific quote in the file.", - "type": { - "$id": "4154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4155", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4156", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4157", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4158", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4159", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4160", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4161", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" - }, - { - "$id": "4162", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4163", - "kind": "constant", - "valueType": { - "$id": "4164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4165", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4166", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4167", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4168", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4169", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4171", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4172", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4173", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" - } - ] - }, - "refusal": { - "$id": "4175", - "kind": "model", - "name": "MessageDeltaContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", - "usage": "Output", - "description": "The refusal content that is part of a message.", - "discriminatorValue": "refusal", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4176", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the refusal part in the message.", - "type": { - "$id": "4177", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" - }, - { - "$id": "4178", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4179", - "kind": "constant", - "valueType": { - "$id": "4180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" - }, - { - "$id": "4181", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" - } - ] - } - } - }, - { - "$ref": "4103" - }, - { - "$ref": "4110" - }, - { - "$ref": "4114" - }, - { - "$ref": "4121" - }, - { - "$ref": "4125" - }, - { - "$ref": "4132" - }, - { - "$ref": "4137" - }, - { - "$ref": "4141" - }, - { - "$ref": "4150" - }, - { - "$ref": "4159" - }, - { - "$ref": "4168" - }, - { - "$ref": "4175" - }, - { - "$id": "4183", - "kind": "model", - "name": "MessageContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4184", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4185", - "kind": "constant", - "valueType": { - "$ref": "1189" - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" - }, - { - "$id": "4186", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4187", - "kind": "model", - "name": "MessageContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4188", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4190", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1192" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" - } - ] - }, - { - "$ref": "4187" - }, - { - "$id": "4191", - "kind": "model", - "name": "MessageContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4192", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4193", - "kind": "constant", - "valueType": { - "$ref": "1200" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" - }, - { - "$id": "4194", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4195", - "kind": "model", - "name": "MessageContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4196", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" - }, - { - "$id": "4198", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4199", - "kind": "array", - "name": "ArrayMessageContentTextObjectAnnotation", - "valueType": { - "$ref": "4067" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" - } - ] - }, - { - "$ref": "4195" - }, - { - "$id": "4200", - "kind": "model", - "name": "MessageContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", - "access": "public", - "usage": "Input,Output", - "description": "The refusal content generated by the assistant.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4201", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4202", - "kind": "constant", - "valueType": { - "$ref": "1203" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" - }, - { - "$id": "4203", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" - } - ] - }, - { - "$id": "4205", - "kind": "model", - "name": "MessageContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image URL in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4206", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "4207", - "kind": "constant", - "valueType": { - "$ref": "1206" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" - }, - { - "$id": "4208", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4209", - "kind": "model", - "name": "MessageContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4210", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4211", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4212", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", - "type": { - "$ref": "1209" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" - } - ] - }, - { - "$ref": "4209" - }, - { - "$id": "4213", - "kind": "model", - "name": "MessageDeltaObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a message delta i.e. any changed fields on a message during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4214", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the message, which can be referenced in API endpoints.", - "type": { - "$id": "4215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" - }, - { - "$id": "4216", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message.delta`.", - "type": { - "$id": "4217", - "kind": "constant", - "valueType": { - "$ref": "1217" - }, - "value": "thread.message.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" - }, - { - "$id": "4218", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the Message.", - "type": { - "$id": "4219", - "kind": "model", - "name": "MessageDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4220", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "1220" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" - }, - { - "$id": "4221", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "4222", - "kind": "array", - "name": "ArrayMessageDeltaContent", - "valueType": { - "$ref": "4099" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" - } - ] - }, - { - "$ref": "4219" - }, - { - "$id": "4223", - "kind": "model", - "name": "MessageRequestContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4224", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4225", - "kind": "constant", - "valueType": { - "$ref": "1226" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" - }, - { - "$id": "4226", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content to be sent to the model", - "type": { - "$id": "4227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" - } - ] - }, - { - "$id": "4228", - "kind": "model", - "name": "RunStepDeltaStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4229", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" - }, - "properties": [ - { - "$ref": "4229" - } - ], - "discriminatedSubtypes": { - "$id": "4231", - "message_creation": { - "$id": "4232", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", - "access": "public", - "usage": "Output", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4233", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "4234", - "kind": "constant", - "valueType": { - "$id": "4235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" - }, - { - "$id": "4236", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "4237", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4238", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "4239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "4240", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", - "access": "public", - "usage": "Output", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4241", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "4242", - "kind": "constant", - "valueType": { - "$id": "4243", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" - }, - { - "$id": "4244", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "4245", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "4246", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "4247", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "4247" - } - ], - "discriminatedSubtypes": { - "$id": "4249", - "code_interpreter": { - "$id": "4250", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", - "access": "public", - "usage": "Output", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4251", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" - }, - { - "$id": "4253", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "4254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "4255", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "4256", - "kind": "constant", - "valueType": { - "$id": "4257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "4258", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "4259", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4260", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "4261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "4262", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "4263", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "4264", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "4265", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "4265" - } - ], - "discriminatedSubtypes": { - "$id": "4267", - "logs": { - "$id": "4268", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "access": "public", - "usage": "Output", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4269", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" - }, - { - "$id": "4271", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "4272", - "kind": "constant", - "valueType": { - "$id": "4273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "4274", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "4275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "4276", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4277", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4278", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" - }, - { - "$id": "4279", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "4280", - "kind": "constant", - "valueType": { - "$id": "4281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "4282", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "4283", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4284", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "4285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "4286", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4287", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4288", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" - }, - { - "$id": "4289", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "4291", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "4292", - "kind": "constant", - "valueType": { - "$id": "4293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "4294", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "4295", - "kind": "dict", - "keyType": { - "$id": "4296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "4297", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "4298", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4299", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4300", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" - }, - { - "$id": "4301", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "4303", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "4304", - "kind": "constant", - "valueType": { - "$id": "4305", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "4306", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "4307", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4308", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "4309", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "4310", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "4311", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "4312", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "4313", - "kind": "nullable", - "type": { - "$id": "4314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - { - "$ref": "4232" - }, - { - "$ref": "4237" - }, - { - "$ref": "4240" - }, - { - "$ref": "4246" - }, - { - "$ref": "4250" - }, - { - "$ref": "4259" - }, - { - "$ref": "4264" - }, - { - "$ref": "4268" - }, - { - "$ref": "4276" - }, - { - "$ref": "4283" - }, - { - "$ref": "4286" - }, - { - "$ref": "4298" - }, - { - "$ref": "4307" - }, - { - "$id": "4315", - "kind": "model", - "name": "RunStepDeltaObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4316", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "4317", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" - }, - { - "$id": "4318", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step.delta`.", - "type": { - "$id": "4319", - "kind": "constant", - "valueType": { - "$ref": "1229" - }, - "value": "thread.run.step.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" - }, - { - "$id": "4320", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the run step.", - "type": { - "$id": "4321", - "kind": "model", - "name": "RunStepDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4322", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$ref": "4228" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" - } - ] - }, - { - "$ref": "4321" - }, - { - "$id": "4323", - "kind": "model", - "name": "CreateThreadRequestToolResourcesFileSearchBase", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "4324", - "kind": "model", - "name": "ListThreadsResponse", - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", - "access": "public", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "4326", - "kind": "constant", - "valueType": { - "$ref": "1232" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" - }, - { - "$id": "4327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "4328", - "kind": "array", - "name": "ArrayThreadObject", - "valueType": { - "$ref": "2052" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" - }, - { - "$id": "4329", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "4330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" - }, - { - "$id": "4331", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "4332", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" - }, - { - "$id": "4333", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "4334", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" - } - ] - } - ], - "Clients": [ - { - "$id": "4335", - "Name": "OpenAIClient", - "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", - "Operations": [], - "Protocol": { - "$id": "4336" - }, - "Parameters": [ - { - "$id": "4337", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4338", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4339", - "Type": { - "$id": "4340", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - } - ], - "Decorators": [] - }, - { - "$id": "4341", - "Name": "Audio", - "Operations": [ - { - "$id": "4342", - "Name": "createSpeech", - "ResourceName": "Audio", - "Summary": "Generates audio from the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4343", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4344", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4345", - "Type": { - "$id": "4346", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4347", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4348", - "kind": "constant", - "valueType": { - "$id": "4349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4350", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4351", - "kind": "constant", - "valueType": { - "$id": "4352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4353", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3817" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4354", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4355", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4356", - "Name": "transferEncoding", - "NameInResponse": "Transfer-Encoding", - "Description": "chunked", - "Type": { - "$id": "4357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "$id": "4358", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4359", - "kind": "constant", - "valueType": { - "$id": "4360", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/octet-stream" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/speech", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", - "Decorators": [] - }, - { - "$id": "4361", - "Name": "createTranscription", - "ResourceName": "Audio", - "Summary": "Transcribes audio into the input language.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4362", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4363", - "kind": "constant", - "valueType": { - "$id": "4364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4365", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4366", - "kind": "constant", - "valueType": { - "$id": "4367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4368", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3825" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4369", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4370", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4371", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4372", - "kind": "constant", - "valueType": { - "$id": "4373", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/transcriptions", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", - "Decorators": [] - }, - { - "$id": "4374", - "Name": "createTranslation", - "ResourceName": "Audio", - "Summary": "Translates audio into English..", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4375", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4376", - "kind": "constant", - "valueType": { - "$id": "4377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4378", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4379", - "kind": "constant", - "valueType": { - "$id": "4380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4381", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3888" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4382", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4384", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4385", - "kind": "constant", - "valueType": { - "$id": "4386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/translations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4387" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4343" - } - ], - "Decorators": [] - }, - { - "$id": "4388", - "Name": "Assistants", - "Operations": [ - { - "$id": "4389", - "Name": "createAssistant", - "ResourceName": "Assistants", - "Summary": "Create an assistant with a model and instructions.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4390", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4391", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4392", - "Type": { - "$id": "4393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4394", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4395", - "kind": "constant", - "valueType": { - "$id": "4396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4397", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4398", - "kind": "constant", - "valueType": { - "$id": "4399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4400", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3676" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4401", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", - "Decorators": [] - }, - { - "$id": "4402", - "Name": "listAssistants", - "ResourceName": "Assistants", - "Summary": "Returns a list of assistants.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4403", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4404", - "kind": "constant", - "valueType": { - "$id": "4405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4406", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4407", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4408", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "1033" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4409", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4411", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4412", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4413", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3760" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", - "Decorators": [] - }, - { - "$id": "4414", - "Name": "getAssistant", - "ResourceName": "Assistants", - "Summary": "Retrieves an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4415", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4416", - "kind": "constant", - "valueType": { - "$id": "4417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4418", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to retrieve.", - "Type": { - "$id": "4419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4420", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", - "Decorators": [] - }, - { - "$id": "4421", - "Name": "modifyAssistant", - "ResourceName": "Assistants", - "Summary": "Modifies an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4422", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4423", - "kind": "constant", - "valueType": { - "$id": "4424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4425", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to modify.", - "Type": { - "$id": "4426", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4427", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4428", - "kind": "constant", - "valueType": { - "$id": "4429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4430", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3771" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4431", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", - "Decorators": [] - }, - { - "$id": "4432", - "Name": "deleteAssistant", - "ResourceName": "Assistants", - "Summary": "Delete an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4433", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4434", - "kind": "constant", - "valueType": { - "$id": "4435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4436", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to delete.", - "Type": { - "$id": "4437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4438", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3810" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4439" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4390" - } - ], - "Decorators": [] - }, - { - "$id": "4440", - "Name": "Batches", - "Operations": [ - { - "$id": "4441", - "Name": "createBatch", - "ResourceName": "Batches", - "Summary": "Creates and executes a batch from an uploaded file of requests", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4442", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4443", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4444", - "Type": { - "$id": "4445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4446", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4447", - "kind": "constant", - "valueType": { - "$id": "4448", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4449", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4450", - "kind": "constant", - "valueType": { - "$id": "4451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4452", - "Name": "createBatchRequest", - "NameInRequest": "createBatchRequest", - "Type": { - "$ref": "3581" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Spread", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4453", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", - "Decorators": [] - }, - { - "$id": "4454", - "Name": "listBatches", - "ResourceName": "Batches", - "Summary": "List your organization's batches.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4455", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4456", - "kind": "constant", - "valueType": { - "$id": "4457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4458", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4460", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4462", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3665" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", - "Decorators": [] - }, - { - "$id": "4463", - "Name": "retrieveBatch", - "ResourceName": "Batches", - "Summary": "Retrieves a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4464", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4465", - "kind": "constant", - "valueType": { - "$id": "4466", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4467", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to retrieve.", - "Type": { - "$id": "4468", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4469", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", - "Decorators": [] - }, - { - "$id": "4470", - "Name": "cancelBatch", - "ResourceName": "Batches", - "Summary": "Cancels an in-progress batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4471", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4472", - "kind": "constant", - "valueType": { - "$id": "4473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4474", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to cancel.", - "Type": { - "$id": "4475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4476", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4477" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4442" - } - ], - "Decorators": [] - }, - { - "$id": "4478", - "Name": "Chat", - "Operations": [ - { - "$id": "4479", - "Name": "createChatCompletion", - "ResourceName": "Chat", - "Summary": "Creates a model response for the given chat conversation.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4480", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4481", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4482", - "Type": { - "$id": "4483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4484", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4485", - "kind": "constant", - "valueType": { - "$id": "4486", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4487", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4488", - "kind": "constant", - "valueType": { - "$id": "4489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4490", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3308" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4491", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3513" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/chat/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4492" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4480" - } - ], - "Decorators": [] - }, - { - "$id": "4493", - "Name": "Completions", - "Operations": [ - { - "$id": "4494", - "Name": "createCompletion", - "ResourceName": "Completions", - "Summary": "Creates a completion for the provided prompt and parameters.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4495", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4496", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4497", - "Type": { - "$id": "4498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4499", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4500", - "kind": "constant", - "valueType": { - "$id": "4501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4502", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4503", - "kind": "constant", - "valueType": { - "$id": "4504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4505", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3192" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4506", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3259" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4507" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4495" - } - ], - "Decorators": [] - }, - { - "$id": "4508", - "Name": "Embeddings", - "Operations": [ - { - "$id": "4509", - "Name": "createEmbedding", - "ResourceName": "Embeddings", - "Summary": "Creates an embedding vector representing the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4510", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4511", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4512", - "Type": { - "$id": "4513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4514", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4515", - "kind": "constant", - "valueType": { - "$id": "4516", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4517", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4518", - "kind": "constant", - "valueType": { - "$id": "4519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4520", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3152" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4521", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3169" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/embeddings", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4522" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4510" - } - ], - "Decorators": [] - }, - { - "$id": "4523", - "Name": "Files", - "Operations": [ - { - "$id": "4524", - "Name": "createFile", - "ResourceName": "Files", - "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4525", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4526", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4527", - "Type": { - "$id": "4528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4529", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4530", - "kind": "constant", - "valueType": { - "$id": "4531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4532", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4533", - "kind": "constant", - "valueType": { - "$id": "4534", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4535", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3136" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4536", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/files", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.createFile", - "Decorators": [] - }, - { - "$id": "4537", - "Name": "listFiles", - "ResourceName": "Files", - "Summary": "Returns a list of files that belong to the user's organization.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4538", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4539", - "kind": "constant", - "valueType": { - "$id": "4540", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4541", - "Name": "purpose", - "NameInRequest": "purpose", - "Description": "Only return files with the given purpose.", - "Type": { - "$id": "4542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4543", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3140" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", - "Decorators": [] - }, - { - "$id": "4544", - "Name": "retrieveFile", - "ResourceName": "Files", - "Summary": "Returns information about a specific file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4545", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4546", - "kind": "constant", - "valueType": { - "$id": "4547", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4548", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4549", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4550", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", - "Decorators": [] - }, - { - "$id": "4551", - "Name": "deleteFile", - "ResourceName": "Files", - "Summary": "Delete a file", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4552", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4553", - "kind": "constant", - "valueType": { - "$id": "4554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4555", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4557", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3145" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", - "Decorators": [] - }, - { - "$id": "4558", - "Name": "downloadFile", - "ResourceName": "Files", - "Summary": "Returns the contents of the specified file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4559", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4560", - "kind": "constant", - "valueType": { - "$id": "4561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4562", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4564", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4565", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}/content", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4566" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4525" - } - ], - "Decorators": [] - }, - { - "$id": "4567", - "Name": "FineTuning", - "Operations": [ - { - "$id": "4568", - "Name": "createFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4569", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4570", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4571", - "Type": { - "$id": "4572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4573", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4574", - "kind": "constant", - "valueType": { - "$id": "4575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4576", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4577", - "kind": "constant", - "valueType": { - "$id": "4578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4579", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2935" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4580", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", - "Decorators": [] - }, - { - "$id": "4581", - "Name": "listPaginatedFineTuningJobs", - "ResourceName": "FineTuning", - "Summary": "List your organization's fine-tuning jobs", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4582", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4583", - "kind": "constant", - "valueType": { - "$id": "4584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4585", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last job from the previous pagination request.", - "Type": { - "$id": "4586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4587", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of fine-tuning jobs to retrieve.", - "Type": { - "$id": "4588", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4589", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3068" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", - "Decorators": [] - }, - { - "$id": "4590", - "Name": "retrieveFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4591", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4592", - "kind": "constant", - "valueType": { - "$id": "4593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4594", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job.", - "Type": { - "$id": "4595", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4596", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", - "Decorators": [] - }, - { - "$id": "4597", - "Name": "cancelFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Immediately cancel a fine-tune job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4598", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4599", - "kind": "constant", - "valueType": { - "$id": "4600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4601", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to cancel.", - "Type": { - "$id": "4602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4603", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", - "Decorators": [] - }, - { - "$id": "4604", - "Name": "listFineTuningJobCheckpoints", - "ResourceName": "FineTuning", - "Summary": "List the checkpoints for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4605", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4606", - "kind": "constant", - "valueType": { - "$id": "4607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4608", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get checkpoints for.", - "Type": { - "$id": "4609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4610", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last checkpoint ID from the previous pagination request.", - "Type": { - "$id": "4611", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4612", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of checkpoints to retrieve.", - "Type": { - "$id": "4613", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4614", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3075" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", - "Decorators": [] - }, - { - "$id": "4615", - "Name": "listFineTuningEvents", - "ResourceName": "FineTuning", - "Summary": "Get status updates for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4616", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4617", - "kind": "constant", - "valueType": { - "$id": "4618", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4619", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get events for.", - "Type": { - "$id": "4620", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4621", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last event from the previous pagination request.", - "Type": { - "$id": "4622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4623", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of events to retrieve.", - "Type": { - "$id": "4624", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4625", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3118" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4626" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4569" - } - ], - "Decorators": [] - }, - { - "$id": "4627", - "Name": "Images", - "Operations": [ - { - "$id": "4628", - "Name": "createImage", - "ResourceName": "Images", - "Summary": "Creates an image given a prompt", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4629", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4630", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4631", - "Type": { - "$id": "4632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4633", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4634", - "kind": "constant", - "valueType": { - "$id": "4635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4636", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4637", - "kind": "constant", - "valueType": { - "$id": "4638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4639", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2873" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4640", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/generations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImage", - "Decorators": [] - }, - { - "$id": "4641", - "Name": "createImageEdit", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4642", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4643", - "kind": "constant", - "valueType": { - "$id": "4644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4645", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4646", - "kind": "constant", - "valueType": { - "$id": "4647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4648", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2903" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4649", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/edits", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", - "Decorators": [] - }, - { - "$id": "4650", - "Name": "createImageVariation", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4651", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4652", - "kind": "constant", - "valueType": { - "$id": "4653", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4654", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4655", - "kind": "constant", - "valueType": { - "$id": "4656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4657", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2921" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4658", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/variations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4659" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4629" - } - ], - "Decorators": [] - }, - { - "$id": "4660", - "Name": "Messages", - "Operations": [ - { - "$id": "4661", - "Name": "createMessage", - "ResourceName": "Messages", - "Summary": "Create a message.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4662", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4663", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4664", - "Type": { - "$id": "4665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4666", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4667", - "kind": "constant", - "valueType": { - "$id": "4668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4669", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", - "Type": { - "$id": "4670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4671", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4672", - "kind": "constant", - "valueType": { - "$id": "4673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4674", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1526" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4675", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", - "Decorators": [] - }, - { - "$id": "4676", - "Name": "listMessages", - "ResourceName": "Messages", - "Summary": "Returns a list of messages for a given thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4677", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4678", - "kind": "constant", - "valueType": { - "$id": "4679", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4680", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", - "Type": { - "$id": "4681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4682", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4683", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4684", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "609" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4685", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4687", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4689", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2849" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", - "Decorators": [] - }, - { - "$id": "4690", - "Name": "getMessage", - "ResourceName": "Messages", - "Summary": "Retrieve a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4691", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4692", - "kind": "constant", - "valueType": { - "$id": "4693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4694", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", - "Type": { - "$id": "4695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4696", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to retrieve.", - "Type": { - "$id": "4697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4698", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", - "Decorators": [] - }, - { - "$id": "4699", - "Name": "modifyMessage", - "ResourceName": "Messages", - "Summary": "Modifies a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4700", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4701", - "kind": "constant", - "valueType": { - "$id": "4702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4703", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4705", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to modify.", - "Type": { - "$id": "4706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4707", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4708", - "kind": "constant", - "valueType": { - "$id": "4709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4710", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2860" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4711", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", - "Decorators": [] - }, - { - "$id": "4712", - "Name": "deleteMessage", - "ResourceName": "Messages", - "Summary": "Deletes a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4713", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4714", - "kind": "constant", - "valueType": { - "$id": "4715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4716", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4717", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4718", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to delete.", - "Type": { - "$id": "4719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4720", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2866" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4721" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4662" - } - ], - "Decorators": [] - }, - { - "$id": "4722", - "Name": "ModelsOps", - "Operations": [ - { - "$id": "4723", - "Name": "listModels", - "ResourceName": "Models", - "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4724", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4725", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4726", - "Type": { - "$id": "4727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4728", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4729", - "kind": "constant", - "valueType": { - "$id": "4730", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4731", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2781" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.listModels", - "Decorators": [] - }, - { - "$id": "4732", - "Name": "retrieveModel", - "ResourceName": "Models", - "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4733", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4734", - "kind": "constant", - "valueType": { - "$id": "4735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4736", - "Name": "model", - "NameInRequest": "model", - "Description": "The ID of the model to use for this request.", - "Type": { - "$id": "4737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4738", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2786" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", - "Decorators": [] - }, - { - "$id": "4739", - "Name": "deleteModel", - "ResourceName": "Models", - "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4740", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4741", - "kind": "constant", - "valueType": { - "$id": "4742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4743", - "Name": "model", - "NameInRequest": "model", - "Description": "The model to delete", - "Type": { - "$id": "4744", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4745", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2796" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4746" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4724" - } - ], - "Decorators": [] - }, - { - "$id": "4747", - "Name": "Moderations", - "Operations": [ - { - "$id": "4748", - "Name": "createModeration", - "ResourceName": "Moderations", - "Summary": "Classifies if text is potentially harmful.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4749", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4750", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4751", - "Type": { - "$id": "4752", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4753", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4754", - "kind": "constant", - "valueType": { - "$id": "4755", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4756", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4757", - "kind": "constant", - "valueType": { - "$id": "4758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4759", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2716" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4760", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2723" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/moderations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4761" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4749" - } - ], - "Decorators": [] - }, - { - "$id": "4762", - "Name": "Realtime", - "Operations": [ - { - "$id": "4763", - "Name": "startRealtimeSession", - "ResourceName": "Realtime", - "Summary": "Starts a real-time conversation session.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4764", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4765", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4766", - "Type": { - "$id": "4767", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4768", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4769", - "kind": "constant", - "valueType": { - "$id": "4770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4771", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4772", - "kind": "constant", - "valueType": { - "$id": "4773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4774", - "Name": "requestMessages", - "NameInRequest": "requestMessages", - "Type": { - "$id": "4775", - "kind": "array", - "name": "ArrayRealtimeRequestCommand", - "valueType": { - "$ref": "2100" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4776", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4777", - "kind": "array", - "name": "ArrayRealtimeResponseCommand", - "valueType": { - "$ref": "2322" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/realtime", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4778" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4764" - } - ], - "Decorators": [] - }, - { - "$id": "4779", - "Name": "Threads", - "Operations": [ - { - "$id": "4780", - "Name": "createThread", - "ResourceName": "Threads", - "Summary": "Create a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4781", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4782", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4783", - "Type": { - "$id": "4784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4785", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4786", - "kind": "constant", - "valueType": { - "$id": "4787", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4788", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4789", - "kind": "constant", - "valueType": { - "$id": "4790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4791", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1523" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4792", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", - "Decorators": [] - }, - { - "$id": "4793", - "Name": "getThread", - "ResourceName": "Threads", - "Summary": "Retrieves a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4794", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4795", - "kind": "constant", - "valueType": { - "$id": "4796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4797", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to retrieve.", - "Type": { - "$id": "4798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4799", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", - "Decorators": [] - }, - { - "$id": "4800", - "Name": "modifyThread", - "ResourceName": "Threads", - "Summary": "Modifies a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4801", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4802", - "kind": "constant", - "valueType": { - "$id": "4803", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4804", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", - "Type": { - "$id": "4805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4806", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4807", - "kind": "constant", - "valueType": { - "$id": "4808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4809", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2078" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4810", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", - "Decorators": [] - }, - { - "$id": "4811", - "Name": "deleteThread", - "ResourceName": "Threads", - "Summary": "Delete a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4812", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4813", - "kind": "constant", - "valueType": { - "$id": "4814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4815", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to delete.", - "Type": { - "$id": "4816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4817", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2093" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4818" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4781" - } - ], - "Decorators": [] - }, - { - "$id": "4819", - "Name": "Runs", - "Operations": [ - { - "$id": "4820", - "Name": "createThreadAndRun", - "ResourceName": "Runs", - "Summary": "Create a thread and run it in one request.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4821", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4822", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4823", - "Type": { - "$id": "4824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4825", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4826", - "kind": "constant", - "valueType": { - "$id": "4827", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4828", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4829", - "kind": "constant", - "valueType": { - "$id": "4830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4831", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1519" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4832", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", - "Decorators": [] - }, - { - "$id": "4833", - "Name": "createRun", - "ResourceName": "Runs", - "Summary": "Create a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4834", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4835", - "kind": "constant", - "valueType": { - "$id": "4836", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4837", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to run.", - "Type": { - "$id": "4838", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4839", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4840", - "kind": "constant", - "valueType": { - "$id": "4841", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4842", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1814" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4843", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", - "Decorators": [] - }, - { - "$id": "4844", - "Name": "listRuns", - "ResourceName": "Runs", - "Summary": "Returns a list of runs belonging to a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4845", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4846", - "kind": "constant", - "valueType": { - "$id": "4847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4848", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run belongs to.", - "Type": { - "$id": "4849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4850", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4851", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4852", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "319" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4853", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4854", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4855", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4856", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4857", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1863" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", - "Decorators": [] - }, - { - "$id": "4858", - "Name": "getRun", - "ResourceName": "Runs", - "Summary": "Retrieves a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4859", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4860", - "kind": "constant", - "valueType": { - "$id": "4861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4862", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4864", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to retrieve.", - "Type": { - "$id": "4865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4866", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", - "Decorators": [] - }, - { - "$id": "4867", - "Name": "modifyRun", - "ResourceName": "Runs", - "Summary": "Modifies a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4868", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4869", - "kind": "constant", - "valueType": { - "$id": "4870", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4871", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4872", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4873", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to modify.", - "Type": { - "$id": "4874", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4875", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4876", - "kind": "constant", - "valueType": { - "$id": "4877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4878", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1874" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4879", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", - "Decorators": [] - }, - { - "$id": "4880", - "Name": "cancelRun", - "ResourceName": "Runs", - "Summary": "Cancels a run that is `in_progress`.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4881", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4882", - "kind": "constant", - "valueType": { - "$id": "4883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4884", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this run belongs.", - "Type": { - "$id": "4885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4886", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to cancel.", - "Type": { - "$id": "4887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4888", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", - "Decorators": [] - }, - { - "$id": "4889", - "Name": "submitToolOutputsToRun", - "ResourceName": "Runs", - "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4890", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4891", - "kind": "constant", - "valueType": { - "$id": "4892", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4893", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", - "Type": { - "$id": "4894", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4895", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run that requires the tool output submission.", - "Type": { - "$id": "4896", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4897", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4898", - "kind": "constant", - "valueType": { - "$id": "4899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4900", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1880" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4901", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", - "Decorators": [] - }, - { - "$id": "4902", - "Name": "listRunSteps", - "ResourceName": "Runs", - "Summary": "Returns a list of run steps belonging to a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4903", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4904", - "kind": "constant", - "valueType": { - "$id": "4905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4906", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run and run steps belong to.", - "Type": { - "$id": "4907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4908", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run the run steps belong to.", - "Type": { - "$id": "4909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4910", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4911", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4912", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "328" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4913", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4915", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4917", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1891" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", - "Decorators": [] - }, - { - "$id": "4918", - "Name": "getRunStep", - "ResourceName": "Runs", - "Summary": "Retrieves a run step.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4919", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4920", - "kind": "constant", - "valueType": { - "$id": "4921", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4922", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which the run and run step belongs.", - "Type": { - "$id": "4923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4924", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to which the run step belongs.", - "Type": { - "$id": "4925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4926", - "Name": "step_id", - "NameInRequest": "step_id", - "Description": "The ID of the run step to retrieve.", - "Type": { - "$id": "4927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4928", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1896" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4929" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4821" - } - ], - "Decorators": [] - }, - { - "$id": "4930", - "Name": "VectorStores", - "Operations": [ - { - "$id": "4931", - "Name": "listVectorStores", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector-stores.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4932", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4933", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4934", - "Type": { - "$id": "4935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4936", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4937", - "kind": "constant", - "valueType": { - "$id": "4938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4939", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4940", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4941", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "55" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4942", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4943", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4944", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4945", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4946", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1324" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", - "Decorators": [] - }, - { - "$id": "4947", - "Name": "createVectorStore", - "ResourceName": "VectorStores", - "Summary": "Creates a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4948", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4949", - "kind": "constant", - "valueType": { - "$id": "4950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4951", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4952", - "kind": "constant", - "valueType": { - "$id": "4953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4954", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1379" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4955", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", - "Decorators": [] - }, - { - "$id": "4956", - "Name": "getVectorStore", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4957", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4958", - "kind": "constant", - "valueType": { - "$id": "4959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4960", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to retrieve.", - "Type": { - "$id": "4961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4962", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", - "Decorators": [] - }, - { - "$id": "4963", - "Name": "modifyVectorStore", - "ResourceName": "VectorStores", - "Summary": "Modifies a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4964", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4965", - "kind": "constant", - "valueType": { - "$id": "4966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4967", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to modify.", - "Type": { - "$id": "4968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4969", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4970", - "kind": "constant", - "valueType": { - "$id": "4971", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4972", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1411" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4973", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", - "Decorators": [] - }, - { - "$id": "4974", - "Name": "deleteVectorStore", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4975", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4976", - "kind": "constant", - "valueType": { - "$id": "4977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4978", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to delete.", - "Type": { - "$id": "4979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4980", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1422" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", - "Decorators": [] - }, - { - "$id": "4981", - "Name": "listVectorStoreFiles", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4982", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4983", - "kind": "constant", - "valueType": { - "$id": "4984", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4985", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the files belong to.", - "Type": { - "$id": "4986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4987", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4988", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4989", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "81" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4990", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4992", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4994", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4995", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", - "Decorators": [] - }, - { - "$id": "4996", - "Name": "createVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4997", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4998", - "kind": "constant", - "valueType": { - "$id": "4999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5000", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a File.", - "Type": { - "$id": "5001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5002", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5003", - "kind": "constant", - "valueType": { - "$id": "5004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5005", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1478" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5006", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5007", - "Name": "getVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5008", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5009", - "kind": "constant", - "valueType": { - "$id": "5010", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5011", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5012", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5013", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file being retrieved.", - "Type": { - "$id": "5014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5015", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5016", - "Name": "deleteVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5017", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5018", - "kind": "constant", - "valueType": { - "$id": "5019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5020", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5022", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to delete.", - "Type": { - "$id": "5023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5024", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1483" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5025", - "Name": "createVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5026", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5027", - "kind": "constant", - "valueType": { - "$id": "5028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5029", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a file batch.", - "Type": { - "$id": "5030", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5031", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5032", - "kind": "constant", - "valueType": { - "$id": "5033", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5034", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1490" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5035", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5036", - "Name": "getVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5037", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5038", - "kind": "constant", - "valueType": { - "$id": "5039", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5040", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5041", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5042", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch being retrieved.", - "Type": { - "$id": "5043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5044", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5045", - "Name": "cancelVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5046", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5047", - "kind": "constant", - "valueType": { - "$id": "5048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5049", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5051", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch to cancel.", - "Type": { - "$id": "5052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5053", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5054", - "Name": "listFilesInVectorStoreBatch", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files in a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5055", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5056", - "kind": "constant", - "valueType": { - "$id": "5057", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5058", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5059", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5060", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch that the files belong to.", - "Type": { - "$id": "5061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5062", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "5063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5064", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "137" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5065", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "5066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5067", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "5068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5069", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5070", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5071" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4932" - } - ], - "Decorators": [] - }, - { - "$id": "5072", - "Name": "Uploads", - "Operations": [ - { - "$id": "5073", - "Name": "createUpload", - "ResourceName": "Uploads", - "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", - "Accessibility": "public", - "Parameters": [ - { - "$id": "5074", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "5075", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "5076", - "Type": { - "$id": "5077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "5078", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5079", - "kind": "constant", - "valueType": { - "$id": "5080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5081", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5082", - "kind": "constant", - "valueType": { - "$id": "5083", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5084", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1247" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5085", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", - "Decorators": [] - }, - { - "$id": "5086", - "Name": "addUploadPart", - "ResourceName": "Uploads", - "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5087", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5088", - "kind": "constant", - "valueType": { - "$id": "5089", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5090", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "5091", - "kind": "constant", - "valueType": { - "$id": "5092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5093", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5095", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1305" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5096", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1308" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/parts", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", - "Decorators": [] - }, - { - "$id": "5097", - "Name": "completeUpload", - "ResourceName": "Uploads", - "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5098", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5099", - "kind": "constant", - "valueType": { - "$id": "5100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5101", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5103", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5104", - "kind": "constant", - "valueType": { - "$id": "5105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5106", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1318" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5107", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/complete", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", - "Decorators": [] - }, - { - "$id": "5108", - "Name": "cancelUpload", - "ResourceName": "Uploads", - "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5109", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5110", - "kind": "constant", - "valueType": { - "$id": "5111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5112", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5114", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5115" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "5074" - } - ], - "Decorators": [] - } - ], - "Auth": { - "$id": "5116", - "ApiKey": { - "$id": "5117", - "Name": "Authorization", - "Prefix": "Bearer" - } - } -} From 2f779809cbc1afca30dbdd6e2364b6dc6a62e427 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 22 Oct 2024 15:31:13 -0700 Subject: [PATCH 13/54] More updates --- .dotnet/Configuration.json | 8 + .../src/Custom/Assistants/AssistantClient.cs | 128 +- .../Streaming/RequiredActionUpdate.cs | 2 +- .dotnet/src/Custom/Chat/ChatClient.cs | 4 +- .../src/Custom/Chat/OpenAIChatModelFactory.cs | 22 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- .../FineTuning/Internal/GeneratorStubs.cs | 2 + .../ConversationContentPart.cs | 6 +- .../ConversationFunctionTool.cs | 4 +- .dotnet/src/Generated/Models/Assistant.cs | 2 +- .../AssistantCreationOptions.Serialization.cs | 4 +- .../Models/AssistantCreationOptions.cs | 2 +- .../Models/AssistantDeletionResult.cs | 2 +- .../Models/AssistantModificationOptions.cs | 2 +- .../Models/AssistantResponseFormat.cs | 2 +- .../src/Generated/Models/AssistantThread.cs | 2 +- .../Generated/Models/AudioTranscription.cs | 2 +- .../Models/AudioTranscriptionOptions.cs | 2 +- .../src/Generated/Models/AudioTranslation.cs | 2 +- .../Models/AudioTranslationOptions.cs | 2 +- .../src/Generated/Models/ChatCompletion.cs | 2 +- .../Generated/Models/ChatCompletionOptions.cs | 2 +- .dotnet/src/Generated/Models/ChatFunction.cs | 2 +- .../src/Generated/Models/ChatFunctionCall.cs | 2 +- .../Generated/Models/ChatFunctionChoice.cs | 2 +- .dotnet/src/Generated/Models/ChatMessage.cs | 2 +- .../Generated/Models/ChatMessageContent.cs | 2 +- .../Models/ChatMessageContentPart.cs | 2 +- .../Models/ChatOutputTokenUsageDetails.cs | 2 +- .../Generated/Models/ChatResponseFormat.cs | 2 +- .../Models/ChatTokenLogProbabilityDetails.cs | 2 +- .../ChatTokenTopLogProbabilityDetails.cs | 2 +- .../src/Generated/Models/ChatTokenUsage.cs | 2 +- .dotnet/src/Generated/Models/ChatTool.cs | 2 +- .dotnet/src/Generated/Models/ChatToolCall.cs | 2 +- .../src/Generated/Models/ChatToolChoice.cs | 2 +- .../Models/CodeInterpreterToolResources.cs | 2 +- .../Models/ConversationContentPart.cs | 2 +- .../Models/ConversationFunctionTool.cs | 9 - .../ConversationInputTokenUsageDetails.cs | 2 +- .../ConversationInputTranscriptionOptions.cs | 2 +- .../src/Generated/Models/ConversationItem.cs | 2 +- .../ConversationOutputTokenUsageDetails.cs | 2 +- .../ConversationRateLimitDetailsItem.cs | 2 +- ...onversationSessionOptions.Serialization.cs | 4 +- .../Models/ConversationSessionOptions.cs | 2 +- .../Models/ConversationTokenUsage.cs | 2 +- .../src/Generated/Models/ConversationTool.cs | 2 +- .../ConversationTurnDetectionOptions.cs | 2 +- .../Generated/Models/ConversationUpdate.cs | 2 +- .../Models/EmbeddingGenerationOptions.cs | 2 +- .../Generated/Models/EmbeddingTokenUsage.cs | 2 +- .../Generated/Models/FileChunkingStrategy.cs | 2 +- .../Generated/Models/FileDeletionResult.cs | 2 +- .../Models/FileFromStoreRemovalResult.cs | 2 +- .../Models/FileSearchRankingOptions.cs | 2 +- .../Models/FileSearchToolResources.cs | 2 +- .../FineTuningIntegration.Serialization.cs | 128 + .../Generated/Models/FineTuningIntegration.cs | 2 +- .../Models/FineTuningIntegrationWandbWandb.cs | 2 +- .dotnet/src/Generated/Models/FineTuningJob.cs | 2 +- .../Generated/Models/FineTuningJobError.cs | 2 +- .../Generated/Models/FineTuningJobEvent.cs | 2 +- .../Models/FineTuningJobHyperparameters.cs | 2 +- .../src/Generated/Models/FineTuningOptions.cs | 2 +- .../Models/GeneratedImage.Serialization.cs | 4 +- .../src/Generated/Models/GeneratedImage.cs | 2 +- .../Models/GeneratedImageCollection.cs | 2 +- .../Generated/Models/HyperparameterOptions.cs | 2 +- .../src/Generated/Models/ImageEditOptions.cs | 2 +- .../Models/ImageGenerationOptions.cs | 2 +- .../Generated/Models/ImageVariationOptions.cs | 2 +- .../Models/InternalAddUploadPartRequest.cs | 2 +- ...ernalAssistantToolsFileSearchFileSearch.cs | 2 +- ...nternalAssistantToolsFileSearchTypeOnly.cs | 2 +- ...ternalAssistantsNamedToolChoiceFunction.cs | 2 +- .../Generated/Models/InternalBatchError.cs | 2 +- .../Generated/Models/InternalBatchErrors.cs | 2 +- .../src/Generated/Models/InternalBatchJob.cs | 2 +- .../Models/InternalBatchRequestCounts.cs | 2 +- .../Models/InternalBatchRequestInput.cs | 2 +- .../Models/InternalBatchRequestOutput.cs | 2 +- .../Models/InternalBatchRequestOutputError.cs | 2 +- .../InternalBatchRequestOutputResponse.cs | 2 +- ...nternalChatCompletionFunctionCallOption.cs | 2 +- ...tCompletionMessageToolCallChunkFunction.cs | 2 +- ...alChatCompletionMessageToolCallFunction.cs | 2 +- .../InternalChatCompletionNamedToolChoice.cs | 2 +- ...alChatCompletionNamedToolChoiceFunction.cs | 2 +- ...ompletionRequestMessageContentPartImage.cs | 2 +- ...nRequestMessageContentPartImageImageUrl.cs | 2 +- ...pletionRequestMessageContentPartRefusal.cs | 2 +- ...CompletionRequestMessageContentPartText.cs | 2 +- .../InternalChatCompletionResponseMessage.cs | 2 +- ...atCompletionResponseMessageFunctionCall.cs | 2 +- .../InternalChatCompletionStreamOptions.cs | 2 +- ...ternalChatCompletionStreamResponseDelta.cs | 2 +- .../Models/InternalCompleteUploadRequest.cs | 2 +- ...rnalCreateAssistantRequestToolResources.cs | 2 +- ...tantRequestToolResourcesCodeInterpreter.cs | 2 +- .../Models/InternalCreateBatchRequest.cs | 2 +- ...nalCreateChatCompletionFunctionResponse.cs | 2 +- ...ateChatCompletionFunctionResponseChoice.cs | 2 +- ...ernalCreateChatCompletionResponseChoice.cs | 2 +- ...ateChatCompletionResponseChoiceLogprobs.cs | 2 +- ...reateChatCompletionStreamResponseChoice.cs | 2 +- ...tCompletionStreamResponseChoiceLogprobs.cs | 2 +- ...CreateChatCompletionStreamResponseUsage.cs | 2 +- .../Models/InternalCreateCompletionRequest.cs | 2 +- .../InternalCreateCompletionResponse.cs | 2 +- .../InternalCreateCompletionResponseChoice.cs | 2 +- ...lCreateCompletionResponseChoiceLogprobs.cs | 2 +- ...neTuningJobRequestWandbIntegrationWandb.cs | 2 +- ...CreateThreadAndRunRequest.Serialization.cs | 4 +- .../InternalCreateThreadAndRunRequest.cs | 2 +- ...lCreateThreadAndRunRequestToolResources.cs | 2 +- ...dRunRequestToolResourcesCodeInterpreter.cs | 2 +- ...nternalCreateThreadRequestToolResources.cs | 2 +- ...readRequestToolResourcesCodeInterpreter.cs | 2 +- ...hreadRequestToolResourcesFileSearchBase.cs | 2 +- ...InternalCreateTranscriptionResponseJson.cs | 2 +- .../InternalCreateTranslationResponseJson.cs | 2 +- .../Models/InternalCreateUploadRequest.cs | 2 +- ...ternalCreateVectorStoreFileBatchRequest.cs | 2 +- .../InternalCreateVectorStoreFileRequest.cs | 2 +- ...nternalFileChunkingStrategyRequestParam.cs | 2 +- .../Models/InternalFileUploadOptions.cs | 2 +- ...rnalFineTuningIntegration.Serialization.cs | 8 +- .../Models/InternalFineTuningIntegration.cs | 2 +- ...ineTuningIntegrationWandb.Serialization.cs | 8 +- .../Models/InternalFineTuningJobCheckpoint.cs | 2 +- .../InternalFineTuningJobCheckpointMetrics.cs | 2 +- .../InternalFinetuneChatRequestInput.cs | 2 +- .../InternalFinetuneCompletionRequestInput.cs | 2 +- .../Models/InternalFunctionDefinition.cs | 2 +- .../Models/InternalFunctionParameters.cs | 2 +- .../Models/InternalListAssistantsResponse.cs | 2 +- .../Models/InternalListBatchesResponse.cs | 2 +- ...nalListFineTuningJobCheckpointsResponse.cs | 2 +- ...InternalListFineTuningJobEventsResponse.cs | 2 +- .../Models/InternalListMessagesResponse.cs | 2 +- ...rnalListPaginatedFineTuningJobsResponse.cs | 2 +- .../Models/InternalListRunStepsResponse.cs | 2 +- .../Models/InternalListRunsResponse.cs | 2 +- .../Models/InternalListThreadsResponse.cs | 2 +- .../InternalListVectorStoreFilesResponse.cs | 2 +- .../InternalListVectorStoresResponse.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...nalMessageContentImageUrlObjectImageUrl.cs | 2 +- ...ntItemFileObjectImageFile.Serialization.cs | 4 +- ...alMessageContentItemFileObjectImageFile.cs | 2 +- ...notationsFileCitationObjectFileCitation.cs | 2 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 2 +- ...ernalMessageContentTextObjectAnnotation.cs | 2 +- .../InternalMessageContentTextObjectText.cs | 2 +- .../Models/InternalMessageDeltaContent.cs | 2 +- ...tImageFileObjectImageFile.Serialization.cs | 4 +- ...ageDeltaContentImageFileObjectImageFile.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...ssageDeltaContentImageUrlObjectImageUrl.cs | 2 +- ...notationsFileCitationObjectFileCitation.cs | 2 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 2 +- ...ternalMessageDeltaContentTextObjectText.cs | 2 +- .../Models/InternalMessageDeltaObject.cs | 2 +- .../Models/InternalMessageDeltaObjectDelta.cs | 2 +- ...ternalMessageDeltaTextContentAnnotation.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 4 +- ...nalMessageImageUrlContent.Serialization.cs | 4 +- .../Models/InternalMessageObjectAttachment.cs | 2 +- ...rnalMessageRefusalContent.Serialization.cs | 4 +- .../Models/InternalModerationCategories.cs | 2 +- .../InternalModerationCategoryScores.cs | 2 +- ...rnalModifyAssistantRequestToolResources.cs | 2 +- ...tantRequestToolResourcesCodeInterpreter.cs | 2 +- ...nternalModifyThreadRequestToolResources.cs | 2 +- ...readRequestToolResourcesCodeInterpreter.cs | 2 +- .../Models/InternalOmniTypedResponseFormat.cs | 2 +- .../Models/InternalRealtimeRequestCommand.cs | 2 +- ...imeRequestResponseCreateCommandResponse.cs | 2 +- .../Models/InternalRealtimeResponse.cs | 2 +- .../InternalRealtimeResponseApiError.cs | 2 +- .../Models/InternalRealtimeResponseError.cs | 2 +- .../Models/InternalRealtimeResponseItem.cs | 2 +- .../Models/InternalRealtimeResponseSession.cs | 2 +- .../InternalRealtimeResponseStatusDetails.cs | 2 +- ...ealtimeToolChoiceFunctionObjectFunction.cs | 2 +- .../InternalRealtimeToolChoiceObject.cs | 2 +- ...lRequiredFunctionToolCall.Serialization.cs | 4 +- .../InternalRequiredFunctionToolCall.cs | 2 +- ...ernalResponseFormatJsonSchemaJsonSchema.cs | 2 +- .../InternalResponseFormatJsonSchemaSchema.cs | 2 +- ...esponseMessageTextContent.Serialization.cs | 4 +- ...edActionSubmitToolOutputs.Serialization.cs | 19 +- ...unObjectRequiredActionSubmitToolOutputs.cs | 12 +- ...InternalRunRequiredAction.Serialization.cs | 4 +- .../Models/InternalRunRequiredAction.cs | 2 +- .../InternalRunStepDelta.Serialization.cs | 4 +- .../Generated/Models/InternalRunStepDelta.cs | 2 +- .../Models/InternalRunStepDeltaObjectDelta.cs | 2 +- .../Models/InternalRunStepDeltaStepDetails.cs | 2 +- ...ilsMessageCreationObjectMessageCreation.cs | 2 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 2 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 2 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 2 +- ...epDetailsToolCallsObjectToolCallsObject.cs | 2 +- ...ilsMessageCreationObjectMessageCreation.cs | 2 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 2 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 2 +- ...ailsToolCallsFileSearchObjectFileSearch.cs | 2 +- ...ToolCallsFileSearchRankingOptionsObject.cs | 2 +- ...sToolCallsFileSearchResultObjectContent.cs | 2 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 2 +- .../InternalRunToolCallObjectFunction.cs | 2 +- .../InternalStaticChunkingStrategyDetails.cs | 2 +- .../InternalSubmitToolOutputsRunRequest.cs | 2 +- .../InternalThreadObjectToolResources.cs | 2 +- ...hreadObjectToolResourcesCodeInterpreter.cs | 2 +- ...rnalThreadObjectToolResourcesFileSearch.cs | 2 +- .../InternalToolResourcesFileSearchIdsOnly.cs | 2 +- .../src/Generated/Models/InternalUpload.cs | 2 +- .../Generated/Models/InternalUploadPart.cs | 2 +- ...nalVectorStoreFileBatchObjectFileCounts.cs | 2 +- .../src/Generated/Models/MessageContent.cs | 2 +- .../Models/MessageCreationAttachment.cs | 2 +- .../Models/MessageCreationOptions.cs | 2 +- .../Generated/Models/MessageDeletionResult.cs | 2 +- .../Generated/Models/MessageFailureDetails.cs | 2 +- .../Models/MessageModificationOptions.cs | 2 +- .../Generated/Models/ModelDeletionResult.cs | 2 +- .../src/Generated/Models/ModerationOptions.cs | 2 +- .../src/Generated/Models/ModerationResult.cs | 2 +- .../Models/ModerationResultCollection.cs | 2 +- .../src/Generated/Models/OpenAIEmbedding.cs | 2 +- .../Models/OpenAIEmbeddingCollection.cs | 2 +- .dotnet/src/Generated/Models/OpenAIError.cs | 2 +- .../Generated/Models/OpenAIErrorResponse.cs | 2 +- .dotnet/src/Generated/Models/OpenAIFile.cs | 2 +- .../Generated/Models/OpenAIFileCollection.cs | 2 +- .dotnet/src/Generated/Models/OpenAIModel.cs | 2 +- .../Generated/Models/OpenAIModelCollection.cs | 2 +- .../RunCreationOptions.Serialization.cs | 4 +- .../Generated/Models/RunCreationOptions.cs | 2 +- .dotnet/src/Generated/Models/RunError.cs | 2 +- .../Generated/Models/RunIncompleteDetails.cs | 2 +- .../Models/RunModificationOptions.cs | 2 +- .dotnet/src/Generated/Models/RunStep.cs | 2 +- .../Models/RunStepCodeInterpreterOutput.cs | 2 +- .../src/Generated/Models/RunStepDetails.cs | 2 +- .dotnet/src/Generated/Models/RunStepError.cs | 2 +- .../Models/RunStepFileSearchResult.cs | 2 +- .../src/Generated/Models/RunStepTokenUsage.cs | 2 +- .../src/Generated/Models/RunStepToolCall.cs | 2 +- .../RunStepUpdateCodeInterpreterOutput.cs | 2 +- .dotnet/src/Generated/Models/RunTokenUsage.cs | 2 +- .../Generated/Models/RunTruncationStrategy.cs | 2 +- .../Models/SpeechGenerationOptions.cs | 2 +- .../Models/StreamingChatCompletionUpdate.cs | 2 +- .../Models/StreamingChatFunctionCallUpdate.cs | 2 +- .../Models/StreamingChatToolCallUpdate.cs | 2 +- .../Generated/Models/ThreadCreationOptions.cs | 2 +- .../Generated/Models/ThreadDeletionResult.cs | 2 +- .dotnet/src/Generated/Models/ThreadMessage.cs | 2 +- .../Models/ThreadModificationOptions.cs | 2 +- .dotnet/src/Generated/Models/ThreadRun.cs | 2 +- .../Models/ToolConstraint.Serialization.cs | 2 +- .../src/Generated/Models/ToolConstraint.cs | 2 +- .../src/Generated/Models/ToolDefinition.cs | 2 +- .dotnet/src/Generated/Models/ToolOutput.cs | 2 +- .dotnet/src/Generated/Models/ToolResources.cs | 2 +- .../Generated/Models/TranscribedSegment.cs | 2 +- .../src/Generated/Models/TranscribedWord.cs | 2 +- ...ningJobRequestIntegration.Serialization.cs | 4 +- ...nownFineTuningIntegration.Serialization.cs | 8 +- .dotnet/src/Generated/Models/VectorStore.cs | 2 +- .../VectorStoreBatchFileJob.Serialization.cs | 4 +- .../Models/VectorStoreBatchFileJob.cs | 2 +- .../Models/VectorStoreCreationHelper.cs | 2 +- .../Models/VectorStoreCreationOptions.cs | 2 +- .../Models/VectorStoreDeletionResult.cs | 2 +- .../Models/VectorStoreExpirationPolicy.cs | 2 +- .../Models/VectorStoreFileAssociation.cs | 2 +- .../Models/VectorStoreFileAssociationError.cs | 2 +- .../Generated/Models/VectorStoreFileCounts.cs | 2 +- .../Models/VectorStoreModificationOptions.cs | 2 +- .dotnet/src/Generated/OpenAIClient.cs | 30 - .dotnet/src/Generated/OpenAIModelFactory.cs | 6 +- .dotnet/tspCodeModel.json | 51262 ++++++++++++++++ 287 files changed, 51797 insertions(+), 443 deletions(-) create mode 100644 .dotnet/Configuration.json create mode 100644 .dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs create mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json new file mode 100644 index 000000000..85fab5a06 --- /dev/null +++ b/.dotnet/Configuration.json @@ -0,0 +1,8 @@ +{ + "output-folder": ".", + "namespace": "OpenAI", + "library-name": "OpenAI", + "unreferenced-types-handling": "keepAll", + "use-model-reader-writer": true, + "disable-xml-docs": true +} diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index eb7e28622..cc9531ace 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -108,7 +108,7 @@ public virtual async Task> CreateAssistantAsync(string m options.Model = model; ClientResult protocolResult = await CreateAssistantAsync(options, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// Creates a new assistant. @@ -123,7 +123,7 @@ public virtual ClientResult CreateAssistant(string model, AssistantCr options.Model = model; ClientResult protocolResult = CreateAssistant(options, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// @@ -223,7 +223,7 @@ public virtual async Task> GetAssistantAsync(string assi Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); ClientResult protocolResult = await GetAssistantAsync(assistantId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// @@ -237,7 +237,7 @@ public virtual ClientResult GetAssistant(string assistantId, Cancella Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); ClientResult protocolResult = GetAssistant(assistantId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// @@ -255,7 +255,7 @@ public virtual async Task> ModifyAssistantAsync(string a using BinaryContent content = options; ClientResult protocolResult = await ModifyAssistantAsync(assistantId, content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// @@ -270,9 +270,9 @@ public virtual ClientResult ModifyAssistant(string assistantId, Assis Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); Argument.AssertNotNull(options, nameof(options)); - using BinaryContent content = options.ToBinaryContent(); + using BinaryContent content = options; ClientResult protocolResult = ModifyAssistant(assistantId, content, null); - return CreateResultFromProtocol(protocolResult, Assistant.FromResponse); + return ClientResult.FromValue((Assistant)protocolResult, protocolResult.GetRawResponse()); } /// @@ -286,8 +286,8 @@ public virtual async Task> DeleteAssistant Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); ClientResult protocolResult = await DeleteAssistantAsync(assistantId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, response - => AssistantDeletionResult.FromResponse(response)); + return ClientResult.FromValue((AssistantDeletionResult)protocolResult, protocolResult.GetRawResponse()); + } /// @@ -301,8 +301,8 @@ public virtual ClientResult DeleteAssistant(string assi Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); ClientResult protocolResult = DeleteAssistant(assistantId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, response - => AssistantDeletionResult.FromResponse(response)); + return ClientResult.FromValue((AssistantDeletionResult)protocolResult, protocolResult.GetRawResponse()); + } /// @@ -313,8 +313,8 @@ public virtual ClientResult DeleteAssistant(string assi /// A new thread. public virtual async Task> CreateThreadAsync(ThreadCreationOptions options = null, CancellationToken cancellationToken = default) { - ClientResult protocolResult = await CreateThreadAsync(options?.ToBinaryContent(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + ClientResult protocolResult = await CreateThreadAsync(options, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -325,8 +325,8 @@ public virtual async Task> CreateThreadAsync(Threa /// A new thread. public virtual ClientResult CreateThread(ThreadCreationOptions options = null, CancellationToken cancellationToken = default) { - ClientResult protocolResult = CreateThread(options?.ToBinaryContent(), cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + ClientResult protocolResult = CreateThread(options, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -340,7 +340,7 @@ public virtual async Task> GetThreadAsync(string t Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); ClientResult protocolResult = await GetThreadAsync(threadId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -354,7 +354,7 @@ public virtual ClientResult GetThread(string threadId, Cancella Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); ClientResult protocolResult = GetThread(threadId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -369,8 +369,8 @@ public virtual async Task> ModifyThreadAsync(strin Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNull(options, nameof(options)); - ClientResult protocolResult = await ModifyThreadAsync(threadId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + ClientResult protocolResult = await ModifyThreadAsync(threadId, options, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -385,8 +385,8 @@ public virtual ClientResult ModifyThread(string threadId, Threa Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNull(options, nameof(options)); - ClientResult protocolResult = ModifyThread(threadId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, AssistantThread.FromResponse); + ClientResult protocolResult = ModifyThread(threadId, options, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } /// @@ -400,8 +400,7 @@ public virtual async Task> DeleteThreadAsync( Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); ClientResult protocolResult = await DeleteThreadAsync(threadId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, response - => ThreadDeletionResult.FromResponse(response)); + return ClientResult.FromValue((ThreadDeletionResult)protocolResult, protocolResult.GetRawResponse()); } /// @@ -415,8 +414,7 @@ public virtual ClientResult DeleteThread(string threadId, Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); ClientResult protocolResult = DeleteThread(threadId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, response - => ThreadDeletionResult.FromResponse(response)); + return ClientResult.FromValue((ThreadDeletionResult)protocolResult, protocolResult.GetRawResponse()); } /// @@ -444,9 +442,9 @@ public virtual async Task> CreateMessageAsync( options.Content.Add(contentItem); } - ClientResult protocolResult = await CreateMessageAsync(threadId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()) + ClientResult protocolResult = await CreateMessageAsync(threadId, options, cancellationToken.ToRequestOptions()) .ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -474,8 +472,8 @@ public virtual ClientResult CreateMessage( options.Content.Add(contentItem); } - ClientResult protocolResult = CreateMessage(threadId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + ClientResult protocolResult = CreateMessage(threadId, options, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -586,7 +584,7 @@ public virtual async Task> GetMessageAsync(string th Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); ClientResult protocolResult = await GetMessageAsync(threadId, messageId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -602,7 +600,7 @@ public virtual ClientResult GetMessage(string threadId, string me Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); ClientResult protocolResult = GetMessage(threadId, messageId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -619,9 +617,9 @@ public virtual async Task> ModifyMessageAsync(string Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); Argument.AssertNotNull(options, nameof(options)); - ClientResult protocolResult = await ModifyMessageAsync(threadId, messageId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()) + ClientResult protocolResult = await ModifyMessageAsync(threadId, messageId, options, cancellationToken.ToRequestOptions()) .ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -638,8 +636,8 @@ public virtual ClientResult ModifyMessage(string threadId, string Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); Argument.AssertNotNull(options, nameof(options)); - ClientResult protocolResult = ModifyMessage(threadId, messageId, options?.ToBinaryContent(), cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadMessage.FromResponse); + ClientResult protocolResult = ModifyMessage(threadId, messageId, options, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ThreadMessage)protocolResult, protocolResult.GetRawResponse()); } /// @@ -655,8 +653,7 @@ public virtual async Task> DeleteMessageAsyn Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); ClientResult protocolResult = await DeleteMessageAsync(threadId, messageId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, response => - MessageDeletionResult.FromResponse(response)); + return ClientResult.FromValue((MessageDeletionResult)protocolResult, protocolResult.GetRawResponse()); } /// @@ -672,8 +669,7 @@ public virtual ClientResult DeleteMessage(string threadId Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); ClientResult protocolResult = DeleteMessage(threadId, messageId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, response => - MessageDeletionResult.FromResponse(response)); + return ClientResult.FromValue((MessageDeletionResult)protocolResult, protocolResult.GetRawResponse()); } /// @@ -693,9 +689,9 @@ public virtual async Task> CreateRunAsync(string threadI options.AssistantId = assistantId; options.Stream = null; - ClientResult protocolResult = await CreateRunAsync(threadId, options.ToBinaryContent(), cancellationToken.ToRequestOptions()) + ClientResult protocolResult = await CreateRunAsync(threadId, options, cancellationToken.ToRequestOptions()) .ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -715,8 +711,8 @@ public virtual ClientResult CreateRun(string threadId, string assista options.AssistantId = assistantId; options.Stream = null; - ClientResult protocolResult = CreateRun(threadId, options.ToBinaryContent(), cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + ClientResult protocolResult = CreateRun(threadId, options, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -741,7 +737,7 @@ public virtual AsyncCollectionResult CreateRunStreamingAsync( options.Stream = true; async Task sendRequestAsync() => - await CreateRunAsync(threadId, options.ToBinaryContent(), cancellationToken.ToRequestOptions(streaming: true)) + await CreateRunAsync(threadId, options, cancellationToken.ToRequestOptions(streaming: true)) .ConfigureAwait(false); return new AsyncStreamingUpdateCollection(sendRequestAsync, cancellationToken); @@ -768,7 +764,7 @@ public virtual CollectionResult CreateRunStreaming( options.AssistantId = assistantId; options.Stream = true; - ClientResult sendRequest() => CreateRun(threadId, options.ToBinaryContent(), cancellationToken.ToRequestOptions(streaming: true)); + ClientResult sendRequest() => CreateRun(threadId, options, cancellationToken.ToRequestOptions(streaming: true)); return new StreamingUpdateCollection(sendRequest, cancellationToken); } @@ -790,7 +786,7 @@ public virtual async Task> CreateThreadAndRunAsync( runOptions.Stream = null; BinaryContent protocolContent = CreateThreadAndRunProtocolContent(assistantId, threadOptions, runOptions); ClientResult protocolResult = await CreateThreadAndRunAsync(protocolContent, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -811,7 +807,7 @@ public virtual ClientResult CreateThreadAndRun( runOptions.Stream = null; BinaryContent protocolContent = CreateThreadAndRunProtocolContent(assistantId, threadOptions, runOptions); ClientResult protocolResult = CreateThreadAndRun(protocolContent, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -970,7 +966,7 @@ public virtual async Task> GetRunAsync(string threadId, Argument.AssertNotNullOrEmpty(runId, nameof(runId)); ClientResult protocolResult = await GetRunAsync(threadId, runId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -986,7 +982,7 @@ public virtual ClientResult GetRun(string threadId, string runId, Can Argument.AssertNotNullOrEmpty(runId, nameof(runId)); ClientResult protocolResult = GetRun(threadId, runId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1008,10 +1004,10 @@ public virtual async Task> SubmitToolOutputsToRunAsync( Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs).ToBinaryContent(); + BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs); ClientResult protocolResult = await SubmitToolOutputsToRunAsync(threadId, runId, content, cancellationToken.ToRequestOptions()) .ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1033,9 +1029,9 @@ public virtual ClientResult SubmitToolOutputsToRun( Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs).ToBinaryContent(); + BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs); ClientResult protocolResult = SubmitToolOutputsToRun(threadId, runId, content, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1056,8 +1052,7 @@ public virtual AsyncCollectionResult SubmitToolOutputsToRunStre Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs.ToList(), stream: true, null) - .ToBinaryContent(); + BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs.ToList(), stream: true, null); async Task sendRequestAsync() => await SubmitToolOutputsToRunAsync(threadId, runId, content, cancellationToken.ToRequestOptions(streaming: true)) @@ -1084,8 +1079,7 @@ public virtual CollectionResult SubmitToolOutputsToRunStreaming Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs.ToList(), stream: true, null) - .ToBinaryContent(); + BinaryContent content = new InternalSubmitToolOutputsRunRequest(toolOutputs.ToList(), stream: true, null); ClientResult sendRequest() => SubmitToolOutputsToRun(threadId, runId, content, cancellationToken.ToRequestOptions(streaming: true)); return new StreamingUpdateCollection(sendRequest, cancellationToken); @@ -1104,7 +1098,7 @@ public virtual async Task> CancelRunAsync(string threadI Argument.AssertNotNullOrEmpty(runId, nameof(runId)); ClientResult protocolResult = await CancelRunAsync(threadId, runId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1120,7 +1114,7 @@ public virtual ClientResult CancelRun(string threadId, string runId, Argument.AssertNotNullOrEmpty(runId, nameof(runId)); ClientResult protocolResult = CancelRun(threadId, runId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, ThreadRun.FromResponse); + return ClientResult.FromValue((ThreadRun)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1228,7 +1222,7 @@ public virtual CollectionResult GetRunSteps( public virtual async Task> GetRunStepAsync(string threadId, string runId, string stepId, CancellationToken cancellationToken = default) { ClientResult protocolResult = await GetRunStepAsync(threadId, runId, stepId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return CreateResultFromProtocol(protocolResult, RunStep.FromResponse); + return ClientResult.FromValue((RunStep)protocolResult, protocolResult.GetRawResponse()); } /// @@ -1242,7 +1236,7 @@ public virtual async Task> GetRunStepAsync(string threadId public virtual ClientResult GetRunStep(string threadId, string runId, string stepId, CancellationToken cancellationToken = default) { ClientResult protocolResult = GetRunStep(threadId, runId, stepId, cancellationToken.ToRequestOptions()); - return CreateResultFromProtocol(protocolResult, RunStep.FromResponse); + return ClientResult.FromValue((RunStep)protocolResult, protocolResult.GetRawResponse()); } private static BinaryContent CreateThreadAndRunProtocolContent( @@ -1254,23 +1248,23 @@ private static BinaryContent CreateThreadAndRunProtocolContent( InternalCreateThreadAndRunRequest internalRequest = new( assistantId, threadOptions, - runOptions.ModelOverride, runOptions.InstructionsOverride, runOptions.ToolsOverride, - // TODO: reconcile exposure of the the two different tool_resources, if needed - threadOptions?.ToolResources, runOptions.Metadata, runOptions.Temperature, + // TODO: reconcile exposure of the the two different tool_resources, if needed runOptions.NucleusSamplingFactor, runOptions.Stream, runOptions.MaxInputTokenCount, runOptions.MaxOutputTokenCount, runOptions.TruncationStrategy, - runOptions.ToolConstraint, runOptions.AllowParallelToolCalls, + runOptions.ModelOverride, + threadOptions.ToolResources, runOptions.ResponseFormat, - serializedAdditionalRawData: null); - return internalRequest.ToBinaryContent(); + runOptions.ToolConstraint, + additionalBinaryDataProperties: null); + return internalRequest; } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs index bfebfe8b9..8043b3d35 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs @@ -43,7 +43,7 @@ internal RequiredActionUpdate(ThreadRun run, RequiredAction action) internal static IEnumerable DeserializeRequiredActionUpdates(JsonElement element) { - ThreadRun run = ThreadRun.DeserializeThreadRun(element); + ThreadRun run = ThreadRun.DeserializeThreadRun(element, null); List updates = []; foreach (RequiredAction action in run.RequiredActions ?? []) { diff --git a/.dotnet/src/Custom/Chat/ChatClient.cs b/.dotnet/src/Custom/Chat/ChatClient.cs index 4a2d65a1d..baa636731 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.cs @@ -123,7 +123,7 @@ public virtual async Task> CompleteChatAsync(IEnume using BinaryContent content = options; ClientResult result = await CompleteChatAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - ChatCompletion chatCompletion = ChatCompletion.FromResponse(result.GetRawResponse()); + ChatCompletion chatCompletion = (ChatCompletion)result; scope?.RecordChatCompletion(chatCompletion); return ClientResult.FromValue(chatCompletion, result.GetRawResponse()); } @@ -152,7 +152,7 @@ public virtual ClientResult CompleteChat(IEnumerable SerializedAdditionalRawData { get; } diff --git a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs index c1e20f9d5..458d68f00 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs @@ -22,15 +22,15 @@ public partial class ConversationContentPart ?? (this as InternalRealtimeResponseAudioContentPart)?.Transcript; public static ConversationContentPart FromInputText(string text) - => new InternalRealtimeRequestTextContentPart(text); + => new InternalRealtimeRequestTextContentPart(text, ConversationContentPartKind.Text); public static ConversationContentPart FromInputAudioTranscript(string transcript = null) => new InternalRealtimeRequestAudioContentPart() { Transcript = transcript, }; public static ConversationContentPart FromOutputText(string text) - => new InternalRealtimeResponseTextContentPart(text); + => new InternalRealtimeResponseTextContentPart(text, ConversationContentPartKind.Text); public static ConversationContentPart FromOutputAudioTranscript(string transcript = null) - => new InternalRealtimeResponseAudioContentPart(transcript); + => new InternalRealtimeResponseAudioContentPart(transcript, ConversationContentPartKind.Audio); public static implicit operator ConversationContentPart(string text) => FromInputText(text); } \ No newline at end of file diff --git a/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs b/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs index dcb2621ee..0f4a1305f 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs @@ -40,13 +40,13 @@ public ConversationFunctionTool() : base(ConversationToolKind.Function, null) [SetsRequiredMembers] public ConversationFunctionTool(string name) - : this(ConversationToolKind.Function, null, name, null, null) + : this(name, null, null, ConversationToolKind.Function, null) { Argument.AssertNotNull(name, nameof(name)); } [SetsRequiredMembers] - internal ConversationFunctionTool(ConversationToolKind kind, IDictionary serializedAdditionalRawData, string name, string description, BinaryData parameters) : base(kind, serializedAdditionalRawData) + internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { _name = name; _description = description; diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index b5491da9a..4ab6a6255 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class Assistant { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) { diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index b7afca46f..bc9c4d01f 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToSerialString()); + writer.WriteStringValue(Model); if (Optional.IsCollectionDefined(Tools)) { writer.WritePropertyName("tools"u8); @@ -258,7 +258,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso } if (prop.NameEquals("model"u8)) { - model = prop.Value.GetString().ToString(); + model = prop.Value.GetString(); continue; } if (prop.NameEquals("tools"u8)) diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs index 15bd6a0ac..28564903c 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class AssistantCreationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AssistantCreationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, string model, IList tools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index a4f102947..deb60913b 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class AssistantDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AssistantDeletionResult(bool deleted, string assistantId) { diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs index beaffd6ab..b5715c6f1 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class AssistantModificationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public AssistantModificationOptions() { diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs index 72bbcb667..6afcada70 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class AssistantResponseFormat { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected AssistantResponseFormat(string @type) { diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index 2bbaaee42..be17e0d93 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class AssistantThread { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, ToolResources toolResources) { diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index b61d97d71..2cb653ff8 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -10,7 +10,7 @@ namespace OpenAI.Audio { public partial class AudioTranscription { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AudioTranscription(string language, string text, TimeSpan? duration) { diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index b2cfc5d12..08f35d2d7 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class AudioTranscriptionOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AudioTranscriptionOptions(string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranscriptionRequestModel model, IList internalTimestampGranularities, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index ae29adfd4..8ac1890f5 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -10,7 +10,7 @@ namespace OpenAI.Audio { public partial class AudioTranslation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AudioTranslation(string language, string text, TimeSpan? duration) { diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index a4e4474db..43b3eb2d7 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class AudioTranslationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal AudioTranslationOptions(string prompt, AudioTranslationFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranslationRequestModel model, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index e383c079d..4e061e39f 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatCompletion { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatCompletion(string id, string model, IEnumerable choices, DateTimeOffset createdAt) { diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index e545a63df..b4631462f 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatCompletionOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, InternalCreateChatCompletionRequestServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatFunction.cs b/.dotnet/src/Generated/Models/ChatFunction.cs index 87b61ec98..681e443e8 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatFunction(string functionName, string functionDescription, BinaryData functionParameters, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.cs index e3b6b89e8..010194fe6 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatFunctionCall { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ChatFunctionCall(string functionName, BinaryData functionArguments) { diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs index 703d58331..3d6eeef3d 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatFunctionChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 1643ece87..d5364a375 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public abstract partial class ChatMessage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.cs b/.dotnet/src/Generated/Models/ChatMessageContent.cs index 61b11b330..80094cf06 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContent.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatMessageContent { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatMessageContent(IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs index a667cb99e..70f46ab67 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatMessageContentPart { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs index aa8406b2a..f39072c9d 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatOutputTokenUsageDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatOutputTokenUsageDetails() { diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index 622c8284d..61dce869d 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public abstract partial class ChatResponseFormat { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ChatResponseFormat(string @type) { diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs index 698a15fd3..fb14aa6f4 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatTokenLogProbabilityDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IEnumerable topLogProbabilities) { diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs index 0f95982aa..fac3073ef 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatTokenTopLogProbabilityDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes) { diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.cs index cbd96783b..ccf8813ee 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatTokenUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index 927a8bbb2..ac3f5c266 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatTool { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index c889ffd4f..a260e4bfc 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatToolCall { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.cs b/.dotnet/src/Generated/Models/ChatToolChoice.cs index 79750a4a4..30151df23 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.cs @@ -9,6 +9,6 @@ namespace OpenAI.Chat { public partial class ChatToolChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs index 4c5e382c9..18444653e 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class CodeInterpreterToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal CodeInterpreterToolResources(IList fileIds, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs index 0e8c6fcbb..ba435219a 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationContentPart { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ConversationContentPart(ConversationContentPartKind @type) { diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs index 52e78c633..cf6dc64bb 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.cs @@ -2,18 +2,9 @@ #nullable disable -using System; -using System.Collections.Generic; - namespace OpenAI.RealtimeConversation { public partial class ConversationFunctionTool : ConversationTool { - internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) - { - _name = name; - _description = description; - _parameters = parameters; - } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs index 8e70d26b0..5c25ff0df 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTokenUsageDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens) { diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs index a3d76dfd2..5ea7a176e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ConversationInputTranscriptionOptions() { diff --git a/.dotnet/src/Generated/Models/ConversationItem.cs b/.dotnet/src/Generated/Models/ConversationItem.cs index e45e6d333..93277bbe2 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationItem { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ConversationItem(InternalRealtimeRequestItemType @type) { diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs index f49b4f62e..cdfb6c55b 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTokenUsageDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens) { diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs index cfb3a889f..5c9464db1 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitDetailsItem { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds) { diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index cf03be340..1a776beac 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Model)) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToSerialString()); + writer.WriteStringValue(Model); } if (Optional.IsDefined(TurnDetectionOptions)) { @@ -233,7 +233,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions model = null; continue; } - model = prop.Value.GetString().ToString(); + model = prop.Value.GetString(); continue; } if (prop.NameEquals("turn_detection"u8)) diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs index 40393124f..432028c00 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ConversationSessionOptions() { diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs index 20bfb6d4f..71ff6682c 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTokenUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails) { diff --git a/.dotnet/src/Generated/Models/ConversationTool.cs b/.dotnet/src/Generated/Models/ConversationTool.cs index 5b87a5f3f..bf110c951 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationTool { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ConversationTool(ConversationToolKind kind) { diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs index c99070e9e..2ff6f6bce 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationTurnDetectionOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind) { diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs index 964b27112..ade79e7f1 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationUpdate { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) { diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index b81acc75f..1e50a954d 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class EmbeddingGenerationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, string endUserId, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs index a4fb0d189..7d1588f6a 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount) { diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs index 37ed8a109..402a43899 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public abstract partial class FileChunkingStrategy { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected FileChunkingStrategy(string @type) { diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index c5fd69385..a54103b89 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { public partial class FileDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FileDeletionResult(bool deleted, string fileId) { diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index 76c67373c..413e57879 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class FileFromStoreRemovalResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FileFromStoreRemovalResult(string fileId, bool removed) { diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs index efa44ca02..2a9002091 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class FileSearchRankingOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public FileSearchRanker? Ranker { get; set; } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.cs index de45145bf..dad7de825 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class FileSearchToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FileSearchToolResources(IList vectorStoreIds, IList newVectorStores, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs new file mode 100644 index 000000000..2a274be22 --- /dev/null +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -0,0 +1,128 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.FineTuning +{ + [PersistableModelProxy(typeof(UnknownCreateFineTuningJobRequestIntegration))] + internal abstract partial class FineTuningIntegration : IJsonModel + { + internal FineTuningIntegration() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFineTuningIntegration(document.RootElement, options); + } + + internal static FineTuningIntegration DeserializeFineTuningIntegration(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "wandb": + return WeightsAndBiasesIntegration.DeserializeWeightsAndBiasesIntegration(element, options); + } + } + return UnknownCreateFineTuningJobRequestIntegration.DeserializeUnknownCreateFineTuningJobRequestIntegration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{options.Format}' format."); + } + } + + FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeFineTuningIntegration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(FineTuningIntegration fineTuningIntegration) + { + return BinaryContent.Create(fineTuningIntegration, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator FineTuningIntegration(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeFineTuningIntegration(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.cs index 48a4e69cb..d5c6e7683 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal abstract partial class FineTuningIntegration { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected FineTuningIntegration(string @type) { diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs index f81bb96d1..231db74b3 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningIntegrationWandbWandb { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FineTuningIntegrationWandbWandb(string project) { diff --git a/.dotnet/src/Generated/Models/FineTuningJob.cs b/.dotnet/src/Generated/Models/FineTuningJob.cs index 829d9d886..73517a307 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.cs @@ -11,7 +11,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJob { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FineTuningJob(string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, string organizationId, IEnumerable resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, int seed) { diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.cs b/.dotnet/src/Generated/Models/FineTuningJobError.cs index 2d2fba3aa..823fb70f5 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FineTuningJobError(string code, string message, string @param) { diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs index 994403334..4fe9ebb5f 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobEvent { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.FineTuningJobEventLevel level, string message) { diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 913a36676..99d907032 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters { - private protected IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) { diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.cs b/.dotnet/src/Generated/Models/FineTuningOptions.cs index 11d595eff..717783d41 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string trainingFile) { diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index 28aeb21f1..f2e789f6b 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -40,7 +40,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(ImageUri)) { writer.WritePropertyName("url"u8); - writer.WriteObjectValue(ImageUri, options); + writer.WriteStringValue(ImageUri.AbsoluteUri); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -111,7 +111,7 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo imageUri = null; continue; } - imageUri = Uri.DeserializeUri(prop.Value, options); + imageUri = new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/GeneratedImage.cs b/.dotnet/src/Generated/Models/GeneratedImage.cs index 8861a28dc..7029e2439 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class GeneratedImage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal GeneratedImage() { diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index 1805881db..9c2a3b9ee 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class GeneratedImageCollection { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal GeneratedImageCollection(DateTimeOffset createdAt) { diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.cs index d6b715e2a..1eb7d02d8 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class HyperparameterOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public HyperparameterOptions() { diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index 079005d29..88772ad1b 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageEditOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ImageEditOptions(InternalCreateImageEditRequestModel? model, BinaryData image, string prompt, BinaryData mask, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index dd679a7e2..b612c72c9 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageGenerationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, InternalCreateImageRequestModel? model, string prompt, long? n, string endUserId, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 731fe2f10..55e313555 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageVariationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ImageVariationOptions(InternalCreateImageVariationRequestModel? model, BinaryData image, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs index 5742d56fb..8bac38ae9 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalAddUploadPartRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalAddUploadPartRequest(BinaryData data) { diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs index 3ba4d07b8..854d2effc 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchFileSearch { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalAssistantToolsFileSearchFileSearch() { diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs index 59791e3e6..0eaf397c3 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchTypeOnly { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalAssistantToolsFileSearchTypeOnly() { diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs index e1405c3e8..0af9c4774 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantsNamedToolChoiceFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalAssistantsNamedToolChoiceFunction(string name) { diff --git a/.dotnet/src/Generated/Models/InternalBatchError.cs b/.dotnet/src/Generated/Models/InternalBatchError.cs index a54ec5a30..a47d43eab 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchError() { diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.cs index fb99cef9b..d2d7e4599 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchErrors { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchErrors() { diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.cs b/.dotnet/src/Generated/Models/InternalBatchJob.cs index 323cb52ef..bc7664412 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchJob { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchJob(string id, string endpoint, string inputFileId, string completionWindow, InternalBatchStatus status, DateTimeOffset createdAt) { diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs index 7ead7c644..344dbe14b 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestCounts { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestCounts(int total, int completed, int failed) { diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs index 7549c4e3a..f0a3b07ce 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestInput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalBatchRequestInput() { diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs index 8c3115032..a16d103a9 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutput() { diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs index 1f993ea80..1b226da64 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutputError() { diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs index bdbc3ef5a..0f26f8fe4 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutputResponse() { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs index 39e20c929..c282837dc 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionFunctionCallOption { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionFunctionCallOption(string name) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index b78acecd3..158dc16ac 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallChunkFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionMessageToolCallChunkFunction() { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs index 7e8c4b4d6..0e8851666 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs index 21beed0a7..524ceb4bf 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoiceFunction function) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs index 075fc13f0..da9aada26 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoiceFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionNamedToolChoiceFunction(string name) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs index ef755f0fd..c79352e21 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartImage(InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index bfbabcbf1..267c7ea23 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImageImageUrl { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageDetailLevel? detail, string url, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs index b4ec936cd..77bbbe7ae 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartRefusal { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartRefusal(string refusal) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs index d8e20fcaa..34a975abb 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartText { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartText(string text) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index 0bbb63717..ee71ec5c4 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionResponseMessage(string refusal, ChatMessageContent content) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index b4881e187..5d072fa6c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments) { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs index 5217c6758..0e13f7901 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalChatCompletionStreamOptions() { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index 17e3e7448..ab364bb4e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs index 1546002ff..bbd95cfd7 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.Files { internal partial class InternalCompleteUploadRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCompleteUploadRequest(IEnumerable partIds) { diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs index 76340c9e2..4e07c63ab 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateAssistantRequestToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs index 851293b79..90047a8e8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateAssistantRequestToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs index cd248f24e..5fa76c32b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalCreateBatchRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchRequestEndpoint endpoint) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs index 0e381eca5..f2f6f9198 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionFunctionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs index 907762d6b..b6ccd3c98 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponseChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason, int index, InternalChatCompletionResponseMessage message) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs index 211ade5cf..cf3976fe6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs index 26d8e971b..e36001a66 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoiceLogprobs { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index 5cc99b42f..b807eda23 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, int index, Chat.ChatFinishReason? finishReason) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs index 24effb5fc..77481f555 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs index 542fa8575..580923b89 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, int promptTokens, int totalTokens) { diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs index 495b4edfe..cea70a0be 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateCompletionRequest(InternalCreateCompletionRequestModel model, BinaryData prompt) { diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs index 850702677..6b993c5be 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs @@ -11,7 +11,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs index 93d3dd847..83e3e8842 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoice { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponseChoiceFinishReason finishReason, int index, InternalCreateCompletionResponseChoiceLogprobs logprobs, string text) { diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs index 1282ec28b..7ce9d1c27 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoiceLogprobs { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponseChoiceLogprobs() { diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs index 568ca49ae..eed0c78d1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalCreateFineTuningJobRequestWandbIntegrationWandb { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project) { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 695cf4959..16ce1aa96 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -172,7 +172,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Model != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToSerialString()); + writer.WriteStringValue(Model); } else { @@ -407,7 +407,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea model = null; continue; } - model = prop.Value.GetString().ToString(); + model = prop.Value.GetString(); continue; } if (prop.NameEquals("tool_resources"u8)) diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index 8fe840901..4ff45ca2c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequest(string assistantId) { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs index 7eb24acf9..68641834a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequestToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs index 5b7b3f4f0..ad6c3cd17 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs index 0a0bb79f4..568b1d830 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs index b9fc3ccd7..d0dce3fbb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs index 06f7b21e5..910d381e8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesFileSearchBase { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResourcesFileSearchBase() { diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs index e83d4ddf3..47658cc78 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranscriptionResponseJson { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateTranscriptionResponseJson(string text) { diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs index 1c3e6134f..e1912362f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranslationResponseJson { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalCreateTranslationResponseJson(string text) { diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs index 8711f4a25..19b10ded5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalCreateUploadRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateUploadRequest(string filename, InternalCreateUploadRequestPurpose purpose, int bytes, string mimeType) { diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs index f4358821f..0c3cf4068 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileBatchRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateVectorStoreFileBatchRequest(IEnumerable fileIds) { diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs index a5f1f6226..6b9b2af61 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalCreateVectorStoreFileRequest(string fileId) { diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs index 391a64ff9..d9392d144 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal abstract partial class InternalFileChunkingStrategyRequestParam { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalFileChunkingStrategyRequestParam(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs index f846811f5..a17256f3d 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalFileUploadOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalFileUploadOptions(Stream @file, FileUploadPurpose purpose, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index 1737d7d74..dc03eea27 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -20,7 +20,7 @@ internal InternalFineTuningIntegration() void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - this.JsonModelWriteCore(writer, options); + JsonModelWriteCore(writer, options); writer.WriteEndObject(); } @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegration)this.JsonModelCreateCore(ref reader, options); + InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected virtual InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -80,7 +80,7 @@ internal static InternalFineTuningIntegration DeserializeInternalFineTuningInteg return UnknownFineTuningIntegration.DeserializeUnknownFineTuningIntegration(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { @@ -94,7 +94,7 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuningIntegration)this.PersistableModelCreateCore(data, options); + InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected virtual InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs index 3e22f8770..16dd89536 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal abstract partial class InternalFineTuningIntegration { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalFineTuningIntegration(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index cf4f01957..42c462170 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -20,7 +20,7 @@ internal InternalFineTuningIntegrationWandb() void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - this.JsonModelWriteCore(writer, options); + JsonModelWriteCore(writer, options); writer.WriteEndObject(); } @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Wandb, options); } - InternalFineTuningIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)this.JsonModelCreateCore(ref reader, options); + InternalFineTuningIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)JsonModelCreateCore(ref reader, options); protected override InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -78,7 +78,7 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning return new InternalFineTuningIntegrationWandb(wandb, @type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { @@ -92,7 +92,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalFineTuningIntegrationWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)this.PersistableModelCreateCore(data, options); + InternalFineTuningIntegrationWandb IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)PersistableModelCreateCore(data, options); protected override InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs index b3a415e69..ecfe0cc74 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpoint { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, string fineTunedModelCheckpoint, int stepNumber, InternalFineTuningJobCheckpointMetrics metrics, string fineTuningJobId) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs index 7990fe5ca..65052a2da 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpointMetrics { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalFineTuningJobCheckpointMetrics() { diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs index c4c884e2b..37e93acc2 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs @@ -11,7 +11,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFinetuneChatRequestInput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalFinetuneChatRequestInput() { diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs index bc945026d..a8f3770b5 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFinetuneCompletionRequestInput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalFinetuneCompletionRequestInput() { diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs index a2241d88b..5bd7f2e79 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs @@ -9,7 +9,7 @@ namespace OpenAI { internal partial class InternalFunctionDefinition { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalFunctionDefinition(string name) { diff --git a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs index b7532402e..f3a11f319 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalFunctionParameters { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalFunctionParameters() { diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs index c4e974945..1c571a90f 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListAssistantsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListAssistantsResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs index b223e5c17..04e819996 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalListBatchesResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListBatchesResponse(IEnumerable data, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs index c27eb7619..7f007e20a 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobCheckpointsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListFineTuningJobCheckpointsResponse(IEnumerable data, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs index 070b3d049..8f6558a9a 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobEventsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListFineTuningJobEventsResponse(bool hasMore, IEnumerable data) { diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs index bccbb5ba4..e29c0994a 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListMessagesResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListMessagesResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs index e4bea4612..180870634 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListPaginatedFineTuningJobsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListPaginatedFineTuningJobsResponse(IEnumerable data, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs index 8753f6a0a..877b25951 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListRunStepsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListRunStepsResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs index 36ab6ac2c..5d0fa9758 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListRunsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListRunsResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs index a494bbec7..87050dbe5 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListThreadsResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListThreadsResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs index d185fbd88..d0a734cbf 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoreFilesResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListVectorStoreFilesResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs index 667f7ad1a..f802beeb3 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoresResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalListVectorStoresResponse(string firstId, string lastId, bool hasMore) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 0484ef376..6d747ac88 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.ToSerialString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -91,7 +91,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal detail = null; continue; } - detail = prop.Value.GetString().ToString(); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs index 0c3e23295..4347e60eb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentImageUrlObjectImageUrl { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalMessageContentImageUrlObjectImageUrl(Uri url) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index f0c30e1e8..212e1dddb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.ToSerialString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -91,7 +91,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna detail = null; continue; } - detail = prop.Value.GetString().ToString(); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs index 4398808b6..a0a1991fd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentItemFileObjectImageFile { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalMessageContentItemFileObjectImageFile(string fileId) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs index 1675ffc5b..cf7a8c3c7 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObjectFileCitation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(string fileId) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs index 74bad6595..f7bf1bc81 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObjectFilePath { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs index 19d010ea8..a1a1b62ed 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageContentTextObjectAnnotation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalMessageContentTextObjectAnnotation(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs index 11fcd92ae..2ac27256b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextObjectText { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextObjectText(string value, IEnumerable annotations) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs index 8bc7ed768..19cf2cbf3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaContent { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalMessageDeltaContent(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index d164c1e78..d1cd16c04 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.ToSerialString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -95,7 +95,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI detail = null; continue; } - detail = prop.Value.GetString().ToString(); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs index 3aff79925..4c5bd335f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageFileObjectImageFile { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentImageFileObjectImageFile() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 3bd96d738..5ce2257e0 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Detail)) { writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.ToSerialString()); + writer.WriteStringValue(Detail); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -95,7 +95,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt detail = null; continue; } - detail = prop.Value.GetString().ToString(); + detail = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs index 7a55b408c..b3c366bf9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageUrlObjectImageUrl { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentImageUrlObjectImageUrl() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs index 0d59b4552..62b5e49ac 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs index 503435dab..7039bddca 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs index 22fc478e1..54aec0c2d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextObjectText { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextObjectText() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs index e74270a85..42103daab 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObject { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectDelta delta) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs index ebb1796b6..8730242d0 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObjectDelta { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaObjectDelta() { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs index 4fd514e10..f25e5e315 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaTextContentAnnotation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalMessageDeltaTextContentAnnotation(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 41abdbf72..f73a206e0 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToSerialString()); + writer.WriteStringValue(_type); writer.WritePropertyName("image_file"u8); writer.WriteObjectValue(_imageFile, options); } @@ -57,7 +57,7 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToString(); + @type = prop.Value.GetString(); continue; } if (prop.NameEquals("image_file"u8)) diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 91f97073d..a55615cd1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToSerialString()); + writer.WriteStringValue(_type); writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(_imageUrl, options); } @@ -57,7 +57,7 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToString(); + @type = prop.Value.GetString(); continue; } if (prop.NameEquals("image_url"u8)) diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs index 9ba55bae7..9f765e201 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageObjectAttachment { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalMessageObjectAttachment() { diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index a8a5090b6..0704b0d65 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -28,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("refusal"u8); writer.WriteStringValue(InternalRefusal); writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToSerialString()); + writer.WriteStringValue(_type); } InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)JsonModelCreateCore(ref reader, options); @@ -62,7 +62,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC } if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToString(); + @type = prop.Value.GetString(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.cs index b318ee686..cd97d29ac 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategories { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs index 7fe846332..cb946b891 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategoryScores { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) { diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs index c789d2719..cb2f83706 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalModifyAssistantRequestToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs index 0ff149d99..5f9d9ea63 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalModifyAssistantRequestToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs index c414d9963..c78a0f1e8 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalModifyThreadRequestToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs index c0c8e67c8..1b643544a 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalModifyThreadRequestToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs index 4a1e6d5b2..43fb94325 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal abstract partial class InternalOmniTypedResponseFormat { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalOmniTypedResponseFormat(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs index baee8bdc4..daf114194 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeRequestCommand { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs index 9ee9193e9..f0ac843d1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestResponseCreateCommandResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs index 5b4eaa7c6..f87edce50 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponse(string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IEnumerable output) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs index 6ff8c43e2..abe217b48 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseApiError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseApiError(string @type, string message) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs index d2f71b352..307f7028a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseError(string @type, string message) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs index e965f8cb9..8fb95fe63 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeResponseItem { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeResponseItem(InternalRealtimeRequestItemType @type, string id) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index dc3bb3c1d..5580dc276 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseSession { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs index 3dbd8e04f..2b09db4d3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeResponseStatusDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeResponseStatusDetails(ConversationStatus @type) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs index 0efa8494e..4770e6b4f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeToolChoiceFunctionObjectFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalRealtimeToolChoiceFunctionObjectFunction(string name) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs index 16ca335fe..c7ed7380d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeToolChoiceObject { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeToolChoiceObject(ConversationToolKind @type) { diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index 6a9356589..834a81d97 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToSerialString()); + writer.WriteObjectValue(_type, options); writer.WritePropertyName("function"u8); writer.WriteObjectValue(_internalFunction, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) @@ -86,7 +86,7 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc } if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToObject(); + @type = prop.Value.GetObject(); continue; } if (prop.NameEquals("function"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index dfe47c81d..0e6c0b5f4 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRequiredFunctionToolCall { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction internalFunction) { diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs index ac1ea74d1..bacc180dd 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs @@ -10,7 +10,7 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaJsonSchema { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalResponseFormatJsonSchemaJsonSchema(string name) { diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs index 585f0b244..11d698dbd 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs @@ -10,7 +10,7 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaSchema { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalResponseFormatJsonSchemaSchema() { diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index a6ccb91f0..63808cfea 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(_type.ToSerialString()); + writer.WriteStringValue(_type); writer.WritePropertyName("text"u8); writer.WriteObjectValue(_text, options); } @@ -57,7 +57,7 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToString(); + @type = prop.Value.GetString(); continue; } if (prop.NameEquals("text"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 3fc045fce..4515d2e2c 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Assistants { internal partial class InternalRunObjectRequiredActionSubmitToolOutputs : IJsonModel { - internal InternalRunObjectRequiredActionSubmitToolOutputs() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,13 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (InternalRequiredFunctionToolCall item in ToolCalls) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (InternalRequiredFunctionToolCall item in ToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -74,7 +73,7 @@ internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInte { return null; } - IList toolCalls = default; + IReadOnlyList toolCalls = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs index 2ed1a55f1..844e52dff 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs @@ -4,25 +4,25 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { internal partial class InternalRunObjectRequiredActionSubmitToolOutputs { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; - internal InternalRunObjectRequiredActionSubmitToolOutputs(IEnumerable toolCalls) + internal InternalRunObjectRequiredActionSubmitToolOutputs() { - ToolCalls = toolCalls.ToList(); + ToolCalls = new ChangeTrackingList(); } - internal InternalRunObjectRequiredActionSubmitToolOutputs(IList toolCalls, IDictionary additionalBinaryDataProperties) + internal InternalRunObjectRequiredActionSubmitToolOutputs(IReadOnlyList toolCalls, IDictionary additionalBinaryDataProperties) { ToolCalls = toolCalls; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IList ToolCalls { get; } + public IReadOnlyList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index ca0976bab..5946a2f05 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("submit_tool_outputs"u8); writer.WriteObjectValue(SubmitToolOutputs, options); writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); + writer.WriteObjectValue(Type, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -83,7 +83,7 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J } if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString().ToObject(); + @type = prop.Value.GetObject(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 4a8ec3e5c..615825df4 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunRequiredAction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index e4233bdff..f1a2ffb1b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("delta"u8); writer.WriteObjectValue(Delta, options); writer.WritePropertyName("object"u8); - writer.WriteStringValue(this.Object.ToSerialString()); + writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -91,7 +91,7 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement } if (prop.NameEquals("object"u8)) { - @object = prop.Value.GetString().ToObject(); + @object = prop.Value.GetObject(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 536e5f876..955dcad22 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDelta { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs index 82332d9fc..43dd420de 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaObjectDelta { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaObjectDelta() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs index c934d03d3..c655d3c9d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRunStepDeltaStepDetails(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs index 944e00a08..80cb7393c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 2e3d2cdf5..8475eca3e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs index 0245f53b1..7f77ff14d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs index 1b1a526c1..30954445a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs index 1b0e6d6aa..074b4dcd5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @type) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs index b9ab22c7d..9b1c27ea2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObjectMessageCreation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messageId) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 5d1fc664b..442d12085 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IEnumerable outputs) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs index 2516f1748..55870a066 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObjectImage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs index c0dec727f..022e92149 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchObjectFileSearch { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs index 9f201118c..ad0985c19 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(float scoreThreshold) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs index 7820c5b7c..51981588d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchResultObjectContent { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent() { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs index af129b8d9..479da6dba 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFunctionObjectFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output) { diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs index 5fdeb5cd6..1c172ce06 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunToolCallObjectFunction { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalRunToolCallObjectFunction(string name, string arguments) { diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs index 379ab6230..81f34aaed 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunkOverlapTokens) { diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs index d9b07b07a..a7a6a3969 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { internal partial class InternalSubmitToolOutputsRunRequest { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalSubmitToolOutputsRunRequest(IEnumerable toolOutputs) { diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs index 501da870c..c64a9e8d3 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResources() { diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs index 95ec7ef6d..27ae205d7 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesCodeInterpreter { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResourcesCodeInterpreter() { diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs index 2d63f86aa..0e79ee103 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesFileSearch { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResourcesFileSearch() { diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs index 8e7f84634..e0c76f629 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalToolResourcesFileSearchIdsOnly { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public InternalToolResourcesFileSearchIdsOnly() { diff --git a/.dotnet/src/Generated/Models/InternalUpload.cs b/.dotnet/src/Generated/Models/InternalUpload.cs index 1281bf7da..283844566 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { internal partial class InternalUpload { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt) { diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.cs b/.dotnet/src/Generated/Models/InternalUploadPart.cs index 0626250f0..8d84b81ff 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { internal partial class InternalUploadPart { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId) { diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs index 68dc3b109..754fb02f0 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalVectorStoreFileBatchObjectFileCounts { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { diff --git a/.dotnet/src/Generated/Models/MessageContent.cs b/.dotnet/src/Generated/Models/MessageContent.cs index 5bf12c9d0..d71e51fe4 100644 --- a/.dotnet/src/Generated/Models/MessageContent.cs +++ b/.dotnet/src/Generated/Models/MessageContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageContent { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal MessageContent(IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 8777d1298..9674d0070 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { public partial class MessageCreationAttachment { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public MessageCreationAttachment(string fileId, IEnumerable tools) { diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.cs index a39dd78c0..bfbd6d976 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageCreationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal MessageCreationOptions(IList attachments, IDictionary metadata, Assistants.MessageRole role, IList content, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index 0448ece30..3fa9b3306 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal MessageDeletionResult(bool deleted, string messageId) { diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.cs index 2d690f622..bd35e5026 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageFailureDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal MessageFailureDetails(MessageFailureReason reason) { diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.cs index dbdffa35b..e67af552a 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class MessageModificationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public MessageModificationOptions() { diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index 9b87f2039..993701847 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Models { public partial class ModelDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ModelDeletionResult(bool deleted, string modelId) { diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index 1739b2dcc..3ed243bc6 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class ModerationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ModerationResult.cs b/.dotnet/src/Generated/Models/ModerationResult.cs index 5ec3d4605..04f61a08d 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { public partial class ModerationResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ModerationResult(bool flagged) { diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.cs index b83c70732..fc9fccbd2 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { public partial class ModerationResultCollection { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ModerationResultCollection(string id, string model) { diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index 915e6d8c7..b68295dd6 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class OpenAIEmbedding { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public int Index { get; } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index 182ee5a4f..6e3ac9c65 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class OpenAIEmbeddingCollection { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage) { diff --git a/.dotnet/src/Generated/Models/OpenAIError.cs b/.dotnet/src/Generated/Models/OpenAIError.cs index 0a321e977..36af08c43 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal partial class OpenAIError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIError(string code, string message, string @param, string @type) { diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs index d2562255e..86c130f2c 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal partial class OpenAIErrorResponse { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIErrorResponse(OpenAIError error) { diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index 49cd15b9d..21f9fc296 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { public partial class OpenAIFile { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes, Files.FileStatus status) { diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index 7c4d9176c..666ed7c19 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { public partial class OpenAIFileCollection { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIFileCollection(InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index b0b105d0f..5f2e1fce3 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -9,7 +9,7 @@ namespace OpenAI.Models { public partial class OpenAIModel { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt) { diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index 90167012f..47f366250 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -9,7 +9,7 @@ namespace OpenAI.Models { public partial class OpenAIModelCollection { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal OpenAIModelCollection(InternalListModelsResponseObject @object, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 9f9d131d4..d22a7e3c8 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (ModelOverride != null) { writer.WritePropertyName("model"u8); - writer.WriteStringValue(ModelOverride.ToSerialString()); + writer.WriteStringValue(ModelOverride); } else { @@ -310,7 +310,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele modelOverride = null; continue; } - modelOverride = prop.Value.GetString().ToString(); + modelOverride = prop.Value.GetString(); continue; } if (prop.NameEquals("instructions"u8)) diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index f585bc031..0ec491f60 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunCreationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList additionalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunError.cs b/.dotnet/src/Generated/Models/RunError.cs index 54e688da5..6d3ecadb1 100644 --- a/.dotnet/src/Generated/Models/RunError.cs +++ b/.dotnet/src/Generated/Models/RunError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunError(RunErrorCode code, string message) { diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs index e65a6e818..fc3fc8fbd 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunIncompleteDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunIncompleteDetails() { diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.cs b/.dotnet/src/Generated/Models/RunModificationOptions.cs index e586c02e2..9e4835521 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class RunModificationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public RunModificationOptions() { diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index 9153da60a..bc7cc1c51 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStep { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, RunStepDetails details) { diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs index d95c70275..a53dec4c7 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepCodeInterpreterOutput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected RunStepCodeInterpreterOutput(string @type) { diff --git a/.dotnet/src/Generated/Models/RunStepDetails.cs b/.dotnet/src/Generated/Models/RunStepDetails.cs index c8a2f52d4..83bde91bf 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepDetails { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected RunStepDetails(string @type) { diff --git a/.dotnet/src/Generated/Models/RunStepError.cs b/.dotnet/src/Generated/Models/RunStepError.cs index 09127a420..30d7a39a8 100644 --- a/.dotnet/src/Generated/Models/RunStepError.cs +++ b/.dotnet/src/Generated/Models/RunStepError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStepError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunStepError(RunStepErrorCode code, string message) { diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs index 4174a65cd..2e3150adb 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class RunStepFileSearchResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunStepFileSearchResult(string fileId, string fileName, float score) { diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs index f6d94bf2d..30f2ceb5b 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStepTokenUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.cs b/.dotnet/src/Generated/Models/RunStepToolCall.cs index 60766f643..12e01ad4c 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepToolCall { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected RunStepToolCall(string @type) { diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs index e183012ee..75491360a 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepUpdateCodeInterpreterOutput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; private protected RunStepUpdateCodeInterpreterOutput(string @type) { diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.cs b/.dotnet/src/Generated/Models/RunTokenUsage.cs index 39408ab79..f1ec3615d 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunTokenUsage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs index e4afdf2be..cf49d7012 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunTruncationStrategy { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal RunTruncationStrategy(int? lastMessages, InternalTruncationObjectType @type, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs index 4c250e255..ccf0b1c63 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class SpeechGenerationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat, InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, float? speedRatio, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index dfc5e41b8..1dc156105 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal StreamingChatCompletionUpdate(string model, string completionId, IEnumerable choices, DateTimeOffset createdAt) { diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs index 103334c50..1f7de1602 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class StreamingChatFunctionCallUpdate { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal StreamingChatFunctionCallUpdate() { diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs index 34ee007d5..9fa918935 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal StreamingChatToolCallUpdate(int index, InternalChatCompletionMessageToolCallChunkFunction function, Chat.ChatToolCallKind kind, string toolCallId, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs index 3898940b3..7a1df5a90 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadCreationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ThreadCreationOptions() { diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index 7b53a598c..f51902de9 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ThreadDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ThreadDeletionResult(bool deleted, string threadId) { diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 734ba743c..69164afa5 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadMessage { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, Assistants.MessageRole role, IEnumerable attachments) { diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs index 993243366..419986124 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadModificationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ThreadModificationOptions() { diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 12b71ebc9..20f94c305 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadRun { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) { diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index ab0d1336f..2c638f5bb 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Function, options); } writer.WritePropertyName("type"u8); - writer.WriteStringValue(_objectType.ToSerialString()); + writer.WriteStringValue(_objectType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ToolConstraint.cs b/.dotnet/src/Generated/Models/ToolConstraint.cs index 9680e8de4..65410129f 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolConstraint { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ToolConstraint(InternalAssistantsNamedToolChoiceFunction function, string objectType, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolDefinition.cs b/.dotnet/src/Generated/Models/ToolDefinition.cs index 7dceefcff..4b3a0df9c 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class ToolDefinition { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ToolDefinition(string @type, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolOutput.cs b/.dotnet/src/Generated/Models/ToolOutput.cs index 6e05d3f3a..5121e3553 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolOutput { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public ToolOutput() { diff --git a/.dotnet/src/Generated/Models/ToolResources.cs b/.dotnet/src/Generated/Models/ToolResources.cs index 9eb9eb142..30280a58e 100644 --- a/.dotnet/src/Generated/Models/ToolResources.cs +++ b/.dotnet/src/Generated/Models/ToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolResources { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ToolResources(CodeInterpreterToolResources codeInterpreter, FileSearchToolResources fileSearch, IDictionary additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index 139dacfae..cf6566c82 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedSegment { - private protected IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, ReadOnlyMemory tokenIds, float averageLogProbability, float noSpeechProbability) { diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index 6f8434241..94ea4ea8c 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedWord { - private protected IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime) { diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index 4c398bdde..ee1d5074d 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -43,7 +43,7 @@ protected override FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return FineTuningIntegration.DeserializeFineTuningIntegration(document.RootElement, options); + return DeserializeFineTuningIntegration(document.RootElement, options); } internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownCreateFineTuningJobRequestIntegration(JsonElement element, ModelReaderWriterOptions options) @@ -93,7 +93,7 @@ protected override FineTuningIntegration PersistableModelCreateCore(BinaryData d case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return FineTuningIntegration.DeserializeFineTuningIntegration(document.RootElement, options); + return DeserializeFineTuningIntegration(document.RootElement, options); } default: throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support reading '{options.Format}' format."); diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index 837c64f65..c6e94fa49 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -19,7 +19,7 @@ internal UnknownFineTuningIntegration() void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); - this.JsonModelWriteCore(writer, options); + JsonModelWriteCore(writer, options); writer.WriteEndObject(); } @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)this.JsonModelCreateCore(ref reader, options); + InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)JsonModelCreateCore(ref reader, options); protected override InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -69,7 +69,7 @@ internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegra return new UnknownFineTuningIntegration(@type, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => this.PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)this.PersistableModelCreateCore(data, options); + InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)PersistableModelCreateCore(data, options); protected override InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index 75f2a8fa6..8b0d63489 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStore { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) { diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 5ba11552f..42e953d13 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_counts"u8); writer.WriteObjectValue(FileCounts, options); writer.WritePropertyName("object"u8); - writer.WriteStringValue(this.Object.ToSerialString()); + writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -115,7 +115,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE } if (prop.NameEquals("object"u8)) { - @object = prop.Value.GetString().ToObject(); + @object = prop.Value.GetObject(); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index 09f44e467..2d0feff10 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreBatchFileJob { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts) { diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs index ff16c7626..628d5db8f 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { public partial class VectorStoreCreationHelper { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public VectorStoreCreationHelper() { diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs index 56d8442e7..ce527f408 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreCreationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public VectorStoreCreationOptions() { diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index bbdc21947..95aa34708 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreDeletionResult { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStoreDeletionResult(bool deleted, string vectorStoreId) { diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs index af60e2adc..9f196b20c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs @@ -9,6 +9,6 @@ namespace OpenAI.VectorStores { public partial class VectorStoreExpirationPolicy { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index a65d73d7e..6b3d23ca0 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociation { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, string fileId, int size) { diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs index 8fff82934..fe3bbf316 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociationError { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code, string message) { diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs index ebc81317d..b1dd3647e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileCounts { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal VectorStoreFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs index d10693f4c..1981b2fff 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreModificationOptions { - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; public VectorStoreModificationOptions() { diff --git a/.dotnet/src/Generated/OpenAIClient.cs b/.dotnet/src/Generated/OpenAIClient.cs index 7bafb3597..6d07001cd 100644 --- a/.dotnet/src/Generated/OpenAIClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.cs @@ -5,19 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using OpenAI.Assistants; -using OpenAI.Audio; -using OpenAI.Batch; -using OpenAI.Chat; -using OpenAI.Embeddings; -using OpenAI.Files; -using OpenAI.FineTuning; -using OpenAI.Images; -using OpenAI.LegacyCompletions; -using OpenAI.Models; -using OpenAI.Moderations; -using OpenAI.RealtimeConversation; -using OpenAI.VectorStores; namespace OpenAI { @@ -27,23 +14,6 @@ public partial class OpenAIClient private const string AuthorizationHeader = "Authorization"; private readonly ApiKeyCredential _keyCredential; private const string AuthorizationApiKeyPrefix = "Bearer"; - private AudioClient _cachedAudioClient; - private AssistantClient _cachedAssistantClient; - private BatchClient _cachedBatchClient; - private ChatClient _cachedChatClient; - private LegacyCompletionClient _cachedLegacyCompletionClient; - private EmbeddingClient _cachedEmbeddingClient; - private OpenAIFileClient _cachedOpenAIFileClient; - private FineTuningClient _cachedFineTuningClient; - private ImageClient _cachedImageClient; - private InternalAssistantMessageClient _cachedInternalAssistantMessageClient; - private OpenAIModelClient _cachedOpenAIModelClient; - private ModerationClient _cachedModerationClient; - private RealtimeConversationClient _cachedRealtimeConversationClient; - private InternalAssistantThreadClient _cachedInternalAssistantThreadClient; - private InternalAssistantRunClient _cachedInternalAssistantRunClient; - private VectorStoreClient _cachedVectorStoreClient; - private InternalUploadsClient _cachedInternalUploadsClient; protected OpenAIClient() { diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index eb75214f0..015acb07c 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -1095,7 +1095,7 @@ public static ChatCompletion ChatCompletion(string id = default, string model = public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default, IEnumerable topLogProbabilities = default) { - utf8Bytes ??= new ReadOnlyMemory(); + utf8Bytes ??= new byte[](); topLogProbabilities ??= new ChangeTrackingList(); return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), topLogProbabilities?.ToList(), null); @@ -1103,7 +1103,7 @@ public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(stri public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default) { - utf8Bytes ??= new ReadOnlyMemory(); + utf8Bytes ??= new byte[](); return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); } @@ -1237,7 +1237,7 @@ public static TranscribedWord TranscribedWord(string word = default, TimeSpan st public static TranscribedSegment TranscribedSegment(int id = default, string text = default, float temperature = default, float compressionRatio = default, TimeSpan startTime = default, TimeSpan endTime = default, int seekOffset = default, ReadOnlyMemory tokenIds = default, float averageLogProbability = default, float noSpeechProbability = default) { - tokenIds ??= new ReadOnlyMemory(); + tokenIds ??= new int[](); return new TranscribedSegment( id, diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json new file mode 100644 index 000000000..b69ce6560 --- /dev/null +++ b/.dotnet/tspCodeModel.json @@ -0,0 +1,51262 @@ +{ + "$id": "1", + "Name": "OpenAI", + "ApiVersions": [], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "CreateUploadRequestPurpose", + "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "12", + "kind": "enum", + "name": "UploadStatus", + "crossLanguageDefinitionId": "Upload.status.anonymous", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "14", + "kind": "enumvalue", + "name": "pending", + "value": "pending", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "Upload_object", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "upload", + "value": "upload", + "description": "upload", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Upload_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "25", + "kind": "enum", + "name": "OpenAIFile_object", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "27", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "26" + }, + "enumType": { + "$ref": "25" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The OpenAIFile_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "28", + "kind": "enum", + "name": "OpenAIFilePurpose", + "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "30", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "assistants_output", + "value": "assistants_output", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "batch_output", + "value": "batch_output", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "fine-tune-results", + "value": "fine-tune-results", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "OpenAIFileStatus", + "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "uploaded", + "value": "uploaded", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "processed", + "value": "processed", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "UploadPart_object", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "upload.part", + "value": "upload.part", + "description": "upload.part", + "valueType": { + "$ref": "53" + }, + "enumType": { + "$ref": "52" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The UploadPart_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "55", + "kind": "enum", + "name": "ListVectorStoresRequestOrder", + "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", + "valueType": { + "$id": "56", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "57", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + }, + { + "$id": "59", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "60", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "61", + "kind": "enum", + "name": "ListVectorStoresResponse_object", + "valueType": { + "$id": "62", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "63", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "62" + }, + "enumType": { + "$ref": "61" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoresResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "VectorStoreObject_object", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "vector_store", + "value": "vector_store", + "description": "vector_store", + "valueType": { + "$ref": "65" + }, + "enumType": { + "$ref": "64" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "67", + "kind": "enum", + "name": "VectorStoreObjectStatus", + "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", + "valueType": { + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "69", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "70", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "71", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "72", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "73", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "74", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "75", + "kind": "enum", + "name": "VectorStoreExpirationAfter_anchor", + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "77", + "kind": "enumvalue", + "name": "last_active_at", + "value": "last_active_at", + "description": "last_active_at", + "valueType": { + "$ref": "76" + }, + "enumType": { + "$ref": "75" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreExpirationAfter_anchor", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "DeleteVectorStoreResponse_object", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "vector_store.deleted", + "value": "vector_store.deleted", + "description": "vector_store.deleted", + "valueType": { + "$ref": "79" + }, + "enumType": { + "$ref": "78" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "81", + "kind": "enum", + "name": "ListVectorStoreFilesRequestOrder", + "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", + "valueType": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "83", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "84", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + }, + { + "$id": "85", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "86", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "87", + "kind": "enum", + "name": "ListVectorStoreFilesFilter", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", + "valueType": { + "$id": "88", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "89", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "90", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "91", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "92", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "93", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "95", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "97", + "kind": "enum", + "name": "ListVectorStoreFilesResponse_object", + "valueType": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "99", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "98" + }, + "enumType": { + "$ref": "97" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoreFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "VectorStoreFileObject_object", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "vector_store.file", + "value": "vector_store.file", + "description": "vector_store.file", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "103", + "kind": "enum", + "name": "VectorStoreFileObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", + "valueType": { + "$id": "104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "105", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "107", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "109", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "111", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "113", + "kind": "enum", + "name": "VectorStoreFileObjectLastErrorCode", + "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", + "valueType": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "115", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "117", + "kind": "enumvalue", + "name": "unsupported_file", + "value": "unsupported_file", + "valueType": { + "$id": "118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "119", + "kind": "enumvalue", + "name": "invalid_file", + "value": "invalid_file", + "valueType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "121", + "kind": "enum", + "name": "DeleteVectorStoreFileResponse_object", + "valueType": { + "$id": "122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "123", + "kind": "enumvalue", + "name": "vector_store.file.deleted", + "value": "vector_store.file.deleted", + "description": "vector_store.file.deleted", + "valueType": { + "$ref": "122" + }, + "enumType": { + "$ref": "121" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "VectorStoreFileBatchObject_object", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "vector_store.files_batch", + "value": "vector_store.files_batch", + "description": "vector_store.files_batch", + "valueType": { + "$ref": "125" + }, + "enumType": { + "$ref": "124" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileBatchObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "127", + "kind": "enum", + "name": "VectorStoreFileBatchObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", + "valueType": { + "$id": "128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "129", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "131", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "133", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "135", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "137", + "kind": "enum", + "name": "ListFilesInVectorStoreBatchRequestOrder", + "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", + "valueType": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "139", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + }, + { + "$id": "141", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "143", + "kind": "enum", + "name": "CreateMessageRequestRole", + "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", + "valueType": { + "$id": "144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "145", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + }, + { + "$id": "147", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "149", + "kind": "enum", + "name": "FileSearchRankingOptionsRanker", + "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", + "valueType": { + "$id": "150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "151", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + }, + { + "$id": "153", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "valueType": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "155", + "kind": "enum", + "name": "AssistantToolsFileSearchTypeOnly_type", + "valueType": { + "$id": "156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "157", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "description": "file_search", + "valueType": { + "$ref": "156" + }, + "enumType": { + "$ref": "155" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantToolsFileSearchTypeOnly_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "158", + "kind": "enum", + "name": "CreateThreadAndRunRequestModel", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "160", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "164", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "166", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "172", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "200", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "206", + "kind": "enum", + "name": "TruncationObjectType", + "crossLanguageDefinitionId": "TruncationObject.type.anonymous", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "208", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "last_messages", + "value": "last_messages", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "CreateThreadAndRunRequestToolChoice", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "AssistantsNamedToolChoiceType", + "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "code_interpreter", + "value": "code_interpreter", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "228", + "kind": "enum", + "name": "RunObject_object", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "230", + "kind": "enumvalue", + "name": "thread.run", + "value": "thread.run", + "description": "thread.run", + "valueType": { + "$ref": "229" + }, + "enumType": { + "$ref": "228" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "231", + "kind": "enum", + "name": "RunObjectStatus", + "crossLanguageDefinitionId": "RunObject.status.anonymous", + "valueType": { + "$id": "232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "233", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "235", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "237", + "kind": "enumvalue", + "name": "requires_action", + "value": "requires_action", + "valueType": { + "$id": "238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "239", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "241", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "243", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "245", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "247", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "249", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "251", + "kind": "enum", + "name": "RunObjectRequiredAction_type", + "valueType": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "253", + "kind": "enumvalue", + "name": "submit_tool_outputs", + "value": "submit_tool_outputs", + "description": "submit_tool_outputs", + "valueType": { + "$ref": "252" + }, + "enumType": { + "$ref": "251" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObjectRequiredAction_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "RunToolCallObject_type", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "255" + }, + "enumType": { + "$ref": "254" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunToolCallObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "257", + "kind": "enum", + "name": "RunObjectLastErrorCode", + "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", + "valueType": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "259", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "261", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "263", + "kind": "enumvalue", + "name": "invalid_prompt", + "value": "invalid_prompt", + "valueType": { + "$id": "264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "265", + "kind": "enum", + "name": "RunObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "267", + "kind": "enumvalue", + "name": "max_completion_tokens", + "value": "max_completion_tokens", + "valueType": { + "$id": "268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + }, + { + "$id": "269", + "kind": "enumvalue", + "name": "max_prompt_tokens", + "value": "max_prompt_tokens", + "valueType": { + "$id": "270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "271", + "kind": "enum", + "name": "CreateRunRequestModel", + "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", + "valueType": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "273", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "275", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "277", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "279", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "281", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "283", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "285", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "287", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "289", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "291", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "293", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "295", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "297", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "299", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "301", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "303", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "305", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "307", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "309", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "311", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "313", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "315", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "317", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "319", + "kind": "enum", + "name": "ListRunsRequestOrder", + "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", + "valueType": { + "$id": "320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "321", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + }, + { + "$id": "323", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "325", + "kind": "enum", + "name": "ListRunsResponse_object", + "valueType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "327", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "326" + }, + "enumType": { + "$ref": "325" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "ListRunStepsRequestOrder", + "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "ListRunStepsResponse_object", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "335" + }, + "enumType": { + "$ref": "334" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunStepsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "337", + "kind": "enum", + "name": "RunStepObject_object", + "valueType": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "339", + "kind": "enumvalue", + "name": "thread.run.step", + "value": "thread.run.step", + "description": "thread.run.step", + "valueType": { + "$ref": "338" + }, + "enumType": { + "$ref": "337" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "340", + "kind": "enum", + "name": "RunStepObjectType", + "crossLanguageDefinitionId": "RunStepObject.type.anonymous", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "342", + "kind": "enumvalue", + "name": "message_creation", + "value": "message_creation", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "RunStepObjectStatus", + "crossLanguageDefinitionId": "RunStepObject.status.anonymous", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "350", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "354", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "356", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "358", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "360", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "description": "default_2024_08_21", + "valueType": { + "$ref": "359" + }, + "enumType": { + "$ref": "358" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "361", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "valueType": { + "$id": "362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "363", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "362" + }, + "enumType": { + "$ref": "361" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "364", + "kind": "enum", + "name": "RunStepObjectLastErrorCode", + "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", + "valueType": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "366", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + }, + { + "$id": "368", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "370", + "kind": "enum", + "name": "ThreadObject_object", + "valueType": { + "$id": "371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "372", + "kind": "enumvalue", + "name": "thread", + "value": "thread", + "description": "thread", + "valueType": { + "$ref": "371" + }, + "enumType": { + "$ref": "370" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ThreadObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "373", + "kind": "enum", + "name": "DeleteThreadResponse_object", + "valueType": { + "$id": "374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "375", + "kind": "enumvalue", + "name": "thread.deleted", + "value": "thread.deleted", + "description": "thread.deleted", + "valueType": { + "$ref": "374" + }, + "enumType": { + "$ref": "373" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteThreadResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "376", + "kind": "enum", + "name": "RealtimeRequestCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", + "valueType": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "378", + "kind": "enumvalue", + "name": "session_update", + "value": "session.update", + "valueType": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "380", + "kind": "enumvalue", + "name": "input_audio_buffer_append", + "value": "input_audio_buffer.append", + "valueType": { + "$id": "381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "382", + "kind": "enumvalue", + "name": "input_audio_buffer_commit", + "value": "input_audio_buffer.commit", + "valueType": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "384", + "kind": "enumvalue", + "name": "input_audio_buffer_clear", + "value": "input_audio_buffer.clear", + "valueType": { + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "386", + "kind": "enumvalue", + "name": "item_create", + "value": "conversation.item.create", + "valueType": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "388", + "kind": "enumvalue", + "name": "item_delete", + "value": "conversation.item.delete", + "valueType": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "390", + "kind": "enumvalue", + "name": "item_truncate", + "value": "conversation.item.truncate", + "valueType": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "392", + "kind": "enumvalue", + "name": "response_create", + "value": "response.create", + "valueType": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "394", + "kind": "enumvalue", + "name": "response_cancel", + "value": "response.cancel", + "valueType": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "396", + "kind": "enum", + "name": "RealtimeRequestModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", + "valueType": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "398", + "kind": "enumvalue", + "name": "gpt_4o_realtime", + "value": "gpt-4o-realtime", + "valueType": { + "$id": "399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "396" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "400", + "kind": "enum", + "name": "RealtimeRequestSessionUpdateCommandSessionModality", + "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "402", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "400" + }, + "decorators": [] + }, + { + "$id": "404", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "400" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "406", + "kind": "enum", + "name": "RealtimeVoice", + "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", + "valueType": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "408", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + }, + { + "$id": "410", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + }, + { + "$id": "412", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "414", + "kind": "enum", + "name": "RealtimeAudioFormat", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", + "valueType": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "416", + "kind": "enumvalue", + "name": "pcm16", + "value": "pcm16", + "valueType": { + "$id": "417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + }, + { + "$id": "418", + "kind": "enumvalue", + "name": "g711_ulaw", + "value": "g711_ulaw", + "valueType": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + }, + { + "$id": "420", + "kind": "enumvalue", + "name": "g711_alaw", + "value": "g711_alaw", + "valueType": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "422", + "kind": "enum", + "name": "RealtimeAudioInputTranscriptionModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", + "valueType": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "424", + "kind": "enumvalue", + "name": "whisper_1", + "value": "whisper-1", + "valueType": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "422" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "426", + "kind": "enum", + "name": "RealtimeTurnDetectionType", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", + "valueType": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "428", + "kind": "enumvalue", + "name": "server_vad", + "value": "server_vad", + "valueType": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "426" + }, + "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "430", + "kind": "enum", + "name": "RealtimeToolType", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", + "valueType": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "432", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "430" + }, + "decorators": [] + } + ], + "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "434", + "kind": "enum", + "name": "RealtimeToolChoiceLiteral", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", + "valueType": { + "$id": "435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "436", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", + "decorators": [] + }, + { + "$id": "438", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should call no tools whatsoever.", + "decorators": [] + }, + { + "$id": "440", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should call at least one tool.", + "decorators": [] + } + ], + "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "442", + "kind": "enum", + "name": "RealtimeItemType", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", + "valueType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "444", + "kind": "enumvalue", + "name": "message", + "value": "message", + "valueType": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + }, + { + "$id": "446", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + }, + { + "$id": "448", + "kind": "enumvalue", + "name": "function_call_output", + "value": "function_call_output", + "valueType": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "450", + "kind": "enum", + "name": "RealtimeMessageRole", + "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", + "valueType": { + "$id": "451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "452", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "454", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "456", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "458", + "kind": "enum", + "name": "RealtimeItemStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", + "valueType": { + "$id": "459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "460", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + }, + { + "$id": "462", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + }, + { + "$id": "464", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "466", + "kind": "enum", + "name": "RealtimeContentPartType", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", + "valueType": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "468", + "kind": "enumvalue", + "name": "input_text", + "value": "input_text", + "valueType": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "470", + "kind": "enumvalue", + "name": "input_audio", + "value": "input_audio", + "valueType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "472", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "474", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "476", + "kind": "enum", + "name": "RealtimeResponseCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", + "valueType": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "478", + "kind": "enumvalue", + "name": "session_created", + "value": "session.created", + "valueType": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "480", + "kind": "enumvalue", + "name": "session_updated", + "value": "session.updated", + "valueType": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "482", + "kind": "enumvalue", + "name": "item_created", + "value": "conversation.item.created", + "valueType": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "484", + "kind": "enumvalue", + "name": "item_deleted", + "value": "conversation.item.deleted", + "valueType": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "486", + "kind": "enumvalue", + "name": "item_truncated", + "value": "conversation.item.truncated", + "valueType": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "488", + "kind": "enumvalue", + "name": "response_created", + "value": "response.created", + "valueType": { + "$id": "489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "490", + "kind": "enumvalue", + "name": "response_done", + "value": "response.done", + "valueType": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "492", + "kind": "enumvalue", + "name": "rate_limits_updated", + "value": "rate_limits.updated", + "valueType": { + "$id": "493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "494", + "kind": "enumvalue", + "name": "response_output_item_added", + "value": "response.output_item.added", + "valueType": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "496", + "kind": "enumvalue", + "name": "response_output_item_done", + "value": "response.output_item.done", + "valueType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "498", + "kind": "enumvalue", + "name": "response_content_part_added", + "value": "response.content_part.added", + "valueType": { + "$id": "499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "500", + "kind": "enumvalue", + "name": "response_content_part_done", + "value": "response.content_part.done", + "valueType": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "502", + "kind": "enumvalue", + "name": "response_audio_delta", + "value": "response.audio.delta", + "valueType": { + "$id": "503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "504", + "kind": "enumvalue", + "name": "response_audio_done", + "value": "response.audio.done", + "valueType": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "506", + "kind": "enumvalue", + "name": "response_audio_transcript_delta", + "value": "response.audio_transcript.delta", + "valueType": { + "$id": "507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "508", + "kind": "enumvalue", + "name": "response_audio_transcript_done", + "value": "response.audio_transcript.done", + "valueType": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "510", + "kind": "enumvalue", + "name": "response_text_delta", + "value": "response.text.delta", + "valueType": { + "$id": "511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "512", + "kind": "enumvalue", + "name": "response_text_done", + "value": "response.text.done", + "valueType": { + "$id": "513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "514", + "kind": "enumvalue", + "name": "response_function_call_arguments_delta", + "value": "response.function_call_arguments.delta", + "valueType": { + "$id": "515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "516", + "kind": "enumvalue", + "name": "response_function_call_arguments_done", + "value": "response.function_call_arguments.done", + "valueType": { + "$id": "517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "518", + "kind": "enumvalue", + "name": "input_audio_buffer_speech_started", + "value": "input_audio_buffer.speech_started", + "valueType": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "520", + "kind": "enumvalue", + "name": "input_audio_buffer_speech_stopped", + "value": "input_audio_buffer.speech_stopped", + "valueType": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "522", + "kind": "enumvalue", + "name": "item_input_audio_transcription_completed", + "value": "conversation.item.input_audio_transcription.completed", + "valueType": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "524", + "kind": "enumvalue", + "name": "item_input_audio_transcription_failed", + "value": "conversation.item.input_audio_transcription.failed", + "valueType": { + "$id": "525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "526", + "kind": "enumvalue", + "name": "input_audio_buffer_committed", + "value": "input_audio_buffer.committed", + "valueType": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "528", + "kind": "enumvalue", + "name": "input_audio_buffer_cleared", + "value": "input_audio_buffer.cleared", + "valueType": { + "$id": "529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "530", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "532", + "kind": "enum", + "name": "RealtimeResponseSession_object", + "valueType": { + "$id": "533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "534", + "kind": "enumvalue", + "name": "realtime.session", + "value": "realtime.session", + "description": "realtime.session", + "valueType": { + "$ref": "533" + }, + "enumType": { + "$ref": "532" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseSession_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "535", + "kind": "enum", + "name": "RealtimeResponseItem_object", + "valueType": { + "$id": "536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "537", + "kind": "enumvalue", + "name": "realtime.item", + "value": "realtime.item", + "description": "realtime.item", + "valueType": { + "$ref": "536" + }, + "enumType": { + "$ref": "535" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseItem_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "538", + "kind": "enum", + "name": "RealtimeResponse_object", + "valueType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "540", + "kind": "enumvalue", + "name": "realtime.response", + "value": "realtime.response", + "description": "realtime.response", + "valueType": { + "$ref": "539" + }, + "enumType": { + "$ref": "538" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "541", + "kind": "enum", + "name": "RealtimeResponseStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", + "valueType": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "543", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "545", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "547", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "549", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "551", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "553", + "kind": "enum", + "name": "RealtimeResponseCancelledStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", + "valueType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "555", + "kind": "enumvalue", + "name": "turn_detected", + "value": "turn_detected", + "valueType": { + "$id": "556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "553" + }, + "decorators": [] + }, + { + "$id": "557", + "kind": "enumvalue", + "name": "client_cancelled", + "value": "client_cancelled", + "valueType": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "553" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "559", + "kind": "enum", + "name": "RealtimeResponseIncompleteStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", + "valueType": { + "$id": "560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "561", + "kind": "enumvalue", + "name": "max_output_tokens", + "value": "max_output_tokens", + "valueType": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "559" + }, + "decorators": [] + }, + { + "$id": "563", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "559" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "565", + "kind": "enum", + "name": "CreateModerationRequestModel", + "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", + "valueType": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "567", + "kind": "enumvalue", + "name": "text-moderation-latest", + "value": "text-moderation-latest", + "valueType": { + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "565" + }, + "decorators": [] + }, + { + "$id": "569", + "kind": "enumvalue", + "name": "text-moderation-stable", + "value": "text-moderation-stable", + "valueType": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "565" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "571", + "kind": "enum", + "name": "ListModelsResponse_object", + "valueType": { + "$id": "572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "573", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "572" + }, + "enumType": { + "$ref": "571" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListModelsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "574", + "kind": "enum", + "name": "Model_object", + "valueType": { + "$id": "575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "576", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "575" + }, + "enumType": { + "$ref": "574" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Model_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "577", + "kind": "enum", + "name": "DeleteModelResponse_object", + "valueType": { + "$id": "578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "579", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "578" + }, + "enumType": { + "$ref": "577" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteModelResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "580", + "kind": "enum", + "name": "MessageObject_object", + "valueType": { + "$id": "581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "582", + "kind": "enumvalue", + "name": "thread.message", + "value": "thread.message", + "description": "thread.message", + "valueType": { + "$ref": "581" + }, + "enumType": { + "$ref": "580" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "583", + "kind": "enum", + "name": "MessageObjectStatus", + "crossLanguageDefinitionId": "MessageObject.status.anonymous", + "valueType": { + "$id": "584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "585", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + }, + { + "$id": "587", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + }, + { + "$id": "589", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "591", + "kind": "enum", + "name": "MessageObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "593", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "595", + "kind": "enumvalue", + "name": "max_tokens", + "value": "max_tokens", + "valueType": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "597", + "kind": "enumvalue", + "name": "run_cancelled", + "value": "run_cancelled", + "valueType": { + "$id": "598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "599", + "kind": "enumvalue", + "name": "run_expired", + "value": "run_expired", + "valueType": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "601", + "kind": "enumvalue", + "name": "run_failed", + "value": "run_failed", + "valueType": { + "$id": "602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "603", + "kind": "enum", + "name": "MessageObjectRole", + "crossLanguageDefinitionId": "MessageObject.role.anonymous", + "valueType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "605", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "603" + }, + "decorators": [] + }, + { + "$id": "607", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "603" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "609", + "kind": "enum", + "name": "ListMessagesRequestOrder", + "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", + "valueType": { + "$id": "610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "611", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "609" + }, + "decorators": [] + }, + { + "$id": "613", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "609" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "615", + "kind": "enum", + "name": "ListMessagesResponse_object", + "valueType": { + "$id": "616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "617", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "616" + }, + "enumType": { + "$ref": "615" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListMessagesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "618", + "kind": "enum", + "name": "DeleteMessageResponse_object", + "valueType": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "620", + "kind": "enumvalue", + "name": "thread.message.deleted", + "value": "thread.message.deleted", + "description": "thread.message.deleted", + "valueType": { + "$ref": "619" + }, + "enumType": { + "$ref": "618" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteMessageResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "621", + "kind": "enum", + "name": "CreateImageRequestModel", + "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", + "valueType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "623", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "621" + }, + "decorators": [] + }, + { + "$id": "625", + "kind": "enumvalue", + "name": "dall-e-3", + "value": "dall-e-3", + "valueType": { + "$id": "626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "621" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "627", + "kind": "enum", + "name": "CreateImageRequestQuality", + "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", + "valueType": { + "$id": "628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "629", + "kind": "enumvalue", + "name": "standard", + "value": "standard", + "valueType": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "627" + }, + "decorators": [] + }, + { + "$id": "631", + "kind": "enumvalue", + "name": "hd", + "value": "hd", + "valueType": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "627" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "633", + "kind": "enum", + "name": "CreateImageRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", + "valueType": { + "$id": "634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "635", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "633" + }, + "decorators": [] + }, + { + "$id": "637", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "633" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "639", + "kind": "enum", + "name": "CreateImageRequestSize", + "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", + "valueType": { + "$id": "640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "641", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "643", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "645", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "647", + "kind": "enumvalue", + "name": "1792x1024", + "value": "1792x1024", + "valueType": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "649", + "kind": "enumvalue", + "name": "1024x1792", + "value": "1024x1792", + "valueType": { + "$id": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "651", + "kind": "enum", + "name": "CreateImageRequestStyle", + "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", + "valueType": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "653", + "kind": "enumvalue", + "name": "vivid", + "value": "vivid", + "valueType": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "651" + }, + "decorators": [] + }, + { + "$id": "655", + "kind": "enumvalue", + "name": "natural", + "value": "natural", + "valueType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "651" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "657", + "kind": "enum", + "name": "CreateImageEditRequestModel", + "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", + "valueType": { + "$id": "658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "659", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "657" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "661", + "kind": "enum", + "name": "CreateImageEditRequestSize", + "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", + "valueType": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "663", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + }, + { + "$id": "665", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + }, + { + "$id": "667", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "669", + "kind": "enum", + "name": "CreateImageEditRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", + "valueType": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "671", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "669" + }, + "decorators": [] + }, + { + "$id": "673", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "669" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "675", + "kind": "enum", + "name": "CreateImageVariationRequestModel", + "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", + "valueType": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "677", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "675" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "679", + "kind": "enum", + "name": "CreateImageVariationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", + "valueType": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "681", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "679" + }, + "decorators": [] + }, + { + "$id": "683", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "679" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "685", + "kind": "enum", + "name": "CreateImageVariationRequestSize", + "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", + "valueType": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "687", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + }, + { + "$id": "689", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + }, + { + "$id": "691", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "693", + "kind": "enum", + "name": "CreateFineTuningJobRequestModel", + "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", + "valueType": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "695", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "697", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "699", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "701", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "703", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "705", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "703" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "707", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "709", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "707" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "711", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "713", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "711" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "715", + "kind": "enum", + "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "717", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "715" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "719", + "kind": "enum", + "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "721", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "719" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "723", + "kind": "enum", + "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "725", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "723" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "727", + "kind": "enum", + "name": "FineTuningJob_object", + "valueType": { + "$id": "728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "729", + "kind": "enumvalue", + "name": "fine_tuning.job", + "value": "fine_tuning.job", + "description": "fine_tuning.job", + "valueType": { + "$ref": "728" + }, + "enumType": { + "$ref": "727" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJob_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "730", + "kind": "enum", + "name": "FineTuningJobStatus", + "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", + "valueType": { + "$id": "731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "732", + "kind": "enumvalue", + "name": "validating_files", + "value": "validating_files", + "valueType": { + "$id": "733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "734", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "736", + "kind": "enumvalue", + "name": "running", + "value": "running", + "valueType": { + "$id": "737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "738", + "kind": "enumvalue", + "name": "succeeded", + "value": "succeeded", + "valueType": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "740", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "742", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "744", + "kind": "enum", + "name": "ListPaginatedFineTuningJobsResponse_object", + "valueType": { + "$id": "745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "746", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "745" + }, + "enumType": { + "$ref": "744" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListPaginatedFineTuningJobsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "747", + "kind": "enum", + "name": "FineTuningJobCheckpoint_object", + "valueType": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "749", + "kind": "enumvalue", + "name": "fine_tuning.job.checkpoint", + "value": "fine_tuning.job.checkpoint", + "description": "fine_tuning.job.checkpoint", + "valueType": { + "$ref": "748" + }, + "enumType": { + "$ref": "747" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobCheckpoint_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "750", + "kind": "enum", + "name": "ListFineTuningJobCheckpointsResponse_object", + "valueType": { + "$id": "751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "752", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "751" + }, + "enumType": { + "$ref": "750" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobCheckpointsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "753", + "kind": "enum", + "name": "FineTuningJobEventLevel", + "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", + "valueType": { + "$id": "754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "755", + "kind": "enumvalue", + "name": "info", + "value": "info", + "valueType": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + }, + { + "$id": "757", + "kind": "enumvalue", + "name": "warn", + "value": "warn", + "valueType": { + "$id": "758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + }, + { + "$id": "759", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "761", + "kind": "enum", + "name": "FineTuningJobEvent_object", + "valueType": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "763", + "kind": "enumvalue", + "name": "fine_tuning.job.event", + "value": "fine_tuning.job.event", + "description": "fine_tuning.job.event", + "valueType": { + "$ref": "762" + }, + "enumType": { + "$ref": "761" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobEvent_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "764", + "kind": "enum", + "name": "ListFineTuningJobEventsResponse_object", + "valueType": { + "$id": "765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "766", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "765" + }, + "enumType": { + "$ref": "764" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobEventsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "767", + "kind": "enum", + "name": "CreateFileRequestPurpose", + "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", + "valueType": { + "$id": "768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "769", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "771", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "773", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "775", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "777", + "kind": "enum", + "name": "ListFilesResponse_object", + "valueType": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "779", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "778" + }, + "enumType": { + "$ref": "777" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "780", + "kind": "enum", + "name": "DeleteFileResponse_object", + "valueType": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "782", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "781" + }, + "enumType": { + "$ref": "780" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "783", + "kind": "enum", + "name": "CreateEmbeddingRequestModel", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", + "valueType": { + "$id": "784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "785", + "kind": "enumvalue", + "name": "text-embedding-ada-002", + "value": "text-embedding-ada-002", + "valueType": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + }, + { + "$id": "787", + "kind": "enumvalue", + "name": "text-embedding-3-small", + "value": "text-embedding-3-small", + "valueType": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + }, + { + "$id": "789", + "kind": "enumvalue", + "name": "text-embedding-3-large", + "value": "text-embedding-3-large", + "valueType": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "791", + "kind": "enum", + "name": "CreateEmbeddingRequestEncodingFormat", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", + "valueType": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "793", + "kind": "enumvalue", + "name": "float", + "value": "float", + "valueType": { + "$id": "794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "791" + }, + "decorators": [] + }, + { + "$id": "795", + "kind": "enumvalue", + "name": "base64", + "value": "base64", + "valueType": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "791" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "797", + "kind": "enum", + "name": "Embedding_object", + "valueType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "799", + "kind": "enumvalue", + "name": "embedding", + "value": "embedding", + "description": "embedding", + "valueType": { + "$ref": "798" + }, + "enumType": { + "$ref": "797" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Embedding_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "800", + "kind": "enum", + "name": "CreateEmbeddingResponse_object", + "valueType": { + "$id": "801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "802", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "801" + }, + "enumType": { + "$ref": "800" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateEmbeddingResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "803", + "kind": "enum", + "name": "CreateCompletionRequestModel", + "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", + "valueType": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "805", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-instruct", + "value": "gpt-3.5-turbo-instruct", + "valueType": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + }, + { + "$id": "807", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + }, + { + "$id": "809", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "811", + "kind": "enum", + "name": "CreateCompletionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "813", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + }, + { + "$id": "815", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + }, + { + "$id": "817", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "819", + "kind": "enum", + "name": "CreateCompletionResponse_object", + "valueType": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "821", + "kind": "enumvalue", + "name": "text_completion", + "value": "text_completion", + "description": "text_completion", + "valueType": { + "$ref": "820" + }, + "enumType": { + "$ref": "819" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "822", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartText_type", + "valueType": { + "$id": "823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "824", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "823" + }, + "enumType": { + "$ref": "822" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartText_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "825", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImage_type", + "valueType": { + "$id": "826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "827", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "826" + }, + "enumType": { + "$ref": "825" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartImage_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "828", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", + "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", + "valueType": { + "$id": "829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "830", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + }, + { + "$id": "832", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + }, + { + "$id": "834", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "836", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartRefusal_type", + "valueType": { + "$id": "837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "838", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "837" + }, + "enumType": { + "$ref": "836" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartRefusal_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "839", + "kind": "enum", + "name": "ChatCompletionMessageToolCall_type", + "valueType": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "841", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "840" + }, + "enumType": { + "$ref": "839" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCall_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "842", + "kind": "enum", + "name": "CreateChatCompletionRequestModel", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", + "valueType": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "844", + "kind": "enumvalue", + "name": "o1-preview", + "value": "o1-preview", + "valueType": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "846", + "kind": "enumvalue", + "name": "o1-preview-2024-09-12", + "value": "o1-preview-2024-09-12", + "valueType": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "848", + "kind": "enumvalue", + "name": "o1-mini", + "value": "o1-mini", + "valueType": { + "$id": "849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "850", + "kind": "enumvalue", + "name": "o1-mini-2024-09-12", + "value": "o1-mini-2024-09-12", + "valueType": { + "$id": "851", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "852", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "854", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "856", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "858", + "kind": "enumvalue", + "name": "chatgpt-4o-latest", + "value": "chatgpt-4o-latest", + "valueType": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "860", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "862", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "864", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "866", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "868", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "870", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "872", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "874", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "876", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "878", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "880", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "882", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "884", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "886", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "888", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "890", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "892", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0301", + "value": "gpt-3.5-turbo-0301", + "valueType": { + "$id": "893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "894", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "895", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "896", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "898", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "900", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "902", + "kind": "enum", + "name": "CreateChatCompletionRequestServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", + "valueType": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "904", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "902" + }, + "decorators": [] + }, + { + "$id": "906", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "902" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "908", + "kind": "enum", + "name": "ChatCompletionTool_type", + "valueType": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "910", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "909" + }, + "enumType": { + "$ref": "908" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionTool_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "911", + "kind": "enum", + "name": "CreateChatCompletionRequestToolChoice", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", + "valueType": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "913", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + }, + { + "$id": "915", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + }, + { + "$id": "917", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "919", + "kind": "enum", + "name": "ChatCompletionNamedToolChoice_type", + "valueType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "921", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "920" + }, + "enumType": { + "$ref": "919" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionNamedToolChoice_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "922", + "kind": "enum", + "name": "CreateChatCompletionResponseChoiceFinishReason1", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "924", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "926", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "928", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "930", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "932", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "934", + "kind": "enum", + "name": "ChatCompletionResponseMessage_role", + "valueType": { + "$id": "935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "936", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "935" + }, + "enumType": { + "$ref": "934" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionResponseMessage_role", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "937", + "kind": "enum", + "name": "CreateChatCompletionResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", + "valueType": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "939", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + }, + { + "$id": "941", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "943", + "kind": "enum", + "name": "CreateChatCompletionResponse_object", + "valueType": { + "$id": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "945", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "944" + }, + "enumType": { + "$ref": "943" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "946", + "kind": "enum", + "name": "CreateBatchRequestEndpoint", + "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", + "valueType": { + "$id": "947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "948", + "kind": "enumvalue", + "name": "/v1/chat/completions", + "value": "/v1/chat/completions", + "valueType": { + "$id": "949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "946" + }, + "decorators": [] + }, + { + "$id": "950", + "kind": "enumvalue", + "name": "/v1/embeddings", + "value": "/v1/embeddings", + "valueType": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "946" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "952", + "kind": "enum", + "name": "CreateBatchRequest_completion_window", + "valueType": { + "$id": "953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "954", + "kind": "enumvalue", + "name": "24h", + "value": "24h", + "description": "24h", + "valueType": { + "$ref": "953" + }, + "enumType": { + "$ref": "952" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateBatchRequest_completion_window", + "isFixed": false, + "isFlags": false, + "usage": "Spread,Json", + "decorators": [] + }, + { + "$id": "955", + "kind": "enum", + "name": "Batch_object", + "valueType": { + "$id": "956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "957", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "description": "batch", + "valueType": { + "$ref": "956" + }, + "enumType": { + "$ref": "955" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Batch_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "958", + "kind": "enum", + "name": "BatchErrors_object", + "valueType": { + "$id": "959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "960", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "959" + }, + "enumType": { + "$ref": "958" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchErrors_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "961", + "kind": "enum", + "name": "BatchStatus", + "crossLanguageDefinitionId": "Batch.status.anonymous", + "valueType": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "963", + "kind": "enumvalue", + "name": "validating", + "value": "validating", + "valueType": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "965", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "967", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "969", + "kind": "enumvalue", + "name": "finalizing", + "value": "finalizing", + "valueType": { + "$id": "970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "971", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "973", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "975", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "977", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "979", + "kind": "enum", + "name": "ListBatchesResponse_object", + "valueType": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "981", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "980" + }, + "enumType": { + "$ref": "979" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListBatchesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "982", + "kind": "enum", + "name": "CreateAssistantRequestModel", + "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", + "valueType": { + "$id": "983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "984", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "986", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "988", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "990", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "992", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "994", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "996", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "998", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1000", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "1001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1002", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1004", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "1005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1006", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "1007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1008", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "1009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1010", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1012", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1014", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "1015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1016", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1018", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "1019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1020", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1022", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "1023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1024", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1026", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1028", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1030", + "kind": "enum", + "name": "AssistantObject_object", + "valueType": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1032", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "1031" + }, + "enumType": { + "$ref": "1030" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1033", + "kind": "enum", + "name": "ListAssistantsRequestOrder", + "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", + "valueType": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1035", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1033" + }, + "decorators": [] + }, + { + "$id": "1037", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1033" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1039", + "kind": "enum", + "name": "ListAssistantsResponse_object", + "valueType": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1041", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1040" + }, + "enumType": { + "$ref": "1039" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListAssistantsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1042", + "kind": "enum", + "name": "DeleteAssistantResponse_object", + "valueType": { + "$id": "1043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1044", + "kind": "enumvalue", + "name": "assistant.deleted", + "value": "assistant.deleted", + "description": "assistant.deleted", + "valueType": { + "$ref": "1043" + }, + "enumType": { + "$ref": "1042" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteAssistantResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1045", + "kind": "enum", + "name": "CreateSpeechRequestModel", + "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", + "valueType": { + "$id": "1046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1047", + "kind": "enumvalue", + "name": "tts-1", + "value": "tts-1", + "valueType": { + "$id": "1048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1045" + }, + "decorators": [] + }, + { + "$id": "1049", + "kind": "enumvalue", + "name": "tts-1-hd", + "value": "tts-1-hd", + "valueType": { + "$id": "1050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1045" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1051", + "kind": "enum", + "name": "CreateSpeechRequestVoice", + "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", + "valueType": { + "$id": "1052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1053", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "1054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1055", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "1056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1057", + "kind": "enumvalue", + "name": "fable", + "value": "fable", + "valueType": { + "$id": "1058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1059", + "kind": "enumvalue", + "name": "onyx", + "value": "onyx", + "valueType": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1061", + "kind": "enumvalue", + "name": "nova", + "value": "nova", + "valueType": { + "$id": "1062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1063", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1065", + "kind": "enum", + "name": "CreateSpeechRequestResponseFormat", + "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", + "valueType": { + "$id": "1066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1067", + "kind": "enumvalue", + "name": "mp3", + "value": "mp3", + "valueType": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1069", + "kind": "enumvalue", + "name": "opus", + "value": "opus", + "valueType": { + "$id": "1070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1071", + "kind": "enumvalue", + "name": "aac", + "value": "aac", + "valueType": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1073", + "kind": "enumvalue", + "name": "flac", + "value": "flac", + "valueType": { + "$id": "1074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1075", + "kind": "enumvalue", + "name": "wav", + "value": "wav", + "valueType": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1077", + "kind": "enumvalue", + "name": "pcm", + "value": "pcm", + "valueType": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1079", + "kind": "enum", + "name": "CreateTranscriptionRequestModel", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", + "valueType": { + "$id": "1080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1081", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1079" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1083", + "kind": "enum", + "name": "CreateTranscriptionRequestResponseFormat1", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", + "valueType": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1085", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1087", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1089", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1091", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1093", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1095", + "kind": "enum", + "name": "CreateTranscriptionRequestTimestampGranularity", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", + "valueType": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1097", + "kind": "enumvalue", + "name": "word", + "value": "word", + "valueType": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1095" + }, + "decorators": [] + }, + { + "$id": "1099", + "kind": "enumvalue", + "name": "segment", + "value": "segment", + "valueType": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1095" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1101", + "kind": "enum", + "name": "CreateTranscriptionResponseVerboseJson_task", + "valueType": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1103", + "kind": "enumvalue", + "name": "transcribe", + "value": "transcribe", + "description": "transcribe", + "valueType": { + "$ref": "1102" + }, + "enumType": { + "$ref": "1101" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranscriptionResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1104", + "kind": "enum", + "name": "CreateTranslationRequestModel", + "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1106", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1104" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1108", + "kind": "enum", + "name": "CreateTranslationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", + "valueType": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1110", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1112", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1114", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1116", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1118", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1120", + "kind": "enum", + "name": "CreateTranslationResponseVerboseJson_task", + "valueType": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1122", + "kind": "enumvalue", + "name": "translate", + "value": "translate", + "description": "translate", + "valueType": { + "$ref": "1121" + }, + "enumType": { + "$ref": "1120" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranslationResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1123", + "kind": "enum", + "name": "BatchRequestInput_method", + "valueType": { + "$id": "1124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1125", + "kind": "enumvalue", + "name": "POST", + "value": "POST", + "description": "POST", + "valueType": { + "$ref": "1124" + }, + "enumType": { + "$ref": "1123" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchRequestInput_method", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1126", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1128", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1130", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1132", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1134", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1136", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponse_object", + "valueType": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1138", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "1137" + }, + "enumType": { + "$ref": "1136" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionFunctionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1139", + "kind": "enum", + "name": "ChatCompletionMessageToolCallChunk_type", + "valueType": { + "$id": "1140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1141", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "1140" + }, + "enumType": { + "$ref": "1139" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCallChunk_type", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1142", + "kind": "enum", + "name": "ChatCompletionStreamResponseDeltaRole", + "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", + "valueType": { + "$id": "1143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1144", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1146", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1148", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1150", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1152", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1154", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1156", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1158", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1160", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1162", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1164", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", + "valueType": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1166", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "1167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1164" + }, + "decorators": [] + }, + { + "$id": "1168", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1164" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1170", + "kind": "enum", + "name": "CreateChatCompletionStreamResponse_object", + "valueType": { + "$id": "1171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1172", + "kind": "enumvalue", + "name": "chat.completion.chunk", + "value": "chat.completion.chunk", + "description": "chat.completion.chunk", + "valueType": { + "$ref": "1171" + }, + "enumType": { + "$ref": "1170" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionStreamResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1173", + "kind": "enum", + "name": "MessageDeltaContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1175", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + }, + { + "$id": "1177", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + }, + { + "$id": "1179", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1181", + "kind": "enum", + "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1183", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + }, + { + "$id": "1185", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + }, + { + "$id": "1187", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1189", + "kind": "enum", + "name": "MessageContentImageFileObject_type", + "valueType": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1191", + "kind": "enumvalue", + "name": "image_file", + "value": "image_file", + "description": "image_file", + "valueType": { + "$ref": "1190" + }, + "enumType": { + "$ref": "1189" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageFileObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1192", + "kind": "enum", + "name": "MessageContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1194", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + }, + { + "$id": "1196", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + }, + { + "$id": "1198", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1200", + "kind": "enum", + "name": "MessageContentTextObject_type", + "valueType": { + "$id": "1201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1202", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1201" + }, + "enumType": { + "$ref": "1200" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1203", + "kind": "enum", + "name": "MessageContentRefusalObject_type", + "valueType": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1205", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "1204" + }, + "enumType": { + "$ref": "1203" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentRefusalObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1206", + "kind": "enum", + "name": "MessageContentImageUrlObject_type", + "valueType": { + "$id": "1207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1208", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "1207" + }, + "enumType": { + "$ref": "1206" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageUrlObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1209", + "kind": "enum", + "name": "MessageContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1211", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1213", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1215", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1217", + "kind": "enum", + "name": "MessageDeltaObject_object", + "valueType": { + "$id": "1218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1219", + "kind": "enumvalue", + "name": "thread.message.delta", + "value": "thread.message.delta", + "description": "thread.message.delta", + "valueType": { + "$ref": "1218" + }, + "enumType": { + "$ref": "1217" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1220", + "kind": "enum", + "name": "MessageDeltaObjectDeltaRole", + "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", + "valueType": { + "$id": "1221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1222", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + }, + { + "$id": "1224", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1226", + "kind": "enum", + "name": "MessageRequestContentTextObject_type", + "valueType": { + "$id": "1227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1228", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1227" + }, + "enumType": { + "$ref": "1226" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageRequestContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1229", + "kind": "enum", + "name": "RunStepDeltaObject_object", + "valueType": { + "$id": "1230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1231", + "kind": "enumvalue", + "name": "thread.run.step.delta", + "value": "thread.run.step.delta", + "description": "thread.run.step.delta", + "valueType": { + "$ref": "1230" + }, + "enumType": { + "$ref": "1229" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1232", + "kind": "enum", + "name": "ListThreadsResponse_object", + "valueType": { + "$id": "1233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1234", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1233" + }, + "enumType": { + "$ref": "1232" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListThreadsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1235", + "kind": "enum", + "name": "ChatCompletionRole", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", + "valueType": { + "$id": "1236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1237", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1239", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1241", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1243", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1245", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "1246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + } + ], + "access": "public", + "description": "The role of the author of a message", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + } + ], + "Models": [ + { + "$id": "1247", + "kind": "model", + "name": "CreateUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1248", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to upload.", + "type": { + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" + }, + { + "$id": "1250", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" + }, + { + "$id": "1251", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The number of bytes in the file you are uploading.", + "type": { + "$id": "1252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" + }, + { + "$id": "1253", + "kind": "property", + "name": "mime_type", + "serializedName": "mime_type", + "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", + "type": { + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" + } + ] + }, + { + "$id": "1255", + "kind": "model", + "name": "Upload", + "crossLanguageDefinitionId": "OpenAI.Upload", + "usage": "Output,Json", + "description": "The Upload object can accept byte chunks in the form of Parts.", + "decorators": [], + "properties": [ + { + "$id": "1256", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The Upload unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.id" + }, + { + "$id": "1258", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1259", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1260", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.created_at" + }, + { + "$id": "1261", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to be uploaded.", + "type": { + "$id": "1262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.filename" + }, + { + "$id": "1263", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The intended number of bytes to be uploaded.", + "type": { + "$id": "1264", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.bytes" + }, + { + "$id": "1265", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", + "type": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.purpose" + }, + { + "$id": "1267", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the Upload.", + "type": { + "$ref": "12" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.status" + }, + { + "$id": "1268", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1269", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1270", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" + }, + { + "$id": "1271", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"upload\".", + "type": { + "$id": "1272", + "kind": "constant", + "valueType": { + "$ref": "22" + }, + "value": "upload", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.object" + }, + { + "$id": "1273", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The ready File object after the Upload is completed.", + "type": { + "$id": "1274", + "kind": "nullable", + "type": { + "$id": "1275", + "kind": "model", + "name": "OpenAIFile", + "crossLanguageDefinitionId": "OpenAI.OpenAIFile", + "usage": "Output,Json", + "description": "The `File` object represents a document that has been uploaded to OpenAI.", + "decorators": [], + "properties": [ + { + "$id": "1276", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The file identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "1277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" + }, + { + "$id": "1278", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The size of the file, in bytes.", + "type": { + "$id": "1279", + "kind": "nullable", + "type": { + "$id": "1280", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" + }, + { + "$id": "1281", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the file was created.", + "type": { + "$id": "1282", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" + }, + { + "$id": "1284", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" + }, + { + "$id": "1286", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `file`.", + "type": { + "$id": "1287", + "kind": "constant", + "valueType": { + "$ref": "25" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" + }, + { + "$id": "1288", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", + "type": { + "$ref": "28" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" + }, + { + "$id": "1289", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" + }, + { + "$id": "1290", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", + "type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.file" + } + ] + }, + { + "$ref": "1275" + }, + { + "$id": "1292", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "OpenAI.ErrorResponse", + "usage": "Output,Error,Json", + "decorators": [], + "properties": [ + { + "$id": "1293", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "1294", + "kind": "model", + "name": "Error", + "crossLanguageDefinitionId": "OpenAI.Error", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1295", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "1296", + "kind": "nullable", + "type": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.code" + }, + { + "$id": "1298", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "1299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.message" + }, + { + "$id": "1300", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "1301", + "kind": "nullable", + "type": { + "$id": "1302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.param" + }, + { + "$id": "1303", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.type" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" + } + ] + }, + { + "$ref": "1294" + }, + { + "$id": "1305", + "kind": "model", + "name": "AddUploadPartRequest", + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "1306", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The chunk of bytes for this Part.", + "type": { + "$id": "1307", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" + } + ] + }, + { + "$id": "1308", + "kind": "model", + "name": "UploadPart", + "crossLanguageDefinitionId": "OpenAI.UploadPart", + "usage": "Output,Json", + "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", + "decorators": [], + "properties": [ + { + "$id": "1309", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The upload Part unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.id" + }, + { + "$id": "1311", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Part was created.", + "type": { + "$id": "1312", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1313", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" + }, + { + "$id": "1314", + "kind": "property", + "name": "upload_id", + "serializedName": "upload_id", + "description": "The ID of the Upload object that this Part was added to.", + "type": { + "$id": "1315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" + }, + { + "$id": "1316", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `upload.part`.", + "type": { + "$id": "1317", + "kind": "constant", + "valueType": { + "$ref": "52" + }, + "value": "upload.part", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.object" + } + ] + }, + { + "$id": "1318", + "kind": "model", + "name": "CompleteUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1319", + "kind": "property", + "name": "part_ids", + "serializedName": "part_ids", + "description": "The ordered list of Part IDs.", + "type": { + "$id": "1320", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" + }, + { + "$id": "1322", + "kind": "property", + "name": "md5", + "serializedName": "md5", + "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", + "type": { + "$id": "1323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" + } + ] + }, + { + "$id": "1324", + "kind": "model", + "name": "ListVectorStoresResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1325", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1326", + "kind": "constant", + "valueType": { + "$ref": "61" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" + }, + { + "$id": "1327", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1328", + "kind": "array", + "name": "ArrayVectorStoreObject", + "valueType": { + "$id": "1329", + "kind": "model", + "name": "VectorStoreObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", + "usage": "Output,Json", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", + "decorators": [], + "properties": [ + { + "$id": "1330", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" + }, + { + "$id": "1332", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store`.", + "type": { + "$id": "1333", + "kind": "constant", + "valueType": { + "$ref": "64" + }, + "value": "vector_store", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" + }, + { + "$id": "1334", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store was created.", + "type": { + "$id": "1335", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1336", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" + }, + { + "$id": "1337", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" + }, + { + "$id": "1339", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total number of bytes used by the files in the vector store.", + "type": { + "$id": "1340", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" + }, + { + "$id": "1341", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1342", + "kind": "model", + "name": "VectorStoreObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1343", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1344", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1345", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been successfully processed.", + "type": { + "$id": "1346", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" + }, + { + "$id": "1347", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1348", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" + }, + { + "$id": "1349", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that were cancelled.", + "type": { + "$id": "1350", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1351", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1352", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" + }, + { + "$id": "1353", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", + "type": { + "$ref": "67" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" + }, + { + "$id": "1354", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1355", + "kind": "model", + "name": "VectorStoreExpirationAfter", + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", + "usage": "Input,Output,Json", + "description": "The expiration policy for a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1356", + "kind": "property", + "name": "anchor", + "serializedName": "anchor", + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", + "type": { + "$id": "1357", + "kind": "constant", + "valueType": { + "$ref": "75" + }, + "value": "last_active_at", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" + }, + { + "$id": "1358", + "kind": "property", + "name": "days", + "serializedName": "days", + "description": "The number of days after the anchor time that the vector store will expire.", + "type": { + "$id": "1359", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" + }, + { + "$id": "1360", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", + "type": { + "$id": "1361", + "kind": "nullable", + "type": { + "$id": "1362", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1363", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" + }, + { + "$id": "1364", + "kind": "property", + "name": "last_active_at", + "serializedName": "last_active_at", + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", + "type": { + "$id": "1365", + "kind": "nullable", + "type": { + "$id": "1366", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1367", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" + }, + { + "$id": "1368", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1369", + "kind": "nullable", + "type": { + "$id": "1370", + "kind": "dict", + "keyType": { + "$id": "1371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" + }, + { + "$id": "1373", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" + }, + { + "$id": "1375", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" + }, + { + "$id": "1377", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1378", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" + } + ] + }, + { + "$ref": "1329" + }, + { + "$ref": "1342" + }, + { + "$ref": "1355" + }, + { + "$id": "1379", + "kind": "model", + "name": "CreateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1380", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1381", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" + }, + { + "$id": "1383", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" + }, + { + "$id": "1385", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$ref": "1355" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" + }, + { + "$id": "1386", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1387", + "kind": "union", + "name": "CreateVectorStoreRequestChunkingStrategy", + "variantTypes": [ + { + "$id": "1388", + "kind": "model", + "name": "AutoChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", + "usage": "Input,Json", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$id": "1389", + "kind": "model", + "name": "FileChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1390", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" + }, + "properties": [ + { + "$ref": "1390" + } + ], + "discriminatedSubtypes": { + "$id": "1392", + "auto": { + "$ref": "1388" + }, + "static": { + "$id": "1393", + "kind": "model", + "name": "StaticChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", + "usage": "Input,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$ref": "1389" + }, + "properties": [ + { + "$id": "1394", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1395", + "kind": "constant", + "valueType": { + "$id": "1396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" + }, + { + "$id": "1397", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$id": "1398", + "kind": "model", + "name": "StaticChunkingStrategy", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1399", + "kind": "property", + "name": "max_chunk_size_tokens", + "serializedName": "max_chunk_size_tokens", + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", + "type": { + "$id": "1400", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" + }, + { + "$id": "1401", + "kind": "property", + "name": "chunk_overlap_tokens", + "serializedName": "chunk_overlap_tokens", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", + "type": { + "$id": "1402", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" + } + ] + } + } + }, + "properties": [ + { + "$id": "1403", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `auto`.", + "type": { + "$id": "1404", + "kind": "constant", + "valueType": { + "$id": "1405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" + } + ] + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" + }, + { + "$id": "1406", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1407", + "kind": "nullable", + "type": { + "$id": "1408", + "kind": "dict", + "keyType": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" + } + ] + }, + { + "$ref": "1388" + }, + { + "$ref": "1389" + }, + { + "$ref": "1393" + }, + { + "$ref": "1398" + }, + { + "$id": "1411", + "kind": "model", + "name": "UpdateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1412", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1413", + "kind": "nullable", + "type": { + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" + }, + { + "$id": "1415", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1416", + "kind": "nullable", + "type": { + "$ref": "1355" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" + }, + { + "$id": "1417", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1418", + "kind": "nullable", + "type": { + "$id": "1419", + "kind": "dict", + "keyType": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" + } + ] + }, + { + "$id": "1422", + "kind": "model", + "name": "DeleteVectorStoreResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1423", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" + }, + { + "$id": "1425", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1426", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" + }, + { + "$id": "1427", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1428", + "kind": "constant", + "valueType": { + "$ref": "78" + }, + "value": "vector_store.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" + } + ] + }, + { + "$id": "1429", + "kind": "model", + "name": "ListVectorStoreFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1430", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1431", + "kind": "constant", + "valueType": { + "$ref": "97" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" + }, + { + "$id": "1432", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1433", + "kind": "array", + "name": "ArrayVectorStoreFileObject", + "valueType": { + "$id": "1434", + "kind": "model", + "name": "VectorStoreFileObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", + "usage": "Output,Json", + "description": "A list of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1435", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" + }, + { + "$id": "1437", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file`.", + "type": { + "$id": "1438", + "kind": "constant", + "valueType": { + "$ref": "100" + }, + "value": "vector_store.file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" + }, + { + "$id": "1439", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", + "type": { + "$id": "1440", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" + }, + { + "$id": "1441", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", + "type": { + "$id": "1442", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1443", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" + }, + { + "$id": "1444", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" + }, + { + "$id": "1446", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", + "type": { + "$ref": "103" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" + }, + { + "$id": "1447", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", + "type": { + "$id": "1448", + "kind": "nullable", + "type": { + "$id": "1449", + "kind": "model", + "name": "VectorStoreFileObjectLastError", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1450", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "113" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" + }, + { + "$id": "1451", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" + }, + { + "$id": "1453", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The strategy used to chunk the file.", + "type": { + "$id": "1454", + "kind": "union", + "name": "VectorStoreFileObjectChunkingStrategy", + "variantTypes": [ + { + "$id": "1455", + "kind": "model", + "name": "StaticChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$id": "1456", + "kind": "model", + "name": "FileChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1457", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" + }, + "properties": [ + { + "$ref": "1457" + } + ], + "discriminatedSubtypes": { + "$id": "1459", + "static": { + "$ref": "1455" + }, + "other": { + "$id": "1460", + "kind": "model", + "name": "OtherChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", + "discriminatorValue": "other", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1461", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `other`.", + "type": { + "$id": "1462", + "kind": "constant", + "valueType": { + "$id": "1463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "other", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" + } + ] + }, + "auto": { + "$id": "1464", + "kind": "model", + "name": "AutoChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1465", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1466", + "kind": "constant", + "valueType": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" + } + ] + } + } + }, + "properties": [ + { + "$id": "1468", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1469", + "kind": "constant", + "valueType": { + "$id": "1470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" + }, + { + "$id": "1471", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$ref": "1398" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" + } + ] + }, + { + "$ref": "1460" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" + }, + { + "$id": "1472", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" + }, + { + "$id": "1474", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" + }, + { + "$id": "1476", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1477", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" + } + ] + }, + { + "$ref": "1434" + }, + { + "$ref": "1449" + }, + { + "$ref": "1455" + }, + { + "$ref": "1456" + }, + { + "$ref": "1460" + }, + { + "$ref": "1464" + }, + { + "$id": "1478", + "kind": "model", + "name": "CreateVectorStoreFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1479", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" + }, + { + "$id": "1481", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1482", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" + } + ] + }, + { + "$id": "1483", + "kind": "model", + "name": "DeleteVectorStoreFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1484", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" + }, + { + "$id": "1486", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1487", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" + }, + { + "$id": "1488", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1489", + "kind": "constant", + "valueType": { + "$ref": "121" + }, + "value": "vector_store.file.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" + } + ] + }, + { + "$id": "1490", + "kind": "model", + "name": "CreateVectorStoreFileBatchRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1491", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1492", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" + }, + { + "$id": "1494", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1495", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" + } + ] + }, + { + "$id": "1496", + "kind": "model", + "name": "VectorStoreFileBatchObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", + "usage": "Output,Json", + "description": "A batch of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1497", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" + }, + { + "$id": "1499", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file_batch`.", + "type": { + "$id": "1500", + "kind": "constant", + "valueType": { + "$ref": "124" + }, + "value": "vector_store.files_batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" + }, + { + "$id": "1501", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", + "type": { + "$id": "1502", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1503", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" + }, + { + "$id": "1504", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" + }, + { + "$id": "1506", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", + "type": { + "$ref": "127" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" + }, + { + "$id": "1507", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1508", + "kind": "model", + "name": "VectorStoreFileBatchObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1509", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1510", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1511", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been processed.", + "type": { + "$id": "1512", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" + }, + { + "$id": "1513", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1514", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" + }, + { + "$id": "1515", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that where cancelled.", + "type": { + "$id": "1516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1517", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" + } + ] + }, + { + "$ref": "1508" + }, + { + "$id": "1519", + "kind": "model", + "name": "CreateThreadAndRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1520", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" + }, + { + "$id": "1522", + "kind": "property", + "name": "thread", + "serializedName": "thread", + "description": "If no thread is provided, an empty thread will be created.", + "type": { + "$id": "1523", + "kind": "model", + "name": "CreateThreadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1524", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "type": { + "$id": "1525", + "kind": "array", + "name": "ArrayCreateMessageRequest", + "valueType": { + "$id": "1526", + "kind": "model", + "name": "CreateMessageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1527", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", + "type": { + "$ref": "143" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" + }, + { + "$id": "1528", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "1529", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$id": "1530", + "kind": "model", + "name": "MessageContent", + "crossLanguageDefinitionId": "OpenAI.MessageContent", + "access": "public", + "usage": "Input,Output,Json", + "description": "Represents a single piece of content in an Assistants API message.", + "decorators": [], + "properties": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" + }, + { + "$id": "1531", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they should be added to.", + "type": { + "$id": "1532", + "kind": "nullable", + "type": { + "$id": "1533", + "kind": "array", + "name": "CreateMessageRequestAttachments", + "valueType": { + "$id": "1534", + "kind": "model", + "name": "CreateMessageRequestAttachment", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1535", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "1536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" + }, + { + "$id": "1537", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "1538", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1539", + "kind": "union", + "name": "CreateMessageRequestAttachmentTool", + "variantTypes": [ + { + "$id": "1540", + "kind": "model", + "name": "AssistantToolsCode", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", + "usage": "Input,Output,Json", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$id": "1541", + "kind": "model", + "name": "AssistantToolDefinition", + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1542", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" + }, + "properties": [ + { + "$ref": "1542" + } + ], + "discriminatedSubtypes": { + "$id": "1544", + "code_interpreter": { + "$ref": "1540" + }, + "file_search": { + "$id": "1545", + "kind": "model", + "name": "AssistantToolsFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", + "usage": "Input,Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1541" + }, + "properties": [ + { + "$id": "1546", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1547", + "kind": "constant", + "valueType": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" + }, + { + "$id": "1549", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "Overrides for the file search tool.", + "type": { + "$id": "1550", + "kind": "model", + "name": "AssistantToolsFileSearchFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1551", + "kind": "property", + "name": "max_num_results", + "serializedName": "max_num_results", + "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "type": { + "$id": "1552", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" + }, + { + "$id": "1553", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1554", + "kind": "model", + "name": "FileSearchRankingOptions", + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", + "usage": "Input,Output,Json", + "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "decorators": [], + "properties": [ + { + "$id": "1555", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", + "type": { + "$ref": "149" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" + }, + { + "$id": "1556", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1557", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" + } + ] + }, + "function": { + "$id": "1558", + "kind": "model", + "name": "AssistantToolsFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", + "usage": "Input,Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1541" + }, + "properties": [ + { + "$id": "1559", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `function`", + "type": { + "$id": "1560", + "kind": "constant", + "valueType": { + "$id": "1561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" + }, + { + "$id": "1562", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1563", + "kind": "model", + "name": "FunctionObject", + "crossLanguageDefinitionId": "OpenAI.FunctionObject", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1564", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" + }, + { + "$id": "1566", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" + }, + { + "$id": "1568", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "1569", + "kind": "model", + "name": "FunctionParameters", + "crossLanguageDefinitionId": "OpenAI.FunctionParameters", + "usage": "Input,Output,Json", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", + "decorators": [], + "additionalProperties": { + "$id": "1570", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" + }, + { + "$id": "1571", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", + "type": { + "$id": "1572", + "kind": "nullable", + "type": { + "$id": "1573", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" + } + ] + } + } + }, + "properties": [ + { + "$id": "1574", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `code_interpreter`", + "type": { + "$id": "1575", + "kind": "constant", + "valueType": { + "$id": "1576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" + } + ] + }, + { + "$id": "1577", + "kind": "model", + "name": "AssistantToolsFileSearchTypeOnly", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1578", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1579", + "kind": "constant", + "valueType": { + "$ref": "155" + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" + }, + { + "$id": "1580", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1581", + "kind": "nullable", + "type": { + "$id": "1582", + "kind": "dict", + "keyType": { + "$id": "1583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" + }, + { + "$id": "1585", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1586", + "kind": "nullable", + "type": { + "$id": "1587", + "kind": "model", + "name": "CreateThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1588", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1589", + "kind": "model", + "name": "CreateThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1590", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1591", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1593", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1594", + "kind": "model", + "name": "ToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1595", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1596", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" + }, + { + "$id": "1598", + "kind": "property", + "name": "vector_stores", + "serializedName": "vector_stores", + "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", + "type": { + "$id": "1599", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1600", + "kind": "model", + "name": "ToolResourcesFileSearchVectorStore", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1601", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", + "type": { + "$id": "1602", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" + }, + { + "$id": "1604", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1605", + "kind": "union", + "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" + }, + { + "$id": "1606", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1607", + "kind": "dict", + "keyType": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" + }, + { + "$id": "1610", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1611", + "kind": "nullable", + "type": { + "$id": "1612", + "kind": "dict", + "keyType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" + }, + { + "$id": "1615", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1616", + "kind": "nullable", + "type": { + "$ref": "158" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" + }, + { + "$id": "1617", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1618", + "kind": "nullable", + "type": { + "$id": "1619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" + }, + { + "$id": "1620", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1621", + "kind": "nullable", + "type": { + "$id": "1622", + "kind": "array", + "name": "CreateThreadAndRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" + }, + { + "$id": "1623", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1624", + "kind": "nullable", + "type": { + "$id": "1625", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1626", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1627", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1628", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1629", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1631", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1632", + "kind": "model", + "name": "ToolResourcesFileSearchIdsOnly", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1633", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1634", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" + }, + { + "$id": "1636", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1637", + "kind": "nullable", + "type": { + "$id": "1638", + "kind": "dict", + "keyType": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" + }, + { + "$id": "1641", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1642", + "kind": "nullable", + "type": { + "$id": "1643", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" + }, + { + "$id": "1644", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1645", + "kind": "nullable", + "type": { + "$id": "1646", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" + }, + { + "$id": "1647", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1648", + "kind": "nullable", + "type": { + "$id": "1649", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" + }, + { + "$id": "1650", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1651", + "kind": "nullable", + "type": { + "$id": "1652", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" + }, + { + "$id": "1653", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1654", + "kind": "nullable", + "type": { + "$id": "1655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" + }, + { + "$id": "1656", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1657", + "kind": "nullable", + "type": { + "$id": "1658", + "kind": "model", + "name": "TruncationObject", + "crossLanguageDefinitionId": "OpenAI.TruncationObject", + "usage": "Input,Output,Json", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", + "decorators": [], + "properties": [ + { + "$id": "1659", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "type": { + "$ref": "206" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" + }, + { + "$id": "1660", + "kind": "property", + "name": "last_messages", + "serializedName": "last_messages", + "description": "The number of most recent messages from the thread when constructing the context for the run.", + "type": { + "$id": "1661", + "kind": "nullable", + "type": { + "$id": "1662", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" + }, + { + "$id": "1663", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1664", + "kind": "nullable", + "type": { + "$id": "1665", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$id": "1666", + "kind": "model", + "name": "AssistantsNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", + "usage": "Input,Output,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", + "decorators": [], + "properties": [ + { + "$id": "1667", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. If type is `function`, the function name must be set", + "type": { + "$ref": "220" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" + }, + { + "$id": "1668", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1669", + "kind": "model", + "name": "AssistantsNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1670", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "1671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" + }, + { + "$id": "1672", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1673", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" + }, + { + "$id": "1674", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1675", + "kind": "nullable", + "type": { + "$id": "1676", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1677", + "kind": "constant", + "valueType": { + "$id": "1678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "1679", + "kind": "model", + "name": "ResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", + "usage": "Input,Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$id": "1680", + "kind": "model", + "name": "OmniTypedResponseFormat", + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1681", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" + }, + "properties": [ + { + "$ref": "1681" + } + ], + "discriminatedSubtypes": { + "$id": "1683", + "text": { + "$ref": "1679" + }, + "json_object": { + "$id": "1684", + "kind": "model", + "name": "ResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", + "usage": "Input,Output,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1685", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "1686", + "kind": "constant", + "valueType": { + "$id": "1687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "1688", + "kind": "model", + "name": "ResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", + "usage": "Input,Output,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1689", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "1690", + "kind": "constant", + "valueType": { + "$id": "1691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" + }, + { + "$id": "1692", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$id": "1693", + "kind": "model", + "name": "ResponseFormatJsonSchemaJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1694", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", + "type": { + "$id": "1695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" + }, + { + "$id": "1696", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" + }, + { + "$id": "1698", + "kind": "property", + "name": "schema", + "serializedName": "schema", + "type": { + "$id": "1699", + "kind": "model", + "name": "ResponseFormatJsonSchemaSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", + "usage": "Input,Output,Json", + "description": "The schema for the response format, described as a JSON Schema object.", + "decorators": [], + "additionalProperties": { + "$id": "1700", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" + }, + { + "$id": "1701", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", + "type": { + "$id": "1702", + "kind": "nullable", + "type": { + "$id": "1703", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "properties": [ + { + "$id": "1704", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "1705", + "kind": "constant", + "valueType": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" + } + ] + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" + } + ] + }, + { + "$ref": "1523" + }, + { + "$ref": "1526" + }, + { + "$ref": "1530" + }, + { + "$ref": "1534" + }, + { + "$ref": "1540" + }, + { + "$ref": "1541" + }, + { + "$ref": "1545" + }, + { + "$ref": "1550" + }, + { + "$ref": "1554" + }, + { + "$ref": "1558" + }, + { + "$ref": "1563" + }, + { + "$ref": "1569" + }, + { + "$ref": "1577" + }, + { + "$ref": "1587" + }, + { + "$ref": "1589" + }, + { + "$ref": "1594" + }, + { + "$ref": "1600" + }, + { + "$ref": "1625" + }, + { + "$ref": "1627" + }, + { + "$ref": "1632" + }, + { + "$ref": "1658" + }, + { + "$ref": "1666" + }, + { + "$ref": "1669" + }, + { + "$ref": "1679" + }, + { + "$ref": "1680" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + }, + { + "$ref": "1693" + }, + { + "$ref": "1699" + }, + { + "$id": "1707", + "kind": "model", + "name": "RunObject", + "crossLanguageDefinitionId": "OpenAI.RunObject", + "usage": "Output,Json", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "1708", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.id" + }, + { + "$id": "1710", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run`.", + "type": { + "$id": "1711", + "kind": "constant", + "valueType": { + "$ref": "228" + }, + "value": "thread.run", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.object" + }, + { + "$id": "1712", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": { + "$id": "1713", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1714", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" + }, + { + "$id": "1715", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": { + "$id": "1716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" + }, + { + "$id": "1717", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "type": { + "$id": "1718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" + }, + { + "$id": "1719", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", + "type": { + "$ref": "231" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.status" + }, + { + "$id": "1720", + "kind": "property", + "name": "required_action", + "serializedName": "required_action", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "type": { + "$id": "1721", + "kind": "nullable", + "type": { + "$id": "1722", + "kind": "model", + "name": "RunObjectRequiredAction", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1723", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "For now, this is always `submit_tool_outputs`.", + "type": { + "$id": "1724", + "kind": "constant", + "valueType": { + "$ref": "251" + }, + "value": "submit_tool_outputs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" + }, + { + "$id": "1725", + "kind": "property", + "name": "submit_tool_outputs", + "serializedName": "submit_tool_outputs", + "description": "Details on the tool outputs needed for this run to continue.", + "type": { + "$id": "1726", + "kind": "model", + "name": "RunObjectRequiredActionSubmitToolOutputs", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1727", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "A list of the relevant tool calls.", + "type": { + "$id": "1728", + "kind": "array", + "name": "ArrayRunToolCallObject", + "valueType": { + "$id": "1729", + "kind": "model", + "name": "RunToolCallObject", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", + "usage": "Output,Json", + "description": "Tool call objects", + "decorators": [], + "properties": [ + { + "$id": "1730", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", + "type": { + "$id": "1731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" + }, + { + "$id": "1732", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "type": { + "$id": "1733", + "kind": "constant", + "valueType": { + "$ref": "254" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" + }, + { + "$id": "1734", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function definition.", + "type": { + "$id": "1735", + "kind": "model", + "name": "RunToolCallObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1736", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "1737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" + }, + { + "$id": "1738", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments that the model expects you to pass to the function.", + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" + }, + { + "$id": "1740", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "type": { + "$id": "1741", + "kind": "nullable", + "type": { + "$id": "1742", + "kind": "model", + "name": "RunObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1743", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", + "type": { + "$ref": "257" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" + }, + { + "$id": "1744", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" + }, + { + "$id": "1746", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": { + "$id": "1747", + "kind": "nullable", + "type": { + "$id": "1748", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1749", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" + }, + { + "$id": "1750", + "kind": "property", + "name": "started_at", + "serializedName": "started_at", + "description": "The Unix timestamp (in seconds) for when the run was started.", + "type": { + "$id": "1751", + "kind": "nullable", + "type": { + "$id": "1752", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1753", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" + }, + { + "$id": "1754", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "type": { + "$id": "1755", + "kind": "nullable", + "type": { + "$id": "1756", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1757", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" + }, + { + "$id": "1758", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run failed.", + "type": { + "$id": "1759", + "kind": "nullable", + "type": { + "$id": "1760", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1761", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" + }, + { + "$id": "1762", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "type": { + "$id": "1763", + "kind": "nullable", + "type": { + "$id": "1764", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1765", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" + }, + { + "$id": "1766", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", + "type": { + "$id": "1767", + "kind": "nullable", + "type": { + "$id": "1768", + "kind": "model", + "name": "RunObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1769", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", + "type": { + "$ref": "265" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" + }, + { + "$id": "1770", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.model" + }, + { + "$id": "1772", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" + }, + { + "$id": "1774", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1775", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tools" + }, + { + "$id": "1776", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1777", + "kind": "nullable", + "type": { + "$id": "1778", + "kind": "dict", + "keyType": { + "$id": "1779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" + }, + { + "$id": "1781", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "1782", + "kind": "nullable", + "type": { + "$id": "1783", + "kind": "model", + "name": "RunCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", + "decorators": [], + "properties": [ + { + "$id": "1784", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run.", + "type": { + "$id": "1785", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" + }, + { + "$id": "1786", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run.", + "type": { + "$id": "1787", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" + }, + { + "$id": "1788", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "1789", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.usage" + }, + { + "$id": "1790", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "type": { + "$id": "1791", + "kind": "nullable", + "type": { + "$id": "1792", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" + }, + { + "$id": "1793", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "type": { + "$id": "1794", + "kind": "nullable", + "type": { + "$id": "1795", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" + }, + { + "$id": "1796", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", + "type": { + "$id": "1797", + "kind": "nullable", + "type": { + "$id": "1798", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" + }, + { + "$id": "1799", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens specified to have been used over the course of the run.", + "type": { + "$id": "1800", + "kind": "nullable", + "type": { + "$id": "1801", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" + }, + { + "$id": "1802", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1803", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" + }, + { + "$id": "1804", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1805", + "kind": "nullable", + "type": { + "$id": "1806", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" + }, + { + "$id": "1807", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1808", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" + }, + { + "$id": "1809", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1810", + "kind": "nullable", + "type": { + "$id": "1811", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1812", + "kind": "constant", + "valueType": { + "$id": "1813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" + } + ] + }, + { + "$ref": "1722" + }, + { + "$ref": "1726" + }, + { + "$ref": "1729" + }, + { + "$ref": "1735" + }, + { + "$ref": "1742" + }, + { + "$ref": "1768" + }, + { + "$ref": "1783" + }, + { + "$id": "1814", + "kind": "model", + "name": "CreateRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1815", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" + }, + { + "$id": "1817", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1818", + "kind": "nullable", + "type": { + "$ref": "271" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" + }, + { + "$id": "1819", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1820", + "kind": "nullable", + "type": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" + }, + { + "$id": "1822", + "kind": "property", + "name": "additional_instructions", + "serializedName": "additional_instructions", + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "type": { + "$id": "1823", + "kind": "nullable", + "type": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" + }, + { + "$id": "1825", + "kind": "property", + "name": "additional_messages", + "serializedName": "additional_messages", + "description": "Adds additional messages to the thread before creating the run.", + "type": { + "$id": "1826", + "kind": "nullable", + "type": { + "$id": "1827", + "kind": "array", + "name": "CreateRunRequestAdditional_messages", + "valueType": { + "$ref": "1526" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" + }, + { + "$id": "1828", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1829", + "kind": "nullable", + "type": { + "$id": "1830", + "kind": "array", + "name": "CreateRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" + }, + { + "$id": "1831", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1832", + "kind": "nullable", + "type": { + "$id": "1833", + "kind": "dict", + "keyType": { + "$id": "1834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" + }, + { + "$id": "1836", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1837", + "kind": "nullable", + "type": { + "$id": "1838", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" + }, + { + "$id": "1839", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1840", + "kind": "nullable", + "type": { + "$id": "1841", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" + }, + { + "$id": "1842", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1843", + "kind": "nullable", + "type": { + "$id": "1844", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" + }, + { + "$id": "1845", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1846", + "kind": "nullable", + "type": { + "$id": "1847", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" + }, + { + "$id": "1848", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1849", + "kind": "nullable", + "type": { + "$id": "1850", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" + }, + { + "$id": "1851", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1852", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" + }, + { + "$id": "1853", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1854", + "kind": "nullable", + "type": { + "$id": "1855", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" + }, + { + "$id": "1856", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1857", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" + }, + { + "$id": "1858", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1859", + "kind": "nullable", + "type": { + "$id": "1860", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1861", + "kind": "constant", + "valueType": { + "$id": "1862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" + } + ] + }, + { + "$id": "1863", + "kind": "model", + "name": "ListRunsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1864", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1865", + "kind": "constant", + "valueType": { + "$ref": "325" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" + }, + { + "$id": "1866", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1867", + "kind": "array", + "name": "ArrayRunObject", + "valueType": { + "$ref": "1707" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" + }, + { + "$id": "1868", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" + }, + { + "$id": "1870", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" + }, + { + "$id": "1872", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1873", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" + } + ] + }, + { + "$id": "1874", + "kind": "model", + "name": "ModifyRunRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1875", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1876", + "kind": "nullable", + "type": { + "$id": "1877", + "kind": "dict", + "keyType": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" + } + ] + }, + { + "$id": "1880", + "kind": "model", + "name": "SubmitToolOutputsRunRequest", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1881", + "kind": "property", + "name": "tool_outputs", + "serializedName": "tool_outputs", + "description": "A list of tools for which the outputs are being submitted.", + "type": { + "$id": "1882", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1883", + "kind": "model", + "name": "SubmitToolOutputsRunRequestToolOutput", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1884", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", + "type": { + "$id": "1885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" + }, + { + "$id": "1886", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the tool call to be submitted to continue the run.", + "type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" + }, + { + "$id": "1888", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1889", + "kind": "nullable", + "type": { + "$id": "1890", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" + } + ] + }, + { + "$ref": "1883" + }, + { + "$id": "1891", + "kind": "model", + "name": "ListRunStepsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1892", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1893", + "kind": "constant", + "valueType": { + "$ref": "334" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" + }, + { + "$id": "1894", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1895", + "kind": "array", + "name": "ArrayRunStepObject", + "valueType": { + "$id": "1896", + "kind": "model", + "name": "RunStepObject", + "crossLanguageDefinitionId": "OpenAI.RunStepObject", + "usage": "Output,Json", + "description": "Represents a step in execution of a run.", + "decorators": [], + "properties": [ + { + "$id": "1897", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" + }, + { + "$id": "1899", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step`.", + "type": { + "$id": "1900", + "kind": "constant", + "valueType": { + "$ref": "337" + }, + "value": "thread.run.step", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" + }, + { + "$id": "1901", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": { + "$id": "1902", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1903", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" + }, + { + "$id": "1904", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": { + "$id": "1905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" + }, + { + "$id": "1906", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": { + "$id": "1907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" + }, + { + "$id": "1908", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", + "type": { + "$id": "1909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" + }, + { + "$id": "1910", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", + "type": { + "$ref": "340" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" + }, + { + "$id": "1911", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": { + "$ref": "346" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" + }, + { + "$id": "1912", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$id": "1913", + "kind": "model", + "name": "RunStepObjectStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", + "usage": "Output,Json", + "description": "Abstractly represents a run step details object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1914", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" + }, + "properties": [ + { + "$ref": "1914" + } + ], + "discriminatedSubtypes": { + "$id": "1916", + "message_creation": { + "$id": "1917", + "kind": "model", + "name": "RunStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", + "usage": "Output,Json", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1918", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "1919", + "kind": "constant", + "valueType": { + "$id": "1920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" + }, + { + "$id": "1921", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "1922", + "kind": "model", + "name": "RunStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1923", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "1924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "1925", + "kind": "model", + "name": "RunStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", + "usage": "Output,Json", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1926", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "1927", + "kind": "constant", + "valueType": { + "$id": "1928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" + }, + { + "$id": "1929", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "1930", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "1931", + "kind": "model", + "name": "RunStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1932", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "1932" + } + ], + "discriminatedSubtypes": { + "$id": "1934", + "code_interpreter": { + "$id": "1935", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", + "usage": "Output,Json", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1936", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "1937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "1938", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "1939", + "kind": "constant", + "valueType": { + "$id": "1940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "1941", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "1942", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1943", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "1944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "1945", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "1946", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "1947", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "1948", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "1948" + } + ], + "discriminatedSubtypes": { + "$id": "1950", + "logs": { + "$id": "1951", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", + "usage": "Output,Json", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1952", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "1953", + "kind": "constant", + "valueType": { + "$id": "1954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "1955", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "1956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "1957", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", + "usage": "Output,Json", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1958", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "1959", + "kind": "constant", + "valueType": { + "$id": "1960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "1961", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "1962", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1963", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "1964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "1965", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", + "usage": "Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1966", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "1968", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "1969", + "kind": "constant", + "valueType": { + "$id": "1970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "1971", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "1972", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1973", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1974", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "usage": "Output,Json", + "description": "The ranking options for the file search.", + "decorators": [], + "properties": [ + { + "$id": "1975", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker used for the file search.", + "type": { + "$id": "1976", + "kind": "constant", + "valueType": { + "$ref": "358" + }, + "value": "default_2024_08_21", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" + }, + { + "$id": "1977", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1978", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" + }, + { + "$id": "1979", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "The results of the file search.", + "type": { + "$id": "1980", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", + "valueType": { + "$id": "1981", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", + "usage": "Output,Json", + "description": "A result instance of the file search.", + "decorators": [], + "properties": [ + { + "$id": "1982", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that result was found in.", + "type": { + "$id": "1983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" + }, + { + "$id": "1984", + "kind": "property", + "name": "file_name", + "serializedName": "file_name", + "description": "The name of the file that result was found in.", + "type": { + "$id": "1985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" + }, + { + "$id": "1986", + "kind": "property", + "name": "score", + "serializedName": "score", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1987", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" + }, + { + "$id": "1988", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", + "type": { + "$id": "1989", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1990", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1991", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content.", + "type": { + "$id": "1992", + "kind": "constant", + "valueType": { + "$ref": "361" + }, + "value": "text", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" + }, + { + "$id": "1993", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content of the file.", + "type": { + "$id": "1994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "1995", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", + "usage": "Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1996", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "1998", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "1999", + "kind": "constant", + "valueType": { + "$id": "2000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "2001", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "2002", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2003", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "2004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "2005", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "2006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "2007", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "2008", + "kind": "nullable", + "type": { + "$id": "2009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" + }, + { + "$id": "2010", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "type": { + "$id": "2011", + "kind": "nullable", + "type": { + "$id": "2012", + "kind": "model", + "name": "RunStepObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2013", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "364" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" + }, + { + "$id": "2014", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "2015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" + }, + { + "$id": "2016", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "type": { + "$id": "2017", + "kind": "nullable", + "type": { + "$id": "2018", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2019", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" + }, + { + "$id": "2020", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "type": { + "$id": "2021", + "kind": "nullable", + "type": { + "$id": "2022", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2023", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" + }, + { + "$id": "2024", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "type": { + "$id": "2025", + "kind": "nullable", + "type": { + "$id": "2026", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2027", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" + }, + { + "$id": "2028", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "type": { + "$id": "2029", + "kind": "nullable", + "type": { + "$id": "2030", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2031", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" + }, + { + "$id": "2032", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2033", + "kind": "nullable", + "type": { + "$id": "2034", + "kind": "dict", + "keyType": { + "$id": "2035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" + }, + { + "$id": "2037", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2038", + "kind": "nullable", + "type": { + "$id": "2039", + "kind": "model", + "name": "RunStepCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", + "decorators": [], + "properties": [ + { + "$id": "2040", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run step.", + "type": { + "$id": "2041", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" + }, + { + "$id": "2042", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run step.", + "type": { + "$id": "2043", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" + }, + { + "$id": "2044", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "2045", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" + }, + { + "$id": "2046", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" + }, + { + "$id": "2048", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" + }, + { + "$id": "2050", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2051", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" + } + ] + }, + { + "$ref": "1896" + }, + { + "$ref": "1913" + }, + { + "$ref": "1917" + }, + { + "$ref": "1922" + }, + { + "$ref": "1925" + }, + { + "$ref": "1931" + }, + { + "$ref": "1935" + }, + { + "$ref": "1942" + }, + { + "$ref": "1947" + }, + { + "$ref": "1951" + }, + { + "$ref": "1957" + }, + { + "$ref": "1962" + }, + { + "$ref": "1965" + }, + { + "$ref": "1972" + }, + { + "$ref": "1974" + }, + { + "$ref": "1981" + }, + { + "$ref": "1990" + }, + { + "$ref": "1995" + }, + { + "$ref": "2002" + }, + { + "$ref": "2012" + }, + { + "$ref": "2039" + }, + { + "$id": "2052", + "kind": "model", + "name": "ThreadObject", + "crossLanguageDefinitionId": "OpenAI.ThreadObject", + "usage": "Output,Json", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "decorators": [], + "properties": [ + { + "$id": "2053", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" + }, + { + "$id": "2055", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread`.", + "type": { + "$id": "2056", + "kind": "constant", + "valueType": { + "$ref": "370" + }, + "value": "thread", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" + }, + { + "$id": "2057", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": { + "$id": "2058", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2059", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" + }, + { + "$id": "2060", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2061", + "kind": "nullable", + "type": { + "$id": "2062", + "kind": "model", + "name": "ThreadObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2063", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2064", + "kind": "model", + "name": "ThreadObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2065", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2066", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2067", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2068", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "2069", + "kind": "model", + "name": "ThreadObjectToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2070", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", + "type": { + "$id": "2071", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" + }, + { + "$id": "2073", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2074", + "kind": "nullable", + "type": { + "$id": "2075", + "kind": "dict", + "keyType": { + "$id": "2076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" + } + ] + }, + { + "$ref": "2062" + }, + { + "$ref": "2064" + }, + { + "$ref": "2069" + }, + { + "$id": "2078", + "kind": "model", + "name": "ModifyThreadRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2079", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2080", + "kind": "nullable", + "type": { + "$id": "2081", + "kind": "model", + "name": "ModifyThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2082", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2083", + "kind": "model", + "name": "ModifyThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2084", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2085", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2087", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" + }, + { + "$id": "2088", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2089", + "kind": "nullable", + "type": { + "$id": "2090", + "kind": "dict", + "keyType": { + "$id": "2091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" + } + ] + }, + { + "$ref": "2081" + }, + { + "$ref": "2083" + }, + { + "$id": "2093", + "kind": "model", + "name": "DeleteThreadResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2094", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" + }, + { + "$id": "2096", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2097", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" + }, + { + "$id": "2098", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2099", + "kind": "constant", + "valueType": { + "$ref": "373" + }, + "value": "thread.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" + } + ] + }, + { + "$id": "2100", + "kind": "model", + "name": "RealtimeRequestCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", + "usage": "Input,Json", + "description": "A base representation for messages sent by the client to the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2101", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "376" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" + }, + "properties": [ + { + "$ref": "2101" + }, + { + "$id": "2102", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2104", + "session.update": { + "$id": "2105", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", + "usage": "Input,Json", + "discriminatorValue": "session.update", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2106", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2107", + "kind": "constant", + "valueType": { + "$id": "2108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.update", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" + }, + { + "$id": "2109", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2110", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommandSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2111", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "396" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" + }, + { + "$id": "2112", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2113", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" + }, + { + "$id": "2114", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" + }, + { + "$id": "2115", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" + }, + { + "$id": "2117", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" + }, + { + "$id": "2118", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" + }, + { + "$id": "2119", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2120", + "kind": "model", + "name": "RealtimeAudioInputTranscriptionSettings", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2121", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "422" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" + }, + { + "$id": "2122", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$id": "2123", + "kind": "model", + "name": "RealtimeTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2124", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "426" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" + }, + "properties": [ + { + "$ref": "2124" + } + ], + "discriminatedSubtypes": { + "$id": "2125", + "server_vad": { + "$id": "2126", + "kind": "model", + "name": "RealtimeServerVadTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", + "usage": "Input,Output,Json", + "discriminatorValue": "server_vad", + "decorators": [], + "baseModel": { + "$ref": "2123" + }, + "properties": [ + { + "$id": "2127", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2128", + "kind": "constant", + "valueType": { + "$id": "2129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "server_vad", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" + }, + { + "$id": "2130", + "kind": "property", + "name": "threshold", + "serializedName": "threshold", + "type": { + "$id": "2131", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" + }, + { + "$id": "2132", + "kind": "property", + "name": "prefix_padding_ms", + "serializedName": "prefix_padding_ms", + "type": { + "$id": "2133", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" + }, + { + "$id": "2135", + "kind": "property", + "name": "silence_duration_ms", + "serializedName": "silence_duration_ms", + "type": { + "$id": "2136", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" + }, + { + "$id": "2138", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2139", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$id": "2140", + "kind": "model", + "name": "RealtimeTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeTool", + "usage": "Input,Output,Json", + "description": "The base representation of a realtime tool definition.", + "decorators": [], + "discriminatorProperty": { + "$id": "2141", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" + }, + "properties": [ + { + "$ref": "2141" + } + ], + "discriminatedSubtypes": { + "$id": "2142", + "function": { + "$id": "2143", + "kind": "model", + "name": "RealtimeFunctionTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", + "usage": "Input,Output,Json", + "description": "The definition of a function tool as used by the realtime endpoint.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2140" + }, + "properties": [ + { + "$id": "2144", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2145", + "kind": "constant", + "valueType": { + "$id": "2146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" + }, + { + "$id": "2147", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" + }, + { + "$id": "2149", + "kind": "property", + "name": "description", + "serializedName": "description", + "type": { + "$id": "2150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" + }, + { + "$id": "2151", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "2152", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" + }, + { + "$id": "2153", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2154", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$id": "2155", + "kind": "model", + "name": "RealtimeToolChoiceObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", + "usage": "Input,Output,Json", + "description": "A base representation for a realtime tool_choice selecting a named tool.", + "decorators": [], + "discriminatorProperty": { + "$id": "2156", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" + }, + "properties": [ + { + "$ref": "2156" + } + ], + "discriminatedSubtypes": { + "$id": "2157", + "function": { + "$id": "2158", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", + "usage": "Input,Output,Json", + "description": "The representation of a realtime tool_choice selecting a named function tool.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2155" + }, + "properties": [ + { + "$id": "2159", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2145" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" + }, + { + "$id": "2160", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "2161", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2162", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" + } + ] + } + } + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" + }, + { + "$id": "2164", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2165", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" + }, + { + "$id": "2166", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2167", + "kind": "union", + "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", + "variantTypes": [ + { + "$id": "2168", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2169", + "kind": "constant", + "valueType": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" + } + ] + }, + "input_audio_buffer.append": { + "$id": "2171", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferAppendCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.append", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2172", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2173", + "kind": "constant", + "valueType": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.append", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" + }, + { + "$id": "2175", + "kind": "property", + "name": "audio", + "serializedName": "audio", + "type": { + "$id": "2176", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" + } + ] + }, + "input_audio_buffer.commit": { + "$id": "2177", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferCommitCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.commit", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2178", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2179", + "kind": "constant", + "valueType": { + "$id": "2180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.commit", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" + } + ] + }, + "input_audio_buffer.clear": { + "$id": "2181", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferClearCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.clear", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2182", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2183", + "kind": "constant", + "valueType": { + "$id": "2184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.clear", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" + } + ] + }, + "conversation.item.create": { + "$id": "2185", + "kind": "model", + "name": "RealtimeRequestItemCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2186", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2187", + "kind": "constant", + "valueType": { + "$id": "2188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" + }, + { + "$id": "2189", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" + }, + { + "$id": "2191", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2192", + "kind": "model", + "name": "RealtimeRequestItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2193", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" + }, + "properties": [ + { + "$ref": "2193" + }, + { + "$id": "2194", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2196", + "message": { + "$id": "2197", + "kind": "model", + "name": "RealtimeRequestMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", + "usage": "Input,Json", + "discriminatorValue": "message", + "decorators": [], + "discriminatorProperty": { + "$id": "2198", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" + }, + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2199", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2200", + "kind": "constant", + "valueType": { + "$id": "2201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" + }, + { + "$ref": "2198" + }, + { + "$id": "2202", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" + } + ], + "discriminatedSubtypes": { + "$id": "2203", + "system": { + "$id": "2204", + "kind": "model", + "name": "RealtimeRequestSystemMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2205", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2206", + "kind": "constant", + "valueType": { + "$id": "2207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" + }, + { + "$id": "2208", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2209", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$id": "2210", + "kind": "model", + "name": "RealtimeRequestTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_text", + "decorators": [], + "baseModel": { + "$id": "2211", + "kind": "model", + "name": "RealtimeContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2212", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "466" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" + }, + "properties": [ + { + "$ref": "2212" + } + ], + "discriminatedSubtypes": { + "$id": "2213", + "input_text": { + "$ref": "2210" + }, + "input_audio": { + "$id": "2214", + "kind": "model", + "name": "RealtimeRequestAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2215", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2216", + "kind": "constant", + "valueType": { + "$id": "2217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" + }, + { + "$id": "2218", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" + } + ] + }, + "text": { + "$id": "2220", + "kind": "model", + "name": "RealtimeResponseTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", + "usage": "Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2221", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2222", + "kind": "constant", + "valueType": { + "$id": "2223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" + }, + { + "$id": "2224", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" + } + ] + }, + "audio": { + "$id": "2226", + "kind": "model", + "name": "RealtimeResponseAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", + "usage": "Output,Json", + "discriminatorValue": "audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2227", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2228", + "kind": "constant", + "valueType": { + "$id": "2229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" + }, + { + "$id": "2230", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2231", + "kind": "nullable", + "type": { + "$id": "2232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" + } + ] + } + } + }, + "properties": [ + { + "$id": "2233", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2234", + "kind": "constant", + "valueType": { + "$id": "2235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" + }, + { + "$id": "2236", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" + } + ] + }, + "user": { + "$id": "2238", + "kind": "model", + "name": "RealtimeRequestUserMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2239", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2240", + "kind": "constant", + "valueType": { + "$id": "2241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" + }, + { + "$id": "2242", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2243", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2244", + "kind": "union", + "name": "RealtimeRequestUserMessageItemContent", + "variantTypes": [ + { + "$ref": "2210" + }, + { + "$ref": "2214" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" + } + ] + }, + "assistant": { + "$id": "2245", + "kind": "model", + "name": "RealtimeRequestAssistantMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2246", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2247", + "kind": "constant", + "valueType": { + "$id": "2248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" + }, + { + "$id": "2249", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2250", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$ref": "2210" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" + } + ] + } + } + }, + "function_call": { + "$id": "2251", + "kind": "model", + "name": "RealtimeRequestFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", + "usage": "Input,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2252", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2253", + "kind": "constant", + "valueType": { + "$id": "2254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" + }, + { + "$id": "2255", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" + }, + { + "$id": "2257", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" + }, + { + "$id": "2259", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" + }, + { + "$id": "2261", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2262", + "kind": "model", + "name": "RealtimeRequestFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", + "usage": "Input,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2263", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2264", + "kind": "constant", + "valueType": { + "$id": "2265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call_output", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" + }, + { + "$id": "2266", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" + }, + { + "$id": "2268", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" + } + ] + }, + "conversation.item.delete": { + "$id": "2270", + "kind": "model", + "name": "RealtimeRequestItemDeleteCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.delete", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2271", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2272", + "kind": "constant", + "valueType": { + "$id": "2273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.delete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" + }, + { + "$id": "2274", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" + } + ] + }, + "conversation.item.truncate": { + "$id": "2276", + "kind": "model", + "name": "RealtimeRequestItemTruncateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.truncate", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2277", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2278", + "kind": "constant", + "valueType": { + "$id": "2279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" + }, + { + "$id": "2280", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" + }, + { + "$id": "2282", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" + }, + { + "$id": "2284", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2285", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" + } + ] + }, + "response.create": { + "$id": "2286", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", + "usage": "Input,Json", + "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", + "discriminatorValue": "response.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2287", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2288", + "kind": "constant", + "valueType": { + "$id": "2289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" + }, + { + "$id": "2290", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2291", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommandResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2292", + "kind": "property", + "name": "commit", + "serializedName": "commit", + "type": { + "$id": "2293", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" + }, + { + "$id": "2294", + "kind": "property", + "name": "cancel_previous", + "serializedName": "cancel_previous", + "type": { + "$id": "2295", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" + }, + { + "$id": "2296", + "kind": "property", + "name": "append_input_items", + "serializedName": "append_input_items", + "type": { + "$id": "2297", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" + }, + { + "$id": "2298", + "kind": "property", + "name": "input_items", + "serializedName": "input_items", + "type": { + "$id": "2299", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" + }, + { + "$id": "2300", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" + }, + { + "$id": "2302", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2303", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" + }, + { + "$id": "2304", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" + }, + { + "$id": "2305", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2306", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" + }, + { + "$id": "2307", + "kind": "property", + "name": "max_output_tokens", + "serializedName": "max_output_tokens", + "type": { + "$id": "2308", + "kind": "nullable", + "type": { + "$id": "2309", + "kind": "union", + "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", + "variantTypes": [ + { + "$id": "2310", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2311", + "kind": "constant", + "valueType": { + "$id": "2312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" + }, + { + "$id": "2313", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2314", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" + }, + { + "$id": "2315", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2316", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" + }, + { + "$id": "2317", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" + } + ] + }, + "response.cancel": { + "$id": "2318", + "kind": "model", + "name": "RealtimeRequestResponseCancelCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", + "usage": "Input,Json", + "discriminatorValue": "response.cancel", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2319", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2320", + "kind": "constant", + "valueType": { + "$id": "2321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.cancel", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" + } + ] + } + } + }, + { + "$ref": "2105" + }, + { + "$ref": "2110" + }, + { + "$ref": "2120" + }, + { + "$ref": "2123" + }, + { + "$ref": "2126" + }, + { + "$ref": "2140" + }, + { + "$ref": "2143" + }, + { + "$ref": "2155" + }, + { + "$ref": "2158" + }, + { + "$ref": "2161" + }, + { + "$ref": "2171" + }, + { + "$ref": "2177" + }, + { + "$ref": "2181" + }, + { + "$ref": "2185" + }, + { + "$ref": "2192" + }, + { + "$ref": "2197" + }, + { + "$ref": "2204" + }, + { + "$ref": "2210" + }, + { + "$ref": "2211" + }, + { + "$ref": "2214" + }, + { + "$ref": "2220" + }, + { + "$ref": "2226" + }, + { + "$ref": "2238" + }, + { + "$ref": "2245" + }, + { + "$ref": "2251" + }, + { + "$ref": "2262" + }, + { + "$ref": "2270" + }, + { + "$ref": "2276" + }, + { + "$ref": "2286" + }, + { + "$ref": "2291" + }, + { + "$ref": "2318" + }, + { + "$id": "2322", + "kind": "model", + "name": "RealtimeResponseCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", + "usage": "Output,Json", + "description": "Base representation of a WebSocket message received from the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2323", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "476" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" + }, + "properties": [ + { + "$ref": "2323" + }, + { + "$id": "2324", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2325", + "kind": "nullable", + "type": { + "$id": "2326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2327", + "session.created": { + "$id": "2328", + "kind": "model", + "name": "RealtimeResponseSessionCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2329", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2330", + "kind": "constant", + "valueType": { + "$id": "2331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" + }, + { + "$id": "2332", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2333", + "kind": "model", + "name": "RealtimeResponseSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2334", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2335", + "kind": "constant", + "valueType": { + "$ref": "532" + }, + "value": "realtime.session", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" + }, + { + "$id": "2336", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" + }, + { + "$id": "2338", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$id": "2339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" + }, + { + "$id": "2340", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2341", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" + }, + { + "$id": "2342", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" + }, + { + "$id": "2344", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" + }, + { + "$id": "2345", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" + }, + { + "$id": "2346", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" + }, + { + "$id": "2347", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2348", + "kind": "nullable", + "type": { + "$ref": "2120" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" + }, + { + "$id": "2349", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$ref": "2123" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" + }, + { + "$id": "2350", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2351", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" + }, + { + "$id": "2352", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2353", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" + }, + { + "$id": "2354", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2355", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" + }, + { + "$id": "2356", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2357", + "kind": "nullable", + "type": { + "$id": "2358", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" + } + ] + }, + "session.updated": { + "$id": "2359", + "kind": "model", + "name": "RealtimeResponseSessionUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2360", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2361", + "kind": "constant", + "valueType": { + "$id": "2362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" + }, + { + "$id": "2363", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$ref": "2333" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" + } + ] + }, + "conversation.item.created": { + "$id": "2364", + "kind": "model", + "name": "RealtimeResponseItemCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2365", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2366", + "kind": "constant", + "valueType": { + "$id": "2367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" + }, + { + "$id": "2368", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2369", + "kind": "model", + "name": "RealtimeResponseItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2370", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" + }, + "properties": [ + { + "$id": "2371", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2372", + "kind": "constant", + "valueType": { + "$ref": "535" + }, + "value": "realtime.item", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" + }, + { + "$ref": "2370" + }, + { + "$id": "2373", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2374", + "kind": "nullable", + "type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2376", + "message": { + "$id": "2377", + "kind": "model", + "name": "RealtimeResponseMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", + "usage": "Output,Json", + "discriminatorValue": "message", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2378", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2200" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" + }, + { + "$id": "2379", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" + }, + { + "$id": "2380", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2381", + "kind": "array", + "name": "ArrayRealtimeContentPart", + "valueType": { + "$ref": "2211" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" + }, + { + "$id": "2382", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" + } + ] + }, + "function_call": { + "$id": "2383", + "kind": "model", + "name": "RealtimeResponseFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", + "usage": "Output,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2384", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2253" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" + }, + { + "$id": "2385", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" + }, + { + "$id": "2387", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" + }, + { + "$id": "2389", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" + }, + { + "$id": "2391", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2392", + "kind": "model", + "name": "RealtimeResponseFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", + "usage": "Output,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2393", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2264" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" + }, + { + "$id": "2394", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" + }, + { + "$id": "2396", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" + } + ] + }, + "conversation.item.deleted": { + "$id": "2398", + "kind": "model", + "name": "RealtimeResponseItemDeletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.deleted", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2399", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2400", + "kind": "constant", + "valueType": { + "$id": "2401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" + }, + { + "$id": "2402", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" + } + ] + }, + "conversation.item.truncated": { + "$id": "2404", + "kind": "model", + "name": "RealtimeResponseItemTruncatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.truncated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2405", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2406", + "kind": "constant", + "valueType": { + "$id": "2407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" + }, + { + "$id": "2408", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" + }, + { + "$id": "2410", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2411", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" + }, + { + "$id": "2412", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "2413", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" + } + ] + }, + "response.created": { + "$id": "2414", + "kind": "model", + "name": "RealtimeResponseCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2415", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2416", + "kind": "constant", + "valueType": { + "$id": "2417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" + }, + { + "$id": "2418", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2419", + "kind": "model", + "name": "RealtimeResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2420", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2421", + "kind": "constant", + "valueType": { + "$ref": "538" + }, + "value": "realtime.response", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" + }, + { + "$id": "2422", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" + }, + { + "$id": "2424", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" + }, + { + "$id": "2425", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "type": { + "$id": "2426", + "kind": "nullable", + "type": { + "$id": "2427", + "kind": "model", + "name": "RealtimeResponseStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2428", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" + }, + "properties": [ + { + "$ref": "2428" + } + ], + "discriminatedSubtypes": { + "$id": "2429", + "cancelled": { + "$id": "2430", + "kind": "model", + "name": "RealtimeResponseCancelledStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "cancelled", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2431", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2432", + "kind": "constant", + "valueType": { + "$id": "2433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "cancelled", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" + }, + { + "$id": "2434", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "553" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" + } + ] + }, + "incomplete": { + "$id": "2435", + "kind": "model", + "name": "RealtimeResponseIncompleteStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "incomplete", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2436", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2437", + "kind": "constant", + "valueType": { + "$id": "2438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "incomplete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" + }, + { + "$id": "2439", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "559" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" + } + ] + }, + "failed": { + "$id": "2440", + "kind": "model", + "name": "RealtimeResponseFailedStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "failed", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2441", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2442", + "kind": "constant", + "valueType": { + "$id": "2443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" + }, + { + "$id": "2444", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2445", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" + } + ] + } + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" + }, + { + "$id": "2446", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2447", + "kind": "array", + "name": "ArrayRealtimeResponseItem", + "valueType": { + "$ref": "2369" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" + }, + { + "$id": "2448", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2449", + "kind": "model", + "name": "RealtimeResponseUsage", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2450", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "type": { + "$id": "2451", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" + }, + { + "$id": "2452", + "kind": "property", + "name": "input_tokens", + "serializedName": "input_tokens", + "type": { + "$id": "2453", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" + }, + { + "$id": "2454", + "kind": "property", + "name": "output_tokens", + "serializedName": "output_tokens", + "type": { + "$id": "2455", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" + }, + { + "$id": "2456", + "kind": "property", + "name": "input_token_details", + "serializedName": "input_token_details", + "type": { + "$id": "2457", + "kind": "model", + "name": "RealtimeResponseUsageInputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2458", + "kind": "property", + "name": "cached_tokens", + "serializedName": "cached_tokens", + "type": { + "$id": "2459", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" + }, + { + "$id": "2460", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2461", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" + }, + { + "$id": "2462", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2463", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" + }, + { + "$id": "2464", + "kind": "property", + "name": "output_token_details", + "serializedName": "output_token_details", + "type": { + "$id": "2465", + "kind": "model", + "name": "RealtimeResponseUsageOutputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2466", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2467", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" + }, + { + "$id": "2468", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2469", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" + } + ] + }, + "response.done": { + "$id": "2470", + "kind": "model", + "name": "RealtimeResponseDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2471", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2472", + "kind": "constant", + "valueType": { + "$id": "2473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" + }, + { + "$id": "2474", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$ref": "2419" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" + } + ] + }, + "rate_limits.updated": { + "$id": "2475", + "kind": "model", + "name": "RealtimeResponseRateLimitsUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "rate_limits.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2476", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2477", + "kind": "constant", + "valueType": { + "$id": "2478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "rate_limits.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" + }, + { + "$id": "2479", + "kind": "property", + "name": "rate_limits", + "serializedName": "rate_limits", + "type": { + "$id": "2480", + "kind": "array", + "name": "ArrayRealtimeResponseRateLimitDetailsItem", + "valueType": { + "$id": "2481", + "kind": "model", + "name": "RealtimeResponseRateLimitDetailsItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2482", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" + }, + { + "$id": "2484", + "kind": "property", + "name": "limit", + "serializedName": "limit", + "type": { + "$id": "2485", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" + }, + { + "$id": "2486", + "kind": "property", + "name": "remaining", + "serializedName": "remaining", + "type": { + "$id": "2487", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" + }, + { + "$id": "2488", + "kind": "property", + "name": "reset_seconds", + "serializedName": "reset_seconds", + "type": { + "$id": "2489", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" + } + ] + }, + "response.output_item.added": { + "$id": "2490", + "kind": "model", + "name": "RealtimeResponseOutputItemAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2491", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2492", + "kind": "constant", + "valueType": { + "$id": "2493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" + }, + { + "$id": "2494", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" + }, + { + "$id": "2496", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2497", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" + }, + { + "$id": "2498", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" + } + ] + }, + "response.output_item.done": { + "$id": "2499", + "kind": "model", + "name": "RealtimeResponseOutputItemDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2500", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2501", + "kind": "constant", + "valueType": { + "$id": "2502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" + }, + { + "$id": "2503", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" + }, + { + "$id": "2505", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2506", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" + }, + { + "$id": "2507", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" + } + ] + }, + "response.content_part.added": { + "$id": "2508", + "kind": "model", + "name": "RealtimeResponseContentPartAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2509", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2510", + "kind": "constant", + "valueType": { + "$id": "2511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.content_part.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" + }, + { + "$id": "2512", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" + }, + { + "$id": "2514", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" + }, + { + "$id": "2516", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2517", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" + }, + { + "$id": "2518", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2519", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" + }, + { + "$id": "2520", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" + } + ] + }, + "response.content_part.done": { + "$id": "2521", + "kind": "model", + "name": "RealtimeResponseContentPartDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2522", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2523", + "kind": "constant", + "valueType": { + "$id": "2524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.content_part.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" + }, + { + "$id": "2525", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" + }, + { + "$id": "2527", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" + }, + { + "$id": "2529", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2530", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" + }, + { + "$id": "2531", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2532", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" + }, + { + "$id": "2533", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" + } + ] + }, + "response.audio.delta": { + "$id": "2534", + "kind": "model", + "name": "RealtimeResponseAudioDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2535", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2536", + "kind": "constant", + "valueType": { + "$id": "2537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" + }, + { + "$id": "2538", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" + }, + { + "$id": "2540", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2541", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" + }, + { + "$id": "2542", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2543", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" + }, + { + "$id": "2544", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2545", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" + }, + { + "$id": "2546", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2547", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" + } + ] + }, + "response.audio.done": { + "$id": "2548", + "kind": "model", + "name": "RealtimeResponseAudioDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2549", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2550", + "kind": "constant", + "valueType": { + "$id": "2551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" + }, + { + "$id": "2552", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" + }, + { + "$id": "2554", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" + }, + { + "$id": "2556", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2557", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" + }, + { + "$id": "2558", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2559", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" + } + ] + }, + "response.audio_transcript.delta": { + "$id": "2560", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2561", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2562", + "kind": "constant", + "valueType": { + "$id": "2563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio_transcript.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" + }, + { + "$id": "2564", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" + }, + { + "$id": "2566", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" + }, + { + "$id": "2568", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2569", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" + }, + { + "$id": "2570", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" + }, + { + "$id": "2572", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" + } + ] + }, + "response.audio_transcript.done": { + "$id": "2574", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2575", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2576", + "kind": "constant", + "valueType": { + "$id": "2577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio_transcript.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" + }, + { + "$id": "2578", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" + }, + { + "$id": "2580", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" + }, + { + "$id": "2582", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2583", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" + }, + { + "$id": "2584", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2585", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" + } + ] + }, + "response.text.delta": { + "$id": "2586", + "kind": "model", + "name": "RealtimeResponseTextDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2587", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2588", + "kind": "constant", + "valueType": { + "$id": "2589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" + }, + { + "$id": "2590", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" + }, + { + "$id": "2592", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" + }, + { + "$id": "2594", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2595", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" + }, + { + "$id": "2596", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2597", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" + }, + { + "$id": "2598", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" + } + ] + }, + "response.text.done": { + "$id": "2600", + "kind": "model", + "name": "RealtimeResponseTextDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2601", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2602", + "kind": "constant", + "valueType": { + "$id": "2603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" + }, + { + "$id": "2604", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" + }, + { + "$id": "2606", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" + }, + { + "$id": "2608", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2609", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" + }, + { + "$id": "2610", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2611", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" + }, + { + "$id": "2612", + "kind": "property", + "name": "value", + "serializedName": "value", + "type": { + "$id": "2613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" + } + ] + }, + "response.function_call_arguments.delta": { + "$id": "2614", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2615", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2616", + "kind": "constant", + "valueType": { + "$id": "2617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" + }, + { + "$id": "2618", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" + }, + { + "$id": "2620", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" + }, + { + "$id": "2622", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2623", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" + }, + { + "$id": "2624", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" + }, + { + "$id": "2626", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" + } + ] + }, + "response.function_call_arguments.done": { + "$id": "2628", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2629", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2630", + "kind": "constant", + "valueType": { + "$id": "2631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" + }, + { + "$id": "2632", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" + }, + { + "$id": "2634", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" + }, + { + "$id": "2636", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2637", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" + }, + { + "$id": "2638", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" + }, + { + "$id": "2640", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" + }, + { + "$id": "2642", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" + } + ] + }, + "input_audio_buffer.speech_started": { + "$id": "2644", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_started", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2645", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2646", + "kind": "constant", + "valueType": { + "$id": "2647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_started", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" + }, + { + "$id": "2648", + "kind": "property", + "name": "audio_start_ms", + "serializedName": "audio_start_ms", + "type": { + "$id": "2649", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" + }, + { + "$id": "2650", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" + } + ] + }, + "input_audio_buffer.speech_stopped": { + "$id": "2652", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_stopped", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2653", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2654", + "kind": "constant", + "valueType": { + "$id": "2655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_stopped", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" + }, + { + "$id": "2656", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2657", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" + }, + { + "$id": "2658", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" + } + ] + }, + "conversation.item.input_audio_transcription.completed": { + "$id": "2660", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.completed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2661", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2662", + "kind": "constant", + "valueType": { + "$id": "2663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.completed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" + }, + { + "$id": "2664", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" + }, + { + "$id": "2666", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2667", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" + }, + { + "$id": "2668", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" + } + ] + }, + "conversation.item.input_audio_transcription.failed": { + "$id": "2670", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.failed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2671", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2672", + "kind": "constant", + "valueType": { + "$id": "2673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" + }, + { + "$id": "2674", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" + }, + { + "$id": "2676", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2677", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" + }, + { + "$id": "2678", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2679", + "kind": "model", + "name": "RealtimeResponseApiError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2680", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" + }, + { + "$id": "2682", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" + }, + { + "$id": "2684", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" + }, + { + "$id": "2686", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" + } + ] + }, + "input_audio_buffer.committed": { + "$id": "2688", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferCommittedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.committed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2689", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2690", + "kind": "constant", + "valueType": { + "$id": "2691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.committed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" + }, + { + "$id": "2692", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" + }, + { + "$id": "2694", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" + } + ] + }, + "input_audio_buffer.cleared": { + "$id": "2696", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferClearedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.cleared", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2697", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2698", + "kind": "constant", + "valueType": { + "$id": "2699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.cleared", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" + } + ] + }, + "error": { + "$id": "2700", + "kind": "model", + "name": "RealtimeResponseErrorCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", + "usage": "Output,Json", + "description": "A command that describes an error encountered during a realtime operation.", + "discriminatorValue": "error", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2701", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2702", + "kind": "constant", + "valueType": { + "$id": "2703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "error", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" + }, + { + "$id": "2704", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2705", + "kind": "model", + "name": "RealtimeResponseError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2706", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" + }, + { + "$id": "2708", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" + }, + { + "$id": "2710", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" + }, + { + "$id": "2712", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" + }, + { + "$id": "2714", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" + } + ] + } + } + }, + { + "$ref": "2328" + }, + { + "$ref": "2333" + }, + { + "$ref": "2359" + }, + { + "$ref": "2364" + }, + { + "$ref": "2369" + }, + { + "$ref": "2377" + }, + { + "$ref": "2383" + }, + { + "$ref": "2392" + }, + { + "$ref": "2398" + }, + { + "$ref": "2404" + }, + { + "$ref": "2414" + }, + { + "$ref": "2419" + }, + { + "$ref": "2427" + }, + { + "$ref": "2430" + }, + { + "$ref": "2435" + }, + { + "$ref": "2440" + }, + { + "$ref": "2449" + }, + { + "$ref": "2457" + }, + { + "$ref": "2465" + }, + { + "$ref": "2470" + }, + { + "$ref": "2475" + }, + { + "$ref": "2481" + }, + { + "$ref": "2490" + }, + { + "$ref": "2499" + }, + { + "$ref": "2508" + }, + { + "$ref": "2521" + }, + { + "$ref": "2534" + }, + { + "$ref": "2548" + }, + { + "$ref": "2560" + }, + { + "$ref": "2574" + }, + { + "$ref": "2586" + }, + { + "$ref": "2600" + }, + { + "$ref": "2614" + }, + { + "$ref": "2628" + }, + { + "$ref": "2644" + }, + { + "$ref": "2652" + }, + { + "$ref": "2660" + }, + { + "$ref": "2670" + }, + { + "$ref": "2679" + }, + { + "$ref": "2688" + }, + { + "$ref": "2696" + }, + { + "$ref": "2700" + }, + { + "$ref": "2705" + }, + { + "$id": "2716", + "kind": "model", + "name": "CreateModerationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2717", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input text to classify", + "type": { + "$id": "2718", + "kind": "union", + "name": "CreateModerationRequestInput", + "variantTypes": [ + { + "$id": "2719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2720", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" + }, + { + "$id": "2722", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", + "type": { + "$ref": "565" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" + } + ] + }, + { + "$id": "2723", + "kind": "model", + "name": "CreateModerationResponse", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", + "usage": "Output,Json", + "description": "Represents if a given text input is potentially harmful.", + "decorators": [], + "properties": [ + { + "$id": "2724", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The unique identifier for the moderation request.", + "type": { + "$id": "2725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" + }, + { + "$id": "2726", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used to generate the moderation results.", + "type": { + "$id": "2727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" + }, + { + "$id": "2728", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "A list of moderation objects.", + "type": { + "$id": "2729", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2730", + "kind": "model", + "name": "CreateModerationResponseResult", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2731", + "kind": "property", + "name": "flagged", + "serializedName": "flagged", + "description": "Whether any of the below categories are flagged.", + "type": { + "$id": "2732", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" + }, + { + "$id": "2733", + "kind": "property", + "name": "categories", + "serializedName": "categories", + "description": "A list of the categories, and whether they are flagged or not.", + "type": { + "$id": "2734", + "kind": "model", + "name": "CreateModerationResponseResultCategories", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2735", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", + "type": { + "$id": "2736", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" + }, + { + "$id": "2737", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", + "type": { + "$id": "2738", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" + }, + { + "$id": "2739", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "Content that expresses, incites, or promotes harassing language towards any target.", + "type": { + "$id": "2740", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" + }, + { + "$id": "2741", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "Harassment content that also includes violence or serious harm towards any target.", + "type": { + "$id": "2742", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" + }, + { + "$id": "2743", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "2744", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" + }, + { + "$id": "2745", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "2746", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" + }, + { + "$id": "2747", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", + "type": { + "$id": "2748", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" + }, + { + "$id": "2749", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", + "type": { + "$id": "2750", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" + }, + { + "$id": "2751", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "Sexual content that includes an individual who is under 18 years old.", + "type": { + "$id": "2752", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" + }, + { + "$id": "2753", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "Content that depicts death, violence, or physical injury.", + "type": { + "$id": "2754", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" + }, + { + "$id": "2755", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "Content that depicts death, violence, or physical injury in graphic detail.", + "type": { + "$id": "2756", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" + }, + { + "$id": "2757", + "kind": "property", + "name": "category_scores", + "serializedName": "category_scores", + "description": "A list of the categories along with their scores as predicted by model.", + "type": { + "$id": "2758", + "kind": "model", + "name": "CreateModerationResponseResultCategoryScores", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2759", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "The score for the category 'hate'.", + "type": { + "$id": "2760", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" + }, + { + "$id": "2761", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "The score for the category 'hate/threatening'.", + "type": { + "$id": "2762", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" + }, + { + "$id": "2763", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "The score for the category 'harassment'.", + "type": { + "$id": "2764", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" + }, + { + "$id": "2765", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "The score for the category 'harassment/threatening'.", + "type": { + "$id": "2766", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" + }, + { + "$id": "2767", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "The score for the category 'self-harm'.", + "type": { + "$id": "2768", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" + }, + { + "$id": "2769", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "The score for the category 'self-harm/intent'.", + "type": { + "$id": "2770", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" + }, + { + "$id": "2771", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "The score for the category 'self-harm/instructions'.", + "type": { + "$id": "2772", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" + }, + { + "$id": "2773", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "The score for the category 'sexual'.", + "type": { + "$id": "2774", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" + }, + { + "$id": "2775", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "The score for the category 'sexual/minors'.", + "type": { + "$id": "2776", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" + }, + { + "$id": "2777", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "The score for the category 'violence'.", + "type": { + "$id": "2778", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" + }, + { + "$id": "2779", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "The score for the category 'violence/graphic'.", + "type": { + "$id": "2780", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" + } + ] + }, + { + "$ref": "2730" + }, + { + "$ref": "2734" + }, + { + "$ref": "2758" + }, + { + "$id": "2781", + "kind": "model", + "name": "ListModelsResponse", + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2782", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2783", + "kind": "constant", + "valueType": { + "$ref": "571" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" + }, + { + "$id": "2784", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2785", + "kind": "array", + "name": "ArrayModel", + "valueType": { + "$id": "2786", + "kind": "model", + "name": "Model", + "crossLanguageDefinitionId": "OpenAI.Model", + "usage": "Output,Json", + "description": "Describes an OpenAI model offering that can be used with the API.", + "decorators": [], + "properties": [ + { + "$id": "2787", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The model identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.id" + }, + { + "$id": "2789", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) when the model was created.", + "type": { + "$id": "2790", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2791", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.created" + }, + { + "$id": "2792", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"model\".", + "type": { + "$id": "2793", + "kind": "constant", + "valueType": { + "$ref": "574" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.object" + }, + { + "$id": "2794", + "kind": "property", + "name": "owned_by", + "serializedName": "owned_by", + "description": "The organization that owns the model.", + "type": { + "$id": "2795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.owned_by" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" + } + ] + }, + { + "$ref": "2786" + }, + { + "$id": "2796", + "kind": "model", + "name": "DeleteModelResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2797", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" + }, + { + "$id": "2799", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2800", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" + }, + { + "$id": "2801", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2802", + "kind": "constant", + "valueType": { + "$ref": "577" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" + } + ] + }, + { + "$id": "2803", + "kind": "model", + "name": "MessageObject", + "crossLanguageDefinitionId": "OpenAI.MessageObject", + "usage": "Output,Json", + "description": "Represents a message within a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "2804", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.id" + }, + { + "$id": "2806", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message`.", + "type": { + "$id": "2807", + "kind": "constant", + "valueType": { + "$ref": "580" + }, + "value": "thread.message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.object" + }, + { + "$id": "2808", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the message was created.", + "type": { + "$id": "2809", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2810", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" + }, + { + "$id": "2811", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", + "type": { + "$id": "2812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" + }, + { + "$id": "2813", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", + "type": { + "$ref": "583" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.status" + }, + { + "$id": "2814", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "On an incomplete message, details about why the message is incomplete.", + "type": { + "$id": "2815", + "kind": "nullable", + "type": { + "$id": "2816", + "kind": "model", + "name": "MessageObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2817", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason the message is incomplete.", + "type": { + "$ref": "591" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" + }, + { + "$id": "2818", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the message was completed.", + "type": { + "$id": "2819", + "kind": "nullable", + "type": { + "$id": "2820", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2821", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" + }, + { + "$id": "2822", + "kind": "property", + "name": "incomplete_at", + "serializedName": "incomplete_at", + "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", + "type": { + "$id": "2823", + "kind": "nullable", + "type": { + "$id": "2824", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2825", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" + }, + { + "$id": "2826", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "603" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.role" + }, + { + "$id": "2827", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "2828", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$ref": "1530" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.content" + }, + { + "$id": "2829", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", + "type": { + "$id": "2830", + "kind": "nullable", + "type": { + "$id": "2831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" + }, + { + "$id": "2832", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", + "type": { + "$id": "2833", + "kind": "nullable", + "type": { + "$id": "2834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" + }, + { + "$id": "2835", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they were added to.", + "type": { + "$id": "2836", + "kind": "nullable", + "type": { + "$id": "2837", + "kind": "array", + "name": "MessageObjectAttachments", + "valueType": { + "$id": "2838", + "kind": "model", + "name": "MessageObjectAttachment", + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2839", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "2840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" + }, + { + "$id": "2841", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "2842", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2843", + "kind": "union", + "name": "MessageObjectAttachmentTool", + "variantTypes": [ + { + "$ref": "1540" + }, + { + "$ref": "1577" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" + }, + { + "$id": "2844", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2845", + "kind": "nullable", + "type": { + "$id": "2846", + "kind": "dict", + "keyType": { + "$id": "2847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" + } + ] + }, + { + "$ref": "2816" + }, + { + "$ref": "2838" + }, + { + "$id": "2849", + "kind": "model", + "name": "ListMessagesResponse", + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2850", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2851", + "kind": "constant", + "valueType": { + "$ref": "615" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" + }, + { + "$id": "2852", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2853", + "kind": "array", + "name": "ArrayMessageObject", + "valueType": { + "$ref": "2803" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" + }, + { + "$id": "2854", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" + }, + { + "$id": "2856", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" + }, + { + "$id": "2858", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2859", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" + } + ] + }, + { + "$id": "2860", + "kind": "model", + "name": "ModifyMessageRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2861", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2862", + "kind": "nullable", + "type": { + "$id": "2863", + "kind": "dict", + "keyType": { + "$id": "2864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" + } + ] + }, + { + "$id": "2866", + "kind": "model", + "name": "DeleteMessageResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2867", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2868", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" + }, + { + "$id": "2869", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2870", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" + }, + { + "$id": "2871", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2872", + "kind": "constant", + "valueType": { + "$ref": "618" + }, + "value": "thread.message.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" + } + ] + }, + { + "$id": "2873", + "kind": "model", + "name": "CreateImageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2874", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", + "type": { + "$id": "2875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" + }, + { + "$id": "2876", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation.", + "type": { + "$id": "2877", + "kind": "nullable", + "type": { + "$ref": "621" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" + }, + { + "$id": "2878", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2879", + "kind": "nullable", + "type": { + "$id": "2880", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" + }, + { + "$id": "2881", + "kind": "property", + "name": "quality", + "serializedName": "quality", + "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", + "type": { + "$ref": "627" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" + }, + { + "$id": "2882", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2883", + "kind": "nullable", + "type": { + "$ref": "633" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" + }, + { + "$id": "2884", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", + "type": { + "$id": "2885", + "kind": "nullable", + "type": { + "$ref": "639" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" + }, + { + "$id": "2886", + "kind": "property", + "name": "style", + "serializedName": "style", + "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", + "type": { + "$id": "2887", + "kind": "nullable", + "type": { + "$ref": "651" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" + }, + { + "$id": "2888", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" + } + ] + }, + { + "$id": "2890", + "kind": "model", + "name": "ImagesResponse", + "crossLanguageDefinitionId": "OpenAI.ImagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2891", + "kind": "property", + "name": "created", + "serializedName": "created", + "type": { + "$id": "2892", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2893", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" + }, + { + "$id": "2894", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2895", + "kind": "array", + "name": "ArrayImage", + "valueType": { + "$id": "2896", + "kind": "model", + "name": "Image", + "crossLanguageDefinitionId": "OpenAI.Image", + "usage": "Output,Json", + "description": "Represents the url or the content of an image generated by the OpenAI API.", + "decorators": [], + "properties": [ + { + "$id": "2897", + "kind": "property", + "name": "b64_json", + "serializedName": "b64_json", + "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", + "type": { + "$id": "2898", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.b64_json" + }, + { + "$id": "2899", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the generated image, if `response_format` is `url` (default).", + "type": { + "$id": "2900", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.url" + }, + { + "$id": "2901", + "kind": "property", + "name": "revised_prompt", + "serializedName": "revised_prompt", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", + "type": { + "$id": "2902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" + } + ] + }, + { + "$ref": "2896" + }, + { + "$id": "2903", + "kind": "model", + "name": "CreateImageEditRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2904", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", + "type": { + "$id": "2905", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" + }, + { + "$id": "2906", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters.", + "type": { + "$id": "2907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" + }, + { + "$id": "2908", + "kind": "property", + "name": "mask", + "serializedName": "mask", + "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", + "type": { + "$id": "2909", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" + }, + { + "$id": "2910", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2911", + "kind": "nullable", + "type": { + "$ref": "657" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" + }, + { + "$id": "2912", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10.", + "type": { + "$id": "2913", + "kind": "nullable", + "type": { + "$id": "2914", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" + }, + { + "$id": "2915", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2916", + "kind": "nullable", + "type": { + "$ref": "661" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" + }, + { + "$id": "2917", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2918", + "kind": "nullable", + "type": { + "$ref": "669" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" + }, + { + "$id": "2919", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" + } + ] + }, + { + "$id": "2921", + "kind": "model", + "name": "CreateImageVariationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2922", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", + "type": { + "$id": "2923", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" + }, + { + "$id": "2924", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2925", + "kind": "nullable", + "type": { + "$ref": "675" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" + }, + { + "$id": "2926", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2927", + "kind": "nullable", + "type": { + "$id": "2928", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" + }, + { + "$id": "2929", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2930", + "kind": "nullable", + "type": { + "$ref": "679" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" + }, + { + "$id": "2931", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2932", + "kind": "nullable", + "type": { + "$ref": "685" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" + }, + { + "$id": "2933", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" + } + ] + }, + { + "$id": "2935", + "kind": "model", + "name": "CreateFineTuningJobRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2936", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", + "type": { + "$ref": "693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" + }, + { + "$id": "2937", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" + }, + { + "$id": "2939", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job.", + "type": { + "$id": "2940", + "kind": "model", + "name": "CreateFineTuningJobRequestHyperparameters", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2941", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "2942", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "703" + }, + { + "$id": "2943", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" + }, + { + "$id": "2944", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "2945", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "707" + }, + { + "$id": "2946", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" + }, + { + "$id": "2947", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "2948", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "711" + }, + { + "$id": "2949", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" + }, + { + "$id": "2950", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", + "type": { + "$id": "2951", + "kind": "nullable", + "type": { + "$id": "2952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" + }, + { + "$id": "2953", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2954", + "kind": "nullable", + "type": { + "$id": "2955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" + }, + { + "$id": "2956", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for your fine-tuning job.", + "type": { + "$id": "2957", + "kind": "nullable", + "type": { + "$id": "2958", + "kind": "array", + "name": "CreateFineTuningJobRequestIntegrations", + "valueType": { + "$id": "2959", + "kind": "model", + "name": "CreateFineTuningJobRequestIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2960", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" + }, + "properties": [ + { + "$ref": "2960" + } + ], + "discriminatedSubtypes": { + "$id": "2962", + "wandb": { + "$id": "2963", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", + "usage": "Input,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "2959" + }, + "properties": [ + { + "$id": "2964", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2965", + "kind": "constant", + "valueType": { + "$id": "2966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" + }, + { + "$id": "2967", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "type": { + "$id": "2968", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2969", + "kind": "property", + "name": "project", + "serializedName": "project", + "type": { + "$id": "2970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" + }, + { + "$id": "2971", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2972", + "kind": "nullable", + "type": { + "$id": "2973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" + }, + { + "$id": "2974", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "type": { + "$id": "2975", + "kind": "nullable", + "type": { + "$id": "2976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" + }, + { + "$id": "2977", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "type": { + "$id": "2978", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" + }, + { + "$id": "2980", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", + "type": { + "$id": "2981", + "kind": "nullable", + "type": { + "$id": "2982", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" + } + ] + }, + { + "$ref": "2940" + }, + { + "$ref": "2959" + }, + { + "$ref": "2963" + }, + { + "$ref": "2968" + }, + { + "$id": "2983", + "kind": "model", + "name": "FineTuningJob", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob", + "usage": "Output,Json", + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", + "decorators": [], + "properties": [ + { + "$id": "2984", + "kind": "property", + "name": "user_provided_suffix", + "serializedName": "user_provided_suffix", + "description": "The descriptive suffix applied to the job, as specified in the job creation request.", + "type": { + "$id": "2985", + "kind": "nullable", + "type": { + "$id": "2986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" + }, + { + "$id": "2987", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The object identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" + }, + { + "$id": "2989", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", + "type": { + "$id": "2990", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2991", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" + }, + { + "$id": "2992", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", + "type": { + "$id": "2993", + "kind": "nullable", + "type": { + "$id": "2994", + "kind": "model", + "name": "FineTuningJobError", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2995", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "2996", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" + }, + { + "$id": "2997", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "2998", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" + }, + { + "$id": "2999", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", + "type": { + "$id": "3000", + "kind": "nullable", + "type": { + "$id": "3001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" + }, + { + "$id": "3002", + "kind": "property", + "name": "fine_tuned_model", + "serializedName": "fine_tuned_model", + "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3003", + "kind": "nullable", + "type": { + "$id": "3004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" + }, + { + "$id": "3005", + "kind": "property", + "name": "finished_at", + "serializedName": "finished_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3006", + "kind": "nullable", + "type": { + "$id": "3007", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3008", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" + }, + { + "$id": "3009", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "3010", + "kind": "model", + "name": "FineTuningJobHyperparameters", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3011", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "3012", + "kind": "union", + "name": "FineTuningJobHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "715" + }, + { + "$id": "3013", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" + }, + { + "$id": "3014", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "3015", + "kind": "union", + "name": "FineTuningJobHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "719" + }, + { + "$id": "3016", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" + }, + { + "$id": "3017", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "3018", + "kind": "union", + "name": "FineTuningJobHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "723" + }, + { + "$id": "3019", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" + }, + { + "$id": "3020", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The base model that is being fine-tuned.", + "type": { + "$id": "3021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" + }, + { + "$id": "3022", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job\".", + "type": { + "$id": "3023", + "kind": "constant", + "valueType": { + "$ref": "727" + }, + "value": "fine_tuning.job", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" + }, + { + "$id": "3024", + "kind": "property", + "name": "organization_id", + "serializedName": "organization_id", + "description": "The organization that owns the fine-tuning job.", + "type": { + "$id": "3025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" + }, + { + "$id": "3026", + "kind": "property", + "name": "result_files", + "serializedName": "result_files", + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3027", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" + }, + { + "$id": "3029", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", + "type": { + "$ref": "730" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" + }, + { + "$id": "3030", + "kind": "property", + "name": "trained_tokens", + "serializedName": "trained_tokens", + "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3031", + "kind": "nullable", + "type": { + "$id": "3032", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" + }, + { + "$id": "3033", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" + }, + { + "$id": "3035", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3036", + "kind": "nullable", + "type": { + "$id": "3037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" + }, + { + "$id": "3038", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for this fine-tuning job.", + "type": { + "$id": "3039", + "kind": "nullable", + "type": { + "$id": "3040", + "kind": "array", + "name": "FineTuningJobIntegrations", + "valueType": { + "$id": "3041", + "kind": "model", + "name": "FineTuningIntegration", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3042", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" + }, + "properties": [ + { + "$ref": "3042" + } + ], + "discriminatedSubtypes": { + "$id": "3044", + "wandb": { + "$id": "3045", + "kind": "model", + "name": "FineTuningIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", + "usage": "Output,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "3041" + }, + "properties": [ + { + "$id": "3046", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the integration being enabled for the fine-tuning job", + "type": { + "$id": "3047", + "kind": "constant", + "valueType": { + "$id": "3048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" + }, + { + "$id": "3049", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", + "type": { + "$id": "3050", + "kind": "model", + "name": "FineTuningIntegrationWandbWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3051", + "kind": "property", + "name": "project", + "serializedName": "project", + "description": "The name of the project that the new run will be created under.", + "type": { + "$id": "3052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" + }, + { + "$id": "3053", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", + "type": { + "$id": "3054", + "kind": "nullable", + "type": { + "$id": "3055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" + }, + { + "$id": "3056", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", + "type": { + "$id": "3057", + "kind": "nullable", + "type": { + "$id": "3058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" + }, + { + "$id": "3059", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", + "type": { + "$id": "3060", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" + }, + { + "$id": "3062", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed used for the fine-tuning job.", + "type": { + "$id": "3063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" + }, + { + "$id": "3064", + "kind": "property", + "name": "estimated_finish", + "serializedName": "estimated_finish", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", + "type": { + "$id": "3065", + "kind": "nullable", + "type": { + "$id": "3066", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3067", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" + } + ] + }, + { + "$ref": "2994" + }, + { + "$ref": "3010" + }, + { + "$ref": "3041" + }, + { + "$ref": "3045" + }, + { + "$ref": "3050" + }, + { + "$id": "3068", + "kind": "model", + "name": "ListPaginatedFineTuningJobsResponse", + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3069", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3070", + "kind": "array", + "name": "ArrayFineTuningJob", + "valueType": { + "$ref": "2983" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" + }, + { + "$id": "3071", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3072", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" + }, + { + "$id": "3073", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3074", + "kind": "constant", + "valueType": { + "$ref": "744" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" + } + ] + }, + { + "$id": "3075", + "kind": "model", + "name": "ListFineTuningJobCheckpointsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3076", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3077", + "kind": "array", + "name": "ArrayFineTuningJobCheckpoint", + "valueType": { + "$id": "3078", + "kind": "model", + "name": "FineTuningJobCheckpoint", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", + "usage": "Output,Json", + "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", + "decorators": [], + "properties": [ + { + "$id": "3079", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The checkpoint identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "3080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" + }, + { + "$id": "3081", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", + "type": { + "$id": "3082", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3083", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" + }, + { + "$id": "3084", + "kind": "property", + "name": "fine_tuned_model_checkpoint", + "serializedName": "fine_tuned_model_checkpoint", + "description": "The name of the fine-tuned checkpoint model that is created.", + "type": { + "$id": "3085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" + }, + { + "$id": "3086", + "kind": "property", + "name": "step_number", + "serializedName": "step_number", + "description": "The step number that the checkpoint was created at.", + "type": { + "$id": "3087", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" + }, + { + "$id": "3088", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "description": "Metrics at the step number during the fine-tuning job.", + "type": { + "$id": "3089", + "kind": "model", + "name": "FineTuningJobCheckpointMetrics", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3090", + "kind": "property", + "name": "step", + "serializedName": "step", + "type": { + "$id": "3091", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" + }, + { + "$id": "3092", + "kind": "property", + "name": "train_loss", + "serializedName": "train_loss", + "type": { + "$id": "3093", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" + }, + { + "$id": "3094", + "kind": "property", + "name": "train_mean_token_accuracy", + "serializedName": "train_mean_token_accuracy", + "type": { + "$id": "3095", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" + }, + { + "$id": "3096", + "kind": "property", + "name": "valid_loss", + "serializedName": "valid_loss", + "type": { + "$id": "3097", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" + }, + { + "$id": "3098", + "kind": "property", + "name": "valid_mean_token_accuracy", + "serializedName": "valid_mean_token_accuracy", + "type": { + "$id": "3099", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" + }, + { + "$id": "3100", + "kind": "property", + "name": "full_valid_loss", + "serializedName": "full_valid_loss", + "type": { + "$id": "3101", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" + }, + { + "$id": "3102", + "kind": "property", + "name": "full_valid_mean_token_accuracy", + "serializedName": "full_valid_mean_token_accuracy", + "type": { + "$id": "3103", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" + }, + { + "$id": "3104", + "kind": "property", + "name": "fine_tuning_job_id", + "serializedName": "fine_tuning_job_id", + "description": "The name of the fine-tuning job that this checkpoint was created from.", + "type": { + "$id": "3105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" + }, + { + "$id": "3106", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", + "type": { + "$id": "3107", + "kind": "constant", + "valueType": { + "$ref": "747" + }, + "value": "fine_tuning.job.checkpoint", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" + }, + { + "$id": "3108", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3109", + "kind": "constant", + "valueType": { + "$ref": "750" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" + }, + { + "$id": "3110", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3111", + "kind": "nullable", + "type": { + "$id": "3112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" + }, + { + "$id": "3113", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3114", + "kind": "nullable", + "type": { + "$id": "3115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" + }, + { + "$id": "3116", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3117", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" + } + ] + }, + { + "$ref": "3078" + }, + { + "$ref": "3089" + }, + { + "$id": "3118", + "kind": "model", + "name": "ListFineTuningJobEventsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3119", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3120", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" + }, + { + "$id": "3121", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3122", + "kind": "array", + "name": "ArrayFineTuningJobEvent", + "valueType": { + "$id": "3123", + "kind": "model", + "name": "FineTuningJobEvent", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", + "usage": "Output,Json", + "description": "Fine-tuning job event object", + "decorators": [], + "properties": [ + { + "$id": "3124", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" + }, + { + "$id": "3126", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "type": { + "$id": "3127", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3128", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" + }, + { + "$id": "3129", + "kind": "property", + "name": "level", + "serializedName": "level", + "type": { + "$ref": "753" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" + }, + { + "$id": "3130", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "3131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" + }, + { + "$id": "3132", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3133", + "kind": "constant", + "valueType": { + "$ref": "761" + }, + "value": "fine_tuning.job.event", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" + }, + { + "$id": "3134", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3135", + "kind": "constant", + "valueType": { + "$ref": "764" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" + } + ] + }, + { + "$ref": "3123" + }, + { + "$id": "3136", + "kind": "model", + "name": "CreateFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3137", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The File object (not file name) to be uploaded.", + "type": { + "$id": "3138", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" + }, + { + "$id": "3139", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", + "type": { + "$ref": "767" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" + } + ] + }, + { + "$id": "3140", + "kind": "model", + "name": "ListFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3141", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3142", + "kind": "array", + "name": "ArrayOpenAiFile", + "valueType": { + "$ref": "1275" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" + }, + { + "$id": "3143", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3144", + "kind": "constant", + "valueType": { + "$ref": "777" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" + } + ] + }, + { + "$id": "3145", + "kind": "model", + "name": "DeleteFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3146", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" + }, + { + "$id": "3148", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3149", + "kind": "constant", + "valueType": { + "$ref": "780" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" + }, + { + "$id": "3150", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "3151", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" + } + ] + }, + { + "$id": "3152", + "kind": "model", + "name": "CreateEmbeddingRequest", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3153", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "3154", + "kind": "union", + "name": "CreateEmbeddingRequestInput", + "variantTypes": [ + { + "$id": "3155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3156", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3158", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3159", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3160", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "3161", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3162", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" + }, + { + "$id": "3163", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "783" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" + }, + { + "$id": "3164", + "kind": "property", + "name": "encoding_format", + "serializedName": "encoding_format", + "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", + "type": { + "$ref": "791" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" + }, + { + "$id": "3165", + "kind": "property", + "name": "dimensions", + "serializedName": "dimensions", + "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", + "type": { + "$id": "3166", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" + }, + { + "$id": "3167", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" + } + ] + }, + { + "$id": "3169", + "kind": "model", + "name": "CreateEmbeddingResponse", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3170", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The list of embeddings generated by the model.", + "type": { + "$id": "3171", + "kind": "array", + "name": "ArrayEmbedding", + "valueType": { + "$id": "3172", + "kind": "model", + "name": "Embedding", + "crossLanguageDefinitionId": "OpenAI.Embedding", + "usage": "Output,Json", + "description": "Represents an embedding vector returned by embedding endpoint.", + "decorators": [], + "properties": [ + { + "$id": "3173", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the embedding in the list of embeddings.", + "type": { + "$id": "3174", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.index" + }, + { + "$id": "3175", + "kind": "property", + "name": "embedding", + "serializedName": "embedding", + "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", + "type": { + "$id": "3176", + "kind": "union", + "name": "EmbeddingEmbedding", + "variantTypes": [ + { + "$id": "3177", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3178", + "kind": "float", + "name": "float", + "crossLanguageDefinitionId": "TypeSpec.float", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" + }, + { + "$id": "3180", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"embedding\".", + "type": { + "$id": "3181", + "kind": "constant", + "valueType": { + "$ref": "797" + }, + "value": "embedding", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" + }, + { + "$id": "3182", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model used to generate the embedding.", + "type": { + "$id": "3183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" + }, + { + "$id": "3184", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"list\".", + "type": { + "$id": "3185", + "kind": "constant", + "valueType": { + "$ref": "800" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" + }, + { + "$id": "3186", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "The usage information for the request.", + "type": { + "$id": "3187", + "kind": "model", + "name": "CreateEmbeddingResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3188", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "The number of tokens used by the prompt.", + "type": { + "$id": "3189", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "3190", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "The total number of tokens used by the request.", + "type": { + "$id": "3191", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" + } + ] + }, + { + "$ref": "3172" + }, + { + "$ref": "3187" + }, + { + "$id": "3192", + "kind": "model", + "name": "CreateCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3193", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "803" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" + }, + { + "$id": "3194", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", + "type": { + "$id": "3195", + "kind": "nullable", + "type": { + "$id": "3196", + "kind": "union", + "name": "CreateCompletionRequestPrompt", + "variantTypes": [ + { + "$id": "3197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3198", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3200", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3201", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3202", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "3203", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3204", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" + }, + { + "$id": "3205", + "kind": "property", + "name": "best_of", + "serializedName": "best_of", + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "3206", + "kind": "nullable", + "type": { + "$id": "3207", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" + }, + { + "$id": "3208", + "kind": "property", + "name": "echo", + "serializedName": "echo", + "description": "Echo back the prompt in addition to the completion", + "type": { + "$id": "3209", + "kind": "nullable", + "type": { + "$id": "3210", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" + }, + { + "$id": "3211", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3212", + "kind": "nullable", + "type": { + "$id": "3213", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" + }, + { + "$id": "3214", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", + "type": { + "$id": "3215", + "kind": "nullable", + "type": { + "$id": "3216", + "kind": "dict", + "keyType": { + "$id": "3217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3218", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" + }, + { + "$id": "3219", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", + "type": { + "$id": "3220", + "kind": "nullable", + "type": { + "$id": "3221", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" + }, + { + "$id": "3222", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "3223", + "kind": "nullable", + "type": { + "$id": "3224", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" + }, + { + "$id": "3225", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "3226", + "kind": "nullable", + "type": { + "$id": "3227", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" + }, + { + "$id": "3228", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3229", + "kind": "nullable", + "type": { + "$id": "3230", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" + }, + { + "$id": "3231", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "3232", + "kind": "nullable", + "type": { + "$id": "3233", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" + }, + { + "$id": "3234", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", + "type": { + "$id": "3235", + "kind": "nullable", + "type": { + "$id": "3236", + "kind": "union", + "name": "CreateCompletionRequestStop", + "variantTypes": [ + { + "$id": "3237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3238", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" + }, + { + "$id": "3240", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "3241", + "kind": "nullable", + "type": { + "$id": "3242", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" + }, + { + "$id": "3243", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "3244", + "kind": "nullable", + "type": { + "$id": "3245", + "kind": "model", + "name": "ChatCompletionStreamOptions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", + "usage": "Input,Json", + "description": "Options for streaming response. Only set this when you set `stream: true`.", + "decorators": [], + "properties": [ + { + "$id": "3246", + "kind": "property", + "name": "include_usage", + "serializedName": "include_usage", + "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", + "type": { + "$id": "3247", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" + }, + { + "$id": "3248", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", + "type": { + "$id": "3249", + "kind": "nullable", + "type": { + "$id": "3250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" + }, + { + "$id": "3251", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "3252", + "kind": "nullable", + "type": { + "$id": "3253", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" + }, + { + "$id": "3254", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "3255", + "kind": "nullable", + "type": { + "$id": "3256", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" + }, + { + "$id": "3257", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" + } + ] + }, + { + "$ref": "3245" + }, + { + "$id": "3259", + "kind": "model", + "name": "CreateCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", + "usage": "Output,Json", + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", + "decorators": [], + "properties": [ + { + "$id": "3260", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the completion.", + "type": { + "$id": "3261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" + }, + { + "$id": "3262", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "The list of completion choices the model generated for the input prompt.", + "type": { + "$id": "3263", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3264", + "kind": "model", + "name": "CreateCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3265", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", + "type": { + "$ref": "811" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3266", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "3267", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" + }, + { + "$id": "3268", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "type": { + "$id": "3269", + "kind": "nullable", + "type": { + "$id": "3270", + "kind": "model", + "name": "CreateCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3271", + "kind": "property", + "name": "text_offset", + "serializedName": "text_offset", + "type": { + "$id": "3272", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3273", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" + }, + { + "$id": "3274", + "kind": "property", + "name": "token_logprobs", + "serializedName": "token_logprobs", + "type": { + "$id": "3275", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3276", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" + }, + { + "$id": "3277", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "type": { + "$id": "3278", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" + }, + { + "$id": "3280", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "type": { + "$id": "3281", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "3282", + "kind": "dict", + "keyType": { + "$id": "3283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3284", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" + }, + { + "$id": "3285", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" + }, + { + "$id": "3287", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the completion was created.", + "type": { + "$id": "3288", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3289", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" + }, + { + "$id": "3290", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for completion.", + "type": { + "$id": "3291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" + }, + { + "$id": "3292", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" + }, + { + "$id": "3294", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"text_completion\"", + "type": { + "$id": "3295", + "kind": "constant", + "valueType": { + "$ref": "819" + }, + "value": "text_completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" + }, + { + "$id": "3296", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "3297", + "kind": "model", + "name": "CompletionUsage", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics for the completion request.", + "decorators": [], + "properties": [ + { + "$id": "3298", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "3299", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" + }, + { + "$id": "3300", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "3301", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" + }, + { + "$id": "3302", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "3303", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" + }, + { + "$id": "3304", + "kind": "property", + "name": "completion_tokens_details", + "serializedName": "completion_tokens_details", + "description": "Breakdown of tokens used in a completion.", + "type": { + "$id": "3305", + "kind": "model", + "name": "CompletionUsageCompletionTokensDetails", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3306", + "kind": "property", + "name": "reasoning_tokens", + "serializedName": "reasoning_tokens", + "description": "Tokens generated by the model for reasoning.", + "type": { + "$id": "3307", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" + } + ] + }, + { + "$ref": "3264" + }, + { + "$ref": "3270" + }, + { + "$ref": "3297" + }, + { + "$ref": "3305" + }, + { + "$id": "3308", + "kind": "model", + "name": "CreateChatCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3309", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", + "type": { + "$id": "3310", + "kind": "array", + "name": "ArrayChatCompletionRequestMessage", + "valueType": { + "$id": "3311", + "kind": "model", + "name": "ChatCompletionRequestMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3312", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "3313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" + }, + "properties": [ + { + "$ref": "3312" + } + ], + "discriminatedSubtypes": { + "$id": "3314", + "system": { + "$id": "3315", + "kind": "model", + "name": "ChatCompletionRequestSystemMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3316", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the system message.", + "type": { + "$id": "3317", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContent", + "variantTypes": [ + { + "$id": "3318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3319", + "kind": "array", + "name": "ArrayChatCompletionRequestSystemMessageContentPart", + "valueType": { + "$id": "3320", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContentPart", + "variantTypes": [ + { + "$id": "3321", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartText", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3322", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3323", + "kind": "constant", + "valueType": { + "$ref": "822" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" + }, + { + "$id": "3324", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content.", + "type": { + "$id": "3325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" + }, + { + "$id": "3326", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `system`.", + "type": { + "$id": "3327", + "kind": "constant", + "valueType": { + "$id": "3328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" + }, + { + "$id": "3329", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" + } + ] + }, + "user": { + "$id": "3331", + "kind": "model", + "name": "ChatCompletionRequestUserMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3332", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the user message.", + "type": { + "$id": "3333", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContent", + "variantTypes": [ + { + "$id": "3334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3335", + "kind": "array", + "name": "ArrayChatCompletionRequestUserMessageContentPart", + "valueType": { + "$id": "3336", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + }, + { + "$id": "3337", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3338", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3339", + "kind": "constant", + "valueType": { + "$ref": "825" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" + }, + { + "$id": "3340", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "3341", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImageImageUrl", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3342", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "Either a URL of the image or the base64 encoded image data.", + "type": { + "$id": "3343", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" + }, + { + "$id": "3344", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", + "type": { + "$ref": "828" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" + }, + { + "$id": "3345", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `user`.", + "type": { + "$id": "3346", + "kind": "constant", + "valueType": { + "$id": "3347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" + }, + { + "$id": "3348", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" + } + ] + }, + "assistant": { + "$id": "3350", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3351", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", + "type": { + "$id": "3352", + "kind": "nullable", + "type": { + "$id": "3353", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContent", + "variantTypes": [ + { + "$id": "3354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3355", + "kind": "array", + "name": "ArrayChatCompletionRequestAssistantMessageContentPart", + "valueType": { + "$id": "3356", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + }, + { + "$id": "3357", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartRefusal", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3358", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3359", + "kind": "constant", + "valueType": { + "$ref": "836" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" + }, + { + "$id": "3360", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "3361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" + }, + { + "$id": "3362", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message by the assistant.", + "type": { + "$id": "3363", + "kind": "nullable", + "type": { + "$id": "3364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" + }, + { + "$id": "3365", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `assistant`.", + "type": { + "$id": "3366", + "kind": "constant", + "valueType": { + "$id": "3367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" + }, + { + "$id": "3368", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" + }, + { + "$id": "3370", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3371", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$id": "3372", + "kind": "model", + "name": "ChatCompletionMessageToolCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3373", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" + }, + { + "$id": "3375", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3376", + "kind": "constant", + "valueType": { + "$ref": "839" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" + }, + { + "$id": "3377", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function that the model called.", + "type": { + "$id": "3378", + "kind": "model", + "name": "ChatCompletionMessageToolCallFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3379", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" + }, + { + "$id": "3381", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" + }, + { + "$id": "3383", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3384", + "kind": "nullable", + "type": { + "$id": "3385", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3386", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" + }, + { + "$id": "3388", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" + } + ] + }, + "tool": { + "$id": "3390", + "kind": "model", + "name": "ChatCompletionRequestToolMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", + "usage": "Input,Json", + "discriminatorValue": "tool", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3391", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `tool`.", + "type": { + "$id": "3392", + "kind": "constant", + "valueType": { + "$id": "3393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" + }, + { + "$id": "3394", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the tool message.", + "type": { + "$id": "3395", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContent", + "variantTypes": [ + { + "$id": "3396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3397", + "kind": "array", + "name": "ArrayChatCompletionRequestToolMessageContentPart", + "valueType": { + "$id": "3398", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" + }, + { + "$id": "3399", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "Tool call that this message is responding to.", + "type": { + "$id": "3400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" + } + ] + }, + "function": { + "$id": "3401", + "kind": "model", + "name": "ChatCompletionRequestFunctionMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3402", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `function`.", + "type": { + "$id": "3403", + "kind": "constant", + "valueType": { + "$id": "3404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" + }, + { + "$id": "3405", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the function message.", + "type": { + "$id": "3406", + "kind": "nullable", + "type": { + "$id": "3407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" + }, + { + "$id": "3408", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" + }, + { + "$id": "3410", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", + "type": { + "$ref": "842" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" + }, + { + "$id": "3411", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3412", + "kind": "nullable", + "type": { + "$id": "3413", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" + }, + { + "$id": "3414", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", + "type": { + "$id": "3415", + "kind": "nullable", + "type": { + "$id": "3416", + "kind": "dict", + "keyType": { + "$id": "3417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3418", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" + }, + { + "$id": "3419", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", + "type": { + "$id": "3420", + "kind": "nullable", + "type": { + "$id": "3421", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" + }, + { + "$id": "3422", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", + "type": { + "$id": "3423", + "kind": "nullable", + "type": { + "$id": "3424", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" + }, + { + "$id": "3425", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", + "type": { + "$id": "3426", + "kind": "nullable", + "type": { + "$id": "3427", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" + }, + { + "$id": "3428", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", + "type": { + "$id": "3429", + "kind": "nullable", + "type": { + "$id": "3430", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" + }, + { + "$id": "3431", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", + "type": { + "$id": "3432", + "kind": "nullable", + "type": { + "$id": "3433", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" + }, + { + "$id": "3434", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3435", + "kind": "nullable", + "type": { + "$id": "3436", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" + }, + { + "$id": "3437", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", + "type": { + "$id": "3438", + "kind": "model", + "name": "ChatResponseFormat", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3439", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" + }, + "properties": [ + { + "$ref": "3439" + } + ], + "discriminatedSubtypes": { + "$id": "3441", + "text": { + "$id": "3442", + "kind": "model", + "name": "ChatResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", + "usage": "Input,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3443", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "3444", + "kind": "constant", + "valueType": { + "$id": "3445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "3446", + "kind": "model", + "name": "ChatResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", + "usage": "Input,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3447", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "3448", + "kind": "constant", + "valueType": { + "$id": "3449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "3450", + "kind": "model", + "name": "ChatResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", + "access": "public", + "usage": "Input,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3451", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "3452", + "kind": "constant", + "valueType": { + "$id": "3453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" + }, + { + "$id": "3454", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" + }, + { + "$id": "3455", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "3456", + "kind": "nullable", + "type": { + "$id": "3457", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" + }, + { + "$id": "3458", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", + "type": { + "$id": "3459", + "kind": "nullable", + "type": { + "$ref": "902" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" + }, + { + "$id": "3460", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "type": { + "$id": "3461", + "kind": "nullable", + "type": { + "$id": "3462", + "kind": "union", + "name": "CreateChatCompletionRequestStop", + "variantTypes": [ + { + "$id": "3463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3464", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" + }, + { + "$id": "3466", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "3467", + "kind": "nullable", + "type": { + "$id": "3468", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" + }, + { + "$id": "3469", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "3470", + "kind": "nullable", + "type": { + "$ref": "3245" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" + }, + { + "$id": "3471", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "3472", + "kind": "nullable", + "type": { + "$id": "3473", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" + }, + { + "$id": "3474", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "3475", + "kind": "nullable", + "type": { + "$id": "3476", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" + }, + { + "$id": "3477", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", + "type": { + "$id": "3478", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$id": "3479", + "kind": "model", + "name": "ChatCompletionTool", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3480", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3481", + "kind": "constant", + "valueType": { + "$ref": "908" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" + }, + { + "$id": "3482", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$ref": "1563" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" + }, + { + "$id": "3483", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "3484", + "kind": "union", + "name": "ChatCompletionToolChoiceOption", + "variantTypes": [ + { + "$ref": "911" + }, + { + "$id": "3485", + "kind": "model", + "name": "ChatCompletionNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", + "usage": "Input,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", + "decorators": [], + "properties": [ + { + "$id": "3486", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3487", + "kind": "constant", + "valueType": { + "$ref": "919" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" + }, + { + "$id": "3488", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "3489", + "kind": "model", + "name": "ChatCompletionNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3490", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" + }, + { + "$id": "3492", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "3493", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" + }, + { + "$id": "3494", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" + }, + { + "$id": "3496", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", + "type": { + "$id": "3497", + "kind": "union", + "name": "CreateChatCompletionRequestFunctionCall", + "variantTypes": [ + { + "$id": "3498", + "kind": "constant", + "valueType": { + "$id": "3499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "none", + "decorators": [] + }, + { + "$id": "3500", + "kind": "constant", + "valueType": { + "$id": "3501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "3502", + "kind": "model", + "name": "ChatCompletionFunctionCallOption", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", + "usage": "Input,Json", + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", + "decorators": [], + "properties": [ + { + "$id": "3503", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" + }, + { + "$id": "3505", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", + "type": { + "$id": "3506", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$id": "3507", + "kind": "model", + "name": "ChatCompletionFunctions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "decorators": [], + "properties": [ + { + "$id": "3508", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "3509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" + }, + { + "$id": "3510", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "3511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" + }, + { + "$id": "3512", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$ref": "1569" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" + } + ] + }, + { + "$ref": "3311" + }, + { + "$ref": "3315" + }, + { + "$ref": "3321" + }, + { + "$ref": "3331" + }, + { + "$ref": "3337" + }, + { + "$ref": "3341" + }, + { + "$ref": "3350" + }, + { + "$ref": "3357" + }, + { + "$ref": "3372" + }, + { + "$ref": "3378" + }, + { + "$ref": "3385" + }, + { + "$ref": "3390" + }, + { + "$ref": "3401" + }, + { + "$ref": "3438" + }, + { + "$ref": "3442" + }, + { + "$ref": "3446" + }, + { + "$ref": "3450" + }, + { + "$ref": "3479" + }, + { + "$ref": "3485" + }, + { + "$ref": "3489" + }, + { + "$ref": "3502" + }, + { + "$ref": "3507" + }, + { + "$id": "3513", + "kind": "model", + "name": "CreateChatCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", + "usage": "Output,Json", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3514", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "3515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" + }, + { + "$id": "3516", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "3517", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3518", + "kind": "model", + "name": "CreateChatCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3519", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$ref": "922" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3520", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3521", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" + }, + { + "$id": "3522", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "3523", + "kind": "model", + "name": "ChatCompletionResponseMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", + "usage": "Output,Json", + "description": "A chat completion message generated by the model.", + "decorators": [], + "properties": [ + { + "$id": "3524", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the message.", + "type": { + "$id": "3525", + "kind": "nullable", + "type": { + "$id": "3526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" + }, + { + "$id": "3527", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "3528", + "kind": "nullable", + "type": { + "$id": "3529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" + }, + { + "$id": "3530", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3531", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$ref": "3372" + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" + }, + { + "$id": "3532", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "3533", + "kind": "constant", + "valueType": { + "$ref": "934" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" + }, + { + "$id": "3534", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3535", + "kind": "model", + "name": "ChatCompletionResponseMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3536", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" + }, + { + "$id": "3538", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" + }, + { + "$id": "3540", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "3541", + "kind": "nullable", + "type": { + "$id": "3542", + "kind": "model", + "name": "CreateChatCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3543", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "3544", + "kind": "nullable", + "type": { + "$id": "3545", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$id": "3546", + "kind": "model", + "name": "ChatCompletionTokenLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3547", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "3548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" + }, + { + "$id": "3549", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "3550", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" + }, + { + "$id": "3551", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "3552", + "kind": "nullable", + "type": { + "$id": "3553", + "kind": "array", + "name": "ChatCompletionTokenLogprobBytes", + "valueType": { + "$id": "3554", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" + }, + { + "$id": "3555", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", + "type": { + "$id": "3556", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3557", + "kind": "model", + "name": "ChatCompletionTokenLogprobTopLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3558", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "3559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" + }, + { + "$id": "3560", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "3561", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" + }, + { + "$id": "3562", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "3563", + "kind": "nullable", + "type": { + "$id": "3564", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3565", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "3566", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "3567", + "kind": "nullable", + "type": { + "$id": "3568", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" + }, + { + "$id": "3569", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "3570", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" + }, + { + "$id": "3572", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "3573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" + }, + { + "$id": "3574", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "3575", + "kind": "nullable", + "type": { + "$ref": "937" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" + }, + { + "$id": "3576", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" + }, + { + "$id": "3578", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "3579", + "kind": "constant", + "valueType": { + "$ref": "943" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" + }, + { + "$id": "3580", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "3297" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" + } + ] + }, + { + "$ref": "3518" + }, + { + "$ref": "3523" + }, + { + "$ref": "3535" + }, + { + "$ref": "3542" + }, + { + "$ref": "3546" + }, + { + "$ref": "3557" + }, + { + "$id": "3581", + "kind": "model", + "name": "CreateBatchRequest", + "crossLanguageDefinitionId": "createBatch.Request.anonymous", + "usage": "Spread,Json", + "decorators": [], + "properties": [ + { + "$id": "3582", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", + "type": { + "$id": "3583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" + }, + { + "$id": "3584", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", + "type": { + "$ref": "946" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" + }, + { + "$id": "3585", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", + "type": { + "$id": "3586", + "kind": "constant", + "valueType": { + "$ref": "952" + }, + "value": "24h", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" + }, + { + "$id": "3587", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Optional custom metadata for the batch.", + "type": { + "$id": "3588", + "kind": "nullable", + "type": { + "$id": "3589", + "kind": "dict", + "keyType": { + "$id": "3590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" + } + ] + }, + { + "$id": "3592", + "kind": "model", + "name": "Batch", + "crossLanguageDefinitionId": "OpenAI.Batch", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3593", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.id" + }, + { + "$id": "3595", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `batch`.", + "type": { + "$id": "3596", + "kind": "constant", + "valueType": { + "$ref": "955" + }, + "value": "batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.object" + }, + { + "$id": "3597", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The OpenAI API endpoint used by the batch.", + "type": { + "$id": "3598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" + }, + { + "$id": "3599", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "type": { + "$id": "3600", + "kind": "model", + "name": "BatchErrors", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3601", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `list`.", + "type": { + "$id": "3602", + "kind": "constant", + "valueType": { + "$ref": "958" + }, + "value": "list", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" + }, + { + "$id": "3603", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3604", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3605", + "kind": "model", + "name": "BatchErrorsDatum", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3606", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "An error code identifying the error type.", + "type": { + "$id": "3607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" + }, + { + "$id": "3608", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable message providing more details about the error.", + "type": { + "$id": "3609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" + }, + { + "$id": "3610", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The name of the parameter that caused the error, if applicable.", + "type": { + "$id": "3611", + "kind": "nullable", + "type": { + "$id": "3612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" + }, + { + "$id": "3613", + "kind": "property", + "name": "line", + "serializedName": "line", + "description": "The line number of the input file where the error occurred, if applicable.", + "type": { + "$id": "3614", + "kind": "nullable", + "type": { + "$id": "3615", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors" + }, + { + "$id": "3616", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of the input file for the batch.", + "type": { + "$id": "3617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" + }, + { + "$id": "3618", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed.", + "type": { + "$id": "3619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" + }, + { + "$id": "3620", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the batch.", + "type": { + "$ref": "961" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.status" + }, + { + "$id": "3621", + "kind": "property", + "name": "output_file_id", + "serializedName": "output_file_id", + "description": "The ID of the file containing the outputs of successfully executed requests.", + "type": { + "$id": "3622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" + }, + { + "$id": "3623", + "kind": "property", + "name": "error_file_id", + "serializedName": "error_file_id", + "description": "The ID of the file containing the outputs of requests with errors.", + "type": { + "$id": "3624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" + }, + { + "$id": "3625", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the batch was created.", + "type": { + "$id": "3626", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3627", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.created_at" + }, + { + "$id": "3628", + "kind": "property", + "name": "in_progress_at", + "serializedName": "in_progress_at", + "description": "The Unix timestamp (in seconds) for when the batch started processing.", + "type": { + "$id": "3629", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3630", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" + }, + { + "$id": "3631", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the batch will expire.", + "type": { + "$id": "3632", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3633", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" + }, + { + "$id": "3634", + "kind": "property", + "name": "finalizing_at", + "serializedName": "finalizing_at", + "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", + "type": { + "$id": "3635", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3636", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" + }, + { + "$id": "3637", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the batch was completed.", + "type": { + "$id": "3638", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3639", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" + }, + { + "$id": "3640", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the batch failed.", + "type": { + "$id": "3641", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3642", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" + }, + { + "$id": "3643", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the batch expired.", + "type": { + "$id": "3644", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3645", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" + }, + { + "$id": "3646", + "kind": "property", + "name": "cancelling_at", + "serializedName": "cancelling_at", + "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", + "type": { + "$id": "3647", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3648", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" + }, + { + "$id": "3649", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", + "type": { + "$id": "3650", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3651", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" + }, + { + "$id": "3652", + "kind": "property", + "name": "request_counts", + "serializedName": "request_counts", + "description": "The request counts for different statuses within the batch.", + "type": { + "$id": "3653", + "kind": "model", + "name": "BatchRequestCounts", + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3654", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "Total number of requests in the batch.", + "type": { + "$id": "3655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" + }, + { + "$id": "3656", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "Number of requests that have been completed successfully.", + "type": { + "$id": "3657", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" + }, + { + "$id": "3658", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "Number of requests that have failed.", + "type": { + "$id": "3659", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" + }, + { + "$id": "3660", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3661", + "kind": "nullable", + "type": { + "$id": "3662", + "kind": "dict", + "keyType": { + "$id": "3663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.metadata" + } + ] + }, + { + "$ref": "3600" + }, + { + "$ref": "3605" + }, + { + "$ref": "3653" + }, + { + "$id": "3665", + "kind": "model", + "name": "ListBatchesResponse", + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3666", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3667", + "kind": "array", + "name": "ArrayBatch", + "valueType": { + "$ref": "3592" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" + }, + { + "$id": "3668", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" + }, + { + "$id": "3670", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" + }, + { + "$id": "3672", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3673", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" + }, + { + "$id": "3674", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3675", + "kind": "constant", + "valueType": { + "$ref": "979" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" + } + ] + }, + { + "$id": "3676", + "kind": "model", + "name": "CreateAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3677", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "982" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" + }, + { + "$id": "3678", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3679", + "kind": "nullable", + "type": { + "$id": "3680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" + }, + { + "$id": "3681", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3682", + "kind": "nullable", + "type": { + "$id": "3683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" + }, + { + "$id": "3684", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3685", + "kind": "nullable", + "type": { + "$id": "3686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" + }, + { + "$id": "3687", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3688", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" + }, + { + "$id": "3689", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3690", + "kind": "nullable", + "type": { + "$id": "3691", + "kind": "model", + "name": "CreateAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3692", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3693", + "kind": "model", + "name": "CreateAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3694", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3695", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3697", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1594" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" + }, + { + "$id": "3698", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3699", + "kind": "nullable", + "type": { + "$id": "3700", + "kind": "dict", + "keyType": { + "$id": "3701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" + }, + { + "$id": "3703", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3704", + "kind": "nullable", + "type": { + "$id": "3705", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" + }, + { + "$id": "3706", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3707", + "kind": "nullable", + "type": { + "$id": "3708", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" + }, + { + "$id": "3709", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3710", + "kind": "nullable", + "type": { + "$id": "3711", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3712", + "kind": "constant", + "valueType": { + "$id": "3713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" + } + ] + }, + { + "$ref": "3691" + }, + { + "$ref": "3693" + }, + { + "$id": "3714", + "kind": "model", + "name": "AssistantObject", + "crossLanguageDefinitionId": "OpenAI.AssistantObject", + "usage": "Output,Json", + "description": "Represents an `assistant` that can call the model and use tools.", + "decorators": [], + "properties": [ + { + "$id": "3715", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "3716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" + }, + { + "$id": "3717", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `assistant`.", + "type": { + "$id": "3718", + "kind": "constant", + "valueType": { + "$ref": "1030" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" + }, + { + "$id": "3719", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the assistant was created.", + "type": { + "$id": "3720", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3721", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" + }, + { + "$id": "3722", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3723", + "kind": "nullable", + "type": { + "$id": "3724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" + }, + { + "$id": "3725", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3726", + "kind": "nullable", + "type": { + "$id": "3727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" + }, + { + "$id": "3728", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "3729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" + }, + { + "$id": "3730", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3731", + "kind": "nullable", + "type": { + "$id": "3732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" + }, + { + "$id": "3733", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3734", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" + }, + { + "$id": "3735", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3736", + "kind": "nullable", + "type": { + "$id": "3737", + "kind": "model", + "name": "AssistantObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3738", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3739", + "kind": "model", + "name": "AssistantObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3740", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3741", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3743", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" + }, + { + "$id": "3744", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3745", + "kind": "nullable", + "type": { + "$id": "3746", + "kind": "dict", + "keyType": { + "$id": "3747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" + }, + { + "$id": "3749", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3750", + "kind": "nullable", + "type": { + "$id": "3751", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" + }, + { + "$id": "3752", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3753", + "kind": "nullable", + "type": { + "$id": "3754", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" + }, + { + "$id": "3755", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3756", + "kind": "nullable", + "type": { + "$id": "3757", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3758", + "kind": "constant", + "valueType": { + "$id": "3759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" + } + ] + }, + { + "$ref": "3737" + }, + { + "$ref": "3739" + }, + { + "$id": "3760", + "kind": "model", + "name": "ListAssistantsResponse", + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3761", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3762", + "kind": "constant", + "valueType": { + "$ref": "1039" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" + }, + { + "$id": "3763", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3764", + "kind": "array", + "name": "ArrayAssistantObject", + "valueType": { + "$ref": "3714" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" + }, + { + "$id": "3765", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" + }, + { + "$id": "3767", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" + }, + { + "$id": "3769", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3770", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" + } + ] + }, + { + "$id": "3771", + "kind": "model", + "name": "ModifyAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3772", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "3773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" + }, + { + "$id": "3774", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3775", + "kind": "nullable", + "type": { + "$id": "3776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" + }, + { + "$id": "3777", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3778", + "kind": "nullable", + "type": { + "$id": "3779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" + }, + { + "$id": "3780", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3781", + "kind": "nullable", + "type": { + "$id": "3782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" + }, + { + "$id": "3783", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3784", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" + }, + { + "$id": "3785", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3786", + "kind": "nullable", + "type": { + "$id": "3787", + "kind": "model", + "name": "ModifyAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3788", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3789", + "kind": "model", + "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3790", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3791", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3793", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" + }, + { + "$id": "3794", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3795", + "kind": "nullable", + "type": { + "$id": "3796", + "kind": "dict", + "keyType": { + "$id": "3797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" + }, + { + "$id": "3799", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3800", + "kind": "nullable", + "type": { + "$id": "3801", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" + }, + { + "$id": "3802", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3803", + "kind": "nullable", + "type": { + "$id": "3804", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" + }, + { + "$id": "3805", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3806", + "kind": "nullable", + "type": { + "$id": "3807", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3808", + "kind": "constant", + "valueType": { + "$id": "3809", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" + } + ] + }, + { + "$ref": "3787" + }, + { + "$ref": "3789" + }, + { + "$id": "3810", + "kind": "model", + "name": "DeleteAssistantResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3811", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" + }, + { + "$id": "3813", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "3814", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" + }, + { + "$id": "3815", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3816", + "kind": "constant", + "valueType": { + "$ref": "1042" + }, + "value": "assistant.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" + } + ] + }, + { + "$id": "3817", + "kind": "model", + "name": "CreateSpeechRequest", + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3818", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", + "type": { + "$ref": "1045" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" + }, + { + "$id": "3819", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The text to generate audio for. The maximum length is 4096 characters.", + "type": { + "$id": "3820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" + }, + { + "$id": "3821", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", + "type": { + "$ref": "1051" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" + }, + { + "$id": "3822", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", + "type": { + "$ref": "1065" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" + }, + { + "$id": "3823", + "kind": "property", + "name": "speed", + "serializedName": "speed", + "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", + "type": { + "$id": "3824", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" + } + ] + }, + { + "$id": "3825", + "kind": "model", + "name": "CreateTranscriptionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3826", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3827", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" + }, + { + "$id": "3828", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "1079" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" + }, + { + "$id": "3829", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", + "type": { + "$id": "3830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" + }, + { + "$id": "3831", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", + "type": { + "$id": "3832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" + }, + { + "$id": "3833", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "1083" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" + }, + { + "$id": "3834", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3835", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" + }, + { + "$id": "3836", + "kind": "property", + "name": "timestamp_granularities", + "serializedName": "timestamp_granularities", + "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", + "type": { + "$id": "3837", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "1095" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" + } + ] + }, + { + "$id": "3838", + "kind": "model", + "name": "CreateTranscriptionResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", + "usage": "Output,Json", + "description": "Represents a verbose json transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3839", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3840", + "kind": "constant", + "valueType": { + "$ref": "1101" + }, + "value": "transcribe", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" + }, + { + "$id": "3841", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio.", + "type": { + "$id": "3842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" + }, + { + "$id": "3843", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3844", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3845", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" + }, + { + "$id": "3846", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" + }, + { + "$id": "3848", + "kind": "property", + "name": "words", + "serializedName": "words", + "description": "Extracted words and their corresponding timestamps.", + "type": { + "$id": "3849", + "kind": "array", + "name": "ArrayTranscriptionWord", + "valueType": { + "$id": "3850", + "kind": "model", + "name": "TranscriptionWord", + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3851", + "kind": "property", + "name": "word", + "serializedName": "word", + "description": "The text content of the word.", + "type": { + "$id": "3852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" + }, + { + "$id": "3853", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the word in seconds.", + "type": { + "$id": "3854", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3855", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" + }, + { + "$id": "3856", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the word in seconds.", + "type": { + "$id": "3857", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3858", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" + }, + { + "$id": "3859", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the transcribed text and their corresponding details.", + "type": { + "$id": "3860", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$id": "3861", + "kind": "model", + "name": "TranscriptionSegment", + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3862", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Unique identifier of the segment.", + "type": { + "$id": "3863", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" + }, + { + "$id": "3864", + "kind": "property", + "name": "seek", + "serializedName": "seek", + "description": "Seek offset of the segment.", + "type": { + "$id": "3865", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" + }, + { + "$id": "3866", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the segment in seconds.", + "type": { + "$id": "3867", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3868", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" + }, + { + "$id": "3869", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the segment in seconds.", + "type": { + "$id": "3870", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3871", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" + }, + { + "$id": "3872", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content of the segment.", + "type": { + "$id": "3873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" + }, + { + "$id": "3874", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "description": "Array of token IDs for the text content.", + "type": { + "$id": "3875", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3876", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" + }, + { + "$id": "3877", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "Temperature parameter used for generating the segment.", + "type": { + "$id": "3878", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" + }, + { + "$id": "3879", + "kind": "property", + "name": "avg_logprob", + "serializedName": "avg_logprob", + "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", + "type": { + "$id": "3880", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" + }, + { + "$id": "3881", + "kind": "property", + "name": "compression_ratio", + "serializedName": "compression_ratio", + "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", + "type": { + "$id": "3882", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" + }, + { + "$id": "3883", + "kind": "property", + "name": "no_speech_prob", + "serializedName": "no_speech_prob", + "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", + "type": { + "$id": "3884", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" + } + ] + }, + { + "$ref": "3850" + }, + { + "$ref": "3861" + }, + { + "$id": "3885", + "kind": "model", + "name": "CreateTranscriptionResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", + "usage": "Output,Json", + "description": "Represents a transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3886", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" + } + ] + }, + { + "$id": "3888", + "kind": "model", + "name": "CreateTranslationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3889", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3890", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" + }, + { + "$id": "3891", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "1104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" + }, + { + "$id": "3892", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", + "type": { + "$id": "3893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" + }, + { + "$id": "3894", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "1108" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" + }, + { + "$id": "3895", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3896", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" + } + ] + }, + { + "$id": "3897", + "kind": "model", + "name": "CreateTranslationResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3898", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3899", + "kind": "constant", + "valueType": { + "$ref": "1120" + }, + "value": "translate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" + }, + { + "$id": "3900", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the output translation (always `english`).", + "type": { + "$id": "3901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" + }, + { + "$id": "3902", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3903", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3904", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" + }, + { + "$id": "3905", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The translated text.", + "type": { + "$id": "3906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" + }, + { + "$id": "3907", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the translated text and their corresponding details.", + "type": { + "$id": "3908", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$ref": "3861" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" + } + ] + }, + { + "$id": "3909", + "kind": "model", + "name": "CreateTranslationResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3910", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" + } + ] + }, + { + "$id": "3912", + "kind": "model", + "name": "AssistantResponseFormat", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", + "access": "public", + "usage": "Input", + "decorators": [], + "discriminatorProperty": { + "$id": "3913", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" + }, + "properties": [ + { + "$ref": "3913" + } + ], + "discriminatedSubtypes": { + "$id": "3915", + "text": { + "$id": "3916", + "kind": "model", + "name": "AssistantResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", + "usage": "Input", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3917", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "3918", + "kind": "constant", + "valueType": { + "$id": "3919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "3920", + "kind": "model", + "name": "AssistantResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", + "usage": "Input", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3921", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "3922", + "kind": "constant", + "valueType": { + "$id": "3923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "3924", + "kind": "model", + "name": "AssistantResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", + "usage": "Input", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3925", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "3926", + "kind": "constant", + "valueType": { + "$id": "3927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" + }, + { + "$id": "3928", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + { + "$ref": "3916" + }, + { + "$ref": "3920" + }, + { + "$ref": "3924" + }, + { + "$id": "3929", + "kind": "model", + "name": "BatchRequestInput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line object of the batch input file", + "decorators": [], + "properties": [ + { + "$id": "3930", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", + "type": { + "$id": "3931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" + }, + { + "$id": "3932", + "kind": "property", + "name": "method", + "serializedName": "method", + "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", + "type": { + "$id": "3933", + "kind": "constant", + "valueType": { + "$ref": "1123" + }, + "value": "POST", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" + }, + { + "$id": "3934", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", + "type": { + "$id": "3935", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" + } + ] + }, + { + "$id": "3936", + "kind": "model", + "name": "BatchRequestOutput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", + "access": "public", + "usage": "Output", + "description": "The per-line object of the batch output and error files", + "decorators": [], + "properties": [ + { + "$id": "3937", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" + }, + { + "$id": "3939", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs.", + "type": { + "$id": "3940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" + }, + { + "$id": "3941", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "3942", + "kind": "nullable", + "type": { + "$id": "3943", + "kind": "model", + "name": "BatchRequestOutputResponse", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3944", + "kind": "property", + "name": "status_code", + "serializedName": "status_code", + "description": "The HTTP status code of the response", + "type": { + "$id": "3945", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" + }, + { + "$id": "3946", + "kind": "property", + "name": "request_id", + "serializedName": "request_id", + "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", + "type": { + "$id": "3947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" + }, + { + "$id": "3948", + "kind": "property", + "name": "body", + "serializedName": "body", + "description": "The JSON body of the response", + "type": { + "$id": "3949", + "kind": "dict", + "keyType": { + "$id": "3950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3951", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" + }, + { + "$id": "3952", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", + "type": { + "$id": "3953", + "kind": "nullable", + "type": { + "$id": "3954", + "kind": "model", + "name": "BatchRequestOutputError", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3955", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "3956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" + }, + { + "$id": "3957", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "3958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" + } + ] + }, + { + "$ref": "3943" + }, + { + "$ref": "3954" + }, + { + "$id": "3959", + "kind": "model", + "name": "ChatCompletionFunctionChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3960", + "kind": "model", + "name": "ChatCompletionToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3961", + "kind": "model", + "name": "ChatMessageContent", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3962", + "kind": "model", + "name": "ChatMessageContentPart", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3963", + "kind": "model", + "name": "CreateChatCompletionFunctionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", + "access": "public", + "usage": "Output", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3964", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "3965", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" + }, + { + "$id": "3966", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "3967", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3968", + "kind": "model", + "name": "CreateChatCompletionFunctionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3969", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", + "type": { + "$ref": "1126" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3970", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3971", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" + }, + { + "$id": "3972", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$ref": "3523" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" + }, + { + "$id": "3973", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "3974", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3975", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" + }, + { + "$id": "3976", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "3977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" + }, + { + "$id": "3978", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" + }, + { + "$id": "3980", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "3981", + "kind": "constant", + "valueType": { + "$ref": "1136" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" + }, + { + "$id": "3982", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "3297" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" + } + ] + }, + { + "$ref": "3968" + }, + { + "$id": "3983", + "kind": "model", + "name": "ChatCompletionStreamResponseDelta", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", + "usage": "Output", + "description": "A chat completion delta generated by streamed model responses.", + "decorators": [], + "properties": [ + { + "$id": "3984", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the chunk message.", + "type": { + "$id": "3985", + "kind": "nullable", + "type": { + "$id": "3986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" + }, + { + "$id": "3987", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3988", + "kind": "model", + "name": "ChatCompletionStreamResponseDeltaFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3989", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" + }, + { + "$id": "3991", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" + }, + { + "$id": "3993", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3994", + "kind": "array", + "name": "ArrayChatCompletionMessageToolCallChunk", + "valueType": { + "$id": "3995", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunk", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3996", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "3997", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" + }, + { + "$id": "3998", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" + }, + { + "$id": "4000", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "4001", + "kind": "constant", + "valueType": { + "$ref": "1139" + }, + "value": "function", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" + }, + { + "$id": "4002", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "4003", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunkFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4004", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "4005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" + }, + { + "$id": "4006", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "4007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" + }, + { + "$id": "4008", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$ref": "1142" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" + }, + { + "$id": "4009", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "4010", + "kind": "nullable", + "type": { + "$id": "4011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" + } + ] + }, + { + "$ref": "3988" + }, + { + "$ref": "3995" + }, + { + "$ref": "4003" + }, + { + "$id": "4012", + "kind": "model", + "name": "CreateChatCompletionStreamResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", + "access": "public", + "usage": "Output", + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "4013", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion. Each chunk has the same ID.", + "type": { + "$id": "4014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" + }, + { + "$id": "4015", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", + "type": { + "$id": "4016", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "4017", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4018", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$ref": "3983" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" + }, + { + "$id": "4019", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "4020", + "kind": "nullable", + "type": { + "$id": "4021", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4022", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "4023", + "kind": "nullable", + "type": { + "$id": "4024", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "4025", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "4026", + "kind": "nullable", + "type": { + "$id": "4027", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" + }, + { + "$id": "4028", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$id": "4029", + "kind": "nullable", + "type": { + "$ref": "1152" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" + }, + { + "$id": "4030", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "4031", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" + }, + { + "$id": "4032", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", + "type": { + "$id": "4033", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "4034", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" + }, + { + "$id": "4035", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to generate the completion.", + "type": { + "$id": "4036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" + }, + { + "$id": "4037", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "4038", + "kind": "nullable", + "type": { + "$ref": "1164" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" + }, + { + "$id": "4039", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "4040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" + }, + { + "$id": "4041", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion.chunk`.", + "type": { + "$id": "4042", + "kind": "constant", + "valueType": { + "$ref": "1170" + }, + "value": "chat.completion.chunk", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" + }, + { + "$id": "4043", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", + "type": { + "$id": "4044", + "kind": "model", + "name": "CreateChatCompletionStreamResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4045", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "4046", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" + }, + { + "$id": "4047", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "4048", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "4049", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "4050", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" + } + ] + }, + { + "$ref": "4017" + }, + { + "$ref": "4021" + }, + { + "$ref": "4044" + }, + { + "$id": "4051", + "kind": "model", + "name": "FinetuneChatRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for chat models", + "decorators": [], + "properties": [ + { + "$id": "4052", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "type": { + "$id": "4053", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "4054", + "kind": "union", + "name": "FinetuneChatRequestInputMessage", + "variantTypes": [ + { + "$ref": "3315" + }, + { + "$ref": "3331" + }, + { + "$id": "4055", + "kind": "model", + "name": "FineTuneChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", + "usage": "Input", + "decorators": [], + "baseModel": { + "$ref": "3350" + }, + "properties": [] + }, + { + "$ref": "3390" + }, + { + "$ref": "3401" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" + }, + { + "$id": "4056", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may generate JSON inputs for.", + "type": { + "$id": "4057", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$ref": "3479" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" + }, + { + "$id": "4058", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "4059", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" + }, + { + "$id": "4060", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "A list of functions the model may generate JSON inputs for.", + "type": { + "$id": "4061", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$ref": "3507" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" + } + ] + }, + { + "$ref": "4055" + }, + { + "$id": "4062", + "kind": "model", + "name": "FinetuneCompletionRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for completions models", + "decorators": [], + "properties": [ + { + "$id": "4063", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The input prompt for this training example.", + "type": { + "$id": "4064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" + }, + { + "$id": "4065", + "kind": "property", + "name": "completion", + "serializedName": "completion", + "description": "The desired completion for this training example.", + "type": { + "$id": "4066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" + } + ] + }, + { + "$id": "4067", + "kind": "model", + "name": "MessageContentTextObjectAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4068", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" + }, + "properties": [ + { + "$ref": "4068" + } + ], + "discriminatedSubtypes": { + "$id": "4070", + "file_citation": { + "$id": "4071", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Input,Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "4067" + }, + "properties": [ + { + "$id": "4072", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "4073", + "kind": "constant", + "valueType": { + "$id": "4074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "4075", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "4077", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "4078", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4079", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "4080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "4081", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4082", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "4083", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4084", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "4085", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Input,Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "4067" + }, + "properties": [ + { + "$id": "4086", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "4087", + "kind": "constant", + "valueType": { + "$id": "4088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "4089", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "4091", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "4092", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4093", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "4094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "4095", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4096", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "4097", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4098", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + { + "$ref": "4071" + }, + { + "$ref": "4078" + }, + { + "$ref": "4085" + }, + { + "$ref": "4092" + }, + { + "$id": "4099", + "kind": "model", + "name": "MessageDeltaContent", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", + "access": "public", + "usage": "Output", + "description": "Represents a single piece of incremental content in an Assistants API streaming response.", + "decorators": [], + "discriminatorProperty": { + "$id": "4100", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" + }, + "properties": [ + { + "$ref": "4100" + } + ], + "discriminatedSubtypes": { + "$id": "4102", + "image_file": { + "$id": "4103", + "kind": "model", + "name": "MessageDeltaContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", + "access": "public", + "usage": "Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "discriminatorValue": "image_file", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4104", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4105", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" + }, + { + "$id": "4106", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "4107", + "kind": "constant", + "valueType": { + "$id": "4108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" + }, + { + "$id": "4109", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "4110", + "kind": "model", + "name": "MessageDeltaContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4111", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "4112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "4113", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1173" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" + } + ] + }, + "image_url": { + "$id": "4114", + "kind": "model", + "name": "MessageDeltaContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", + "access": "public", + "usage": "Output", + "description": "References an image URL in the content of a message.", + "discriminatorValue": "image_url", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4115", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4116", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" + }, + { + "$id": "4117", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_url`.", + "type": { + "$id": "4118", + "kind": "constant", + "valueType": { + "$id": "4119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" + }, + { + "$id": "4120", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "4121", + "kind": "model", + "name": "MessageDeltaContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4122", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "4123", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "4124", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1181" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" + } + ] + }, + "text": { + "$id": "4125", + "kind": "model", + "name": "MessageDeltaContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", + "access": "public", + "usage": "Output", + "description": "The text content that is part of a message.", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4126", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4127", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" + }, + { + "$id": "4128", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4129", + "kind": "constant", + "valueType": { + "$id": "4130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" + }, + { + "$id": "4131", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "4132", + "kind": "model", + "name": "MessageDeltaContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4133", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "4134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" + }, + { + "$id": "4135", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "4136", + "kind": "array", + "name": "ArrayMessageDeltaTextContentAnnotation", + "valueType": { + "$id": "4137", + "kind": "model", + "name": "MessageDeltaTextContentAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", + "access": "public", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4138", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" + }, + "properties": [ + { + "$ref": "4138" + } + ], + "discriminatedSubtypes": { + "$id": "4140", + "file_citation": { + "$id": "4141", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "4137" + }, + "properties": [ + { + "$id": "4142", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "4143", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" + }, + { + "$id": "4144", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "4145", + "kind": "constant", + "valueType": { + "$id": "4146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "4147", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "4149", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "4150", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4151", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "4152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + }, + { + "$id": "4153", + "kind": "property", + "name": "quote", + "serializedName": "quote", + "description": "The specific quote in the file.", + "type": { + "$id": "4154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "4155", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4156", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "4157", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4158", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "4159", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "4137" + }, + "properties": [ + { + "$id": "4160", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "4161", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" + }, + { + "$id": "4162", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "4163", + "kind": "constant", + "valueType": { + "$id": "4164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "4165", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "4167", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "4168", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4169", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "4170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "4171", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4172", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "4173", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4174", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" + } + ] + }, + "refusal": { + "$id": "4175", + "kind": "model", + "name": "MessageDeltaContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", + "usage": "Output", + "description": "The refusal content that is part of a message.", + "discriminatorValue": "refusal", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4176", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the refusal part in the message.", + "type": { + "$id": "4177", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" + }, + { + "$id": "4178", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "4179", + "kind": "constant", + "valueType": { + "$id": "4180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" + }, + { + "$id": "4181", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "4182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" + } + ] + } + } + }, + { + "$ref": "4103" + }, + { + "$ref": "4110" + }, + { + "$ref": "4114" + }, + { + "$ref": "4121" + }, + { + "$ref": "4125" + }, + { + "$ref": "4132" + }, + { + "$ref": "4137" + }, + { + "$ref": "4141" + }, + { + "$ref": "4150" + }, + { + "$ref": "4159" + }, + { + "$ref": "4168" + }, + { + "$ref": "4175" + }, + { + "$id": "4183", + "kind": "model", + "name": "MessageContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4184", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "4185", + "kind": "constant", + "valueType": { + "$ref": "1189" + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" + }, + { + "$id": "4186", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "4187", + "kind": "model", + "name": "MessageContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4188", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "4189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "4190", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1192" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" + } + ] + }, + { + "$ref": "4187" + }, + { + "$id": "4191", + "kind": "model", + "name": "MessageContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4192", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4193", + "kind": "constant", + "valueType": { + "$ref": "1200" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" + }, + { + "$id": "4194", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "4195", + "kind": "model", + "name": "MessageContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4196", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "4197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" + }, + { + "$id": "4198", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "4199", + "kind": "array", + "name": "ArrayMessageContentTextObjectAnnotation", + "valueType": { + "$ref": "4067" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" + } + ] + }, + { + "$ref": "4195" + }, + { + "$id": "4200", + "kind": "model", + "name": "MessageContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", + "access": "public", + "usage": "Input,Output", + "description": "The refusal content generated by the assistant.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4201", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "4202", + "kind": "constant", + "valueType": { + "$ref": "1203" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" + }, + { + "$id": "4203", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "4204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" + } + ] + }, + { + "$id": "4205", + "kind": "model", + "name": "MessageContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image URL in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4206", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "4207", + "kind": "constant", + "valueType": { + "$ref": "1206" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" + }, + { + "$id": "4208", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "4209", + "kind": "model", + "name": "MessageContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4210", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "4211", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "4212", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", + "type": { + "$ref": "1209" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" + } + ] + }, + { + "$ref": "4209" + }, + { + "$id": "4213", + "kind": "model", + "name": "MessageDeltaObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a message delta i.e. any changed fields on a message during streaming.", + "decorators": [], + "properties": [ + { + "$id": "4214", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the message, which can be referenced in API endpoints.", + "type": { + "$id": "4215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" + }, + { + "$id": "4216", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message.delta`.", + "type": { + "$id": "4217", + "kind": "constant", + "valueType": { + "$ref": "1217" + }, + "value": "thread.message.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" + }, + { + "$id": "4218", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the Message.", + "type": { + "$id": "4219", + "kind": "model", + "name": "MessageDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4220", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "1220" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" + }, + { + "$id": "4221", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "4222", + "kind": "array", + "name": "ArrayMessageDeltaContent", + "valueType": { + "$ref": "4099" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" + } + ] + }, + { + "$ref": "4219" + }, + { + "$id": "4223", + "kind": "model", + "name": "MessageRequestContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4224", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4225", + "kind": "constant", + "valueType": { + "$ref": "1226" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" + }, + { + "$id": "4226", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content to be sent to the model", + "type": { + "$id": "4227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" + } + ] + }, + { + "$id": "4228", + "kind": "model", + "name": "RunStepDeltaStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4229", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" + }, + "properties": [ + { + "$ref": "4229" + } + ], + "discriminatedSubtypes": { + "$id": "4231", + "message_creation": { + "$id": "4232", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", + "access": "public", + "usage": "Output", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "4228" + }, + "properties": [ + { + "$id": "4233", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "4234", + "kind": "constant", + "valueType": { + "$id": "4235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" + }, + { + "$id": "4236", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "4237", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4238", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "4239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "4240", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", + "access": "public", + "usage": "Output", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "4228" + }, + "properties": [ + { + "$id": "4241", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "4242", + "kind": "constant", + "valueType": { + "$id": "4243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" + }, + { + "$id": "4244", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "4245", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "4246", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "4247", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "4247" + } + ], + "discriminatedSubtypes": { + "$id": "4249", + "code_interpreter": { + "$id": "4250", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", + "access": "public", + "usage": "Output", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4251", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" + }, + { + "$id": "4253", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "4254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "4255", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "4256", + "kind": "constant", + "valueType": { + "$id": "4257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "4258", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "4259", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4260", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "4261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "4262", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "4263", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "4264", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "4265", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "4265" + } + ], + "discriminatedSubtypes": { + "$id": "4267", + "logs": { + "$id": "4268", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "access": "public", + "usage": "Output", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "4264" + }, + "properties": [ + { + "$id": "4269", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "4270", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" + }, + { + "$id": "4271", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "4272", + "kind": "constant", + "valueType": { + "$id": "4273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "4274", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "4275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "4276", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "4264" + }, + "properties": [ + { + "$id": "4277", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "4278", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" + }, + { + "$id": "4279", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "4280", + "kind": "constant", + "valueType": { + "$id": "4281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "4282", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "4283", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4284", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "4285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "4286", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4287", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4288", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" + }, + { + "$id": "4289", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "4290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "4291", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "4292", + "kind": "constant", + "valueType": { + "$id": "4293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "4294", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "4295", + "kind": "dict", + "keyType": { + "$id": "4296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "4297", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "4298", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4299", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4300", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" + }, + { + "$id": "4301", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "4302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "4303", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "4304", + "kind": "constant", + "valueType": { + "$id": "4305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "4306", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "4307", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4308", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "4309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "4310", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "4311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "4312", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "4313", + "kind": "nullable", + "type": { + "$id": "4314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + { + "$ref": "4232" + }, + { + "$ref": "4237" + }, + { + "$ref": "4240" + }, + { + "$ref": "4246" + }, + { + "$ref": "4250" + }, + { + "$ref": "4259" + }, + { + "$ref": "4264" + }, + { + "$ref": "4268" + }, + { + "$ref": "4276" + }, + { + "$ref": "4283" + }, + { + "$ref": "4286" + }, + { + "$ref": "4298" + }, + { + "$ref": "4307" + }, + { + "$id": "4315", + "kind": "model", + "name": "RunStepDeltaObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", + "decorators": [], + "properties": [ + { + "$id": "4316", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "4317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" + }, + { + "$id": "4318", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step.delta`.", + "type": { + "$id": "4319", + "kind": "constant", + "valueType": { + "$ref": "1229" + }, + "value": "thread.run.step.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" + }, + { + "$id": "4320", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the run step.", + "type": { + "$id": "4321", + "kind": "model", + "name": "RunStepDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4322", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$ref": "4228" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" + } + ] + }, + { + "$ref": "4321" + }, + { + "$id": "4323", + "kind": "model", + "name": "CreateThreadRequestToolResourcesFileSearchBase", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "4324", + "kind": "model", + "name": "ListThreadsResponse", + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", + "access": "public", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4325", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "4326", + "kind": "constant", + "valueType": { + "$ref": "1232" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" + }, + { + "$id": "4327", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "4328", + "kind": "array", + "name": "ArrayThreadObject", + "valueType": { + "$ref": "2052" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" + }, + { + "$id": "4329", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "4330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" + }, + { + "$id": "4331", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "4332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" + }, + { + "$id": "4333", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "4334", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" + } + ] + } + ], + "Clients": [ + { + "$id": "4335", + "Name": "OpenAIClient", + "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", + "Operations": [], + "Protocol": { + "$id": "4336" + }, + "Parameters": [ + { + "$id": "4337", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4338", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4339", + "Type": { + "$id": "4340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + } + ], + "Decorators": [] + }, + { + "$id": "4341", + "Name": "Audio", + "Operations": [ + { + "$id": "4342", + "Name": "createSpeech", + "ResourceName": "Audio", + "Summary": "Generates audio from the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4343", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4344", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4345", + "Type": { + "$id": "4346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4347", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4348", + "kind": "constant", + "valueType": { + "$id": "4349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4350", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4351", + "kind": "constant", + "valueType": { + "$id": "4352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4353", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3817" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4354", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4355", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4356", + "Name": "transferEncoding", + "NameInResponse": "Transfer-Encoding", + "Description": "chunked", + "Type": { + "$id": "4357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4358", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4359", + "kind": "constant", + "valueType": { + "$id": "4360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/octet-stream" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/speech", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", + "Decorators": [] + }, + { + "$id": "4361", + "Name": "createTranscription", + "ResourceName": "Audio", + "Summary": "Transcribes audio into the input language.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4343" + }, + { + "$id": "4362", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4363", + "kind": "constant", + "valueType": { + "$id": "4364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4365", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4366", + "kind": "constant", + "valueType": { + "$id": "4367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4368", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3825" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4369", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4371", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4372", + "kind": "constant", + "valueType": { + "$id": "4373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/transcriptions", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", + "Decorators": [] + }, + { + "$id": "4374", + "Name": "createTranslation", + "ResourceName": "Audio", + "Summary": "Translates audio into English..", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4343" + }, + { + "$id": "4375", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4376", + "kind": "constant", + "valueType": { + "$id": "4377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4378", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4379", + "kind": "constant", + "valueType": { + "$id": "4380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4381", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3888" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4382", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4384", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4385", + "kind": "constant", + "valueType": { + "$id": "4386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/translations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4387" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4343" + } + ], + "Decorators": [] + }, + { + "$id": "4388", + "Name": "Assistants", + "Operations": [ + { + "$id": "4389", + "Name": "createAssistant", + "ResourceName": "Assistants", + "Summary": "Create an assistant with a model and instructions.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4390", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4391", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4392", + "Type": { + "$id": "4393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4394", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4395", + "kind": "constant", + "valueType": { + "$id": "4396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4397", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4398", + "kind": "constant", + "valueType": { + "$id": "4399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4400", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3676" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4401", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", + "Decorators": [] + }, + { + "$id": "4402", + "Name": "listAssistants", + "ResourceName": "Assistants", + "Summary": "Returns a list of assistants.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4403", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4404", + "kind": "constant", + "valueType": { + "$id": "4405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4406", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4407", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4408", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "1033" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4409", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4411", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4413", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3760" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", + "Decorators": [] + }, + { + "$id": "4414", + "Name": "getAssistant", + "ResourceName": "Assistants", + "Summary": "Retrieves an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4415", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4416", + "kind": "constant", + "valueType": { + "$id": "4417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4418", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to retrieve.", + "Type": { + "$id": "4419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4420", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", + "Decorators": [] + }, + { + "$id": "4421", + "Name": "modifyAssistant", + "ResourceName": "Assistants", + "Summary": "Modifies an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4422", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4423", + "kind": "constant", + "valueType": { + "$id": "4424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4425", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to modify.", + "Type": { + "$id": "4426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4427", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4428", + "kind": "constant", + "valueType": { + "$id": "4429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4430", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3771" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4431", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", + "Decorators": [] + }, + { + "$id": "4432", + "Name": "deleteAssistant", + "ResourceName": "Assistants", + "Summary": "Delete an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4433", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4434", + "kind": "constant", + "valueType": { + "$id": "4435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4436", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to delete.", + "Type": { + "$id": "4437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4438", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3810" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4439" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4390" + } + ], + "Decorators": [] + }, + { + "$id": "4440", + "Name": "Batches", + "Operations": [ + { + "$id": "4441", + "Name": "createBatch", + "ResourceName": "Batches", + "Summary": "Creates and executes a batch from an uploaded file of requests", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4442", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4443", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4444", + "Type": { + "$id": "4445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4446", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4447", + "kind": "constant", + "valueType": { + "$id": "4448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4449", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4450", + "kind": "constant", + "valueType": { + "$id": "4451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4452", + "Name": "createBatchRequest", + "NameInRequest": "createBatchRequest", + "Type": { + "$ref": "3581" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Spread", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4453", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", + "Decorators": [] + }, + { + "$id": "4454", + "Name": "listBatches", + "ResourceName": "Batches", + "Summary": "List your organization's batches.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4455", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4456", + "kind": "constant", + "valueType": { + "$id": "4457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4458", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4460", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4461", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4462", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3665" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", + "Decorators": [] + }, + { + "$id": "4463", + "Name": "retrieveBatch", + "ResourceName": "Batches", + "Summary": "Retrieves a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4464", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4465", + "kind": "constant", + "valueType": { + "$id": "4466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4467", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to retrieve.", + "Type": { + "$id": "4468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4469", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", + "Decorators": [] + }, + { + "$id": "4470", + "Name": "cancelBatch", + "ResourceName": "Batches", + "Summary": "Cancels an in-progress batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4471", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4472", + "kind": "constant", + "valueType": { + "$id": "4473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4474", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to cancel.", + "Type": { + "$id": "4475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4476", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4477" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4442" + } + ], + "Decorators": [] + }, + { + "$id": "4478", + "Name": "Chat", + "Operations": [ + { + "$id": "4479", + "Name": "createChatCompletion", + "ResourceName": "Chat", + "Summary": "Creates a model response for the given chat conversation.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4480", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4481", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4482", + "Type": { + "$id": "4483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4484", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4485", + "kind": "constant", + "valueType": { + "$id": "4486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4487", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4488", + "kind": "constant", + "valueType": { + "$id": "4489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4490", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3308" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4491", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3513" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/chat/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4492" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4480" + } + ], + "Decorators": [] + }, + { + "$id": "4493", + "Name": "Completions", + "Operations": [ + { + "$id": "4494", + "Name": "createCompletion", + "ResourceName": "Completions", + "Summary": "Creates a completion for the provided prompt and parameters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4495", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4496", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4497", + "Type": { + "$id": "4498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4499", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4500", + "kind": "constant", + "valueType": { + "$id": "4501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4502", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4503", + "kind": "constant", + "valueType": { + "$id": "4504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4505", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3192" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4506", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3259" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4507" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4495" + } + ], + "Decorators": [] + }, + { + "$id": "4508", + "Name": "Embeddings", + "Operations": [ + { + "$id": "4509", + "Name": "createEmbedding", + "ResourceName": "Embeddings", + "Summary": "Creates an embedding vector representing the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4510", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4511", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4512", + "Type": { + "$id": "4513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4514", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4515", + "kind": "constant", + "valueType": { + "$id": "4516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4517", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4518", + "kind": "constant", + "valueType": { + "$id": "4519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4520", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3152" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4521", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3169" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/embeddings", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4522" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4510" + } + ], + "Decorators": [] + }, + { + "$id": "4523", + "Name": "Files", + "Operations": [ + { + "$id": "4524", + "Name": "createFile", + "ResourceName": "Files", + "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4525", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4526", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4527", + "Type": { + "$id": "4528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4529", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4530", + "kind": "constant", + "valueType": { + "$id": "4531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4532", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4533", + "kind": "constant", + "valueType": { + "$id": "4534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4535", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3136" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4536", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1275" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/files", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.createFile", + "Decorators": [] + }, + { + "$id": "4537", + "Name": "listFiles", + "ResourceName": "Files", + "Summary": "Returns a list of files that belong to the user's organization.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4538", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4539", + "kind": "constant", + "valueType": { + "$id": "4540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4541", + "Name": "purpose", + "NameInRequest": "purpose", + "Description": "Only return files with the given purpose.", + "Type": { + "$id": "4542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4543", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3140" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", + "Decorators": [] + }, + { + "$id": "4544", + "Name": "retrieveFile", + "ResourceName": "Files", + "Summary": "Returns information about a specific file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4545", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4546", + "kind": "constant", + "valueType": { + "$id": "4547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4548", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4550", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1275" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", + "Decorators": [] + }, + { + "$id": "4551", + "Name": "deleteFile", + "ResourceName": "Files", + "Summary": "Delete a file", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4552", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4553", + "kind": "constant", + "valueType": { + "$id": "4554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4555", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4557", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3145" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", + "Decorators": [] + }, + { + "$id": "4558", + "Name": "downloadFile", + "ResourceName": "Files", + "Summary": "Returns the contents of the specified file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4559", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4560", + "kind": "constant", + "valueType": { + "$id": "4561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4562", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4564", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4565", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}/content", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4566" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4525" + } + ], + "Decorators": [] + }, + { + "$id": "4567", + "Name": "FineTuning", + "Operations": [ + { + "$id": "4568", + "Name": "createFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4569", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4570", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4571", + "Type": { + "$id": "4572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4573", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4574", + "kind": "constant", + "valueType": { + "$id": "4575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4576", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4577", + "kind": "constant", + "valueType": { + "$id": "4578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4579", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2935" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4580", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", + "Decorators": [] + }, + { + "$id": "4581", + "Name": "listPaginatedFineTuningJobs", + "ResourceName": "FineTuning", + "Summary": "List your organization's fine-tuning jobs", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4582", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4583", + "kind": "constant", + "valueType": { + "$id": "4584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4585", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last job from the previous pagination request.", + "Type": { + "$id": "4586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4587", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of fine-tuning jobs to retrieve.", + "Type": { + "$id": "4588", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4589", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3068" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", + "Decorators": [] + }, + { + "$id": "4590", + "Name": "retrieveFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4591", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4592", + "kind": "constant", + "valueType": { + "$id": "4593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4594", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job.", + "Type": { + "$id": "4595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4596", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", + "Decorators": [] + }, + { + "$id": "4597", + "Name": "cancelFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Immediately cancel a fine-tune job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4598", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4599", + "kind": "constant", + "valueType": { + "$id": "4600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4601", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to cancel.", + "Type": { + "$id": "4602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4603", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", + "Decorators": [] + }, + { + "$id": "4604", + "Name": "listFineTuningJobCheckpoints", + "ResourceName": "FineTuning", + "Summary": "List the checkpoints for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4605", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4606", + "kind": "constant", + "valueType": { + "$id": "4607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4608", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get checkpoints for.", + "Type": { + "$id": "4609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4610", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last checkpoint ID from the previous pagination request.", + "Type": { + "$id": "4611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4612", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of checkpoints to retrieve.", + "Type": { + "$id": "4613", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4614", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3075" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", + "Decorators": [] + }, + { + "$id": "4615", + "Name": "listFineTuningEvents", + "ResourceName": "FineTuning", + "Summary": "Get status updates for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4616", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4617", + "kind": "constant", + "valueType": { + "$id": "4618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4619", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get events for.", + "Type": { + "$id": "4620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4621", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last event from the previous pagination request.", + "Type": { + "$id": "4622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4623", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of events to retrieve.", + "Type": { + "$id": "4624", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4625", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3118" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4626" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4569" + } + ], + "Decorators": [] + }, + { + "$id": "4627", + "Name": "Images", + "Operations": [ + { + "$id": "4628", + "Name": "createImage", + "ResourceName": "Images", + "Summary": "Creates an image given a prompt", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4629", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4630", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4631", + "Type": { + "$id": "4632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4633", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4634", + "kind": "constant", + "valueType": { + "$id": "4635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4636", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4637", + "kind": "constant", + "valueType": { + "$id": "4638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4639", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2873" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4640", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/generations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImage", + "Decorators": [] + }, + { + "$id": "4641", + "Name": "createImageEdit", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4629" + }, + { + "$id": "4642", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4643", + "kind": "constant", + "valueType": { + "$id": "4644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4645", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4646", + "kind": "constant", + "valueType": { + "$id": "4647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4648", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2903" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4649", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/edits", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", + "Decorators": [] + }, + { + "$id": "4650", + "Name": "createImageVariation", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4629" + }, + { + "$id": "4651", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4652", + "kind": "constant", + "valueType": { + "$id": "4653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4654", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4655", + "kind": "constant", + "valueType": { + "$id": "4656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4657", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2921" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4658", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/variations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4659" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4629" + } + ], + "Decorators": [] + }, + { + "$id": "4660", + "Name": "Messages", + "Operations": [ + { + "$id": "4661", + "Name": "createMessage", + "ResourceName": "Messages", + "Summary": "Create a message.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4662", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4663", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4664", + "Type": { + "$id": "4665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4666", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4667", + "kind": "constant", + "valueType": { + "$id": "4668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4669", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", + "Type": { + "$id": "4670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4671", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4672", + "kind": "constant", + "valueType": { + "$id": "4673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4674", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1526" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4675", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", + "Decorators": [] + }, + { + "$id": "4676", + "Name": "listMessages", + "ResourceName": "Messages", + "Summary": "Returns a list of messages for a given thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4677", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4678", + "kind": "constant", + "valueType": { + "$id": "4679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4680", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", + "Type": { + "$id": "4681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4682", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4683", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4684", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "609" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4685", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4687", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4689", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2849" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", + "Decorators": [] + }, + { + "$id": "4690", + "Name": "getMessage", + "ResourceName": "Messages", + "Summary": "Retrieve a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4691", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4692", + "kind": "constant", + "valueType": { + "$id": "4693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4694", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", + "Type": { + "$id": "4695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4696", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to retrieve.", + "Type": { + "$id": "4697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4698", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", + "Decorators": [] + }, + { + "$id": "4699", + "Name": "modifyMessage", + "ResourceName": "Messages", + "Summary": "Modifies a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4700", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4701", + "kind": "constant", + "valueType": { + "$id": "4702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4703", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "4704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4705", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to modify.", + "Type": { + "$id": "4706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4707", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4708", + "kind": "constant", + "valueType": { + "$id": "4709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4710", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2860" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4711", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", + "Decorators": [] + }, + { + "$id": "4712", + "Name": "deleteMessage", + "ResourceName": "Messages", + "Summary": "Deletes a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4713", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4714", + "kind": "constant", + "valueType": { + "$id": "4715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4716", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "4717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4718", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to delete.", + "Type": { + "$id": "4719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4720", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2866" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4721" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4662" + } + ], + "Decorators": [] + }, + { + "$id": "4722", + "Name": "ModelsOps", + "Operations": [ + { + "$id": "4723", + "Name": "listModels", + "ResourceName": "Models", + "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4724", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4725", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4726", + "Type": { + "$id": "4727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4728", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4729", + "kind": "constant", + "valueType": { + "$id": "4730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4731", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2781" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.listModels", + "Decorators": [] + }, + { + "$id": "4732", + "Name": "retrieveModel", + "ResourceName": "Models", + "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4724" + }, + { + "$id": "4733", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4734", + "kind": "constant", + "valueType": { + "$id": "4735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4736", + "Name": "model", + "NameInRequest": "model", + "Description": "The ID of the model to use for this request.", + "Type": { + "$id": "4737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4738", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2786" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", + "Decorators": [] + }, + { + "$id": "4739", + "Name": "deleteModel", + "ResourceName": "Models", + "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4724" + }, + { + "$id": "4740", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4741", + "kind": "constant", + "valueType": { + "$id": "4742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4743", + "Name": "model", + "NameInRequest": "model", + "Description": "The model to delete", + "Type": { + "$id": "4744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4745", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2796" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4746" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4724" + } + ], + "Decorators": [] + }, + { + "$id": "4747", + "Name": "Moderations", + "Operations": [ + { + "$id": "4748", + "Name": "createModeration", + "ResourceName": "Moderations", + "Summary": "Classifies if text is potentially harmful.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4749", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4750", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4751", + "Type": { + "$id": "4752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4753", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4754", + "kind": "constant", + "valueType": { + "$id": "4755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4756", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4757", + "kind": "constant", + "valueType": { + "$id": "4758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4759", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2716" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4760", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2723" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/moderations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4761" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4749" + } + ], + "Decorators": [] + }, + { + "$id": "4762", + "Name": "Realtime", + "Operations": [ + { + "$id": "4763", + "Name": "startRealtimeSession", + "ResourceName": "Realtime", + "Summary": "Starts a real-time conversation session.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4764", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4765", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4766", + "Type": { + "$id": "4767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4768", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4769", + "kind": "constant", + "valueType": { + "$id": "4770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4771", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4772", + "kind": "constant", + "valueType": { + "$id": "4773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4774", + "Name": "requestMessages", + "NameInRequest": "requestMessages", + "Type": { + "$id": "4775", + "kind": "array", + "name": "ArrayRealtimeRequestCommand", + "valueType": { + "$ref": "2100" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4776", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4777", + "kind": "array", + "name": "ArrayRealtimeResponseCommand", + "valueType": { + "$ref": "2322" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/realtime", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4778" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4764" + } + ], + "Decorators": [] + }, + { + "$id": "4779", + "Name": "Threads", + "Operations": [ + { + "$id": "4780", + "Name": "createThread", + "ResourceName": "Threads", + "Summary": "Create a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4781", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4782", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4783", + "Type": { + "$id": "4784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4785", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4786", + "kind": "constant", + "valueType": { + "$id": "4787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4788", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4789", + "kind": "constant", + "valueType": { + "$id": "4790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4791", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1523" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4792", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", + "Decorators": [] + }, + { + "$id": "4793", + "Name": "getThread", + "ResourceName": "Threads", + "Summary": "Retrieves a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4794", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4795", + "kind": "constant", + "valueType": { + "$id": "4796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4797", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to retrieve.", + "Type": { + "$id": "4798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4799", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", + "Decorators": [] + }, + { + "$id": "4800", + "Name": "modifyThread", + "ResourceName": "Threads", + "Summary": "Modifies a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4801", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4802", + "kind": "constant", + "valueType": { + "$id": "4803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4804", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", + "Type": { + "$id": "4805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4806", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4807", + "kind": "constant", + "valueType": { + "$id": "4808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4809", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2078" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4810", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", + "Decorators": [] + }, + { + "$id": "4811", + "Name": "deleteThread", + "ResourceName": "Threads", + "Summary": "Delete a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4812", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4813", + "kind": "constant", + "valueType": { + "$id": "4814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4815", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to delete.", + "Type": { + "$id": "4816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4817", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2093" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4818" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4781" + } + ], + "Decorators": [] + }, + { + "$id": "4819", + "Name": "Runs", + "Operations": [ + { + "$id": "4820", + "Name": "createThreadAndRun", + "ResourceName": "Runs", + "Summary": "Create a thread and run it in one request.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4821", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4822", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4823", + "Type": { + "$id": "4824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4825", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4826", + "kind": "constant", + "valueType": { + "$id": "4827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4828", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4829", + "kind": "constant", + "valueType": { + "$id": "4830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4831", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1519" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4832", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", + "Decorators": [] + }, + { + "$id": "4833", + "Name": "createRun", + "ResourceName": "Runs", + "Summary": "Create a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4834", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4835", + "kind": "constant", + "valueType": { + "$id": "4836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4837", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to run.", + "Type": { + "$id": "4838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4839", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4840", + "kind": "constant", + "valueType": { + "$id": "4841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4842", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1814" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4843", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", + "Decorators": [] + }, + { + "$id": "4844", + "Name": "listRuns", + "ResourceName": "Runs", + "Summary": "Returns a list of runs belonging to a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4845", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4846", + "kind": "constant", + "valueType": { + "$id": "4847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4848", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run belongs to.", + "Type": { + "$id": "4849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4850", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4851", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4852", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "319" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4853", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4855", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4857", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1863" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", + "Decorators": [] + }, + { + "$id": "4858", + "Name": "getRun", + "ResourceName": "Runs", + "Summary": "Retrieves a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4859", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4860", + "kind": "constant", + "valueType": { + "$id": "4861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4862", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4864", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to retrieve.", + "Type": { + "$id": "4865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4866", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", + "Decorators": [] + }, + { + "$id": "4867", + "Name": "modifyRun", + "ResourceName": "Runs", + "Summary": "Modifies a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4868", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4869", + "kind": "constant", + "valueType": { + "$id": "4870", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4871", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4873", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to modify.", + "Type": { + "$id": "4874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4875", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4876", + "kind": "constant", + "valueType": { + "$id": "4877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4878", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1874" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4879", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", + "Decorators": [] + }, + { + "$id": "4880", + "Name": "cancelRun", + "ResourceName": "Runs", + "Summary": "Cancels a run that is `in_progress`.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4881", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4882", + "kind": "constant", + "valueType": { + "$id": "4883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4884", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this run belongs.", + "Type": { + "$id": "4885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4886", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to cancel.", + "Type": { + "$id": "4887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4888", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", + "Decorators": [] + }, + { + "$id": "4889", + "Name": "submitToolOutputsToRun", + "ResourceName": "Runs", + "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4890", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4891", + "kind": "constant", + "valueType": { + "$id": "4892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4893", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", + "Type": { + "$id": "4894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4895", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run that requires the tool output submission.", + "Type": { + "$id": "4896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4897", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4898", + "kind": "constant", + "valueType": { + "$id": "4899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4900", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1880" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4901", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", + "Decorators": [] + }, + { + "$id": "4902", + "Name": "listRunSteps", + "ResourceName": "Runs", + "Summary": "Returns a list of run steps belonging to a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4903", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4904", + "kind": "constant", + "valueType": { + "$id": "4905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4906", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run and run steps belong to.", + "Type": { + "$id": "4907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4908", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run the run steps belong to.", + "Type": { + "$id": "4909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4910", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4911", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4912", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "328" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4913", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4915", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4917", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1891" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", + "Decorators": [] + }, + { + "$id": "4918", + "Name": "getRunStep", + "ResourceName": "Runs", + "Summary": "Retrieves a run step.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4919", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4920", + "kind": "constant", + "valueType": { + "$id": "4921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4922", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which the run and run step belongs.", + "Type": { + "$id": "4923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4924", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to which the run step belongs.", + "Type": { + "$id": "4925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4926", + "Name": "step_id", + "NameInRequest": "step_id", + "Description": "The ID of the run step to retrieve.", + "Type": { + "$id": "4927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4928", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1896" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4929" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4821" + } + ], + "Decorators": [] + }, + { + "$id": "4930", + "Name": "VectorStores", + "Operations": [ + { + "$id": "4931", + "Name": "listVectorStores", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector-stores.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4932", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4933", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4934", + "Type": { + "$id": "4935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4936", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4937", + "kind": "constant", + "valueType": { + "$id": "4938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4939", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4940", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4941", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "55" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4942", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4944", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4946", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1324" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", + "Decorators": [] + }, + { + "$id": "4947", + "Name": "createVectorStore", + "ResourceName": "VectorStores", + "Summary": "Creates a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4948", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4949", + "kind": "constant", + "valueType": { + "$id": "4950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4951", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4952", + "kind": "constant", + "valueType": { + "$id": "4953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4954", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1379" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4955", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", + "Decorators": [] + }, + { + "$id": "4956", + "Name": "getVectorStore", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4957", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4958", + "kind": "constant", + "valueType": { + "$id": "4959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4960", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to retrieve.", + "Type": { + "$id": "4961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4962", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", + "Decorators": [] + }, + { + "$id": "4963", + "Name": "modifyVectorStore", + "ResourceName": "VectorStores", + "Summary": "Modifies a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4964", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4965", + "kind": "constant", + "valueType": { + "$id": "4966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4967", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to modify.", + "Type": { + "$id": "4968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4969", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4970", + "kind": "constant", + "valueType": { + "$id": "4971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4972", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1411" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4973", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", + "Decorators": [] + }, + { + "$id": "4974", + "Name": "deleteVectorStore", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4975", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4976", + "kind": "constant", + "valueType": { + "$id": "4977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4978", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to delete.", + "Type": { + "$id": "4979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4980", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1422" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", + "Decorators": [] + }, + { + "$id": "4981", + "Name": "listVectorStoreFiles", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4982", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4983", + "kind": "constant", + "valueType": { + "$id": "4984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4985", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the files belong to.", + "Type": { + "$id": "4986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4987", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4988", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4989", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "81" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4990", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4992", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4994", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4995", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1429" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", + "Decorators": [] + }, + { + "$id": "4996", + "Name": "createVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4997", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4998", + "kind": "constant", + "valueType": { + "$id": "4999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5000", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a File.", + "Type": { + "$id": "5001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5002", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5003", + "kind": "constant", + "valueType": { + "$id": "5004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5005", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1478" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5006", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1434" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5007", + "Name": "getVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5008", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5009", + "kind": "constant", + "valueType": { + "$id": "5010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5011", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "5012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5013", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file being retrieved.", + "Type": { + "$id": "5014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5015", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1434" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5016", + "Name": "deleteVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5017", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5018", + "kind": "constant", + "valueType": { + "$id": "5019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5020", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "5021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5022", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to delete.", + "Type": { + "$id": "5023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5024", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1483" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5025", + "Name": "createVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5026", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5027", + "kind": "constant", + "valueType": { + "$id": "5028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5029", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a file batch.", + "Type": { + "$id": "5030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5031", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5032", + "kind": "constant", + "valueType": { + "$id": "5033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5034", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1490" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5035", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5036", + "Name": "getVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5037", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5038", + "kind": "constant", + "valueType": { + "$id": "5039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5040", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5042", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch being retrieved.", + "Type": { + "$id": "5043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5044", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5045", + "Name": "cancelVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5046", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5047", + "kind": "constant", + "valueType": { + "$id": "5048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5049", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5051", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch to cancel.", + "Type": { + "$id": "5052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5053", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5054", + "Name": "listFilesInVectorStoreBatch", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files in a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5055", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5056", + "kind": "constant", + "valueType": { + "$id": "5057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5058", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5060", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch that the files belong to.", + "Type": { + "$id": "5061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5062", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "5063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5064", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "137" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5065", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "5066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5067", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "5068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5069", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5070", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1429" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "5071" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4932" + } + ], + "Decorators": [] + }, + { + "$id": "5072", + "Name": "Uploads", + "Operations": [ + { + "$id": "5073", + "Name": "createUpload", + "ResourceName": "Uploads", + "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5074", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "5075", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "5076", + "Type": { + "$id": "5077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "5078", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5079", + "kind": "constant", + "valueType": { + "$id": "5080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5081", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5082", + "kind": "constant", + "valueType": { + "$id": "5083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5084", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1247" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5085", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", + "Decorators": [] + }, + { + "$id": "5086", + "Name": "addUploadPart", + "ResourceName": "Uploads", + "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5087", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5088", + "kind": "constant", + "valueType": { + "$id": "5089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5090", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "5091", + "kind": "constant", + "valueType": { + "$id": "5092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5093", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5095", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1305" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5096", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1308" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/parts", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", + "Decorators": [] + }, + { + "$id": "5097", + "Name": "completeUpload", + "ResourceName": "Uploads", + "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5098", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5099", + "kind": "constant", + "valueType": { + "$id": "5100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5101", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5103", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5104", + "kind": "constant", + "valueType": { + "$id": "5105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5106", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1318" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5107", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/complete", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", + "Decorators": [] + }, + { + "$id": "5108", + "Name": "cancelUpload", + "ResourceName": "Uploads", + "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5109", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5110", + "kind": "constant", + "valueType": { + "$id": "5111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5112", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5114", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", + "Decorators": [] + } + ], + "Protocol": { + "$id": "5115" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "5074" + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "5116", + "ApiKey": { + "$id": "5117", + "Name": "Authorization", + "Prefix": "Bearer" + } + } +} From f3355fc41ec446de2b8577b590b1f250a1696139 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 22 Oct 2024 16:09:20 -0700 Subject: [PATCH 14/54] more tsp updates for readonly lists --- .../Chat/ToolChatMessage.Serialization.cs | 2 +- ...CompletionResponseMessage.Serialization.cs | 4 +- .../InternalChatCompletionResponseMessage.cs | 4 +- ...ionResponseChoiceLogprobs.Serialization.cs | 54 ++++++++++--------- ...ateChatCompletionResponseChoiceLogprobs.cs | 14 ++--- ...altimeResponseMessageItem.Serialization.cs | 15 +++--- .../InternalRealtimeResponseMessageItem.cs | 10 ++-- ...alRealtimeResponseSession.Serialization.cs | 15 +++--- .../Models/InternalRealtimeResponseSession.cs | 9 ++-- ...CodeObjectCodeInterpreter.Serialization.cs | 4 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 4 +- ...ileSearchObjectFileSearch.Serialization.cs | 4 +- ...ailsToolCallsFileSearchObjectFileSearch.cs | 4 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 6 +-- .dotnet/tspCodeModel.json | 14 ++--- .typespec/chat/client.tsp | 2 + .typespec/chat/models.tsp | 2 + .typespec/realtime/client.tsp | 3 ++ .typespec/runs/models.tsp | 3 ++ package-lock.json | 26 ++++----- 20 files changed, 109 insertions(+), 90 deletions(-) diff --git a/.dotnet/src/Custom/Chat/ToolChatMessage.Serialization.cs b/.dotnet/src/Custom/Chat/ToolChatMessage.Serialization.cs index 45a9bb0c2..b3cc7e417 100644 --- a/.dotnet/src/Custom/Chat/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Custom/Chat/ToolChatMessage.Serialization.cs @@ -39,7 +39,7 @@ internal override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } } - writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); + writer.WriteSerializedAdditionalRawData(_additionalBinaryDataProperties, options); writer.WriteEndObject(); } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 5175c5781..3e8d71880 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -40,7 +40,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("refusal"u8); } - if (Optional.IsCollectionDefined(ToolCalls)) + if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls)) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -103,7 +103,7 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom return null; } string refusal = default; - IList toolCalls = default; + IReadOnlyList toolCalls = default; Chat.ChatMessageRole role = default; ChatMessageContent content = default; ChatFunctionCall functionCall = default; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index ee71ec5c4..c84223018 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -19,7 +19,7 @@ internal InternalChatCompletionResponseMessage(string refusal, ChatMessageConten Content = content; } - internal InternalChatCompletionResponseMessage(string refusal, IList toolCalls, Chat.ChatMessageRole role, ChatMessageContent content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionResponseMessage(string refusal, IReadOnlyList toolCalls, Chat.ChatMessageRole role, ChatMessageContent content, ChatFunctionCall functionCall, IDictionary additionalBinaryDataProperties) { Refusal = refusal; ToolCalls = toolCalls; @@ -31,6 +31,6 @@ internal InternalChatCompletionResponseMessage(string refusal, IList ToolCalls { get; } + public IReadOnlyList ToolCalls { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 0328c85bb..81668c104 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoiceLogprobs : IJsonModel { - internal InternalCreateChatCompletionResponseChoiceLogprobs() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,33 +27,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (Content != null && Optional.IsCollectionDefined(Content)) + if (options.Format != "W") { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (ChatTokenLogProbabilityDetails item in Content) + if (Content != null && Optional.IsCollectionDefined(Content)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ChatTokenLogProbabilityDetails item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("content"u8); - } - if (Refusal != null && Optional.IsCollectionDefined(Refusal)) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStartArray(); - foreach (ChatTokenLogProbabilityDetails item in Refusal) + else { - writer.WriteObjectValue(item, options); + writer.WriteNull("content"u8); } - writer.WriteEndArray(); } - else + if (options.Format != "W") { - writer.WriteNull("refusal"u8); + if (Refusal != null && Optional.IsCollectionDefined(Refusal)) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStartArray(); + foreach (ChatTokenLogProbabilityDetails item in Refusal) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("refusal"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { @@ -95,8 +97,8 @@ internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeIn { return null; } - IList content = default; - IList refusal = default; + IReadOnlyList content = default; + IReadOnlyList refusal = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs index e36001a66..b5214b241 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Chat { @@ -12,21 +12,21 @@ internal partial class InternalCreateChatCompletionResponseChoiceLogprobs { private protected readonly IDictionary _additionalBinaryDataProperties; - internal InternalCreateChatCompletionResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) + internal InternalCreateChatCompletionResponseChoiceLogprobs() { - Content = content?.ToList(); - Refusal = refusal?.ToList(); + Content = new ChangeTrackingList(); + Refusal = new ChangeTrackingList(); } - internal InternalCreateChatCompletionResponseChoiceLogprobs(IList content, IList refusal, IDictionary additionalBinaryDataProperties) + internal InternalCreateChatCompletionResponseChoiceLogprobs(IReadOnlyList content, IReadOnlyList refusal, IDictionary additionalBinaryDataProperties) { Content = content; Refusal = refusal; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IList Content { get; } + public IReadOnlyList Content { get; } - public IList Refusal { get; } + public IReadOnlyList Refusal { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 3c3d05a4b..ff98066cb 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -32,13 +32,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (ConversationContentPart item in Content) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("role"u8); @@ -64,7 +67,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR { return null; } - IList content = default; + IReadOnlyList content = default; ConversationItemStatus status = default; ConversationMessageRole role = default; InternalRealtimeResponseItemObject @object = default; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs index ad10471b4..d261c9306 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs @@ -4,27 +4,27 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseMessageItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseMessageItem(IEnumerable content, ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeRequestItemType.Message, id) + internal InternalRealtimeResponseMessageItem(ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeRequestItemType.Message, id) { - Content = content.ToList(); + Content = new ChangeTrackingList(); Status = status; Role = role; } - internal InternalRealtimeResponseMessageItem(IList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseMessageItem(IReadOnlyList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) { Content = content; Status = status; Role = role; } - public IList Content { get; } + public IReadOnlyList Content { get; } public ConversationItemStatus Status { get; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 0f26aae88..a427345aa 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -63,13 +63,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetection, options); - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (ConversationTool item in Tools) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ConversationTool item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WritePropertyName("tool_choice"u8); #if NET6_0_OR_GREATER writer.WriteRawValue(ToolChoice); @@ -143,7 +146,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo ConversationAudioFormat outputAudioFormat = default; ConversationInputTranscriptionOptions inputAudioTranscription = default; ConversationTurnDetectionOptions turnDetection = default; - IList tools = default; + IReadOnlyList tools = default; BinaryData toolChoice = default; float temperature = default; BinaryData maxResponseOutputTokens = default; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index 5580dc276..91acac7a5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.RealtimeConversation { @@ -12,7 +13,7 @@ internal partial class InternalRealtimeResponseSession { private protected readonly IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IEnumerable tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) + internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) { Id = id; Model = model; @@ -23,13 +24,13 @@ internal InternalRealtimeResponseSession(string id, string model, IEnumerable(); ToolChoice = toolChoice; Temperature = temperature; _maxResponseOutputTokens = maxResponseOutputTokens; } - internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IReadOnlyList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) { Object = @object; Id = id; @@ -68,7 +69,7 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ public ConversationTurnDetectionOptions TurnDetection { get; } - public IList Tools { get; } + public IReadOnlyList Tools { get; } public BinaryData ToolChoice { get; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 8dd0b3c18..61a532f8e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (Optional.IsCollectionDefined(Outputs)) + if (options.Format != "W" && Optional.IsCollectionDefined(Outputs)) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -79,7 +79,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterprete return null; } string input = default; - IList outputs = default; + IReadOnlyList outputs = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 8475eca3e..016e62125 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -17,7 +17,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter() Outputs = new ChangeTrackingList(); } - internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IList outputs, IDictionary additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IReadOnlyList outputs, IDictionary additionalBinaryDataProperties) { Input = input; Outputs = outputs; @@ -26,6 +26,6 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(strin public string Input { get; } - public IList Outputs { get; } + public IReadOnlyList Outputs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index 1dc89b626..b12d91619 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Results)) + if (options.Format != "W" && Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -78,7 +78,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri { return null; } - IList results = default; + IReadOnlyList results = default; FileSearchRankingOptions rankingOptions = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs index 022e92149..8708e9258 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs @@ -17,13 +17,13 @@ internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch() Results = new ChangeTrackingList(); } - internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(IList results, FileSearchRankingOptions rankingOptions, IDictionary additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(IReadOnlyList results, FileSearchRankingOptions rankingOptions, IDictionary additionalBinaryDataProperties) { Results = results; RankingOptions = rankingOptions; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IList Results { get; } + public IReadOnlyList Results { get; } } } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 015acb07c..eb75214f0 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -1095,7 +1095,7 @@ public static ChatCompletion ChatCompletion(string id = default, string model = public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default, IEnumerable topLogProbabilities = default) { - utf8Bytes ??= new byte[](); + utf8Bytes ??= new ReadOnlyMemory(); topLogProbabilities ??= new ChangeTrackingList(); return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), topLogProbabilities?.ToList(), null); @@ -1103,7 +1103,7 @@ public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(stri public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default) { - utf8Bytes ??= new byte[](); + utf8Bytes ??= new ReadOnlyMemory(); return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); } @@ -1237,7 +1237,7 @@ public static TranscribedWord TranscribedWord(string word = default, TimeSpan st public static TranscribedSegment TranscribedSegment(int id = default, string text = default, float temperature = default, float compressionRatio = default, TimeSpan startTime = default, TimeSpan endTime = default, int seekOffset = default, ReadOnlyMemory tokenIds = default, float averageLogProbability = default, float noSpeechProbability = default) { - tokenIds ??= new int[](); + tokenIds ??= new ReadOnlyMemory(); return new TranscribedSegment( id, diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index b69ce6560..ad4d9c073 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -18669,7 +18669,7 @@ "decorators": [] }, "optional": true, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -22393,7 +22393,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -22705,7 +22705,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -34025,7 +34025,7 @@ "decorators": [] }, "optional": true, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -34342,7 +34342,7 @@ } }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -34369,7 +34369,7 @@ } }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], @@ -41697,7 +41697,7 @@ "decorators": [] }, "optional": true, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], diff --git a/.typespec/chat/client.tsp b/.typespec/chat/client.tsp index 35fd071f0..294acbc1e 100644 --- a/.typespec/chat/client.tsp +++ b/.typespec/chat/client.tsp @@ -28,3 +28,5 @@ using OpenAI; @@access(ChatResponseFormatJsonSchema, Access.public); @@usage(ChatResponseFormatJsonSchema, Usage.input); + +@@visibility(ChatCompletionResponseMessage.tool_calls, "read"); \ No newline at end of file diff --git a/.typespec/chat/models.tsp b/.typespec/chat/models.tsp index 5d9cbec20..dfb5fd248 100644 --- a/.typespec/chat/models.tsp +++ b/.typespec/chat/models.tsp @@ -233,9 +233,11 @@ model CreateChatCompletionResponse { /** Log probability information for the choice. */ logprobs: { /** A list of message content tokens with log probability information. */ + @visibility("read") content: ChatCompletionTokenLogprob[] | null; /** A list of message refusal tokens with log probability information. */ + @visibility("read") refusal: ChatCompletionTokenLogprob[] | null; } | null; }[]; diff --git a/.typespec/realtime/client.tsp b/.typespec/realtime/client.tsp index b131c6854..53694190d 100644 --- a/.typespec/realtime/client.tsp +++ b/.typespec/realtime/client.tsp @@ -87,3 +87,6 @@ using OpenAI; @@clientName(RealtimeTurnDetection.type, "Kind", "csharp"); @@clientName(RealtimeServerVadTurnDetection.type, "Kind", "csharp"); + +@@visibility(RealtimeResponseMessageItem.content, "read"); +@@visibility(RealtimeResponseSession.tools, "read"); diff --git a/.typespec/runs/models.tsp b/.typespec/runs/models.tsp index 7376c2ee7..cf5fe9dc0 100644 --- a/.typespec/runs/models.tsp +++ b/.typespec/runs/models.tsp @@ -359,6 +359,7 @@ model RunStepDetailsToolCallsFileSearchObject ranking_options?: RunStepDetailsToolCallsFileSearchRankingOptionsObject; /** The results of the file search. */ + @visibility("read") results?: RunStepDetailsToolCallsFileSearchResultObject[]; }; } @@ -499,6 +500,7 @@ model RunObject { /** Details on the tool outputs needed for this run to continue. */ submit_tool_outputs: { /** A list of the relevant tool calls. */ + @visibility("read") tool_calls: RunToolCallObject[]; }; } | null; @@ -763,6 +765,7 @@ model RunStepDeltaStepDetailsToolCallsCodeObject The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. """) @extension("x-oaiExpandable", true) + @visibility("read") outputs?: RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject[]; }; } diff --git a/package-lock.json b/package-lock.json index b251297e9..fa19893a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,19 +66,19 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", + "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -88,9 +88,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", - "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.9.tgz", + "integrity": "sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -335,9 +335,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241018.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241018.1.tgz", - "integrity": "sha512-CpRUgLcwmztK901ngNPxM3nb3c8gdlFkvNerL+0LFYf2nK0xrVTE2ydj+qpzSXNecGOJzVpUTrNYOo76yZ6bdQ==", + "version": "0.1.9-alpha.20241022.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241022.2.tgz", + "integrity": "sha512-Y38Iv4G+SMfdkJF14Cdmgm/nIyQNJiiZ7Q9ejSLYapKZRjkjZhPprRJStz0R4qmTqJazShcFv2Zk1v6ll8OP0w==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, From b54da89fa192dcc0841f9840e08a378258879213 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 22 Oct 2024 16:29:43 -0700 Subject: [PATCH 15/54] more readonly lists --- .../Internal/GeneratorStubs.Internal.cs | 2 +- ...ternalMessageDeltaObjectDelta.Serialization.cs | 9 ++++++--- .../Models/InternalMessageDeltaObjectDelta.cs | 2 +- ...allsCodeObjectCodeInterpreter.Serialization.cs | 15 +++++++++------ ...epDetailsToolCallsCodeObjectCodeInterpreter.cs | 10 +++++----- .dotnet/tspCodeModel.json | 2 +- .typespec/runs/models.tsp | 1 + 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs index 784a854f8..389ed0962 100644 --- a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs +++ b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs @@ -43,7 +43,7 @@ internal partial class InternalMessageDeltaContentImageUrlObject { } internal partial class InternalMessageDeltaObjectDelta { [CodeGenMember("Role")] - internal MessageRole Role { get; } + internal MessageRole? Role { get; } } [CodeGenModel("MessageDeltaContentTextObject")] diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index df1f58abd..19715ed67 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -37,8 +37,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.Value.ToSerialString()); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -76,7 +79,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO return null; } IList content = default; - Assistants.MessageRole role = default; + Assistants.MessageRole? role = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs index 8730242d0..fed8b234d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs @@ -17,7 +17,7 @@ internal InternalMessageDeltaObjectDelta() Content = new ChangeTrackingList(); } - internal InternalMessageDeltaObjectDelta(IList content, Assistants.MessageRole role, IDictionary additionalBinaryDataProperties) + internal InternalMessageDeltaObjectDelta(IList content, Assistants.MessageRole? role, IDictionary additionalBinaryDataProperties) { Content = content; Role = role; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index cc8acc6a6..44001fd4c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -33,13 +33,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (RunStepCodeInterpreterOutput item in Outputs) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("outputs"u8); + writer.WriteStartArray(); + foreach (RunStepCodeInterpreterOutput item in Outputs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -77,7 +80,7 @@ internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter Deseria return null; } string input = default; - IList outputs = default; + IReadOnlyList outputs = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 442d12085..e6a3a57b9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,13 +12,13 @@ internal partial class InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter { private protected readonly IDictionary _additionalBinaryDataProperties; - internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IEnumerable outputs) + internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input) { Input = input; - Outputs = outputs.ToList(); + Outputs = new ChangeTrackingList(); } - internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IList outputs, IDictionary additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, IReadOnlyList outputs, IDictionary additionalBinaryDataProperties) { Input = input; Outputs = outputs; @@ -27,6 +27,6 @@ internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, public string Input { get; } - public IList Outputs { get; } + public IReadOnlyList Outputs { get; } } } diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json index ad4d9c073..4bcf58c32 100644 --- a/.dotnet/tspCodeModel.json +++ b/.dotnet/tspCodeModel.json @@ -18358,7 +18358,7 @@ "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], diff --git a/.typespec/runs/models.tsp b/.typespec/runs/models.tsp index cf5fe9dc0..54c0231dc 100644 --- a/.typespec/runs/models.tsp +++ b/.typespec/runs/models.tsp @@ -311,6 +311,7 @@ model RunStepDetailsToolCallsCodeObject The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. """) @extension("x-oaiExpandable", true) + @visibility("read") outputs: RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject[]; }; } From f39f5da9743d0db426c6f186853759eeb7833a48 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 22 Oct 2024 17:39:15 -0700 Subject: [PATCH 16/54] customization fixes --- .../Custom/Embeddings/OpenAIEmbeddingCollection.cs | 3 ++- .dotnet/src/Custom/Files/OpenAIFileCollection.cs | 2 +- .../src/Custom/Images/GeneratedImageCollection.cs | 3 ++- .dotnet/src/Custom/Models/OpenAIModelCollection.cs | 2 +- .../Moderations/ModerationResultCollection.cs | 3 ++- .../Generated/Models/GeneratedImageCollection.cs | 11 ----------- .../Generated/Models/ModerationResultCollection.cs | 13 ------------- .../Generated/Models/OpenAIEmbeddingCollection.cs | 14 -------------- .../src/Generated/Models/OpenAIFileCollection.cs | 6 ------ 9 files changed, 8 insertions(+), 49 deletions(-) diff --git a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs index d6797d3a0..fbcb81fdd 100644 --- a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs @@ -7,7 +7,8 @@ namespace OpenAI.Embeddings; [CodeGenModel("CreateEmbeddingResponse")] [CodeGenSuppress("Data")] [CodeGenSuppress(nameof(OpenAIEmbeddingCollection))] -[CodeGenSuppress(nameof(OpenAIEmbeddingCollection), typeof(IReadOnlyList), typeof(string), typeof(InternalCreateEmbeddingResponseObject), typeof(EmbeddingTokenUsage))] +[CodeGenSuppress(nameof(OpenAIEmbeddingCollection), typeof(string), typeof(EmbeddingTokenUsage))] +[CodeGenSuppress(nameof(OpenAIEmbeddingCollection), typeof(string), typeof(EmbeddingTokenUsage), typeof(InternalCreateEmbeddingResponseObject), typeof(IDictionary))] public partial class OpenAIEmbeddingCollection : ReadOnlyCollection { // CUSTOM: Made private. This property does not add value in the context of a strongly-typed class. diff --git a/.dotnet/src/Custom/Files/OpenAIFileCollection.cs b/.dotnet/src/Custom/Files/OpenAIFileCollection.cs index d1591feb1..f90d4d150 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileCollection.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileCollection.cs @@ -7,7 +7,7 @@ namespace OpenAI.Files; [CodeGenModel("ListFilesResponse")] [CodeGenSuppress("Data")] [CodeGenSuppress(nameof(OpenAIFileCollection))] -[CodeGenSuppress(nameof(OpenAIFileCollection), typeof(IReadOnlyList), typeof(InternalListFilesResponseObject))] +[CodeGenSuppress(nameof(OpenAIFileCollection),typeof(InternalListFilesResponseObject), typeof(IDictionary))] public partial class OpenAIFileCollection : ReadOnlyCollection { // CUSTOM: Made private. This property does not add value in the context of a strongly-typed class. diff --git a/.dotnet/src/Custom/Images/GeneratedImageCollection.cs b/.dotnet/src/Custom/Images/GeneratedImageCollection.cs index 0b49f793e..45100a3ba 100644 --- a/.dotnet/src/Custom/Images/GeneratedImageCollection.cs +++ b/.dotnet/src/Custom/Images/GeneratedImageCollection.cs @@ -11,7 +11,8 @@ namespace OpenAI.Images; [CodeGenSuppress("Data")] [CodeGenSuppress("Created")] [CodeGenSuppress(nameof(GeneratedImageCollection))] -[CodeGenSuppress(nameof(GeneratedImageCollection), typeof(DateTimeOffset), typeof(IReadOnlyList))] +[CodeGenSuppress(nameof(GeneratedImageCollection), typeof(DateTimeOffset))] +[CodeGenSuppress(nameof(GeneratedImageCollection), typeof(DateTimeOffset), typeof(IDictionary))] public partial class GeneratedImageCollection : ReadOnlyCollection { // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. diff --git a/.dotnet/src/Custom/Models/OpenAIModelCollection.cs b/.dotnet/src/Custom/Models/OpenAIModelCollection.cs index c850dc079..f2dc879d6 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelCollection.cs @@ -11,7 +11,7 @@ namespace OpenAI.Models; [CodeGenModel("ListModelsResponse")] [CodeGenSuppress("Data")] [CodeGenSuppress(nameof(OpenAIModelCollection))] -[CodeGenSuppress(nameof(OpenAIModelCollection), typeof(InternalListModelsResponseObject), typeof(IReadOnlyList))] +[CodeGenSuppress(nameof(OpenAIModelCollection), typeof(InternalListModelsResponseObject), typeof(IDictionary))] public partial class OpenAIModelCollection : ReadOnlyCollection { // CUSTOM: Made private. This property does not add value in the context of a strongly-typed class. diff --git a/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs b/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs index cc1f1ccc3..5daa5f5f5 100644 --- a/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs +++ b/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs @@ -7,7 +7,8 @@ namespace OpenAI.Moderations; [CodeGenModel("CreateModerationResponse")] [CodeGenSuppress("Results")] [CodeGenSuppress(nameof(ModerationResultCollection))] -[CodeGenSuppress(nameof(ModerationResultCollection), typeof(string), typeof(string), typeof(IReadOnlyList))] +[CodeGenSuppress(nameof(ModerationResultCollection), typeof(string), typeof(string))] +[CodeGenSuppress(nameof(ModerationResultCollection), typeof(string), typeof(string), typeof(IDictionary))] public partial class ModerationResultCollection : ReadOnlyCollection { // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index 9c2a3b9ee..9e22e09ef 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -10,16 +10,5 @@ namespace OpenAI.Images public partial class GeneratedImageCollection { private protected readonly IDictionary _additionalBinaryDataProperties; - - internal GeneratedImageCollection(DateTimeOffset createdAt) - { - CreatedAt = createdAt; - } - - internal GeneratedImageCollection(DateTimeOffset createdAt, IDictionary additionalBinaryDataProperties) - { - CreatedAt = createdAt; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } } } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.cs index fc9fccbd2..8d8bc08cf 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.cs @@ -11,19 +11,6 @@ public partial class ModerationResultCollection { private protected readonly IDictionary _additionalBinaryDataProperties; - internal ModerationResultCollection(string id, string model) - { - Id = id; - Model = model; - } - - internal ModerationResultCollection(string id, string model, IDictionary additionalBinaryDataProperties) - { - Id = id; - Model = model; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - public string Id { get; } public string Model { get; } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index 6e3ac9c65..d71165d98 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -11,20 +11,6 @@ public partial class OpenAIEmbeddingCollection { private protected readonly IDictionary _additionalBinaryDataProperties; - internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage) - { - Model = model; - Usage = usage; - } - - internal OpenAIEmbeddingCollection(string model, EmbeddingTokenUsage usage, InternalCreateEmbeddingResponseObject @object, IDictionary additionalBinaryDataProperties) - { - Model = model; - Usage = usage; - this.Object = @object; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - public string Model { get; } public EmbeddingTokenUsage Usage { get; } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index 666ed7c19..d014647c1 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -10,11 +10,5 @@ namespace OpenAI.Files public partial class OpenAIFileCollection { private protected readonly IDictionary _additionalBinaryDataProperties; - - internal OpenAIFileCollection(InternalListFilesResponseObject @object, IDictionary additionalBinaryDataProperties) - { - this.Object = @object; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } } } From 638f6eee3fe2cb22efda03f94fda55f1a0ce2ac6 Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 22 Oct 2024 17:40:07 -0700 Subject: [PATCH 17/54] delete json artifacts --- .dotnet/Configuration.json | 8 - .dotnet/tspCodeModel.json | 51262 ----------------------------------- 2 files changed, 51270 deletions(-) delete mode 100644 .dotnet/Configuration.json delete mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json deleted file mode 100644 index 85fab5a06..000000000 --- a/.dotnet/Configuration.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "output-folder": ".", - "namespace": "OpenAI", - "library-name": "OpenAI", - "unreferenced-types-handling": "keepAll", - "use-model-reader-writer": true, - "disable-xml-docs": true -} diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json deleted file mode 100644 index 4bcf58c32..000000000 --- a/.dotnet/tspCodeModel.json +++ /dev/null @@ -1,51262 +0,0 @@ -{ - "$id": "1", - "Name": "OpenAI", - "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "kind": "enum", - "name": "CreateUploadRequestPurpose", - "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "5", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "6", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "7", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "8", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "9", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "10", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "11", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "12", - "kind": "enum", - "name": "UploadStatus", - "crossLanguageDefinitionId": "Upload.status.anonymous", - "valueType": { - "$id": "13", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "14", - "kind": "enumvalue", - "name": "pending", - "value": "pending", - "valueType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "16", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "18", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "20", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "21", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "22", - "kind": "enum", - "name": "Upload_object", - "valueType": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "24", - "kind": "enumvalue", - "name": "upload", - "value": "upload", - "description": "upload", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Upload_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "25", - "kind": "enum", - "name": "OpenAIFile_object", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "27", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "26" - }, - "enumType": { - "$ref": "25" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The OpenAIFile_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "28", - "kind": "enum", - "name": "OpenAIFilePurpose", - "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", - "valueType": { - "$id": "29", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "30", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "32", - "kind": "enumvalue", - "name": "assistants_output", - "value": "assistants_output", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "34", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "35", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "36", - "kind": "enumvalue", - "name": "batch_output", - "value": "batch_output", - "valueType": { - "$id": "37", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "38", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "40", - "kind": "enumvalue", - "name": "fine-tune-results", - "value": "fine-tune-results", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "42", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "44", - "kind": "enum", - "name": "OpenAIFileStatus", - "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", - "valueType": { - "$id": "45", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "46", - "kind": "enumvalue", - "name": "uploaded", - "value": "uploaded", - "valueType": { - "$id": "47", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "48", - "kind": "enumvalue", - "name": "processed", - "value": "processed", - "valueType": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "50", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "51", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "52", - "kind": "enum", - "name": "UploadPart_object", - "valueType": { - "$id": "53", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "54", - "kind": "enumvalue", - "name": "upload.part", - "value": "upload.part", - "description": "upload.part", - "valueType": { - "$ref": "53" - }, - "enumType": { - "$ref": "52" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The UploadPart_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "55", - "kind": "enum", - "name": "ListVectorStoresRequestOrder", - "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "57", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - }, - { - "$id": "59", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "61", - "kind": "enum", - "name": "ListVectorStoresResponse_object", - "valueType": { - "$id": "62", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "63", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "62" - }, - "enumType": { - "$ref": "61" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoresResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "64", - "kind": "enum", - "name": "VectorStoreObject_object", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "66", - "kind": "enumvalue", - "name": "vector_store", - "value": "vector_store", - "description": "vector_store", - "valueType": { - "$ref": "65" - }, - "enumType": { - "$ref": "64" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "67", - "kind": "enum", - "name": "VectorStoreObjectStatus", - "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", - "valueType": { - "$id": "68", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "69", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "70", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "71", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "72", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "73", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "74", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "75", - "kind": "enum", - "name": "VectorStoreExpirationAfter_anchor", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "77", - "kind": "enumvalue", - "name": "last_active_at", - "value": "last_active_at", - "description": "last_active_at", - "valueType": { - "$ref": "76" - }, - "enumType": { - "$ref": "75" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreExpirationAfter_anchor", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "78", - "kind": "enum", - "name": "DeleteVectorStoreResponse_object", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "80", - "kind": "enumvalue", - "name": "vector_store.deleted", - "value": "vector_store.deleted", - "description": "vector_store.deleted", - "valueType": { - "$ref": "79" - }, - "enumType": { - "$ref": "78" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "81", - "kind": "enum", - "name": "ListVectorStoreFilesRequestOrder", - "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", - "valueType": { - "$id": "82", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "83", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "84", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - }, - { - "$id": "85", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "87", - "kind": "enum", - "name": "ListVectorStoreFilesFilter", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", - "valueType": { - "$id": "88", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "89", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "90", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "91", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "92", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "93", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "95", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "96", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "97", - "kind": "enum", - "name": "ListVectorStoreFilesResponse_object", - "valueType": { - "$id": "98", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "99", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "98" - }, - "enumType": { - "$ref": "97" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoreFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "100", - "kind": "enum", - "name": "VectorStoreFileObject_object", - "valueType": { - "$id": "101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "102", - "kind": "enumvalue", - "name": "vector_store.file", - "value": "vector_store.file", - "description": "vector_store.file", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "103", - "kind": "enum", - "name": "VectorStoreFileObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", - "valueType": { - "$id": "104", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "105", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "107", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "109", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "111", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "113", - "kind": "enum", - "name": "VectorStoreFileObjectLastErrorCode", - "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", - "valueType": { - "$id": "114", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "115", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "117", - "kind": "enumvalue", - "name": "unsupported_file", - "value": "unsupported_file", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "119", - "kind": "enumvalue", - "name": "invalid_file", - "value": "invalid_file", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "121", - "kind": "enum", - "name": "DeleteVectorStoreFileResponse_object", - "valueType": { - "$id": "122", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "123", - "kind": "enumvalue", - "name": "vector_store.file.deleted", - "value": "vector_store.file.deleted", - "description": "vector_store.file.deleted", - "valueType": { - "$ref": "122" - }, - "enumType": { - "$ref": "121" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "124", - "kind": "enum", - "name": "VectorStoreFileBatchObject_object", - "valueType": { - "$id": "125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "126", - "kind": "enumvalue", - "name": "vector_store.files_batch", - "value": "vector_store.files_batch", - "description": "vector_store.files_batch", - "valueType": { - "$ref": "125" - }, - "enumType": { - "$ref": "124" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileBatchObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "127", - "kind": "enum", - "name": "VectorStoreFileBatchObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", - "valueType": { - "$id": "128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "129", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "131", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "133", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "135", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "137", - "kind": "enum", - "name": "ListFilesInVectorStoreBatchRequestOrder", - "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", - "valueType": { - "$id": "138", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "139", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - }, - { - "$id": "141", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "143", - "kind": "enum", - "name": "CreateMessageRequestRole", - "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "145", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - }, - { - "$id": "147", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "149", - "kind": "enum", - "name": "FileSearchRankingOptionsRanker", - "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "151", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - }, - { - "$id": "153", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "valueType": { - "$id": "154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "155", - "kind": "enum", - "name": "AssistantToolsFileSearchTypeOnly_type", - "valueType": { - "$id": "156", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "157", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "description": "file_search", - "valueType": { - "$ref": "156" - }, - "enumType": { - "$ref": "155" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantToolsFileSearchTypeOnly_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "158", - "kind": "enum", - "name": "CreateThreadAndRunRequestModel", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", - "valueType": { - "$id": "159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "160", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "162", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "164", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "166", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "168", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "170", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "172", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "173", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "174", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "175", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "176", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "177", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "178", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "180", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "182", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "184", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "185", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "186", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "187", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "188", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "190", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "191", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "192", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "194", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "196", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "198", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "200", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "202", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "203", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "204", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "205", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "206", - "kind": "enum", - "name": "TruncationObjectType", - "crossLanguageDefinitionId": "TruncationObject.type.anonymous", - "valueType": { - "$id": "207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "208", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - }, - { - "$id": "210", - "kind": "enumvalue", - "name": "last_messages", - "value": "last_messages", - "valueType": { - "$id": "211", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "212", - "kind": "enum", - "name": "CreateThreadAndRunRequestToolChoice", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", - "valueType": { - "$id": "213", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "214", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "216", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "218", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "220", - "kind": "enum", - "name": "AssistantsNamedToolChoiceType", - "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", - "valueType": { - "$id": "221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "222", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "224", - "kind": "enumvalue", - "name": "code_interpreter", - "value": "code_interpreter", - "valueType": { - "$id": "225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "226", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "valueType": { - "$id": "227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "228", - "kind": "enum", - "name": "RunObject_object", - "valueType": { - "$id": "229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "230", - "kind": "enumvalue", - "name": "thread.run", - "value": "thread.run", - "description": "thread.run", - "valueType": { - "$ref": "229" - }, - "enumType": { - "$ref": "228" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "231", - "kind": "enum", - "name": "RunObjectStatus", - "crossLanguageDefinitionId": "RunObject.status.anonymous", - "valueType": { - "$id": "232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "233", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "235", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "237", - "kind": "enumvalue", - "name": "requires_action", - "value": "requires_action", - "valueType": { - "$id": "238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "239", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "241", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "243", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "245", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "247", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "249", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "251", - "kind": "enum", - "name": "RunObjectRequiredAction_type", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "253", - "kind": "enumvalue", - "name": "submit_tool_outputs", - "value": "submit_tool_outputs", - "description": "submit_tool_outputs", - "valueType": { - "$ref": "252" - }, - "enumType": { - "$ref": "251" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObjectRequiredAction_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "254", - "kind": "enum", - "name": "RunToolCallObject_type", - "valueType": { - "$id": "255", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "256", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "255" - }, - "enumType": { - "$ref": "254" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunToolCallObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "257", - "kind": "enum", - "name": "RunObjectLastErrorCode", - "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", - "valueType": { - "$id": "258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "259", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "261", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "263", - "kind": "enumvalue", - "name": "invalid_prompt", - "value": "invalid_prompt", - "valueType": { - "$id": "264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "265", - "kind": "enum", - "name": "RunObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "267", - "kind": "enumvalue", - "name": "max_completion_tokens", - "value": "max_completion_tokens", - "valueType": { - "$id": "268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - }, - { - "$id": "269", - "kind": "enumvalue", - "name": "max_prompt_tokens", - "value": "max_prompt_tokens", - "valueType": { - "$id": "270", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "271", - "kind": "enum", - "name": "CreateRunRequestModel", - "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", - "valueType": { - "$id": "272", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "273", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "274", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "275", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "277", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "278", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "279", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "280", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "281", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "282", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "283", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "284", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "285", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "287", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "289", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "291", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "292", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "293", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "294", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "295", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "297", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "298", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "299", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "300", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "301", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "303", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "305", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "306", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "307", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "308", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "309", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "311", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "313", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "315", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "316", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "317", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "319", - "kind": "enum", - "name": "ListRunsRequestOrder", - "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", - "valueType": { - "$id": "320", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "321", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "322", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - }, - { - "$id": "323", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "325", - "kind": "enum", - "name": "ListRunsResponse_object", - "valueType": { - "$id": "326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "327", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "326" - }, - "enumType": { - "$ref": "325" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "328", - "kind": "enum", - "name": "ListRunStepsRequestOrder", - "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", - "valueType": { - "$id": "329", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "330", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - }, - { - "$id": "332", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "333", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "334", - "kind": "enum", - "name": "ListRunStepsResponse_object", - "valueType": { - "$id": "335", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "336", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "335" - }, - "enumType": { - "$ref": "334" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunStepsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "337", - "kind": "enum", - "name": "RunStepObject_object", - "valueType": { - "$id": "338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "339", - "kind": "enumvalue", - "name": "thread.run.step", - "value": "thread.run.step", - "description": "thread.run.step", - "valueType": { - "$ref": "338" - }, - "enumType": { - "$ref": "337" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "340", - "kind": "enum", - "name": "RunStepObjectType", - "crossLanguageDefinitionId": "RunStepObject.type.anonymous", - "valueType": { - "$id": "341", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "342", - "kind": "enumvalue", - "name": "message_creation", - "value": "message_creation", - "valueType": { - "$id": "343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - }, - { - "$id": "344", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "345", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "346", - "kind": "enum", - "name": "RunStepObjectStatus", - "crossLanguageDefinitionId": "RunStepObject.status.anonymous", - "valueType": { - "$id": "347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "348", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "350", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "351", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "352", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "353", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "354", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "355", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "356", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "358", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "valueType": { - "$id": "359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "360", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "description": "default_2024_08_21", - "valueType": { - "$ref": "359" - }, - "enumType": { - "$ref": "358" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "361", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "valueType": { - "$id": "362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "363", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "362" - }, - "enumType": { - "$ref": "361" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "364", - "kind": "enum", - "name": "RunStepObjectLastErrorCode", - "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", - "valueType": { - "$id": "365", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "366", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - }, - { - "$id": "368", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "370", - "kind": "enum", - "name": "ThreadObject_object", - "valueType": { - "$id": "371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "372", - "kind": "enumvalue", - "name": "thread", - "value": "thread", - "description": "thread", - "valueType": { - "$ref": "371" - }, - "enumType": { - "$ref": "370" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ThreadObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "373", - "kind": "enum", - "name": "DeleteThreadResponse_object", - "valueType": { - "$id": "374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "375", - "kind": "enumvalue", - "name": "thread.deleted", - "value": "thread.deleted", - "description": "thread.deleted", - "valueType": { - "$ref": "374" - }, - "enumType": { - "$ref": "373" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteThreadResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "376", - "kind": "enum", - "name": "RealtimeRequestCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", - "valueType": { - "$id": "377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "378", - "kind": "enumvalue", - "name": "session_update", - "value": "session.update", - "valueType": { - "$id": "379", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "380", - "kind": "enumvalue", - "name": "input_audio_buffer_append", - "value": "input_audio_buffer.append", - "valueType": { - "$id": "381", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "382", - "kind": "enumvalue", - "name": "input_audio_buffer_commit", - "value": "input_audio_buffer.commit", - "valueType": { - "$id": "383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "384", - "kind": "enumvalue", - "name": "input_audio_buffer_clear", - "value": "input_audio_buffer.clear", - "valueType": { - "$id": "385", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "386", - "kind": "enumvalue", - "name": "item_create", - "value": "conversation.item.create", - "valueType": { - "$id": "387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "388", - "kind": "enumvalue", - "name": "item_delete", - "value": "conversation.item.delete", - "valueType": { - "$id": "389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "390", - "kind": "enumvalue", - "name": "item_truncate", - "value": "conversation.item.truncate", - "valueType": { - "$id": "391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "392", - "kind": "enumvalue", - "name": "response_create", - "value": "response.create", - "valueType": { - "$id": "393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "394", - "kind": "enumvalue", - "name": "response_cancel", - "value": "response.cancel", - "valueType": { - "$id": "395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "396", - "kind": "enum", - "name": "RealtimeRequestModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "398", - "kind": "enumvalue", - "name": "gpt_4o_realtime", - "value": "gpt-4o-realtime", - "valueType": { - "$id": "399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "396" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "400", - "kind": "enum", - "name": "RealtimeRequestSessionUpdateCommandSessionModality", - "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", - "valueType": { - "$id": "401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "402", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - }, - { - "$id": "404", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "406", - "kind": "enum", - "name": "RealtimeVoice", - "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", - "valueType": { - "$id": "407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "408", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "410", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "411", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "412", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "413", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "414", - "kind": "enum", - "name": "RealtimeAudioFormat", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", - "valueType": { - "$id": "415", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "416", - "kind": "enumvalue", - "name": "pcm16", - "value": "pcm16", - "valueType": { - "$id": "417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "418", - "kind": "enumvalue", - "name": "g711_ulaw", - "value": "g711_ulaw", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "420", - "kind": "enumvalue", - "name": "g711_alaw", - "value": "g711_alaw", - "valueType": { - "$id": "421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "422", - "kind": "enum", - "name": "RealtimeAudioInputTranscriptionModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", - "valueType": { - "$id": "423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "424", - "kind": "enumvalue", - "name": "whisper_1", - "value": "whisper-1", - "valueType": { - "$id": "425", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "422" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "426", - "kind": "enum", - "name": "RealtimeTurnDetectionType", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", - "valueType": { - "$id": "427", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "428", - "kind": "enumvalue", - "name": "server_vad", - "value": "server_vad", - "valueType": { - "$id": "429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "426" - }, - "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "430", - "kind": "enum", - "name": "RealtimeToolType", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", - "valueType": { - "$id": "431", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "432", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "430" - }, - "decorators": [] - } - ], - "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "434", - "kind": "enum", - "name": "RealtimeToolChoiceLiteral", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", - "valueType": { - "$id": "435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "436", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", - "decorators": [] - }, - { - "$id": "438", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "439", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call no tools whatsoever.", - "decorators": [] - }, - { - "$id": "440", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "441", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call at least one tool.", - "decorators": [] - } - ], - "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "442", - "kind": "enum", - "name": "RealtimeItemType", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", - "valueType": { - "$id": "443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "444", - "kind": "enumvalue", - "name": "message", - "value": "message", - "valueType": { - "$id": "445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "446", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "447", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "448", - "kind": "enumvalue", - "name": "function_call_output", - "value": "function_call_output", - "valueType": { - "$id": "449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "450", - "kind": "enum", - "name": "RealtimeMessageRole", - "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", - "valueType": { - "$id": "451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "452", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "454", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "455", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "456", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "458", - "kind": "enum", - "name": "RealtimeItemStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", - "valueType": { - "$id": "459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "460", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "462", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "464", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "466", - "kind": "enum", - "name": "RealtimeContentPartType", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", - "valueType": { - "$id": "467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "468", - "kind": "enumvalue", - "name": "input_text", - "value": "input_text", - "valueType": { - "$id": "469", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "470", - "kind": "enumvalue", - "name": "input_audio", - "value": "input_audio", - "valueType": { - "$id": "471", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "472", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "474", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "476", - "kind": "enum", - "name": "RealtimeResponseCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", - "valueType": { - "$id": "477", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "478", - "kind": "enumvalue", - "name": "session_created", - "value": "session.created", - "valueType": { - "$id": "479", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "480", - "kind": "enumvalue", - "name": "session_updated", - "value": "session.updated", - "valueType": { - "$id": "481", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "482", - "kind": "enumvalue", - "name": "item_created", - "value": "conversation.item.created", - "valueType": { - "$id": "483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "484", - "kind": "enumvalue", - "name": "item_deleted", - "value": "conversation.item.deleted", - "valueType": { - "$id": "485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "486", - "kind": "enumvalue", - "name": "item_truncated", - "value": "conversation.item.truncated", - "valueType": { - "$id": "487", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "488", - "kind": "enumvalue", - "name": "response_created", - "value": "response.created", - "valueType": { - "$id": "489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "490", - "kind": "enumvalue", - "name": "response_done", - "value": "response.done", - "valueType": { - "$id": "491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "492", - "kind": "enumvalue", - "name": "rate_limits_updated", - "value": "rate_limits.updated", - "valueType": { - "$id": "493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "494", - "kind": "enumvalue", - "name": "response_output_item_added", - "value": "response.output_item.added", - "valueType": { - "$id": "495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "496", - "kind": "enumvalue", - "name": "response_output_item_done", - "value": "response.output_item.done", - "valueType": { - "$id": "497", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "498", - "kind": "enumvalue", - "name": "response_content_part_added", - "value": "response.content_part.added", - "valueType": { - "$id": "499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "500", - "kind": "enumvalue", - "name": "response_content_part_done", - "value": "response.content_part.done", - "valueType": { - "$id": "501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "502", - "kind": "enumvalue", - "name": "response_audio_delta", - "value": "response.audio.delta", - "valueType": { - "$id": "503", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "504", - "kind": "enumvalue", - "name": "response_audio_done", - "value": "response.audio.done", - "valueType": { - "$id": "505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "506", - "kind": "enumvalue", - "name": "response_audio_transcript_delta", - "value": "response.audio_transcript.delta", - "valueType": { - "$id": "507", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "508", - "kind": "enumvalue", - "name": "response_audio_transcript_done", - "value": "response.audio_transcript.done", - "valueType": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "510", - "kind": "enumvalue", - "name": "response_text_delta", - "value": "response.text.delta", - "valueType": { - "$id": "511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "512", - "kind": "enumvalue", - "name": "response_text_done", - "value": "response.text.done", - "valueType": { - "$id": "513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "514", - "kind": "enumvalue", - "name": "response_function_call_arguments_delta", - "value": "response.function_call_arguments.delta", - "valueType": { - "$id": "515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "516", - "kind": "enumvalue", - "name": "response_function_call_arguments_done", - "value": "response.function_call_arguments.done", - "valueType": { - "$id": "517", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "518", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_started", - "value": "input_audio_buffer.speech_started", - "valueType": { - "$id": "519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "520", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_stopped", - "value": "input_audio_buffer.speech_stopped", - "valueType": { - "$id": "521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "522", - "kind": "enumvalue", - "name": "item_input_audio_transcription_completed", - "value": "conversation.item.input_audio_transcription.completed", - "valueType": { - "$id": "523", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "524", - "kind": "enumvalue", - "name": "item_input_audio_transcription_failed", - "value": "conversation.item.input_audio_transcription.failed", - "valueType": { - "$id": "525", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "526", - "kind": "enumvalue", - "name": "input_audio_buffer_committed", - "value": "input_audio_buffer.committed", - "valueType": { - "$id": "527", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "528", - "kind": "enumvalue", - "name": "input_audio_buffer_cleared", - "value": "input_audio_buffer.cleared", - "valueType": { - "$id": "529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "530", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "532", - "kind": "enum", - "name": "RealtimeResponseSession_object", - "valueType": { - "$id": "533", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "534", - "kind": "enumvalue", - "name": "realtime.session", - "value": "realtime.session", - "description": "realtime.session", - "valueType": { - "$ref": "533" - }, - "enumType": { - "$ref": "532" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseSession_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "535", - "kind": "enum", - "name": "RealtimeResponseItem_object", - "valueType": { - "$id": "536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "537", - "kind": "enumvalue", - "name": "realtime.item", - "value": "realtime.item", - "description": "realtime.item", - "valueType": { - "$ref": "536" - }, - "enumType": { - "$ref": "535" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseItem_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "538", - "kind": "enum", - "name": "RealtimeResponse_object", - "valueType": { - "$id": "539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "540", - "kind": "enumvalue", - "name": "realtime.response", - "value": "realtime.response", - "description": "realtime.response", - "valueType": { - "$ref": "539" - }, - "enumType": { - "$ref": "538" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "541", - "kind": "enum", - "name": "RealtimeResponseStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", - "valueType": { - "$id": "542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "543", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "544", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "545", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "546", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "547", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "549", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "550", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "551", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "552", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "553", - "kind": "enum", - "name": "RealtimeResponseCancelledStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", - "valueType": { - "$id": "554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "555", - "kind": "enumvalue", - "name": "turn_detected", - "value": "turn_detected", - "valueType": { - "$id": "556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - }, - { - "$id": "557", - "kind": "enumvalue", - "name": "client_cancelled", - "value": "client_cancelled", - "valueType": { - "$id": "558", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "559", - "kind": "enum", - "name": "RealtimeResponseIncompleteStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", - "valueType": { - "$id": "560", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "561", - "kind": "enumvalue", - "name": "max_output_tokens", - "value": "max_output_tokens", - "valueType": { - "$id": "562", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - }, - { - "$id": "563", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "564", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "565", - "kind": "enum", - "name": "CreateModerationRequestModel", - "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", - "valueType": { - "$id": "566", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "567", - "kind": "enumvalue", - "name": "text-moderation-latest", - "value": "text-moderation-latest", - "valueType": { - "$id": "568", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - }, - { - "$id": "569", - "kind": "enumvalue", - "name": "text-moderation-stable", - "value": "text-moderation-stable", - "valueType": { - "$id": "570", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "571", - "kind": "enum", - "name": "ListModelsResponse_object", - "valueType": { - "$id": "572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "573", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "572" - }, - "enumType": { - "$ref": "571" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListModelsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "574", - "kind": "enum", - "name": "Model_object", - "valueType": { - "$id": "575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "576", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "575" - }, - "enumType": { - "$ref": "574" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Model_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "577", - "kind": "enum", - "name": "DeleteModelResponse_object", - "valueType": { - "$id": "578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "579", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "578" - }, - "enumType": { - "$ref": "577" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteModelResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "580", - "kind": "enum", - "name": "MessageObject_object", - "valueType": { - "$id": "581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "582", - "kind": "enumvalue", - "name": "thread.message", - "value": "thread.message", - "description": "thread.message", - "valueType": { - "$ref": "581" - }, - "enumType": { - "$ref": "580" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "583", - "kind": "enum", - "name": "MessageObjectStatus", - "crossLanguageDefinitionId": "MessageObject.status.anonymous", - "valueType": { - "$id": "584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "585", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "587", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "588", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "589", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "591", - "kind": "enum", - "name": "MessageObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "593", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "595", - "kind": "enumvalue", - "name": "max_tokens", - "value": "max_tokens", - "valueType": { - "$id": "596", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "597", - "kind": "enumvalue", - "name": "run_cancelled", - "value": "run_cancelled", - "valueType": { - "$id": "598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "599", - "kind": "enumvalue", - "name": "run_expired", - "value": "run_expired", - "valueType": { - "$id": "600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "601", - "kind": "enumvalue", - "name": "run_failed", - "value": "run_failed", - "valueType": { - "$id": "602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "603", - "kind": "enum", - "name": "MessageObjectRole", - "crossLanguageDefinitionId": "MessageObject.role.anonymous", - "valueType": { - "$id": "604", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "605", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "606", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - }, - { - "$id": "607", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "609", - "kind": "enum", - "name": "ListMessagesRequestOrder", - "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", - "valueType": { - "$id": "610", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "611", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - }, - { - "$id": "613", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "615", - "kind": "enum", - "name": "ListMessagesResponse_object", - "valueType": { - "$id": "616", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "617", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "616" - }, - "enumType": { - "$ref": "615" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListMessagesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "618", - "kind": "enum", - "name": "DeleteMessageResponse_object", - "valueType": { - "$id": "619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "620", - "kind": "enumvalue", - "name": "thread.message.deleted", - "value": "thread.message.deleted", - "description": "thread.message.deleted", - "valueType": { - "$ref": "619" - }, - "enumType": { - "$ref": "618" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteMessageResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "621", - "kind": "enum", - "name": "CreateImageRequestModel", - "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", - "valueType": { - "$id": "622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "623", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - }, - { - "$id": "625", - "kind": "enumvalue", - "name": "dall-e-3", - "value": "dall-e-3", - "valueType": { - "$id": "626", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "627", - "kind": "enum", - "name": "CreateImageRequestQuality", - "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", - "valueType": { - "$id": "628", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "629", - "kind": "enumvalue", - "name": "standard", - "value": "standard", - "valueType": { - "$id": "630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - }, - { - "$id": "631", - "kind": "enumvalue", - "name": "hd", - "value": "hd", - "valueType": { - "$id": "632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "633", - "kind": "enum", - "name": "CreateImageRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", - "valueType": { - "$id": "634", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "635", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "636", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - }, - { - "$id": "637", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "639", - "kind": "enum", - "name": "CreateImageRequestSize", - "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", - "valueType": { - "$id": "640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "641", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "642", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "643", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "645", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "646", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "647", - "kind": "enumvalue", - "name": "1792x1024", - "value": "1792x1024", - "valueType": { - "$id": "648", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "649", - "kind": "enumvalue", - "name": "1024x1792", - "value": "1024x1792", - "valueType": { - "$id": "650", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "651", - "kind": "enum", - "name": "CreateImageRequestStyle", - "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", - "valueType": { - "$id": "652", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "653", - "kind": "enumvalue", - "name": "vivid", - "value": "vivid", - "valueType": { - "$id": "654", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - }, - { - "$id": "655", - "kind": "enumvalue", - "name": "natural", - "value": "natural", - "valueType": { - "$id": "656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "657", - "kind": "enum", - "name": "CreateImageEditRequestModel", - "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", - "valueType": { - "$id": "658", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "659", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "660", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "657" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "661", - "kind": "enum", - "name": "CreateImageEditRequestSize", - "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", - "valueType": { - "$id": "662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "663", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "665", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "666", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "667", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "669", - "kind": "enum", - "name": "CreateImageEditRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", - "valueType": { - "$id": "670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "671", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "672", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - }, - { - "$id": "673", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "674", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "675", - "kind": "enum", - "name": "CreateImageVariationRequestModel", - "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", - "valueType": { - "$id": "676", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "677", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "675" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "679", - "kind": "enum", - "name": "CreateImageVariationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", - "valueType": { - "$id": "680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "681", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - }, - { - "$id": "683", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "684", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "685", - "kind": "enum", - "name": "CreateImageVariationRequestSize", - "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", - "valueType": { - "$id": "686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "687", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "689", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "690", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "691", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "692", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "693", - "kind": "enum", - "name": "CreateFineTuningJobRequestModel", - "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", - "valueType": { - "$id": "694", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "695", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "697", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "698", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "699", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "700", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "701", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "703", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "705", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "703" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "707", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "708", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "709", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "710", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "707" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "711", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "712", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "713", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "714", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "711" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "715", - "kind": "enum", - "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "717", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "715" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "719", - "kind": "enum", - "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "720", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "721", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "722", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "719" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "723", - "kind": "enum", - "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "725", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "726", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "723" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "727", - "kind": "enum", - "name": "FineTuningJob_object", - "valueType": { - "$id": "728", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "729", - "kind": "enumvalue", - "name": "fine_tuning.job", - "value": "fine_tuning.job", - "description": "fine_tuning.job", - "valueType": { - "$ref": "728" - }, - "enumType": { - "$ref": "727" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJob_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "730", - "kind": "enum", - "name": "FineTuningJobStatus", - "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", - "valueType": { - "$id": "731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "732", - "kind": "enumvalue", - "name": "validating_files", - "value": "validating_files", - "valueType": { - "$id": "733", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "734", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "736", - "kind": "enumvalue", - "name": "running", - "value": "running", - "valueType": { - "$id": "737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "738", - "kind": "enumvalue", - "name": "succeeded", - "value": "succeeded", - "valueType": { - "$id": "739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "740", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "741", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "742", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "743", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "744", - "kind": "enum", - "name": "ListPaginatedFineTuningJobsResponse_object", - "valueType": { - "$id": "745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "746", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "745" - }, - "enumType": { - "$ref": "744" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListPaginatedFineTuningJobsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "747", - "kind": "enum", - "name": "FineTuningJobCheckpoint_object", - "valueType": { - "$id": "748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "749", - "kind": "enumvalue", - "name": "fine_tuning.job.checkpoint", - "value": "fine_tuning.job.checkpoint", - "description": "fine_tuning.job.checkpoint", - "valueType": { - "$ref": "748" - }, - "enumType": { - "$ref": "747" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobCheckpoint_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "750", - "kind": "enum", - "name": "ListFineTuningJobCheckpointsResponse_object", - "valueType": { - "$id": "751", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "752", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "751" - }, - "enumType": { - "$ref": "750" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobCheckpointsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "753", - "kind": "enum", - "name": "FineTuningJobEventLevel", - "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", - "valueType": { - "$id": "754", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "755", - "kind": "enumvalue", - "name": "info", - "value": "info", - "valueType": { - "$id": "756", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "757", - "kind": "enumvalue", - "name": "warn", - "value": "warn", - "valueType": { - "$id": "758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "759", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "760", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "761", - "kind": "enum", - "name": "FineTuningJobEvent_object", - "valueType": { - "$id": "762", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "763", - "kind": "enumvalue", - "name": "fine_tuning.job.event", - "value": "fine_tuning.job.event", - "description": "fine_tuning.job.event", - "valueType": { - "$ref": "762" - }, - "enumType": { - "$ref": "761" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobEvent_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "764", - "kind": "enum", - "name": "ListFineTuningJobEventsResponse_object", - "valueType": { - "$id": "765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "766", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "765" - }, - "enumType": { - "$ref": "764" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobEventsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "767", - "kind": "enum", - "name": "CreateFileRequestPurpose", - "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", - "valueType": { - "$id": "768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "769", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "771", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "772", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "773", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "774", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "775", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "777", - "kind": "enum", - "name": "ListFilesResponse_object", - "valueType": { - "$id": "778", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "779", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "778" - }, - "enumType": { - "$ref": "777" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "780", - "kind": "enum", - "name": "DeleteFileResponse_object", - "valueType": { - "$id": "781", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "782", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "781" - }, - "enumType": { - "$ref": "780" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "783", - "kind": "enum", - "name": "CreateEmbeddingRequestModel", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", - "valueType": { - "$id": "784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "785", - "kind": "enumvalue", - "name": "text-embedding-ada-002", - "value": "text-embedding-ada-002", - "valueType": { - "$id": "786", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "787", - "kind": "enumvalue", - "name": "text-embedding-3-small", - "value": "text-embedding-3-small", - "valueType": { - "$id": "788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "789", - "kind": "enumvalue", - "name": "text-embedding-3-large", - "value": "text-embedding-3-large", - "valueType": { - "$id": "790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "791", - "kind": "enum", - "name": "CreateEmbeddingRequestEncodingFormat", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", - "valueType": { - "$id": "792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "793", - "kind": "enumvalue", - "name": "float", - "value": "float", - "valueType": { - "$id": "794", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - }, - { - "$id": "795", - "kind": "enumvalue", - "name": "base64", - "value": "base64", - "valueType": { - "$id": "796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "797", - "kind": "enum", - "name": "Embedding_object", - "valueType": { - "$id": "798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "799", - "kind": "enumvalue", - "name": "embedding", - "value": "embedding", - "description": "embedding", - "valueType": { - "$ref": "798" - }, - "enumType": { - "$ref": "797" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Embedding_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "800", - "kind": "enum", - "name": "CreateEmbeddingResponse_object", - "valueType": { - "$id": "801", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "802", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "801" - }, - "enumType": { - "$ref": "800" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateEmbeddingResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "803", - "kind": "enum", - "name": "CreateCompletionRequestModel", - "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", - "valueType": { - "$id": "804", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "805", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-instruct", - "value": "gpt-3.5-turbo-instruct", - "valueType": { - "$id": "806", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "807", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "809", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "810", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "811", - "kind": "enum", - "name": "CreateCompletionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "813", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "815", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "817", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "818", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "819", - "kind": "enum", - "name": "CreateCompletionResponse_object", - "valueType": { - "$id": "820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "821", - "kind": "enumvalue", - "name": "text_completion", - "value": "text_completion", - "description": "text_completion", - "valueType": { - "$ref": "820" - }, - "enumType": { - "$ref": "819" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "822", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartText_type", - "valueType": { - "$id": "823", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "824", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "823" - }, - "enumType": { - "$ref": "822" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartText_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "825", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImage_type", - "valueType": { - "$id": "826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "827", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "826" - }, - "enumType": { - "$ref": "825" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartImage_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "828", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", - "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", - "valueType": { - "$id": "829", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "830", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "832", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "833", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "834", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "836", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartRefusal_type", - "valueType": { - "$id": "837", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "838", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "837" - }, - "enumType": { - "$ref": "836" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartRefusal_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "839", - "kind": "enum", - "name": "ChatCompletionMessageToolCall_type", - "valueType": { - "$id": "840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "841", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "840" - }, - "enumType": { - "$ref": "839" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCall_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "842", - "kind": "enum", - "name": "CreateChatCompletionRequestModel", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", - "valueType": { - "$id": "843", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "844", - "kind": "enumvalue", - "name": "o1-preview", - "value": "o1-preview", - "valueType": { - "$id": "845", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "846", - "kind": "enumvalue", - "name": "o1-preview-2024-09-12", - "value": "o1-preview-2024-09-12", - "valueType": { - "$id": "847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "848", - "kind": "enumvalue", - "name": "o1-mini", - "value": "o1-mini", - "valueType": { - "$id": "849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "850", - "kind": "enumvalue", - "name": "o1-mini-2024-09-12", - "value": "o1-mini-2024-09-12", - "valueType": { - "$id": "851", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "852", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "853", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "854", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "856", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "858", - "kind": "enumvalue", - "name": "chatgpt-4o-latest", - "value": "chatgpt-4o-latest", - "valueType": { - "$id": "859", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "860", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "862", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "864", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "866", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "867", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "868", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "870", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "872", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "874", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "876", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "878", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "880", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "881", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "882", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "884", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "886", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "888", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "890", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "891", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "892", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0301", - "value": "gpt-3.5-turbo-0301", - "valueType": { - "$id": "893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "894", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "895", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "896", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "897", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "898", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "900", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "902", - "kind": "enum", - "name": "CreateChatCompletionRequestServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", - "valueType": { - "$id": "903", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "904", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - }, - { - "$id": "906", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "908", - "kind": "enum", - "name": "ChatCompletionTool_type", - "valueType": { - "$id": "909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "910", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "909" - }, - "enumType": { - "$ref": "908" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionTool_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "911", - "kind": "enum", - "name": "CreateChatCompletionRequestToolChoice", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", - "valueType": { - "$id": "912", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "913", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "915", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "917", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "918", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "919", - "kind": "enum", - "name": "ChatCompletionNamedToolChoice_type", - "valueType": { - "$id": "920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "921", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "920" - }, - "enumType": { - "$ref": "919" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionNamedToolChoice_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "922", - "kind": "enum", - "name": "CreateChatCompletionResponseChoiceFinishReason1", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "924", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "926", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "928", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "929", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "930", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "932", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "934", - "kind": "enum", - "name": "ChatCompletionResponseMessage_role", - "valueType": { - "$id": "935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "936", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "935" - }, - "enumType": { - "$ref": "934" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionResponseMessage_role", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "937", - "kind": "enum", - "name": "CreateChatCompletionResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", - "valueType": { - "$id": "938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "939", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - }, - { - "$id": "941", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "942", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "943", - "kind": "enum", - "name": "CreateChatCompletionResponse_object", - "valueType": { - "$id": "944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "945", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "944" - }, - "enumType": { - "$ref": "943" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "946", - "kind": "enum", - "name": "CreateBatchRequestEndpoint", - "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", - "valueType": { - "$id": "947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "948", - "kind": "enumvalue", - "name": "/v1/chat/completions", - "value": "/v1/chat/completions", - "valueType": { - "$id": "949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - }, - { - "$id": "950", - "kind": "enumvalue", - "name": "/v1/embeddings", - "value": "/v1/embeddings", - "valueType": { - "$id": "951", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "952", - "kind": "enum", - "name": "CreateBatchRequest_completion_window", - "valueType": { - "$id": "953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "954", - "kind": "enumvalue", - "name": "24h", - "value": "24h", - "description": "24h", - "valueType": { - "$ref": "953" - }, - "enumType": { - "$ref": "952" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateBatchRequest_completion_window", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "955", - "kind": "enum", - "name": "Batch_object", - "valueType": { - "$id": "956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "957", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "description": "batch", - "valueType": { - "$ref": "956" - }, - "enumType": { - "$ref": "955" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Batch_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "958", - "kind": "enum", - "name": "BatchErrors_object", - "valueType": { - "$id": "959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "960", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "959" - }, - "enumType": { - "$ref": "958" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchErrors_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "961", - "kind": "enum", - "name": "BatchStatus", - "crossLanguageDefinitionId": "Batch.status.anonymous", - "valueType": { - "$id": "962", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "963", - "kind": "enumvalue", - "name": "validating", - "value": "validating", - "valueType": { - "$id": "964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "965", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "967", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "969", - "kind": "enumvalue", - "name": "finalizing", - "value": "finalizing", - "valueType": { - "$id": "970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "971", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "972", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "973", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "974", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "975", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "977", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "978", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "979", - "kind": "enum", - "name": "ListBatchesResponse_object", - "valueType": { - "$id": "980", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "981", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "980" - }, - "enumType": { - "$ref": "979" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListBatchesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "982", - "kind": "enum", - "name": "CreateAssistantRequestModel", - "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", - "valueType": { - "$id": "983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "984", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "986", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "987", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "988", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "989", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "990", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "992", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "994", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "995", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "996", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "998", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1000", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "1001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1002", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "1003", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1004", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "1005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1006", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "1007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1008", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "1009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1010", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "1011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1012", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "1013", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1014", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "1015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1016", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "1017", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1018", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "1019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1020", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "1021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1022", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "1023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1024", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "1025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1026", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "1027", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1028", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "1029", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1030", - "kind": "enum", - "name": "AssistantObject_object", - "valueType": { - "$id": "1031", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1032", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "1031" - }, - "enumType": { - "$ref": "1030" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1033", - "kind": "enum", - "name": "ListAssistantsRequestOrder", - "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", - "valueType": { - "$id": "1034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1035", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "1036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - }, - { - "$id": "1037", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "1038", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1039", - "kind": "enum", - "name": "ListAssistantsResponse_object", - "valueType": { - "$id": "1040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1041", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1040" - }, - "enumType": { - "$ref": "1039" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListAssistantsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1042", - "kind": "enum", - "name": "DeleteAssistantResponse_object", - "valueType": { - "$id": "1043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1044", - "kind": "enumvalue", - "name": "assistant.deleted", - "value": "assistant.deleted", - "description": "assistant.deleted", - "valueType": { - "$ref": "1043" - }, - "enumType": { - "$ref": "1042" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteAssistantResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1045", - "kind": "enum", - "name": "CreateSpeechRequestModel", - "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", - "valueType": { - "$id": "1046", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1047", - "kind": "enumvalue", - "name": "tts-1", - "value": "tts-1", - "valueType": { - "$id": "1048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - }, - { - "$id": "1049", - "kind": "enumvalue", - "name": "tts-1-hd", - "value": "tts-1-hd", - "valueType": { - "$id": "1050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1051", - "kind": "enum", - "name": "CreateSpeechRequestVoice", - "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", - "valueType": { - "$id": "1052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1053", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "1054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1055", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "1056", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1057", - "kind": "enumvalue", - "name": "fable", - "value": "fable", - "valueType": { - "$id": "1058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1059", - "kind": "enumvalue", - "name": "onyx", - "value": "onyx", - "valueType": { - "$id": "1060", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1061", - "kind": "enumvalue", - "name": "nova", - "value": "nova", - "valueType": { - "$id": "1062", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1063", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "1064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1065", - "kind": "enum", - "name": "CreateSpeechRequestResponseFormat", - "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", - "valueType": { - "$id": "1066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1067", - "kind": "enumvalue", - "name": "mp3", - "value": "mp3", - "valueType": { - "$id": "1068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1069", - "kind": "enumvalue", - "name": "opus", - "value": "opus", - "valueType": { - "$id": "1070", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1071", - "kind": "enumvalue", - "name": "aac", - "value": "aac", - "valueType": { - "$id": "1072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1073", - "kind": "enumvalue", - "name": "flac", - "value": "flac", - "valueType": { - "$id": "1074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1075", - "kind": "enumvalue", - "name": "wav", - "value": "wav", - "valueType": { - "$id": "1076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1077", - "kind": "enumvalue", - "name": "pcm", - "value": "pcm", - "valueType": { - "$id": "1078", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1079", - "kind": "enum", - "name": "CreateTranscriptionRequestModel", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", - "valueType": { - "$id": "1080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1081", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1082", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1079" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1083", - "kind": "enum", - "name": "CreateTranscriptionRequestResponseFormat1", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", - "valueType": { - "$id": "1084", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1085", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1087", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1089", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1091", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1093", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1095", - "kind": "enum", - "name": "CreateTranscriptionRequestTimestampGranularity", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", - "valueType": { - "$id": "1096", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1097", - "kind": "enumvalue", - "name": "word", - "value": "word", - "valueType": { - "$id": "1098", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - }, - { - "$id": "1099", - "kind": "enumvalue", - "name": "segment", - "value": "segment", - "valueType": { - "$id": "1100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1101", - "kind": "enum", - "name": "CreateTranscriptionResponseVerboseJson_task", - "valueType": { - "$id": "1102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1103", - "kind": "enumvalue", - "name": "transcribe", - "value": "transcribe", - "description": "transcribe", - "valueType": { - "$ref": "1102" - }, - "enumType": { - "$ref": "1101" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranscriptionResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1104", - "kind": "enum", - "name": "CreateTranslationRequestModel", - "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", - "valueType": { - "$id": "1105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1106", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1107", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1104" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1108", - "kind": "enum", - "name": "CreateTranslationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", - "valueType": { - "$id": "1109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1110", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1112", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1114", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1116", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1118", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1120", - "kind": "enum", - "name": "CreateTranslationResponseVerboseJson_task", - "valueType": { - "$id": "1121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1122", - "kind": "enumvalue", - "name": "translate", - "value": "translate", - "description": "translate", - "valueType": { - "$ref": "1121" - }, - "enumType": { - "$ref": "1120" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranslationResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1123", - "kind": "enum", - "name": "BatchRequestInput_method", - "valueType": { - "$id": "1124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1125", - "kind": "enumvalue", - "name": "POST", - "value": "POST", - "description": "POST", - "valueType": { - "$ref": "1124" - }, - "enumType": { - "$ref": "1123" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchRequestInput_method", - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1126", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1127", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1128", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1130", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1132", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1133", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1134", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1135", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1136", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponse_object", - "valueType": { - "$id": "1137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1138", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "1137" - }, - "enumType": { - "$ref": "1136" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionFunctionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1139", - "kind": "enum", - "name": "ChatCompletionMessageToolCallChunk_type", - "valueType": { - "$id": "1140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1141", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "1140" - }, - "enumType": { - "$ref": "1139" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCallChunk_type", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1142", - "kind": "enum", - "name": "ChatCompletionStreamResponseDeltaRole", - "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", - "valueType": { - "$id": "1143", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1144", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1145", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1146", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1148", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1149", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1150", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1152", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1153", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1154", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1156", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1158", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "1159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1160", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1162", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1164", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", - "valueType": { - "$id": "1165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1166", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "1167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - }, - { - "$id": "1168", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "1169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1170", - "kind": "enum", - "name": "CreateChatCompletionStreamResponse_object", - "valueType": { - "$id": "1171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1172", - "kind": "enumvalue", - "name": "chat.completion.chunk", - "value": "chat.completion.chunk", - "description": "chat.completion.chunk", - "valueType": { - "$ref": "1171" - }, - "enumType": { - "$ref": "1170" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionStreamResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1173", - "kind": "enum", - "name": "MessageDeltaContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1175", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1177", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1178", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1179", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1181", - "kind": "enum", - "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1183", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1185", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1186", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1187", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1189", - "kind": "enum", - "name": "MessageContentImageFileObject_type", - "valueType": { - "$id": "1190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1191", - "kind": "enumvalue", - "name": "image_file", - "value": "image_file", - "description": "image_file", - "valueType": { - "$ref": "1190" - }, - "enumType": { - "$ref": "1189" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageFileObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1192", - "kind": "enum", - "name": "MessageContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1194", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1196", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1198", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1200", - "kind": "enum", - "name": "MessageContentTextObject_type", - "valueType": { - "$id": "1201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1202", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1201" - }, - "enumType": { - "$ref": "1200" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1203", - "kind": "enum", - "name": "MessageContentRefusalObject_type", - "valueType": { - "$id": "1204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1205", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "1204" - }, - "enumType": { - "$ref": "1203" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentRefusalObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1206", - "kind": "enum", - "name": "MessageContentImageUrlObject_type", - "valueType": { - "$id": "1207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1208", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "1207" - }, - "enumType": { - "$ref": "1206" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageUrlObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1209", - "kind": "enum", - "name": "MessageContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1211", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1213", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1215", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1217", - "kind": "enum", - "name": "MessageDeltaObject_object", - "valueType": { - "$id": "1218", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1219", - "kind": "enumvalue", - "name": "thread.message.delta", - "value": "thread.message.delta", - "description": "thread.message.delta", - "valueType": { - "$ref": "1218" - }, - "enumType": { - "$ref": "1217" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1220", - "kind": "enum", - "name": "MessageDeltaObjectDeltaRole", - "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", - "valueType": { - "$id": "1221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1222", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - }, - { - "$id": "1224", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1226", - "kind": "enum", - "name": "MessageRequestContentTextObject_type", - "valueType": { - "$id": "1227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1228", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1227" - }, - "enumType": { - "$ref": "1226" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageRequestContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1229", - "kind": "enum", - "name": "RunStepDeltaObject_object", - "valueType": { - "$id": "1230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1231", - "kind": "enumvalue", - "name": "thread.run.step.delta", - "value": "thread.run.step.delta", - "description": "thread.run.step.delta", - "valueType": { - "$ref": "1230" - }, - "enumType": { - "$ref": "1229" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1232", - "kind": "enum", - "name": "ListThreadsResponse_object", - "valueType": { - "$id": "1233", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1234", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1233" - }, - "enumType": { - "$ref": "1232" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListThreadsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1235", - "kind": "enum", - "name": "ChatCompletionRole", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", - "valueType": { - "$id": "1236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1237", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1239", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1241", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1243", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1245", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "1246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - } - ], - "access": "public", - "description": "The role of the author of a message", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - } - ], - "Models": [ - { - "$id": "1247", - "kind": "model", - "name": "CreateUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1248", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to upload.", - "type": { - "$id": "1249", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" - }, - { - "$id": "1250", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", - "type": { - "$ref": "2" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" - }, - { - "$id": "1251", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The number of bytes in the file you are uploading.", - "type": { - "$id": "1252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" - }, - { - "$id": "1253", - "kind": "property", - "name": "mime_type", - "serializedName": "mime_type", - "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", - "type": { - "$id": "1254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" - } - ] - }, - { - "$id": "1255", - "kind": "model", - "name": "Upload", - "crossLanguageDefinitionId": "OpenAI.Upload", - "usage": "Output,Json", - "description": "The Upload object can accept byte chunks in the form of Parts.", - "decorators": [], - "properties": [ - { - "$id": "1256", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The Upload unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.id" - }, - { - "$id": "1258", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1259", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1260", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.created_at" - }, - { - "$id": "1261", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to be uploaded.", - "type": { - "$id": "1262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.filename" - }, - { - "$id": "1263", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The intended number of bytes to be uploaded.", - "type": { - "$id": "1264", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.bytes" - }, - { - "$id": "1265", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", - "type": { - "$id": "1266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.purpose" - }, - { - "$id": "1267", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the Upload.", - "type": { - "$ref": "12" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.status" - }, - { - "$id": "1268", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1269", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" - }, - { - "$id": "1271", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"upload\".", - "type": { - "$id": "1272", - "kind": "constant", - "valueType": { - "$ref": "22" - }, - "value": "upload", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.object" - }, - { - "$id": "1273", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The ready File object after the Upload is completed.", - "type": { - "$id": "1274", - "kind": "nullable", - "type": { - "$id": "1275", - "kind": "model", - "name": "OpenAIFile", - "crossLanguageDefinitionId": "OpenAI.OpenAIFile", - "usage": "Output,Json", - "description": "The `File` object represents a document that has been uploaded to OpenAI.", - "decorators": [], - "properties": [ - { - "$id": "1276", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The file identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "1277", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" - }, - { - "$id": "1278", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The size of the file, in bytes.", - "type": { - "$id": "1279", - "kind": "nullable", - "type": { - "$id": "1280", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" - }, - { - "$id": "1281", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the file was created.", - "type": { - "$id": "1282", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" - }, - { - "$id": "1284", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file.", - "type": { - "$id": "1285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" - }, - { - "$id": "1286", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `file`.", - "type": { - "$id": "1287", - "kind": "constant", - "valueType": { - "$ref": "25" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" - }, - { - "$id": "1288", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", - "type": { - "$ref": "28" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" - }, - { - "$id": "1289", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", - "type": { - "$ref": "44" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" - }, - { - "$id": "1290", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", - "type": { - "$id": "1291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.file" - } - ] - }, - { - "$ref": "1275" - }, - { - "$id": "1292", - "kind": "model", - "name": "ErrorResponse", - "crossLanguageDefinitionId": "OpenAI.ErrorResponse", - "usage": "Output,Error,Json", - "decorators": [], - "properties": [ - { - "$id": "1293", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "1294", - "kind": "model", - "name": "Error", - "crossLanguageDefinitionId": "OpenAI.Error", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1295", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "1296", - "kind": "nullable", - "type": { - "$id": "1297", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.code" - }, - { - "$id": "1298", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "1299", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.message" - }, - { - "$id": "1300", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "1301", - "kind": "nullable", - "type": { - "$id": "1302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.param" - }, - { - "$id": "1303", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.type" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" - } - ] - }, - { - "$ref": "1294" - }, - { - "$id": "1305", - "kind": "model", - "name": "AddUploadPartRequest", - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "1306", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The chunk of bytes for this Part.", - "type": { - "$id": "1307", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" - } - ] - }, - { - "$id": "1308", - "kind": "model", - "name": "UploadPart", - "crossLanguageDefinitionId": "OpenAI.UploadPart", - "usage": "Output,Json", - "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", - "decorators": [], - "properties": [ - { - "$id": "1309", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The upload Part unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.id" - }, - { - "$id": "1311", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Part was created.", - "type": { - "$id": "1312", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1313", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" - }, - { - "$id": "1314", - "kind": "property", - "name": "upload_id", - "serializedName": "upload_id", - "description": "The ID of the Upload object that this Part was added to.", - "type": { - "$id": "1315", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" - }, - { - "$id": "1316", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `upload.part`.", - "type": { - "$id": "1317", - "kind": "constant", - "valueType": { - "$ref": "52" - }, - "value": "upload.part", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.object" - } - ] - }, - { - "$id": "1318", - "kind": "model", - "name": "CompleteUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1319", - "kind": "property", - "name": "part_ids", - "serializedName": "part_ids", - "description": "The ordered list of Part IDs.", - "type": { - "$id": "1320", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" - }, - { - "$id": "1322", - "kind": "property", - "name": "md5", - "serializedName": "md5", - "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", - "type": { - "$id": "1323", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" - } - ] - }, - { - "$id": "1324", - "kind": "model", - "name": "ListVectorStoresResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1326", - "kind": "constant", - "valueType": { - "$ref": "61" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" - }, - { - "$id": "1327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1328", - "kind": "array", - "name": "ArrayVectorStoreObject", - "valueType": { - "$id": "1329", - "kind": "model", - "name": "VectorStoreObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", - "usage": "Output,Json", - "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", - "decorators": [], - "properties": [ - { - "$id": "1330", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" - }, - { - "$id": "1332", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store`.", - "type": { - "$id": "1333", - "kind": "constant", - "valueType": { - "$ref": "64" - }, - "value": "vector_store", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" - }, - { - "$id": "1334", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store was created.", - "type": { - "$id": "1335", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1336", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" - }, - { - "$id": "1337", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" - }, - { - "$id": "1339", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total number of bytes used by the files in the vector store.", - "type": { - "$id": "1340", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" - }, - { - "$id": "1341", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1342", - "kind": "model", - "name": "VectorStoreObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1343", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1344", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1345", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been successfully processed.", - "type": { - "$id": "1346", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" - }, - { - "$id": "1347", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1348", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" - }, - { - "$id": "1349", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that were cancelled.", - "type": { - "$id": "1350", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1351", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1352", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" - }, - { - "$id": "1353", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", - "type": { - "$ref": "67" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" - }, - { - "$id": "1354", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1355", - "kind": "model", - "name": "VectorStoreExpirationAfter", - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", - "usage": "Input,Output,Json", - "description": "The expiration policy for a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1356", - "kind": "property", - "name": "anchor", - "serializedName": "anchor", - "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", - "type": { - "$id": "1357", - "kind": "constant", - "valueType": { - "$ref": "75" - }, - "value": "last_active_at", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" - }, - { - "$id": "1358", - "kind": "property", - "name": "days", - "serializedName": "days", - "description": "The number of days after the anchor time that the vector store will expire.", - "type": { - "$id": "1359", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" - }, - { - "$id": "1360", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the vector store will expire.", - "type": { - "$id": "1361", - "kind": "nullable", - "type": { - "$id": "1362", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1363", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" - }, - { - "$id": "1364", - "kind": "property", - "name": "last_active_at", - "serializedName": "last_active_at", - "description": "The Unix timestamp (in seconds) for when the vector store was last active.", - "type": { - "$id": "1365", - "kind": "nullable", - "type": { - "$id": "1366", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1367", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" - }, - { - "$id": "1368", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1369", - "kind": "nullable", - "type": { - "$id": "1370", - "kind": "dict", - "keyType": { - "$id": "1371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1372", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" - }, - { - "$id": "1373", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" - }, - { - "$id": "1375", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1376", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" - }, - { - "$id": "1377", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1378", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" - } - ] - }, - { - "$ref": "1329" - }, - { - "$ref": "1342" - }, - { - "$ref": "1355" - }, - { - "$id": "1379", - "kind": "model", - "name": "CreateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1380", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1381", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" - }, - { - "$id": "1383", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1384", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" - }, - { - "$id": "1385", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$ref": "1355" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" - }, - { - "$id": "1386", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1387", - "kind": "union", - "name": "CreateVectorStoreRequestChunkingStrategy", - "variantTypes": [ - { - "$id": "1388", - "kind": "model", - "name": "AutoChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", - "usage": "Input,Json", - "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$id": "1389", - "kind": "model", - "name": "FileChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1390", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" - }, - "properties": [ - { - "$ref": "1390" - } - ], - "discriminatedSubtypes": { - "$id": "1392", - "auto": { - "$ref": "1388" - }, - "static": { - "$id": "1393", - "kind": "model", - "name": "StaticChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", - "usage": "Input,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$ref": "1389" - }, - "properties": [ - { - "$id": "1394", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1395", - "kind": "constant", - "valueType": { - "$id": "1396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" - }, - { - "$id": "1397", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$id": "1398", - "kind": "model", - "name": "StaticChunkingStrategy", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1399", - "kind": "property", - "name": "max_chunk_size_tokens", - "serializedName": "max_chunk_size_tokens", - "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", - "type": { - "$id": "1400", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" - }, - { - "$id": "1401", - "kind": "property", - "name": "chunk_overlap_tokens", - "serializedName": "chunk_overlap_tokens", - "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", - "type": { - "$id": "1402", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" - } - ] - } - } - }, - "properties": [ - { - "$id": "1403", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `auto`.", - "type": { - "$id": "1404", - "kind": "constant", - "valueType": { - "$id": "1405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" - } - ] - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" - }, - { - "$id": "1406", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1407", - "kind": "nullable", - "type": { - "$id": "1408", - "kind": "dict", - "keyType": { - "$id": "1409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" - } - ] - }, - { - "$ref": "1388" - }, - { - "$ref": "1389" - }, - { - "$ref": "1393" - }, - { - "$ref": "1398" - }, - { - "$id": "1411", - "kind": "model", - "name": "UpdateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1412", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1413", - "kind": "nullable", - "type": { - "$id": "1414", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" - }, - { - "$id": "1415", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1416", - "kind": "nullable", - "type": { - "$ref": "1355" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" - }, - { - "$id": "1417", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1418", - "kind": "nullable", - "type": { - "$id": "1419", - "kind": "dict", - "keyType": { - "$id": "1420", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" - } - ] - }, - { - "$id": "1422", - "kind": "model", - "name": "DeleteVectorStoreResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1423", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" - }, - { - "$id": "1425", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1426", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" - }, - { - "$id": "1427", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1428", - "kind": "constant", - "valueType": { - "$ref": "78" - }, - "value": "vector_store.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" - } - ] - }, - { - "$id": "1429", - "kind": "model", - "name": "ListVectorStoreFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1430", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1431", - "kind": "constant", - "valueType": { - "$ref": "97" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" - }, - { - "$id": "1432", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1433", - "kind": "array", - "name": "ArrayVectorStoreFileObject", - "valueType": { - "$id": "1434", - "kind": "model", - "name": "VectorStoreFileObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", - "usage": "Output,Json", - "description": "A list of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1435", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1436", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" - }, - { - "$id": "1437", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file`.", - "type": { - "$id": "1438", - "kind": "constant", - "valueType": { - "$ref": "100" - }, - "value": "vector_store.file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" - }, - { - "$id": "1439", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", - "type": { - "$id": "1440", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" - }, - { - "$id": "1441", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store file was created.", - "type": { - "$id": "1442", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1443", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" - }, - { - "$id": "1444", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" - }, - { - "$id": "1446", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", - "type": { - "$ref": "103" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" - }, - { - "$id": "1447", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", - "type": { - "$id": "1448", - "kind": "nullable", - "type": { - "$id": "1449", - "kind": "model", - "name": "VectorStoreFileObjectLastError", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1450", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "113" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" - }, - { - "$id": "1451", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1452", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" - }, - { - "$id": "1453", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The strategy used to chunk the file.", - "type": { - "$id": "1454", - "kind": "union", - "name": "VectorStoreFileObjectChunkingStrategy", - "variantTypes": [ - { - "$id": "1455", - "kind": "model", - "name": "StaticChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$id": "1456", - "kind": "model", - "name": "FileChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1457", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1458", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" - }, - "properties": [ - { - "$ref": "1457" - } - ], - "discriminatedSubtypes": { - "$id": "1459", - "static": { - "$ref": "1455" - }, - "other": { - "$id": "1460", - "kind": "model", - "name": "OtherChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", - "discriminatorValue": "other", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1461", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `other`.", - "type": { - "$id": "1462", - "kind": "constant", - "valueType": { - "$id": "1463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "other", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" - } - ] - }, - "auto": { - "$id": "1464", - "kind": "model", - "name": "AutoChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1465", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1466", - "kind": "constant", - "valueType": { - "$id": "1467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" - } - ] - } - } - }, - "properties": [ - { - "$id": "1468", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1469", - "kind": "constant", - "valueType": { - "$id": "1470", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" - }, - { - "$id": "1471", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$ref": "1398" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" - } - ] - }, - { - "$ref": "1460" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" - }, - { - "$id": "1472", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" - }, - { - "$id": "1474", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" - }, - { - "$id": "1476", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1477", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" - } - ] - }, - { - "$ref": "1434" - }, - { - "$ref": "1449" - }, - { - "$ref": "1455" - }, - { - "$ref": "1456" - }, - { - "$ref": "1460" - }, - { - "$ref": "1464" - }, - { - "$id": "1478", - "kind": "model", - "name": "CreateVectorStoreFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1479", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1480", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" - }, - { - "$id": "1481", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1482", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" - } - ] - }, - { - "$id": "1483", - "kind": "model", - "name": "DeleteVectorStoreFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1484", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" - }, - { - "$id": "1486", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1487", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" - }, - { - "$id": "1488", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1489", - "kind": "constant", - "valueType": { - "$ref": "121" - }, - "value": "vector_store.file.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" - } - ] - }, - { - "$id": "1490", - "kind": "model", - "name": "CreateVectorStoreFileBatchRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1491", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1492", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" - }, - { - "$id": "1494", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1495", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" - } - ] - }, - { - "$id": "1496", - "kind": "model", - "name": "VectorStoreFileBatchObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", - "usage": "Output,Json", - "description": "A batch of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1497", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" - }, - { - "$id": "1499", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file_batch`.", - "type": { - "$id": "1500", - "kind": "constant", - "valueType": { - "$ref": "124" - }, - "value": "vector_store.files_batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" - }, - { - "$id": "1501", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", - "type": { - "$id": "1502", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1503", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" - }, - { - "$id": "1504", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" - }, - { - "$id": "1506", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", - "type": { - "$ref": "127" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" - }, - { - "$id": "1507", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1508", - "kind": "model", - "name": "VectorStoreFileBatchObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1509", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1510", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1511", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been processed.", - "type": { - "$id": "1512", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" - }, - { - "$id": "1513", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1514", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" - }, - { - "$id": "1515", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that where cancelled.", - "type": { - "$id": "1516", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1517", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1518", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" - } - ] - }, - { - "$ref": "1508" - }, - { - "$id": "1519", - "kind": "model", - "name": "CreateThreadAndRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1520", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" - }, - { - "$id": "1522", - "kind": "property", - "name": "thread", - "serializedName": "thread", - "description": "If no thread is provided, an empty thread will be created.", - "type": { - "$id": "1523", - "kind": "model", - "name": "CreateThreadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1524", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", - "type": { - "$id": "1525", - "kind": "array", - "name": "ArrayCreateMessageRequest", - "valueType": { - "$id": "1526", - "kind": "model", - "name": "CreateMessageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1527", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", - "type": { - "$ref": "143" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" - }, - { - "$id": "1528", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "1529", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$id": "1530", - "kind": "model", - "name": "MessageContent", - "crossLanguageDefinitionId": "OpenAI.MessageContent", - "access": "public", - "usage": "Input,Output,Json", - "description": "Represents a single piece of content in an Assistants API message.", - "decorators": [], - "properties": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" - }, - { - "$id": "1531", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they should be added to.", - "type": { - "$id": "1532", - "kind": "nullable", - "type": { - "$id": "1533", - "kind": "array", - "name": "CreateMessageRequestAttachments", - "valueType": { - "$id": "1534", - "kind": "model", - "name": "CreateMessageRequestAttachment", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1535", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "1536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" - }, - { - "$id": "1537", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "1538", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1539", - "kind": "union", - "name": "CreateMessageRequestAttachmentTool", - "variantTypes": [ - { - "$id": "1540", - "kind": "model", - "name": "AssistantToolsCode", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", - "usage": "Input,Output,Json", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$id": "1541", - "kind": "model", - "name": "AssistantToolDefinition", - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1542", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1543", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" - }, - "properties": [ - { - "$ref": "1542" - } - ], - "discriminatedSubtypes": { - "$id": "1544", - "code_interpreter": { - "$ref": "1540" - }, - "file_search": { - "$id": "1545", - "kind": "model", - "name": "AssistantToolsFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", - "usage": "Input,Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1546", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1547", - "kind": "constant", - "valueType": { - "$id": "1548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" - }, - { - "$id": "1549", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "Overrides for the file search tool.", - "type": { - "$id": "1550", - "kind": "model", - "name": "AssistantToolsFileSearchFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1551", - "kind": "property", - "name": "max_num_results", - "serializedName": "max_num_results", - "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "type": { - "$id": "1552", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" - }, - { - "$id": "1553", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1554", - "kind": "model", - "name": "FileSearchRankingOptions", - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", - "usage": "Input,Output,Json", - "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "decorators": [], - "properties": [ - { - "$id": "1555", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", - "type": { - "$ref": "149" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" - }, - { - "$id": "1556", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1557", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" - } - ] - }, - "function": { - "$id": "1558", - "kind": "model", - "name": "AssistantToolsFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", - "usage": "Input,Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1559", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `function`", - "type": { - "$id": "1560", - "kind": "constant", - "valueType": { - "$id": "1561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" - }, - { - "$id": "1562", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1563", - "kind": "model", - "name": "FunctionObject", - "crossLanguageDefinitionId": "OpenAI.FunctionObject", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1564", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "1565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" - }, - { - "$id": "1566", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" - }, - { - "$id": "1568", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "1569", - "kind": "model", - "name": "FunctionParameters", - "crossLanguageDefinitionId": "OpenAI.FunctionParameters", - "usage": "Input,Output,Json", - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", - "decorators": [], - "additionalProperties": { - "$id": "1570", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" - }, - { - "$id": "1571", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", - "type": { - "$id": "1572", - "kind": "nullable", - "type": { - "$id": "1573", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" - } - ] - } - } - }, - "properties": [ - { - "$id": "1574", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `code_interpreter`", - "type": { - "$id": "1575", - "kind": "constant", - "valueType": { - "$id": "1576", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" - } - ] - }, - { - "$id": "1577", - "kind": "model", - "name": "AssistantToolsFileSearchTypeOnly", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1578", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1579", - "kind": "constant", - "valueType": { - "$ref": "155" - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" - }, - { - "$id": "1580", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1581", - "kind": "nullable", - "type": { - "$id": "1582", - "kind": "dict", - "keyType": { - "$id": "1583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" - }, - { - "$id": "1585", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1586", - "kind": "nullable", - "type": { - "$id": "1587", - "kind": "model", - "name": "CreateThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1588", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1589", - "kind": "model", - "name": "CreateThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1590", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1591", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1593", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1594", - "kind": "model", - "name": "ToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1595", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1596", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1597", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" - }, - { - "$id": "1598", - "kind": "property", - "name": "vector_stores", - "serializedName": "vector_stores", - "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", - "type": { - "$id": "1599", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1600", - "kind": "model", - "name": "ToolResourcesFileSearchVectorStore", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1601", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", - "type": { - "$id": "1602", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" - }, - { - "$id": "1604", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1605", - "kind": "union", - "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" - }, - { - "$id": "1606", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1607", - "kind": "dict", - "keyType": { - "$id": "1608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" - }, - { - "$id": "1610", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1611", - "kind": "nullable", - "type": { - "$id": "1612", - "kind": "dict", - "keyType": { - "$id": "1613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" - }, - { - "$id": "1615", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1616", - "kind": "nullable", - "type": { - "$ref": "158" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" - }, - { - "$id": "1617", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1618", - "kind": "nullable", - "type": { - "$id": "1619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" - }, - { - "$id": "1620", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1621", - "kind": "nullable", - "type": { - "$id": "1622", - "kind": "array", - "name": "CreateThreadAndRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" - }, - { - "$id": "1623", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1624", - "kind": "nullable", - "type": { - "$id": "1625", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1626", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1627", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1628", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1629", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1631", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1632", - "kind": "model", - "name": "ToolResourcesFileSearchIdsOnly", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1633", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1634", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" - }, - { - "$id": "1636", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1637", - "kind": "nullable", - "type": { - "$id": "1638", - "kind": "dict", - "keyType": { - "$id": "1639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" - }, - { - "$id": "1641", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1642", - "kind": "nullable", - "type": { - "$id": "1643", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" - }, - { - "$id": "1644", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1645", - "kind": "nullable", - "type": { - "$id": "1646", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" - }, - { - "$id": "1647", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1648", - "kind": "nullable", - "type": { - "$id": "1649", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" - }, - { - "$id": "1650", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1651", - "kind": "nullable", - "type": { - "$id": "1652", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" - }, - { - "$id": "1653", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1654", - "kind": "nullable", - "type": { - "$id": "1655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" - }, - { - "$id": "1656", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1657", - "kind": "nullable", - "type": { - "$id": "1658", - "kind": "model", - "name": "TruncationObject", - "crossLanguageDefinitionId": "OpenAI.TruncationObject", - "usage": "Input,Output,Json", - "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", - "decorators": [], - "properties": [ - { - "$id": "1659", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", - "type": { - "$ref": "206" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" - }, - { - "$id": "1660", - "kind": "property", - "name": "last_messages", - "serializedName": "last_messages", - "description": "The number of most recent messages from the thread when constructing the context for the run.", - "type": { - "$id": "1661", - "kind": "nullable", - "type": { - "$id": "1662", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" - }, - { - "$id": "1663", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1664", - "kind": "nullable", - "type": { - "$id": "1665", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$id": "1666", - "kind": "model", - "name": "AssistantsNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", - "usage": "Input,Output,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", - "decorators": [], - "properties": [ - { - "$id": "1667", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. If type is `function`, the function name must be set", - "type": { - "$ref": "220" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" - }, - { - "$id": "1668", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1669", - "kind": "model", - "name": "AssistantsNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1670", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "1671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" - }, - { - "$id": "1672", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" - }, - { - "$id": "1674", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1675", - "kind": "nullable", - "type": { - "$id": "1676", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1677", - "kind": "constant", - "valueType": { - "$id": "1678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "1679", - "kind": "model", - "name": "ResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", - "usage": "Input,Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$id": "1680", - "kind": "model", - "name": "OmniTypedResponseFormat", - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1681", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" - }, - "properties": [ - { - "$ref": "1681" - } - ], - "discriminatedSubtypes": { - "$id": "1683", - "text": { - "$ref": "1679" - }, - "json_object": { - "$id": "1684", - "kind": "model", - "name": "ResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", - "usage": "Input,Output,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1685", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "1686", - "kind": "constant", - "valueType": { - "$id": "1687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "1688", - "kind": "model", - "name": "ResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", - "usage": "Input,Output,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1689", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "1690", - "kind": "constant", - "valueType": { - "$id": "1691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" - }, - { - "$id": "1692", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$id": "1693", - "kind": "model", - "name": "ResponseFormatJsonSchemaJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1694", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", - "type": { - "$id": "1695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" - }, - { - "$id": "1696", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" - }, - { - "$id": "1698", - "kind": "property", - "name": "schema", - "serializedName": "schema", - "type": { - "$id": "1699", - "kind": "model", - "name": "ResponseFormatJsonSchemaSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", - "usage": "Input,Output,Json", - "description": "The schema for the response format, described as a JSON Schema object.", - "decorators": [], - "additionalProperties": { - "$id": "1700", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" - }, - { - "$id": "1701", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", - "type": { - "$id": "1702", - "kind": "nullable", - "type": { - "$id": "1703", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "properties": [ - { - "$id": "1704", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "1705", - "kind": "constant", - "valueType": { - "$id": "1706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" - } - ] - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" - } - ] - }, - { - "$ref": "1523" - }, - { - "$ref": "1526" - }, - { - "$ref": "1530" - }, - { - "$ref": "1534" - }, - { - "$ref": "1540" - }, - { - "$ref": "1541" - }, - { - "$ref": "1545" - }, - { - "$ref": "1550" - }, - { - "$ref": "1554" - }, - { - "$ref": "1558" - }, - { - "$ref": "1563" - }, - { - "$ref": "1569" - }, - { - "$ref": "1577" - }, - { - "$ref": "1587" - }, - { - "$ref": "1589" - }, - { - "$ref": "1594" - }, - { - "$ref": "1600" - }, - { - "$ref": "1625" - }, - { - "$ref": "1627" - }, - { - "$ref": "1632" - }, - { - "$ref": "1658" - }, - { - "$ref": "1666" - }, - { - "$ref": "1669" - }, - { - "$ref": "1679" - }, - { - "$ref": "1680" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - }, - { - "$ref": "1693" - }, - { - "$ref": "1699" - }, - { - "$id": "1707", - "kind": "model", - "name": "RunObject", - "crossLanguageDefinitionId": "OpenAI.RunObject", - "usage": "Output,Json", - "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "1708", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.id" - }, - { - "$id": "1710", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run`.", - "type": { - "$id": "1711", - "kind": "constant", - "valueType": { - "$ref": "228" - }, - "value": "thread.run", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.object" - }, - { - "$id": "1712", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run was created.", - "type": { - "$id": "1713", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1714", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" - }, - { - "$id": "1715", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", - "type": { - "$id": "1716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" - }, - { - "$id": "1717", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", - "type": { - "$id": "1718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" - }, - { - "$id": "1719", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", - "type": { - "$ref": "231" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.status" - }, - { - "$id": "1720", - "kind": "property", - "name": "required_action", - "serializedName": "required_action", - "description": "Details on the action required to continue the run. Will be `null` if no action is required.", - "type": { - "$id": "1721", - "kind": "nullable", - "type": { - "$id": "1722", - "kind": "model", - "name": "RunObjectRequiredAction", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1723", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "For now, this is always `submit_tool_outputs`.", - "type": { - "$id": "1724", - "kind": "constant", - "valueType": { - "$ref": "251" - }, - "value": "submit_tool_outputs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" - }, - { - "$id": "1725", - "kind": "property", - "name": "submit_tool_outputs", - "serializedName": "submit_tool_outputs", - "description": "Details on the tool outputs needed for this run to continue.", - "type": { - "$id": "1726", - "kind": "model", - "name": "RunObjectRequiredActionSubmitToolOutputs", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1727", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "A list of the relevant tool calls.", - "type": { - "$id": "1728", - "kind": "array", - "name": "ArrayRunToolCallObject", - "valueType": { - "$id": "1729", - "kind": "model", - "name": "RunToolCallObject", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", - "usage": "Output,Json", - "description": "Tool call objects", - "decorators": [], - "properties": [ - { - "$id": "1730", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", - "type": { - "$id": "1731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" - }, - { - "$id": "1732", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call the output is required for. For now, this is always `function`.", - "type": { - "$id": "1733", - "kind": "constant", - "valueType": { - "$ref": "254" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" - }, - { - "$id": "1734", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function definition.", - "type": { - "$id": "1735", - "kind": "model", - "name": "RunToolCallObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1736", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "1737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" - }, - { - "$id": "1738", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments that the model expects you to pass to the function.", - "type": { - "$id": "1739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" - }, - { - "$id": "1740", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run. Will be `null` if there are no errors.", - "type": { - "$id": "1741", - "kind": "nullable", - "type": { - "$id": "1742", - "kind": "model", - "name": "RunObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1743", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", - "type": { - "$ref": "257" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" - }, - { - "$id": "1744", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" - }, - { - "$id": "1746", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the run will expire.", - "type": { - "$id": "1747", - "kind": "nullable", - "type": { - "$id": "1748", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1749", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" - }, - { - "$id": "1750", - "kind": "property", - "name": "started_at", - "serializedName": "started_at", - "description": "The Unix timestamp (in seconds) for when the run was started.", - "type": { - "$id": "1751", - "kind": "nullable", - "type": { - "$id": "1752", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1753", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" - }, - { - "$id": "1754", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run was cancelled.", - "type": { - "$id": "1755", - "kind": "nullable", - "type": { - "$id": "1756", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1757", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" - }, - { - "$id": "1758", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run failed.", - "type": { - "$id": "1759", - "kind": "nullable", - "type": { - "$id": "1760", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1761", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" - }, - { - "$id": "1762", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run was completed.", - "type": { - "$id": "1763", - "kind": "nullable", - "type": { - "$id": "1764", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1765", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" - }, - { - "$id": "1766", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", - "type": { - "$id": "1767", - "kind": "nullable", - "type": { - "$id": "1768", - "kind": "model", - "name": "RunObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1769", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", - "type": { - "$ref": "265" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" - }, - { - "$id": "1770", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1771", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.model" - }, - { - "$id": "1772", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" - }, - { - "$id": "1774", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1775", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tools" - }, - { - "$id": "1776", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1777", - "kind": "nullable", - "type": { - "$id": "1778", - "kind": "dict", - "keyType": { - "$id": "1779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1780", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" - }, - { - "$id": "1781", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "1782", - "kind": "nullable", - "type": { - "$id": "1783", - "kind": "model", - "name": "RunCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", - "decorators": [], - "properties": [ - { - "$id": "1784", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run.", - "type": { - "$id": "1785", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" - }, - { - "$id": "1786", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run.", - "type": { - "$id": "1787", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" - }, - { - "$id": "1788", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "1789", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.usage" - }, - { - "$id": "1790", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature used for this run. If not set, defaults to 1.", - "type": { - "$id": "1791", - "kind": "nullable", - "type": { - "$id": "1792", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" - }, - { - "$id": "1793", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", - "type": { - "$id": "1794", - "kind": "nullable", - "type": { - "$id": "1795", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" - }, - { - "$id": "1796", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", - "type": { - "$id": "1797", - "kind": "nullable", - "type": { - "$id": "1798", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" - }, - { - "$id": "1799", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens specified to have been used over the course of the run.", - "type": { - "$id": "1800", - "kind": "nullable", - "type": { - "$id": "1801", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" - }, - { - "$id": "1802", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1803", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" - }, - { - "$id": "1804", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1805", - "kind": "nullable", - "type": { - "$id": "1806", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" - }, - { - "$id": "1807", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1808", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" - }, - { - "$id": "1809", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1810", - "kind": "nullable", - "type": { - "$id": "1811", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1812", - "kind": "constant", - "valueType": { - "$id": "1813", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" - } - ] - }, - { - "$ref": "1722" - }, - { - "$ref": "1726" - }, - { - "$ref": "1729" - }, - { - "$ref": "1735" - }, - { - "$ref": "1742" - }, - { - "$ref": "1768" - }, - { - "$ref": "1783" - }, - { - "$id": "1814", - "kind": "model", - "name": "CreateRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1815", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" - }, - { - "$id": "1817", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1818", - "kind": "nullable", - "type": { - "$ref": "271" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" - }, - { - "$id": "1819", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1820", - "kind": "nullable", - "type": { - "$id": "1821", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" - }, - { - "$id": "1822", - "kind": "property", - "name": "additional_instructions", - "serializedName": "additional_instructions", - "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", - "type": { - "$id": "1823", - "kind": "nullable", - "type": { - "$id": "1824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" - }, - { - "$id": "1825", - "kind": "property", - "name": "additional_messages", - "serializedName": "additional_messages", - "description": "Adds additional messages to the thread before creating the run.", - "type": { - "$id": "1826", - "kind": "nullable", - "type": { - "$id": "1827", - "kind": "array", - "name": "CreateRunRequestAdditional_messages", - "valueType": { - "$ref": "1526" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" - }, - { - "$id": "1828", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1829", - "kind": "nullable", - "type": { - "$id": "1830", - "kind": "array", - "name": "CreateRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" - }, - { - "$id": "1831", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1832", - "kind": "nullable", - "type": { - "$id": "1833", - "kind": "dict", - "keyType": { - "$id": "1834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" - }, - { - "$id": "1836", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1837", - "kind": "nullable", - "type": { - "$id": "1838", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" - }, - { - "$id": "1839", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1840", - "kind": "nullable", - "type": { - "$id": "1841", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" - }, - { - "$id": "1842", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1843", - "kind": "nullable", - "type": { - "$id": "1844", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" - }, - { - "$id": "1845", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1846", - "kind": "nullable", - "type": { - "$id": "1847", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" - }, - { - "$id": "1848", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1849", - "kind": "nullable", - "type": { - "$id": "1850", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" - }, - { - "$id": "1851", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1852", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" - }, - { - "$id": "1853", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1854", - "kind": "nullable", - "type": { - "$id": "1855", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" - }, - { - "$id": "1856", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1857", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" - }, - { - "$id": "1858", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1859", - "kind": "nullable", - "type": { - "$id": "1860", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1861", - "kind": "constant", - "valueType": { - "$id": "1862", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" - } - ] - }, - { - "$id": "1863", - "kind": "model", - "name": "ListRunsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1864", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1865", - "kind": "constant", - "valueType": { - "$ref": "325" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" - }, - { - "$id": "1866", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1867", - "kind": "array", - "name": "ArrayRunObject", - "valueType": { - "$ref": "1707" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" - }, - { - "$id": "1868", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" - }, - { - "$id": "1870", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" - }, - { - "$id": "1872", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1873", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" - } - ] - }, - { - "$id": "1874", - "kind": "model", - "name": "ModifyRunRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1875", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1876", - "kind": "nullable", - "type": { - "$id": "1877", - "kind": "dict", - "keyType": { - "$id": "1878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" - } - ] - }, - { - "$id": "1880", - "kind": "model", - "name": "SubmitToolOutputsRunRequest", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1881", - "kind": "property", - "name": "tool_outputs", - "serializedName": "tool_outputs", - "description": "A list of tools for which the outputs are being submitted.", - "type": { - "$id": "1882", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1883", - "kind": "model", - "name": "SubmitToolOutputsRunRequestToolOutput", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1884", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", - "type": { - "$id": "1885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" - }, - { - "$id": "1886", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the tool call to be submitted to continue the run.", - "type": { - "$id": "1887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" - }, - { - "$id": "1888", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1889", - "kind": "nullable", - "type": { - "$id": "1890", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" - } - ] - }, - { - "$ref": "1883" - }, - { - "$id": "1891", - "kind": "model", - "name": "ListRunStepsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1892", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1893", - "kind": "constant", - "valueType": { - "$ref": "334" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" - }, - { - "$id": "1894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1895", - "kind": "array", - "name": "ArrayRunStepObject", - "valueType": { - "$id": "1896", - "kind": "model", - "name": "RunStepObject", - "crossLanguageDefinitionId": "OpenAI.RunStepObject", - "usage": "Output,Json", - "description": "Represents a step in execution of a run.", - "decorators": [], - "properties": [ - { - "$id": "1897", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "1898", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" - }, - { - "$id": "1899", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step`.", - "type": { - "$id": "1900", - "kind": "constant", - "valueType": { - "$ref": "337" - }, - "value": "thread.run.step", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" - }, - { - "$id": "1901", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run step was created.", - "type": { - "$id": "1902", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1903", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" - }, - { - "$id": "1904", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", - "type": { - "$id": "1905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" - }, - { - "$id": "1906", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "type": { - "$id": "1907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" - }, - { - "$id": "1908", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", - "type": { - "$id": "1909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" - }, - { - "$id": "1910", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", - "type": { - "$ref": "340" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" - }, - { - "$id": "1911", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", - "type": { - "$ref": "346" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" - }, - { - "$id": "1912", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$id": "1913", - "kind": "model", - "name": "RunStepObjectStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", - "usage": "Output,Json", - "description": "Abstractly represents a run step details object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1914", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1915", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" - }, - "properties": [ - { - "$ref": "1914" - } - ], - "discriminatedSubtypes": { - "$id": "1916", - "message_creation": { - "$id": "1917", - "kind": "model", - "name": "RunStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", - "usage": "Output,Json", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1918", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "1919", - "kind": "constant", - "valueType": { - "$id": "1920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" - }, - { - "$id": "1921", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "1922", - "kind": "model", - "name": "RunStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1923", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "1924", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "1925", - "kind": "model", - "name": "RunStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", - "usage": "Output,Json", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1926", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "1927", - "kind": "constant", - "valueType": { - "$id": "1928", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" - }, - { - "$id": "1929", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "1930", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "1931", - "kind": "model", - "name": "RunStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1932", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "1932" - } - ], - "discriminatedSubtypes": { - "$id": "1934", - "code_interpreter": { - "$id": "1935", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", - "usage": "Output,Json", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1936", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "1937", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "1938", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "1939", - "kind": "constant", - "valueType": { - "$id": "1940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "1941", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "1942", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1943", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "1944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "1945", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "1946", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "1947", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "1948", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "1948" - } - ], - "discriminatedSubtypes": { - "$id": "1950", - "logs": { - "$id": "1951", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", - "usage": "Output,Json", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1952", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "1953", - "kind": "constant", - "valueType": { - "$id": "1954", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "1955", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "1956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "1957", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", - "usage": "Output,Json", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1958", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "1959", - "kind": "constant", - "valueType": { - "$id": "1960", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "1961", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "1962", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1963", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "1964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "1965", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", - "usage": "Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1966", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1967", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "1968", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "1969", - "kind": "constant", - "valueType": { - "$id": "1970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "1971", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "1972", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1973", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1974", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "usage": "Output,Json", - "description": "The ranking options for the file search.", - "decorators": [], - "properties": [ - { - "$id": "1975", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker used for the file search.", - "type": { - "$id": "1976", - "kind": "constant", - "valueType": { - "$ref": "358" - }, - "value": "default_2024_08_21", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" - }, - { - "$id": "1977", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1978", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" - }, - { - "$id": "1979", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "The results of the file search.", - "type": { - "$id": "1980", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", - "valueType": { - "$id": "1981", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", - "usage": "Output,Json", - "description": "A result instance of the file search.", - "decorators": [], - "properties": [ - { - "$id": "1982", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that result was found in.", - "type": { - "$id": "1983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" - }, - { - "$id": "1984", - "kind": "property", - "name": "file_name", - "serializedName": "file_name", - "description": "The name of the file that result was found in.", - "type": { - "$id": "1985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" - }, - { - "$id": "1986", - "kind": "property", - "name": "score", - "serializedName": "score", - "description": "The score of the result. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1987", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" - }, - { - "$id": "1988", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", - "type": { - "$id": "1989", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1990", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1991", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content.", - "type": { - "$id": "1992", - "kind": "constant", - "valueType": { - "$ref": "361" - }, - "value": "text", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" - }, - { - "$id": "1993", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content of the file.", - "type": { - "$id": "1994", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "1995", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", - "usage": "Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1996", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "1998", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "1999", - "kind": "constant", - "valueType": { - "$id": "2000", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "2001", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "2002", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2003", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "2004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "2005", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "2006", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "2007", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "2008", - "kind": "nullable", - "type": { - "$id": "2009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" - }, - { - "$id": "2010", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run step. Will be `null` if there are no errors.", - "type": { - "$id": "2011", - "kind": "nullable", - "type": { - "$id": "2012", - "kind": "model", - "name": "RunStepObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2013", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "364" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" - }, - { - "$id": "2014", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "2015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" - }, - { - "$id": "2016", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", - "type": { - "$id": "2017", - "kind": "nullable", - "type": { - "$id": "2018", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2019", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" - }, - { - "$id": "2020", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", - "type": { - "$id": "2021", - "kind": "nullable", - "type": { - "$id": "2022", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2023", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" - }, - { - "$id": "2024", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run step failed.", - "type": { - "$id": "2025", - "kind": "nullable", - "type": { - "$id": "2026", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2027", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" - }, - { - "$id": "2028", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run step completed.", - "type": { - "$id": "2029", - "kind": "nullable", - "type": { - "$id": "2030", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" - }, - { - "$id": "2032", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2033", - "kind": "nullable", - "type": { - "$id": "2034", - "kind": "dict", - "keyType": { - "$id": "2035", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" - }, - { - "$id": "2037", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2038", - "kind": "nullable", - "type": { - "$id": "2039", - "kind": "model", - "name": "RunStepCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", - "decorators": [], - "properties": [ - { - "$id": "2040", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run step.", - "type": { - "$id": "2041", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" - }, - { - "$id": "2042", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run step.", - "type": { - "$id": "2043", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" - }, - { - "$id": "2044", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "2045", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" - }, - { - "$id": "2046", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2047", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" - }, - { - "$id": "2048", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2049", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" - }, - { - "$id": "2050", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2051", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" - } - ] - }, - { - "$ref": "1896" - }, - { - "$ref": "1913" - }, - { - "$ref": "1917" - }, - { - "$ref": "1922" - }, - { - "$ref": "1925" - }, - { - "$ref": "1931" - }, - { - "$ref": "1935" - }, - { - "$ref": "1942" - }, - { - "$ref": "1947" - }, - { - "$ref": "1951" - }, - { - "$ref": "1957" - }, - { - "$ref": "1962" - }, - { - "$ref": "1965" - }, - { - "$ref": "1972" - }, - { - "$ref": "1974" - }, - { - "$ref": "1981" - }, - { - "$ref": "1990" - }, - { - "$ref": "1995" - }, - { - "$ref": "2002" - }, - { - "$ref": "2012" - }, - { - "$ref": "2039" - }, - { - "$id": "2052", - "kind": "model", - "name": "ThreadObject", - "crossLanguageDefinitionId": "OpenAI.ThreadObject", - "usage": "Output,Json", - "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", - "decorators": [], - "properties": [ - { - "$id": "2053", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" - }, - { - "$id": "2055", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread`.", - "type": { - "$id": "2056", - "kind": "constant", - "valueType": { - "$ref": "370" - }, - "value": "thread", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" - }, - { - "$id": "2057", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the thread was created.", - "type": { - "$id": "2058", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2059", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" - }, - { - "$id": "2060", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2061", - "kind": "nullable", - "type": { - "$id": "2062", - "kind": "model", - "name": "ThreadObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2063", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2064", - "kind": "model", - "name": "ThreadObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2065", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2066", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2067", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2068", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "2069", - "kind": "model", - "name": "ThreadObjectToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2070", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", - "type": { - "$id": "2071", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" - }, - { - "$id": "2073", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2074", - "kind": "nullable", - "type": { - "$id": "2075", - "kind": "dict", - "keyType": { - "$id": "2076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" - } - ] - }, - { - "$ref": "2062" - }, - { - "$ref": "2064" - }, - { - "$ref": "2069" - }, - { - "$id": "2078", - "kind": "model", - "name": "ModifyThreadRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2079", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2080", - "kind": "nullable", - "type": { - "$id": "2081", - "kind": "model", - "name": "ModifyThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2082", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2083", - "kind": "model", - "name": "ModifyThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2084", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2085", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2087", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" - }, - { - "$id": "2088", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2089", - "kind": "nullable", - "type": { - "$id": "2090", - "kind": "dict", - "keyType": { - "$id": "2091", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" - } - ] - }, - { - "$ref": "2081" - }, - { - "$ref": "2083" - }, - { - "$id": "2093", - "kind": "model", - "name": "DeleteThreadResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2094", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2095", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" - }, - { - "$id": "2096", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2097", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" - }, - { - "$id": "2098", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2099", - "kind": "constant", - "valueType": { - "$ref": "373" - }, - "value": "thread.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" - } - ] - }, - { - "$id": "2100", - "kind": "model", - "name": "RealtimeRequestCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", - "usage": "Input,Json", - "description": "A base representation for messages sent by the client to the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2101", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "376" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" - }, - "properties": [ - { - "$ref": "2101" - }, - { - "$id": "2102", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2103", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2104", - "session.update": { - "$id": "2105", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", - "usage": "Input,Json", - "discriminatorValue": "session.update", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2106", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2107", - "kind": "constant", - "valueType": { - "$id": "2108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.update", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" - }, - { - "$id": "2109", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2110", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommandSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2111", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "396" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" - }, - { - "$id": "2112", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2113", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" - }, - { - "$id": "2114", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" - }, - { - "$id": "2115", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" - }, - { - "$id": "2117", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" - }, - { - "$id": "2118", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" - }, - { - "$id": "2119", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2120", - "kind": "model", - "name": "RealtimeAudioInputTranscriptionSettings", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2121", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "422" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" - }, - { - "$id": "2122", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$id": "2123", - "kind": "model", - "name": "RealtimeTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2124", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "426" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" - }, - "properties": [ - { - "$ref": "2124" - } - ], - "discriminatedSubtypes": { - "$id": "2125", - "server_vad": { - "$id": "2126", - "kind": "model", - "name": "RealtimeServerVadTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", - "usage": "Input,Output,Json", - "discriminatorValue": "server_vad", - "decorators": [], - "baseModel": { - "$ref": "2123" - }, - "properties": [ - { - "$id": "2127", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2128", - "kind": "constant", - "valueType": { - "$id": "2129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "server_vad", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" - }, - { - "$id": "2130", - "kind": "property", - "name": "threshold", - "serializedName": "threshold", - "type": { - "$id": "2131", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" - }, - { - "$id": "2132", - "kind": "property", - "name": "prefix_padding_ms", - "serializedName": "prefix_padding_ms", - "type": { - "$id": "2133", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" - }, - { - "$id": "2135", - "kind": "property", - "name": "silence_duration_ms", - "serializedName": "silence_duration_ms", - "type": { - "$id": "2136", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" - }, - { - "$id": "2138", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2139", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$id": "2140", - "kind": "model", - "name": "RealtimeTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeTool", - "usage": "Input,Output,Json", - "description": "The base representation of a realtime tool definition.", - "decorators": [], - "discriminatorProperty": { - "$id": "2141", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" - }, - "properties": [ - { - "$ref": "2141" - } - ], - "discriminatedSubtypes": { - "$id": "2142", - "function": { - "$id": "2143", - "kind": "model", - "name": "RealtimeFunctionTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", - "usage": "Input,Output,Json", - "description": "The definition of a function tool as used by the realtime endpoint.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2140" - }, - "properties": [ - { - "$id": "2144", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2145", - "kind": "constant", - "valueType": { - "$id": "2146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" - }, - { - "$id": "2147", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" - }, - { - "$id": "2149", - "kind": "property", - "name": "description", - "serializedName": "description", - "type": { - "$id": "2150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" - }, - { - "$id": "2151", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "2152", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" - }, - { - "$id": "2153", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2154", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$id": "2155", - "kind": "model", - "name": "RealtimeToolChoiceObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", - "usage": "Input,Output,Json", - "description": "A base representation for a realtime tool_choice selecting a named tool.", - "decorators": [], - "discriminatorProperty": { - "$id": "2156", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" - }, - "properties": [ - { - "$ref": "2156" - } - ], - "discriminatedSubtypes": { - "$id": "2157", - "function": { - "$id": "2158", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", - "usage": "Input,Output,Json", - "description": "The representation of a realtime tool_choice selecting a named function tool.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2155" - }, - "properties": [ - { - "$id": "2159", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2145" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" - }, - { - "$id": "2160", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "2161", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2162", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" - } - ] - } - } - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" - }, - { - "$id": "2164", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2165", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" - }, - { - "$id": "2166", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2167", - "kind": "union", - "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", - "variantTypes": [ - { - "$id": "2168", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2169", - "kind": "constant", - "valueType": { - "$id": "2170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" - } - ] - }, - "input_audio_buffer.append": { - "$id": "2171", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferAppendCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.append", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2172", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2173", - "kind": "constant", - "valueType": { - "$id": "2174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.append", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" - }, - { - "$id": "2175", - "kind": "property", - "name": "audio", - "serializedName": "audio", - "type": { - "$id": "2176", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" - } - ] - }, - "input_audio_buffer.commit": { - "$id": "2177", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferCommitCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.commit", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2178", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2179", - "kind": "constant", - "valueType": { - "$id": "2180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.commit", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" - } - ] - }, - "input_audio_buffer.clear": { - "$id": "2181", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferClearCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.clear", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2182", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2183", - "kind": "constant", - "valueType": { - "$id": "2184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.clear", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" - } - ] - }, - "conversation.item.create": { - "$id": "2185", - "kind": "model", - "name": "RealtimeRequestItemCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2186", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2187", - "kind": "constant", - "valueType": { - "$id": "2188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" - }, - { - "$id": "2189", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" - }, - { - "$id": "2191", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2192", - "kind": "model", - "name": "RealtimeRequestItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2193", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" - }, - "properties": [ - { - "$ref": "2193" - }, - { - "$id": "2194", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2196", - "message": { - "$id": "2197", - "kind": "model", - "name": "RealtimeRequestMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", - "usage": "Input,Json", - "discriminatorValue": "message", - "decorators": [], - "discriminatorProperty": { - "$id": "2198", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" - }, - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2199", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2200", - "kind": "constant", - "valueType": { - "$id": "2201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" - }, - { - "$ref": "2198" - }, - { - "$id": "2202", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" - } - ], - "discriminatedSubtypes": { - "$id": "2203", - "system": { - "$id": "2204", - "kind": "model", - "name": "RealtimeRequestSystemMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2205", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2206", - "kind": "constant", - "valueType": { - "$id": "2207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" - }, - { - "$id": "2208", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2209", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$id": "2210", - "kind": "model", - "name": "RealtimeRequestTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_text", - "decorators": [], - "baseModel": { - "$id": "2211", - "kind": "model", - "name": "RealtimeContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2212", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "466" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" - }, - "properties": [ - { - "$ref": "2212" - } - ], - "discriminatedSubtypes": { - "$id": "2213", - "input_text": { - "$ref": "2210" - }, - "input_audio": { - "$id": "2214", - "kind": "model", - "name": "RealtimeRequestAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2215", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2216", - "kind": "constant", - "valueType": { - "$id": "2217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" - }, - { - "$id": "2218", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" - } - ] - }, - "text": { - "$id": "2220", - "kind": "model", - "name": "RealtimeResponseTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", - "usage": "Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2221", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2222", - "kind": "constant", - "valueType": { - "$id": "2223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" - }, - { - "$id": "2224", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" - } - ] - }, - "audio": { - "$id": "2226", - "kind": "model", - "name": "RealtimeResponseAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", - "usage": "Output,Json", - "discriminatorValue": "audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2227", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2228", - "kind": "constant", - "valueType": { - "$id": "2229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" - }, - { - "$id": "2230", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2231", - "kind": "nullable", - "type": { - "$id": "2232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" - } - ] - } - } - }, - "properties": [ - { - "$id": "2233", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2234", - "kind": "constant", - "valueType": { - "$id": "2235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" - }, - { - "$id": "2236", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" - } - ] - }, - "user": { - "$id": "2238", - "kind": "model", - "name": "RealtimeRequestUserMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2239", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2240", - "kind": "constant", - "valueType": { - "$id": "2241", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" - }, - { - "$id": "2242", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2243", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2244", - "kind": "union", - "name": "RealtimeRequestUserMessageItemContent", - "variantTypes": [ - { - "$ref": "2210" - }, - { - "$ref": "2214" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" - } - ] - }, - "assistant": { - "$id": "2245", - "kind": "model", - "name": "RealtimeRequestAssistantMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2246", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2247", - "kind": "constant", - "valueType": { - "$id": "2248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" - }, - { - "$id": "2249", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2250", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$ref": "2210" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" - } - ] - } - } - }, - "function_call": { - "$id": "2251", - "kind": "model", - "name": "RealtimeRequestFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", - "usage": "Input,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2252", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2253", - "kind": "constant", - "valueType": { - "$id": "2254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" - }, - { - "$id": "2255", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" - }, - { - "$id": "2257", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" - }, - { - "$id": "2259", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" - }, - { - "$id": "2261", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2262", - "kind": "model", - "name": "RealtimeRequestFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", - "usage": "Input,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2263", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2264", - "kind": "constant", - "valueType": { - "$id": "2265", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call_output", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" - }, - { - "$id": "2266", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2267", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" - }, - { - "$id": "2268", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2269", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" - } - ] - }, - "conversation.item.delete": { - "$id": "2270", - "kind": "model", - "name": "RealtimeRequestItemDeleteCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.delete", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2271", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2272", - "kind": "constant", - "valueType": { - "$id": "2273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.delete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" - }, - { - "$id": "2274", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" - } - ] - }, - "conversation.item.truncate": { - "$id": "2276", - "kind": "model", - "name": "RealtimeRequestItemTruncateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.truncate", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2277", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2278", - "kind": "constant", - "valueType": { - "$id": "2279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" - }, - { - "$id": "2280", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" - }, - { - "$id": "2282", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" - }, - { - "$id": "2284", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2285", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" - } - ] - }, - "response.create": { - "$id": "2286", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", - "usage": "Input,Json", - "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", - "discriminatorValue": "response.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2287", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2288", - "kind": "constant", - "valueType": { - "$id": "2289", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" - }, - { - "$id": "2290", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2291", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommandResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2292", - "kind": "property", - "name": "commit", - "serializedName": "commit", - "type": { - "$id": "2293", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" - }, - { - "$id": "2294", - "kind": "property", - "name": "cancel_previous", - "serializedName": "cancel_previous", - "type": { - "$id": "2295", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" - }, - { - "$id": "2296", - "kind": "property", - "name": "append_input_items", - "serializedName": "append_input_items", - "type": { - "$id": "2297", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" - }, - { - "$id": "2298", - "kind": "property", - "name": "input_items", - "serializedName": "input_items", - "type": { - "$id": "2299", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" - }, - { - "$id": "2300", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2301", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" - }, - { - "$id": "2302", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2303", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" - }, - { - "$id": "2304", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" - }, - { - "$id": "2305", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2306", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" - }, - { - "$id": "2307", - "kind": "property", - "name": "max_output_tokens", - "serializedName": "max_output_tokens", - "type": { - "$id": "2308", - "kind": "nullable", - "type": { - "$id": "2309", - "kind": "union", - "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", - "variantTypes": [ - { - "$id": "2310", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2311", - "kind": "constant", - "valueType": { - "$id": "2312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" - }, - { - "$id": "2313", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2314", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" - }, - { - "$id": "2315", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2316", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" - }, - { - "$id": "2317", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" - } - ] - }, - "response.cancel": { - "$id": "2318", - "kind": "model", - "name": "RealtimeRequestResponseCancelCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", - "usage": "Input,Json", - "discriminatorValue": "response.cancel", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2319", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2320", - "kind": "constant", - "valueType": { - "$id": "2321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.cancel", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" - } - ] - } - } - }, - { - "$ref": "2105" - }, - { - "$ref": "2110" - }, - { - "$ref": "2120" - }, - { - "$ref": "2123" - }, - { - "$ref": "2126" - }, - { - "$ref": "2140" - }, - { - "$ref": "2143" - }, - { - "$ref": "2155" - }, - { - "$ref": "2158" - }, - { - "$ref": "2161" - }, - { - "$ref": "2171" - }, - { - "$ref": "2177" - }, - { - "$ref": "2181" - }, - { - "$ref": "2185" - }, - { - "$ref": "2192" - }, - { - "$ref": "2197" - }, - { - "$ref": "2204" - }, - { - "$ref": "2210" - }, - { - "$ref": "2211" - }, - { - "$ref": "2214" - }, - { - "$ref": "2220" - }, - { - "$ref": "2226" - }, - { - "$ref": "2238" - }, - { - "$ref": "2245" - }, - { - "$ref": "2251" - }, - { - "$ref": "2262" - }, - { - "$ref": "2270" - }, - { - "$ref": "2276" - }, - { - "$ref": "2286" - }, - { - "$ref": "2291" - }, - { - "$ref": "2318" - }, - { - "$id": "2322", - "kind": "model", - "name": "RealtimeResponseCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", - "usage": "Output,Json", - "description": "Base representation of a WebSocket message received from the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2323", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "476" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" - }, - "properties": [ - { - "$ref": "2323" - }, - { - "$id": "2324", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2325", - "kind": "nullable", - "type": { - "$id": "2326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2327", - "session.created": { - "$id": "2328", - "kind": "model", - "name": "RealtimeResponseSessionCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2329", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2330", - "kind": "constant", - "valueType": { - "$id": "2331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" - }, - { - "$id": "2332", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2333", - "kind": "model", - "name": "RealtimeResponseSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2334", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2335", - "kind": "constant", - "valueType": { - "$ref": "532" - }, - "value": "realtime.session", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" - }, - { - "$id": "2336", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2337", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" - }, - { - "$id": "2338", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$id": "2339", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" - }, - { - "$id": "2340", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2341", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" - }, - { - "$id": "2342", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" - }, - { - "$id": "2344", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" - }, - { - "$id": "2345", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" - }, - { - "$id": "2346", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" - }, - { - "$id": "2347", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2348", - "kind": "nullable", - "type": { - "$ref": "2120" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" - }, - { - "$id": "2349", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$ref": "2123" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" - }, - { - "$id": "2350", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2351", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" - }, - { - "$id": "2352", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2353", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" - }, - { - "$id": "2354", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2355", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" - }, - { - "$id": "2356", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2357", - "kind": "nullable", - "type": { - "$id": "2358", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" - } - ] - }, - "session.updated": { - "$id": "2359", - "kind": "model", - "name": "RealtimeResponseSessionUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2360", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2361", - "kind": "constant", - "valueType": { - "$id": "2362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" - }, - { - "$id": "2363", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$ref": "2333" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" - } - ] - }, - "conversation.item.created": { - "$id": "2364", - "kind": "model", - "name": "RealtimeResponseItemCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2365", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2366", - "kind": "constant", - "valueType": { - "$id": "2367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" - }, - { - "$id": "2368", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2369", - "kind": "model", - "name": "RealtimeResponseItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2370", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" - }, - "properties": [ - { - "$id": "2371", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2372", - "kind": "constant", - "valueType": { - "$ref": "535" - }, - "value": "realtime.item", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" - }, - { - "$ref": "2370" - }, - { - "$id": "2373", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2374", - "kind": "nullable", - "type": { - "$id": "2375", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2376", - "message": { - "$id": "2377", - "kind": "model", - "name": "RealtimeResponseMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", - "usage": "Output,Json", - "discriminatorValue": "message", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2378", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2200" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" - }, - { - "$id": "2379", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" - }, - { - "$id": "2380", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2381", - "kind": "array", - "name": "ArrayRealtimeContentPart", - "valueType": { - "$ref": "2211" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" - }, - { - "$id": "2382", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" - } - ] - }, - "function_call": { - "$id": "2383", - "kind": "model", - "name": "RealtimeResponseFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", - "usage": "Output,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2384", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2253" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" - }, - { - "$id": "2385", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" - }, - { - "$id": "2387", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2388", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" - }, - { - "$id": "2389", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2390", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" - }, - { - "$id": "2391", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2392", - "kind": "model", - "name": "RealtimeResponseFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", - "usage": "Output,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2393", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2264" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" - }, - { - "$id": "2394", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" - }, - { - "$id": "2396", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" - } - ] - }, - "conversation.item.deleted": { - "$id": "2398", - "kind": "model", - "name": "RealtimeResponseItemDeletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.deleted", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2399", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2400", - "kind": "constant", - "valueType": { - "$id": "2401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" - }, - { - "$id": "2402", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" - } - ] - }, - "conversation.item.truncated": { - "$id": "2404", - "kind": "model", - "name": "RealtimeResponseItemTruncatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.truncated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2405", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2406", - "kind": "constant", - "valueType": { - "$id": "2407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" - }, - { - "$id": "2408", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" - }, - { - "$id": "2410", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2411", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" - }, - { - "$id": "2412", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "2413", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" - } - ] - }, - "response.created": { - "$id": "2414", - "kind": "model", - "name": "RealtimeResponseCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2415", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2416", - "kind": "constant", - "valueType": { - "$id": "2417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" - }, - { - "$id": "2418", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2419", - "kind": "model", - "name": "RealtimeResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2420", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2421", - "kind": "constant", - "valueType": { - "$ref": "538" - }, - "value": "realtime.response", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" - }, - { - "$id": "2422", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" - }, - { - "$id": "2424", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" - }, - { - "$id": "2425", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "type": { - "$id": "2426", - "kind": "nullable", - "type": { - "$id": "2427", - "kind": "model", - "name": "RealtimeResponseStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2428", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" - }, - "properties": [ - { - "$ref": "2428" - } - ], - "discriminatedSubtypes": { - "$id": "2429", - "cancelled": { - "$id": "2430", - "kind": "model", - "name": "RealtimeResponseCancelledStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "cancelled", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2431", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2432", - "kind": "constant", - "valueType": { - "$id": "2433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "cancelled", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" - }, - { - "$id": "2434", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "553" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" - } - ] - }, - "incomplete": { - "$id": "2435", - "kind": "model", - "name": "RealtimeResponseIncompleteStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "incomplete", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2436", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2437", - "kind": "constant", - "valueType": { - "$id": "2438", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "incomplete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" - }, - { - "$id": "2439", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "559" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" - } - ] - }, - "failed": { - "$id": "2440", - "kind": "model", - "name": "RealtimeResponseFailedStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "failed", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2441", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2442", - "kind": "constant", - "valueType": { - "$id": "2443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" - }, - { - "$id": "2444", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2445", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" - } - ] - } - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" - }, - { - "$id": "2446", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2447", - "kind": "array", - "name": "ArrayRealtimeResponseItem", - "valueType": { - "$ref": "2369" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" - }, - { - "$id": "2448", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2449", - "kind": "model", - "name": "RealtimeResponseUsage", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2450", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "type": { - "$id": "2451", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" - }, - { - "$id": "2452", - "kind": "property", - "name": "input_tokens", - "serializedName": "input_tokens", - "type": { - "$id": "2453", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" - }, - { - "$id": "2454", - "kind": "property", - "name": "output_tokens", - "serializedName": "output_tokens", - "type": { - "$id": "2455", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" - }, - { - "$id": "2456", - "kind": "property", - "name": "input_token_details", - "serializedName": "input_token_details", - "type": { - "$id": "2457", - "kind": "model", - "name": "RealtimeResponseUsageInputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2458", - "kind": "property", - "name": "cached_tokens", - "serializedName": "cached_tokens", - "type": { - "$id": "2459", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" - }, - { - "$id": "2460", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" - }, - { - "$id": "2462", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2463", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" - }, - { - "$id": "2464", - "kind": "property", - "name": "output_token_details", - "serializedName": "output_token_details", - "type": { - "$id": "2465", - "kind": "model", - "name": "RealtimeResponseUsageOutputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2466", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2467", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" - }, - { - "$id": "2468", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2469", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" - } - ] - }, - "response.done": { - "$id": "2470", - "kind": "model", - "name": "RealtimeResponseDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2471", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2472", - "kind": "constant", - "valueType": { - "$id": "2473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" - }, - { - "$id": "2474", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$ref": "2419" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" - } - ] - }, - "rate_limits.updated": { - "$id": "2475", - "kind": "model", - "name": "RealtimeResponseRateLimitsUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "rate_limits.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2476", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2477", - "kind": "constant", - "valueType": { - "$id": "2478", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "rate_limits.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" - }, - { - "$id": "2479", - "kind": "property", - "name": "rate_limits", - "serializedName": "rate_limits", - "type": { - "$id": "2480", - "kind": "array", - "name": "ArrayRealtimeResponseRateLimitDetailsItem", - "valueType": { - "$id": "2481", - "kind": "model", - "name": "RealtimeResponseRateLimitDetailsItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2482", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" - }, - { - "$id": "2484", - "kind": "property", - "name": "limit", - "serializedName": "limit", - "type": { - "$id": "2485", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" - }, - { - "$id": "2486", - "kind": "property", - "name": "remaining", - "serializedName": "remaining", - "type": { - "$id": "2487", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" - }, - { - "$id": "2488", - "kind": "property", - "name": "reset_seconds", - "serializedName": "reset_seconds", - "type": { - "$id": "2489", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" - } - ] - }, - "response.output_item.added": { - "$id": "2490", - "kind": "model", - "name": "RealtimeResponseOutputItemAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2491", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2492", - "kind": "constant", - "valueType": { - "$id": "2493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" - }, - { - "$id": "2494", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" - }, - { - "$id": "2496", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2497", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" - }, - { - "$id": "2498", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" - } - ] - }, - "response.output_item.done": { - "$id": "2499", - "kind": "model", - "name": "RealtimeResponseOutputItemDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2500", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2501", - "kind": "constant", - "valueType": { - "$id": "2502", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" - }, - { - "$id": "2503", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" - }, - { - "$id": "2505", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2506", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" - }, - { - "$id": "2507", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" - } - ] - }, - "response.content_part.added": { - "$id": "2508", - "kind": "model", - "name": "RealtimeResponseContentPartAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2509", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2510", - "kind": "constant", - "valueType": { - "$id": "2511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" - }, - { - "$id": "2512", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" - }, - { - "$id": "2514", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" - }, - { - "$id": "2516", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2517", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" - }, - { - "$id": "2518", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2519", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" - }, - { - "$id": "2520", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" - } - ] - }, - "response.content_part.done": { - "$id": "2521", - "kind": "model", - "name": "RealtimeResponseContentPartDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2522", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2523", - "kind": "constant", - "valueType": { - "$id": "2524", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" - }, - { - "$id": "2525", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" - }, - { - "$id": "2527", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" - }, - { - "$id": "2529", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2530", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" - }, - { - "$id": "2531", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2532", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" - }, - { - "$id": "2533", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" - } - ] - }, - "response.audio.delta": { - "$id": "2534", - "kind": "model", - "name": "RealtimeResponseAudioDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2535", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2536", - "kind": "constant", - "valueType": { - "$id": "2537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" - }, - { - "$id": "2538", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" - }, - { - "$id": "2540", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2541", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" - }, - { - "$id": "2542", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2543", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" - }, - { - "$id": "2544", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2545", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" - }, - { - "$id": "2546", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2547", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" - } - ] - }, - "response.audio.done": { - "$id": "2548", - "kind": "model", - "name": "RealtimeResponseAudioDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2549", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2550", - "kind": "constant", - "valueType": { - "$id": "2551", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" - }, - { - "$id": "2552", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2553", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" - }, - { - "$id": "2554", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2555", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" - }, - { - "$id": "2556", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2557", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" - }, - { - "$id": "2558", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2559", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" - } - ] - }, - "response.audio_transcript.delta": { - "$id": "2560", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2561", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2562", - "kind": "constant", - "valueType": { - "$id": "2563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" - }, - { - "$id": "2564", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" - }, - { - "$id": "2566", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" - }, - { - "$id": "2568", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2569", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" - }, - { - "$id": "2570", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" - }, - { - "$id": "2572", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" - } - ] - }, - "response.audio_transcript.done": { - "$id": "2574", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2575", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2576", - "kind": "constant", - "valueType": { - "$id": "2577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" - }, - { - "$id": "2578", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2579", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" - }, - { - "$id": "2580", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" - }, - { - "$id": "2582", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2583", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" - }, - { - "$id": "2584", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2585", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" - } - ] - }, - "response.text.delta": { - "$id": "2586", - "kind": "model", - "name": "RealtimeResponseTextDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2587", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2588", - "kind": "constant", - "valueType": { - "$id": "2589", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" - }, - { - "$id": "2590", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" - }, - { - "$id": "2592", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" - }, - { - "$id": "2594", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2595", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" - }, - { - "$id": "2596", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2597", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" - }, - { - "$id": "2598", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2599", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" - } - ] - }, - "response.text.done": { - "$id": "2600", - "kind": "model", - "name": "RealtimeResponseTextDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2601", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2602", - "kind": "constant", - "valueType": { - "$id": "2603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" - }, - { - "$id": "2604", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2605", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" - }, - { - "$id": "2606", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" - }, - { - "$id": "2608", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2609", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" - }, - { - "$id": "2610", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2611", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" - }, - { - "$id": "2612", - "kind": "property", - "name": "value", - "serializedName": "value", - "type": { - "$id": "2613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" - } - ] - }, - "response.function_call_arguments.delta": { - "$id": "2614", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2615", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2616", - "kind": "constant", - "valueType": { - "$id": "2617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" - }, - { - "$id": "2618", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" - }, - { - "$id": "2620", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2621", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" - }, - { - "$id": "2622", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2623", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" - }, - { - "$id": "2624", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2625", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" - }, - { - "$id": "2626", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2627", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" - } - ] - }, - "response.function_call_arguments.done": { - "$id": "2628", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2629", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2630", - "kind": "constant", - "valueType": { - "$id": "2631", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" - }, - { - "$id": "2632", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2633", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" - }, - { - "$id": "2634", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" - }, - { - "$id": "2636", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2637", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" - }, - { - "$id": "2638", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" - }, - { - "$id": "2640", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2641", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" - }, - { - "$id": "2642", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2643", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" - } - ] - }, - "input_audio_buffer.speech_started": { - "$id": "2644", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_started", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2645", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2646", - "kind": "constant", - "valueType": { - "$id": "2647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_started", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" - }, - { - "$id": "2648", - "kind": "property", - "name": "audio_start_ms", - "serializedName": "audio_start_ms", - "type": { - "$id": "2649", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" - }, - { - "$id": "2650", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2651", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" - } - ] - }, - "input_audio_buffer.speech_stopped": { - "$id": "2652", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_stopped", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2653", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2654", - "kind": "constant", - "valueType": { - "$id": "2655", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_stopped", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" - }, - { - "$id": "2656", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" - }, - { - "$id": "2658", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2659", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" - } - ] - }, - "conversation.item.input_audio_transcription.completed": { - "$id": "2660", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.completed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2661", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2662", - "kind": "constant", - "valueType": { - "$id": "2663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.completed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" - }, - { - "$id": "2664", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" - }, - { - "$id": "2666", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2667", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" - }, - { - "$id": "2668", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" - } - ] - }, - "conversation.item.input_audio_transcription.failed": { - "$id": "2670", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.failed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2671", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2672", - "kind": "constant", - "valueType": { - "$id": "2673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" - }, - { - "$id": "2674", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2675", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" - }, - { - "$id": "2676", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2677", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" - }, - { - "$id": "2678", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2679", - "kind": "model", - "name": "RealtimeResponseApiError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2680", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" - }, - { - "$id": "2682", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" - }, - { - "$id": "2684", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2685", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" - }, - { - "$id": "2686", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" - } - ] - }, - "input_audio_buffer.committed": { - "$id": "2688", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferCommittedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.committed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2689", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2690", - "kind": "constant", - "valueType": { - "$id": "2691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.committed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" - }, - { - "$id": "2692", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" - }, - { - "$id": "2694", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" - } - ] - }, - "input_audio_buffer.cleared": { - "$id": "2696", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferClearedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.cleared", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2697", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2698", - "kind": "constant", - "valueType": { - "$id": "2699", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.cleared", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" - } - ] - }, - "error": { - "$id": "2700", - "kind": "model", - "name": "RealtimeResponseErrorCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", - "usage": "Output,Json", - "description": "A command that describes an error encountered during a realtime operation.", - "discriminatorValue": "error", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2701", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2702", - "kind": "constant", - "valueType": { - "$id": "2703", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "error", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" - }, - { - "$id": "2704", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2705", - "kind": "model", - "name": "RealtimeResponseError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2706", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2707", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" - }, - { - "$id": "2708", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" - }, - { - "$id": "2710", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2711", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" - }, - { - "$id": "2712", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" - }, - { - "$id": "2714", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" - } - ] - } - } - }, - { - "$ref": "2328" - }, - { - "$ref": "2333" - }, - { - "$ref": "2359" - }, - { - "$ref": "2364" - }, - { - "$ref": "2369" - }, - { - "$ref": "2377" - }, - { - "$ref": "2383" - }, - { - "$ref": "2392" - }, - { - "$ref": "2398" - }, - { - "$ref": "2404" - }, - { - "$ref": "2414" - }, - { - "$ref": "2419" - }, - { - "$ref": "2427" - }, - { - "$ref": "2430" - }, - { - "$ref": "2435" - }, - { - "$ref": "2440" - }, - { - "$ref": "2449" - }, - { - "$ref": "2457" - }, - { - "$ref": "2465" - }, - { - "$ref": "2470" - }, - { - "$ref": "2475" - }, - { - "$ref": "2481" - }, - { - "$ref": "2490" - }, - { - "$ref": "2499" - }, - { - "$ref": "2508" - }, - { - "$ref": "2521" - }, - { - "$ref": "2534" - }, - { - "$ref": "2548" - }, - { - "$ref": "2560" - }, - { - "$ref": "2574" - }, - { - "$ref": "2586" - }, - { - "$ref": "2600" - }, - { - "$ref": "2614" - }, - { - "$ref": "2628" - }, - { - "$ref": "2644" - }, - { - "$ref": "2652" - }, - { - "$ref": "2660" - }, - { - "$ref": "2670" - }, - { - "$ref": "2679" - }, - { - "$ref": "2688" - }, - { - "$ref": "2696" - }, - { - "$ref": "2700" - }, - { - "$ref": "2705" - }, - { - "$id": "2716", - "kind": "model", - "name": "CreateModerationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2717", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input text to classify", - "type": { - "$id": "2718", - "kind": "union", - "name": "CreateModerationRequestInput", - "variantTypes": [ - { - "$id": "2719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "2720", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2721", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" - }, - { - "$id": "2722", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", - "type": { - "$ref": "565" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" - } - ] - }, - { - "$id": "2723", - "kind": "model", - "name": "CreateModerationResponse", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", - "usage": "Output,Json", - "description": "Represents if a given text input is potentially harmful.", - "decorators": [], - "properties": [ - { - "$id": "2724", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The unique identifier for the moderation request.", - "type": { - "$id": "2725", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" - }, - { - "$id": "2726", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used to generate the moderation results.", - "type": { - "$id": "2727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" - }, - { - "$id": "2728", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "A list of moderation objects.", - "type": { - "$id": "2729", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2730", - "kind": "model", - "name": "CreateModerationResponseResult", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2731", - "kind": "property", - "name": "flagged", - "serializedName": "flagged", - "description": "Whether any of the below categories are flagged.", - "type": { - "$id": "2732", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" - }, - { - "$id": "2733", - "kind": "property", - "name": "categories", - "serializedName": "categories", - "description": "A list of the categories, and whether they are flagged or not.", - "type": { - "$id": "2734", - "kind": "model", - "name": "CreateModerationResponseResultCategories", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2735", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", - "type": { - "$id": "2736", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" - }, - { - "$id": "2737", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", - "type": { - "$id": "2738", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" - }, - { - "$id": "2739", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "Content that expresses, incites, or promotes harassing language towards any target.", - "type": { - "$id": "2740", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" - }, - { - "$id": "2741", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "Harassment content that also includes violence or serious harm towards any target.", - "type": { - "$id": "2742", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" - }, - { - "$id": "2743", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2744", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" - }, - { - "$id": "2745", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2746", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" - }, - { - "$id": "2747", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", - "type": { - "$id": "2748", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" - }, - { - "$id": "2749", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", - "type": { - "$id": "2750", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" - }, - { - "$id": "2751", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "Sexual content that includes an individual who is under 18 years old.", - "type": { - "$id": "2752", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" - }, - { - "$id": "2753", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "Content that depicts death, violence, or physical injury.", - "type": { - "$id": "2754", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" - }, - { - "$id": "2755", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "Content that depicts death, violence, or physical injury in graphic detail.", - "type": { - "$id": "2756", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" - }, - { - "$id": "2757", - "kind": "property", - "name": "category_scores", - "serializedName": "category_scores", - "description": "A list of the categories along with their scores as predicted by model.", - "type": { - "$id": "2758", - "kind": "model", - "name": "CreateModerationResponseResultCategoryScores", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2759", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "The score for the category 'hate'.", - "type": { - "$id": "2760", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" - }, - { - "$id": "2761", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "The score for the category 'hate/threatening'.", - "type": { - "$id": "2762", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" - }, - { - "$id": "2763", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "The score for the category 'harassment'.", - "type": { - "$id": "2764", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" - }, - { - "$id": "2765", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "The score for the category 'harassment/threatening'.", - "type": { - "$id": "2766", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" - }, - { - "$id": "2767", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "The score for the category 'self-harm'.", - "type": { - "$id": "2768", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" - }, - { - "$id": "2769", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "The score for the category 'self-harm/intent'.", - "type": { - "$id": "2770", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" - }, - { - "$id": "2771", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "The score for the category 'self-harm/instructions'.", - "type": { - "$id": "2772", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" - }, - { - "$id": "2773", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "The score for the category 'sexual'.", - "type": { - "$id": "2774", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" - }, - { - "$id": "2775", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "The score for the category 'sexual/minors'.", - "type": { - "$id": "2776", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" - }, - { - "$id": "2777", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "The score for the category 'violence'.", - "type": { - "$id": "2778", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" - }, - { - "$id": "2779", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "The score for the category 'violence/graphic'.", - "type": { - "$id": "2780", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" - } - ] - }, - { - "$ref": "2730" - }, - { - "$ref": "2734" - }, - { - "$ref": "2758" - }, - { - "$id": "2781", - "kind": "model", - "name": "ListModelsResponse", - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2782", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2783", - "kind": "constant", - "valueType": { - "$ref": "571" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" - }, - { - "$id": "2784", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2785", - "kind": "array", - "name": "ArrayModel", - "valueType": { - "$id": "2786", - "kind": "model", - "name": "Model", - "crossLanguageDefinitionId": "OpenAI.Model", - "usage": "Output,Json", - "description": "Describes an OpenAI model offering that can be used with the API.", - "decorators": [], - "properties": [ - { - "$id": "2787", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The model identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.id" - }, - { - "$id": "2789", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) when the model was created.", - "type": { - "$id": "2790", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2791", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.created" - }, - { - "$id": "2792", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"model\".", - "type": { - "$id": "2793", - "kind": "constant", - "valueType": { - "$ref": "574" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.object" - }, - { - "$id": "2794", - "kind": "property", - "name": "owned_by", - "serializedName": "owned_by", - "description": "The organization that owns the model.", - "type": { - "$id": "2795", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.owned_by" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" - } - ] - }, - { - "$ref": "2786" - }, - { - "$id": "2796", - "kind": "model", - "name": "DeleteModelResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2797", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" - }, - { - "$id": "2799", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2800", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" - }, - { - "$id": "2801", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2802", - "kind": "constant", - "valueType": { - "$ref": "577" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" - } - ] - }, - { - "$id": "2803", - "kind": "model", - "name": "MessageObject", - "crossLanguageDefinitionId": "OpenAI.MessageObject", - "usage": "Output,Json", - "description": "Represents a message within a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "2804", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.id" - }, - { - "$id": "2806", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message`.", - "type": { - "$id": "2807", - "kind": "constant", - "valueType": { - "$ref": "580" - }, - "value": "thread.message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.object" - }, - { - "$id": "2808", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the message was created.", - "type": { - "$id": "2809", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2810", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" - }, - { - "$id": "2811", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", - "type": { - "$id": "2812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" - }, - { - "$id": "2813", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", - "type": { - "$ref": "583" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.status" - }, - { - "$id": "2814", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "On an incomplete message, details about why the message is incomplete.", - "type": { - "$id": "2815", - "kind": "nullable", - "type": { - "$id": "2816", - "kind": "model", - "name": "MessageObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2817", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason the message is incomplete.", - "type": { - "$ref": "591" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" - }, - { - "$id": "2818", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the message was completed.", - "type": { - "$id": "2819", - "kind": "nullable", - "type": { - "$id": "2820", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2821", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" - }, - { - "$id": "2822", - "kind": "property", - "name": "incomplete_at", - "serializedName": "incomplete_at", - "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", - "type": { - "$id": "2823", - "kind": "nullable", - "type": { - "$id": "2824", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2825", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" - }, - { - "$id": "2826", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "603" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.role" - }, - { - "$id": "2827", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "2828", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$ref": "1530" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.content" - }, - { - "$id": "2829", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", - "type": { - "$id": "2830", - "kind": "nullable", - "type": { - "$id": "2831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" - }, - { - "$id": "2832", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", - "type": { - "$id": "2833", - "kind": "nullable", - "type": { - "$id": "2834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" - }, - { - "$id": "2835", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they were added to.", - "type": { - "$id": "2836", - "kind": "nullable", - "type": { - "$id": "2837", - "kind": "array", - "name": "MessageObjectAttachments", - "valueType": { - "$id": "2838", - "kind": "model", - "name": "MessageObjectAttachment", - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2839", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "2840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" - }, - { - "$id": "2841", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "2842", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2843", - "kind": "union", - "name": "MessageObjectAttachmentTool", - "variantTypes": [ - { - "$ref": "1540" - }, - { - "$ref": "1577" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" - }, - { - "$id": "2844", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2845", - "kind": "nullable", - "type": { - "$id": "2846", - "kind": "dict", - "keyType": { - "$id": "2847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2848", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" - } - ] - }, - { - "$ref": "2816" - }, - { - "$ref": "2838" - }, - { - "$id": "2849", - "kind": "model", - "name": "ListMessagesResponse", - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2850", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2851", - "kind": "constant", - "valueType": { - "$ref": "615" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" - }, - { - "$id": "2852", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2853", - "kind": "array", - "name": "ArrayMessageObject", - "valueType": { - "$ref": "2803" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" - }, - { - "$id": "2854", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" - }, - { - "$id": "2856", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" - }, - { - "$id": "2858", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2859", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" - } - ] - }, - { - "$id": "2860", - "kind": "model", - "name": "ModifyMessageRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2861", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2862", - "kind": "nullable", - "type": { - "$id": "2863", - "kind": "dict", - "keyType": { - "$id": "2864", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" - } - ] - }, - { - "$id": "2866", - "kind": "model", - "name": "DeleteMessageResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2867", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2868", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" - }, - { - "$id": "2869", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2870", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" - }, - { - "$id": "2871", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2872", - "kind": "constant", - "valueType": { - "$ref": "618" - }, - "value": "thread.message.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" - } - ] - }, - { - "$id": "2873", - "kind": "model", - "name": "CreateImageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2874", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", - "type": { - "$id": "2875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" - }, - { - "$id": "2876", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation.", - "type": { - "$id": "2877", - "kind": "nullable", - "type": { - "$ref": "621" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" - }, - { - "$id": "2878", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2879", - "kind": "nullable", - "type": { - "$id": "2880", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" - }, - { - "$id": "2881", - "kind": "property", - "name": "quality", - "serializedName": "quality", - "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", - "type": { - "$ref": "627" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" - }, - { - "$id": "2882", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2883", - "kind": "nullable", - "type": { - "$ref": "633" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" - }, - { - "$id": "2884", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", - "type": { - "$id": "2885", - "kind": "nullable", - "type": { - "$ref": "639" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" - }, - { - "$id": "2886", - "kind": "property", - "name": "style", - "serializedName": "style", - "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", - "type": { - "$id": "2887", - "kind": "nullable", - "type": { - "$ref": "651" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" - }, - { - "$id": "2888", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" - } - ] - }, - { - "$id": "2890", - "kind": "model", - "name": "ImagesResponse", - "crossLanguageDefinitionId": "OpenAI.ImagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2891", - "kind": "property", - "name": "created", - "serializedName": "created", - "type": { - "$id": "2892", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2893", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" - }, - { - "$id": "2894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2895", - "kind": "array", - "name": "ArrayImage", - "valueType": { - "$id": "2896", - "kind": "model", - "name": "Image", - "crossLanguageDefinitionId": "OpenAI.Image", - "usage": "Output,Json", - "description": "Represents the url or the content of an image generated by the OpenAI API.", - "decorators": [], - "properties": [ - { - "$id": "2897", - "kind": "property", - "name": "b64_json", - "serializedName": "b64_json", - "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", - "type": { - "$id": "2898", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.b64_json" - }, - { - "$id": "2899", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the generated image, if `response_format` is `url` (default).", - "type": { - "$id": "2900", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.url" - }, - { - "$id": "2901", - "kind": "property", - "name": "revised_prompt", - "serializedName": "revised_prompt", - "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", - "type": { - "$id": "2902", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" - } - ] - }, - { - "$ref": "2896" - }, - { - "$id": "2903", - "kind": "model", - "name": "CreateImageEditRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2904", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", - "type": { - "$id": "2905", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" - }, - { - "$id": "2906", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters.", - "type": { - "$id": "2907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" - }, - { - "$id": "2908", - "kind": "property", - "name": "mask", - "serializedName": "mask", - "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", - "type": { - "$id": "2909", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" - }, - { - "$id": "2910", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2911", - "kind": "nullable", - "type": { - "$ref": "657" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" - }, - { - "$id": "2912", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10.", - "type": { - "$id": "2913", - "kind": "nullable", - "type": { - "$id": "2914", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" - }, - { - "$id": "2915", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2916", - "kind": "nullable", - "type": { - "$ref": "661" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" - }, - { - "$id": "2917", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2918", - "kind": "nullable", - "type": { - "$ref": "669" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" - }, - { - "$id": "2919", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" - } - ] - }, - { - "$id": "2921", - "kind": "model", - "name": "CreateImageVariationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2922", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", - "type": { - "$id": "2923", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" - }, - { - "$id": "2924", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2925", - "kind": "nullable", - "type": { - "$ref": "675" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" - }, - { - "$id": "2926", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2927", - "kind": "nullable", - "type": { - "$id": "2928", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" - }, - { - "$id": "2929", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2930", - "kind": "nullable", - "type": { - "$ref": "679" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" - }, - { - "$id": "2931", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2932", - "kind": "nullable", - "type": { - "$ref": "685" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" - }, - { - "$id": "2933", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2934", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" - } - ] - }, - { - "$id": "2935", - "kind": "model", - "name": "CreateFineTuningJobRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2936", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", - "type": { - "$ref": "693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" - }, - { - "$id": "2937", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" - }, - { - "$id": "2939", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job.", - "type": { - "$id": "2940", - "kind": "model", - "name": "CreateFineTuningJobRequestHyperparameters", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2941", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "2942", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "703" - }, - { - "$id": "2943", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" - }, - { - "$id": "2944", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "2945", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "707" - }, - { - "$id": "2946", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" - }, - { - "$id": "2947", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "2948", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "711" - }, - { - "$id": "2949", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" - }, - { - "$id": "2950", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", - "type": { - "$id": "2951", - "kind": "nullable", - "type": { - "$id": "2952", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" - }, - { - "$id": "2953", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2954", - "kind": "nullable", - "type": { - "$id": "2955", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" - }, - { - "$id": "2956", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for your fine-tuning job.", - "type": { - "$id": "2957", - "kind": "nullable", - "type": { - "$id": "2958", - "kind": "array", - "name": "CreateFineTuningJobRequestIntegrations", - "valueType": { - "$id": "2959", - "kind": "model", - "name": "CreateFineTuningJobRequestIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2960", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" - }, - "properties": [ - { - "$ref": "2960" - } - ], - "discriminatedSubtypes": { - "$id": "2962", - "wandb": { - "$id": "2963", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", - "usage": "Input,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "2959" - }, - "properties": [ - { - "$id": "2964", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2965", - "kind": "constant", - "valueType": { - "$id": "2966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" - }, - { - "$id": "2967", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "type": { - "$id": "2968", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2969", - "kind": "property", - "name": "project", - "serializedName": "project", - "type": { - "$id": "2970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" - }, - { - "$id": "2971", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2972", - "kind": "nullable", - "type": { - "$id": "2973", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" - }, - { - "$id": "2974", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "type": { - "$id": "2975", - "kind": "nullable", - "type": { - "$id": "2976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" - }, - { - "$id": "2977", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "type": { - "$id": "2978", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" - }, - { - "$id": "2980", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", - "type": { - "$id": "2981", - "kind": "nullable", - "type": { - "$id": "2982", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" - } - ] - }, - { - "$ref": "2940" - }, - { - "$ref": "2959" - }, - { - "$ref": "2963" - }, - { - "$ref": "2968" - }, - { - "$id": "2983", - "kind": "model", - "name": "FineTuningJob", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob", - "usage": "Output,Json", - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", - "decorators": [], - "properties": [ - { - "$id": "2984", - "kind": "property", - "name": "user_provided_suffix", - "serializedName": "user_provided_suffix", - "description": "The descriptive suffix applied to the job, as specified in the job creation request.", - "type": { - "$id": "2985", - "kind": "nullable", - "type": { - "$id": "2986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" - }, - { - "$id": "2987", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The object identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2988", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" - }, - { - "$id": "2989", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", - "type": { - "$id": "2990", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2991", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" - }, - { - "$id": "2992", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", - "type": { - "$id": "2993", - "kind": "nullable", - "type": { - "$id": "2994", - "kind": "model", - "name": "FineTuningJobError", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2995", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "2996", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" - }, - { - "$id": "2997", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "2998", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" - }, - { - "$id": "2999", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", - "type": { - "$id": "3000", - "kind": "nullable", - "type": { - "$id": "3001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" - }, - { - "$id": "3002", - "kind": "property", - "name": "fine_tuned_model", - "serializedName": "fine_tuned_model", - "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3003", - "kind": "nullable", - "type": { - "$id": "3004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" - }, - { - "$id": "3005", - "kind": "property", - "name": "finished_at", - "serializedName": "finished_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3006", - "kind": "nullable", - "type": { - "$id": "3007", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3008", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" - }, - { - "$id": "3009", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "3010", - "kind": "model", - "name": "FineTuningJobHyperparameters", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3011", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "3012", - "kind": "union", - "name": "FineTuningJobHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "715" - }, - { - "$id": "3013", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" - }, - { - "$id": "3014", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "3015", - "kind": "union", - "name": "FineTuningJobHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "719" - }, - { - "$id": "3016", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" - }, - { - "$id": "3017", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "3018", - "kind": "union", - "name": "FineTuningJobHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "723" - }, - { - "$id": "3019", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" - }, - { - "$id": "3020", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The base model that is being fine-tuned.", - "type": { - "$id": "3021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" - }, - { - "$id": "3022", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job\".", - "type": { - "$id": "3023", - "kind": "constant", - "valueType": { - "$ref": "727" - }, - "value": "fine_tuning.job", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" - }, - { - "$id": "3024", - "kind": "property", - "name": "organization_id", - "serializedName": "organization_id", - "description": "The organization that owns the fine-tuning job.", - "type": { - "$id": "3025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" - }, - { - "$id": "3026", - "kind": "property", - "name": "result_files", - "serializedName": "result_files", - "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3027", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" - }, - { - "$id": "3029", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", - "type": { - "$ref": "730" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" - }, - { - "$id": "3030", - "kind": "property", - "name": "trained_tokens", - "serializedName": "trained_tokens", - "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3031", - "kind": "nullable", - "type": { - "$id": "3032", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" - }, - { - "$id": "3033", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" - }, - { - "$id": "3035", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3036", - "kind": "nullable", - "type": { - "$id": "3037", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" - }, - { - "$id": "3038", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for this fine-tuning job.", - "type": { - "$id": "3039", - "kind": "nullable", - "type": { - "$id": "3040", - "kind": "array", - "name": "FineTuningJobIntegrations", - "valueType": { - "$id": "3041", - "kind": "model", - "name": "FineTuningIntegration", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3042", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" - }, - "properties": [ - { - "$ref": "3042" - } - ], - "discriminatedSubtypes": { - "$id": "3044", - "wandb": { - "$id": "3045", - "kind": "model", - "name": "FineTuningIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", - "usage": "Output,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "3041" - }, - "properties": [ - { - "$id": "3046", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the integration being enabled for the fine-tuning job", - "type": { - "$id": "3047", - "kind": "constant", - "valueType": { - "$id": "3048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" - }, - { - "$id": "3049", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", - "type": { - "$id": "3050", - "kind": "model", - "name": "FineTuningIntegrationWandbWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3051", - "kind": "property", - "name": "project", - "serializedName": "project", - "description": "The name of the project that the new run will be created under.", - "type": { - "$id": "3052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" - }, - { - "$id": "3053", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", - "type": { - "$id": "3054", - "kind": "nullable", - "type": { - "$id": "3055", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" - }, - { - "$id": "3056", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", - "type": { - "$id": "3057", - "kind": "nullable", - "type": { - "$id": "3058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" - }, - { - "$id": "3059", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", - "type": { - "$id": "3060", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" - }, - { - "$id": "3062", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed used for the fine-tuning job.", - "type": { - "$id": "3063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" - }, - { - "$id": "3064", - "kind": "property", - "name": "estimated_finish", - "serializedName": "estimated_finish", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", - "type": { - "$id": "3065", - "kind": "nullable", - "type": { - "$id": "3066", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3067", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" - } - ] - }, - { - "$ref": "2994" - }, - { - "$ref": "3010" - }, - { - "$ref": "3041" - }, - { - "$ref": "3045" - }, - { - "$ref": "3050" - }, - { - "$id": "3068", - "kind": "model", - "name": "ListPaginatedFineTuningJobsResponse", - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3069", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3070", - "kind": "array", - "name": "ArrayFineTuningJob", - "valueType": { - "$ref": "2983" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" - }, - { - "$id": "3071", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3072", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" - }, - { - "$id": "3073", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3074", - "kind": "constant", - "valueType": { - "$ref": "744" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" - } - ] - }, - { - "$id": "3075", - "kind": "model", - "name": "ListFineTuningJobCheckpointsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3076", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3077", - "kind": "array", - "name": "ArrayFineTuningJobCheckpoint", - "valueType": { - "$id": "3078", - "kind": "model", - "name": "FineTuningJobCheckpoint", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", - "usage": "Output,Json", - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", - "decorators": [], - "properties": [ - { - "$id": "3079", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The checkpoint identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "3080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" - }, - { - "$id": "3081", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", - "type": { - "$id": "3082", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3083", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" - }, - { - "$id": "3084", - "kind": "property", - "name": "fine_tuned_model_checkpoint", - "serializedName": "fine_tuned_model_checkpoint", - "description": "The name of the fine-tuned checkpoint model that is created.", - "type": { - "$id": "3085", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" - }, - { - "$id": "3086", - "kind": "property", - "name": "step_number", - "serializedName": "step_number", - "description": "The step number that the checkpoint was created at.", - "type": { - "$id": "3087", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" - }, - { - "$id": "3088", - "kind": "property", - "name": "metrics", - "serializedName": "metrics", - "description": "Metrics at the step number during the fine-tuning job.", - "type": { - "$id": "3089", - "kind": "model", - "name": "FineTuningJobCheckpointMetrics", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3090", - "kind": "property", - "name": "step", - "serializedName": "step", - "type": { - "$id": "3091", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" - }, - { - "$id": "3092", - "kind": "property", - "name": "train_loss", - "serializedName": "train_loss", - "type": { - "$id": "3093", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" - }, - { - "$id": "3094", - "kind": "property", - "name": "train_mean_token_accuracy", - "serializedName": "train_mean_token_accuracy", - "type": { - "$id": "3095", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" - }, - { - "$id": "3096", - "kind": "property", - "name": "valid_loss", - "serializedName": "valid_loss", - "type": { - "$id": "3097", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" - }, - { - "$id": "3098", - "kind": "property", - "name": "valid_mean_token_accuracy", - "serializedName": "valid_mean_token_accuracy", - "type": { - "$id": "3099", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" - }, - { - "$id": "3100", - "kind": "property", - "name": "full_valid_loss", - "serializedName": "full_valid_loss", - "type": { - "$id": "3101", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" - }, - { - "$id": "3102", - "kind": "property", - "name": "full_valid_mean_token_accuracy", - "serializedName": "full_valid_mean_token_accuracy", - "type": { - "$id": "3103", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" - }, - { - "$id": "3104", - "kind": "property", - "name": "fine_tuning_job_id", - "serializedName": "fine_tuning_job_id", - "description": "The name of the fine-tuning job that this checkpoint was created from.", - "type": { - "$id": "3105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" - }, - { - "$id": "3106", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "type": { - "$id": "3107", - "kind": "constant", - "valueType": { - "$ref": "747" - }, - "value": "fine_tuning.job.checkpoint", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" - }, - { - "$id": "3108", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3109", - "kind": "constant", - "valueType": { - "$ref": "750" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" - }, - { - "$id": "3110", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3111", - "kind": "nullable", - "type": { - "$id": "3112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" - }, - { - "$id": "3113", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3114", - "kind": "nullable", - "type": { - "$id": "3115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" - }, - { - "$id": "3116", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3117", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" - } - ] - }, - { - "$ref": "3078" - }, - { - "$ref": "3089" - }, - { - "$id": "3118", - "kind": "model", - "name": "ListFineTuningJobEventsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3119", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3120", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" - }, - { - "$id": "3121", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3122", - "kind": "array", - "name": "ArrayFineTuningJobEvent", - "valueType": { - "$id": "3123", - "kind": "model", - "name": "FineTuningJobEvent", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", - "usage": "Output,Json", - "description": "Fine-tuning job event object", - "decorators": [], - "properties": [ - { - "$id": "3124", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" - }, - { - "$id": "3126", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "type": { - "$id": "3127", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3128", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" - }, - { - "$id": "3129", - "kind": "property", - "name": "level", - "serializedName": "level", - "type": { - "$ref": "753" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" - }, - { - "$id": "3130", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" - }, - { - "$id": "3132", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3133", - "kind": "constant", - "valueType": { - "$ref": "761" - }, - "value": "fine_tuning.job.event", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" - }, - { - "$id": "3134", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3135", - "kind": "constant", - "valueType": { - "$ref": "764" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" - } - ] - }, - { - "$ref": "3123" - }, - { - "$id": "3136", - "kind": "model", - "name": "CreateFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3137", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The File object (not file name) to be uploaded.", - "type": { - "$id": "3138", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" - }, - { - "$id": "3139", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", - "type": { - "$ref": "767" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" - } - ] - }, - { - "$id": "3140", - "kind": "model", - "name": "ListFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3141", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3142", - "kind": "array", - "name": "ArrayOpenAiFile", - "valueType": { - "$ref": "1275" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" - }, - { - "$id": "3143", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3144", - "kind": "constant", - "valueType": { - "$ref": "777" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" - } - ] - }, - { - "$id": "3145", - "kind": "model", - "name": "DeleteFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3146", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" - }, - { - "$id": "3148", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3149", - "kind": "constant", - "valueType": { - "$ref": "780" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" - }, - { - "$id": "3150", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3151", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" - } - ] - }, - { - "$id": "3152", - "kind": "model", - "name": "CreateEmbeddingRequest", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3153", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3154", - "kind": "union", - "name": "CreateEmbeddingRequestInput", - "variantTypes": [ - { - "$id": "3155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3156", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3158", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3159", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3160", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3161", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3162", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" - }, - { - "$id": "3163", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "783" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" - }, - { - "$id": "3164", - "kind": "property", - "name": "encoding_format", - "serializedName": "encoding_format", - "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", - "type": { - "$ref": "791" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" - }, - { - "$id": "3165", - "kind": "property", - "name": "dimensions", - "serializedName": "dimensions", - "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", - "type": { - "$id": "3166", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" - }, - { - "$id": "3167", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3168", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" - } - ] - }, - { - "$id": "3169", - "kind": "model", - "name": "CreateEmbeddingResponse", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3170", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The list of embeddings generated by the model.", - "type": { - "$id": "3171", - "kind": "array", - "name": "ArrayEmbedding", - "valueType": { - "$id": "3172", - "kind": "model", - "name": "Embedding", - "crossLanguageDefinitionId": "OpenAI.Embedding", - "usage": "Output,Json", - "description": "Represents an embedding vector returned by embedding endpoint.", - "decorators": [], - "properties": [ - { - "$id": "3173", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the embedding in the list of embeddings.", - "type": { - "$id": "3174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.index" - }, - { - "$id": "3175", - "kind": "property", - "name": "embedding", - "serializedName": "embedding", - "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", - "type": { - "$id": "3176", - "kind": "union", - "name": "EmbeddingEmbedding", - "variantTypes": [ - { - "$id": "3177", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3178", - "kind": "float", - "name": "float", - "crossLanguageDefinitionId": "TypeSpec.float", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" - }, - { - "$id": "3180", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"embedding\".", - "type": { - "$id": "3181", - "kind": "constant", - "valueType": { - "$ref": "797" - }, - "value": "embedding", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" - }, - { - "$id": "3182", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model used to generate the embedding.", - "type": { - "$id": "3183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" - }, - { - "$id": "3184", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"list\".", - "type": { - "$id": "3185", - "kind": "constant", - "valueType": { - "$ref": "800" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" - }, - { - "$id": "3186", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "The usage information for the request.", - "type": { - "$id": "3187", - "kind": "model", - "name": "CreateEmbeddingResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3188", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "The number of tokens used by the prompt.", - "type": { - "$id": "3189", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "3190", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "The total number of tokens used by the request.", - "type": { - "$id": "3191", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" - } - ] - }, - { - "$ref": "3172" - }, - { - "$ref": "3187" - }, - { - "$id": "3192", - "kind": "model", - "name": "CreateCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3193", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "803" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" - }, - { - "$id": "3194", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", - "type": { - "$id": "3195", - "kind": "nullable", - "type": { - "$id": "3196", - "kind": "union", - "name": "CreateCompletionRequestPrompt", - "variantTypes": [ - { - "$id": "3197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3198", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3200", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3201", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3202", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3203", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3204", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" - }, - { - "$id": "3205", - "kind": "property", - "name": "best_of", - "serializedName": "best_of", - "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3206", - "kind": "nullable", - "type": { - "$id": "3207", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" - }, - { - "$id": "3208", - "kind": "property", - "name": "echo", - "serializedName": "echo", - "description": "Echo back the prompt in addition to the completion", - "type": { - "$id": "3209", - "kind": "nullable", - "type": { - "$id": "3210", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" - }, - { - "$id": "3211", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3212", - "kind": "nullable", - "type": { - "$id": "3213", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" - }, - { - "$id": "3214", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", - "type": { - "$id": "3215", - "kind": "nullable", - "type": { - "$id": "3216", - "kind": "dict", - "keyType": { - "$id": "3217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3218", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" - }, - { - "$id": "3219", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", - "type": { - "$id": "3220", - "kind": "nullable", - "type": { - "$id": "3221", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" - }, - { - "$id": "3222", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3223", - "kind": "nullable", - "type": { - "$id": "3224", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" - }, - { - "$id": "3225", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3226", - "kind": "nullable", - "type": { - "$id": "3227", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" - }, - { - "$id": "3228", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3229", - "kind": "nullable", - "type": { - "$id": "3230", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" - }, - { - "$id": "3231", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3232", - "kind": "nullable", - "type": { - "$id": "3233", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" - }, - { - "$id": "3234", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", - "type": { - "$id": "3235", - "kind": "nullable", - "type": { - "$id": "3236", - "kind": "union", - "name": "CreateCompletionRequestStop", - "variantTypes": [ - { - "$id": "3237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3238", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" - }, - { - "$id": "3240", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3241", - "kind": "nullable", - "type": { - "$id": "3242", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" - }, - { - "$id": "3243", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3244", - "kind": "nullable", - "type": { - "$id": "3245", - "kind": "model", - "name": "ChatCompletionStreamOptions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", - "usage": "Input,Json", - "description": "Options for streaming response. Only set this when you set `stream: true`.", - "decorators": [], - "properties": [ - { - "$id": "3246", - "kind": "property", - "name": "include_usage", - "serializedName": "include_usage", - "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", - "type": { - "$id": "3247", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" - }, - { - "$id": "3248", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", - "type": { - "$id": "3249", - "kind": "nullable", - "type": { - "$id": "3250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" - }, - { - "$id": "3251", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3252", - "kind": "nullable", - "type": { - "$id": "3253", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" - }, - { - "$id": "3254", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3255", - "kind": "nullable", - "type": { - "$id": "3256", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" - }, - { - "$id": "3257", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" - } - ] - }, - { - "$ref": "3245" - }, - { - "$id": "3259", - "kind": "model", - "name": "CreateCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", - "usage": "Output,Json", - "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", - "decorators": [], - "properties": [ - { - "$id": "3260", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the completion.", - "type": { - "$id": "3261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" - }, - { - "$id": "3262", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "The list of completion choices the model generated for the input prompt.", - "type": { - "$id": "3263", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3264", - "kind": "model", - "name": "CreateCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3265", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", - "type": { - "$ref": "811" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3266", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3267", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3268", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "type": { - "$id": "3269", - "kind": "nullable", - "type": { - "$id": "3270", - "kind": "model", - "name": "CreateCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3271", - "kind": "property", - "name": "text_offset", - "serializedName": "text_offset", - "type": { - "$id": "3272", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3273", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" - }, - { - "$id": "3274", - "kind": "property", - "name": "token_logprobs", - "serializedName": "token_logprobs", - "type": { - "$id": "3275", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3276", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" - }, - { - "$id": "3277", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "type": { - "$id": "3278", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" - }, - { - "$id": "3280", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "type": { - "$id": "3281", - "kind": "array", - "name": "ArrayRecord", - "valueType": { - "$id": "3282", - "kind": "dict", - "keyType": { - "$id": "3283", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3284", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" - }, - { - "$id": "3285", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" - }, - { - "$id": "3287", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the completion was created.", - "type": { - "$id": "3288", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3289", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" - }, - { - "$id": "3290", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for completion.", - "type": { - "$id": "3291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" - }, - { - "$id": "3292", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" - }, - { - "$id": "3294", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"text_completion\"", - "type": { - "$id": "3295", - "kind": "constant", - "valueType": { - "$ref": "819" - }, - "value": "text_completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" - }, - { - "$id": "3296", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "3297", - "kind": "model", - "name": "CompletionUsage", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics for the completion request.", - "decorators": [], - "properties": [ - { - "$id": "3298", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "3299", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" - }, - { - "$id": "3300", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "3301", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" - }, - { - "$id": "3302", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "3303", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" - }, - { - "$id": "3304", - "kind": "property", - "name": "completion_tokens_details", - "serializedName": "completion_tokens_details", - "description": "Breakdown of tokens used in a completion.", - "type": { - "$id": "3305", - "kind": "model", - "name": "CompletionUsageCompletionTokensDetails", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3306", - "kind": "property", - "name": "reasoning_tokens", - "serializedName": "reasoning_tokens", - "description": "Tokens generated by the model for reasoning.", - "type": { - "$id": "3307", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" - } - ] - }, - { - "$ref": "3264" - }, - { - "$ref": "3270" - }, - { - "$ref": "3297" - }, - { - "$ref": "3305" - }, - { - "$id": "3308", - "kind": "model", - "name": "CreateChatCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3309", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", - "type": { - "$id": "3310", - "kind": "array", - "name": "ArrayChatCompletionRequestMessage", - "valueType": { - "$id": "3311", - "kind": "model", - "name": "ChatCompletionRequestMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3312", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" - }, - "properties": [ - { - "$ref": "3312" - } - ], - "discriminatedSubtypes": { - "$id": "3314", - "system": { - "$id": "3315", - "kind": "model", - "name": "ChatCompletionRequestSystemMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3316", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the system message.", - "type": { - "$id": "3317", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContent", - "variantTypes": [ - { - "$id": "3318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3319", - "kind": "array", - "name": "ArrayChatCompletionRequestSystemMessageContentPart", - "valueType": { - "$id": "3320", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContentPart", - "variantTypes": [ - { - "$id": "3321", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartText", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3322", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3323", - "kind": "constant", - "valueType": { - "$ref": "822" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" - }, - { - "$id": "3324", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content.", - "type": { - "$id": "3325", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" - }, - { - "$id": "3326", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `system`.", - "type": { - "$id": "3327", - "kind": "constant", - "valueType": { - "$id": "3328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" - }, - { - "$id": "3329", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" - } - ] - }, - "user": { - "$id": "3331", - "kind": "model", - "name": "ChatCompletionRequestUserMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3332", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the user message.", - "type": { - "$id": "3333", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContent", - "variantTypes": [ - { - "$id": "3334", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3335", - "kind": "array", - "name": "ArrayChatCompletionRequestUserMessageContentPart", - "valueType": { - "$id": "3336", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3337", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3338", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3339", - "kind": "constant", - "valueType": { - "$ref": "825" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" - }, - { - "$id": "3340", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "3341", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImageImageUrl", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3342", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "Either a URL of the image or the base64 encoded image data.", - "type": { - "$id": "3343", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" - }, - { - "$id": "3344", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", - "type": { - "$ref": "828" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" - }, - { - "$id": "3345", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `user`.", - "type": { - "$id": "3346", - "kind": "constant", - "valueType": { - "$id": "3347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" - }, - { - "$id": "3348", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" - } - ] - }, - "assistant": { - "$id": "3350", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3351", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", - "type": { - "$id": "3352", - "kind": "nullable", - "type": { - "$id": "3353", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContent", - "variantTypes": [ - { - "$id": "3354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3355", - "kind": "array", - "name": "ArrayChatCompletionRequestAssistantMessageContentPart", - "valueType": { - "$id": "3356", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3357", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartRefusal", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3358", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3359", - "kind": "constant", - "valueType": { - "$ref": "836" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" - }, - { - "$id": "3360", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3361", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" - }, - { - "$id": "3362", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message by the assistant.", - "type": { - "$id": "3363", - "kind": "nullable", - "type": { - "$id": "3364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" - }, - { - "$id": "3365", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `assistant`.", - "type": { - "$id": "3366", - "kind": "constant", - "valueType": { - "$id": "3367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" - }, - { - "$id": "3368", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" - }, - { - "$id": "3370", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3371", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$id": "3372", - "kind": "model", - "name": "ChatCompletionMessageToolCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3373", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" - }, - { - "$id": "3375", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3376", - "kind": "constant", - "valueType": { - "$ref": "839" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" - }, - { - "$id": "3377", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function that the model called.", - "type": { - "$id": "3378", - "kind": "model", - "name": "ChatCompletionMessageToolCallFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3379", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" - }, - { - "$id": "3381", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" - }, - { - "$id": "3383", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3384", - "kind": "nullable", - "type": { - "$id": "3385", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3386", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" - }, - { - "$id": "3388", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" - } - ] - }, - "tool": { - "$id": "3390", - "kind": "model", - "name": "ChatCompletionRequestToolMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", - "usage": "Input,Json", - "discriminatorValue": "tool", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3391", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `tool`.", - "type": { - "$id": "3392", - "kind": "constant", - "valueType": { - "$id": "3393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" - }, - { - "$id": "3394", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the tool message.", - "type": { - "$id": "3395", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContent", - "variantTypes": [ - { - "$id": "3396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3397", - "kind": "array", - "name": "ArrayChatCompletionRequestToolMessageContentPart", - "valueType": { - "$id": "3398", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" - }, - { - "$id": "3399", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "Tool call that this message is responding to.", - "type": { - "$id": "3400", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" - } - ] - }, - "function": { - "$id": "3401", - "kind": "model", - "name": "ChatCompletionRequestFunctionMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3402", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `function`.", - "type": { - "$id": "3403", - "kind": "constant", - "valueType": { - "$id": "3404", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" - }, - { - "$id": "3405", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the function message.", - "type": { - "$id": "3406", - "kind": "nullable", - "type": { - "$id": "3407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" - }, - { - "$id": "3408", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" - }, - { - "$id": "3410", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", - "type": { - "$ref": "842" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" - }, - { - "$id": "3411", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3412", - "kind": "nullable", - "type": { - "$id": "3413", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" - }, - { - "$id": "3414", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", - "type": { - "$id": "3415", - "kind": "nullable", - "type": { - "$id": "3416", - "kind": "dict", - "keyType": { - "$id": "3417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3418", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" - }, - { - "$id": "3419", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", - "type": { - "$id": "3420", - "kind": "nullable", - "type": { - "$id": "3421", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" - }, - { - "$id": "3422", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", - "type": { - "$id": "3423", - "kind": "nullable", - "type": { - "$id": "3424", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" - }, - { - "$id": "3425", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", - "type": { - "$id": "3426", - "kind": "nullable", - "type": { - "$id": "3427", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" - }, - { - "$id": "3428", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", - "type": { - "$id": "3429", - "kind": "nullable", - "type": { - "$id": "3430", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" - }, - { - "$id": "3431", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", - "type": { - "$id": "3432", - "kind": "nullable", - "type": { - "$id": "3433", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" - }, - { - "$id": "3434", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3435", - "kind": "nullable", - "type": { - "$id": "3436", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" - }, - { - "$id": "3437", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", - "type": { - "$id": "3438", - "kind": "model", - "name": "ChatResponseFormat", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3439", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3440", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" - }, - "properties": [ - { - "$ref": "3439" - } - ], - "discriminatedSubtypes": { - "$id": "3441", - "text": { - "$id": "3442", - "kind": "model", - "name": "ChatResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", - "usage": "Input,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3443", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3444", - "kind": "constant", - "valueType": { - "$id": "3445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3446", - "kind": "model", - "name": "ChatResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", - "usage": "Input,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3447", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3448", - "kind": "constant", - "valueType": { - "$id": "3449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3450", - "kind": "model", - "name": "ChatResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", - "access": "public", - "usage": "Input,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3451", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3452", - "kind": "constant", - "valueType": { - "$id": "3453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" - }, - { - "$id": "3454", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" - }, - { - "$id": "3455", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3456", - "kind": "nullable", - "type": { - "$id": "3457", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" - }, - { - "$id": "3458", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", - "type": { - "$id": "3459", - "kind": "nullable", - "type": { - "$ref": "902" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" - }, - { - "$id": "3460", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens.", - "type": { - "$id": "3461", - "kind": "nullable", - "type": { - "$id": "3462", - "kind": "union", - "name": "CreateChatCompletionRequestStop", - "variantTypes": [ - { - "$id": "3463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3464", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" - }, - { - "$id": "3466", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3467", - "kind": "nullable", - "type": { - "$id": "3468", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" - }, - { - "$id": "3469", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3470", - "kind": "nullable", - "type": { - "$ref": "3245" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" - }, - { - "$id": "3471", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3472", - "kind": "nullable", - "type": { - "$id": "3473", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" - }, - { - "$id": "3474", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3475", - "kind": "nullable", - "type": { - "$id": "3476", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" - }, - { - "$id": "3477", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", - "type": { - "$id": "3478", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$id": "3479", - "kind": "model", - "name": "ChatCompletionTool", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3480", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3481", - "kind": "constant", - "valueType": { - "$ref": "908" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" - }, - { - "$id": "3482", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$ref": "1563" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" - }, - { - "$id": "3483", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "3484", - "kind": "union", - "name": "ChatCompletionToolChoiceOption", - "variantTypes": [ - { - "$ref": "911" - }, - { - "$id": "3485", - "kind": "model", - "name": "ChatCompletionNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", - "usage": "Input,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", - "decorators": [], - "properties": [ - { - "$id": "3486", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3487", - "kind": "constant", - "valueType": { - "$ref": "919" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" - }, - { - "$id": "3488", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "3489", - "kind": "model", - "name": "ChatCompletionNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3490", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" - }, - { - "$id": "3492", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "3493", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" - }, - { - "$id": "3494", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" - }, - { - "$id": "3496", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", - "type": { - "$id": "3497", - "kind": "union", - "name": "CreateChatCompletionRequestFunctionCall", - "variantTypes": [ - { - "$id": "3498", - "kind": "constant", - "valueType": { - "$id": "3499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "none", - "decorators": [] - }, - { - "$id": "3500", - "kind": "constant", - "valueType": { - "$id": "3501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "3502", - "kind": "model", - "name": "ChatCompletionFunctionCallOption", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", - "usage": "Input,Json", - "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", - "decorators": [], - "properties": [ - { - "$id": "3503", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" - }, - { - "$id": "3505", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", - "type": { - "$id": "3506", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$id": "3507", - "kind": "model", - "name": "ChatCompletionFunctions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "decorators": [], - "properties": [ - { - "$id": "3508", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "3509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" - }, - { - "$id": "3510", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "3511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" - }, - { - "$id": "3512", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$ref": "1569" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" - } - ] - }, - { - "$ref": "3311" - }, - { - "$ref": "3315" - }, - { - "$ref": "3321" - }, - { - "$ref": "3331" - }, - { - "$ref": "3337" - }, - { - "$ref": "3341" - }, - { - "$ref": "3350" - }, - { - "$ref": "3357" - }, - { - "$ref": "3372" - }, - { - "$ref": "3378" - }, - { - "$ref": "3385" - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - }, - { - "$ref": "3438" - }, - { - "$ref": "3442" - }, - { - "$ref": "3446" - }, - { - "$ref": "3450" - }, - { - "$ref": "3479" - }, - { - "$ref": "3485" - }, - { - "$ref": "3489" - }, - { - "$ref": "3502" - }, - { - "$ref": "3507" - }, - { - "$id": "3513", - "kind": "model", - "name": "CreateChatCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", - "usage": "Output,Json", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3514", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" - }, - { - "$id": "3516", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3517", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3518", - "kind": "model", - "name": "CreateChatCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3519", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$ref": "922" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3520", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3521", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3522", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3523", - "kind": "model", - "name": "ChatCompletionResponseMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", - "usage": "Output,Json", - "description": "A chat completion message generated by the model.", - "decorators": [], - "properties": [ - { - "$id": "3524", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the message.", - "type": { - "$id": "3525", - "kind": "nullable", - "type": { - "$id": "3526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" - }, - { - "$id": "3527", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3528", - "kind": "nullable", - "type": { - "$id": "3529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" - }, - { - "$id": "3530", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3531", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$ref": "3372" - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" - }, - { - "$id": "3532", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3533", - "kind": "constant", - "valueType": { - "$ref": "934" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" - }, - { - "$id": "3534", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3535", - "kind": "model", - "name": "ChatCompletionResponseMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3536", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" - }, - { - "$id": "3538", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" - }, - { - "$id": "3540", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "3541", - "kind": "nullable", - "type": { - "$id": "3542", - "kind": "model", - "name": "CreateChatCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3543", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "3544", - "kind": "nullable", - "type": { - "$id": "3545", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$id": "3546", - "kind": "model", - "name": "ChatCompletionTokenLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3547", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" - }, - { - "$id": "3549", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3550", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" - }, - { - "$id": "3551", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3552", - "kind": "nullable", - "type": { - "$id": "3553", - "kind": "array", - "name": "ChatCompletionTokenLogprobBytes", - "valueType": { - "$id": "3554", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" - }, - { - "$id": "3555", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", - "type": { - "$id": "3556", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3557", - "kind": "model", - "name": "ChatCompletionTokenLogprobTopLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3558", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3559", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" - }, - { - "$id": "3560", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3561", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" - }, - { - "$id": "3562", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3563", - "kind": "nullable", - "type": { - "$id": "3564", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3565", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "3566", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "3567", - "kind": "nullable", - "type": { - "$id": "3568", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" - }, - { - "$id": "3569", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3570", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" - }, - { - "$id": "3572", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" - }, - { - "$id": "3574", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "3575", - "kind": "nullable", - "type": { - "$ref": "937" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" - }, - { - "$id": "3576", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" - }, - { - "$id": "3578", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3579", - "kind": "constant", - "valueType": { - "$ref": "943" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" - }, - { - "$id": "3580", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" - } - ] - }, - { - "$ref": "3518" - }, - { - "$ref": "3523" - }, - { - "$ref": "3535" - }, - { - "$ref": "3542" - }, - { - "$ref": "3546" - }, - { - "$ref": "3557" - }, - { - "$id": "3581", - "kind": "model", - "name": "CreateBatchRequest", - "crossLanguageDefinitionId": "createBatch.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ - { - "$id": "3582", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", - "type": { - "$id": "3583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" - }, - { - "$id": "3584", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", - "type": { - "$ref": "946" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" - }, - { - "$id": "3585", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", - "type": { - "$id": "3586", - "kind": "constant", - "valueType": { - "$ref": "952" - }, - "value": "24h", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" - }, - { - "$id": "3587", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Optional custom metadata for the batch.", - "type": { - "$id": "3588", - "kind": "nullable", - "type": { - "$id": "3589", - "kind": "dict", - "keyType": { - "$id": "3590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" - } - ] - }, - { - "$id": "3592", - "kind": "model", - "name": "Batch", - "crossLanguageDefinitionId": "OpenAI.Batch", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3593", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.id" - }, - { - "$id": "3595", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `batch`.", - "type": { - "$id": "3596", - "kind": "constant", - "valueType": { - "$ref": "955" - }, - "value": "batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.object" - }, - { - "$id": "3597", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The OpenAI API endpoint used by the batch.", - "type": { - "$id": "3598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" - }, - { - "$id": "3599", - "kind": "property", - "name": "errors", - "serializedName": "errors", - "type": { - "$id": "3600", - "kind": "model", - "name": "BatchErrors", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3601", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `list`.", - "type": { - "$id": "3602", - "kind": "constant", - "valueType": { - "$ref": "958" - }, - "value": "list", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" - }, - { - "$id": "3603", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3604", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3605", - "kind": "model", - "name": "BatchErrorsDatum", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3606", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "An error code identifying the error type.", - "type": { - "$id": "3607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" - }, - { - "$id": "3608", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable message providing more details about the error.", - "type": { - "$id": "3609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" - }, - { - "$id": "3610", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The name of the parameter that caused the error, if applicable.", - "type": { - "$id": "3611", - "kind": "nullable", - "type": { - "$id": "3612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" - }, - { - "$id": "3613", - "kind": "property", - "name": "line", - "serializedName": "line", - "description": "The line number of the input file where the error occurred, if applicable.", - "type": { - "$id": "3614", - "kind": "nullable", - "type": { - "$id": "3615", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors" - }, - { - "$id": "3616", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of the input file for the batch.", - "type": { - "$id": "3617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" - }, - { - "$id": "3618", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed.", - "type": { - "$id": "3619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" - }, - { - "$id": "3620", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the batch.", - "type": { - "$ref": "961" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.status" - }, - { - "$id": "3621", - "kind": "property", - "name": "output_file_id", - "serializedName": "output_file_id", - "description": "The ID of the file containing the outputs of successfully executed requests.", - "type": { - "$id": "3622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" - }, - { - "$id": "3623", - "kind": "property", - "name": "error_file_id", - "serializedName": "error_file_id", - "description": "The ID of the file containing the outputs of requests with errors.", - "type": { - "$id": "3624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" - }, - { - "$id": "3625", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the batch was created.", - "type": { - "$id": "3626", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3627", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.created_at" - }, - { - "$id": "3628", - "kind": "property", - "name": "in_progress_at", - "serializedName": "in_progress_at", - "description": "The Unix timestamp (in seconds) for when the batch started processing.", - "type": { - "$id": "3629", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3630", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" - }, - { - "$id": "3631", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the batch will expire.", - "type": { - "$id": "3632", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3633", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" - }, - { - "$id": "3634", - "kind": "property", - "name": "finalizing_at", - "serializedName": "finalizing_at", - "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", - "type": { - "$id": "3635", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3636", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" - }, - { - "$id": "3637", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the batch was completed.", - "type": { - "$id": "3638", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3639", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" - }, - { - "$id": "3640", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the batch failed.", - "type": { - "$id": "3641", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3642", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" - }, - { - "$id": "3643", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the batch expired.", - "type": { - "$id": "3644", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3645", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" - }, - { - "$id": "3646", - "kind": "property", - "name": "cancelling_at", - "serializedName": "cancelling_at", - "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", - "type": { - "$id": "3647", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3648", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" - }, - { - "$id": "3649", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", - "type": { - "$id": "3650", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3651", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" - }, - { - "$id": "3652", - "kind": "property", - "name": "request_counts", - "serializedName": "request_counts", - "description": "The request counts for different statuses within the batch.", - "type": { - "$id": "3653", - "kind": "model", - "name": "BatchRequestCounts", - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3654", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "Total number of requests in the batch.", - "type": { - "$id": "3655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" - }, - { - "$id": "3656", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "Number of requests that have been completed successfully.", - "type": { - "$id": "3657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" - }, - { - "$id": "3658", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "Number of requests that have failed.", - "type": { - "$id": "3659", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" - }, - { - "$id": "3660", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3661", - "kind": "nullable", - "type": { - "$id": "3662", - "kind": "dict", - "keyType": { - "$id": "3663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.metadata" - } - ] - }, - { - "$ref": "3600" - }, - { - "$ref": "3605" - }, - { - "$ref": "3653" - }, - { - "$id": "3665", - "kind": "model", - "name": "ListBatchesResponse", - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3666", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3667", - "kind": "array", - "name": "ArrayBatch", - "valueType": { - "$ref": "3592" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" - }, - { - "$id": "3668", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" - }, - { - "$id": "3670", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" - }, - { - "$id": "3672", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" - }, - { - "$id": "3674", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3675", - "kind": "constant", - "valueType": { - "$ref": "979" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" - } - ] - }, - { - "$id": "3676", - "kind": "model", - "name": "CreateAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3677", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "982" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" - }, - { - "$id": "3678", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3679", - "kind": "nullable", - "type": { - "$id": "3680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" - }, - { - "$id": "3681", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3682", - "kind": "nullable", - "type": { - "$id": "3683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" - }, - { - "$id": "3684", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3685", - "kind": "nullable", - "type": { - "$id": "3686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" - }, - { - "$id": "3687", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3688", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" - }, - { - "$id": "3689", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3690", - "kind": "nullable", - "type": { - "$id": "3691", - "kind": "model", - "name": "CreateAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3692", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3693", - "kind": "model", - "name": "CreateAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3694", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3695", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3697", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1594" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" - }, - { - "$id": "3698", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3699", - "kind": "nullable", - "type": { - "$id": "3700", - "kind": "dict", - "keyType": { - "$id": "3701", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" - }, - { - "$id": "3703", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3704", - "kind": "nullable", - "type": { - "$id": "3705", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" - }, - { - "$id": "3706", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3707", - "kind": "nullable", - "type": { - "$id": "3708", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" - }, - { - "$id": "3709", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3710", - "kind": "nullable", - "type": { - "$id": "3711", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3712", - "kind": "constant", - "valueType": { - "$id": "3713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3691" - }, - { - "$ref": "3693" - }, - { - "$id": "3714", - "kind": "model", - "name": "AssistantObject", - "crossLanguageDefinitionId": "OpenAI.AssistantObject", - "usage": "Output,Json", - "description": "Represents an `assistant` that can call the model and use tools.", - "decorators": [], - "properties": [ - { - "$id": "3715", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "3716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" - }, - { - "$id": "3717", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `assistant`.", - "type": { - "$id": "3718", - "kind": "constant", - "valueType": { - "$ref": "1030" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" - }, - { - "$id": "3719", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the assistant was created.", - "type": { - "$id": "3720", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3721", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" - }, - { - "$id": "3722", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3723", - "kind": "nullable", - "type": { - "$id": "3724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" - }, - { - "$id": "3725", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3726", - "kind": "nullable", - "type": { - "$id": "3727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" - }, - { - "$id": "3728", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3729", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" - }, - { - "$id": "3730", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3731", - "kind": "nullable", - "type": { - "$id": "3732", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" - }, - { - "$id": "3733", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3734", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" - }, - { - "$id": "3735", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3736", - "kind": "nullable", - "type": { - "$id": "3737", - "kind": "model", - "name": "AssistantObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3738", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3739", - "kind": "model", - "name": "AssistantObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3740", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3741", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3743", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" - }, - { - "$id": "3744", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3745", - "kind": "nullable", - "type": { - "$id": "3746", - "kind": "dict", - "keyType": { - "$id": "3747", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" - }, - { - "$id": "3749", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3750", - "kind": "nullable", - "type": { - "$id": "3751", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" - }, - { - "$id": "3752", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3753", - "kind": "nullable", - "type": { - "$id": "3754", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" - }, - { - "$id": "3755", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3756", - "kind": "nullable", - "type": { - "$id": "3757", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3758", - "kind": "constant", - "valueType": { - "$id": "3759", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" - } - ] - }, - { - "$ref": "3737" - }, - { - "$ref": "3739" - }, - { - "$id": "3760", - "kind": "model", - "name": "ListAssistantsResponse", - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3761", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3762", - "kind": "constant", - "valueType": { - "$ref": "1039" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" - }, - { - "$id": "3763", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3764", - "kind": "array", - "name": "ArrayAssistantObject", - "valueType": { - "$ref": "3714" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" - }, - { - "$id": "3765", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3766", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" - }, - { - "$id": "3767", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" - }, - { - "$id": "3769", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3770", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" - } - ] - }, - { - "$id": "3771", - "kind": "model", - "name": "ModifyAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3772", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" - }, - { - "$id": "3774", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3775", - "kind": "nullable", - "type": { - "$id": "3776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" - }, - { - "$id": "3777", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3778", - "kind": "nullable", - "type": { - "$id": "3779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" - }, - { - "$id": "3780", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3781", - "kind": "nullable", - "type": { - "$id": "3782", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" - }, - { - "$id": "3783", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3784", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" - }, - { - "$id": "3785", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3786", - "kind": "nullable", - "type": { - "$id": "3787", - "kind": "model", - "name": "ModifyAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3788", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3789", - "kind": "model", - "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3790", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3791", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3793", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" - }, - { - "$id": "3794", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3795", - "kind": "nullable", - "type": { - "$id": "3796", - "kind": "dict", - "keyType": { - "$id": "3797", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" - }, - { - "$id": "3799", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3800", - "kind": "nullable", - "type": { - "$id": "3801", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" - }, - { - "$id": "3802", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3803", - "kind": "nullable", - "type": { - "$id": "3804", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" - }, - { - "$id": "3805", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3806", - "kind": "nullable", - "type": { - "$id": "3807", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3808", - "kind": "constant", - "valueType": { - "$id": "3809", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3787" - }, - { - "$ref": "3789" - }, - { - "$id": "3810", - "kind": "model", - "name": "DeleteAssistantResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3811", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" - }, - { - "$id": "3813", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3814", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" - }, - { - "$id": "3815", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3816", - "kind": "constant", - "valueType": { - "$ref": "1042" - }, - "value": "assistant.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" - } - ] - }, - { - "$id": "3817", - "kind": "model", - "name": "CreateSpeechRequest", - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3818", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", - "type": { - "$ref": "1045" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" - }, - { - "$id": "3819", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The text to generate audio for. The maximum length is 4096 characters.", - "type": { - "$id": "3820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" - }, - { - "$id": "3821", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", - "type": { - "$ref": "1051" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" - }, - { - "$id": "3822", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", - "type": { - "$ref": "1065" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" - }, - { - "$id": "3823", - "kind": "property", - "name": "speed", - "serializedName": "speed", - "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", - "type": { - "$id": "3824", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" - } - ] - }, - { - "$id": "3825", - "kind": "model", - "name": "CreateTranscriptionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3826", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3827", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" - }, - { - "$id": "3828", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1079" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" - }, - { - "$id": "3829", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", - "type": { - "$id": "3830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" - }, - { - "$id": "3831", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", - "type": { - "$id": "3832", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" - }, - { - "$id": "3833", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1083" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" - }, - { - "$id": "3834", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3835", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" - }, - { - "$id": "3836", - "kind": "property", - "name": "timestamp_granularities", - "serializedName": "timestamp_granularities", - "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", - "type": { - "$id": "3837", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "1095" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" - } - ] - }, - { - "$id": "3838", - "kind": "model", - "name": "CreateTranscriptionResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", - "usage": "Output,Json", - "description": "Represents a verbose json transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3839", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3840", - "kind": "constant", - "valueType": { - "$ref": "1101" - }, - "value": "transcribe", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" - }, - { - "$id": "3841", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio.", - "type": { - "$id": "3842", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" - }, - { - "$id": "3843", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3844", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3845", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" - }, - { - "$id": "3846", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" - }, - { - "$id": "3848", - "kind": "property", - "name": "words", - "serializedName": "words", - "description": "Extracted words and their corresponding timestamps.", - "type": { - "$id": "3849", - "kind": "array", - "name": "ArrayTranscriptionWord", - "valueType": { - "$id": "3850", - "kind": "model", - "name": "TranscriptionWord", - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3851", - "kind": "property", - "name": "word", - "serializedName": "word", - "description": "The text content of the word.", - "type": { - "$id": "3852", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" - }, - { - "$id": "3853", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the word in seconds.", - "type": { - "$id": "3854", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3855", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" - }, - { - "$id": "3856", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the word in seconds.", - "type": { - "$id": "3857", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3858", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" - }, - { - "$id": "3859", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the transcribed text and their corresponding details.", - "type": { - "$id": "3860", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$id": "3861", - "kind": "model", - "name": "TranscriptionSegment", - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3862", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "Unique identifier of the segment.", - "type": { - "$id": "3863", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" - }, - { - "$id": "3864", - "kind": "property", - "name": "seek", - "serializedName": "seek", - "description": "Seek offset of the segment.", - "type": { - "$id": "3865", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" - }, - { - "$id": "3866", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the segment in seconds.", - "type": { - "$id": "3867", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3868", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" - }, - { - "$id": "3869", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the segment in seconds.", - "type": { - "$id": "3870", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3871", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" - }, - { - "$id": "3872", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content of the segment.", - "type": { - "$id": "3873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" - }, - { - "$id": "3874", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "description": "Array of token IDs for the text content.", - "type": { - "$id": "3875", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3876", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" - }, - { - "$id": "3877", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "Temperature parameter used for generating the segment.", - "type": { - "$id": "3878", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" - }, - { - "$id": "3879", - "kind": "property", - "name": "avg_logprob", - "serializedName": "avg_logprob", - "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", - "type": { - "$id": "3880", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" - }, - { - "$id": "3881", - "kind": "property", - "name": "compression_ratio", - "serializedName": "compression_ratio", - "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", - "type": { - "$id": "3882", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" - }, - { - "$id": "3883", - "kind": "property", - "name": "no_speech_prob", - "serializedName": "no_speech_prob", - "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", - "type": { - "$id": "3884", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" - } - ] - }, - { - "$ref": "3850" - }, - { - "$ref": "3861" - }, - { - "$id": "3885", - "kind": "model", - "name": "CreateTranscriptionResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", - "usage": "Output,Json", - "description": "Represents a transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3886", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" - } - ] - }, - { - "$id": "3888", - "kind": "model", - "name": "CreateTranslationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3889", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3890", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" - }, - { - "$id": "3891", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1104" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" - }, - { - "$id": "3892", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", - "type": { - "$id": "3893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" - }, - { - "$id": "3894", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1108" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" - }, - { - "$id": "3895", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3896", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" - } - ] - }, - { - "$id": "3897", - "kind": "model", - "name": "CreateTranslationResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3898", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3899", - "kind": "constant", - "valueType": { - "$ref": "1120" - }, - "value": "translate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" - }, - { - "$id": "3900", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the output translation (always `english`).", - "type": { - "$id": "3901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" - }, - { - "$id": "3902", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3903", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3904", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" - }, - { - "$id": "3905", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The translated text.", - "type": { - "$id": "3906", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" - }, - { - "$id": "3907", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the translated text and their corresponding details.", - "type": { - "$id": "3908", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$ref": "3861" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" - } - ] - }, - { - "$id": "3909", - "kind": "model", - "name": "CreateTranslationResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3910", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3911", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" - } - ] - }, - { - "$id": "3912", - "kind": "model", - "name": "AssistantResponseFormat", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", - "access": "public", - "usage": "Input", - "decorators": [], - "discriminatorProperty": { - "$id": "3913", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" - }, - "properties": [ - { - "$ref": "3913" - } - ], - "discriminatedSubtypes": { - "$id": "3915", - "text": { - "$id": "3916", - "kind": "model", - "name": "AssistantResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", - "usage": "Input", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3917", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3918", - "kind": "constant", - "valueType": { - "$id": "3919", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3920", - "kind": "model", - "name": "AssistantResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", - "usage": "Input", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3921", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3922", - "kind": "constant", - "valueType": { - "$id": "3923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3924", - "kind": "model", - "name": "AssistantResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", - "usage": "Input", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3925", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3926", - "kind": "constant", - "valueType": { - "$id": "3927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" - }, - { - "$id": "3928", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - { - "$ref": "3916" - }, - { - "$ref": "3920" - }, - { - "$ref": "3924" - }, - { - "$id": "3929", - "kind": "model", - "name": "BatchRequestInput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line object of the batch input file", - "decorators": [], - "properties": [ - { - "$id": "3930", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", - "type": { - "$id": "3931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" - }, - { - "$id": "3932", - "kind": "property", - "name": "method", - "serializedName": "method", - "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", - "type": { - "$id": "3933", - "kind": "constant", - "valueType": { - "$ref": "1123" - }, - "value": "POST", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" - }, - { - "$id": "3934", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", - "type": { - "$id": "3935", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" - } - ] - }, - { - "$id": "3936", - "kind": "model", - "name": "BatchRequestOutput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", - "access": "public", - "usage": "Output", - "description": "The per-line object of the batch output and error files", - "decorators": [], - "properties": [ - { - "$id": "3937", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" - }, - { - "$id": "3939", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs.", - "type": { - "$id": "3940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" - }, - { - "$id": "3941", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "3942", - "kind": "nullable", - "type": { - "$id": "3943", - "kind": "model", - "name": "BatchRequestOutputResponse", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3944", - "kind": "property", - "name": "status_code", - "serializedName": "status_code", - "description": "The HTTP status code of the response", - "type": { - "$id": "3945", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" - }, - { - "$id": "3946", - "kind": "property", - "name": "request_id", - "serializedName": "request_id", - "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", - "type": { - "$id": "3947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" - }, - { - "$id": "3948", - "kind": "property", - "name": "body", - "serializedName": "body", - "description": "The JSON body of the response", - "type": { - "$id": "3949", - "kind": "dict", - "keyType": { - "$id": "3950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3951", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" - }, - { - "$id": "3952", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", - "type": { - "$id": "3953", - "kind": "nullable", - "type": { - "$id": "3954", - "kind": "model", - "name": "BatchRequestOutputError", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3955", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "3956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" - }, - { - "$id": "3957", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "3958", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" - } - ] - }, - { - "$ref": "3943" - }, - { - "$ref": "3954" - }, - { - "$id": "3959", - "kind": "model", - "name": "ChatCompletionFunctionChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3960", - "kind": "model", - "name": "ChatCompletionToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3961", - "kind": "model", - "name": "ChatMessageContent", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3962", - "kind": "model", - "name": "ChatMessageContentPart", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3963", - "kind": "model", - "name": "CreateChatCompletionFunctionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", - "access": "public", - "usage": "Output", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3964", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3965", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" - }, - { - "$id": "3966", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3967", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3968", - "kind": "model", - "name": "CreateChatCompletionFunctionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3969", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", - "type": { - "$ref": "1126" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3970", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3971", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" - }, - { - "$id": "3972", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$ref": "3523" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" - }, - { - "$id": "3973", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3974", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3975", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" - }, - { - "$id": "3976", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" - }, - { - "$id": "3978", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" - }, - { - "$id": "3980", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3981", - "kind": "constant", - "valueType": { - "$ref": "1136" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" - }, - { - "$id": "3982", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" - } - ] - }, - { - "$ref": "3968" - }, - { - "$id": "3983", - "kind": "model", - "name": "ChatCompletionStreamResponseDelta", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", - "usage": "Output", - "description": "A chat completion delta generated by streamed model responses.", - "decorators": [], - "properties": [ - { - "$id": "3984", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the chunk message.", - "type": { - "$id": "3985", - "kind": "nullable", - "type": { - "$id": "3986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" - }, - { - "$id": "3987", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3988", - "kind": "model", - "name": "ChatCompletionStreamResponseDeltaFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3989", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3990", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" - }, - { - "$id": "3991", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3992", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" - }, - { - "$id": "3993", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3994", - "kind": "array", - "name": "ArrayChatCompletionMessageToolCallChunk", - "valueType": { - "$id": "3995", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunk", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3996", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3997", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" - }, - { - "$id": "3998", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" - }, - { - "$id": "4000", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "4001", - "kind": "constant", - "valueType": { - "$ref": "1139" - }, - "value": "function", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" - }, - { - "$id": "4002", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "4003", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunkFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4004", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "4005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" - }, - { - "$id": "4006", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "4007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" - }, - { - "$id": "4008", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$ref": "1142" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" - }, - { - "$id": "4009", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "4010", - "kind": "nullable", - "type": { - "$id": "4011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" - } - ] - }, - { - "$ref": "3988" - }, - { - "$ref": "3995" - }, - { - "$ref": "4003" - }, - { - "$id": "4012", - "kind": "model", - "name": "CreateChatCompletionStreamResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", - "access": "public", - "usage": "Output", - "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "4013", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion. Each chunk has the same ID.", - "type": { - "$id": "4014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" - }, - { - "$id": "4015", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", - "type": { - "$id": "4016", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4017", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4018", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$ref": "3983" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" - }, - { - "$id": "4019", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "4020", - "kind": "nullable", - "type": { - "$id": "4021", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4022", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "4023", - "kind": "nullable", - "type": { - "$id": "4024", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "4025", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "4026", - "kind": "nullable", - "type": { - "$id": "4027", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" - }, - { - "$id": "4028", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$id": "4029", - "kind": "nullable", - "type": { - "$ref": "1152" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" - }, - { - "$id": "4030", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "4031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" - }, - { - "$id": "4032", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", - "type": { - "$id": "4033", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "4034", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" - }, - { - "$id": "4035", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to generate the completion.", - "type": { - "$id": "4036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" - }, - { - "$id": "4037", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "4038", - "kind": "nullable", - "type": { - "$ref": "1164" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" - }, - { - "$id": "4039", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "4040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" - }, - { - "$id": "4041", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion.chunk`.", - "type": { - "$id": "4042", - "kind": "constant", - "valueType": { - "$ref": "1170" - }, - "value": "chat.completion.chunk", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" - }, - { - "$id": "4043", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", - "type": { - "$id": "4044", - "kind": "model", - "name": "CreateChatCompletionStreamResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4045", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "4046", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" - }, - { - "$id": "4047", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "4048", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "4049", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "4050", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" - } - ] - }, - { - "$ref": "4017" - }, - { - "$ref": "4021" - }, - { - "$ref": "4044" - }, - { - "$id": "4051", - "kind": "model", - "name": "FinetuneChatRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for chat models", - "decorators": [], - "properties": [ - { - "$id": "4052", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "type": { - "$id": "4053", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4054", - "kind": "union", - "name": "FinetuneChatRequestInputMessage", - "variantTypes": [ - { - "$ref": "3315" - }, - { - "$ref": "3331" - }, - { - "$id": "4055", - "kind": "model", - "name": "FineTuneChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", - "usage": "Input", - "decorators": [], - "baseModel": { - "$ref": "3350" - }, - "properties": [] - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" - }, - { - "$id": "4056", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may generate JSON inputs for.", - "type": { - "$id": "4057", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$ref": "3479" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" - }, - { - "$id": "4058", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "4059", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" - }, - { - "$id": "4060", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "A list of functions the model may generate JSON inputs for.", - "type": { - "$id": "4061", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$ref": "3507" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" - } - ] - }, - { - "$ref": "4055" - }, - { - "$id": "4062", - "kind": "model", - "name": "FinetuneCompletionRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for completions models", - "decorators": [], - "properties": [ - { - "$id": "4063", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The input prompt for this training example.", - "type": { - "$id": "4064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" - }, - { - "$id": "4065", - "kind": "property", - "name": "completion", - "serializedName": "completion", - "description": "The desired completion for this training example.", - "type": { - "$id": "4066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" - } - ] - }, - { - "$id": "4067", - "kind": "model", - "name": "MessageContentTextObjectAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4068", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4069", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" - }, - "properties": [ - { - "$ref": "4068" - } - ], - "discriminatedSubtypes": { - "$id": "4070", - "file_citation": { - "$id": "4071", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Input,Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4072", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4073", - "kind": "constant", - "valueType": { - "$id": "4074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4075", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4077", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4078", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4079", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4081", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4082", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4083", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4084", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4085", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Input,Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4086", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4087", - "kind": "constant", - "valueType": { - "$id": "4088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4089", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4091", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4092", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4093", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4095", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4096", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4097", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4098", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - { - "$ref": "4071" - }, - { - "$ref": "4078" - }, - { - "$ref": "4085" - }, - { - "$ref": "4092" - }, - { - "$id": "4099", - "kind": "model", - "name": "MessageDeltaContent", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", - "access": "public", - "usage": "Output", - "description": "Represents a single piece of incremental content in an Assistants API streaming response.", - "decorators": [], - "discriminatorProperty": { - "$id": "4100", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" - }, - "properties": [ - { - "$ref": "4100" - } - ], - "discriminatedSubtypes": { - "$id": "4102", - "image_file": { - "$id": "4103", - "kind": "model", - "name": "MessageDeltaContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", - "access": "public", - "usage": "Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "discriminatorValue": "image_file", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4104", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4105", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" - }, - { - "$id": "4106", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4107", - "kind": "constant", - "valueType": { - "$id": "4108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" - }, - { - "$id": "4109", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4110", - "kind": "model", - "name": "MessageDeltaContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4111", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4113", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1173" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" - } - ] - }, - "image_url": { - "$id": "4114", - "kind": "model", - "name": "MessageDeltaContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", - "access": "public", - "usage": "Output", - "description": "References an image URL in the content of a message.", - "discriminatorValue": "image_url", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4115", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4116", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" - }, - { - "$id": "4117", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_url`.", - "type": { - "$id": "4118", - "kind": "constant", - "valueType": { - "$id": "4119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" - }, - { - "$id": "4120", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4121", - "kind": "model", - "name": "MessageDeltaContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4122", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4123", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4124", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1181" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" - } - ] - }, - "text": { - "$id": "4125", - "kind": "model", - "name": "MessageDeltaContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", - "access": "public", - "usage": "Output", - "description": "The text content that is part of a message.", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4126", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4127", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" - }, - { - "$id": "4128", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4129", - "kind": "constant", - "valueType": { - "$id": "4130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" - }, - { - "$id": "4131", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4132", - "kind": "model", - "name": "MessageDeltaContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4133", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" - }, - { - "$id": "4135", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4136", - "kind": "array", - "name": "ArrayMessageDeltaTextContentAnnotation", - "valueType": { - "$id": "4137", - "kind": "model", - "name": "MessageDeltaTextContentAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", - "access": "public", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4138", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4139", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" - }, - "properties": [ - { - "$ref": "4138" - } - ], - "discriminatedSubtypes": { - "$id": "4140", - "file_citation": { - "$id": "4141", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4142", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4143", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" - }, - { - "$id": "4144", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4145", - "kind": "constant", - "valueType": { - "$id": "4146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4147", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4149", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4150", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4151", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - }, - { - "$id": "4153", - "kind": "property", - "name": "quote", - "serializedName": "quote", - "description": "The specific quote in the file.", - "type": { - "$id": "4154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4155", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4156", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4157", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4158", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4159", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4160", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4161", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" - }, - { - "$id": "4162", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4163", - "kind": "constant", - "valueType": { - "$id": "4164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4165", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4166", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4167", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4168", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4169", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4171", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4172", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4173", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" - } - ] - }, - "refusal": { - "$id": "4175", - "kind": "model", - "name": "MessageDeltaContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", - "usage": "Output", - "description": "The refusal content that is part of a message.", - "discriminatorValue": "refusal", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4176", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the refusal part in the message.", - "type": { - "$id": "4177", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" - }, - { - "$id": "4178", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4179", - "kind": "constant", - "valueType": { - "$id": "4180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" - }, - { - "$id": "4181", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" - } - ] - } - } - }, - { - "$ref": "4103" - }, - { - "$ref": "4110" - }, - { - "$ref": "4114" - }, - { - "$ref": "4121" - }, - { - "$ref": "4125" - }, - { - "$ref": "4132" - }, - { - "$ref": "4137" - }, - { - "$ref": "4141" - }, - { - "$ref": "4150" - }, - { - "$ref": "4159" - }, - { - "$ref": "4168" - }, - { - "$ref": "4175" - }, - { - "$id": "4183", - "kind": "model", - "name": "MessageContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4184", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4185", - "kind": "constant", - "valueType": { - "$ref": "1189" - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" - }, - { - "$id": "4186", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4187", - "kind": "model", - "name": "MessageContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4188", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4190", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1192" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" - } - ] - }, - { - "$ref": "4187" - }, - { - "$id": "4191", - "kind": "model", - "name": "MessageContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4192", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4193", - "kind": "constant", - "valueType": { - "$ref": "1200" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" - }, - { - "$id": "4194", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4195", - "kind": "model", - "name": "MessageContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4196", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" - }, - { - "$id": "4198", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4199", - "kind": "array", - "name": "ArrayMessageContentTextObjectAnnotation", - "valueType": { - "$ref": "4067" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" - } - ] - }, - { - "$ref": "4195" - }, - { - "$id": "4200", - "kind": "model", - "name": "MessageContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", - "access": "public", - "usage": "Input,Output", - "description": "The refusal content generated by the assistant.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4201", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4202", - "kind": "constant", - "valueType": { - "$ref": "1203" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" - }, - { - "$id": "4203", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" - } - ] - }, - { - "$id": "4205", - "kind": "model", - "name": "MessageContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image URL in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4206", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "4207", - "kind": "constant", - "valueType": { - "$ref": "1206" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" - }, - { - "$id": "4208", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4209", - "kind": "model", - "name": "MessageContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4210", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4211", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4212", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", - "type": { - "$ref": "1209" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" - } - ] - }, - { - "$ref": "4209" - }, - { - "$id": "4213", - "kind": "model", - "name": "MessageDeltaObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a message delta i.e. any changed fields on a message during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4214", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the message, which can be referenced in API endpoints.", - "type": { - "$id": "4215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" - }, - { - "$id": "4216", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message.delta`.", - "type": { - "$id": "4217", - "kind": "constant", - "valueType": { - "$ref": "1217" - }, - "value": "thread.message.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" - }, - { - "$id": "4218", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the Message.", - "type": { - "$id": "4219", - "kind": "model", - "name": "MessageDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4220", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "1220" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" - }, - { - "$id": "4221", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "4222", - "kind": "array", - "name": "ArrayMessageDeltaContent", - "valueType": { - "$ref": "4099" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" - } - ] - }, - { - "$ref": "4219" - }, - { - "$id": "4223", - "kind": "model", - "name": "MessageRequestContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4224", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4225", - "kind": "constant", - "valueType": { - "$ref": "1226" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" - }, - { - "$id": "4226", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content to be sent to the model", - "type": { - "$id": "4227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" - } - ] - }, - { - "$id": "4228", - "kind": "model", - "name": "RunStepDeltaStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4229", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" - }, - "properties": [ - { - "$ref": "4229" - } - ], - "discriminatedSubtypes": { - "$id": "4231", - "message_creation": { - "$id": "4232", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", - "access": "public", - "usage": "Output", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4233", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "4234", - "kind": "constant", - "valueType": { - "$id": "4235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" - }, - { - "$id": "4236", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "4237", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4238", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "4239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "4240", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", - "access": "public", - "usage": "Output", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4241", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "4242", - "kind": "constant", - "valueType": { - "$id": "4243", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" - }, - { - "$id": "4244", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "4245", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "4246", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "4247", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "4247" - } - ], - "discriminatedSubtypes": { - "$id": "4249", - "code_interpreter": { - "$id": "4250", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", - "access": "public", - "usage": "Output", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4251", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" - }, - { - "$id": "4253", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "4254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "4255", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "4256", - "kind": "constant", - "valueType": { - "$id": "4257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "4258", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "4259", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4260", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "4261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "4262", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "4263", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "4264", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "4265", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "4265" - } - ], - "discriminatedSubtypes": { - "$id": "4267", - "logs": { - "$id": "4268", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "access": "public", - "usage": "Output", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4269", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" - }, - { - "$id": "4271", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "4272", - "kind": "constant", - "valueType": { - "$id": "4273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "4274", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "4275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "4276", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4277", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4278", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" - }, - { - "$id": "4279", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "4280", - "kind": "constant", - "valueType": { - "$id": "4281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "4282", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "4283", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4284", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "4285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "4286", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4287", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4288", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" - }, - { - "$id": "4289", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "4291", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "4292", - "kind": "constant", - "valueType": { - "$id": "4293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "4294", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "4295", - "kind": "dict", - "keyType": { - "$id": "4296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "4297", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "4298", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4299", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4300", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" - }, - { - "$id": "4301", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "4303", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "4304", - "kind": "constant", - "valueType": { - "$id": "4305", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "4306", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "4307", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4308", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "4309", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "4310", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "4311", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "4312", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "4313", - "kind": "nullable", - "type": { - "$id": "4314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - { - "$ref": "4232" - }, - { - "$ref": "4237" - }, - { - "$ref": "4240" - }, - { - "$ref": "4246" - }, - { - "$ref": "4250" - }, - { - "$ref": "4259" - }, - { - "$ref": "4264" - }, - { - "$ref": "4268" - }, - { - "$ref": "4276" - }, - { - "$ref": "4283" - }, - { - "$ref": "4286" - }, - { - "$ref": "4298" - }, - { - "$ref": "4307" - }, - { - "$id": "4315", - "kind": "model", - "name": "RunStepDeltaObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4316", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "4317", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" - }, - { - "$id": "4318", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step.delta`.", - "type": { - "$id": "4319", - "kind": "constant", - "valueType": { - "$ref": "1229" - }, - "value": "thread.run.step.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" - }, - { - "$id": "4320", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the run step.", - "type": { - "$id": "4321", - "kind": "model", - "name": "RunStepDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4322", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$ref": "4228" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" - } - ] - }, - { - "$ref": "4321" - }, - { - "$id": "4323", - "kind": "model", - "name": "CreateThreadRequestToolResourcesFileSearchBase", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "4324", - "kind": "model", - "name": "ListThreadsResponse", - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", - "access": "public", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "4326", - "kind": "constant", - "valueType": { - "$ref": "1232" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" - }, - { - "$id": "4327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "4328", - "kind": "array", - "name": "ArrayThreadObject", - "valueType": { - "$ref": "2052" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" - }, - { - "$id": "4329", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "4330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" - }, - { - "$id": "4331", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "4332", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" - }, - { - "$id": "4333", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "4334", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" - } - ] - } - ], - "Clients": [ - { - "$id": "4335", - "Name": "OpenAIClient", - "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", - "Operations": [], - "Protocol": { - "$id": "4336" - }, - "Parameters": [ - { - "$id": "4337", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4338", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4339", - "Type": { - "$id": "4340", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - } - ], - "Decorators": [] - }, - { - "$id": "4341", - "Name": "Audio", - "Operations": [ - { - "$id": "4342", - "Name": "createSpeech", - "ResourceName": "Audio", - "Summary": "Generates audio from the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4343", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4344", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4345", - "Type": { - "$id": "4346", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4347", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4348", - "kind": "constant", - "valueType": { - "$id": "4349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4350", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4351", - "kind": "constant", - "valueType": { - "$id": "4352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4353", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3817" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4354", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4355", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4356", - "Name": "transferEncoding", - "NameInResponse": "Transfer-Encoding", - "Description": "chunked", - "Type": { - "$id": "4357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "$id": "4358", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4359", - "kind": "constant", - "valueType": { - "$id": "4360", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/octet-stream" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/speech", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", - "Decorators": [] - }, - { - "$id": "4361", - "Name": "createTranscription", - "ResourceName": "Audio", - "Summary": "Transcribes audio into the input language.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4362", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4363", - "kind": "constant", - "valueType": { - "$id": "4364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4365", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4366", - "kind": "constant", - "valueType": { - "$id": "4367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4368", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3825" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4369", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4370", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4371", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4372", - "kind": "constant", - "valueType": { - "$id": "4373", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/transcriptions", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", - "Decorators": [] - }, - { - "$id": "4374", - "Name": "createTranslation", - "ResourceName": "Audio", - "Summary": "Translates audio into English..", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4375", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4376", - "kind": "constant", - "valueType": { - "$id": "4377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4378", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4379", - "kind": "constant", - "valueType": { - "$id": "4380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4381", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3888" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4382", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4384", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4385", - "kind": "constant", - "valueType": { - "$id": "4386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/translations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4387" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4343" - } - ], - "Decorators": [] - }, - { - "$id": "4388", - "Name": "Assistants", - "Operations": [ - { - "$id": "4389", - "Name": "createAssistant", - "ResourceName": "Assistants", - "Summary": "Create an assistant with a model and instructions.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4390", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4391", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4392", - "Type": { - "$id": "4393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4394", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4395", - "kind": "constant", - "valueType": { - "$id": "4396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4397", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4398", - "kind": "constant", - "valueType": { - "$id": "4399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4400", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3676" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4401", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", - "Decorators": [] - }, - { - "$id": "4402", - "Name": "listAssistants", - "ResourceName": "Assistants", - "Summary": "Returns a list of assistants.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4403", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4404", - "kind": "constant", - "valueType": { - "$id": "4405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4406", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4407", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4408", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "1033" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4409", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4411", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4412", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4413", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3760" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", - "Decorators": [] - }, - { - "$id": "4414", - "Name": "getAssistant", - "ResourceName": "Assistants", - "Summary": "Retrieves an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4415", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4416", - "kind": "constant", - "valueType": { - "$id": "4417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4418", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to retrieve.", - "Type": { - "$id": "4419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4420", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", - "Decorators": [] - }, - { - "$id": "4421", - "Name": "modifyAssistant", - "ResourceName": "Assistants", - "Summary": "Modifies an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4422", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4423", - "kind": "constant", - "valueType": { - "$id": "4424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4425", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to modify.", - "Type": { - "$id": "4426", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4427", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4428", - "kind": "constant", - "valueType": { - "$id": "4429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4430", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3771" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4431", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", - "Decorators": [] - }, - { - "$id": "4432", - "Name": "deleteAssistant", - "ResourceName": "Assistants", - "Summary": "Delete an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4433", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4434", - "kind": "constant", - "valueType": { - "$id": "4435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4436", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to delete.", - "Type": { - "$id": "4437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4438", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3810" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4439" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4390" - } - ], - "Decorators": [] - }, - { - "$id": "4440", - "Name": "Batches", - "Operations": [ - { - "$id": "4441", - "Name": "createBatch", - "ResourceName": "Batches", - "Summary": "Creates and executes a batch from an uploaded file of requests", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4442", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4443", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4444", - "Type": { - "$id": "4445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4446", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4447", - "kind": "constant", - "valueType": { - "$id": "4448", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4449", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4450", - "kind": "constant", - "valueType": { - "$id": "4451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4452", - "Name": "createBatchRequest", - "NameInRequest": "createBatchRequest", - "Type": { - "$ref": "3581" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Spread", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4453", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", - "Decorators": [] - }, - { - "$id": "4454", - "Name": "listBatches", - "ResourceName": "Batches", - "Summary": "List your organization's batches.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4455", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4456", - "kind": "constant", - "valueType": { - "$id": "4457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4458", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4460", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4462", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3665" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", - "Decorators": [] - }, - { - "$id": "4463", - "Name": "retrieveBatch", - "ResourceName": "Batches", - "Summary": "Retrieves a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4464", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4465", - "kind": "constant", - "valueType": { - "$id": "4466", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4467", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to retrieve.", - "Type": { - "$id": "4468", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4469", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", - "Decorators": [] - }, - { - "$id": "4470", - "Name": "cancelBatch", - "ResourceName": "Batches", - "Summary": "Cancels an in-progress batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4471", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4472", - "kind": "constant", - "valueType": { - "$id": "4473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4474", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to cancel.", - "Type": { - "$id": "4475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4476", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4477" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4442" - } - ], - "Decorators": [] - }, - { - "$id": "4478", - "Name": "Chat", - "Operations": [ - { - "$id": "4479", - "Name": "createChatCompletion", - "ResourceName": "Chat", - "Summary": "Creates a model response for the given chat conversation.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4480", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4481", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4482", - "Type": { - "$id": "4483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4484", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4485", - "kind": "constant", - "valueType": { - "$id": "4486", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4487", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4488", - "kind": "constant", - "valueType": { - "$id": "4489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4490", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3308" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4491", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3513" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/chat/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4492" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4480" - } - ], - "Decorators": [] - }, - { - "$id": "4493", - "Name": "Completions", - "Operations": [ - { - "$id": "4494", - "Name": "createCompletion", - "ResourceName": "Completions", - "Summary": "Creates a completion for the provided prompt and parameters.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4495", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4496", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4497", - "Type": { - "$id": "4498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4499", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4500", - "kind": "constant", - "valueType": { - "$id": "4501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4502", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4503", - "kind": "constant", - "valueType": { - "$id": "4504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4505", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3192" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4506", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3259" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4507" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4495" - } - ], - "Decorators": [] - }, - { - "$id": "4508", - "Name": "Embeddings", - "Operations": [ - { - "$id": "4509", - "Name": "createEmbedding", - "ResourceName": "Embeddings", - "Summary": "Creates an embedding vector representing the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4510", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4511", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4512", - "Type": { - "$id": "4513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4514", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4515", - "kind": "constant", - "valueType": { - "$id": "4516", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4517", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4518", - "kind": "constant", - "valueType": { - "$id": "4519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4520", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3152" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4521", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3169" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/embeddings", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4522" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4510" - } - ], - "Decorators": [] - }, - { - "$id": "4523", - "Name": "Files", - "Operations": [ - { - "$id": "4524", - "Name": "createFile", - "ResourceName": "Files", - "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4525", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4526", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4527", - "Type": { - "$id": "4528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4529", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4530", - "kind": "constant", - "valueType": { - "$id": "4531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4532", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4533", - "kind": "constant", - "valueType": { - "$id": "4534", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4535", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3136" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4536", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/files", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.createFile", - "Decorators": [] - }, - { - "$id": "4537", - "Name": "listFiles", - "ResourceName": "Files", - "Summary": "Returns a list of files that belong to the user's organization.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4538", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4539", - "kind": "constant", - "valueType": { - "$id": "4540", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4541", - "Name": "purpose", - "NameInRequest": "purpose", - "Description": "Only return files with the given purpose.", - "Type": { - "$id": "4542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4543", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3140" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", - "Decorators": [] - }, - { - "$id": "4544", - "Name": "retrieveFile", - "ResourceName": "Files", - "Summary": "Returns information about a specific file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4545", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4546", - "kind": "constant", - "valueType": { - "$id": "4547", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4548", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4549", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4550", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", - "Decorators": [] - }, - { - "$id": "4551", - "Name": "deleteFile", - "ResourceName": "Files", - "Summary": "Delete a file", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4552", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4553", - "kind": "constant", - "valueType": { - "$id": "4554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4555", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4557", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3145" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", - "Decorators": [] - }, - { - "$id": "4558", - "Name": "downloadFile", - "ResourceName": "Files", - "Summary": "Returns the contents of the specified file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4559", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4560", - "kind": "constant", - "valueType": { - "$id": "4561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4562", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4564", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4565", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}/content", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4566" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4525" - } - ], - "Decorators": [] - }, - { - "$id": "4567", - "Name": "FineTuning", - "Operations": [ - { - "$id": "4568", - "Name": "createFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4569", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4570", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4571", - "Type": { - "$id": "4572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4573", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4574", - "kind": "constant", - "valueType": { - "$id": "4575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4576", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4577", - "kind": "constant", - "valueType": { - "$id": "4578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4579", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2935" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4580", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", - "Decorators": [] - }, - { - "$id": "4581", - "Name": "listPaginatedFineTuningJobs", - "ResourceName": "FineTuning", - "Summary": "List your organization's fine-tuning jobs", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4582", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4583", - "kind": "constant", - "valueType": { - "$id": "4584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4585", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last job from the previous pagination request.", - "Type": { - "$id": "4586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4587", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of fine-tuning jobs to retrieve.", - "Type": { - "$id": "4588", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4589", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3068" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", - "Decorators": [] - }, - { - "$id": "4590", - "Name": "retrieveFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4591", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4592", - "kind": "constant", - "valueType": { - "$id": "4593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4594", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job.", - "Type": { - "$id": "4595", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4596", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", - "Decorators": [] - }, - { - "$id": "4597", - "Name": "cancelFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Immediately cancel a fine-tune job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4598", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4599", - "kind": "constant", - "valueType": { - "$id": "4600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4601", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to cancel.", - "Type": { - "$id": "4602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4603", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", - "Decorators": [] - }, - { - "$id": "4604", - "Name": "listFineTuningJobCheckpoints", - "ResourceName": "FineTuning", - "Summary": "List the checkpoints for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4605", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4606", - "kind": "constant", - "valueType": { - "$id": "4607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4608", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get checkpoints for.", - "Type": { - "$id": "4609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4610", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last checkpoint ID from the previous pagination request.", - "Type": { - "$id": "4611", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4612", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of checkpoints to retrieve.", - "Type": { - "$id": "4613", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4614", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3075" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", - "Decorators": [] - }, - { - "$id": "4615", - "Name": "listFineTuningEvents", - "ResourceName": "FineTuning", - "Summary": "Get status updates for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4616", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4617", - "kind": "constant", - "valueType": { - "$id": "4618", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4619", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get events for.", - "Type": { - "$id": "4620", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4621", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last event from the previous pagination request.", - "Type": { - "$id": "4622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4623", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of events to retrieve.", - "Type": { - "$id": "4624", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4625", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3118" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4626" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4569" - } - ], - "Decorators": [] - }, - { - "$id": "4627", - "Name": "Images", - "Operations": [ - { - "$id": "4628", - "Name": "createImage", - "ResourceName": "Images", - "Summary": "Creates an image given a prompt", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4629", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4630", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4631", - "Type": { - "$id": "4632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4633", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4634", - "kind": "constant", - "valueType": { - "$id": "4635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4636", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4637", - "kind": "constant", - "valueType": { - "$id": "4638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4639", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2873" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4640", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/generations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImage", - "Decorators": [] - }, - { - "$id": "4641", - "Name": "createImageEdit", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4642", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4643", - "kind": "constant", - "valueType": { - "$id": "4644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4645", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4646", - "kind": "constant", - "valueType": { - "$id": "4647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4648", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2903" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4649", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/edits", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", - "Decorators": [] - }, - { - "$id": "4650", - "Name": "createImageVariation", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4651", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4652", - "kind": "constant", - "valueType": { - "$id": "4653", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4654", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4655", - "kind": "constant", - "valueType": { - "$id": "4656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4657", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2921" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4658", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/variations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4659" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4629" - } - ], - "Decorators": [] - }, - { - "$id": "4660", - "Name": "Messages", - "Operations": [ - { - "$id": "4661", - "Name": "createMessage", - "ResourceName": "Messages", - "Summary": "Create a message.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4662", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4663", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4664", - "Type": { - "$id": "4665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4666", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4667", - "kind": "constant", - "valueType": { - "$id": "4668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4669", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", - "Type": { - "$id": "4670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4671", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4672", - "kind": "constant", - "valueType": { - "$id": "4673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4674", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1526" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4675", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", - "Decorators": [] - }, - { - "$id": "4676", - "Name": "listMessages", - "ResourceName": "Messages", - "Summary": "Returns a list of messages for a given thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4677", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4678", - "kind": "constant", - "valueType": { - "$id": "4679", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4680", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", - "Type": { - "$id": "4681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4682", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4683", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4684", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "609" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4685", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4687", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4689", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2849" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", - "Decorators": [] - }, - { - "$id": "4690", - "Name": "getMessage", - "ResourceName": "Messages", - "Summary": "Retrieve a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4691", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4692", - "kind": "constant", - "valueType": { - "$id": "4693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4694", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", - "Type": { - "$id": "4695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4696", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to retrieve.", - "Type": { - "$id": "4697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4698", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", - "Decorators": [] - }, - { - "$id": "4699", - "Name": "modifyMessage", - "ResourceName": "Messages", - "Summary": "Modifies a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4700", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4701", - "kind": "constant", - "valueType": { - "$id": "4702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4703", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4705", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to modify.", - "Type": { - "$id": "4706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4707", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4708", - "kind": "constant", - "valueType": { - "$id": "4709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4710", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2860" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4711", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", - "Decorators": [] - }, - { - "$id": "4712", - "Name": "deleteMessage", - "ResourceName": "Messages", - "Summary": "Deletes a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4713", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4714", - "kind": "constant", - "valueType": { - "$id": "4715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4716", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4717", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4718", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to delete.", - "Type": { - "$id": "4719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4720", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2866" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4721" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4662" - } - ], - "Decorators": [] - }, - { - "$id": "4722", - "Name": "ModelsOps", - "Operations": [ - { - "$id": "4723", - "Name": "listModels", - "ResourceName": "Models", - "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4724", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4725", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4726", - "Type": { - "$id": "4727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4728", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4729", - "kind": "constant", - "valueType": { - "$id": "4730", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4731", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2781" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.listModels", - "Decorators": [] - }, - { - "$id": "4732", - "Name": "retrieveModel", - "ResourceName": "Models", - "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4733", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4734", - "kind": "constant", - "valueType": { - "$id": "4735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4736", - "Name": "model", - "NameInRequest": "model", - "Description": "The ID of the model to use for this request.", - "Type": { - "$id": "4737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4738", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2786" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", - "Decorators": [] - }, - { - "$id": "4739", - "Name": "deleteModel", - "ResourceName": "Models", - "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4740", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4741", - "kind": "constant", - "valueType": { - "$id": "4742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4743", - "Name": "model", - "NameInRequest": "model", - "Description": "The model to delete", - "Type": { - "$id": "4744", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4745", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2796" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4746" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4724" - } - ], - "Decorators": [] - }, - { - "$id": "4747", - "Name": "Moderations", - "Operations": [ - { - "$id": "4748", - "Name": "createModeration", - "ResourceName": "Moderations", - "Summary": "Classifies if text is potentially harmful.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4749", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4750", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4751", - "Type": { - "$id": "4752", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4753", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4754", - "kind": "constant", - "valueType": { - "$id": "4755", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4756", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4757", - "kind": "constant", - "valueType": { - "$id": "4758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4759", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2716" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4760", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2723" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/moderations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4761" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4749" - } - ], - "Decorators": [] - }, - { - "$id": "4762", - "Name": "Realtime", - "Operations": [ - { - "$id": "4763", - "Name": "startRealtimeSession", - "ResourceName": "Realtime", - "Summary": "Starts a real-time conversation session.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4764", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4765", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4766", - "Type": { - "$id": "4767", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4768", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4769", - "kind": "constant", - "valueType": { - "$id": "4770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4771", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4772", - "kind": "constant", - "valueType": { - "$id": "4773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4774", - "Name": "requestMessages", - "NameInRequest": "requestMessages", - "Type": { - "$id": "4775", - "kind": "array", - "name": "ArrayRealtimeRequestCommand", - "valueType": { - "$ref": "2100" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4776", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4777", - "kind": "array", - "name": "ArrayRealtimeResponseCommand", - "valueType": { - "$ref": "2322" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/realtime", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4778" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4764" - } - ], - "Decorators": [] - }, - { - "$id": "4779", - "Name": "Threads", - "Operations": [ - { - "$id": "4780", - "Name": "createThread", - "ResourceName": "Threads", - "Summary": "Create a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4781", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4782", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4783", - "Type": { - "$id": "4784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4785", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4786", - "kind": "constant", - "valueType": { - "$id": "4787", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4788", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4789", - "kind": "constant", - "valueType": { - "$id": "4790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4791", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1523" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4792", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", - "Decorators": [] - }, - { - "$id": "4793", - "Name": "getThread", - "ResourceName": "Threads", - "Summary": "Retrieves a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4794", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4795", - "kind": "constant", - "valueType": { - "$id": "4796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4797", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to retrieve.", - "Type": { - "$id": "4798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4799", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", - "Decorators": [] - }, - { - "$id": "4800", - "Name": "modifyThread", - "ResourceName": "Threads", - "Summary": "Modifies a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4801", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4802", - "kind": "constant", - "valueType": { - "$id": "4803", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4804", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", - "Type": { - "$id": "4805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4806", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4807", - "kind": "constant", - "valueType": { - "$id": "4808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4809", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2078" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4810", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", - "Decorators": [] - }, - { - "$id": "4811", - "Name": "deleteThread", - "ResourceName": "Threads", - "Summary": "Delete a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4812", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4813", - "kind": "constant", - "valueType": { - "$id": "4814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4815", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to delete.", - "Type": { - "$id": "4816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4817", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2093" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4818" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4781" - } - ], - "Decorators": [] - }, - { - "$id": "4819", - "Name": "Runs", - "Operations": [ - { - "$id": "4820", - "Name": "createThreadAndRun", - "ResourceName": "Runs", - "Summary": "Create a thread and run it in one request.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4821", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4822", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4823", - "Type": { - "$id": "4824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4825", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4826", - "kind": "constant", - "valueType": { - "$id": "4827", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4828", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4829", - "kind": "constant", - "valueType": { - "$id": "4830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4831", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1519" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4832", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", - "Decorators": [] - }, - { - "$id": "4833", - "Name": "createRun", - "ResourceName": "Runs", - "Summary": "Create a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4834", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4835", - "kind": "constant", - "valueType": { - "$id": "4836", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4837", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to run.", - "Type": { - "$id": "4838", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4839", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4840", - "kind": "constant", - "valueType": { - "$id": "4841", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4842", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1814" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4843", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", - "Decorators": [] - }, - { - "$id": "4844", - "Name": "listRuns", - "ResourceName": "Runs", - "Summary": "Returns a list of runs belonging to a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4845", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4846", - "kind": "constant", - "valueType": { - "$id": "4847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4848", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run belongs to.", - "Type": { - "$id": "4849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4850", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4851", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4852", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "319" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4853", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4854", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4855", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4856", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4857", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1863" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", - "Decorators": [] - }, - { - "$id": "4858", - "Name": "getRun", - "ResourceName": "Runs", - "Summary": "Retrieves a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4859", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4860", - "kind": "constant", - "valueType": { - "$id": "4861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4862", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4864", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to retrieve.", - "Type": { - "$id": "4865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4866", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", - "Decorators": [] - }, - { - "$id": "4867", - "Name": "modifyRun", - "ResourceName": "Runs", - "Summary": "Modifies a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4868", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4869", - "kind": "constant", - "valueType": { - "$id": "4870", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4871", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4872", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4873", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to modify.", - "Type": { - "$id": "4874", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4875", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4876", - "kind": "constant", - "valueType": { - "$id": "4877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4878", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1874" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4879", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", - "Decorators": [] - }, - { - "$id": "4880", - "Name": "cancelRun", - "ResourceName": "Runs", - "Summary": "Cancels a run that is `in_progress`.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4881", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4882", - "kind": "constant", - "valueType": { - "$id": "4883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4884", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this run belongs.", - "Type": { - "$id": "4885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4886", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to cancel.", - "Type": { - "$id": "4887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4888", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", - "Decorators": [] - }, - { - "$id": "4889", - "Name": "submitToolOutputsToRun", - "ResourceName": "Runs", - "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4890", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4891", - "kind": "constant", - "valueType": { - "$id": "4892", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4893", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", - "Type": { - "$id": "4894", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4895", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run that requires the tool output submission.", - "Type": { - "$id": "4896", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4897", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4898", - "kind": "constant", - "valueType": { - "$id": "4899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4900", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1880" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4901", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", - "Decorators": [] - }, - { - "$id": "4902", - "Name": "listRunSteps", - "ResourceName": "Runs", - "Summary": "Returns a list of run steps belonging to a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4903", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4904", - "kind": "constant", - "valueType": { - "$id": "4905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4906", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run and run steps belong to.", - "Type": { - "$id": "4907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4908", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run the run steps belong to.", - "Type": { - "$id": "4909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4910", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4911", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4912", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "328" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4913", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4915", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4917", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1891" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", - "Decorators": [] - }, - { - "$id": "4918", - "Name": "getRunStep", - "ResourceName": "Runs", - "Summary": "Retrieves a run step.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4919", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4920", - "kind": "constant", - "valueType": { - "$id": "4921", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4922", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which the run and run step belongs.", - "Type": { - "$id": "4923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4924", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to which the run step belongs.", - "Type": { - "$id": "4925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4926", - "Name": "step_id", - "NameInRequest": "step_id", - "Description": "The ID of the run step to retrieve.", - "Type": { - "$id": "4927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4928", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1896" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4929" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4821" - } - ], - "Decorators": [] - }, - { - "$id": "4930", - "Name": "VectorStores", - "Operations": [ - { - "$id": "4931", - "Name": "listVectorStores", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector-stores.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4932", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4933", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4934", - "Type": { - "$id": "4935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4936", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4937", - "kind": "constant", - "valueType": { - "$id": "4938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4939", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4940", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4941", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "55" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4942", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4943", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4944", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4945", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4946", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1324" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", - "Decorators": [] - }, - { - "$id": "4947", - "Name": "createVectorStore", - "ResourceName": "VectorStores", - "Summary": "Creates a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4948", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4949", - "kind": "constant", - "valueType": { - "$id": "4950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4951", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4952", - "kind": "constant", - "valueType": { - "$id": "4953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4954", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1379" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4955", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", - "Decorators": [] - }, - { - "$id": "4956", - "Name": "getVectorStore", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4957", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4958", - "kind": "constant", - "valueType": { - "$id": "4959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4960", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to retrieve.", - "Type": { - "$id": "4961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4962", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", - "Decorators": [] - }, - { - "$id": "4963", - "Name": "modifyVectorStore", - "ResourceName": "VectorStores", - "Summary": "Modifies a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4964", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4965", - "kind": "constant", - "valueType": { - "$id": "4966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4967", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to modify.", - "Type": { - "$id": "4968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4969", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4970", - "kind": "constant", - "valueType": { - "$id": "4971", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4972", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1411" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4973", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", - "Decorators": [] - }, - { - "$id": "4974", - "Name": "deleteVectorStore", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4975", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4976", - "kind": "constant", - "valueType": { - "$id": "4977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4978", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to delete.", - "Type": { - "$id": "4979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4980", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1422" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", - "Decorators": [] - }, - { - "$id": "4981", - "Name": "listVectorStoreFiles", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4982", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4983", - "kind": "constant", - "valueType": { - "$id": "4984", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4985", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the files belong to.", - "Type": { - "$id": "4986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4987", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4988", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4989", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "81" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4990", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4992", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4994", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4995", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", - "Decorators": [] - }, - { - "$id": "4996", - "Name": "createVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4997", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4998", - "kind": "constant", - "valueType": { - "$id": "4999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5000", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a File.", - "Type": { - "$id": "5001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5002", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5003", - "kind": "constant", - "valueType": { - "$id": "5004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5005", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1478" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5006", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5007", - "Name": "getVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5008", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5009", - "kind": "constant", - "valueType": { - "$id": "5010", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5011", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5012", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5013", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file being retrieved.", - "Type": { - "$id": "5014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5015", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5016", - "Name": "deleteVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5017", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5018", - "kind": "constant", - "valueType": { - "$id": "5019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5020", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5022", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to delete.", - "Type": { - "$id": "5023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5024", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1483" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5025", - "Name": "createVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5026", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5027", - "kind": "constant", - "valueType": { - "$id": "5028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5029", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a file batch.", - "Type": { - "$id": "5030", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5031", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5032", - "kind": "constant", - "valueType": { - "$id": "5033", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5034", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1490" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5035", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5036", - "Name": "getVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5037", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5038", - "kind": "constant", - "valueType": { - "$id": "5039", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5040", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5041", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5042", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch being retrieved.", - "Type": { - "$id": "5043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5044", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5045", - "Name": "cancelVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5046", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5047", - "kind": "constant", - "valueType": { - "$id": "5048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5049", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5051", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch to cancel.", - "Type": { - "$id": "5052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5053", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5054", - "Name": "listFilesInVectorStoreBatch", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files in a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5055", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5056", - "kind": "constant", - "valueType": { - "$id": "5057", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5058", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5059", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5060", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch that the files belong to.", - "Type": { - "$id": "5061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5062", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "5063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5064", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "137" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5065", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "5066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5067", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "5068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5069", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5070", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5071" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4932" - } - ], - "Decorators": [] - }, - { - "$id": "5072", - "Name": "Uploads", - "Operations": [ - { - "$id": "5073", - "Name": "createUpload", - "ResourceName": "Uploads", - "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", - "Accessibility": "public", - "Parameters": [ - { - "$id": "5074", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "5075", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "5076", - "Type": { - "$id": "5077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "5078", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5079", - "kind": "constant", - "valueType": { - "$id": "5080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5081", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5082", - "kind": "constant", - "valueType": { - "$id": "5083", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5084", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1247" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5085", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", - "Decorators": [] - }, - { - "$id": "5086", - "Name": "addUploadPart", - "ResourceName": "Uploads", - "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5087", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5088", - "kind": "constant", - "valueType": { - "$id": "5089", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5090", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "5091", - "kind": "constant", - "valueType": { - "$id": "5092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5093", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5095", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1305" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5096", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1308" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/parts", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", - "Decorators": [] - }, - { - "$id": "5097", - "Name": "completeUpload", - "ResourceName": "Uploads", - "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5098", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5099", - "kind": "constant", - "valueType": { - "$id": "5100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5101", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5103", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5104", - "kind": "constant", - "valueType": { - "$id": "5105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5106", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1318" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5107", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/complete", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", - "Decorators": [] - }, - { - "$id": "5108", - "Name": "cancelUpload", - "ResourceName": "Uploads", - "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5109", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5110", - "kind": "constant", - "valueType": { - "$id": "5111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5112", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5114", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5115" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "5074" - } - ], - "Decorators": [] - } - ], - "Auth": { - "$id": "5116", - "ApiKey": { - "$id": "5117", - "Name": "Authorization", - "Prefix": "Bearer" - } - } -} From 267bace063490d65a272b5041ed5df7e49993897 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 25 Oct 2024 12:40:49 -0700 Subject: [PATCH 18/54] regen --- .dotnet/OpenAI.sln | 6 + .dotnet/nuget.config | 1 + .../Assistants/FunctionToolDefinition.cs | 2 +- .dotnet/src/Custom/Audio/TranscribedWord.cs | 3 - .dotnet/src/Custom/Chat/ChatToolChoice.cs | 1 - .../src/Custom/Files/OpenAIFileCollection.cs | 35 +- .../Internal/ModelSerializationExtensions.cs | 8 + .../Models/Assistant.Serialization.cs | 109 +++--- .dotnet/src/Generated/Models/Assistant.cs | 8 +- .../AssistantChatMessage.Serialization.cs | 18 +- .../AssistantCreationOptions.Serialization.cs | 27 +- .../Models/AssistantCreationOptions.cs | 8 +- .../AssistantDeletionResult.Serialization.cs | 19 +- .../Models/AssistantDeletionResult.cs | 8 +- ...istantModificationOptions.Serialization.cs | 29 +- .../Models/AssistantModificationOptions.cs | 8 +- .../AssistantResponseFormat.Serialization.cs | 9 +- .../Models/AssistantResponseFormat.cs | 8 +- .../Models/AssistantThread.Serialization.cs | 70 ++-- .../src/Generated/Models/AssistantThread.cs | 17 +- .../AudioTranscription.Serialization.cs | 33 +- .../Generated/Models/AudioTranscription.cs | 8 +- ...AudioTranscriptionOptions.Serialization.cs | 36 +- .../Models/AudioTranscriptionOptions.cs | 8 +- .../Models/AudioTranslation.Serialization.cs | 31 +- .../src/Generated/Models/AudioTranslation.cs | 8 +- .../AudioTranslationOptions.Serialization.cs | 27 +- .../Models/AudioTranslationOptions.cs | 8 +- .../Models/ChatCompletion.Serialization.cs | 41 ++- .../src/Generated/Models/ChatCompletion.cs | 8 +- .../ChatCompletionOptions.Serialization.cs | 75 ++-- .../Generated/Models/ChatCompletionOptions.cs | 8 +- .../Models/ChatFunction.Serialization.cs | 19 +- .dotnet/src/Generated/Models/ChatFunction.cs | 8 +- .../Models/ChatFunctionCall.Serialization.cs | 14 +- .../src/Generated/Models/ChatFunctionCall.cs | 8 +- .../ChatFunctionChoice.Serialization.cs | 4 + .../Generated/Models/ChatFunctionChoice.cs | 8 +- .../Models/ChatMessage.Serialization.cs | 11 +- .dotnet/src/Generated/Models/ChatMessage.cs | 8 +- .../ChatMessageContent.Serialization.cs | 4 + .../Generated/Models/ChatMessageContent.cs | 8 +- .../ChatMessageContentPart.Serialization.cs | 4 + .../Models/ChatMessageContentPart.cs | 8 +- ...atOutputTokenUsageDetails.Serialization.cs | 10 +- .../Models/ChatOutputTokenUsageDetails.cs | 8 +- .../ChatResponseFormat.Serialization.cs | 9 +- .../Generated/Models/ChatResponseFormat.cs | 8 +- ...okenLogProbabilityDetails.Serialization.cs | 46 ++- .../Models/ChatTokenLogProbabilityDetails.cs | 8 +- ...nTopLogProbabilityDetails.Serialization.cs | 45 ++- .../ChatTokenTopLogProbabilityDetails.cs | 8 +- .../Models/ChatTokenUsage.Serialization.cs | 22 +- .../src/Generated/Models/ChatTokenUsage.cs | 8 +- .../Models/ChatTool.Serialization.cs | 14 +- .dotnet/src/Generated/Models/ChatTool.cs | 8 +- .../Models/ChatToolCall.Serialization.cs | 19 +- .dotnet/src/Generated/Models/ChatToolCall.cs | 8 +- .../Models/ChatToolChoice.Serialization.cs | 4 + .../src/Generated/Models/ChatToolChoice.cs | 13 +- ...eInterpreterToolResources.Serialization.cs | 6 +- .../Models/CodeInterpreterToolResources.cs | 8 +- ...versationAudioDeltaUpdate.Serialization.cs | 25 +- ...nversationAudioDoneUpdate.Serialization.cs | 25 +- .../ConversationContentPart.Serialization.cs | 9 +- .../Models/ConversationContentPart.cs | 8 +- ...ContentPartFinishedUpdate.Serialization.cs | 25 +- ...nContentPartStartedUpdate.Serialization.cs | 25 +- .../ConversationErrorUpdate.Serialization.cs | 5 +- ...nCallArgumentsDeltaUpdate.Serialization.cs | 25 +- ...onCallArgumentsDoneUpdate.Serialization.cs | 30 +- .../ConversationFunctionTool.Serialization.cs | 15 +- ...udioBufferCommittedUpdate.Serialization.cs | 12 +- ...InputSpeechFinishedUpdate.Serialization.cs | 10 +- ...nInputSpeechStartedUpdate.Serialization.cs | 10 +- ...ionInputTokenUsageDetails.Serialization.cs | 19 +- .../ConversationInputTokenUsageDetails.cs | 8 +- ...TranscriptionFailedUpdate.Serialization.cs | 15 +- ...anscriptionFinishedUpdate.Serialization.cs | 15 +- ...InputTranscriptionOptions.Serialization.cs | 7 +- .../ConversationInputTranscriptionOptions.cs | 8 +- .../Models/ConversationItem.Serialization.cs | 11 +- .../src/Generated/Models/ConversationItem.cs | 8 +- ...ionItemAcknowledgedUpdate.Serialization.cs | 5 +- ...ersationItemDeletedUpdate.Serialization.cs | 5 +- ...rsationItemFinishedUpdate.Serialization.cs | 15 +- ...ersationItemStartedUpdate.Serialization.cs | 15 +- ...sationItemTruncatedUpdate.Serialization.cs | 15 +- ...onOutputTokenUsageDetails.Serialization.cs | 14 +- .../ConversationOutputTokenUsageDetails.cs | 8 +- ...tTranscriptionDeltaUpdate.Serialization.cs | 25 +- ...anscriptionFinishedUpdate.Serialization.cs | 20 +- ...ationRateLimitDetailsItem.Serialization.cs | 24 +- .../ConversationRateLimitDetailsItem.cs | 8 +- ...onRateLimitsUpdatedUpdate.Serialization.cs | 5 +- ...ionResponseFinishedUpdate.Serialization.cs | 5 +- ...tionResponseStartedUpdate.Serialization.cs | 5 +- ...onSessionConfiguredUpdate.Serialization.cs | 5 +- ...onversationSessionOptions.Serialization.cs | 46 +-- .../Models/ConversationSessionOptions.cs | 8 +- ...ationSessionStartedUpdate.Serialization.cs | 5 +- ...nversationTextDeltaUpdate.Serialization.cs | 25 +- ...onversationTextDoneUpdate.Serialization.cs | 25 +- .../ConversationTokenUsage.Serialization.cs | 29 +- .../Models/ConversationTokenUsage.cs | 8 +- .../Models/ConversationTool.Serialization.cs | 9 +- .../src/Generated/Models/ConversationTool.cs | 8 +- ...ationTurnDetectionOptions.Serialization.cs | 9 +- .../ConversationTurnDetectionOptions.cs | 8 +- .../ConversationUpdate.Serialization.cs | 22 +- .../Generated/Models/ConversationUpdate.cs | 8 +- ...mbeddingGenerationOptions.Serialization.cs | 27 +- .../Models/EmbeddingGenerationOptions.cs | 8 +- .../EmbeddingTokenUsage.Serialization.cs | 14 +- .../Generated/Models/EmbeddingTokenUsage.cs | 8 +- .../FileChunkingStrategy.Serialization.cs | 9 +- .../Generated/Models/FileChunkingStrategy.cs | 8 +- .../FileDeletionResult.Serialization.cs | 19 +- .../Generated/Models/FileDeletionResult.cs | 8 +- ...ileFromStoreRemovalResult.Serialization.cs | 19 +- .../Models/FileFromStoreRemovalResult.cs | 8 +- .../FileSearchRankingOptions.Serialization.cs | 12 +- .../Models/FileSearchRankingOptions.cs | 8 +- .../FileSearchToolDefinition.Serialization.cs | 3 +- .../FileSearchToolResources.Serialization.cs | 8 +- .../Models/FileSearchToolResources.cs | 8 +- .../FineTuningIntegration.Serialization.cs | 9 +- .../Generated/Models/FineTuningIntegration.cs | 8 +- ...ningIntegrationWandbWandb.Serialization.cs | 15 +- .../Models/FineTuningIntegrationWandbWandb.cs | 8 +- .../Models/FineTuningJob.Serialization.cs | 133 ++++--- .dotnet/src/Generated/Models/FineTuningJob.cs | 8 +- .../FineTuningJobError.Serialization.cs | 29 +- .../Generated/Models/FineTuningJobError.cs | 8 +- .../FineTuningJobEvent.Serialization.cs | 29 +- .../Generated/Models/FineTuningJobEvent.cs | 8 +- ...eTuningJobHyperparameters.Serialization.cs | 19 +- .../Models/FineTuningJobHyperparameters.cs | 8 +- .../Models/FineTuningOptions.Serialization.cs | 25 +- .../src/Generated/Models/FineTuningOptions.cs | 8 +- .../FunctionChatMessage.Serialization.cs | 10 +- .../FunctionToolDefinition.Serialization.cs | 5 +- .../Models/FunctionToolDefinition.cs | 8 - .../Models/GeneratedImage.Serialization.cs | 17 +- .../src/Generated/Models/GeneratedImage.cs | 8 +- .../GeneratedImageCollection.Serialization.cs | 9 +- .../Models/GeneratedImageCollection.cs | 8 +- .../HyperparameterOptions.Serialization.cs | 13 +- .../Generated/Models/HyperparameterOptions.cs | 8 +- .../Models/ImageEditOptions.Serialization.cs | 32 +- .../src/Generated/Models/ImageEditOptions.cs | 8 +- .../ImageGenerationOptions.Serialization.cs | 29 +- .../Models/ImageGenerationOptions.cs | 8 +- .../ImageVariationOptions.Serialization.cs | 24 +- .../Generated/Models/ImageVariationOptions.cs | 8 +- ...ernalAddUploadPartRequest.Serialization.cs | 9 +- .../Models/InternalAddUploadPartRequest.cs | 8 +- ...tResponseFormatJsonSchema.Serialization.cs | 5 +- ...ToolsFileSearchFileSearch.Serialization.cs | 10 +- ...ernalAssistantToolsFileSearchFileSearch.cs | 8 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 9 +- ...nternalAssistantToolsFileSearchTypeOnly.cs | 8 +- ...tsNamedToolChoiceFunction.Serialization.cs | 9 +- ...ternalAssistantsNamedToolChoiceFunction.cs | 8 +- .../InternalBatchError.Serialization.cs | 22 +- .../Generated/Models/InternalBatchError.cs | 8 +- .../InternalBatchErrors.Serialization.cs | 9 +- .../Generated/Models/InternalBatchErrors.cs | 8 +- .../Models/InternalBatchJob.Serialization.cs | 85 ++--- .../src/Generated/Models/InternalBatchJob.cs | 8 +- ...nternalBatchRequestCounts.Serialization.cs | 19 +- .../Models/InternalBatchRequestCounts.cs | 8 +- ...InternalBatchRequestInput.Serialization.cs | 17 +- .../Models/InternalBatchRequestInput.cs | 8 +- ...nternalBatchRequestOutput.Serialization.cs | 22 +- .../Models/InternalBatchRequestOutput.cs | 8 +- ...alBatchRequestOutputError.Serialization.cs | 18 +- .../Models/InternalBatchRequestOutputError.cs | 8 +- ...atchRequestOutputResponse.Serialization.cs | 16 +- .../InternalBatchRequestOutputResponse.cs | 8 +- ...pletionFunctionCallOption.Serialization.cs | 9 +- ...nternalChatCompletionFunctionCallOption.cs | 8 +- ...sageToolCallChunkFunction.Serialization.cs | 18 +- ...tCompletionMessageToolCallChunkFunction.cs | 8 +- ...onMessageToolCallFunction.Serialization.cs | 14 +- ...alChatCompletionMessageToolCallFunction.cs | 8 +- ...CompletionNamedToolChoice.Serialization.cs | 14 +- .../InternalChatCompletionNamedToolChoice.cs | 8 +- ...onNamedToolChoiceFunction.Serialization.cs | 9 +- ...alChatCompletionNamedToolChoiceFunction.cs | 8 +- ...stMessageContentPartImage.Serialization.cs | 14 +- ...ompletionRequestMessageContentPartImage.cs | 8 +- ...eContentPartImageImageUrl.Serialization.cs | 12 +- ...nRequestMessageContentPartImageImageUrl.cs | 8 +- ...MessageContentPartRefusal.Serialization.cs | 14 +- ...pletionRequestMessageContentPartRefusal.cs | 8 +- ...estMessageContentPartText.Serialization.cs | 14 +- ...CompletionRequestMessageContentPartText.cs | 8 +- ...CompletionResponseMessage.Serialization.cs | 46 ++- .../InternalChatCompletionResponseMessage.cs | 8 +- ...sponseMessageFunctionCall.Serialization.cs | 14 +- ...atCompletionResponseMessageFunctionCall.cs | 8 +- ...atCompletionStreamOptions.Serialization.cs | 7 +- .../InternalChatCompletionStreamOptions.cs | 8 +- ...letionStreamResponseDelta.Serialization.cs | 21 +- ...ternalChatCompletionStreamResponseDelta.cs | 8 +- ...tResponseFormatJsonSchema.Serialization.cs | 5 +- ...rnalCompleteUploadRequest.Serialization.cs | 16 +- .../Models/InternalCompleteUploadRequest.cs | 8 +- ...stantRequestToolResources.Serialization.cs | 10 +- ...rnalCreateAssistantRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...tantRequestToolResourcesCodeInterpreter.cs | 8 +- ...nternalCreateBatchRequest.Serialization.cs | 21 +- .../Models/InternalCreateBatchRequest.cs | 8 +- ...ompletionFunctionResponse.Serialization.cs | 39 ++- ...nalCreateChatCompletionFunctionResponse.cs | 8 +- ...ionFunctionResponseChoice.Serialization.cs | 19 +- ...ateChatCompletionFunctionResponseChoice.cs | 8 +- ...tCompletionResponseChoice.Serialization.cs | 34 +- ...ernalCreateChatCompletionResponseChoice.cs | 8 +- ...ionResponseChoiceLogprobs.Serialization.cs | 8 +- ...ateChatCompletionResponseChoiceLogprobs.cs | 8 +- ...etionStreamResponseChoice.Serialization.cs | 31 +- ...reateChatCompletionStreamResponseChoice.cs | 8 +- ...eamResponseChoiceLogprobs.Serialization.cs | 50 +-- ...tCompletionStreamResponseChoiceLogprobs.cs | 8 +- ...letionStreamResponseUsage.Serialization.cs | 19 +- ...CreateChatCompletionStreamResponseUsage.cs | 8 +- ...alCreateCompletionRequest.Serialization.cs | 69 ++-- .../Models/InternalCreateCompletionRequest.cs | 8 +- ...lCreateCompletionResponse.Serialization.cs | 39 ++- .../InternalCreateCompletionResponse.cs | 8 +- ...eCompletionResponseChoice.Serialization.cs | 32 +- .../InternalCreateCompletionResponseChoice.cs | 8 +- ...ionResponseChoiceLogprobs.Serialization.cs | 12 +- ...lCreateCompletionResponseChoiceLogprobs.cs | 8 +- ...uestWandbIntegrationWandb.Serialization.cs | 15 +- ...neTuningJobRequestWandbIntegrationWandb.cs | 8 +- ...CreateThreadAndRunRequest.Serialization.cs | 41 ++- .../InternalCreateThreadAndRunRequest.cs | 8 +- ...ndRunRequestToolResources.Serialization.cs | 10 +- ...lCreateThreadAndRunRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...dRunRequestToolResourcesCodeInterpreter.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 10 +- ...nternalCreateThreadRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...readRequestToolResourcesCodeInterpreter.cs | 8 +- ...olResourcesFileSearchBase.Serialization.cs | 4 + ...hreadRequestToolResourcesFileSearchBase.cs | 8 +- ...TranscriptionResponseJson.Serialization.cs | 9 +- ...InternalCreateTranscriptionResponseJson.cs | 8 +- ...teTranslationResponseJson.Serialization.cs | 9 +- .../InternalCreateTranslationResponseJson.cs | 8 +- ...ternalCreateUploadRequest.Serialization.cs | 24 +- .../Models/InternalCreateUploadRequest.cs | 8 +- ...ctorStoreFileBatchRequest.Serialization.cs | 12 +- ...ternalCreateVectorStoreFileBatchRequest.cs | 8 +- ...ateVectorStoreFileRequest.Serialization.cs | 12 +- .../InternalCreateVectorStoreFileRequest.cs | 8 +- ...nkingStrategyRequestParam.Serialization.cs | 9 +- ...nternalFileChunkingStrategyRequestParam.cs | 8 +- ...InternalFileUploadOptions.Serialization.cs | 14 +- .../Models/InternalFileUploadOptions.cs | 8 +- ...onRequestAssistantMessage.Serialization.cs | 10 - ...rnalFineTuningIntegration.Serialization.cs | 9 +- .../Models/InternalFineTuningIntegration.cs | 8 +- ...ineTuningIntegrationWandb.Serialization.cs | 5 +- ...alFineTuningJobCheckpoint.Serialization.cs | 39 ++- .../Models/InternalFineTuningJobCheckpoint.cs | 8 +- ...uningJobCheckpointMetrics.Serialization.cs | 25 +- .../InternalFineTuningJobCheckpointMetrics.cs | 8 +- ...lFinetuneChatRequestInput.Serialization.cs | 13 +- .../InternalFinetuneChatRequestInput.cs | 8 +- ...uneCompletionRequestInput.Serialization.cs | 18 +- .../InternalFinetuneCompletionRequestInput.cs | 8 +- ...nternalFunctionDefinition.Serialization.cs | 21 +- .../Models/InternalFunctionDefinition.cs | 8 +- .../Models/InternalFunctionParameters.cs | 8 +- ...nalListAssistantsResponse.Serialization.cs | 26 +- .../Models/InternalListAssistantsResponse.cs | 8 +- ...ternalListBatchesResponse.Serialization.cs | 33 +- .../Models/InternalListBatchesResponse.cs | 8 +- ...ingJobCheckpointsResponse.Serialization.cs | 23 +- ...nalListFineTuningJobCheckpointsResponse.cs | 8 +- ...neTuningJobEventsResponse.Serialization.cs | 19 +- ...InternalListFineTuningJobEventsResponse.cs | 8 +- ...ernalListMessagesResponse.Serialization.cs | 26 +- .../Models/InternalListMessagesResponse.cs | 8 +- ...tedFineTuningJobsResponse.Serialization.cs | 19 +- ...rnalListPaginatedFineTuningJobsResponse.cs | 8 +- ...ernalListRunStepsResponse.Serialization.cs | 26 +- .../Models/InternalListRunStepsResponse.cs | 8 +- .../InternalListRunsResponse.Serialization.cs | 26 +- .../Models/InternalListRunsResponse.cs | 8 +- ...ternalListThreadsResponse.Serialization.cs | 26 +- .../Models/InternalListThreadsResponse.cs | 8 +- ...tVectorStoreFilesResponse.Serialization.cs | 26 +- .../InternalListVectorStoreFilesResponse.cs | 8 +- ...lListVectorStoresResponse.Serialization.cs | 26 +- .../InternalListVectorStoresResponse.cs | 8 +- ...entImageUrlObjectImageUrl.Serialization.cs | 16 +- ...nalMessageContentImageUrlObjectImageUrl.cs | 8 +- ...ntItemFileObjectImageFile.Serialization.cs | 16 +- ...alMessageContentItemFileObjectImageFile.cs | 8 +- ...tationsFileCitationObject.Serialization.cs | 20 +- ...itationObjectFileCitation.Serialization.cs | 9 +- ...notationsFileCitationObjectFileCitation.cs | 8 +- ...AnnotationsFilePathObject.Serialization.cs | 20 +- ...onsFilePathObjectFilePath.Serialization.cs | 9 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 8 +- ...ntentTextObjectAnnotation.Serialization.cs | 9 +- ...ernalMessageContentTextObjectAnnotation.cs | 8 +- ...sageContentTextObjectText.Serialization.cs | 14 +- .../InternalMessageContentTextObjectText.cs | 8 +- ...ternalMessageDeltaContent.Serialization.cs | 9 +- .../Models/InternalMessageDeltaContent.cs | 8 +- ...ltaContentImageFileObject.Serialization.cs | 8 +- ...tImageFileObjectImageFile.Serialization.cs | 18 +- ...ageDeltaContentImageFileObjectImageFile.cs | 8 +- ...eltaContentImageUrlObject.Serialization.cs | 8 +- ...entImageUrlObjectImageUrl.Serialization.cs | 14 +- ...ssageDeltaContentImageUrlObjectImageUrl.cs | 8 +- ...DeltaContentRefusalObject.Serialization.cs | 12 +- ...tationsFileCitationObject.Serialization.cs | 21 +- ...itationObjectFileCitation.Serialization.cs | 18 +- ...notationsFileCitationObjectFileCitation.cs | 8 +- ...AnnotationsFilePathObject.Serialization.cs | 21 +- ...onsFilePathObjectFilePath.Serialization.cs | 11 +- ...ntTextAnnotationsFilePathObjectFilePath.cs | 8 +- ...ageDeltaContentTextObject.Serialization.cs | 8 +- ...eltaContentTextObjectText.Serialization.cs | 13 +- ...ternalMessageDeltaContentTextObjectText.cs | 8 +- ...nternalMessageDeltaObject.Serialization.cs | 19 +- .../Models/InternalMessageDeltaObject.cs | 8 +- ...alMessageDeltaObjectDelta.Serialization.cs | 9 +- .../Models/InternalMessageDeltaObjectDelta.cs | 8 +- ...eltaTextContentAnnotation.Serialization.cs | 9 +- ...ternalMessageDeltaTextContentAnnotation.cs | 8 +- ...alMessageImageFileContent.Serialization.cs | 10 +- ...nalMessageImageUrlContent.Serialization.cs | 10 +- ...alMessageObjectAttachment.Serialization.cs | 13 +- .../Models/InternalMessageObjectAttachment.cs | 8 +- ...rnalMessageRefusalContent.Serialization.cs | 10 +- ...ernalModerationCategories.Serialization.cs | 59 +++- .../Models/InternalModerationCategories.cs | 8 +- ...lModerationCategoryScores.Serialization.cs | 59 +++- .../InternalModerationCategoryScores.cs | 8 +- ...stantRequestToolResources.Serialization.cs | 10 +- ...rnalModifyAssistantRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...tantRequestToolResourcesCodeInterpreter.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 10 +- ...nternalModifyThreadRequestToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...readRequestToolResourcesCodeInterpreter.cs | 8 +- ...alOmniTypedResponseFormat.Serialization.cs | 9 +- .../Models/InternalOmniTypedResponseFormat.cs | 8 +- ...questAssistantMessageItem.Serialization.cs | 11 +- ...meRequestAudioContentPart.Serialization.cs | 7 +- ...nalRealtimeRequestCommand.Serialization.cs | 11 +- .../Models/InternalRealtimeRequestCommand.cs | 8 +- ...meRequestFunctionCallItem.Serialization.cs | 23 +- ...estFunctionCallOutputItem.Serialization.cs | 15 +- ...tAudioBufferAppendCommand.Serialization.cs | 10 +- ...utAudioBufferClearCommand.Serialization.cs | 5 - ...tAudioBufferCommitCommand.Serialization.cs | 5 - ...eRequestItemCreateCommand.Serialization.cs | 17 +- ...eRequestItemDeleteCommand.Serialization.cs | 10 +- ...equestItemTruncateCommand.Serialization.cs | 20 +- ...ealtimeRequestMessageItem.Serialization.cs | 13 +- ...uestResponseCancelCommand.Serialization.cs | 5 - ...uestResponseCreateCommand.Serialization.cs | 8 +- ...onseCreateCommandResponse.Serialization.cs | 43 +-- ...imeRequestResponseCreateCommandResponse.cs | 8 +- ...questSessionUpdateCommand.Serialization.cs | 10 +- ...eRequestSystemMessageItem.Serialization.cs | 11 +- ...imeRequestTextContentPart.Serialization.cs | 5 +- ...imeRequestUserMessageItem.Serialization.cs | 11 +- .../InternalRealtimeResponse.Serialization.cs | 42 ++- .../Models/InternalRealtimeResponse.cs | 8 +- ...lRealtimeResponseApiError.Serialization.cs | 28 +- .../InternalRealtimeResponseApiError.cs | 8 +- ...eResponseAudioContentPart.Serialization.cs | 17 +- ...nseCancelledStatusDetails.Serialization.cs | 5 +- ...rnalRealtimeResponseError.Serialization.cs | 35 +- .../Models/InternalRealtimeResponseError.cs | 8 +- ...eResponseFunctionCallItem.Serialization.cs | 20 +- ...nseFunctionCallOutputItem.Serialization.cs | 10 +- ...seIncompleteStatusDetails.Serialization.cs | 5 +- ...ernalRealtimeResponseItem.Serialization.cs | 29 +- .../Models/InternalRealtimeResponseItem.cs | 8 +- ...altimeResponseMessageItem.Serialization.cs | 12 +- ...alRealtimeResponseSession.Serialization.cs | 102 ++++-- .../Models/InternalRealtimeResponseSession.cs | 8 +- ...timeResponseStatusDetails.Serialization.cs | 9 +- .../InternalRealtimeResponseStatusDetails.cs | 8 +- ...meResponseTextContentPart.Serialization.cs | 5 +- ...imeServerVadTurnDetection.Serialization.cs | 17 +- ...eToolChoiceFunctionObject.Serialization.cs | 5 +- ...iceFunctionObjectFunction.Serialization.cs | 9 +- ...ealtimeToolChoiceFunctionObjectFunction.cs | 8 +- ...lRealtimeToolChoiceObject.Serialization.cs | 9 +- .../InternalRealtimeToolChoiceObject.cs | 8 +- ...RequestMessageTextContent.Serialization.cs | 10 +- ...lRequiredFunctionToolCall.Serialization.cs | 19 +- .../InternalRequiredFunctionToolCall.cs | 8 +- ...lResponseFormatJsonSchema.Serialization.cs | 5 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 21 +- ...ernalResponseFormatJsonSchemaJsonSchema.cs | 8 +- .../InternalResponseFormatJsonSchemaSchema.cs | 8 +- ...esponseMessageTextContent.Serialization.cs | 10 +- ...edActionSubmitToolOutputs.Serialization.cs | 6 +- ...unObjectRequiredActionSubmitToolOutputs.cs | 8 +- ...InternalRunRequiredAction.Serialization.cs | 14 +- .../Models/InternalRunRequiredAction.cs | 8 +- ...pCodeInterpreterLogOutput.Serialization.cs | 5 +- ...nterpreterToolCallDetails.Serialization.cs | 10 +- .../InternalRunStepDelta.Serialization.cs | 19 +- .../Generated/Models/InternalRunStepDelta.cs | 8 +- ...alRunStepDeltaObjectDelta.Serialization.cs | 7 +- .../Models/InternalRunStepDeltaObjectDelta.cs | 8 +- ...alRunStepDeltaStepDetails.Serialization.cs | 9 +- .../Models/InternalRunStepDeltaStepDetails.cs | 8 +- ...ailsMessageCreationObject.Serialization.cs | 3 +- ...tionObjectMessageCreation.Serialization.cs | 11 +- ...ilsMessageCreationObjectMessageCreation.cs | 8 +- ...etailsToolCallsCodeObject.Serialization.cs | 15 +- ...CodeObjectCodeInterpreter.Serialization.cs | 13 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 8 +- ...allsCodeOutputImageObject.Serialization.cs | 8 +- ...odeOutputImageObjectImage.Serialization.cs | 11 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 8 +- ...CallsCodeOutputLogsObject.Serialization.cs | 12 +- ...ToolCallsFileSearchObject.Serialization.cs | 17 +- ...lsToolCallsFunctionObject.Serialization.cs | 15 +- ...llsFunctionObjectFunction.Serialization.cs | 20 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 8 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 9 +- ...epDetailsToolCallsObjectToolCallsObject.cs | 8 +- ...ailsMessageCreationObject.Serialization.cs | 5 +- ...tionObjectMessageCreation.Serialization.cs | 9 +- ...ilsMessageCreationObjectMessageCreation.cs | 8 +- ...CodeObjectCodeInterpreter.Serialization.cs | 11 +- ...tailsToolCallsCodeObjectCodeInterpreter.cs | 8 +- ...allsCodeOutputImageObject.Serialization.cs | 5 +- ...odeOutputImageObjectImage.Serialization.cs | 9 +- ...ailsToolCallsCodeOutputImageObjectImage.cs | 8 +- ...ileSearchObjectFileSearch.Serialization.cs | 9 +- ...ailsToolCallsFileSearchObjectFileSearch.cs | 8 +- ...earchRankingOptionsObject.Serialization.cs | 14 +- ...ToolCallsFileSearchRankingOptionsObject.cs | 8 +- ...SearchResultObjectContent.Serialization.cs | 14 +- ...sToolCallsFileSearchResultObjectContent.cs | 8 +- ...llsFunctionObjectFunction.Serialization.cs | 29 +- ...pDetailsToolCallsFunctionObjectFunction.cs | 8 +- ...tepDetailsToolCallsObject.Serialization.cs | 5 +- ...FileSearchToolCallDetails.Serialization.cs | 10 +- ...epFunctionToolCallDetails.Serialization.cs | 10 +- ...RunToolCallObjectFunction.Serialization.cs | 14 +- .../InternalRunToolCallObjectFunction.cs | 8 +- ...icChunkingStrategyDetails.Serialization.cs | 14 +- .../InternalStaticChunkingStrategyDetails.cs | 8 +- ...nkingStrategyRequestParam.Serialization.cs | 5 +- ...bmitToolOutputsRunRequest.Serialization.cs | 11 +- .../InternalSubmitToolOutputsRunRequest.cs | 8 +- ...ThreadObjectToolResources.Serialization.cs | 10 +- .../InternalThreadObjectToolResources.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 6 +- ...hreadObjectToolResourcesCodeInterpreter.cs | 8 +- ...ctToolResourcesFileSearch.Serialization.cs | 6 +- ...rnalThreadObjectToolResourcesFileSearch.cs | 8 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 6 +- .../InternalToolResourcesFileSearchIdsOnly.cs | 8 +- ...nternalUnknownChatMessage.Serialization.cs | 5 - .../Models/InternalUpload.Serialization.cs | 44 ++- .../src/Generated/Models/InternalUpload.cs | 8 +- .../InternalUploadPart.Serialization.cs | 24 +- .../Generated/Models/InternalUploadPart.cs | 8 +- ...FileBatchObjectFileCounts.Serialization.cs | 29 +- ...nalVectorStoreFileBatchObjectFileCounts.cs | 8 +- .../Models/MessageContent.Serialization.cs | 6 +- .../src/Generated/Models/MessageContent.cs | 10 +- ...MessageCreationAttachment.Serialization.cs | 14 +- .../Models/MessageCreationAttachment.cs | 8 +- .../MessageCreationOptions.Serialization.cs | 18 +- .../Models/MessageCreationOptions.cs | 8 +- .../MessageDeletionResult.Serialization.cs | 19 +- .../Generated/Models/MessageDeletionResult.cs | 8 +- .../MessageFailureDetails.Serialization.cs | 9 +- .../Generated/Models/MessageFailureDetails.cs | 8 +- ...essageModificationOptions.Serialization.cs | 6 +- .../Models/MessageModificationOptions.cs | 8 +- .../ModelDeletionResult.Serialization.cs | 19 +- .../Generated/Models/ModelDeletionResult.cs | 8 +- .../Models/ModerationOptions.Serialization.cs | 12 +- .../src/Generated/Models/ModerationOptions.cs | 8 +- .../Models/ModerationResult.Serialization.cs | 9 +- .../src/Generated/Models/ModerationResult.cs | 8 +- ...oderationResultCollection.Serialization.cs | 14 +- .../Models/ModerationResultCollection.cs | 8 +- .../Models/OpenAIEmbedding.Serialization.cs | 19 +- .../src/Generated/Models/OpenAIEmbedding.cs | 8 +- ...OpenAIEmbeddingCollection.Serialization.cs | 19 +- .../Models/OpenAIEmbeddingCollection.cs | 8 +- .../Models/OpenAIError.Serialization.cs | 40 ++- .dotnet/src/Generated/Models/OpenAIError.cs | 8 +- .../OpenAIErrorResponse.Serialization.cs | 9 +- .../Generated/Models/OpenAIErrorResponse.cs | 8 +- .../Models/OpenAIFile.Serialization.cs | 54 ++- .dotnet/src/Generated/Models/OpenAIFile.cs | 8 +- .../OpenAIFileCollection.Serialization.cs | 9 +- .../Generated/Models/OpenAIFileCollection.cs | 8 +- .../Models/OpenAIModel.Serialization.cs | 24 +- .dotnet/src/Generated/Models/OpenAIModel.cs | 8 +- .../OpenAIModelCollection.Serialization.cs | 9 +- .../Generated/Models/OpenAIModelCollection.cs | 8 +- ...sponseFailedStatusDetails.Serialization.cs | 5 +- .../RunCreationOptions.Serialization.cs | 40 ++- .../Generated/Models/RunCreationOptions.cs | 8 +- .../Models/RunError.Serialization.cs | 14 +- .dotnet/src/Generated/Models/RunError.cs | 8 +- .../RunIncompleteDetails.Serialization.cs | 7 +- .../Generated/Models/RunIncompleteDetails.cs | 8 +- .../RunModificationOptions.Serialization.cs | 6 +- .../Models/RunModificationOptions.cs | 8 +- .../Generated/Models/RunStep.Serialization.cs | 166 ++++++--- .dotnet/src/Generated/Models/RunStep.cs | 8 +- ...StepCodeInterpreterOutput.Serialization.cs | 9 +- .../Models/RunStepCodeInterpreterOutput.cs | 8 +- .../Models/RunStepDetails.Serialization.cs | 9 +- .../src/Generated/Models/RunStepDetails.cs | 8 +- .../Models/RunStepError.Serialization.cs | 14 +- .dotnet/src/Generated/Models/RunStepError.cs | 8 +- .../RunStepFileSearchResult.Serialization.cs | 21 +- .../Models/RunStepFileSearchResult.cs | 8 +- .../Models/RunStepTokenUsage.Serialization.cs | 19 +- .../src/Generated/Models/RunStepTokenUsage.cs | 8 +- .../Models/RunStepToolCall.Serialization.cs | 9 +- .../src/Generated/Models/RunStepToolCall.cs | 8 +- ...dateCodeInterpreterOutput.Serialization.cs | 9 +- .../RunStepUpdateCodeInterpreterOutput.cs | 8 +- .../Models/RunTokenUsage.Serialization.cs | 19 +- .dotnet/src/Generated/Models/RunTokenUsage.cs | 8 +- .../RunTruncationStrategy.Serialization.cs | 11 +- .../Generated/Models/RunTruncationStrategy.cs | 8 +- .../SpeechGenerationOptions.Serialization.cs | 25 +- .../Models/SpeechGenerationOptions.cs | 8 +- ...taticFileChunkingStrategy.Serialization.cs | 5 +- ...amingChatCompletionUpdate.Serialization.cs | 41 ++- .../Models/StreamingChatCompletionUpdate.cs | 8 +- ...ingChatFunctionCallUpdate.Serialization.cs | 18 +- .../Models/StreamingChatFunctionCallUpdate.cs | 8 +- ...reamingChatToolCallUpdate.Serialization.cs | 25 +- .../Models/StreamingChatToolCallUpdate.cs | 8 +- .../Models/SystemChatMessage.Serialization.cs | 12 +- .../ThreadCreationOptions.Serialization.cs | 10 +- .../Generated/Models/ThreadCreationOptions.cs | 8 +- .../ThreadDeletionResult.Serialization.cs | 19 +- .../Generated/Models/ThreadDeletionResult.cs | 8 +- .../Models/ThreadMessage.Serialization.cs | 171 +++++---- .dotnet/src/Generated/Models/ThreadMessage.cs | 8 +- ...ThreadModificationOptions.Serialization.cs | 8 +- .../Models/ThreadModificationOptions.cs | 8 +- .../Models/ThreadRun.Serialization.cs | 325 +++++++++++------- .dotnet/src/Generated/Models/ThreadRun.cs | 8 +- .../Models/ToolChatMessage.Serialization.cs | 10 +- .../Models/ToolConstraint.Serialization.cs | 11 +- .../src/Generated/Models/ToolConstraint.cs | 8 +- .../Models/ToolDefinition.Serialization.cs | 9 +- .../src/Generated/Models/ToolDefinition.cs | 8 +- .../Models/ToolOutput.Serialization.cs | 18 +- .dotnet/src/Generated/Models/ToolOutput.cs | 8 +- .../Models/ToolResources.Serialization.cs | 10 +- .dotnet/src/Generated/Models/ToolResources.cs | 8 +- .../TranscribedSegment.Serialization.cs | 62 +++- .../Generated/Models/TranscribedSegment.cs | 8 +- .../Models/TranscribedWord.Serialization.cs | 19 +- .../src/Generated/Models/TranscribedWord.cs | 8 +- ...ownRealtimeRequestCommand.Serialization.cs | 5 - ...nknownRealtimeRequestItem.Serialization.cs | 5 - ...ealtimeRequestMessageItem.Serialization.cs | 6 - .../Models/UserChatMessage.Serialization.cs | 12 +- .../Models/VectorStore.Serialization.cs | 88 +++-- .dotnet/src/Generated/Models/VectorStore.cs | 8 +- .../VectorStoreBatchFileJob.Serialization.cs | 34 +- .../Models/VectorStoreBatchFileJob.cs | 8 +- ...VectorStoreCreationHelper.Serialization.cs | 11 +- .../Models/VectorStoreCreationHelper.cs | 8 +- ...ectorStoreCreationOptions.Serialization.cs | 21 +- .../Models/VectorStoreCreationOptions.cs | 8 +- ...VectorStoreDeletionResult.Serialization.cs | 19 +- .../Models/VectorStoreDeletionResult.cs | 8 +- ...ctorStoreExpirationPolicy.Serialization.cs | 14 +- .../Models/VectorStoreExpirationPolicy.cs | 8 +- ...ectorStoreFileAssociation.Serialization.cs | 50 ++- .../Models/VectorStoreFileAssociation.cs | 8 +- ...StoreFileAssociationError.Serialization.cs | 14 +- .../Models/VectorStoreFileAssociationError.cs | 8 +- .../VectorStoreFileCounts.Serialization.cs | 29 +- .../Generated/Models/VectorStoreFileCounts.cs | 8 +- ...rStoreModificationOptions.Serialization.cs | 10 +- .../Models/VectorStoreModificationOptions.cs | 8 +- ...ightsAndBiasesIntegration.Serialization.cs | 5 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 18 +- .typespec/threads/client.tsp | 2 + 608 files changed, 6399 insertions(+), 2514 deletions(-) diff --git a/.dotnet/OpenAI.sln b/.dotnet/OpenAI.sln index 79cc37611..29cb7d411 100644 --- a/.dotnet/OpenAI.sln +++ b/.dotnet/OpenAI.sln @@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Examples", "examples EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Tests", "tests\OpenAI.Tests.csproj", "{6F156401-2544-41D7-B204-3148C51C1D09}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin", "OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin\OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj", "{B7CE2055-3F68-49BA-95AE-96EA00D513F5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,6 +28,10 @@ Global {6F156401-2544-41D7-B204-3148C51C1D09}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F156401-2544-41D7-B204-3148C51C1D09}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F156401-2544-41D7-B204-3148C51C1D09}.Release|Any CPU.Build.0 = Release|Any CPU + {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/.dotnet/nuget.config b/.dotnet/nuget.config index 2805dff37..b6b1e7faf 100644 --- a/.dotnet/nuget.config +++ b/.dotnet/nuget.config @@ -4,5 +4,6 @@ + diff --git a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs index 7ceaa6435..b5c46acaf 100644 --- a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs @@ -62,7 +62,7 @@ public FunctionToolDefinition() } [SetsRequiredMembers] - internal FunctionToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalFunctionDefinition function) + internal FunctionToolDefinition(InternalFunctionDefinition function, string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { _internalFunction = function; diff --git a/.dotnet/src/Custom/Audio/TranscribedWord.cs b/.dotnet/src/Custom/Audio/TranscribedWord.cs index fcd0bcab3..5b0d76c4f 100644 --- a/.dotnet/src/Custom/Audio/TranscribedWord.cs +++ b/.dotnet/src/Custom/Audio/TranscribedWord.cs @@ -9,9 +9,6 @@ namespace OpenAI.Audio; [StructLayout(LayoutKind.Auto)] public readonly partial struct TranscribedWord { - // CUSTOM: Remove setter. Auto-implemented instance properties in readonly structs must be readonly. - internal IDictionary SerializedAdditionalRawData { get; } - // CUSTOM: Renamed. /// The start time of the word. [CodeGenMember("Start")] diff --git a/.dotnet/src/Custom/Chat/ChatToolChoice.cs b/.dotnet/src/Custom/Chat/ChatToolChoice.cs index 178f11e60..2c598de78 100644 --- a/.dotnet/src/Custom/Chat/ChatToolChoice.cs +++ b/.dotnet/src/Custom/Chat/ChatToolChoice.cs @@ -25,7 +25,6 @@ namespace OpenAI.Chat; /// /// [CodeGenModel("ChatCompletionToolChoice")] -[CodeGenSuppress("ChatToolChoice", typeof(IDictionary))] public partial class ChatToolChoice { private readonly bool _predefined; diff --git a/.dotnet/src/Custom/Files/OpenAIFileCollection.cs b/.dotnet/src/Custom/Files/OpenAIFileCollection.cs index f90d4d150..3114ff3b9 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileCollection.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileCollection.cs @@ -13,40 +13,7 @@ public partial class OpenAIFileCollection : ReadOnlyCollection // CUSTOM: Made private. This property does not add value in the context of a strongly-typed class. /// Gets the object. private InternalListFilesResponseObject Object { get; } = InternalListFilesResponseObject.List; - - // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - + /// Initializes a new instance of . /// /// is null. diff --git a/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs b/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs index bbaae9692..50a860ac2 100644 --- a/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/.dotnet/src/Generated/Internal/ModelSerializationExtensions.cs @@ -14,6 +14,7 @@ namespace OpenAI internal static partial class ModelSerializationExtensions { internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + private static readonly BinaryData _sentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); public static object GetObject(this JsonElement element) { @@ -247,5 +248,12 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, Mo { writer.WriteObjectValue(value, options); } + + internal static bool IsSentinelValue(BinaryData value) + { + ReadOnlySpan sentinelSpan = _sentinelValue.ToMemory().Span; + ReadOnlySpan valueSpan = value.ToMemory().Span; + return sentinelSpan.SequenceEqual(valueSpan); + } } } diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index eef42be5c..7f1b986ae 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -31,47 +31,68 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(Assistant)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (Name != null) + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WritePropertyName("created_at"u8); } - else + writer.WriteNumberValue(CreatedAt, "U"); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { - writer.WriteNull("name"u8); + if (Name != null) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + else + { + writer.WriteNull("name"u8); + } } - if (Description != null) + if (_additionalBinaryDataProperties?.ContainsKey("description") != true) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { - writer.WriteNull("description"u8); + writer.WritePropertyName("model"u8); } - writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); - if (Instructions != null) + if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); + if (Instructions != null) + { + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + } + else + { + writer.WriteNull("instructions"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) { - writer.WriteNull("instructions"u8); + writer.WritePropertyName("tools"u8); } - writer.WritePropertyName("tools"u8); writer.WriteStartArray(); foreach (ToolDefinition item in Tools) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -83,27 +104,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"u8); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -115,9 +139,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -129,7 +156,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (NucleusSamplingFactor != null) { @@ -145,6 +172,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 4ab6a6255..5e05db577 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class Assistant { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) { @@ -61,5 +61,11 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc public IDictionary Metadata { get; } public float? Temperature { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 0ba3259df..780d6c11f 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -21,7 +21,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AssistantChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Refusal)) + if (Optional.IsDefined(Refusal) && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null) { @@ -33,12 +33,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("refusal"u8); } } - if (Optional.IsDefined(ParticipantName)) + if (Optional.IsDefined(ParticipantName) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(ParticipantName); } - if (Optional.IsCollectionDefined(ToolCalls)) + if (Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -48,7 +48,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsDefined(FunctionCall)) + if (Optional.IsDefined(FunctionCall) && _additionalBinaryDataProperties?.ContainsKey("function_call") != true) { if (FunctionCall != null) { @@ -102,11 +102,6 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - participantName = null; - continue; - } participantName = prop.Value.GetString(); continue; } @@ -141,11 +136,6 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index bc9c4d01f..5fd241155 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantCreationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) { @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(Description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { if (Description != null) { @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("description"u8); } } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { if (Instructions != null) { @@ -63,7 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -86,7 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -98,9 +98,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -110,7 +113,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -122,7 +125,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -134,7 +137,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (NucleusSamplingFactor != null) { @@ -150,6 +153,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs index 28564903c..ebc4e3202 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class AssistantCreationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AssistantCreationOptions(string name, string description, string instructions, IDictionary metadata, float? temperature, string model, IList tools, ToolResources toolResources, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { @@ -35,5 +35,11 @@ internal AssistantCreationOptions(string name, string description, string instru public IDictionary Metadata { get; set; } public float? Temperature { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index 85b2e9c42..130d8804b 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(AssistantId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs index deb60913b..fbd0d0574 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class AssistantDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AssistantDeletionResult(bool deleted, string assistantId) { @@ -26,5 +26,11 @@ internal AssistantDeletionResult(bool deleted, string assistantId, InternalDelet } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index 3114df161..f38600fa6 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) { @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(Description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { if (Description != null) { @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("description"u8); } } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { if (Instructions != null) { @@ -63,7 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -86,7 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -98,12 +98,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (Optional.IsCollectionDefined(DefaultTools)) + if (Optional.IsCollectionDefined(DefaultTools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -113,7 +113,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -125,7 +125,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -137,7 +137,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (NucleusSamplingFactor != null) { @@ -153,6 +153,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -261,11 +265,6 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt } if (prop.NameEquals("model"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } model = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs index b5715c6f1..3019103f5 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class AssistantModificationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public AssistantModificationOptions() { @@ -42,5 +42,11 @@ internal AssistantModificationOptions(string name, string description, string in public IDictionary Metadata { get; set; } public float? Temperature { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index 3b21f55d3..7e7a250a3 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -24,12 +24,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantResponseFormat)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs index 6afcada70..d10278603 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class AssistantResponseFormat { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected AssistantResponseFormat(string @type) { @@ -23,5 +23,11 @@ internal AssistantResponseFormat(string @type, IDictionary a } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 1aea14657..4fc8fb93f 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -31,45 +31,64 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AssistantThread)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WriteNull("metadata"u8); + writer.WritePropertyName("object"u8); } - writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else + if (_additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { - writer.WriteNull("toolResources"u8); + if (ToolResources != null) + { + writer.WritePropertyName("tool_resources"u8); + writer.WriteObjectValue(ToolResources, options); + } + else + { + writer.WriteNull("toolResources"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -104,7 +123,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, } string id = default; DateTimeOffset createdAt = default; - IDictionary metadata = default; + IReadOnlyDictionary metadata = default; InternalThreadObjectObject @object = default; ToolResources toolResources = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -149,6 +168,11 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, } if (prop.NameEquals("tool_resources"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolResources = null; + continue; + } toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } diff --git a/.dotnet/src/Generated/Models/AssistantThread.cs b/.dotnet/src/Generated/Models/AssistantThread.cs index be17e0d93..ffdf0bed5 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.cs @@ -4,22 +4,23 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { public partial class AssistantThread { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; - internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, ToolResources toolResources) + internal AssistantThread(string id, DateTimeOffset createdAt, ToolResources toolResources) { Id = id; CreatedAt = createdAt; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); ToolResources = toolResources; } - internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary metadata, InternalThreadObjectObject @object, ToolResources toolResources, IDictionary additionalBinaryDataProperties) + internal AssistantThread(string id, DateTimeOffset createdAt, IReadOnlyDictionary metadata, InternalThreadObjectObject @object, ToolResources toolResources, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -33,6 +34,12 @@ internal AssistantThread(string id, DateTimeOffset createdAt, IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index 8fc02d59f..1254784da 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -31,11 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranscription)} does not support writing '{format}' format."); } - writer.WritePropertyName("language"u8); + if (_additionalBinaryDataProperties?.ContainsKey("language") != true) + { + writer.WritePropertyName("language"u8); + } writer.WriteStringValue(Language); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); - if (Optional.IsCollectionDefined(Words)) + if (Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); @@ -45,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Segments)) + if (Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -55,14 +61,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("task"u8); + if (_additionalBinaryDataProperties?.ContainsKey("task") != true) + { + writer.WritePropertyName("task"u8); + } writer.WriteStringValue(Task.ToString()); - writer.WritePropertyName("duration"u8); + if (_additionalBinaryDataProperties?.ContainsKey("duration") != true) + { + writer.WritePropertyName("duration"u8); + } writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -149,11 +165,6 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele } if (prop.NameEquals("duration"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - duration = null; - continue; - } duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index 2cb653ff8..fdfaffee5 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -10,7 +10,7 @@ namespace OpenAI.Audio { public partial class AudioTranscription { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AudioTranscription(string language, string text, TimeSpan? duration) { @@ -39,5 +39,11 @@ internal AudioTranscription(string language, string text, IList public IList Words { get; } public IList Segments { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index dde93723a..8d78d6dd1 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -27,31 +27,37 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranscriptionOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Language)) + if (Optional.IsDefined(Language) && _additionalBinaryDataProperties?.ContainsKey("language") != true) { writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); } - if (Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt) && _additionalBinaryDataProperties?.ContainsKey("prompt") != true) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - writer.WritePropertyName("file"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file") != true) + { + writer.WritePropertyName("file"u8); + } writer.WriteBase64StringValue(File.ToArray(), "D"); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - if (Optional.IsCollectionDefined(InternalTimestampGranularities)) + if (Optional.IsCollectionDefined(InternalTimestampGranularities) && _additionalBinaryDataProperties?.ContainsKey("timestamp_granularities") != true) { writer.WritePropertyName("timestamp_granularities"u8); writer.WriteStartArray(); @@ -77,6 +83,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -121,21 +131,11 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J { if (prop.NameEquals("language"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - language = null; - continue; - } language = prop.Value.GetString(); continue; } if (prop.NameEquals("prompt"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - prompt = null; - continue; - } prompt = prop.Value.GetString(); continue; } @@ -143,7 +143,6 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } responseFormat = new AudioTranscriptionFormat(prop.Value.GetString()); @@ -153,7 +152,6 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J { if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } temperature = prop.Value.GetSingle(); diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs index 08f35d2d7..bad6872f1 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class AudioTranscriptionOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AudioTranscriptionOptions(string language, string prompt, AudioTranscriptionFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranscriptionRequestModel model, IList internalTimestampGranularities, IDictionary additionalBinaryDataProperties) { @@ -30,5 +30,11 @@ internal AudioTranscriptionOptions(string language, string prompt, AudioTranscri public AudioTranscriptionFormat? ResponseFormat { get; set; } public float? Temperature { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index 74dfd0faf..c7ef15ddf 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -31,11 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranslation)} does not support writing '{format}' format."); } - writer.WritePropertyName("language"u8); + if (_additionalBinaryDataProperties?.ContainsKey("language") != true) + { + writer.WritePropertyName("language"u8); + } writer.WriteStringValue(Language); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); - if (Optional.IsCollectionDefined(Segments)) + if (Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -45,14 +51,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("task"u8); + if (_additionalBinaryDataProperties?.ContainsKey("task") != true) + { + writer.WritePropertyName("task"u8); + } writer.WriteStringValue(Task.ToString()); - writer.WritePropertyName("duration"u8); + if (_additionalBinaryDataProperties?.ContainsKey("duration") != true) + { + writer.WritePropertyName("duration"u8); + } writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -124,11 +140,6 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element } if (prop.NameEquals("duration"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - duration = null; - continue; - } duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index 8ac1890f5..e98298f05 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -10,7 +10,7 @@ namespace OpenAI.Audio { public partial class AudioTranslation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AudioTranslation(string language, string text, TimeSpan? duration) { @@ -35,5 +35,11 @@ internal AudioTranslation(string language, string text, IList Segments { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index ec8be9574..d2201ad0b 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -27,29 +27,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(AudioTranslationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt) && _additionalBinaryDataProperties?.ContainsKey("prompt") != true) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - writer.WritePropertyName("file"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file") != true) + { + writer.WritePropertyName("file"u8); + } writer.WriteBase64StringValue(File.ToArray(), "D"); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -92,11 +102,6 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE { if (prop.NameEquals("prompt"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - prompt = null; - continue; - } prompt = prop.Value.GetString(); continue; } @@ -104,7 +109,6 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } responseFormat = new AudioTranslationFormat(prop.Value.GetString()); @@ -114,7 +118,6 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE { if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } temperature = prop.Value.GetSingle(); diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs index 43b3eb2d7..1af4b47a0 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class AudioTranslationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal AudioTranslationOptions(string prompt, AudioTranslationFormat? responseFormat, float? temperature, BinaryData @file, InternalCreateTranslationRequestModel model, IDictionary additionalBinaryDataProperties) { @@ -26,5 +26,11 @@ internal AudioTranslationOptions(string prompt, AudioTranslationFormat? response public AudioTranslationFormat? ResponseFormat { get; set; } public float? Temperature { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index e4a72568c..dab4006d7 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -31,23 +31,32 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatCompletion)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - if (Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - if (Optional.IsDefined(Usage)) + if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); - if (Optional.IsDefined(ServiceTier)) + if (Optional.IsDefined(ServiceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (ServiceTier != null) { @@ -59,19 +68,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("serviceTier"u8); } } - writer.WritePropertyName("choices"u8); + if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) + { + writer.WritePropertyName("choices"u8); + } writer.WriteStartArray(); foreach (InternalCreateChatCompletionResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -127,11 +146,6 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo } if (prop.NameEquals("system_fingerprint"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - systemFingerprint = null; - continue; - } systemFingerprint = prop.Value.GetString(); continue; } @@ -139,7 +153,6 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { - usage = null; continue; } usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ChatCompletion.cs b/.dotnet/src/Generated/Models/ChatCompletion.cs index 4e061e39f..c81c17e4c 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatCompletion { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatCompletion(string id, string model, IEnumerable choices, DateTimeOffset createdAt) { @@ -40,5 +40,11 @@ internal ChatCompletion(string id, string model, string systemFingerprint, ChatT public string SystemFingerprint { get; } public ChatTokenUsage Usage { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 6e5dfac4d..736ae7c00 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FrequencyPenalty)) + if (Optional.IsDefined(FrequencyPenalty) && _additionalBinaryDataProperties?.ContainsKey("frequency_penalty") != true) { if (FrequencyPenalty != null) { @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("frequencyPenalty"u8); } } - if (Optional.IsDefined(PresencePenalty)) + if (Optional.IsDefined(PresencePenalty) && _additionalBinaryDataProperties?.ContainsKey("presence_penalty") != true) { if (PresencePenalty != null) { @@ -51,12 +51,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("presencePenalty"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { writer.WritePropertyName("response_format"u8); writer.WriteObjectValue(ResponseFormat, options); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (TopP != null) { @@ -80,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -90,11 +90,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("messages"u8); + if (_additionalBinaryDataProperties?.ContainsKey("messages") != true) + { + writer.WritePropertyName("messages"u8); + } this.SerializeMessagesValue(writer, options); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - if (Optional.IsDefined(N)) + if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) { @@ -106,7 +112,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) { @@ -118,7 +124,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (Optional.IsDefined(StreamOptions)) + if (Optional.IsDefined(StreamOptions) && _additionalBinaryDataProperties?.ContainsKey("stream_options") != true) { if (StreamOptions != null) { @@ -130,7 +136,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("streamOptions"u8); } } - if (Optional.IsDefined(IncludeLogProbabilities)) + if (Optional.IsDefined(IncludeLogProbabilities) && _additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (IncludeLogProbabilities != null) { @@ -142,7 +148,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - if (Optional.IsDefined(TopLogProbabilityCount)) + if (Optional.IsDefined(TopLogProbabilityCount) && _additionalBinaryDataProperties?.ContainsKey("top_logprobs") != true) { if (TopLogProbabilityCount != null) { @@ -154,7 +160,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topLogprobs"u8); } } - if (Optional.IsCollectionDefined(StopSequences)) + if (Optional.IsCollectionDefined(StopSequences) && _additionalBinaryDataProperties?.ContainsKey("stop") != true) { if (StopSequences != null) { @@ -166,7 +172,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stop"u8); } } - if (Optional.IsCollectionDefined(LogitBiases)) + if (Optional.IsCollectionDefined(LogitBiases) && _additionalBinaryDataProperties?.ContainsKey("logit_bias") != true) { if (LogitBiases != null) { @@ -178,27 +184,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logitBias"u8); } } - if (Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { writer.WritePropertyName("tool_choice"u8); writer.WriteObjectValue(ToolChoice, options); } - if (Optional.IsDefined(FunctionChoice)) + if (Optional.IsDefined(FunctionChoice) && _additionalBinaryDataProperties?.ContainsKey("function_call") != true) { writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionChoice, options); } - if (Optional.IsDefined(AllowParallelToolCalls)) + if (Optional.IsDefined(AllowParallelToolCalls) && _additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(AllowParallelToolCalls.Value); } - if (Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed) && _additionalBinaryDataProperties?.ContainsKey("seed") != true) { if (Seed != null) { @@ -210,7 +216,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("seed"u8); } } - if (Optional.IsDefined(_deprecatedMaxTokens)) + if (Optional.IsDefined(_deprecatedMaxTokens) && _additionalBinaryDataProperties?.ContainsKey("max_tokens") != true) { if (_deprecatedMaxTokens != null) { @@ -222,7 +228,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxTokens"u8); } } - if (Optional.IsDefined(MaxOutputTokenCount)) + if (Optional.IsDefined(MaxOutputTokenCount) && _additionalBinaryDataProperties?.ContainsKey("max_completion_tokens") != true) { if (MaxOutputTokenCount != null) { @@ -234,7 +240,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxCompletionTokens"u8); } } - if (Optional.IsCollectionDefined(Functions)) + if (Optional.IsCollectionDefined(Functions) && _additionalBinaryDataProperties?.ContainsKey("functions") != true) { writer.WritePropertyName("functions"u8); writer.WriteStartArray(); @@ -244,7 +250,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(_serviceTier)) + if (Optional.IsDefined(_serviceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (_serviceTier != null) { @@ -260,6 +266,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -343,7 +353,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } responseFormat = ChatResponseFormat.DeserializeChatResponseFormat(prop.Value, options); @@ -450,19 +459,11 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } if (prop.NameEquals("stop"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } DeserializeStopSequencesValue(prop, ref stopSequences); continue; } if (prop.NameEquals("logit_bias"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } DeserializeLogitBiasesValue(prop, ref logitBiases); continue; } @@ -470,7 +471,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; continue; } toolChoice = ChatToolChoice.DeserializeChatToolChoice(prop.Value, options); @@ -480,7 +480,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - functionChoice = null; continue; } functionChoice = ChatFunctionChoice.DeserializeChatFunctionChoice(prop.Value, options); @@ -490,7 +489,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - allowParallelToolCalls = null; continue; } allowParallelToolCalls = prop.Value.GetBoolean(); @@ -498,11 +496,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - endUserId = null; - continue; - } endUserId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index b4631462f..58ec47c4c 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatCompletionOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, InternalCreateChatCompletionRequestServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) { @@ -51,5 +51,11 @@ internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, public float? TopP { get; set; } public IList Tools { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index 67af8e124..fcfef4055 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -31,14 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(FunctionName); - if (Optional.IsDefined(FunctionDescription)) + if (Optional.IsDefined(FunctionDescription) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); writer.WriteStringValue(FunctionDescription); } - if (Optional.IsDefined(FunctionParameters)) + if (Optional.IsDefined(FunctionParameters) && _additionalBinaryDataProperties?.ContainsKey("parameters") != true) { writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER @@ -54,6 +57,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -99,11 +106,6 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR } if (prop.NameEquals("description"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionDescription = null; - continue; - } functionDescription = prop.Value.GetString(); continue; } @@ -111,7 +113,6 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR { if (prop.Value.ValueKind == JsonValueKind.Null) { - functionParameters = null; continue; } functionParameters = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/ChatFunction.cs b/.dotnet/src/Generated/Models/ChatFunction.cs index 681e443e8..be1731278 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatFunction(string functionName, string functionDescription, BinaryData functionParameters, IDictionary additionalBinaryDataProperties) { @@ -18,5 +18,11 @@ internal ChatFunction(string functionName, string functionDescription, BinaryDat FunctionParameters = functionParameters; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index 7a22a52f9..e22d1dba9 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunctionCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(FunctionName); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } this.SerializeFunctionArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.cs index 010194fe6..caa0f7c04 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatFunctionCall { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ChatFunctionCall(string functionName, BinaryData functionArguments) { @@ -27,5 +27,11 @@ internal ChatFunctionCall(string functionName, BinaryData functionArguments, IDi FunctionArguments = functionArguments; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index 5de77dcc0..af69f8627 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -23,6 +23,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs index 3d6eeef3d..1eda67818 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.cs @@ -9,6 +9,12 @@ namespace OpenAI.Chat { public partial class ChatFunctionChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index aa83a90ad..6cb23d35c 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -20,9 +20,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatMessage)} does not support writing '{format}' format."); } - writer.WritePropertyName("role"u8); + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) + { + writer.WritePropertyName("role"u8); + } writer.WriteStringValue(Role.ToSerialString()); - if (options.Format != "W" && Optional.IsDefined(Content)) + if (options.Format != "W" && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); this.SerializeContentValue(writer, options); @@ -31,6 +34,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index d5364a375..f332e4ff5 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public abstract partial class ChatMessage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal ChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDic Content = content; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs index 6f527b7b4..d6e9189a0 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs @@ -31,6 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.cs b/.dotnet/src/Generated/Models/ChatMessageContent.cs index 80094cf06..c3e8dec13 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContent.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContent.cs @@ -9,11 +9,17 @@ namespace OpenAI.Chat { public partial class ChatMessageContent { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatMessageContent(IDictionary additionalBinaryDataProperties) { _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index a92216e44..c7910819c 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -23,6 +23,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs index 70f46ab67..d6450c68e 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.cs @@ -9,6 +9,12 @@ namespace OpenAI.Chat { public partial class ChatMessageContentPart { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 8cdf01845..7bdd0b8ed 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -27,12 +27,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatOutputTokenUsageDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("reasoning_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("reasoning_tokens") != true) + { + writer.WritePropertyName("reasoning_tokens"u8); + } writer.WriteNumberValue(ReasoningTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -73,7 +80,6 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai { if (prop.Value.ValueKind == JsonValueKind.Null) { - reasoningTokenCount = null; continue; } reasoningTokenCount = prop.Value.GetInt32(); diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs index f39072c9d..377f9b5d0 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatOutputTokenUsageDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatOutputTokenUsageDetails() { @@ -20,5 +20,11 @@ internal ChatOutputTokenUsageDetails(int reasoningTokenCount, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 5aa51b4b1..6cbb920ee 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -20,12 +20,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatResponseFormat)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index 61dce869d..e808477d9 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public abstract partial class ChatResponseFormat { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ChatResponseFormat(string @type) { @@ -23,5 +23,11 @@ internal ChatResponseFormat(string @type, IDictionary additi } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 0d291c3ad..40063c8e1 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -31,25 +31,37 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatTokenLogProbabilityDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("token"u8); + if (_additionalBinaryDataProperties?.ContainsKey("token") != true) + { + writer.WritePropertyName("token"u8); + } writer.WriteStringValue(Token); - writer.WritePropertyName("logprob"u8); + if (_additionalBinaryDataProperties?.ContainsKey("logprob") != true) + { + writer.WritePropertyName("logprob"u8); + } writer.WriteNumberValue(LogProbability); - if (Utf8Bytes != null) + if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { - writer.WritePropertyName("bytes"u8); - writer.WriteStartArray(); - foreach (byte item in Utf8Bytes.Value.Span) + if (Utf8Bytes != null) { - writer.WriteNumberValue(item); + writer.WritePropertyName("bytes"u8); + writer.WriteStartArray(); + foreach (byte item in Utf8Bytes.Value.Span) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("bytes"u8); } - writer.WriteEndArray(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("top_logprobs") != true) { - writer.WriteNull("bytes"u8); + writer.WritePropertyName("top_logprobs"u8); } - writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); foreach (ChatTokenTopLogProbabilityDetails item in TopLogProbabilities) { @@ -60,6 +72,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -115,12 +131,14 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit { continue; } - List array = new List(); + int index = 0; + byte[] array = new byte[prop.Value.GetArrayLength()]; foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetByte()); + array[index] = item.GetByte(); + index++; } - utf8Bytes = array; + utf8Bytes = new ReadOnlyMemory(array); continue; } if (prop.NameEquals("top_logprobs"u8)) diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs index fb14aa6f4..4c27601ea 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatTokenLogProbabilityDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatTokenLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes, IEnumerable topLogProbabilities) { @@ -30,5 +30,11 @@ internal ChatTokenLogProbabilityDetails(string token, float logProbability, Read } public string Token { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 510710bc5..5ce59699a 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -31,28 +31,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatTokenTopLogProbabilityDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("token"u8); + if (_additionalBinaryDataProperties?.ContainsKey("token") != true) + { + writer.WritePropertyName("token"u8); + } writer.WriteStringValue(Token); - writer.WritePropertyName("logprob"u8); + if (_additionalBinaryDataProperties?.ContainsKey("logprob") != true) + { + writer.WritePropertyName("logprob"u8); + } writer.WriteNumberValue(LogProbability); - if (Utf8Bytes != null) + if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { - writer.WritePropertyName("bytes"u8); - writer.WriteStartArray(); - foreach (byte item in Utf8Bytes.Value.Span) + if (Utf8Bytes != null) { - writer.WriteNumberValue(item); + writer.WritePropertyName("bytes"u8); + writer.WriteStartArray(); + foreach (byte item in Utf8Bytes.Value.Span) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("bytes"u8); } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("bytes"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -107,12 +120,14 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb { continue; } - List array = new List(); + int index = 0; + byte[] array = new byte[prop.Value.GetArrayLength()]; foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetByte()); + array[index] = item.GetByte(); + index++; } - utf8Bytes = array; + utf8Bytes = new ReadOnlyMemory(array); continue; } if (options.Format != "W") diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs index fac3073ef..97068d2de 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatTokenTopLogProbabilityDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, ReadOnlyMemory? utf8Bytes) { @@ -27,5 +27,11 @@ internal ChatTokenTopLogProbabilityDetails(string token, float logProbability, R } public string Token { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index f3e474ada..22c843849 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -31,13 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("completion_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) + { + writer.WritePropertyName("completion_tokens"u8); + } writer.WriteNumberValue(OutputTokenCount); - writer.WritePropertyName("prompt_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) + { + writer.WritePropertyName("prompt_tokens"u8); + } writer.WriteNumberValue(InputTokenCount); - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokenCount); - if (Optional.IsDefined(OutputTokenDetails)) + if (Optional.IsDefined(OutputTokenDetails) && _additionalBinaryDataProperties?.ContainsKey("completion_tokens_details") != true) { writer.WritePropertyName("completion_tokens_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); @@ -46,6 +55,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -104,7 +117,6 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { - outputTokenDetails = null; continue; } outputTokenDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.cs index ccf8813ee..940c4a82c 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatTokenUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { @@ -26,5 +26,11 @@ internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalToke OutputTokenDetails = outputTokenDetails; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 753e193fd..102953f4d 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatTool)} does not support writing '{format}' format."); } - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(Function, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatTool.cs b/.dotnet/src/Generated/Models/ChatTool.cs index ac3f5c266..2c11930ba 100644 --- a/.dotnet/src/Generated/Models/ChatTool.cs +++ b/.dotnet/src/Generated/Models/ChatTool.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class ChatTool { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind, IDictionary additionalBinaryDataProperties) { @@ -18,5 +18,11 @@ internal ChatTool(InternalFunctionDefinition function, Chat.ChatToolKind kind, I Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 7c994fae2..608a7b256 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatToolCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(Function, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatToolCall.cs b/.dotnet/src/Generated/Models/ChatToolCall.cs index a260e4bfc..f4eb9b869 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class ChatToolCall { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction function, Chat.ChatToolCallKind kind, IDictionary additionalBinaryDataProperties) { @@ -20,5 +20,11 @@ internal ChatToolCall(string id, InternalChatCompletionMessageToolCallFunction f } public string Id { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index aae1ac21e..f08f2cdb9 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -23,6 +23,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.cs b/.dotnet/src/Generated/Models/ChatToolChoice.cs index 30151df23..6a423d3f8 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.cs @@ -9,6 +9,17 @@ namespace OpenAI.Chat { public partial class ChatToolChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal ChatToolChoice(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index e0cb4f692..3855fbb14 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(CodeInterpreterToolResources)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs index 18444653e..5eedc9577 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.cs @@ -9,12 +9,18 @@ namespace OpenAI.Assistants { public partial class CodeInterpreterToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal CodeInterpreterToolResources(IList fileIds, IDictionary additionalBinaryDataProperties) { FileIds = fileIds; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs index 7b23dcbac..fd33675a4 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationAudioDeltaUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteBase64StringValue(Delta.ToArray(), "D"); } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs index 698888f8a..835b7447e 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationAudioDoneUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index a39dd2ad1..7a74e89cf 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationContentPart)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs index ba435219a..6f8390029 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationContentPart { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ConversationContentPart(ConversationContentPartKind @type) { @@ -21,5 +21,11 @@ internal ConversationContentPart(ConversationContentPartKind @type, IDictionary< Type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs index 299fb5741..1662c92ee 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationContentPartFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("part"u8); + if (_additionalBinaryDataProperties?.ContainsKey("part") != true) + { + writer.WritePropertyName("part"u8); + } writer.WriteObjectValue(_internalContentPart, options); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs index 99e09f20f..0276da1bf 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationContentPartStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("part"u8); + if (_additionalBinaryDataProperties?.ContainsKey("part") != true) + { + writer.WritePropertyName("part"u8); + } writer.WriteObjectValue(_internalContentPart, options); } diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 02111a5c1..69cc7cf83 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("error"u8); + if (_additionalBinaryDataProperties?.ContainsKey("error") != true) + { + writer.WritePropertyName("error"u8); + } writer.WriteObjectValue(_error, options); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs index ad6b2ab81..8b3dc8df7 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDeltaUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteStringValue(Delta); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs index 41349ff9c..c8209b845 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs @@ -32,17 +32,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationFunctionCallArgumentsDoneUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } writer.WriteStringValue(Arguments); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index 1b328f67a..068a9e76e 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -28,14 +28,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationFunctionTool)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(_name); - if (Optional.IsDefined(_description)) + if (Optional.IsDefined(_description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); writer.WriteStringValue(_description); } - if (Optional.IsDefined(_parameters)) + if (Optional.IsDefined(_parameters) && _additionalBinaryDataProperties?.ContainsKey("parameters") != true) { writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER @@ -82,11 +85,6 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso } if (prop.NameEquals("description"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } description = prop.Value.GetString(); continue; } @@ -94,7 +92,6 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso { if (prop.Value.ValueKind == JsonValueKind.Null) { - parameters = null; continue; } parameters = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs index efdd0a7a1..f38606784 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - if (Optional.IsDefined(PreviousItemId)) + if (Optional.IsDefined(PreviousItemId) && _additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); writer.WriteStringValue(PreviousItemId); @@ -74,11 +77,6 @@ internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversat } if (prop.NameEquals("previous_item_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - previousItemId = null; - continue; - } previousItemId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 10d8e0e08..784683aec 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("audio_end_ms"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) + { + writer.WritePropertyName("audio_end_ms"u8); + } writer.WriteNumberValue(AudioEndMs); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index b38cacf8a..019c6469e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("audio_start_ms"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_start_ms") != true) + { + writer.WritePropertyName("audio_start_ms"u8); + } writer.WriteNumberValue(AudioStartMs); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs index 408f006a6..15f05bd8d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationInputTokenUsageDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("cached_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("cached_tokens") != true) + { + writer.WritePropertyName("cached_tokens"u8); + } writer.WriteNumberValue(CachedTokens); - writer.WritePropertyName("text_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text_tokens") != true) + { + writer.WritePropertyName("text_tokens"u8); + } writer.WriteNumberValue(TextTokens); - writer.WritePropertyName("audio_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) + { + writer.WritePropertyName("audio_tokens"u8); + } writer.WriteNumberValue(AudioTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs index 5c25ff0df..d22b0020a 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTokenUsageDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, int audioTokens) { @@ -31,5 +31,11 @@ internal ConversationInputTokenUsageDetails(int cachedTokens, int textTokens, in public int TextTokens { get; } public int AudioTokens { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 187ae9d82..72946aa55 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("error"u8); + if (_additionalBinaryDataProperties?.ContainsKey("error") != true) + { + writer.WritePropertyName("error"u8); + } writer.WriteObjectValue(_error, options); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index cc386b52c..558b48090 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("transcript"u8); + if (_additionalBinaryDataProperties?.ContainsKey("transcript") != true) + { + writer.WritePropertyName("transcript"u8); + } writer.WriteStringValue(Transcript); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs index f400c1406..b23f54b78 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationInputTranscriptionOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -76,7 +80,6 @@ internal static ConversationInputTranscriptionOptions DeserializeConversationInp { if (prop.Value.ValueKind == JsonValueKind.Null) { - model = null; continue; } model = new ConversationTranscriptionModel(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs index 5ea7a176e..8e3d8e35a 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ConversationInputTranscriptionOptions() { @@ -22,5 +22,11 @@ internal ConversationInputTranscriptionOptions(ConversationTranscriptionModel? m } public ConversationTranscriptionModel? Model { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index b5b900a04..a7b83d427 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationItem)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); @@ -42,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationItem.cs b/.dotnet/src/Generated/Models/ConversationItem.cs index 93277bbe2..a9b56dea1 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationItem { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ConversationItem(InternalRealtimeRequestItemType @type) { @@ -26,5 +26,11 @@ internal ConversationItem(InternalRealtimeRequestItemType @type, string id, IDic internal InternalRealtimeRequestItemType Type { get; set; } public string Id { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs index 36579fc96..9de07086e 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) + { + writer.WritePropertyName("item"u8); + } writer.WriteObjectValue(Item, options); } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index ed2383655..87367ec51 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); } diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs index e010e2a9d..b69317d81 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("item"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) + { + writer.WritePropertyName("item"u8); + } writer.WriteObjectValue(_internalItem, options); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs index b9a7cd571..544dd4593 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("item"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) + { + writer.WritePropertyName("item"u8); + } writer.WriteObjectValue(_internalItem, options); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 17b2e2d91..b9d87c86a 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("audio_end_ms"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) + { + writer.WritePropertyName("audio_end_ms"u8); + } writer.WriteNumberValue(AudioEndMs); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs index 7d223b096..f821975f3 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationOutputTokenUsageDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("text_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text_tokens") != true) + { + writer.WritePropertyName("text_tokens"u8); + } writer.WriteNumberValue(TextTokens); - writer.WritePropertyName("audio_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) + { + writer.WritePropertyName("audio_tokens"u8); + } writer.WriteNumberValue(AudioTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs index cdfb6c55b..0a424eadc 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationOutputTokenUsageDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens) { @@ -27,5 +27,11 @@ internal ConversationOutputTokenUsageDetails(int textTokens, int audioTokens, ID public int TextTokens { get; } public int AudioTokens { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs index 0353a0a4a..b669ee7bd 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationOutputTranscriptionDeltaUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteStringValue(Delta); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs index 72284d8a1..a9929bfb1 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs @@ -32,13 +32,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index bb391c2de..aaa6fdce4 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -31,18 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationRateLimitDetailsItem)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("limit"u8); + if (_additionalBinaryDataProperties?.ContainsKey("limit") != true) + { + writer.WritePropertyName("limit"u8); + } writer.WriteNumberValue(Limit); - writer.WritePropertyName("remaining"u8); + if (_additionalBinaryDataProperties?.ContainsKey("remaining") != true) + { + writer.WritePropertyName("remaining"u8); + } writer.WriteNumberValue(Remaining); - writer.WritePropertyName("reset_seconds"u8); + if (_additionalBinaryDataProperties?.ContainsKey("reset_seconds") != true) + { + writer.WritePropertyName("reset_seconds"u8); + } writer.WriteNumberValue(ResetSeconds); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs index 5c9464db1..effaceead 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitDetailsItem { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds) { @@ -35,5 +35,11 @@ internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, public int Remaining { get; } public float ResetSeconds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs index 1caed7c0d..bb327e1ef 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("rate_limits"u8); + if (_additionalBinaryDataProperties?.ContainsKey("rate_limits") != true) + { + writer.WritePropertyName("rate_limits"u8); + } writer.WriteStartArray(); foreach (ConversationRateLimitDetailsItem item in RateLimits) { diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index b9c053969..92fc9066c 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response") != true) + { + writer.WritePropertyName("response"u8); + } writer.WriteObjectValue(_internalResponse, options); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 1f6e20c51..41e54ac93 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response") != true) + { + writer.WritePropertyName("response"u8); + } writer.WriteObjectValue(_internalResponse, options); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index e6f3f4cec..fa12d13da 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("session"u8); + if (_additionalBinaryDataProperties?.ContainsKey("session") != true) + { + writer.WritePropertyName("session"u8); + } writer.WriteObjectValue(_internalSession, options); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index 1a776beac..a2b9d575c 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -27,27 +27,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Voice)) + if (Optional.IsDefined(Voice) && _additionalBinaryDataProperties?.ContainsKey("voice") != true) { writer.WritePropertyName("voice"u8); writer.WriteStringValue(Voice.Value.ToString()); } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); } - if (Optional.IsDefined(InputAudioFormat)) + if (Optional.IsDefined(InputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("input_audio_format") != true) { writer.WritePropertyName("input_audio_format"u8); writer.WriteStringValue(InputAudioFormat.Value.ToString()); } - if (Optional.IsDefined(OutputAudioFormat)) + if (Optional.IsDefined(OutputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) { writer.WritePropertyName("output_audio_format"u8); writer.WriteStringValue(OutputAudioFormat.Value.ToString()); } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -57,27 +57,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (Optional.IsDefined(TurnDetectionOptions)) + if (Optional.IsDefined(TurnDetectionOptions) && _additionalBinaryDataProperties?.ContainsKey("turn_detection") != true) { writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetectionOptions, options); } - if (Optional.IsDefined(InputTranscriptionOptions)) + if (Optional.IsDefined(InputTranscriptionOptions) && _additionalBinaryDataProperties?.ContainsKey("input_audio_transcription") != true) { writer.WritePropertyName("input_audio_transcription"u8); writer.WriteObjectValue(InputTranscriptionOptions, options); } - if (Optional.IsCollectionDefined(_internalModalities)) + if (Optional.IsCollectionDefined(_internalModalities) && _additionalBinaryDataProperties?.ContainsKey("modalities") != true) { writer.WritePropertyName("modalities"u8); writer.WriteStartArray(); @@ -87,7 +87,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(_internalToolChoice)) + if (Optional.IsDefined(_internalToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { writer.WritePropertyName("tool_choice"u8); #if NET6_0_OR_GREATER @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (Optional.IsDefined(_maxResponseOutputTokens)) + if (Optional.IsDefined(_maxResponseOutputTokens) && _additionalBinaryDataProperties?.ContainsKey("max_response_output_tokens") != true) { writer.WritePropertyName("max_response_output_tokens"u8); #if NET6_0_OR_GREATER @@ -115,6 +115,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -166,7 +170,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - voice = null; continue; } voice = new ConversationVoice(prop.Value.GetString()); @@ -174,11 +177,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions } if (prop.NameEquals("instructions"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } instructions = prop.Value.GetString(); continue; } @@ -186,7 +184,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - inputAudioFormat = null; continue; } inputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); @@ -196,7 +193,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - outputAudioFormat = null; continue; } outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); @@ -220,7 +216,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } temperature = prop.Value.GetSingle(); @@ -228,11 +223,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions } if (prop.NameEquals("model"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } model = prop.Value.GetString(); continue; } @@ -240,7 +230,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - turnDetectionOptions = null; continue; } turnDetectionOptions = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); @@ -250,7 +239,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - inputTranscriptionOptions = null; continue; } inputTranscriptionOptions = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); @@ -274,7 +262,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - internalToolChoice = null; continue; } internalToolChoice = BinaryData.FromString(prop.Value.GetRawText()); @@ -284,7 +271,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxResponseOutputTokens = null; continue; } maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs index 432028c00..2e34aaada 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ConversationSessionOptions() { @@ -46,5 +46,11 @@ internal ConversationSessionOptions(ConversationVoice? voice, string instruction public IList Tools { get; } public float? Temperature { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index b1f130421..f6fa75d07 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("session"u8); + if (_additionalBinaryDataProperties?.ContainsKey("session") != true) + { + writer.WritePropertyName("session"u8); + } writer.WriteObjectValue(_internalSession, options); } diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs index e1c654053..21041367a 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationTextDeltaUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteStringValue(Delta); } diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs index 949a8aaaa..f8001644a 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs @@ -32,15 +32,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("response_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + } writer.WriteStringValue(ResponseId); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("output_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + } writer.WriteNumberValue(OutputIndex); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("value"u8); + if (_additionalBinaryDataProperties?.ContainsKey("value") != true) + { + writer.WritePropertyName("value"u8); + } writer.WriteStringValue(Value); } diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs index e7d84e906..933afb7bf 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -31,20 +31,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokens); - writer.WritePropertyName("input_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input_tokens") != true) + { + writer.WritePropertyName("input_tokens"u8); + } writer.WriteNumberValue(InputTokens); - writer.WritePropertyName("output_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_tokens") != true) + { + writer.WritePropertyName("output_tokens"u8); + } writer.WriteNumberValue(OutputTokens); - writer.WritePropertyName("input_token_details"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input_token_details") != true) + { + writer.WritePropertyName("input_token_details"u8); + } writer.WriteObjectValue(InputTokenDetails, options); - writer.WritePropertyName("output_token_details"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_token_details") != true) + { + writer.WritePropertyName("output_token_details"u8); + } writer.WriteObjectValue(OutputTokenDetails, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs index 71ff6682c..edc12d4e9 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationTokenUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputTokens, ConversationInputTokenUsageDetails inputTokenDetails, ConversationOutputTokenUsageDetails outputTokenDetails) { @@ -39,5 +39,11 @@ internal ConversationTokenUsage(int totalTokens, int inputTokens, int outputToke public ConversationInputTokenUsageDetails InputTokenDetails { get; } public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index ceac918ff..751a74744 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationTool)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationTool.cs b/.dotnet/src/Generated/Models/ConversationTool.cs index bf110c951..3e74df570 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationTool { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ConversationTool(ConversationToolKind kind) { @@ -21,5 +21,11 @@ internal ConversationTool(ConversationToolKind kind, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index 641a3fa57..42c9b8bc8 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationTurnDetectionOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs index 2ff6f6bce..bf1534995 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationTurnDetectionOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnDetectionKind kind) { @@ -21,5 +21,11 @@ internal ConversationTurnDetectionOptions(RealtimeConversation.ConversationTurnD Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index 7a505f96f..00942d5e9 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -31,21 +31,31 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationUpdate)} does not support writing '{format}' format."); } - if (EventId != null) + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); + if (EventId != null) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + else + { + writer.WriteNull("eventId"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { - writer.WriteNull("eventId"u8); + writer.WritePropertyName("type"u8); } - writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs index ade79e7f1..75eb30dc3 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationUpdate { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) { @@ -25,5 +25,11 @@ internal ConversationUpdate(string eventId, RealtimeConversation.ConversationUpd } public string EventId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 6c41e8763..308d20fd4 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -27,12 +27,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(EmbeddingGenerationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Dimensions)) + if (Optional.IsDefined(Dimensions) && _additionalBinaryDataProperties?.ContainsKey("dimensions") != true) { writer.WritePropertyName("dimensions"u8); writer.WriteNumberValue(Dimensions.Value); } - writer.WritePropertyName("input"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input") != true) + { + writer.WritePropertyName("input"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(Input); #else @@ -41,14 +44,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - if (Optional.IsDefined(EncodingFormat)) + if (Optional.IsDefined(EncodingFormat) && _additionalBinaryDataProperties?.ContainsKey("encoding_format") != true) { writer.WritePropertyName("encoding_format"u8); writer.WriteStringValue(EncodingFormat.Value.ToString()); } - if (Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); @@ -57,6 +63,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -101,7 +111,6 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - dimensions = null; continue; } dimensions = prop.Value.GetInt32(); @@ -121,7 +130,6 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - encodingFormat = null; continue; } encodingFormat = new InternalCreateEmbeddingRequestEncodingFormat(prop.Value.GetString()); @@ -129,11 +137,6 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - endUserId = null; - continue; - } endUserId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs index 1e50a954d..00ac24783 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class EmbeddingGenerationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalCreateEmbeddingRequestModel model, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat, string endUserId, IDictionary additionalBinaryDataProperties) { @@ -22,5 +22,11 @@ internal EmbeddingGenerationOptions(int? dimensions, BinaryData input, InternalC } public int? Dimensions { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index 11854c8e7..5844b87c9 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(EmbeddingTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("prompt_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) + { + writer.WritePropertyName("prompt_tokens"u8); + } writer.WriteNumberValue(InputTokenCount); - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs index 7d1588f6a..4d3b185c2 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Embeddings { public partial class EmbeddingTokenUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount) { @@ -23,5 +23,11 @@ internal EmbeddingTokenUsage(int inputTokenCount, int totalTokenCount, IDictiona TotalTokenCount = totalTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index 410018e06..ebeaeff21 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileChunkingStrategy)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs index 402a43899..8d2b27374 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public abstract partial class FileChunkingStrategy { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected FileChunkingStrategy(string @type) { @@ -23,5 +23,11 @@ internal FileChunkingStrategy(string @type, IDictionary addi } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index b40007f1b..75b69c08d 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(FileId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.cs b/.dotnet/src/Generated/Models/FileDeletionResult.cs index a54103b89..a5b822c49 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { public partial class FileDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FileDeletionResult(bool deleted, string fileId) { @@ -26,5 +26,11 @@ internal FileDeletionResult(bool deleted, string fileId, InternalDeleteFileRespo } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index c417472a1..126265932 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileFromStoreRemovalResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(FileId); - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Removed); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs index 413e57879..b6d00d34e 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class FileFromStoreRemovalResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FileFromStoreRemovalResult(string fileId, bool removed) { @@ -24,5 +24,11 @@ internal FileFromStoreRemovalResult(string fileId, bool removed, InternalDeleteV this.Object = @object; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 5e6fe10fe..3f3324324 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -27,17 +27,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileSearchRankingOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Ranker)) + if (Optional.IsDefined(Ranker) && _additionalBinaryDataProperties?.ContainsKey("ranker") != true) { writer.WritePropertyName("ranker"u8); writer.WriteStringValue(Ranker.Value.ToString()); } - writer.WritePropertyName("score_threshold"u8); + if (_additionalBinaryDataProperties?.ContainsKey("score_threshold") != true) + { + writer.WritePropertyName("score_threshold"u8); + } writer.WriteNumberValue(_scoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -79,7 +86,6 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso { if (prop.Value.ValueKind == JsonValueKind.Null) { - ranker = null; continue; } ranker = new FileSearchRanker(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs index 2a9002091..cdcad2aed 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.cs @@ -9,8 +9,14 @@ namespace OpenAI.Assistants { public partial class FileSearchRankingOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public FileSearchRanker? Ranker { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 527374d44..07e788450 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -21,7 +21,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(_fileSearch)) + if (Optional.IsDefined(_fileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(_fileSearch, options); @@ -56,7 +56,6 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = InternalAssistantToolsFileSearchFileSearch.DeserializeInternalAssistantToolsFileSearchFileSearch(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index 6c8016959..c08d45d44 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FileSearchToolResources)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds) && _additionalBinaryDataProperties?.ContainsKey("vector_store_ids") != true) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(NewVectorStores)) + if (Optional.IsCollectionDefined(NewVectorStores) && _additionalBinaryDataProperties?.ContainsKey("vector_stores") != true) { writer.WritePropertyName("vector_stores"u8); this.SerializeNewVectorStores(writer, options); @@ -51,6 +51,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.cs index dad7de825..7cb29c848 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class FileSearchToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FileSearchToolResources(IList vectorStoreIds, IList newVectorStores, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal FileSearchToolResources(IList vectorStoreIds, IList SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index 2a274be22..6eb9756ed 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningIntegration)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.cs index d5c6e7683..9eccef658 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal abstract partial class FineTuningIntegration { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected FineTuningIntegration(string @type) { @@ -23,5 +23,11 @@ internal FineTuningIntegration(string @type, IDictionary add } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index ddc149555..5a982b628 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningIntegrationWandbWandb)} does not support writing '{format}' format."); } - writer.WritePropertyName("project"u8); + if (_additionalBinaryDataProperties?.ContainsKey("project") != true) + { + writer.WritePropertyName("project"u8); + } writer.WriteStringValue(Project); - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) { @@ -45,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsDefined(Entity)) + if (Optional.IsDefined(Entity) && _additionalBinaryDataProperties?.ContainsKey("entity") != true) { if (Entity != null) { @@ -57,7 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("entity"u8); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Tags) && _additionalBinaryDataProperties?.ContainsKey("tags") != true) { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); @@ -76,6 +79,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs index 231db74b3..8d6a4b8fd 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningIntegrationWandbWandb { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FineTuningIntegrationWandbWandb(string project) { @@ -34,5 +34,11 @@ internal FineTuningIntegrationWandbWandb(string project, string name, string ent public string Entity { get; } public IList Tags { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index fe924e907..e1ec795d1 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningJob)} does not support writing '{format}' format."); } - if (Optional.IsDefined(UserProvidedSuffix)) + if (Optional.IsDefined(UserProvidedSuffix) && _additionalBinaryDataProperties?.ContainsKey("user_provided_suffix") != true) { if (UserProvidedSuffix != null) { @@ -43,46 +43,76 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("userProvidedSuffix"u8); } } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (Error != null) + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); + writer.WritePropertyName("id"u8); } - else + writer.WriteStringValue(Id); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { - writer.WriteNull("error"u8); + writer.WritePropertyName("created_at"u8); } - if (FineTunedModel != null) + writer.WriteNumberValue(CreatedAt, "U"); + if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { - writer.WritePropertyName("fine_tuned_model"u8); - writer.WriteStringValue(FineTunedModel); + if (Error != null) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + else + { + writer.WriteNull("error"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("fine_tuned_model") != true) { - writer.WriteNull("fineTunedModel"u8); + if (FineTunedModel != null) + { + writer.WritePropertyName("fine_tuned_model"u8); + writer.WriteStringValue(FineTunedModel); + } + else + { + writer.WriteNull("fineTunedModel"u8); + } } - if (FinishedAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("finished_at") != true) { - writer.WritePropertyName("finished_at"u8); - writer.WriteNumberValue(FinishedAt.Value, "U"); + if (FinishedAt != null) + { + writer.WritePropertyName("finished_at"u8); + writer.WriteNumberValue(FinishedAt.Value, "U"); + } + else + { + writer.WriteNull("finishedAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("hyperparameters") != true) { - writer.WriteNull("finishedAt"u8); + writer.WritePropertyName("hyperparameters"u8); } - writer.WritePropertyName("hyperparameters"u8); writer.WriteObjectValue(Hyperparameters, options); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("organization_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("organization_id") != true) + { + writer.WritePropertyName("organization_id"u8); + } writer.WriteStringValue(OrganizationId); - writer.WritePropertyName("result_files"u8); + if (_additionalBinaryDataProperties?.ContainsKey("result_files") != true) + { + writer.WritePropertyName("result_files"u8); + } writer.WriteStartArray(); foreach (string item in ResultFiles) { @@ -94,29 +124,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (TrainedTokens != null) + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { - writer.WritePropertyName("trained_tokens"u8); - writer.WriteNumberValue(TrainedTokens.Value); + writer.WritePropertyName("status"u8); } - else + writer.WriteStringValue(Status.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("trained_tokens") != true) { - writer.WriteNull("trainedTokens"u8); + if (TrainedTokens != null) + { + writer.WritePropertyName("trained_tokens"u8); + writer.WriteNumberValue(TrainedTokens.Value); + } + else + { + writer.WriteNull("trainedTokens"u8); + } } - writer.WritePropertyName("training_file"u8); - writer.WriteStringValue(TrainingFile); - if (ValidationFile != null) + if (_additionalBinaryDataProperties?.ContainsKey("training_file") != true) { - writer.WritePropertyName("validation_file"u8); - writer.WriteStringValue(ValidationFile); + writer.WritePropertyName("training_file"u8); } - else + writer.WriteStringValue(TrainingFile); + if (_additionalBinaryDataProperties?.ContainsKey("validation_file") != true) { - writer.WriteNull("validationFile"u8); + if (ValidationFile != null) + { + writer.WritePropertyName("validation_file"u8); + writer.WriteStringValue(ValidationFile); + } + else + { + writer.WriteNull("validationFile"u8); + } } - if (Optional.IsCollectionDefined(Integrations)) + if (Optional.IsCollectionDefined(Integrations) && _additionalBinaryDataProperties?.ContainsKey("integrations") != true) { if (Integrations != null) { @@ -133,9 +175,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("integrations"u8); } } - writer.WritePropertyName("seed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("seed") != true) + { + writer.WritePropertyName("seed"u8); + } writer.WriteNumberValue(Seed); - if (Optional.IsDefined(EstimatedFinish)) + if (Optional.IsDefined(EstimatedFinish) && _additionalBinaryDataProperties?.ContainsKey("estimated_finish") != true) { if (EstimatedFinish != null) { @@ -151,6 +196,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningJob.cs b/.dotnet/src/Generated/Models/FineTuningJob.cs index 73517a307..cd8649531 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.cs @@ -11,7 +11,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJob { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FineTuningJob(string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, string organizationId, IEnumerable resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, int seed) { @@ -90,5 +90,11 @@ internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset crea public int Seed { get; } public DateTimeOffset? EstimatedFinish { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index ff92fb4c2..f7542e17a 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -31,23 +31,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningJobError)} does not support writing '{format}' format."); } - writer.WritePropertyName("code"u8); + if (_additionalBinaryDataProperties?.ContainsKey("code") != true) + { + writer.WritePropertyName("code"u8); + } writer.WriteStringValue(Code); - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - if (Param != null) + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); + writer.WritePropertyName("message"u8); } - else + writer.WriteStringValue(Message); + if (_additionalBinaryDataProperties?.ContainsKey("param") != true) { - writer.WriteNull("param"u8); + if (Param != null) + { + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); + } + else + { + writer.WriteNull("param"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.cs b/.dotnet/src/Generated/Models/FineTuningJobError.cs index 823fb70f5..b31e40458 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FineTuningJobError(string code, string message, string @param) { @@ -31,5 +31,11 @@ internal FineTuningJobError(string code, string message, string @param, IDiction public string Message { get; } public string Param { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index 55bdcc8af..3202ee238 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -31,20 +31,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningJobEvent)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("level"u8); + if (_additionalBinaryDataProperties?.ContainsKey("level") != true) + { + writer.WritePropertyName("level"u8); + } writer.WriteStringValue(Level.ToSerialString()); - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs index 4fe9ebb5f..223fb4005 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningJobEvent { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.FineTuningJobEventLevel level, string message) { @@ -38,5 +38,11 @@ internal FineTuningJobEvent(string id, DateTimeOffset createdAt, FineTuning.Fine public string Message { get; } public InternalFineTuningJobEventObject Object { get; } = "fine_tuning.job.event"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index 3a09ae672..b549ed1c3 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -31,7 +31,10 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions { throw new FormatException($"The model {nameof(FineTuningJobHyperparameters)} does not support writing '{format}' format."); } - writer.WritePropertyName("n_epochs"u8); + if (_additionalBinaryDataProperties?.ContainsKey("n_epochs") != true) + { + writer.WritePropertyName("n_epochs"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(NEpochs); #else @@ -40,7 +43,10 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("batch_size"u8); + if (_additionalBinaryDataProperties?.ContainsKey("batch_size") != true) + { + writer.WritePropertyName("batch_size"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(BatchSize); #else @@ -49,7 +55,10 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("learning_rate_multiplier"u8); + if (_additionalBinaryDataProperties?.ContainsKey("learning_rate_multiplier") != true) + { + writer.WritePropertyName("learning_rate_multiplier"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(LearningRateMultiplier); #else @@ -62,6 +71,10 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 99d907032..1bcf78cf7 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters { - private readonly IDictionary _additionalBinaryDataProperties; + private IDictionary _additionalBinaryDataProperties; internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) { @@ -25,5 +25,11 @@ internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, LearningRateMultiplier = learningRateMultiplier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index 54591c323..ccb70cc7b 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -31,16 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(FineTuningOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - writer.WritePropertyName("training_file"u8); + if (_additionalBinaryDataProperties?.ContainsKey("training_file") != true) + { + writer.WritePropertyName("training_file"u8); + } writer.WriteStringValue(TrainingFile); - if (Optional.IsDefined(Hyperparameters)) + if (Optional.IsDefined(Hyperparameters) && _additionalBinaryDataProperties?.ContainsKey("hyperparameters") != true) { writer.WritePropertyName("hyperparameters"u8); writer.WriteObjectValue(Hyperparameters, options); } - if (Optional.IsDefined(Suffix)) + if (Optional.IsDefined(Suffix) && _additionalBinaryDataProperties?.ContainsKey("suffix") != true) { if (Suffix != null) { @@ -52,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("suffix"u8); } } - if (Optional.IsDefined(ValidationFile)) + if (Optional.IsDefined(ValidationFile) && _additionalBinaryDataProperties?.ContainsKey("validation_file") != true) { if (ValidationFile != null) { @@ -64,7 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("validationFile"u8); } } - if (Optional.IsCollectionDefined(Integrations)) + if (Optional.IsCollectionDefined(Integrations) && _additionalBinaryDataProperties?.ContainsKey("integrations") != true) { if (Integrations != null) { @@ -81,7 +87,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("integrations"u8); } } - if (Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed) && _additionalBinaryDataProperties?.ContainsKey("seed") != true) { if (Seed != null) { @@ -97,6 +103,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -153,7 +163,6 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - hyperparameters = null; continue; } hyperparameters = HyperparameterOptions.DeserializeHyperparameterOptions(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.cs b/.dotnet/src/Generated/Models/FineTuningOptions.cs index 717783d41..bcc984ad3 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class FineTuningOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string trainingFile) { @@ -46,5 +46,11 @@ internal FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string public IList Integrations { get; set; } public int? Seed { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 16b71240a..60891da83 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -25,7 +25,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FunctionChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(FunctionName); } @@ -66,11 +69,6 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index a542a969f..00a4bef05 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -21,7 +21,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FunctionToolDefinition)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(_internalFunction, options); } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs index 180cf5b58..fa9087663 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.cs @@ -2,17 +2,9 @@ #nullable disable -using System; -using System.Collections.Generic; -using OpenAI; - namespace OpenAI.Assistants { public partial class FunctionToolDefinition : ToolDefinition { - internal FunctionToolDefinition(InternalFunctionDefinition internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) - { - _internalFunction = internalFunction; - } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index f2e789f6b..6e4b21bf1 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(GeneratedImage)} does not support writing '{format}' format."); } - if (Optional.IsDefined(RevisedPrompt)) + if (Optional.IsDefined(RevisedPrompt) && _additionalBinaryDataProperties?.ContainsKey("revised_prompt") != true) { writer.WritePropertyName("revised_prompt"u8); writer.WriteStringValue(RevisedPrompt); } - if (Optional.IsDefined(ImageBytes)) + if (Optional.IsDefined(ImageBytes) && _additionalBinaryDataProperties?.ContainsKey("b64_json") != true) { writer.WritePropertyName("b64_json"u8); writer.WriteBase64StringValue(ImageBytes.ToArray(), "D"); } - if (Optional.IsDefined(ImageUri)) + if (Optional.IsDefined(ImageUri) && _additionalBinaryDataProperties?.ContainsKey("url") != true) { writer.WritePropertyName("url"u8); writer.WriteStringValue(ImageUri.AbsoluteUri); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -86,11 +90,6 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo { if (prop.NameEquals("revised_prompt"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - revisedPrompt = null; - continue; - } revisedPrompt = prop.Value.GetString(); continue; } @@ -98,7 +97,6 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { - imageBytes = null; continue; } imageBytes = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); @@ -108,7 +106,6 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { - imageUri = null; continue; } imageUri = new Uri(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/GeneratedImage.cs b/.dotnet/src/Generated/Models/GeneratedImage.cs index 7029e2439..824838852 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class GeneratedImage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal GeneratedImage() { @@ -24,5 +24,11 @@ internal GeneratedImage(string revisedPrompt, BinaryData imageBytes, Uri imageUr } public string RevisedPrompt { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 23d72a848..6e761c328 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -19,12 +19,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(GeneratedImageCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs index 9e22e09ef..7446dd1af 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.cs @@ -9,6 +9,12 @@ namespace OpenAI.Images { public partial class GeneratedImageCollection { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs index 6e5ee3efd..4872cf645 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(HyperparameterOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NEpochs)) + if (Optional.IsDefined(NEpochs) && _additionalBinaryDataProperties?.ContainsKey("n_epochs") != true) { writer.WritePropertyName("n_epochs"u8); #if NET6_0_OR_GREATER @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (Optional.IsDefined(BatchSize)) + if (Optional.IsDefined(BatchSize) && _additionalBinaryDataProperties?.ContainsKey("batch_size") != true) { writer.WritePropertyName("batch_size"u8); #if NET6_0_OR_GREATER @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (Optional.IsDefined(LearningRateMultiplier)) + if (Optional.IsDefined(LearningRateMultiplier) && _additionalBinaryDataProperties?.ContainsKey("learning_rate_multiplier") != true) { writer.WritePropertyName("learning_rate_multiplier"u8); #if NET6_0_OR_GREATER @@ -67,6 +67,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -109,7 +113,6 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - nEpochs = null; continue; } nEpochs = BinaryData.FromString(prop.Value.GetRawText()); @@ -119,7 +122,6 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - batchSize = null; continue; } batchSize = BinaryData.FromString(prop.Value.GetRawText()); @@ -129,7 +131,6 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - learningRateMultiplier = null; continue; } learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.cs index 1eb7d02d8..bf3cd076e 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class HyperparameterOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public HyperparameterOptions() { @@ -28,5 +28,11 @@ internal HyperparameterOptions(BinaryData nEpochs, BinaryData batchSize, BinaryD public BinaryData BatchSize { get; set; } public BinaryData LearningRateMultiplier { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index db345d158..af09d62f5 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageEditOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { if (Model != null) { @@ -39,16 +39,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("model"u8); } } - writer.WritePropertyName("image"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image") != true) + { + writer.WritePropertyName("image"u8); + } writer.WriteBase64StringValue(Image.ToArray(), "D"); - writer.WritePropertyName("prompt"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) + { + writer.WritePropertyName("prompt"u8); + } writer.WriteStringValue(Prompt); - if (Optional.IsDefined(Mask)) + if (Optional.IsDefined(Mask) && _additionalBinaryDataProperties?.ContainsKey("mask") != true) { writer.WritePropertyName("mask"u8); writer.WriteBase64StringValue(Mask.ToArray(), "D"); } - if (Optional.IsDefined(N)) + if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) { @@ -60,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(Size)) + if (Optional.IsDefined(Size) && _additionalBinaryDataProperties?.ContainsKey("size") != true) { if (Size != null) { @@ -72,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("size"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -84,7 +90,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); @@ -93,6 +99,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -160,7 +170,6 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - mask = null; continue; } mask = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); @@ -198,11 +207,6 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - endUserId = null; - continue; - } endUserId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.cs b/.dotnet/src/Generated/Models/ImageEditOptions.cs index 88772ad1b..c204556ea 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageEditOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ImageEditOptions(InternalCreateImageEditRequestModel? model, BinaryData image, string prompt, BinaryData mask, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { @@ -23,5 +23,11 @@ internal ImageEditOptions(InternalCreateImageEditRequestModel? model, BinaryData EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index ac2e9861e..f1c8b50af 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageGenerationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Quality)) + if (Optional.IsDefined(Quality) && _additionalBinaryDataProperties?.ContainsKey("quality") != true) { writer.WritePropertyName("quality"u8); writer.WriteStringValue(Quality.Value.ToString()); } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(Size)) + if (Optional.IsDefined(Size) && _additionalBinaryDataProperties?.ContainsKey("size") != true) { if (Size != null) { @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("size"u8); } } - if (Optional.IsDefined(Style)) + if (Optional.IsDefined(Style) && _additionalBinaryDataProperties?.ContainsKey("style") != true) { if (Style != null) { @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("style"u8); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { if (Model != null) { @@ -80,9 +80,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("model"u8); } } - writer.WritePropertyName("prompt"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) + { + writer.WritePropertyName("prompt"u8); + } writer.WriteStringValue(Prompt); - if (Optional.IsDefined(N)) + if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) { @@ -94,7 +97,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); @@ -103,6 +106,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -150,7 +157,6 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle { if (prop.Value.ValueKind == JsonValueKind.Null) { - quality = null; continue; } quality = new GeneratedImageQuality(prop.Value.GetString()); @@ -213,11 +219,6 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - endUserId = null; - continue; - } endUserId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs index b612c72c9..f38aeba44 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageGenerationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFormat? responseFormat, GeneratedImageSize? size, GeneratedImageStyle? style, InternalCreateImageRequestModel? model, string prompt, long? n, string endUserId, IDictionary additionalBinaryDataProperties) { @@ -31,5 +31,11 @@ internal ImageGenerationOptions(GeneratedImageQuality? quality, GeneratedImageFo public GeneratedImageSize? Size { get; set; } public GeneratedImageStyle? Style { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 3ee3d60d6..79f319275 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ImageVariationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { if (Model != null) { @@ -39,9 +39,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("model"u8); } } - writer.WritePropertyName("image"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image") != true) + { + writer.WritePropertyName("image"u8); + } writer.WriteBase64StringValue(Image.ToArray(), "D"); - if (Optional.IsDefined(N)) + if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) { @@ -53,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(Size)) + if (Optional.IsDefined(Size) && _additionalBinaryDataProperties?.ContainsKey("size") != true) { if (Size != null) { @@ -65,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("size"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -77,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(EndUserId)) + if (Optional.IsDefined(EndUserId) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); @@ -86,6 +89,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -174,11 +181,6 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - endUserId = null; - continue; - } endUserId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.cs index 55e313555..c86f3fe68 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Images { public partial class ImageVariationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ImageVariationOptions(InternalCreateImageVariationRequestModel? model, BinaryData image, long? n, GeneratedImageSize? size, GeneratedImageFormat? responseFormat, string endUserId, IDictionary additionalBinaryDataProperties) { @@ -21,5 +21,11 @@ internal ImageVariationOptions(InternalCreateImageVariationRequestModel? model, EndUserId = endUserId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index 4b7e14b50..114222fcc 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalAddUploadPartRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); + if (_additionalBinaryDataProperties?.ContainsKey("data") != true) + { + writer.WritePropertyName("data"u8); + } writer.WriteBase64StringValue(Data.ToArray(), "D"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs index 8bac38ae9..f01d39499 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalAddUploadPartRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalAddUploadPartRequest(BinaryData data) { @@ -26,5 +26,11 @@ internal InternalAddUploadPartRequest(BinaryData data, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index 777a13e94..ff09e608a 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -33,7 +33,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalAssistantResponseFormatJsonSchema)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("json_schema"u8); + if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) + { + writer.WritePropertyName("json_schema"u8); + } writer.WriteObjectValue(JsonSchema, options); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index 93171a47d..efc25ab13 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchFileSearch)} does not support writing '{format}' format."); } - if (Optional.IsDefined(RankingOptions)) + if (Optional.IsDefined(RankingOptions) && _additionalBinaryDataProperties?.ContainsKey("ranking_options") != true) { writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } - if (Optional.IsDefined(InternalMaxNumResults)) + if (Optional.IsDefined(InternalMaxNumResults) && _additionalBinaryDataProperties?.ContainsKey("max_num_results") != true) { writer.WritePropertyName("max_num_results"u8); writer.WriteNumberValue(InternalMaxNumResults.Value); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs { if (prop.Value.ValueKind == JsonValueKind.Null) { - rankingOptions = null; continue; } rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs { if (prop.Value.ValueKind == JsonValueKind.Null) { - internalMaxNumResults = null; continue; } internalMaxNumResults = prop.Value.GetInt32(); diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs index 854d2effc..993db5f2e 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchFileSearch { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalAssistantToolsFileSearchFileSearch() { @@ -23,5 +23,11 @@ internal InternalAssistantToolsFileSearchFileSearch(FileSearchRankingOptions ran } public FileSearchRankingOptions RankingOptions { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index 375e9891d..feaf32d4f 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -27,12 +27,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalAssistantToolsFileSearchTypeOnly)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs index 0eaf397c3..1d969ec0b 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantToolsFileSearchTypeOnly { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalAssistantToolsFileSearchTypeOnly() { @@ -22,5 +22,11 @@ internal InternalAssistantToolsFileSearchTypeOnly(InternalAssistantToolsFileSear } public InternalAssistantToolsFileSearchTypeOnlyType Type { get; } = "file_search"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index 427572b52..37559c4b3 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalAssistantsNamedToolChoiceFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs index 0af9c4774..dc8a7c26a 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalAssistantsNamedToolChoiceFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalAssistantsNamedToolChoiceFunction(string name) { @@ -26,5 +26,11 @@ internal InternalAssistantsNamedToolChoiceFunction(string name, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs index e644adf53..4f3b7aa56 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchError)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Code)) + if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (Optional.IsDefined(Message)) + if (Optional.IsDefined(Message) && _additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (Optional.IsDefined(Param)) + if (Optional.IsDefined(Param) && _additionalBinaryDataProperties?.ContainsKey("param") != true) { if (Param != null) { @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("param"u8); } } - if (Optional.IsDefined(Line)) + if (Optional.IsDefined(Line) && _additionalBinaryDataProperties?.ContainsKey("line") != true) { if (Line != null) { @@ -65,6 +65,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -106,21 +110,11 @@ internal static InternalBatchError DeserializeInternalBatchError(JsonElement ele { if (prop.NameEquals("code"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - code = null; - continue; - } code = prop.Value.GetString(); continue; } if (prop.NameEquals("message"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - message = null; - continue; - } message = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.cs b/.dotnet/src/Generated/Models/InternalBatchError.cs index a47d43eab..576ce6495 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchError() { @@ -31,5 +31,11 @@ internal InternalBatchError(string code, string message, string @param, int? lin public string Param { get; } public int? Line { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index a3f6bdd20..68734fba1 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchErrors)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Object)) + if (Optional.IsDefined(Object) && _additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.Value.ToString()); } - if (Optional.IsCollectionDefined(Data)) + if (Optional.IsCollectionDefined(Data) && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -87,7 +91,6 @@ internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement e { if (prop.Value.ValueKind == JsonValueKind.Null) { - @object = null; continue; } @object = new InternalBatchErrorsObject(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.cs index d2d7e4599..49098797b 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchErrors { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchErrors() { @@ -27,5 +27,11 @@ internal InternalBatchErrors(InternalBatchErrorsObject? @object, IList Data { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index 0216a9f94..9fb5c54ca 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -31,81 +31,102 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchJob)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("endpoint"u8); + if (_additionalBinaryDataProperties?.ContainsKey("endpoint") != true) + { + writer.WritePropertyName("endpoint"u8); + } writer.WriteStringValue(Endpoint); - if (Optional.IsDefined(Errors)) + if (Optional.IsDefined(Errors) && _additionalBinaryDataProperties?.ContainsKey("errors") != true) { writer.WritePropertyName("errors"u8); writer.WriteObjectValue(Errors, options); } - writer.WritePropertyName("input_file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input_file_id") != true) + { + writer.WritePropertyName("input_file_id"u8); + } writer.WriteStringValue(InputFileId); - writer.WritePropertyName("completion_window"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_window") != true) + { + writer.WritePropertyName("completion_window"u8); + } writer.WriteStringValue(CompletionWindow); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(OutputFileId)) + if (Optional.IsDefined(OutputFileId) && _additionalBinaryDataProperties?.ContainsKey("output_file_id") != true) { writer.WritePropertyName("output_file_id"u8); writer.WriteStringValue(OutputFileId); } - if (Optional.IsDefined(ErrorFileId)) + if (Optional.IsDefined(ErrorFileId) && _additionalBinaryDataProperties?.ContainsKey("error_file_id") != true) { writer.WritePropertyName("error_file_id"u8); writer.WriteStringValue(ErrorFileId); } - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - if (Optional.IsDefined(InProgressAt)) + if (Optional.IsDefined(InProgressAt) && _additionalBinaryDataProperties?.ContainsKey("in_progress_at") != true) { writer.WritePropertyName("in_progress_at"u8); writer.WriteNumberValue(InProgressAt.Value, "U"); } - if (Optional.IsDefined(ExpiresAt)) + if (Optional.IsDefined(ExpiresAt) && _additionalBinaryDataProperties?.ContainsKey("expires_at") != true) { writer.WritePropertyName("expires_at"u8); writer.WriteNumberValue(ExpiresAt.Value, "U"); } - if (Optional.IsDefined(FinalizingAt)) + if (Optional.IsDefined(FinalizingAt) && _additionalBinaryDataProperties?.ContainsKey("finalizing_at") != true) { writer.WritePropertyName("finalizing_at"u8); writer.WriteNumberValue(FinalizingAt.Value, "U"); } - if (Optional.IsDefined(CompletedAt)) + if (Optional.IsDefined(CompletedAt) && _additionalBinaryDataProperties?.ContainsKey("completed_at") != true) { writer.WritePropertyName("completed_at"u8); writer.WriteNumberValue(CompletedAt.Value, "U"); } - if (Optional.IsDefined(FailedAt)) + if (Optional.IsDefined(FailedAt) && _additionalBinaryDataProperties?.ContainsKey("failed_at") != true) { writer.WritePropertyName("failed_at"u8); writer.WriteNumberValue(FailedAt.Value, "U"); } - if (Optional.IsDefined(ExpiredAt)) + if (Optional.IsDefined(ExpiredAt) && _additionalBinaryDataProperties?.ContainsKey("expired_at") != true) { writer.WritePropertyName("expired_at"u8); writer.WriteNumberValue(ExpiredAt.Value, "U"); } - if (Optional.IsDefined(CancellingAt)) + if (Optional.IsDefined(CancellingAt) && _additionalBinaryDataProperties?.ContainsKey("cancelling_at") != true) { writer.WritePropertyName("cancelling_at"u8); writer.WriteNumberValue(CancellingAt.Value, "U"); } - if (Optional.IsDefined(CancelledAt)) + if (Optional.IsDefined(CancelledAt) && _additionalBinaryDataProperties?.ContainsKey("cancelled_at") != true) { writer.WritePropertyName("cancelled_at"u8); writer.WriteNumberValue(CancelledAt.Value, "U"); } - if (Optional.IsDefined(RequestCounts)) + if (Optional.IsDefined(RequestCounts) && _additionalBinaryDataProperties?.ContainsKey("request_counts") != true) { writer.WritePropertyName("request_counts"u8); writer.WriteObjectValue(RequestCounts, options); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -132,6 +153,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -206,7 +231,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - errors = null; continue; } errors = InternalBatchErrors.DeserializeInternalBatchErrors(prop.Value, options); @@ -229,21 +253,11 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element } if (prop.NameEquals("output_file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - outputFileId = null; - continue; - } outputFileId = prop.Value.GetString(); continue; } if (prop.NameEquals("error_file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - errorFileId = null; - continue; - } errorFileId = prop.Value.GetString(); continue; } @@ -256,7 +270,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - inProgressAt = null; continue; } inProgressAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -266,7 +279,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - expiresAt = null; continue; } expiresAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -276,7 +288,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - finalizingAt = null; continue; } finalizingAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -286,7 +297,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - completedAt = null; continue; } completedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -296,7 +306,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - failedAt = null; continue; } failedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -306,7 +315,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - expiredAt = null; continue; } expiredAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -316,7 +324,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - cancellingAt = null; continue; } cancellingAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -326,7 +333,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - cancelledAt = null; continue; } cancelledAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); @@ -336,7 +342,6 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element { if (prop.Value.ValueKind == JsonValueKind.Null) { - requestCounts = null; continue; } requestCounts = InternalBatchRequestCounts.DeserializeInternalBatchRequestCounts(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.cs b/.dotnet/src/Generated/Models/InternalBatchJob.cs index bc7664412..0654bf9a2 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchJob { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchJob(string id, string endpoint, string inputFileId, string completionWindow, InternalBatchStatus status, DateTimeOffset createdAt) { @@ -87,5 +87,11 @@ internal InternalBatchJob(string id, InternalBatchObject @object, string endpoin public InternalBatchRequestCounts RequestCounts { get; } public IDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index fd5f4e9ad..f61ceca43 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestCounts)} does not support writing '{format}' format."); } - writer.WritePropertyName("total"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total") != true) + { + writer.WritePropertyName("total"u8); + } writer.WriteNumberValue(Total); - writer.WritePropertyName("completed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) + { + writer.WritePropertyName("completed"u8); + } writer.WriteNumberValue(Completed); - writer.WritePropertyName("failed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) + { + writer.WritePropertyName("failed"u8); + } writer.WriteNumberValue(Failed); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs index 344dbe14b..a041be13d 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestCounts { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestCounts(int total, int completed, int failed) { @@ -31,5 +31,11 @@ internal InternalBatchRequestCounts(int total, int completed, int failed, IDicti public int Completed { get; } public int Failed { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs index dbd9a05d1..be87376df 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestInput)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CustomId)) + if (Optional.IsDefined(CustomId) && _additionalBinaryDataProperties?.ContainsKey("custom_id") != true) { writer.WritePropertyName("custom_id"u8); writer.WriteStringValue(CustomId); } - if (Optional.IsDefined(Method)) + if (Optional.IsDefined(Method) && _additionalBinaryDataProperties?.ContainsKey("method") != true) { writer.WritePropertyName("method"u8); writer.WriteStringValue(Method.Value.ToString()); } - if (Optional.IsDefined(Url)) + if (Optional.IsDefined(Url) && _additionalBinaryDataProperties?.ContainsKey("url") != true) { writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -86,11 +90,6 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J { if (prop.NameEquals("custom_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - customId = null; - continue; - } customId = prop.Value.GetString(); continue; } @@ -98,7 +97,6 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J { if (prop.Value.ValueKind == JsonValueKind.Null) { - @method = null; continue; } @method = new InternalBatchRequestInputMethod(prop.Value.GetString()); @@ -108,7 +106,6 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J { if (prop.Value.ValueKind == JsonValueKind.Null) { - url = null; continue; } url = new Uri(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs index f0a3b07ce..73e2768f9 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestInput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalBatchRequestInput() { @@ -28,5 +28,11 @@ internal InternalBatchRequestInput(string customId, InternalBatchRequestInputMet public InternalBatchRequestInputMethod? Method { get; set; } public Uri Url { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index 9ddfa0f69..12e238087 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestOutput)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (Optional.IsDefined(CustomId)) + if (Optional.IsDefined(CustomId) && _additionalBinaryDataProperties?.ContainsKey("custom_id") != true) { writer.WritePropertyName("custom_id"u8); writer.WriteStringValue(CustomId); } - if (Optional.IsDefined(Response)) + if (Optional.IsDefined(Response) && _additionalBinaryDataProperties?.ContainsKey("response") != true) { if (Response != null) { @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("response"u8); } } - if (Optional.IsDefined(Error)) + if (Optional.IsDefined(Error) && _additionalBinaryDataProperties?.ContainsKey("error") != true) { if (Error != null) { @@ -65,6 +65,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -106,21 +110,11 @@ internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput { if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } if (prop.NameEquals("custom_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - customId = null; - continue; - } customId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs index a16d103a9..a277639b4 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutput() { @@ -31,5 +31,11 @@ internal InternalBatchRequestOutput(string id, string customId, InternalBatchReq public InternalBatchRequestOutputResponse Response { get; } public InternalBatchRequestOutputError Error { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs index 6be0d0369..b88d5683b 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestOutputError)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Code)) + if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (Optional.IsDefined(Message)) + if (Optional.IsDefined(Message) && _additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestO { if (prop.NameEquals("code"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - code = null; - continue; - } code = prop.Value.GetString(); continue; } if (prop.NameEquals("message"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - message = null; - continue; - } message = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs index 1b226da64..72e206cba 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutputError() { @@ -25,5 +25,11 @@ internal InternalBatchRequestOutputError(string code, string message, IDictionar public string Code { get; } public string Message { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs index 28934f962..d908f1cc3 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalBatchRequestOutputResponse)} does not support writing '{format}' format."); } - if (Optional.IsDefined(StatusCode)) + if (Optional.IsDefined(StatusCode) && _additionalBinaryDataProperties?.ContainsKey("status_code") != true) { writer.WritePropertyName("status_code"u8); writer.WriteNumberValue(StatusCode.Value); } - if (Optional.IsDefined(RequestId)) + if (Optional.IsDefined(RequestId) && _additionalBinaryDataProperties?.ContainsKey("request_id") != true) { writer.WritePropertyName("request_id"u8); writer.WriteStringValue(RequestId); } - if (Optional.IsCollectionDefined(Body)) + if (Optional.IsCollectionDefined(Body) && _additionalBinaryDataProperties?.ContainsKey("body") != true) { writer.WritePropertyName("body"u8); writer.WriteStartObject(); @@ -64,6 +64,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -106,7 +110,6 @@ internal static InternalBatchRequestOutputResponse DeserializeInternalBatchReque { if (prop.Value.ValueKind == JsonValueKind.Null) { - statusCode = null; continue; } statusCode = prop.Value.GetInt32(); @@ -114,11 +117,6 @@ internal static InternalBatchRequestOutputResponse DeserializeInternalBatchReque } if (prop.NameEquals("request_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - requestId = null; - continue; - } requestId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs index 0f26f8fe4..b1866554e 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalBatchRequestOutputResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalBatchRequestOutputResponse() { @@ -30,5 +30,11 @@ internal InternalBatchRequestOutputResponse(int? statusCode, string requestId, I public string RequestId { get; } public IDictionary Body { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index 09efc38b0..b8bf97fc1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionFunctionCallOption)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs index c282837dc..6194529f7 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionFunctionCallOption { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionFunctionCallOption(string name) { @@ -26,5 +26,11 @@ internal InternalChatCompletionFunctionCallOption(string name, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index d1d789285..e6a5907f3 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallChunkFunction)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Arguments)) + if (Optional.IsDefined(Arguments) && _additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn { if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } name = prop.Value.GetString(); continue; } if (prop.NameEquals("arguments"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - arguments = null; - continue; - } DeserializeArgumentsValue(prop, ref arguments); continue; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs index 158dc16ac..fded46a45 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallChunkFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionMessageToolCallChunkFunction() { @@ -23,5 +23,11 @@ internal InternalChatCompletionMessageToolCallChunkFunction(string name, BinaryD } public string Name { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index e62dab204..e7015c269 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionMessageToolCallFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } this.SerializeArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs index 0e8851666..841322720 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionMessageToolCallFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionMessageToolCallFunction(string name, BinaryData arguments) { @@ -29,5 +29,11 @@ internal InternalChatCompletionMessageToolCallFunction(string name, BinaryData a } public string Name { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index 61d65a25e..6b44ef9bd 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoice)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(Function, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs index 524ceb4bf..f6ec2f2ef 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolChoiceFunction function) { @@ -29,5 +29,11 @@ internal InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolCh public InternalChatCompletionNamedToolChoiceType Type { get; } = "function"; public InternalChatCompletionNamedToolChoiceFunction Function { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index 81bb5eee1..406c70d01 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionNamedToolChoiceFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs index da9aada26..0ab03ba5c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionNamedToolChoiceFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionNamedToolChoiceFunction(string name) { @@ -26,5 +26,11 @@ internal InternalChatCompletionNamedToolChoiceFunction(string name, IDictionary< } public string Name { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index 3710bdc01..8a6ad3ebb 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImage)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("image_url"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image_url") != true) + { + writer.WritePropertyName("image_url"u8); + } writer.WriteObjectValue(ImageUrl, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs index c79352e21..77344cb3b 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartImage(InternalChatCompletionRequestMessageContentPartImageImageUrl imageUrl) { @@ -29,5 +29,11 @@ internal InternalChatCompletionRequestMessageContentPartImage(InternalChatComple public InternalChatCompletionRequestMessageContentPartImageType Type { get; } = "image_url"; public InternalChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index a16e46147..09717f004 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -31,17 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartImageImageUrl)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail.Value.ToString()); } - writer.WritePropertyName("url"u8); + if (_additionalBinaryDataProperties?.ContainsKey("url") != true) + { + writer.WritePropertyName("url"u8); + } writer.WriteStringValue(Url); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -83,7 +90,6 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des { if (prop.Value.ValueKind == JsonValueKind.Null) { - detail = null; continue; } detail = new ChatImageDetailLevel(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index 267c7ea23..22f06370a 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartImageImageUrl { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageDetailLevel? detail, string url, IDictionary additionalBinaryDataProperties) { @@ -19,5 +19,11 @@ internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageD } public ChatImageDetailLevel? Detail { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 68f73b682..94945b7fe 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartRefusal)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("refusal"u8); + if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) + { + writer.WritePropertyName("refusal"u8); + } writer.WriteStringValue(Refusal); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs index 77bbbe7ae..cb5ee11a5 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartRefusal { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartRefusal(string refusal) { @@ -29,5 +29,11 @@ internal InternalChatCompletionRequestMessageContentPartRefusal(InternalChatComp public InternalChatCompletionRequestMessageContentPartRefusalType Type { get; } = "refusal"; public string Refusal { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index e4546feab..66810823d 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionRequestMessageContentPartText)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs index 34a975abb..ff6a36bc4 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionRequestMessageContentPartText { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionRequestMessageContentPartText(string text) { @@ -29,5 +29,11 @@ internal InternalChatCompletionRequestMessageContentPartText(InternalChatComplet public InternalChatCompletionRequestMessageContentPartTextType Type { get; } = "text"; public string Text { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 3e8d71880..21306c122 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -31,16 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessage)} does not support writing '{format}' format."); } - if (Refusal != null) + if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) { - writer.WritePropertyName("refusal"u8); - writer.WriteStringValue(Refusal); - } - else - { - writer.WriteNull("refusal"u8); + if (Refusal != null) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); + } + else + { + writer.WriteNull("refusal"u8); + } } - if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls)) + if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -50,18 +53,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToSerialString()); - if (Content != null) + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { - writer.WritePropertyName("content"u8); - this.SerializeContentValue(writer, options); + writer.WritePropertyName("role"u8); } - else + writer.WriteStringValue(Role.ToSerialString()); + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { - writer.WriteNull("content"u8); + if (Content != null) + { + writer.WritePropertyName("content"u8); + this.SerializeContentValue(writer, options); + } + else + { + writer.WriteNull("content"u8); + } } - if (Optional.IsDefined(FunctionCall)) + if (Optional.IsDefined(FunctionCall) && _additionalBinaryDataProperties?.ContainsKey("function_call") != true) { writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); @@ -70,6 +79,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -148,7 +161,6 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom { if (prop.Value.ValueKind == JsonValueKind.Null) { - functionCall = null; continue; } functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs index c84223018..97b362414 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionResponseMessage(string refusal, ChatMessageContent content) { @@ -32,5 +32,11 @@ internal InternalChatCompletionResponseMessage(string refusal, IReadOnlyList ToolCalls { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index 67c66454f..ea63b212c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionResponseMessageFunctionCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } writer.WriteStringValue(Arguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs index 5d072fa6c..cc4c86f3e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionResponseMessageFunctionCall { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionResponseMessageFunctionCall(string name, string arguments) { @@ -27,5 +27,11 @@ internal InternalChatCompletionResponseMessageFunctionCall(string name, string a public string Name { get; } public string Arguments { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs index c8062b19a..3f7b9a9da 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionStreamOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IncludeUsage)) + if (Optional.IsDefined(IncludeUsage) && _additionalBinaryDataProperties?.ContainsKey("include_usage") != true) { writer.WritePropertyName("include_usage"u8); writer.WriteBooleanValue(IncludeUsage.Value); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -76,7 +80,6 @@ internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompl { if (prop.Value.ValueKind == JsonValueKind.Null) { - includeUsage = null; continue; } includeUsage = prop.Value.GetBoolean(); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs index 0e13f7901..c8a6db7a6 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalChatCompletionStreamOptions() { @@ -22,5 +22,11 @@ internal InternalChatCompletionStreamOptions(bool? includeUsage, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index 8c7c43777..f013f30f0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalChatCompletionStreamResponseDelta)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FunctionCall)) + if (Optional.IsDefined(FunctionCall) && _additionalBinaryDataProperties?.ContainsKey("function_call") != true) { writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (Optional.IsCollectionDefined(ToolCalls)) + if (Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Refusal)) + if (Optional.IsDefined(Refusal) && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null) { @@ -54,12 +54,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (Optional.IsDefined(Role)) + if (Optional.IsDefined(Role) && _additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); } - if (Optional.IsDefined(Content)) + if (Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null) { @@ -75,6 +75,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -119,7 +123,6 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha { if (prop.Value.ValueKind == JsonValueKind.Null) { - functionCall = null; continue; } functionCall = StreamingChatFunctionCallUpdate.DeserializeStreamingChatFunctionCallUpdate(prop.Value, options); @@ -153,7 +156,6 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha { if (prop.Value.ValueKind == JsonValueKind.Null) { - role = null; continue; } role = prop.Value.GetString().ToChatMessageRole(); @@ -161,11 +163,6 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index ab364bb4e..53d7ac953 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalChatCompletionStreamResponseDelta { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { @@ -26,5 +26,11 @@ internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpda public IList ToolCalls { get; } public string Refusal { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index e00b62743..2681edb79 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -26,7 +26,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalChatResponseFormatJsonSchema)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("json_schema"u8); + if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) + { + writer.WritePropertyName("json_schema"u8); + } writer.WriteObjectValue(JsonSchema, options); } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 0bd05ceb6..366b1192a 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -31,7 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCompleteUploadRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("part_ids"u8); + if (_additionalBinaryDataProperties?.ContainsKey("part_ids") != true) + { + writer.WritePropertyName("part_ids"u8); + } writer.WriteStartArray(); foreach (string item in PartIds) { @@ -43,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item); } writer.WriteEndArray(); - if (Optional.IsDefined(Md5)) + if (Optional.IsDefined(Md5) && _additionalBinaryDataProperties?.ContainsKey("md5") != true) { writer.WritePropertyName("md5"u8); writer.WriteStringValue(Md5); @@ -52,6 +55,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -108,11 +115,6 @@ internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadR } if (prop.NameEquals("md5"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - md5 = null; - continue; - } md5 = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs index bbd95cfd7..509bbb123 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.Files { internal partial class InternalCompleteUploadRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCompleteUploadRequest(IEnumerable partIds) { @@ -30,5 +30,11 @@ internal InternalCompleteUploadRequest(IList partIds, string md5, IDicti public IList PartIds { get; } public string Md5 { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs index 70baf621b..b51681747 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalCreateAssistantRequestToolResources DeserializeInternalC { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalCreateAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalCreateAssistantRequestToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalCreateAssistantRequestToolResources DeserializeInternalC { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs index 4e07c63ab..0bdda1dc2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateAssistantRequestToolResources() { @@ -25,5 +25,11 @@ internal InternalCreateAssistantRequestToolResources(InternalCreateAssistantRequ public InternalCreateAssistantRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } public FileSearchToolResources FileSearch { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 8a598e7ca..eec3ca50a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateAssistantRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs index 90047a8e8..a3cfe8ed0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateAssistantRequestToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateAssistantRequestToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalCreateAssistantRequestToolResourcesCodeInterpreter(IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index b59906d54..66f87adbc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -31,13 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateBatchRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("input_file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input_file_id") != true) + { + writer.WritePropertyName("input_file_id"u8); + } writer.WriteStringValue(InputFileId); - writer.WritePropertyName("endpoint"u8); + if (_additionalBinaryDataProperties?.ContainsKey("endpoint") != true) + { + writer.WritePropertyName("endpoint"u8); + } writer.WriteStringValue(Endpoint.ToString()); - writer.WritePropertyName("completion_window"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_window") != true) + { + writer.WritePropertyName("completion_window"u8); + } writer.WriteStringValue(CompletionWindow.ToString()); - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -64,6 +73,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs index 5fa76c32b..c66d2b434 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalCreateBatchRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchRequestEndpoint endpoint) { @@ -35,5 +35,11 @@ internal InternalCreateBatchRequest(string inputFileId, InternalCreateBatchReque public InternalBatchCompletionTimeframe CompletionWindow { get; } = "24h"; public IDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index 2ca5130ed..7238f5a90 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -31,27 +31,42 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("choices"u8); + if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) + { + writer.WritePropertyName("choices"u8); + } writer.WriteStartArray(); foreach (InternalCreateChatCompletionFunctionResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(Created, "U"); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - if (Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (Optional.IsDefined(Usage)) + if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); @@ -60,6 +75,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -129,11 +148,6 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal } if (prop.NameEquals("system_fingerprint"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - systemFingerprint = null; - continue; - } systemFingerprint = prop.Value.GetString(); continue; } @@ -146,7 +160,6 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal { if (prop.Value.ValueKind == JsonValueKind.Null) { - usage = null; continue; } usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs index f2f6f9198..3f2b507f0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionFunctionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { @@ -45,5 +45,11 @@ internal InternalCreateChatCompletionFunctionResponse(string id, IList SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index 7cca304ed..a95e7b759 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionFunctionResponseChoice)} does not support writing '{format}' format."); } - writer.WritePropertyName("finish_reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) + { + writer.WritePropertyName("finish_reason"u8); + } writer.WriteStringValue(FinishReason.ToString()); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteObjectValue(Message, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs index b6ccd3c98..f47f718ba 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionFunctionResponseChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCompletionFunctionResponseChoiceFinishReason finishReason, int index, InternalChatCompletionResponseMessage message) { @@ -31,5 +31,11 @@ internal InternalCreateChatCompletionFunctionResponseChoice(InternalCreateChatCo public int Index { get; } public InternalChatCompletionResponseMessage Message { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index 81d2a63b1..b67979ccd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -31,25 +31,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoice)} does not support writing '{format}' format."); } - writer.WritePropertyName("finish_reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) + { + writer.WritePropertyName("finish_reason"u8); + } writer.WriteStringValue(FinishReason.ToSerialString()); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - writer.WritePropertyName("message"u8); - writer.WriteObjectValue(Message, options); - if (Logprobs != null) + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { - writer.WritePropertyName("logprobs"u8); - writer.WriteObjectValue(Logprobs, options); + writer.WritePropertyName("message"u8); } - else + writer.WriteObjectValue(Message, options); + if (_additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { - writer.WriteNull("logprobs"u8); + if (Logprobs != null) + { + writer.WritePropertyName("logprobs"u8); + writer.WriteObjectValue(Logprobs, options); + } + else + { + writer.WriteNull("logprobs"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs index cf3976fe6..42878f48b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finishReason, int index, InternalChatCompletionResponseMessage message, InternalCreateChatCompletionResponseChoiceLogprobs logprobs) { @@ -35,5 +35,11 @@ internal InternalCreateChatCompletionResponseChoice(Chat.ChatFinishReason finish public InternalChatCompletionResponseMessage Message { get; } public InternalCreateChatCompletionResponseChoiceLogprobs Logprobs { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 81668c104..015fd2424 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -65,6 +65,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs index b5214b241..33eb44cde 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionResponseChoiceLogprobs { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionResponseChoiceLogprobs() { @@ -28,5 +28,11 @@ internal InternalCreateChatCompletionResponseChoiceLogprobs(IReadOnlyList Content { get; } public IReadOnlyList Refusal { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index b5cb1aad7..076d6a6dc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -23,9 +23,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoice)} does not support writing '{format}' format."); } - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteObjectValue(Delta, options); - if (Optional.IsDefined(Logprobs)) + if (Optional.IsDefined(Logprobs) && _additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (Logprobs != null) { @@ -37,21 +40,31 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - if (FinishReason != null) + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { - writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.Value.ToSerialString()); + writer.WritePropertyName("index"u8); } - else + writer.WriteNumberValue(Index); + if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) { - writer.WriteNull("finishReason"u8); + if (FinishReason != null) + { + writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.Value.ToSerialString()); + } + else + { + writer.WriteNull("finishReason"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs index b807eda23..c81fe2ab0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletionStreamResponseDelta delta, int index, Chat.ChatFinishReason? finishReason) { @@ -32,5 +32,11 @@ internal InternalCreateChatCompletionStreamResponseChoice(InternalChatCompletion public InternalCreateChatCompletionStreamResponseChoiceLogprobs Logprobs { get; } public int Index { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index e412b626c..a4543ecb6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -31,38 +31,48 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (Content != null && Optional.IsCollectionDefined(Content)) + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (ChatTokenLogProbabilityDetails item in Content) + if (Content != null && Optional.IsCollectionDefined(Content)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ChatTokenLogProbabilityDetails item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("content"u8); - } - if (Refusal != null && Optional.IsCollectionDefined(Refusal)) - { - writer.WritePropertyName("refusal"u8); - writer.WriteStartArray(); - foreach (ChatTokenLogProbabilityDetails item in Refusal) + else { - writer.WriteObjectValue(item, options); + writer.WriteNull("content"u8); } - writer.WriteEndArray(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) { - writer.WriteNull("refusal"u8); + if (Refusal != null && Optional.IsCollectionDefined(Refusal)) + { + writer.WritePropertyName("refusal"u8); + writer.WriteStartArray(); + foreach (ChatTokenLogProbabilityDetails item in Refusal) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("refusal"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs index 77481f555..9decae9ba 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) { @@ -28,5 +28,11 @@ internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IList Content { get; } public IList Refusal { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index 02ec523e5..316c13102 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("completion_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) + { + writer.WritePropertyName("completion_tokens"u8); + } writer.WriteNumberValue(CompletionTokens); - writer.WritePropertyName("prompt_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) + { + writer.WritePropertyName("prompt_tokens"u8); + } writer.WriteNumberValue(PromptTokens); - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs index 580923b89..3618fba02 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, int promptTokens, int totalTokens) { @@ -31,5 +31,11 @@ internal InternalCreateChatCompletionStreamResponseUsage(int completionTokens, i public int PromptTokens { get; } public int TotalTokens { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index d55e617fb..e3e5f29d3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -32,25 +32,31 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateCompletionRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - if (Prompt != null) + if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) { - writer.WritePropertyName("prompt"u8); + if (Prompt != null) + { + writer.WritePropertyName("prompt"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(Prompt); + writer.WriteRawValue(Prompt); #else - using (JsonDocument document = JsonDocument.Parse(Prompt)) + using (JsonDocument document = JsonDocument.Parse(Prompt)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + else { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WriteNull("prompt"u8); } -#endif } - else - { - writer.WriteNull("prompt"u8); - } - if (Optional.IsDefined(BestOf)) + if (Optional.IsDefined(BestOf) && _additionalBinaryDataProperties?.ContainsKey("best_of") != true) { if (BestOf != null) { @@ -62,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("bestOf"u8); } } - if (Optional.IsDefined(Echo)) + if (Optional.IsDefined(Echo) && _additionalBinaryDataProperties?.ContainsKey("echo") != true) { if (Echo != null) { @@ -74,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("echo"u8); } } - if (Optional.IsDefined(FrequencyPenalty)) + if (Optional.IsDefined(FrequencyPenalty) && _additionalBinaryDataProperties?.ContainsKey("frequency_penalty") != true) { if (FrequencyPenalty != null) { @@ -86,7 +92,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("frequencyPenalty"u8); } } - if (Optional.IsCollectionDefined(LogitBias)) + if (Optional.IsCollectionDefined(LogitBias) && _additionalBinaryDataProperties?.ContainsKey("logit_bias") != true) { if (LogitBias != null) { @@ -104,7 +110,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logitBias"u8); } } - if (Optional.IsDefined(Logprobs)) + if (Optional.IsDefined(Logprobs) && _additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (Logprobs != null) { @@ -116,7 +122,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - if (Optional.IsDefined(MaxTokens)) + if (Optional.IsDefined(MaxTokens) && _additionalBinaryDataProperties?.ContainsKey("max_tokens") != true) { if (MaxTokens != null) { @@ -128,7 +134,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxTokens"u8); } } - if (Optional.IsDefined(N)) + if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) { @@ -140,7 +146,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("n"u8); } } - if (Optional.IsDefined(PresencePenalty)) + if (Optional.IsDefined(PresencePenalty) && _additionalBinaryDataProperties?.ContainsKey("presence_penalty") != true) { if (PresencePenalty != null) { @@ -152,7 +158,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("presencePenalty"u8); } } - if (Optional.IsDefined(Seed)) + if (Optional.IsDefined(Seed) && _additionalBinaryDataProperties?.ContainsKey("seed") != true) { if (Seed != null) { @@ -164,7 +170,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("seed"u8); } } - if (Optional.IsDefined(Stop)) + if (Optional.IsDefined(Stop) && _additionalBinaryDataProperties?.ContainsKey("stop") != true) { if (Stop != null) { @@ -183,7 +189,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stop"u8); } } - if (Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) { @@ -195,7 +201,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (Optional.IsDefined(StreamOptions)) + if (Optional.IsDefined(StreamOptions) && _additionalBinaryDataProperties?.ContainsKey("stream_options") != true) { if (StreamOptions != null) { @@ -207,7 +213,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("streamOptions"u8); } } - if (Optional.IsDefined(Suffix)) + if (Optional.IsDefined(Suffix) && _additionalBinaryDataProperties?.ContainsKey("suffix") != true) { if (Suffix != null) { @@ -219,7 +225,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("suffix"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -231,7 +237,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (TopP != null) { @@ -243,7 +249,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(User)) + if (Optional.IsDefined(User) && _additionalBinaryDataProperties?.ContainsKey("user") != true) { writer.WritePropertyName("user"u8); writer.WriteStringValue(User); @@ -252,6 +258,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -476,11 +486,6 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet } if (prop.NameEquals("user"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - user = null; - continue; - } user = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs index cea70a0be..fc629f75b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateCompletionRequest(InternalCreateCompletionRequestModel model, BinaryData prompt) { @@ -78,5 +78,11 @@ internal InternalCreateCompletionRequest(InternalCreateCompletionRequestModel mo public float? TopP { get; set; } public string User { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index 11a4f7db3..a7c06fd8a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -32,27 +32,42 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateCompletionResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("choices"u8); + if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) + { + writer.WritePropertyName("choices"u8); + } writer.WriteStartArray(); foreach (InternalCreateCompletionResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(Created, "U"); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - if (Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (Optional.IsDefined(Usage)) + if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); @@ -61,6 +76,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -130,11 +149,6 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple } if (prop.NameEquals("system_fingerprint"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - systemFingerprint = null; - continue; - } systemFingerprint = prop.Value.GetString(); continue; } @@ -147,7 +161,6 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple { if (prop.Value.ValueKind == JsonValueKind.Null) { - usage = null; continue; } usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs index 6b993c5be..c77eb92c6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.cs @@ -11,7 +11,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponse(string id, IEnumerable choices, DateTimeOffset created, string model) { @@ -46,5 +46,11 @@ internal InternalCreateCompletionResponse(string id, IList SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index 795f84038..e3809bdc7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -31,25 +31,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoice)} does not support writing '{format}' format."); } - writer.WritePropertyName("finish_reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) + { + writer.WritePropertyName("finish_reason"u8); + } writer.WriteStringValue(FinishReason.ToString()); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Logprobs != null) + if (_additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { - writer.WritePropertyName("logprobs"u8); - writer.WriteObjectValue(Logprobs, options); + if (Logprobs != null) + { + writer.WritePropertyName("logprobs"u8); + writer.WriteObjectValue(Logprobs, options); + } + else + { + writer.WriteNull("logprobs"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { - writer.WriteNull("logprobs"u8); + writer.WritePropertyName("text"u8); } - writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs index 83e3e8842..e9391f1b8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.cs @@ -9,7 +9,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoice { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponseChoiceFinishReason finishReason, int index, InternalCreateCompletionResponseChoiceLogprobs logprobs, string text) { @@ -35,5 +35,11 @@ internal InternalCreateCompletionResponseChoice(InternalCreateCompletionResponse public InternalCreateCompletionResponseChoiceLogprobs Logprobs { get; } public string Text { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index 1f06d96ad..b75da8e4f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(TextOffset)) + if (Optional.IsCollectionDefined(TextOffset) && _additionalBinaryDataProperties?.ContainsKey("text_offset") != true) { writer.WritePropertyName("text_offset"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(TokenLogprobs)) + if (Optional.IsCollectionDefined(TokenLogprobs) && _additionalBinaryDataProperties?.ContainsKey("token_logprobs") != true) { writer.WritePropertyName("token_logprobs"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tokens)) + if (Optional.IsCollectionDefined(Tokens) && _additionalBinaryDataProperties?.ContainsKey("tokens") != true) { writer.WritePropertyName("tokens"u8); writer.WriteStartArray(); @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(TopLogprobs)) + if (Optional.IsCollectionDefined(TopLogprobs) && _additionalBinaryDataProperties?.ContainsKey("top_logprobs") != true) { writer.WritePropertyName("top_logprobs"u8); writer.WriteStartArray(); @@ -87,6 +87,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs index 7ce9d1c27..a19f2969e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.cs @@ -10,7 +10,7 @@ namespace OpenAI.LegacyCompletions { internal partial class InternalCreateCompletionResponseChoiceLogprobs { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateCompletionResponseChoiceLogprobs() { @@ -36,5 +36,11 @@ internal InternalCreateCompletionResponseChoiceLogprobs(IList textOffset, I public IList Tokens { get; } public IList> TopLogprobs { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index 3041306fb..1fa1986b2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateFineTuningJobRequestWandbIntegrationWandb)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) { @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsDefined(Entity)) + if (Optional.IsDefined(Entity) && _additionalBinaryDataProperties?.ContainsKey("entity") != true) { if (Entity != null) { @@ -55,7 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("entity"u8); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Tags) && _additionalBinaryDataProperties?.ContainsKey("tags") != true) { writer.WritePropertyName("tags"u8); writer.WriteStartArray(); @@ -70,12 +70,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("project"u8); + if (_additionalBinaryDataProperties?.ContainsKey("project") != true) + { + writer.WritePropertyName("project"u8); + } writer.WriteStringValue(Project); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs index eed0c78d1..7db538e27 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalCreateFineTuningJobRequestWandbIntegrationWandb { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateFineTuningJobRequestWandbIntegrationWandb(string project) { @@ -34,5 +34,11 @@ internal InternalCreateFineTuningJobRequestWandbIntegrationWandb(string name, st public string Entity { get; set; } public IList Tags { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 16ce1aa96..285605dcb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -31,14 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("assistant_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) + { + writer.WritePropertyName("assistant_id"u8); + } writer.WriteStringValue(AssistantId); - if (Optional.IsDefined(Thread)) + if (Optional.IsDefined(Thread) && _additionalBinaryDataProperties?.ContainsKey("thread") != true) { writer.WritePropertyName("thread"u8); writer.WriteObjectValue(Thread, options); } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { if (Instructions != null) { @@ -50,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { if (Tools != null) { @@ -67,7 +70,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("tools"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -90,7 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -102,7 +105,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(TopP)) + if (Optional.IsDefined(TopP) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (TopP != null) { @@ -114,7 +117,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) { @@ -126,7 +129,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (Optional.IsDefined(MaxPromptTokens)) + if (Optional.IsDefined(MaxPromptTokens) && _additionalBinaryDataProperties?.ContainsKey("max_prompt_tokens") != true) { if (MaxPromptTokens != null) { @@ -138,7 +141,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxPromptTokens"u8); } } - if (Optional.IsDefined(MaxCompletionTokens)) + if (Optional.IsDefined(MaxCompletionTokens) && _additionalBinaryDataProperties?.ContainsKey("max_completion_tokens") != true) { if (MaxCompletionTokens != null) { @@ -150,7 +153,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxCompletionTokens"u8); } } - if (Optional.IsDefined(TruncationStrategy)) + if (Optional.IsDefined(TruncationStrategy) && _additionalBinaryDataProperties?.ContainsKey("truncation_strategy") != true) { if (TruncationStrategy != null) { @@ -162,12 +165,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("truncationStrategy"u8); } } - if (Optional.IsDefined(ParallelToolCalls)) + if (Optional.IsDefined(ParallelToolCalls) && _additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { if (Model != null) { @@ -179,7 +182,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("model"u8); } } - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -191,7 +194,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -203,7 +206,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { if (ToolChoice != null) { @@ -219,6 +222,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -279,7 +286,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea { if (prop.Value.ValueKind == JsonValueKind.Null) { - thread = null; continue; } thread = ThreadCreationOptions.DeserializeThreadCreationOptions(prop.Value, options); @@ -394,7 +400,6 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea { if (prop.Value.ValueKind == JsonValueKind.Null) { - parallelToolCalls = null; continue; } parallelToolCalls = prop.Value.GetBoolean(); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index 4ff45ca2c..29dd02047 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequest(string assistantId) { @@ -65,5 +65,11 @@ internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOpt public RunTruncationStrategy TruncationStrategy { get; set; } public bool? ParallelToolCalls { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs index 1922a5839..8d0026979 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalCreateThreadAndRunRequestToolResources DeserializeIntern { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalCreateThreadAndRunRequestToolResources DeserializeIntern { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs index 68641834a..08726ec52 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequestToolResources() { @@ -25,5 +25,11 @@ internal InternalCreateThreadAndRunRequestToolResources(InternalCreateThreadAndR public InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index 75aa1d8af..a559455b5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs index ad6c3cd17..d48dfdb72 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter(IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs index 879160326..d2fa599ab 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalCreateThreadRequestToolResources DeserializeInternalCrea { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalCreateThreadRequestToolResourcesCodeInterpreter.DeserializeInternalCreateThreadRequestToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalCreateThreadRequestToolResources DeserializeInternalCrea { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs index 568b1d830..f13e765c6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResources() { @@ -25,5 +25,11 @@ internal InternalCreateThreadRequestToolResources(InternalCreateThreadRequestToo public InternalCreateThreadRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } public FileSearchToolResources FileSearch { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 98e9a1599..9554b94f5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs index d0dce3fbb..af5286bc4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalCreateThreadRequestToolResourcesCodeInterpreter(IList f } public IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs index b9354a847..44e8d5b1e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs @@ -31,6 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs index 910d381e8..be6327344 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalCreateThreadRequestToolResourcesFileSearchBase { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateThreadRequestToolResourcesFileSearchBase() { @@ -19,5 +19,11 @@ internal InternalCreateThreadRequestToolResourcesFileSearchBase(IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index 270d2107e..0cdc3a8d8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateTranscriptionResponseJson)} does not support writing '{format}' format."); } - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs index 47658cc78..0e765561d 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranscriptionResponseJson { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateTranscriptionResponseJson(string text) { @@ -23,5 +23,11 @@ internal InternalCreateTranscriptionResponseJson(string text, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index 6d73f4a43..995d8cd4a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateTranslationResponseJson)} does not support writing '{format}' format."); } - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs index e1912362f..c72d3c914 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { internal partial class InternalCreateTranslationResponseJson { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalCreateTranslationResponseJson(string text) { @@ -23,5 +23,11 @@ internal InternalCreateTranslationResponseJson(string text, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index 222a4405b..4f1a0f097 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -31,18 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateUploadRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("filename"u8); + if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) + { + writer.WritePropertyName("filename"u8); + } writer.WriteStringValue(Filename); - writer.WritePropertyName("purpose"u8); + if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) + { + writer.WritePropertyName("purpose"u8); + } writer.WriteStringValue(Purpose.ToString()); - writer.WritePropertyName("bytes"u8); + if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) + { + writer.WritePropertyName("bytes"u8); + } writer.WriteNumberValue(Bytes); - writer.WritePropertyName("mime_type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("mime_type") != true) + { + writer.WritePropertyName("mime_type"u8); + } writer.WriteStringValue(MimeType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs index 19b10ded5..4990d380a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalCreateUploadRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateUploadRequest(string filename, InternalCreateUploadRequestPurpose purpose, int bytes, string mimeType) { @@ -39,5 +39,11 @@ internal InternalCreateUploadRequest(string filename, InternalCreateUploadReques public int Bytes { get; set; } public string MimeType { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index 914da26ad..d22490cbb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -31,7 +31,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileBatchRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_ids"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_ids") != true) + { + writer.WritePropertyName("file_ids"u8); + } writer.WriteStartArray(); foreach (string item in FileIds) { @@ -43,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item); } writer.WriteEndArray(); - if (Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); #if NET6_0_OR_GREATER @@ -59,6 +62,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -117,7 +124,6 @@ internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCre { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs index 0c3cf4068..05db1f8a6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileBatchRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateVectorStoreFileBatchRequest(IEnumerable fileIds) { @@ -30,5 +30,11 @@ internal InternalCreateVectorStoreFileBatchRequest(IList fileIds, Binary public IList FileIds { get; } public BinaryData ChunkingStrategy { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index 2b249b674..0fa9a53b6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateVectorStoreFileRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); - if (Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); @@ -42,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -88,7 +95,6 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs index 6b9b2af61..f8140bb89 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalCreateVectorStoreFileRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalCreateVectorStoreFileRequest(string fileId) { @@ -27,5 +27,11 @@ internal InternalCreateVectorStoreFileRequest(string fileId, FileChunkingStrateg } public string FileId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 99acd7163..5cbdb3e61 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFileChunkingStrategyRequestParam)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs index d9392d144..1dc6d0ab5 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal abstract partial class InternalFileChunkingStrategyRequestParam { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalFileChunkingStrategyRequestParam(string @type) { @@ -23,5 +23,11 @@ internal InternalFileChunkingStrategyRequestParam(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index c800a8068..df68303dc 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -28,7 +28,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFileUploadOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("file"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file") != true) + { + writer.WritePropertyName("file"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(global::System.BinaryData.FromStream(File)); #else @@ -37,12 +40,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("purpose"u8); + if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) + { + writer.WritePropertyName("purpose"u8); + } writer.WriteStringValue(Purpose.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs index a17256f3d..e53004253 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Files { internal partial class InternalFileUploadOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalFileUploadOptions(Stream @file, FileUploadPurpose purpose, IDictionary additionalBinaryDataProperties) { @@ -18,5 +18,11 @@ internal InternalFileUploadOptions(Stream @file, FileUploadPurpose purpose, IDic Purpose = purpose; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index b577d7e5d..ba0f31eb7 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -71,11 +71,6 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - participantName = null; - continue; - } participantName = prop.Value.GetString(); continue; } @@ -110,11 +105,6 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index dc03eea27..29a005ec1 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFineTuningIntegration)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs index 16dd89536..5da15f4af 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal abstract partial class InternalFineTuningIntegration { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalFineTuningIntegration(string @type) { @@ -23,5 +23,11 @@ internal InternalFineTuningIntegration(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index 42c462170..a474876f7 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalFineTuningIntegrationWandb)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("wandb"u8); + if (_additionalBinaryDataProperties?.ContainsKey("wandb") != true) + { + writer.WritePropertyName("wandb"u8); + } writer.WriteObjectValue(Wandb, options); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index 1fbbcd1b5..99d2e3f18 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -31,24 +31,49 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpoint)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("fine_tuned_model_checkpoint"u8); + if (_additionalBinaryDataProperties?.ContainsKey("fine_tuned_model_checkpoint") != true) + { + writer.WritePropertyName("fine_tuned_model_checkpoint"u8); + } writer.WriteStringValue(FineTunedModelCheckpoint); - writer.WritePropertyName("step_number"u8); + if (_additionalBinaryDataProperties?.ContainsKey("step_number") != true) + { + writer.WritePropertyName("step_number"u8); + } writer.WriteNumberValue(StepNumber); - writer.WritePropertyName("metrics"u8); + if (_additionalBinaryDataProperties?.ContainsKey("metrics") != true) + { + writer.WritePropertyName("metrics"u8); + } writer.WriteObjectValue(Metrics, options); - writer.WritePropertyName("fine_tuning_job_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("fine_tuning_job_id") != true) + { + writer.WritePropertyName("fine_tuning_job_id"u8); + } writer.WriteStringValue(FineTuningJobId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs index ecfe0cc74..77dab5018 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpoint { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, string fineTunedModelCheckpoint, int stepNumber, InternalFineTuningJobCheckpointMetrics metrics, string fineTuningJobId) { @@ -46,5 +46,11 @@ internal InternalFineTuningJobCheckpoint(string id, DateTimeOffset createdAt, st public string FineTuningJobId { get; } public InternalFineTuningJobCheckpointObject Object { get; } = "fine_tuning.job.checkpoint"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs index fa7d33ee0..5cf4f4076 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs @@ -27,37 +27,37 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFineTuningJobCheckpointMetrics)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Step)) + if (Optional.IsDefined(Step) && _additionalBinaryDataProperties?.ContainsKey("step") != true) { writer.WritePropertyName("step"u8); writer.WriteNumberValue(Step.Value); } - if (Optional.IsDefined(TrainLoss)) + if (Optional.IsDefined(TrainLoss) && _additionalBinaryDataProperties?.ContainsKey("train_loss") != true) { writer.WritePropertyName("train_loss"u8); writer.WriteNumberValue(TrainLoss.Value); } - if (Optional.IsDefined(TrainMeanTokenAccuracy)) + if (Optional.IsDefined(TrainMeanTokenAccuracy) && _additionalBinaryDataProperties?.ContainsKey("train_mean_token_accuracy") != true) { writer.WritePropertyName("train_mean_token_accuracy"u8); writer.WriteNumberValue(TrainMeanTokenAccuracy.Value); } - if (Optional.IsDefined(ValidLoss)) + if (Optional.IsDefined(ValidLoss) && _additionalBinaryDataProperties?.ContainsKey("valid_loss") != true) { writer.WritePropertyName("valid_loss"u8); writer.WriteNumberValue(ValidLoss.Value); } - if (Optional.IsDefined(ValidMeanTokenAccuracy)) + if (Optional.IsDefined(ValidMeanTokenAccuracy) && _additionalBinaryDataProperties?.ContainsKey("valid_mean_token_accuracy") != true) { writer.WritePropertyName("valid_mean_token_accuracy"u8); writer.WriteNumberValue(ValidMeanTokenAccuracy.Value); } - if (Optional.IsDefined(FullValidLoss)) + if (Optional.IsDefined(FullValidLoss) && _additionalBinaryDataProperties?.ContainsKey("full_valid_loss") != true) { writer.WritePropertyName("full_valid_loss"u8); writer.WriteNumberValue(FullValidLoss.Value); } - if (Optional.IsDefined(FullValidMeanTokenAccuracy)) + if (Optional.IsDefined(FullValidMeanTokenAccuracy) && _additionalBinaryDataProperties?.ContainsKey("full_valid_mean_token_accuracy") != true) { writer.WritePropertyName("full_valid_mean_token_accuracy"u8); writer.WriteNumberValue(FullValidMeanTokenAccuracy.Value); @@ -66,6 +66,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -112,7 +116,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - step = null; continue; } step = prop.Value.GetSingle(); @@ -122,7 +125,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - trainLoss = null; continue; } trainLoss = prop.Value.GetSingle(); @@ -132,7 +134,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - trainMeanTokenAccuracy = null; continue; } trainMeanTokenAccuracy = prop.Value.GetSingle(); @@ -142,7 +143,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - validLoss = null; continue; } validLoss = prop.Value.GetSingle(); @@ -152,7 +152,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - validMeanTokenAccuracy = null; continue; } validMeanTokenAccuracy = prop.Value.GetSingle(); @@ -162,7 +161,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - fullValidLoss = null; continue; } fullValidLoss = prop.Value.GetSingle(); @@ -172,7 +170,6 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu { if (prop.Value.ValueKind == JsonValueKind.Null) { - fullValidMeanTokenAccuracy = null; continue; } fullValidMeanTokenAccuracy = prop.Value.GetSingle(); diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs index 65052a2da..a59f09b9e 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFineTuningJobCheckpointMetrics { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalFineTuningJobCheckpointMetrics() { @@ -40,5 +40,11 @@ internal InternalFineTuningJobCheckpointMetrics(float? step, float? trainLoss, f public float? FullValidLoss { get; } public float? FullValidMeanTokenAccuracy { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index 83e6764c0..826fdf7c4 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -28,7 +28,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFinetuneChatRequestInput)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Messages)) + if (Optional.IsCollectionDefined(Messages) && _additionalBinaryDataProperties?.ContainsKey("messages") != true) { writer.WritePropertyName("messages"u8); writer.WriteStartArray(); @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -60,12 +60,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ParallelToolCalls)) + if (Optional.IsDefined(ParallelToolCalls) && _additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(ParallelToolCalls.Value); } - if (Optional.IsCollectionDefined(Functions)) + if (Optional.IsCollectionDefined(Functions) && _additionalBinaryDataProperties?.ContainsKey("functions") != true) { writer.WritePropertyName("functions"u8); writer.WriteStartArray(); @@ -79,6 +79,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -157,7 +161,6 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat { if (prop.Value.ValueKind == JsonValueKind.Null) { - parallelToolCalls = null; continue; } parallelToolCalls = prop.Value.GetBoolean(); diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs index 37e93acc2..6588ee146 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.cs @@ -11,7 +11,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFinetuneChatRequestInput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalFinetuneChatRequestInput() { @@ -36,5 +36,11 @@ internal InternalFinetuneChatRequestInput(IList messages, IList Functions { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs index 6583b57c8..228c2abaa 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFinetuneCompletionRequestInput)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Prompt)) + if (Optional.IsDefined(Prompt) && _additionalBinaryDataProperties?.ContainsKey("prompt") != true) { writer.WritePropertyName("prompt"u8); writer.WriteStringValue(Prompt); } - if (Optional.IsDefined(Completion)) + if (Optional.IsDefined(Completion) && _additionalBinaryDataProperties?.ContainsKey("completion") != true) { writer.WritePropertyName("completion"u8); writer.WriteStringValue(Completion); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetu { if (prop.NameEquals("prompt"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - prompt = null; - continue; - } prompt = prop.Value.GetString(); continue; } if (prop.NameEquals("completion"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - completion = null; - continue; - } completion = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs index a8f3770b5..77224a7f9 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal partial class InternalFinetuneCompletionRequestInput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalFinetuneCompletionRequestInput() { @@ -25,5 +25,11 @@ internal InternalFinetuneCompletionRequestInput(string prompt, string completion public string Prompt { get; set; } public string Completion { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index 284593b64..302d7e681 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -30,14 +30,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalFunctionDefinition)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(Description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - if (Optional.IsDefined(Strict)) + if (Optional.IsDefined(Strict) && _additionalBinaryDataProperties?.ContainsKey("strict") != true) { if (Strict != null) { @@ -49,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("strict"u8); } } - if (Optional.IsDefined(Parameters)) + if (Optional.IsDefined(Parameters) && _additionalBinaryDataProperties?.ContainsKey("parameters") != true) { writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER @@ -65,6 +68,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -106,11 +113,6 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition { if (prop.NameEquals("description"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } description = prop.Value.GetString(); continue; } @@ -133,7 +135,6 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition { if (prop.Value.ValueKind == JsonValueKind.Null) { - parameters = null; continue; } parameters = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs index 5bd7f2e79..789b1cb92 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.cs @@ -9,7 +9,7 @@ namespace OpenAI { internal partial class InternalFunctionDefinition { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalFunctionDefinition(string name) { @@ -32,5 +32,11 @@ internal InternalFunctionDefinition(string description, string name, bool? stric public string Name { get; set; } public bool? Strict { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs index f3a11f319..67b1a19c7 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionParameters.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionParameters.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { internal partial class InternalFunctionParameters { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalFunctionParameters() { @@ -23,5 +23,11 @@ internal InternalFunctionParameters(IDictionary additionalPr } public IDictionary AdditionalProperties => _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 57459d65f..320c3d6b2 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListAssistantsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs index 1c571a90f..60504b4ef 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListAssistantsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListAssistantsResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListAssistantsResponse(InternalListAssistantsResponseObject @ob public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index 98a26e94f..517f45f18 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -31,31 +31,44 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListBatchesResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); + if (_additionalBinaryDataProperties?.ContainsKey("data") != true) + { + writer.WritePropertyName("data"u8); + } writer.WriteStartArray(); foreach (InternalBatchJob item in Data) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Optional.IsDefined(FirstId)) + if (Optional.IsDefined(FirstId) && _additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); writer.WriteStringValue(FirstId); } - if (Optional.IsDefined(LastId)) + if (Optional.IsDefined(LastId) && _additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); writer.WriteStringValue(LastId); } - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -108,21 +121,11 @@ internal static InternalListBatchesResponse DeserializeInternalListBatchesRespon } if (prop.NameEquals("first_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - firstId = null; - continue; - } firstId = prop.Value.GetString(); continue; } if (prop.NameEquals("last_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - lastId = null; - continue; - } lastId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs index 04e819996..588ef3f71 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Batch { internal partial class InternalListBatchesResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListBatchesResponse(IEnumerable data, bool hasMore) { @@ -37,5 +37,11 @@ internal InternalListBatchesResponse(IList data, string firstI public bool HasMore { get; } public InternalListBatchesResponseObject Object { get; } = "list"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index 1ff1d860d..ebff9e24d 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -31,16 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListFineTuningJobCheckpointsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); + if (_additionalBinaryDataProperties?.ContainsKey("data") != true) + { + writer.WritePropertyName("data"u8); + } writer.WriteStartArray(); foreach (InternalFineTuningJobCheckpoint item in Data) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (Optional.IsDefined(FirstId)) + if (Optional.IsDefined(FirstId) && _additionalBinaryDataProperties?.ContainsKey("first_id") != true) { if (FirstId != null) { @@ -52,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("firstId"u8); } } - if (Optional.IsDefined(LastId)) + if (Optional.IsDefined(LastId) && _additionalBinaryDataProperties?.ContainsKey("last_id") != true) { if (LastId != null) { @@ -64,12 +70,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("lastId"u8); } } - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs index 7f007e20a..48431f1c9 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobCheckpointsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListFineTuningJobCheckpointsResponse(IEnumerable data, bool hasMore) { @@ -37,5 +37,11 @@ internal InternalListFineTuningJobCheckpointsResponse(IList SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index c2385d401..1c2b32fc6 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -31,21 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListFineTuningJobEventsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); - writer.WritePropertyName("data"u8); + if (_additionalBinaryDataProperties?.ContainsKey("data") != true) + { + writer.WritePropertyName("data"u8); + } writer.WriteStartArray(); foreach (FineTuningJobEvent item in Data) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs index 8f6558a9a..c34113f0d 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListFineTuningJobEventsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListFineTuningJobEventsResponse(bool hasMore, IEnumerable data) { @@ -31,5 +31,11 @@ internal InternalListFineTuningJobEventsResponse(bool hasMore, IList Data { get; } public InternalListFineTuningJobEventsResponseObject Object { get; } = "list"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index 0999bb3b0..3cfbf6787 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListMessagesResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs index e29c0994a..5f0381ef6 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListMessagesResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListMessagesResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListMessagesResponse(InternalListMessagesResponseObject @object public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index 209ba2718..2661fe202 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -31,21 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListPaginatedFineTuningJobsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("data"u8); + if (_additionalBinaryDataProperties?.ContainsKey("data") != true) + { + writer.WritePropertyName("data"u8); + } writer.WriteStartArray(); foreach (FineTuningJob item in Data) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs index 180870634..d063d6e4c 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.FineTuning { internal partial class InternalListPaginatedFineTuningJobsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListPaginatedFineTuningJobsResponse(IEnumerable data, bool hasMore) { @@ -31,5 +31,11 @@ internal InternalListPaginatedFineTuningJobsResponse(IList data, public bool HasMore { get; } public InternalListPaginatedFineTuningJobsResponseObject Object { get; } = "list"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index bebe48bb5..68b155c32 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListRunStepsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs index 877b25951..b335f2f9d 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListRunStepsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListRunStepsResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListRunStepsResponse(InternalListRunStepsResponseObject @object public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index ef00eb9df..b7cc636ed 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListRunsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs index 5d0fa9758..c4c91c9e4 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListRunsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListRunsResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListRunsResponse(InternalListRunsResponseObject @object, IReadO public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index 6d8eb0cf3..0a26a6ee7 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListThreadsResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs index 87050dbe5..ae84cfdbf 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalListThreadsResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListThreadsResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListThreadsResponse(InternalListThreadsResponseObject @object, public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index aacbea164..ccf717492 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListVectorStoreFilesResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs index d0a734cbf..e5ea3d8a6 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoreFilesResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListVectorStoreFilesResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListVectorStoreFilesResponse(InternalListVectorStoreFilesRespon public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index a46142714..5bd0ef174 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalListVectorStoresResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -43,16 +46,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("first_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) + { + writer.WritePropertyName("first_id"u8); + } writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) + { + writer.WritePropertyName("last_id"u8); + } writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); + if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) + { + writer.WritePropertyName("has_more"u8); + } writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs index f802beeb3..3f2157103 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { internal partial class InternalListVectorStoresResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalListVectorStoresResponse(string firstId, string lastId, bool hasMore) { @@ -39,5 +39,11 @@ internal InternalListVectorStoresResponse(InternalListVectorStoresResponseObject public string LastId { get; } public bool HasMore { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 6d747ac88..d24deeeb2 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentImageUrlObjectImageUrl)} does not support writing '{format}' format."); } - writer.WritePropertyName("url"u8); + if (_additionalBinaryDataProperties?.ContainsKey("url") != true) + { + writer.WritePropertyName("url"u8); + } writer.WriteStringValue(Url.AbsoluteUri); - if (Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); @@ -42,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -86,11 +93,6 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs index 4347e60eb..60e449f28 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentImageUrlObjectImageUrl { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalMessageContentImageUrlObjectImageUrl(Uri url) { @@ -27,5 +27,11 @@ internal InternalMessageContentImageUrlObjectImageUrl(Uri url, string detail, ID } public Uri Url { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index 212e1dddb..b393507d9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentItemFileObjectImageFile)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); - if (Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); @@ -42,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -86,11 +93,6 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs index a0a1991fd..9b896a1e1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentItemFileObjectImageFile { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalMessageContentItemFileObjectImageFile(string fileId) { @@ -27,5 +27,11 @@ internal InternalMessageContentItemFileObjectImageFile(string fileId, string det } public string FileId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index 7b45057c6..3cdac1163 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -32,13 +32,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); - writer.WritePropertyName("file_citation"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_citation") != true) + { + writer.WritePropertyName("file_citation"u8); + } writer.WriteObjectValue(FileCitation, options); - writer.WritePropertyName("start_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("start_index") != true) + { + writer.WritePropertyName("start_index"u8); + } writer.WriteNumberValue(StartIndex); - writer.WritePropertyName("end_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("end_index") != true) + { + writer.WritePropertyName("end_index"u8); + } writer.WriteNumberValue(EndIndex); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 7f1888078..9a1b0af93 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFileCitationObjectFileCitation)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs index cf7a8c3c7..2fc0281be 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFileCitationObjectFileCitation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(string fileId) { @@ -26,5 +26,11 @@ internal InternalMessageContentTextAnnotationsFileCitationObjectFileCitation(str } public string FileId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index f58de5b87..1877df707 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -32,13 +32,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); - writer.WritePropertyName("file_path"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_path") != true) + { + writer.WritePropertyName("file_path"u8); + } writer.WriteObjectValue(FilePath, options); - writer.WritePropertyName("start_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("start_index") != true) + { + writer.WritePropertyName("start_index"u8); + } writer.WriteNumberValue(StartIndex); - writer.WritePropertyName("end_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("end_index") != true) + { + writer.WritePropertyName("end_index"u8); + } writer.WriteNumberValue(EndIndex); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index a8a99b8a9..c7544557b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentTextAnnotationsFilePathObjectFilePath)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs index f7bf1bc81..048c7f9e1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextAnnotationsFilePathObjectFilePath { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextAnnotationsFilePathObjectFilePath(string fileId) { @@ -26,5 +26,11 @@ internal InternalMessageContentTextAnnotationsFilePathObjectFilePath(string file } public string FileId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index cea26d35f..270f5acb4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectAnnotation)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs index a1a1b62ed..443e712f4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageContentTextObjectAnnotation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalMessageContentTextObjectAnnotation(string @type) { @@ -23,5 +23,11 @@ internal InternalMessageContentTextObjectAnnotation(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index bb48956a4..b3cd833d5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -31,9 +31,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageContentTextObjectText)} does not support writing '{format}' format."); } - writer.WritePropertyName("value"u8); + if (_additionalBinaryDataProperties?.ContainsKey("value") != true) + { + writer.WritePropertyName("value"u8); + } writer.WriteStringValue(Value); - writer.WritePropertyName("annotations"u8); + if (_additionalBinaryDataProperties?.ContainsKey("annotations") != true) + { + writer.WritePropertyName("annotations"u8); + } writer.WriteStartArray(); foreach (InternalMessageContentTextObjectAnnotation item in Annotations) { @@ -44,6 +50,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs index 2ac27256b..61cfcfb00 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageContentTextObjectText { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalMessageContentTextObjectText(string value, IEnumerable annotations) { @@ -32,5 +32,11 @@ internal InternalMessageContentTextObjectText(string value, IList Annotations { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index da2f77930..c77edf53d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs index 19cf2cbf3..007a832fe 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaContent { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalMessageDeltaContent(string @type) { @@ -23,5 +23,11 @@ internal InternalMessageDeltaContent(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index 5c986c14b..c1df577bc 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(ImageFile)) + if (Optional.IsDefined(ImageFile) && _additionalBinaryDataProperties?.ContainsKey("image_file") != true) { writer.WritePropertyName("image_file"u8); writer.WriteObjectValue(ImageFile, options); @@ -75,7 +78,6 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe { if (prop.Value.ValueKind == JsonValueKind.Null) { - imageFile = null; continue; } imageFile = InternalMessageDeltaContentImageFileObjectImageFile.DeserializeInternalMessageDeltaContentImageFileObjectImageFile(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index d1cd16c04..7b8e0605c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageFileObjectImageFile)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId) && _additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI { if (prop.NameEquals("file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileId = null; - continue; - } fileId = prop.Value.GetString(); continue; } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs index 4c5bd335f..e550f5c0d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageFileObjectImageFile { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentImageFileObjectImageFile() { @@ -23,5 +23,11 @@ internal InternalMessageDeltaContentImageFileObjectImageFile(string fileId, stri } public string FileId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index c990b00a4..17f6f680b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(ImageUrl)) + if (Optional.IsDefined(ImageUrl) && _additionalBinaryDataProperties?.ContainsKey("image_url") != true) { writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); @@ -75,7 +78,6 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes { if (prop.Value.ValueKind == JsonValueKind.Null) { - imageUrl = null; continue; } imageUrl = InternalMessageDeltaContentImageUrlObjectImageUrl.DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 5ce2257e0..bf51c0f69 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContentImageUrlObjectImageUrl)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Url)) + if (Optional.IsDefined(Url) && _additionalBinaryDataProperties?.ContainsKey("url") != true) { writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (Optional.IsDefined(Detail)) + if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt { if (prop.Value.ValueKind == JsonValueKind.Null) { - url = null; continue; } url = new Uri(prop.Value.GetString()); @@ -90,11 +93,6 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt } if (prop.NameEquals("detail"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - detail = null; - continue; - } detail = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs index b3c366bf9..2dc688dee 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentImageUrlObjectImageUrl { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentImageUrlObjectImageUrl() { @@ -23,5 +23,11 @@ internal InternalMessageDeltaContentImageUrlObjectImageUrl(Uri url, string detai } public Uri Url { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index 44888bb15..e8f6bb385 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentRefusalObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Refusal)) + if (Optional.IsDefined(Refusal) && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { writer.WritePropertyName("refusal"u8); writer.WriteStringValue(Refusal); @@ -73,11 +76,6 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess } if (prop.NameEquals("refusal"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - refusal = null; - continue; - } refusal = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index f2eeafa19..30eaf5865 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -32,24 +32,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Text)) + if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (Optional.IsDefined(FileCitation)) + if (Optional.IsDefined(FileCitation) && _additionalBinaryDataProperties?.ContainsKey("file_citation") != true) { writer.WritePropertyName("file_citation"u8); writer.WriteObjectValue(FileCitation, options); } - if (Optional.IsDefined(StartIndex)) + if (Optional.IsDefined(StartIndex) && _additionalBinaryDataProperties?.ContainsKey("start_index") != true) { writer.WritePropertyName("start_index"u8); writer.WriteNumberValue(StartIndex.Value); } - if (Optional.IsDefined(EndIndex)) + if (Optional.IsDefined(EndIndex) && _additionalBinaryDataProperties?.ContainsKey("end_index") != true) { writer.WritePropertyName("end_index"u8); writer.WriteNumberValue(EndIndex.Value); @@ -91,11 +94,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des } if (prop.NameEquals("text"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - text = null; - continue; - } text = prop.Value.GetString(); continue; } @@ -103,7 +101,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileCitation = null; continue; } fileCitation = InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.DeserializeInternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation(prop.Value, options); @@ -113,7 +110,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des { if (prop.Value.ValueKind == JsonValueKind.Null) { - startIndex = null; continue; } startIndex = prop.Value.GetInt32(); @@ -123,7 +119,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des { if (prop.Value.ValueKind == JsonValueKind.Null) { - endIndex = null; continue; } endIndex = prop.Value.GetInt32(); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 2d3ba087f..0f10aaab6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId) && _additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (Optional.IsDefined(Quote)) + if (Optional.IsDefined(Quote) && _additionalBinaryDataProperties?.ContainsKey("quote") != true) { writer.WritePropertyName("quote"u8); writer.WriteStringValue(Quote); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFile { if (prop.NameEquals("file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileId = null; - continue; - } fileId = prop.Value.GetString(); continue; } if (prop.NameEquals("quote"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - quote = null; - continue; - } quote = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs index 62b5e49ac..85f914f54 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation() { @@ -25,5 +25,11 @@ internal InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitatio public string FileId { get; } public string Quote { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 3dd9fcdb4..626a20291 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -32,24 +32,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Text)) + if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (Optional.IsDefined(FilePath)) + if (Optional.IsDefined(FilePath) && _additionalBinaryDataProperties?.ContainsKey("file_path") != true) { writer.WritePropertyName("file_path"u8); writer.WriteObjectValue(FilePath, options); } - if (Optional.IsDefined(StartIndex)) + if (Optional.IsDefined(StartIndex) && _additionalBinaryDataProperties?.ContainsKey("start_index") != true) { writer.WritePropertyName("start_index"u8); writer.WriteNumberValue(StartIndex.Value); } - if (Optional.IsDefined(EndIndex)) + if (Optional.IsDefined(EndIndex) && _additionalBinaryDataProperties?.ContainsKey("end_index") != true) { writer.WritePropertyName("end_index"u8); writer.WriteNumberValue(EndIndex.Value); @@ -91,11 +94,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria } if (prop.NameEquals("text"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - text = null; - continue; - } text = prop.Value.GetString(); continue; } @@ -103,7 +101,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria { if (prop.Value.ValueKind == JsonValueKind.Null) { - filePath = null; continue; } filePath = InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.DeserializeInternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(prop.Value, options); @@ -113,7 +110,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria { if (prop.Value.ValueKind == JsonValueKind.Null) { - startIndex = null; continue; } startIndex = prop.Value.GetInt32(); @@ -123,7 +119,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria { if (prop.Value.ValueKind == JsonValueKind.Null) { - endIndex = null; continue; } endIndex = prop.Value.GetInt32(); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index b74a77ae4..5b369d90f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId) && _additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -74,11 +78,6 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath { if (prop.NameEquals("file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileId = null; - continue; - } fileId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs index 7039bddca..89223887d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath() { @@ -22,5 +22,11 @@ internal InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath(string } public string FileId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 7dcb0168e..89e8d7ff5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Text)) + if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); writer.WriteObjectValue(Text, options); @@ -75,7 +78,6 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage { if (prop.Value.ValueKind == JsonValueKind.Null) { - text = null; continue; } text = InternalMessageDeltaContentTextObjectText.DeserializeInternalMessageDeltaContentTextObjectText(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index 31417bfda..0f16ba9f6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaContentTextObjectText)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Value) && _additionalBinaryDataProperties?.ContainsKey("value") != true) { writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); } - if (Optional.IsCollectionDefined(Annotations)) + if (Optional.IsCollectionDefined(Annotations) && _additionalBinaryDataProperties?.ContainsKey("annotations") != true) { writer.WritePropertyName("annotations"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -85,11 +89,6 @@ internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMes { if (prop.NameEquals("value"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - value = null; - continue; - } value = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs index 54aec0c2d..80c395a14 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaContentTextObjectText { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaContentTextObjectText() { @@ -27,5 +27,11 @@ internal InternalMessageDeltaContentTextObjectText(string value, IList Annotations { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index 911c6e33b..8b952a0df 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaObject)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteObjectValue(Delta, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs index 42103daab..a9e15adda 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObject { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectDelta delta) { @@ -30,5 +30,11 @@ internal InternalMessageDeltaObject(string id, InternalMessageDeltaObjectObject public InternalMessageDeltaObjectObject Object { get; } = "thread.message.delta"; public InternalMessageDeltaObjectDelta Delta { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 19715ed67..339afb4bf 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaObjectDelta)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Content)) + if (Optional.IsCollectionDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Role)) + if (Optional.IsDefined(Role) && _additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -101,7 +105,6 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO { if (prop.Value.ValueKind == JsonValueKind.Null) { - role = null; continue; } role = prop.Value.GetString().ToMessageRole(); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs index fed8b234d..71995269f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageDeltaObjectDelta { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageDeltaObjectDelta() { @@ -25,5 +25,11 @@ internal InternalMessageDeltaObjectDelta(IList cont } public IList Content { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 5c95f5348..d856ddb69 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageDeltaTextContentAnnotation)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs index f25e5e315..d34f19001 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalMessageDeltaTextContentAnnotation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalMessageDeltaTextContentAnnotation(string @type) { @@ -23,5 +23,11 @@ internal InternalMessageDeltaTextContentAnnotation(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index f73a206e0..e22ea3b1c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -25,9 +25,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageImageFileContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_type); - writer.WritePropertyName("image_file"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image_file") != true) + { + writer.WritePropertyName("image_file"u8); + } writer.WriteObjectValue(_imageFile, options); } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index a55615cd1..17b380bdd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -25,9 +25,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageImageUrlContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_type); - writer.WritePropertyName("image_url"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image_url") != true) + { + writer.WritePropertyName("image_url"u8); + } writer.WriteObjectValue(_imageUrl, options); } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index 3d15406a5..3e3d6e84a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalMessageObjectAttachment)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId) && _additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -58,6 +58,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -97,11 +101,6 @@ internal static InternalMessageObjectAttachment DeserializeInternalMessageObject { if (prop.NameEquals("file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileId = null; - continue; - } fileId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs index 9f765e201..6255505fb 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageObjectAttachment { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalMessageObjectAttachment() { @@ -27,5 +27,11 @@ internal InternalMessageObjectAttachment(string fileId, IList tools, public string FileId { get; } public IList Tools { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index 0704b0d65..dacc851d1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -25,9 +25,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalMessageRefusalContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("refusal"u8); + if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) + { + writer.WritePropertyName("refusal"u8); + } writer.WriteStringValue(InternalRefusal); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_type); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 157026a3f..4322faff1 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -31,32 +31,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModerationCategories)} does not support writing '{format}' format."); } - writer.WritePropertyName("hate"u8); + if (_additionalBinaryDataProperties?.ContainsKey("hate") != true) + { + writer.WritePropertyName("hate"u8); + } writer.WriteBooleanValue(Hate); - writer.WritePropertyName("hate/threatening"u8); + if (_additionalBinaryDataProperties?.ContainsKey("hate/threatening") != true) + { + writer.WritePropertyName("hate/threatening"u8); + } writer.WriteBooleanValue(HateThreatening); - writer.WritePropertyName("harassment"u8); + if (_additionalBinaryDataProperties?.ContainsKey("harassment") != true) + { + writer.WritePropertyName("harassment"u8); + } writer.WriteBooleanValue(Harassment); - writer.WritePropertyName("harassment/threatening"u8); + if (_additionalBinaryDataProperties?.ContainsKey("harassment/threatening") != true) + { + writer.WritePropertyName("harassment/threatening"u8); + } writer.WriteBooleanValue(HarassmentThreatening); - writer.WritePropertyName("self-harm"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) + { + writer.WritePropertyName("self-harm"u8); + } writer.WriteBooleanValue(SelfHarm); - writer.WritePropertyName("self-harm/intent"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/intent") != true) + { + writer.WritePropertyName("self-harm/intent"u8); + } writer.WriteBooleanValue(SelfHarmIntent); - writer.WritePropertyName("self-harm/instructions"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/instructions") != true) + { + writer.WritePropertyName("self-harm/instructions"u8); + } writer.WriteBooleanValue(SelfHarmInstructions); - writer.WritePropertyName("sexual"u8); + if (_additionalBinaryDataProperties?.ContainsKey("sexual") != true) + { + writer.WritePropertyName("sexual"u8); + } writer.WriteBooleanValue(Sexual); - writer.WritePropertyName("sexual/minors"u8); + if (_additionalBinaryDataProperties?.ContainsKey("sexual/minors") != true) + { + writer.WritePropertyName("sexual/minors"u8); + } writer.WriteBooleanValue(SexualMinors); - writer.WritePropertyName("violence"u8); + if (_additionalBinaryDataProperties?.ContainsKey("violence") != true) + { + writer.WritePropertyName("violence"u8); + } writer.WriteBooleanValue(Violence); - writer.WritePropertyName("violence/graphic"u8); + if (_additionalBinaryDataProperties?.ContainsKey("violence/graphic") != true) + { + writer.WritePropertyName("violence/graphic"u8); + } writer.WriteBooleanValue(ViolenceGraphic); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.cs index cd97d29ac..4858abde7 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategories { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { @@ -63,5 +63,11 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara public bool Violence { get; } public bool ViolenceGraphic { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index b1898c403..60564ec3d 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -31,32 +31,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModerationCategoryScores)} does not support writing '{format}' format."); } - writer.WritePropertyName("hate"u8); + if (_additionalBinaryDataProperties?.ContainsKey("hate") != true) + { + writer.WritePropertyName("hate"u8); + } writer.WriteNumberValue(Hate); - writer.WritePropertyName("hate/threatening"u8); + if (_additionalBinaryDataProperties?.ContainsKey("hate/threatening") != true) + { + writer.WritePropertyName("hate/threatening"u8); + } writer.WriteNumberValue(HateThreatening); - writer.WritePropertyName("harassment"u8); + if (_additionalBinaryDataProperties?.ContainsKey("harassment") != true) + { + writer.WritePropertyName("harassment"u8); + } writer.WriteNumberValue(Harassment); - writer.WritePropertyName("harassment/threatening"u8); + if (_additionalBinaryDataProperties?.ContainsKey("harassment/threatening") != true) + { + writer.WritePropertyName("harassment/threatening"u8); + } writer.WriteNumberValue(HarassmentThreatening); - writer.WritePropertyName("self-harm"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) + { + writer.WritePropertyName("self-harm"u8); + } writer.WriteNumberValue(SelfHarm); - writer.WritePropertyName("self-harm/intent"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/intent") != true) + { + writer.WritePropertyName("self-harm/intent"u8); + } writer.WriteNumberValue(SelfHarmIntent); - writer.WritePropertyName("self-harm/instructions"u8); + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/instructions") != true) + { + writer.WritePropertyName("self-harm/instructions"u8); + } writer.WriteNumberValue(SelfHarmInstructions); - writer.WritePropertyName("sexual"u8); + if (_additionalBinaryDataProperties?.ContainsKey("sexual") != true) + { + writer.WritePropertyName("sexual"u8); + } writer.WriteNumberValue(Sexual); - writer.WritePropertyName("sexual/minors"u8); + if (_additionalBinaryDataProperties?.ContainsKey("sexual/minors") != true) + { + writer.WritePropertyName("sexual/minors"u8); + } writer.WriteNumberValue(SexualMinors); - writer.WritePropertyName("violence"u8); + if (_additionalBinaryDataProperties?.ContainsKey("violence") != true) + { + writer.WritePropertyName("violence"u8); + } writer.WriteNumberValue(Violence); - writer.WritePropertyName("violence/graphic"u8); + if (_additionalBinaryDataProperties?.ContainsKey("violence/graphic") != true) + { + writer.WritePropertyName("violence/graphic"u8); + } writer.WriteNumberValue(ViolenceGraphic); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs index cb946b891..952b6671a 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class InternalModerationCategoryScores { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) { @@ -63,5 +63,11 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo public float Violence { get; } public float ViolenceGraphic { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs index 5073a09cf..fd249c975 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalModifyAssistantRequestToolResources DeserializeInternalM { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalModifyAssistantRequestToolResourcesCodeInterpreter.DeserializeInternalModifyAssistantRequestToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalModifyAssistantRequestToolResources DeserializeInternalM { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs index cb2f83706..661400bd6 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalModifyAssistantRequestToolResources() { @@ -25,5 +25,11 @@ internal InternalModifyAssistantRequestToolResources(InternalModifyAssistantRequ public InternalModifyAssistantRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index b42b7646d..96d600977 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModifyAssistantRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs index 5f9d9ea63..76eac7d76 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyAssistantRequestToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalModifyAssistantRequestToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalModifyAssistantRequestToolResourcesCodeInterpreter(IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs index 582f3981c..f2d7f9163 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalModifyThreadRequestToolResources DeserializeInternalModi { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalModifyThreadRequestToolResourcesCodeInterpreter.DeserializeInternalModifyThreadRequestToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalModifyThreadRequestToolResources DeserializeInternalModi { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs index c78a0f1e8..9a84e3744 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalModifyThreadRequestToolResources() { @@ -25,5 +25,11 @@ internal InternalModifyThreadRequestToolResources(InternalModifyThreadRequestToo public InternalModifyThreadRequestToolResourcesCodeInterpreter CodeInterpreter { get; set; } public InternalToolResourcesFileSearchIdsOnly FileSearch { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 250936ecf..c5fc53878 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalModifyThreadRequestToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs index 1b643544a..6946e8662 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalModifyThreadRequestToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalModifyThreadRequestToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalModifyThreadRequestToolResourcesCodeInterpreter(IList f } public IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index e8cb919ba..150bd49c0 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalOmniTypedResponseFormat)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs index 43fb94325..5415880b5 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal abstract partial class InternalOmniTypedResponseFormat { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalOmniTypedResponseFormat(string @type) { @@ -23,5 +23,11 @@ internal InternalOmniTypedResponseFormat(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index f906c9bf4..915eb10e8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestAssistantMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + { + writer.WritePropertyName("content"u8); + } writer.WriteStartArray(); foreach (ConversationContentPart item in Content) { @@ -87,7 +90,6 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -100,11 +102,6 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index d7a6169b4..b9ffad2ea 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Transcript)) + if (Optional.IsDefined(Transcript) && _additionalBinaryDataProperties?.ContainsKey("transcript") != true) { writer.WritePropertyName("transcript"u8); writer.WriteStringValue(Transcript); @@ -65,11 +65,6 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt { if (prop.NameEquals("transcript"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - transcript = null; - continue; - } transcript = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs index 1ae9914a2..8c73b0058 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeRequestCommand)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(EventId)) + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) { writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); @@ -42,6 +45,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs index daf114194..351c68454 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeRequestCommand { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind) { @@ -26,5 +26,11 @@ internal InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, internal InternalRealtimeRequestCommandType Kind { get; set; } public string EventId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index 0d152d548..f675a59cd 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -32,13 +32,22 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } writer.WriteStringValue(Arguments); - if (Optional.IsDefined(Status)) + if (Optional.IsDefined(Status) && _additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.Value.ToString()); @@ -92,7 +101,6 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -105,11 +113,6 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index c2dda8eec..3884517e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestFunctionCallOutputItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("output"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output") != true) + { + writer.WritePropertyName("output"u8); + } writer.WriteStringValue(Output); } @@ -81,11 +87,6 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs index 895bf19f6..b9ce48c2a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestInputAudioBufferAppendCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("audio"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio") != true) + { + writer.WritePropertyName("audio"u8); + } writer.WriteBase64StringValue(Audio.ToArray(), "D"); } @@ -73,11 +76,6 @@ internal static InternalRealtimeRequestInputAudioBufferAppendCommand Deserialize } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs index 421d032ea..d083a622a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs @@ -61,11 +61,6 @@ internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeI } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs index 06c14a940..24912175e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs @@ -61,11 +61,6 @@ internal static InternalRealtimeRequestInputAudioBufferCommitCommand Deserialize } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs index f8926358f..6120eef9d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs @@ -32,12 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestItemCreateCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(PreviousItemId)) + if (Optional.IsDefined(PreviousItemId) && _additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); writer.WriteStringValue(PreviousItemId); } - writer.WritePropertyName("item"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) + { + writer.WritePropertyName("item"u8); + } writer.WriteObjectValue(Item, options); } @@ -69,11 +72,6 @@ internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalReal { if (prop.NameEquals("previous_item_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - previousItemId = null; - continue; - } previousItemId = prop.Value.GetString(); continue; } @@ -89,11 +87,6 @@ internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalReal } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs index e0eba5e0b..0638df8ce 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestItemDeleteCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); } @@ -73,11 +76,6 @@ internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalReal } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs index 68261c17b..00e882aec 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs @@ -32,11 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestItemTruncateCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("item_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + { + writer.WritePropertyName("item_id"u8); + } writer.WriteStringValue(ItemId); - writer.WritePropertyName("content_index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + } writer.WriteNumberValue(ContentIndex); - writer.WritePropertyName("audio_end_ms"u8); + if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) + { + writer.WritePropertyName("audio_end_ms"u8); + } writer.WriteNumberValue(AudioEndMs); } @@ -89,11 +98,6 @@ internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRe } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index 73136b2b6..9b718afce 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("role"u8); + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) + { + writer.WritePropertyName("role"u8); + } writer.WriteStringValue(Role.ToString()); - if (Optional.IsDefined(Status)) + if (Optional.IsDefined(Status) && _additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.Value.ToString()); @@ -76,7 +79,6 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -89,11 +91,6 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs index 44d3e8139..454e5a9f0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs @@ -61,11 +61,6 @@ internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternal } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs index aed8ca958..b42cbeb5b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs @@ -28,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Response)) + if (Optional.IsDefined(Response) && _additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); writer.WriteObjectValue(Response, options); @@ -64,7 +64,6 @@ internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternal { if (prop.Value.ValueKind == JsonValueKind.Null) { - response = null; continue; } response = InternalRealtimeRequestResponseCreateCommandResponse.DeserializeInternalRealtimeRequestResponseCreateCommandResponse(prop.Value, options); @@ -77,11 +76,6 @@ internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternal } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs index a71527c16..220b7c5cc 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs @@ -31,11 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeRequestResponseCreateCommandResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("commit"u8); + if (_additionalBinaryDataProperties?.ContainsKey("commit") != true) + { + writer.WritePropertyName("commit"u8); + } writer.WriteBooleanValue(Commit); - writer.WritePropertyName("cancel_previous"u8); + if (_additionalBinaryDataProperties?.ContainsKey("cancel_previous") != true) + { + writer.WritePropertyName("cancel_previous"u8); + } writer.WriteBooleanValue(CancelPrevious); - if (Optional.IsCollectionDefined(AppendInputItems)) + if (Optional.IsCollectionDefined(AppendInputItems) && _additionalBinaryDataProperties?.ContainsKey("append_input_items") != true) { writer.WritePropertyName("append_input_items"u8); writer.WriteStartArray(); @@ -45,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(InputItems)) + if (Optional.IsCollectionDefined(InputItems) && _additionalBinaryDataProperties?.ContainsKey("input_items") != true) { writer.WritePropertyName("input_items"u8); writer.WriteStartArray(); @@ -55,12 +61,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Instructions)) + if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); } - if (Optional.IsCollectionDefined(Modalities)) + if (Optional.IsCollectionDefined(Modalities) && _additionalBinaryDataProperties?.ContainsKey("modalities") != true) { writer.WritePropertyName("modalities"u8); writer.WriteStartArray(); @@ -70,17 +76,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Voice)) + if (Optional.IsDefined(Voice) && _additionalBinaryDataProperties?.ContainsKey("voice") != true) { writer.WritePropertyName("voice"u8); writer.WriteStringValue(Voice.Value.ToString()); } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (Optional.IsDefined(MaxOutputTokens)) + if (Optional.IsDefined(MaxOutputTokens) && _additionalBinaryDataProperties?.ContainsKey("max_output_tokens") != true) { if (MaxOutputTokens != null) { @@ -99,7 +105,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxOutputTokens"u8); } } - if (Optional.IsCollectionDefined(Tools)) + if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -109,7 +115,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ToolChoice)) + if (Optional.IsDefined(ToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { writer.WritePropertyName("tool_choice"u8); #if NET6_0_OR_GREATER @@ -121,7 +127,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (Optional.IsDefined(OutputAudioFormat)) + if (Optional.IsDefined(OutputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) { writer.WritePropertyName("output_audio_format"u8); writer.WriteStringValue(OutputAudioFormat.Value.ToString()); @@ -130,6 +136,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -217,11 +227,6 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize } if (prop.NameEquals("instructions"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } instructions = prop.Value.GetString(); continue; } @@ -243,7 +248,6 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - voice = null; continue; } voice = new ConversationVoice(prop.Value.GetString()); @@ -253,7 +257,6 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - temperature = null; continue; } temperature = prop.Value.GetSingle(); @@ -287,7 +290,6 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - toolChoice = null; continue; } toolChoice = BinaryData.FromString(prop.Value.GetRawText()); @@ -297,7 +299,6 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - outputAudioFormat = null; continue; } outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs index f0ac843d1..1f1abeb23 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestResponseCreateCommandResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool cancelPrevious) { @@ -62,5 +62,11 @@ internal InternalRealtimeRequestResponseCreateCommandResponse(bool commit, bool public BinaryData ToolChoice { get; set; } public ConversationAudioFormat? OutputAudioFormat { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs index b7dbca6a4..f212f014e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestSessionUpdateCommand)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("session"u8); + if (_additionalBinaryDataProperties?.ContainsKey("session") != true) + { + writer.WritePropertyName("session"u8); + } writer.WriteObjectValue(Session, options); } @@ -73,11 +76,6 @@ internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalR } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index 1ddce9cf2..fdaff24d9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestSystemMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + { + writer.WritePropertyName("content"u8); + } writer.WriteStartArray(); foreach (ConversationContentPart item in Content) { @@ -87,7 +90,6 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -100,11 +102,6 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index 42eab796c..b5ff01a5c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 8de8da27a..38dd313e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestUserMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("content"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + { + writer.WritePropertyName("content"u8); + } writer.WriteStartArray(); foreach (ConversationContentPart item in Content) { @@ -87,7 +90,6 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -100,11 +102,6 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 41f705839..820eddf7b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -31,24 +31,42 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); - if (StatusDetails != null) + if (_additionalBinaryDataProperties?.ContainsKey("status_details") != true) { - writer.WritePropertyName("status_details"u8); - writer.WriteObjectValue(StatusDetails, options); + if (StatusDetails != null) + { + writer.WritePropertyName("status_details"u8); + writer.WriteObjectValue(StatusDetails, options); + } + else + { + writer.WriteNull("statusDetails"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) { - writer.WriteNull("statusDetails"u8); + writer.WritePropertyName("usage"u8); } - writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); - writer.WritePropertyName("output"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output") != true) + { + writer.WritePropertyName("output"u8); + } writer.WriteStartArray(); foreach (ConversationItem item in Output) { @@ -59,6 +77,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs index f87edce50..5d6a56499 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponse(string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IEnumerable output) { @@ -41,5 +41,11 @@ internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string public InternalRealtimeResponseStatusDetails StatusDetails { get; } public ConversationTokenUsage Usage { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs index 9e7ca78fa..bef17d3d8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs @@ -31,16 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponseApiError)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); - if (Optional.IsDefined(Code)) + if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); - if (Optional.IsDefined(Param)) + if (Optional.IsDefined(Param) && _additionalBinaryDataProperties?.ContainsKey("param") != true) { writer.WritePropertyName("param"u8); writer.WriteStringValue(Param); @@ -49,6 +55,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -95,11 +105,6 @@ internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResp } if (prop.NameEquals("code"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - code = null; - continue; - } code = prop.Value.GetString(); continue; } @@ -110,11 +115,6 @@ internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResp } if (prop.NameEquals("param"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - @param = null; - continue; - } @param = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs index abe217b48..f53eb7d2b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseApiError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseApiError(string @type, string message) { @@ -33,5 +33,11 @@ internal InternalRealtimeResponseApiError(string @type, string code, string mess public string Message { get; } public string Param { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 9dcf812ce..4208780d0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -32,14 +32,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Transcript != null) + if (_additionalBinaryDataProperties?.ContainsKey("transcript") != true) { - writer.WritePropertyName("transcript"u8); - writer.WriteStringValue(Transcript); - } - else - { - writer.WriteNull("transcript"u8); + if (Transcript != null) + { + writer.WritePropertyName("transcript"u8); + writer.WriteStringValue(Transcript); + } + else + { + writer.WriteNull("transcript"u8); + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs index ef831f515..f8738f549 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseCancelledStatusDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) + { + writer.WritePropertyName("reason"u8); + } writer.WriteStringValue(Reason.ToString()); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs index 086f7411b..363d2c84e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs @@ -31,21 +31,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponseError)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); - if (Optional.IsDefined(Code)) + if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); - if (Optional.IsDefined(Param)) + if (Optional.IsDefined(Param) && _additionalBinaryDataProperties?.ContainsKey("param") != true) { writer.WritePropertyName("param"u8); writer.WriteStringValue(Param); } - if (Optional.IsDefined(EventId)) + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) { writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); @@ -54,6 +60,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -101,11 +111,6 @@ internal static InternalRealtimeResponseError DeserializeInternalRealtimeRespons } if (prop.NameEquals("code"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - code = null; - continue; - } code = prop.Value.GetString(); continue; } @@ -116,21 +121,11 @@ internal static InternalRealtimeResponseError DeserializeInternalRealtimeRespons } if (prop.NameEquals("param"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - @param = null; - continue; - } @param = prop.Value.GetString(); continue; } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs index 307f7028a..b2f3a6e39 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseError(string @type, string message) { @@ -36,5 +36,11 @@ internal InternalRealtimeResponseError(string @type, string code, string message public string Param { get; } public string EventId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index a9f77fc66..91989276e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -32,13 +32,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } writer.WriteStringValue(Arguments); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index bb1403811..ca3ea922d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseFunctionCallOutputItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) + { + writer.WritePropertyName("call_id"u8); + } writer.WriteStringValue(CallId); - writer.WritePropertyName("output"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output") != true) + { + writer.WritePropertyName("output"u8); + } writer.WriteStringValue(Output); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs index 6b0422664..a12a611ed 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseIncompleteStatusDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) + { + writer.WritePropertyName("reason"u8); + } writer.WriteStringValue(Reason.ToString()); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index 902b4fddb..34c89f965 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -31,23 +31,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponseItem)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - if (Id != null) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("type"u8); } - else + writer.WriteStringValue(Type.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { - writer.WriteNull("id"u8); + if (Id != null) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + else + { + writer.WriteNull("id"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs index 8fb95fe63..e39ba76c5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeResponseItem { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeResponseItem(InternalRealtimeRequestItemType @type, string id) { @@ -30,5 +30,11 @@ internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object internal InternalRealtimeRequestItemType Type { get; set; } public string Id { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index ff98066cb..139e3f6b7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -42,9 +42,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("role"u8); + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) + { + writer.WritePropertyName("role"u8); + } writer.WriteStringValue(Role.ToString()); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index a427345aa..3069f02b9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -31,39 +31,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponseSession)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - writer.WritePropertyName("modalities"u8); + if (_additionalBinaryDataProperties?.ContainsKey("modalities") != true) + { + writer.WritePropertyName("modalities"u8); + } writer.WriteStartArray(); foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) { writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); - writer.WritePropertyName("instructions"u8); + if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) + { + writer.WritePropertyName("instructions"u8); + } writer.WriteStringValue(Instructions); - writer.WritePropertyName("voice"u8); + if (_additionalBinaryDataProperties?.ContainsKey("voice") != true) + { + writer.WritePropertyName("voice"u8); + } writer.WriteStringValue(Voice.ToString()); - writer.WritePropertyName("input_audio_format"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input_audio_format") != true) + { + writer.WritePropertyName("input_audio_format"u8); + } writer.WriteStringValue(InputAudioFormat.ToString()); - writer.WritePropertyName("output_audio_format"u8); + if (_additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) + { + writer.WritePropertyName("output_audio_format"u8); + } writer.WriteStringValue(OutputAudioFormat.ToString()); - if (InputAudioTranscription != null) + if (_additionalBinaryDataProperties?.ContainsKey("input_audio_transcription") != true) { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputAudioTranscription, options); + if (InputAudioTranscription != null) + { + writer.WritePropertyName("input_audio_transcription"u8); + writer.WriteObjectValue(InputAudioTranscription, options); + } + else + { + writer.WriteNull("inputAudioTranscription"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("turn_detection") != true) { - writer.WriteNull("inputAudioTranscription"u8); + writer.WritePropertyName("turn_detection"u8); } - writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetection, options); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -73,7 +103,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("tool_choice"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) + { + writer.WritePropertyName("tool_choice"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(ToolChoice); #else @@ -82,28 +115,38 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("temperature"u8); + if (_additionalBinaryDataProperties?.ContainsKey("temperature") != true) + { + writer.WritePropertyName("temperature"u8); + } writer.WriteNumberValue(Temperature); - if (_maxResponseOutputTokens != null) + if (_additionalBinaryDataProperties?.ContainsKey("max_response_output_tokens") != true) { - writer.WritePropertyName("max_response_output_tokens"u8); + if (_maxResponseOutputTokens != null) + { + writer.WritePropertyName("max_response_output_tokens"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(_maxResponseOutputTokens); + writer.WriteRawValue(_maxResponseOutputTokens); #else - using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) + using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + else { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WriteNull("maxResponseOutputTokens"u8); } -#endif - } - else - { - writer.WriteNull("maxResponseOutputTokens"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -235,6 +278,11 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo } if (prop.NameEquals("max_response_output_tokens"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + maxResponseOutputTokens = null; + continue; + } maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index 91acac7a5..03e30b33f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -11,7 +11,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseSession { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) { @@ -74,5 +74,11 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ public BinaryData ToolChoice { get; } public float Temperature { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs index 7c3725c0f..b1e2def0c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeResponseStatusDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs index 2b09db4d3..704b8c49a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeResponseStatusDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeResponseStatusDetails(ConversationStatus @type) { @@ -23,5 +23,11 @@ internal InternalRealtimeResponseStatusDetails(ConversationStatus @type, IDictio } internal ConversationStatus Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 2d548ed1f..0a3c4eb2f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index 73285b46f..6154c5456 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -28,17 +28,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerVadTurnDetection)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Threshold)) + if (Optional.IsDefined(Threshold) && _additionalBinaryDataProperties?.ContainsKey("threshold") != true) { writer.WritePropertyName("threshold"u8); writer.WriteNumberValue(Threshold.Value); } - if (Optional.IsDefined(PrefixPaddingMs)) + if (Optional.IsDefined(PrefixPaddingMs) && _additionalBinaryDataProperties?.ContainsKey("prefix_padding_ms") != true) { writer.WritePropertyName("prefix_padding_ms"u8); this.SerializePrefixPaddingMs(writer, options); } - if (Optional.IsDefined(SilenceDurationMs)) + if (Optional.IsDefined(SilenceDurationMs) && _additionalBinaryDataProperties?.ContainsKey("silence_duration_ms") != true) { writer.WritePropertyName("silence_duration_ms"u8); this.SerializeSilenceDurationMs(writer, options); @@ -75,7 +75,6 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti { if (prop.Value.ValueKind == JsonValueKind.Null) { - threshold = null; continue; } threshold = prop.Value.GetSingle(); @@ -83,21 +82,11 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti } if (prop.NameEquals("prefix_padding_ms"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - prefixPaddingMs = null; - continue; - } DeserializeMillisecondDuration(prop, ref prefixPaddingMs); continue; } if (prop.NameEquals("silence_duration_ms"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - silenceDurationMs = null; - continue; - } DeserializeMillisecondDuration(prop, ref silenceDurationMs); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index 5dcefd4c0..30b404bb3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(Function, options); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs index b1babb920..4ec9942e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceFunctionObjectFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs index 4770e6b4f..c10d15fb6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeToolChoiceFunctionObjectFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalRealtimeToolChoiceFunctionObjectFunction(string name) { @@ -26,5 +26,11 @@ internal InternalRealtimeToolChoiceFunctionObjectFunction(string name, IDictiona } public string Name { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index 89a9c27f4..163e58aef 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRealtimeToolChoiceObject)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs index c7ed7380d..d97cd6a75 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal abstract partial class InternalRealtimeToolChoiceObject { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRealtimeToolChoiceObject(ConversationToolKind @type) { @@ -23,5 +23,11 @@ internal InternalRealtimeToolChoiceObject(ConversationToolKind @type, IDictionar } internal ConversationToolKind Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index a69267188..292a107df 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -25,9 +25,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRequestMessageTextContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(InternalText); } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index 834a81d97..ece9a70f5 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRequiredFunctionToolCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteObjectValue(_type, options); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(_internalFunction, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs index 0e6c0b5f4..6df47de6d 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRequiredFunctionToolCall { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRequiredFunctionToolCall(string id, InternalRunToolCallObjectFunction internalFunction) { @@ -26,5 +26,11 @@ internal InternalRequiredFunctionToolCall(string id, object @type, InternalRunTo } public string Id { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index a7c23b0aa..2aa8e4689 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchema)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("json_schema"u8); + if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) + { + writer.WritePropertyName("json_schema"u8); + } writer.WriteObjectValue(JsonSchema, options); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 1238f484d..23cb48fe9 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -31,14 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalResponseFormatJsonSchemaJsonSchema)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(Description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - if (Optional.IsDefined(Strict)) + if (Optional.IsDefined(Strict) && _additionalBinaryDataProperties?.ContainsKey("strict") != true) { if (Strict != null) { @@ -50,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("strict"u8); } } - if (Optional.IsDefined(Schema)) + if (Optional.IsDefined(Schema) && _additionalBinaryDataProperties?.ContainsKey("schema") != true) { writer.WritePropertyName("schema"u8); #if NET6_0_OR_GREATER @@ -66,6 +69,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -107,11 +114,6 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe { if (prop.NameEquals("description"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } description = prop.Value.GetString(); continue; } @@ -134,7 +136,6 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe { if (prop.Value.ValueKind == JsonValueKind.Null) { - schema = null; continue; } schema = BinaryData.FromString(prop.Value.GetRawText()); diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs index bacc180dd..8fe22b88a 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.cs @@ -10,7 +10,7 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaJsonSchema { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalResponseFormatJsonSchemaJsonSchema(string name) { @@ -33,5 +33,11 @@ internal InternalResponseFormatJsonSchemaJsonSchema(string description, string n public string Name { get; set; } public bool? Strict { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs index 11d698dbd..bd7575c36 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.cs @@ -10,7 +10,7 @@ namespace OpenAI.Internal { internal partial class InternalResponseFormatJsonSchemaSchema { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalResponseFormatJsonSchemaSchema() { @@ -23,5 +23,11 @@ internal InternalResponseFormatJsonSchemaSchema(IDictionary } public IDictionary AdditionalProperties => _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 63808cfea..413c84ac7 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -25,9 +25,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalResponseMessageTextContent)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_type); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteObjectValue(_text, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 4515d2e2c..43ac40dad 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs index 844e52dff..ea44705be 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunObjectRequiredActionSubmitToolOutputs { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunObjectRequiredActionSubmitToolOutputs() { @@ -24,5 +24,11 @@ internal InternalRunObjectRequiredActionSubmitToolOutputs(IReadOnlyList ToolCalls { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index 5946a2f05..5278d30f4 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunRequiredAction)} does not support writing '{format}' format."); } - writer.WritePropertyName("submit_tool_outputs"u8); + if (_additionalBinaryDataProperties?.ContainsKey("submit_tool_outputs") != true) + { + writer.WritePropertyName("submit_tool_outputs"u8); + } writer.WriteObjectValue(SubmitToolOutputs, options); - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteObjectValue(Type, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs index 615825df4..ea41c0060 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunRequiredAction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutputs submitToolOutputs) { @@ -24,5 +24,11 @@ internal InternalRunRequiredAction(InternalRunObjectRequiredActionSubmitToolOutp } public InternalRunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 03cebc1e0..56e4521d8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterLogOutput)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("logs"u8); + if (_additionalBinaryDataProperties?.ContainsKey("logs") != true) + { + writer.WritePropertyName("logs"u8); + } writer.WriteStringValue(InternalLogs); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index 782715bcc..9c21672c0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepCodeInterpreterToolCallDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("code_interpreter"u8); + if (_additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) + { + writer.WritePropertyName("code_interpreter"u8); + } writer.WriteObjectValue(_codeInterpreter, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index f1a2ffb1b..79866720a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDelta)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("delta"u8); + if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) + { + writer.WritePropertyName("delta"u8); + } writer.WriteObjectValue(Delta, options); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs index 955dcad22..2734d84a0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDelta { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta) { @@ -28,5 +28,11 @@ internal InternalRunStepDelta(string id, InternalRunStepDeltaObjectDelta delta, public string Id { get; } public InternalRunStepDeltaObjectDelta Delta { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs index e3c4a935c..f5d10194d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaObjectDelta)} does not support writing '{format}' format."); } - if (Optional.IsDefined(StepDetails)) + if (Optional.IsDefined(StepDetails) && _additionalBinaryDataProperties?.ContainsKey("step_details") != true) { writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(StepDetails, options); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -76,7 +80,6 @@ internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaO { if (prop.Value.ValueKind == JsonValueKind.Null) { - stepDetails = null; continue; } stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs index 43dd420de..127abc57c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaObjectDelta { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaObjectDelta() { @@ -22,5 +22,11 @@ internal InternalRunStepDeltaObjectDelta(InternalRunStepDeltaStepDetails stepDet } public InternalRunStepDeltaStepDetails StepDetails { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index 36d3a0305..e1b3e51e4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs index c655d3c9d..b1e8bee11 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRunStepDeltaStepDetails(string @type) { @@ -23,5 +23,11 @@ internal InternalRunStepDeltaStepDetails(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 035bfe948..44b0f7825 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -28,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageCreation)) + if (Optional.IsDefined(MessageCreation) && _additionalBinaryDataProperties?.ContainsKey("message_creation") != true) { writer.WritePropertyName("message_creation"u8); writer.WriteObjectValue(MessageCreation, options); @@ -63,7 +63,6 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - messageCreation = null; continue; } messageCreation = InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index bc2dd8fc7..d235cfc6c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation)} does not support writing '{format}' format."); } - if (Optional.IsDefined(MessageId)) + if (Optional.IsDefined(MessageId) && _additionalBinaryDataProperties?.ContainsKey("message_id") != true) { writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -74,11 +78,6 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreat { if (prop.NameEquals("message_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - messageId = null; - continue; - } messageId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs index 80cb7393c..116867802 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation() { @@ -22,5 +22,11 @@ internal InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(str } public string MessageId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 1d0f4da52..39bedfc51 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -32,14 +32,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); @@ -79,11 +82,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } @@ -91,7 +89,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 61a532f8e..2e7e04adc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Input)) + if (Optional.IsDefined(Input) && _additionalBinaryDataProperties?.ContainsKey("input") != true) { writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (options.Format != "W" && Optional.IsCollectionDefined(Outputs)) + if (options.Format != "W" && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -85,11 +89,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterprete { if (prop.NameEquals("input"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - input = null; - continue; - } input = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs index 016e62125..46ffaab59 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter() { @@ -27,5 +27,11 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(strin public string Input { get; } public IReadOnlyList Outputs { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 9c6229523..f27fd4f82 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Image)) + if (Optional.IsDefined(Image) && _additionalBinaryDataProperties?.ContainsKey("image") != true) { writer.WritePropertyName("image"u8); writer.WriteObjectValue(Image, options); @@ -75,7 +78,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De { if (prop.Value.ValueKind == JsonValueKind.Null) { - image = null; continue; } image = InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 76bbfe8c3..63f9968cf 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FileId)) + if (Optional.IsDefined(FileId) && _additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -74,11 +78,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectIma { if (prop.NameEquals("file_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - fileId = null; - continue; - } fileId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs index 7f77ff14d..19daf4e7e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage() { @@ -22,5 +22,11 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(stri } public string FileId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 337eb9a54..52aa552cf 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -32,9 +32,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(InternalLogs)) + if (Optional.IsDefined(InternalLogs) && _additionalBinaryDataProperties?.ContainsKey("logs") != true) { writer.WritePropertyName("logs"u8); writer.WriteStringValue(InternalLogs); @@ -73,11 +76,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des } if (prop.NameEquals("logs"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - internalLogs = null; - continue; - } internalLogs = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index e6b6d3b40..4aa71868b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -32,14 +32,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - writer.WritePropertyName("file_search"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_search") != true) + { + writer.WritePropertyName("file_search"u8); + } writer.WriteStartObject(); foreach (var item in FileSearch) { @@ -94,11 +100,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 2c0be24e1..31078b51b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -32,14 +32,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (Optional.IsDefined(Function)) + if (Optional.IsDefined(Function) && _additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); @@ -79,11 +82,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } @@ -91,7 +89,6 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali { if (prop.Value.ValueKind == JsonValueKind.Null) { - function = null; continue; } function = InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index b5bc37826..1ff71db96 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -27,17 +27,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Arguments)) + if (Optional.IsDefined(Arguments) && _additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (Optional.IsDefined(Output)) + if (Optional.IsDefined(Output) && _additionalBinaryDataProperties?.ContainsKey("output") != true) { if (Output != null) { @@ -53,6 +53,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -93,21 +97,11 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction D { if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } name = prop.Value.GetString(); continue; } if (prop.NameEquals("arguments"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - arguments = null; - continue; - } arguments = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs index 30954445a..d60c9a6cc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction() { @@ -28,5 +28,11 @@ internal InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(string n public string Arguments { get; } public string Output { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index 5f7ff0bdd..64133f565 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -28,7 +28,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsCollectionDefined(ToolCalls)) + if (Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index 5fcbbae0d..dfdd7a6e0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs index 074b4dcd5..ac05b64a0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal abstract partial class InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @type) { @@ -23,5 +23,11 @@ internal InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject(string @t } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index b4b67dcc8..f967ce828 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("message_creation"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message_creation") != true) + { + writer.WritePropertyName("message_creation"u8); + } writer.WriteObjectValue(_messageCreation, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index d10eadcde..87f0a867b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsMessageCreationObjectMessageCreation)} does not support writing '{format}' format."); } - writer.WritePropertyName("message_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message_id") != true) + { + writer.WritePropertyName("message_id"u8); + } writer.WriteStringValue(MessageId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs index 9b1c27ea2..ecfcc7ded 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsMessageCreationObjectMessageCreation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messageId) { @@ -23,5 +23,11 @@ internal InternalRunStepDetailsMessageCreationObjectMessageCreation(string messa } public string MessageId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 44001fd4c..e4fd8c801 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -31,9 +31,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter)} does not support writing '{format}' format."); } - writer.WritePropertyName("input"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input") != true) + { + writer.WritePropertyName("input"u8); + } writer.WriteStringValue(Input); - if (options.Format != "W") + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -47,6 +50,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs index e6a3a57b9..4c6e6bd96 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input) { @@ -28,5 +28,11 @@ internal InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(string input, public string Input { get; } public IReadOnlyList Outputs { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 9c8589287..f6240b01c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("image"u8); + if (_additionalBinaryDataProperties?.ContainsKey("image") != true) + { + writer.WritePropertyName("image"u8); + } writer.WriteObjectValue(_image, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 95a33121b..481f0d9b9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs index 55870a066..e5a704b18 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsCodeOutputImageObjectImage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId) { @@ -23,5 +23,11 @@ internal InternalRunStepDetailsToolCallsCodeOutputImageObjectImage(string fileId } public string FileId { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index b12d91619..a593d5fb2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Results)) + if (options.Format != "W" && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(RankingOptions)) + if (Optional.IsDefined(RankingOptions) && _additionalBinaryDataProperties?.ContainsKey("ranking_options") != true) { writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -101,7 +105,6 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri { if (prop.Value.ValueKind == JsonValueKind.Null) { - rankingOptions = null; continue; } rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs index 8708e9258..2052d81a0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchObjectFileSearch { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch() { @@ -25,5 +25,11 @@ internal InternalRunStepDetailsToolCallsFileSearchObjectFileSearch(IReadOnlyList } public IReadOnlyList Results { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index 1d9a83ad9..c23224ae2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject)} does not support writing '{format}' format."); } - writer.WritePropertyName("ranker"u8); + if (_additionalBinaryDataProperties?.ContainsKey("ranker") != true) + { + writer.WritePropertyName("ranker"u8); + } writer.WriteStringValue(Ranker.ToString()); - writer.WritePropertyName("score_threshold"u8); + if (_additionalBinaryDataProperties?.ContainsKey("score_threshold") != true) + { + writer.WritePropertyName("score_threshold"u8); + } writer.WriteNumberValue(ScoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs index ad0985c19..e0e24642a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(float scoreThreshold) { @@ -26,5 +26,11 @@ internal InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject(InternalR public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker Ranker { get; } = "default_2024_08_21"; public float ScoreThreshold { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs index 0ebe75286..e6b9d5cc6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchResultObjectContent)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Type)) + if (Optional.IsDefined(Type) && _additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.Value.ToString()); } - if (Optional.IsDefined(Text)) + if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent Des { if (prop.Value.ValueKind == JsonValueKind.Null) { - @type = null; continue; } @type = new InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(prop.Value.GetString()); @@ -90,11 +93,6 @@ internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent Des } if (prop.NameEquals("text"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - text = null; - continue; - } text = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs index 51981588d..157418a1d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFileSearchResultObjectContent { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent() { @@ -25,5 +25,11 @@ internal InternalRunStepDetailsToolCallsFileSearchResultObjectContent(InternalRu public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType? Type { get; } public string Text { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 64f2801f5..5b38b81c6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -31,23 +31,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFunctionObjectFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - if (Output != null) + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); + writer.WritePropertyName("arguments"u8); } - else + writer.WriteStringValue(Arguments); + if (_additionalBinaryDataProperties?.ContainsKey("output") != true) { - writer.WriteNull("output"u8); + if (Output != null) + { + writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); + } + else + { + writer.WriteNull("output"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs index 479da6dba..74a5a26dc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunStepDetailsToolCallsFunctionObjectFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, string arguments, string output) { @@ -31,5 +31,11 @@ internal InternalRunStepDetailsToolCallsFunctionObjectFunction(string name, stri public string Arguments { get; } public string Output { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index b071a45a5..cbcc0b83b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsObject)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("tool_calls"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + { + writer.WritePropertyName("tool_calls"u8); + } writer.WriteStartArray(); foreach (RunStepToolCall item in InternalToolCalls) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index 7ffb3d166..010641e0d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepFileSearchToolCallDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("file_search"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_search") != true) + { + writer.WritePropertyName("file_search"u8); + } writer.WriteObjectValue(FileSearch, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index e72e3d5e3..fd8cb89d8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -32,9 +32,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRunStepFunctionToolCallDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("function"u8); + if (_additionalBinaryDataProperties?.ContainsKey("function") != true) + { + writer.WritePropertyName("function"u8); + } writer.WriteObjectValue(_internalFunction, options); } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index f7ef21041..5a2c4df21 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunToolCallObjectFunction)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); + if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) + { + writer.WritePropertyName("arguments"u8); + } writer.WriteStringValue(Arguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs index 1c172ce06..10f58a1ff 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalRunToolCallObjectFunction { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalRunToolCallObjectFunction(string name, string arguments) { @@ -27,5 +27,11 @@ internal InternalRunToolCallObjectFunction(string name, string arguments, IDicti public string Name { get; } public string Arguments { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index 06dd37435..e9996485b 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("max_chunk_size_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("max_chunk_size_tokens") != true) + { + writer.WritePropertyName("max_chunk_size_tokens"u8); + } writer.WriteNumberValue(MaxChunkSizeTokens); - writer.WritePropertyName("chunk_overlap_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("chunk_overlap_tokens") != true) + { + writer.WritePropertyName("chunk_overlap_tokens"u8); + } writer.WriteNumberValue(ChunkOverlapTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs index 81f34aaed..3a88a1f8c 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalStaticChunkingStrategyDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunkOverlapTokens) { @@ -27,5 +27,11 @@ internal InternalStaticChunkingStrategyDetails(int maxChunkSizeTokens, int chunk public int MaxChunkSizeTokens { get; set; } public int ChunkOverlapTokens { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 6abed9b2a..5e69f0f9c 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalStaticChunkingStrategyRequestParam)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("static"u8); + if (_additionalBinaryDataProperties?.ContainsKey("static") != true) + { + writer.WritePropertyName("static"u8); + } writer.WriteObjectValue(Static, options); } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index 80b07a77f..1c87ff414 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -31,14 +31,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalSubmitToolOutputsRunRequest)} does not support writing '{format}' format."); } - writer.WritePropertyName("tool_outputs"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tool_outputs") != true) + { + writer.WritePropertyName("tool_outputs"u8); + } writer.WriteStartArray(); foreach (ToolOutput item in ToolOutputs) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) { @@ -54,6 +57,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs index a7a6a3969..d009edf76 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { internal partial class InternalSubmitToolOutputsRunRequest { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalSubmitToolOutputsRunRequest(IEnumerable toolOutputs) { @@ -30,5 +30,11 @@ internal InternalSubmitToolOutputsRunRequest(IList toolOutputs, bool public IList ToolOutputs { get; } public bool? Stream { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs index bd5345183..526df83ef 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalThreadObjectToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static InternalThreadObjectToolResources DeserializeInternalThreadObjec { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = InternalThreadObjectToolResourcesCodeInterpreter.DeserializeInternalThreadObjectToolResourcesCodeInterpreter(prop.Value, options); @@ -92,7 +95,6 @@ internal static InternalThreadObjectToolResources DeserializeInternalThreadObjec { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs index c64a9e8d3..b7e4c296f 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResources() { @@ -25,5 +25,11 @@ internal InternalThreadObjectToolResources(InternalThreadObjectToolResourcesCode public InternalThreadObjectToolResourcesCodeInterpreter CodeInterpreter { get; } public InternalThreadObjectToolResourcesFileSearch FileSearch { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index cd91747ac..fbb8a6839 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesCodeInterpreter)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs index 27ae205d7..d83af6916 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesCodeInterpreter { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResourcesCodeInterpreter() { @@ -24,5 +24,11 @@ internal InternalThreadObjectToolResourcesCodeInterpreter(IList fileIds, } public IList FileIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index ccca06fe8..726486ce5 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalThreadObjectToolResourcesFileSearch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds) && _additionalBinaryDataProperties?.ContainsKey("vector_store_ids") != true) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs index 0e79ee103..6bcad4a1f 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalThreadObjectToolResourcesFileSearch { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalThreadObjectToolResourcesFileSearch() { @@ -24,5 +24,11 @@ internal InternalThreadObjectToolResourcesFileSearch(IList vectorStoreId } public IList VectorStoreIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index 36e560ba7..fec86d1ef 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalToolResourcesFileSearchIdsOnly)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(VectorStoreIds)) + if (Optional.IsCollectionDefined(VectorStoreIds) && _additionalBinaryDataProperties?.ContainsKey("vector_store_ids") != true) { writer.WritePropertyName("vector_store_ids"u8); writer.WriteStartArray(); @@ -46,6 +46,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs index e0c76f629..fe7066d59 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { internal partial class InternalToolResourcesFileSearchIdsOnly { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public InternalToolResourcesFileSearchIdsOnly() { @@ -24,5 +24,11 @@ internal InternalToolResourcesFileSearchIdsOnly(IList vectorStoreIds, ID } public IList VectorStoreIds { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index d03c3f01f..460fafe17 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -57,11 +57,6 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index e0885529d..8dfd5bd47 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -31,26 +31,47 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalUpload)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("filename"u8); + if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) + { + writer.WritePropertyName("filename"u8); + } writer.WriteStringValue(Filename); - writer.WritePropertyName("bytes"u8); + if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) + { + writer.WritePropertyName("bytes"u8); + } writer.WriteNumberValue(Bytes); - writer.WritePropertyName("purpose"u8); + if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) + { + writer.WritePropertyName("purpose"u8); + } writer.WriteStringValue(Purpose); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("expires_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("expires_at") != true) + { + writer.WritePropertyName("expires_at"u8); + } writer.WriteNumberValue(ExpiresAt, "U"); - if (Optional.IsDefined(Object)) + if (Optional.IsDefined(Object) && _additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.Value.ToString()); } - if (Optional.IsDefined(File)) + if (Optional.IsDefined(File) && _additionalBinaryDataProperties?.ContainsKey("file") != true) { if (File != null) { @@ -66,6 +87,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -149,7 +174,6 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo { if (prop.Value.ValueKind == JsonValueKind.Null) { - @object = null; continue; } @object = new InternalUploadObject(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/InternalUpload.cs b/.dotnet/src/Generated/Models/InternalUpload.cs index 283844566..43d97a848 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { internal partial class InternalUpload { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalUpload(string id, DateTimeOffset createdAt, string filename, int bytes, string purpose, InternalUploadStatus status, DateTimeOffset expiresAt) { @@ -53,5 +53,11 @@ internal InternalUpload(string id, DateTimeOffset createdAt, string filename, in public InternalUploadObject? Object { get; } public OpenAIFile File { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index bc578f043..1e4cfbf1e 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -31,18 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalUploadPart)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("upload_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("upload_id") != true) + { + writer.WritePropertyName("upload_id"u8); + } writer.WriteStringValue(UploadId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.cs b/.dotnet/src/Generated/Models/InternalUploadPart.cs index 8d84b81ff..691aa0696 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { internal partial class InternalUploadPart { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId) { @@ -34,5 +34,11 @@ internal InternalUploadPart(string id, DateTimeOffset createdAt, string uploadId public string UploadId { get; } public InternalUploadPartObject Object { get; } = "upload.part"; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index b51ebc35d..07e317bd6 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -31,20 +31,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalVectorStoreFileBatchObjectFileCounts)} does not support writing '{format}' format."); } - writer.WritePropertyName("in_progress"u8); + if (_additionalBinaryDataProperties?.ContainsKey("in_progress") != true) + { + writer.WritePropertyName("in_progress"u8); + } writer.WriteNumberValue(InProgress); - writer.WritePropertyName("completed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) + { + writer.WritePropertyName("completed"u8); + } writer.WriteNumberValue(Completed); - writer.WritePropertyName("failed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) + { + writer.WritePropertyName("failed"u8); + } writer.WriteNumberValue(Failed); - writer.WritePropertyName("cancelled"u8); + if (_additionalBinaryDataProperties?.ContainsKey("cancelled") != true) + { + writer.WritePropertyName("cancelled"u8); + } writer.WriteNumberValue(Cancelled); - writer.WritePropertyName("total"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total") != true) + { + writer.WritePropertyName("total"u8); + } writer.WriteNumberValue(Total); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs index 754fb02f0..691e6b467 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { internal partial class InternalVectorStoreFileBatchObjectFileCounts { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { @@ -39,5 +39,11 @@ internal InternalVectorStoreFileBatchObjectFileCounts(int inProgress, int comple public int Cancelled { get; } public int Total { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index 6c37c4898..a71c86182 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { - public partial class MessageContent : IJsonModel + public abstract partial class MessageContent : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -23,6 +23,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageContent.cs b/.dotnet/src/Generated/Models/MessageContent.cs index d71e51fe4..28ad462fb 100644 --- a/.dotnet/src/Generated/Models/MessageContent.cs +++ b/.dotnet/src/Generated/Models/MessageContent.cs @@ -7,13 +7,19 @@ namespace OpenAI.Assistants { - public partial class MessageContent + public abstract partial class MessageContent { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal MessageContent(IDictionary additionalBinaryDataProperties) { _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index c62c71189..b696666ea 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageCreationAttachment)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); - writer.WritePropertyName("tools"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) + { + writer.WritePropertyName("tools"u8); + } this.SerializeTools(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 9674d0070..863d04199 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { public partial class MessageCreationAttachment { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public MessageCreationAttachment(string fileId, IEnumerable tools) { @@ -30,5 +30,11 @@ internal MessageCreationAttachment(string fileId, IReadOnlyList } public string FileId { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index e8ab2b7f0..1c24250ab 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageCreationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Attachments)) + if (Optional.IsCollectionDefined(Attachments) && _additionalBinaryDataProperties?.ContainsKey("attachments") != true) { if (Attachments != null) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("attachments"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -67,14 +67,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - writer.WritePropertyName("role"u8); + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) + { + writer.WritePropertyName("role"u8); + } writer.WriteStringValue(Role.ToSerialString()); - writer.WritePropertyName("content"u8); + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + { + writer.WritePropertyName("content"u8); + } this.SerializeContent(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.cs index bfbd6d976..b1399e854 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageCreationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal MessageCreationOptions(IList attachments, IDictionary metadata, Assistants.MessageRole role, IList content, IDictionary additionalBinaryDataProperties) { @@ -23,5 +23,11 @@ internal MessageCreationOptions(IList attachments, ID public IList Attachments { get; set; } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index b72b1a6d4..3ada2384c 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(MessageId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.cs index 3fa9b3306..e2cf6d328 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal MessageDeletionResult(bool deleted, string messageId) { @@ -26,5 +26,11 @@ internal MessageDeletionResult(bool deleted, string messageId, InternalDeleteMes } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index a09a69023..442fa7fb4 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageFailureDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("reason"u8); + if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) + { + writer.WritePropertyName("reason"u8); + } writer.WriteStringValue(Reason.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.cs index bd35e5026..97711d979 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class MessageFailureDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal MessageFailureDetails(MessageFailureReason reason) { @@ -23,5 +23,11 @@ internal MessageFailureDetails(MessageFailureReason reason, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs index bbfbefa67..52d40f1e3 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -54,6 +54,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.cs index e67af552a..3818571f7 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class MessageModificationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public MessageModificationOptions() { @@ -24,5 +24,11 @@ internal MessageModificationOptions(IDictionary metadata, IDicti } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 94f6f1cb2..8f837ea10 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModelDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(ModelId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.cs index 993701847..4949c007d 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Models { public partial class ModelDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ModelDeletionResult(bool deleted, string modelId) { @@ -26,5 +26,11 @@ internal ModelDeletionResult(bool deleted, string modelId, InternalDeleteModelRe } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 91397d1cc..71ec03cad 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -27,7 +27,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModerationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("input"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input") != true) + { + writer.WritePropertyName("input"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(Input); #else @@ -36,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, document.RootElement); } #endif - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); @@ -45,6 +48,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -91,7 +98,6 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme { if (prop.Value.ValueKind == JsonValueKind.Null) { - model = null; continue; } model = new InternalCreateModerationRequestModel(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/ModerationOptions.cs b/.dotnet/src/Generated/Models/ModerationOptions.cs index 3ed243bc6..9aeee81f9 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { internal partial class ModerationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ModerationOptions(BinaryData input, InternalCreateModerationRequestModel? model, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal ModerationOptions(BinaryData input, InternalCreateModerationRequestMode Model = model; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index d19ee24ab..4eeed6ae6 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -19,12 +19,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModerationResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("flagged"u8); + if (_additionalBinaryDataProperties?.ContainsKey("flagged") != true) + { + writer.WritePropertyName("flagged"u8); + } writer.WriteBooleanValue(Flagged); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ModerationResult.cs b/.dotnet/src/Generated/Models/ModerationResult.cs index 04f61a08d..090d8a0b9 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Moderations { public partial class ModerationResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ModerationResult(bool flagged) { @@ -23,5 +23,11 @@ internal ModerationResult(bool flagged, IDictionary addition } public bool Flagged { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index c786806f1..ccc316c90 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -19,14 +19,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ModerationResultCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.cs index 8d8bc08cf..db1da9699 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.cs @@ -9,10 +9,16 @@ namespace OpenAI.Moderations { public partial class ModerationResultCollection { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public string Id { get; } public string Model { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 4a8aada5f..0b22ed165 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -31,9 +31,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIEmbedding)} does not support writing '{format}' format."); } - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - writer.WritePropertyName("embedding"u8); + if (_additionalBinaryDataProperties?.ContainsKey("embedding") != true) + { + writer.WritePropertyName("embedding"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(EmbeddingProperty); #else @@ -42,12 +48,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, document.RootElement); } #endif - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs index b68295dd6..415eae6a6 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.cs @@ -9,8 +9,14 @@ namespace OpenAI.Embeddings { public partial class OpenAIEmbedding { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public int Index { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index fbdbceb75..0c745121b 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -19,16 +19,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIEmbeddingCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - writer.WritePropertyName("usage"u8); + if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) + { + writer.WritePropertyName("usage"u8); + } writer.WriteObjectValue(Usage, options); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs index d71165d98..d0e49a974 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.cs @@ -9,10 +9,16 @@ namespace OpenAI.Embeddings { public partial class OpenAIEmbeddingCollection { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public string Model { get; } public EmbeddingTokenUsage Usage { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index ced4a1d5f..ca142c0e9 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -31,32 +31,48 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIError)} does not support writing '{format}' format."); } - if (Code != null) + if (_additionalBinaryDataProperties?.ContainsKey("code") != true) { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); + if (Code != null) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + else + { + writer.WriteNull("code"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { - writer.WriteNull("code"u8); + writer.WritePropertyName("message"u8); } - writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); - if (Param != null) + if (_additionalBinaryDataProperties?.ContainsKey("param") != true) { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); + if (Param != null) + { + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); + } + else + { + writer.WriteNull("param"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { - writer.WriteNull("param"u8); + writer.WritePropertyName("type"u8); } - writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIError.cs b/.dotnet/src/Generated/Models/OpenAIError.cs index 36af08c43..ac7c03ed9 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal partial class OpenAIError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal OpenAIError(string code, string message, string @param, string @type) { @@ -35,5 +35,11 @@ internal OpenAIError(string code, string message, string @param, string @type, I public string Param { get; } public string Type { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index e9bd286b6..089c32557 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIErrorResponse)} does not support writing '{format}' format."); } - writer.WritePropertyName("error"u8); + if (_additionalBinaryDataProperties?.ContainsKey("error") != true) + { + writer.WritePropertyName("error"u8); + } writer.WriteObjectValue(Error, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs index 86c130f2c..46308908b 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.cs @@ -9,7 +9,7 @@ namespace OpenAI.Internal { internal partial class OpenAIErrorResponse { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal OpenAIErrorResponse(OpenAIError error) { @@ -23,5 +23,11 @@ internal OpenAIErrorResponse(OpenAIError error, IDictionary } public OpenAIError Error { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index f2a82e4c0..c07d42910 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -31,28 +31,49 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIFile)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("filename"u8); + if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) + { + writer.WritePropertyName("filename"u8); + } writer.WriteStringValue(Filename); - writer.WritePropertyName("purpose"u8); + if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) + { + writer.WritePropertyName("purpose"u8); + } writer.WriteStringValue(Purpose.ToSerialString()); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); - if (SizeInBytes != null) + if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(SizeInBytes.Value); + if (SizeInBytes != null) + { + writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(SizeInBytes.Value); + } + else + { + writer.WriteNull("bytes"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { - writer.WriteNull("bytes"u8); + writer.WritePropertyName("status"u8); } - writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToSerialString()); - if (Optional.IsDefined(StatusDetails)) + if (Optional.IsDefined(StatusDetails) && _additionalBinaryDataProperties?.ContainsKey("status_details") != true) { writer.WritePropertyName("status_details"u8); writer.WriteStringValue(StatusDetails); @@ -61,6 +82,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -146,11 +171,6 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade } if (prop.NameEquals("status_details"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - statusDetails = null; - continue; - } statusDetails = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.cs b/.dotnet/src/Generated/Models/OpenAIFile.cs index 21f9fc296..aad4ac9f8 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.cs @@ -9,7 +9,7 @@ namespace OpenAI.Files { public partial class OpenAIFile { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files.FilePurpose purpose, int? sizeInBytes, Files.FileStatus status) { @@ -41,5 +41,11 @@ internal OpenAIFile(string id, DateTimeOffset createdAt, string filename, Files. public string Filename { get; } public Files.FilePurpose Purpose { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index c5039ddaf..300939931 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -19,12 +19,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIFileCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs index d014647c1..7ba8ee002 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.cs @@ -9,6 +9,12 @@ namespace OpenAI.Files { public partial class OpenAIFileCollection { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index 248f5759b..e4e093e7c 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -31,18 +31,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIModel)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("owned_by"u8); + if (_additionalBinaryDataProperties?.ContainsKey("owned_by") != true) + { + writer.WritePropertyName("owned_by"u8); + } writer.WriteStringValue(OwnedBy); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIModel.cs b/.dotnet/src/Generated/Models/OpenAIModel.cs index 5f2e1fce3..f531dd90f 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.cs @@ -9,7 +9,7 @@ namespace OpenAI.Models { public partial class OpenAIModel { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal OpenAIModel(string id, string ownedBy, DateTimeOffset createdAt) { @@ -30,5 +30,11 @@ internal OpenAIModel(string id, string ownedBy, InternalModelObject @object, Dat public string Id { get; } public string OwnedBy { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index d0154fbdf..0254709b1 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -19,12 +19,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(OpenAIModelCollection)} does not support writing '{format}' format."); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs index 47f366250..d655f1ee6 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.cs @@ -9,12 +9,12 @@ namespace OpenAI.Models { public partial class OpenAIModelCollection { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; - internal OpenAIModelCollection(InternalListModelsResponseObject @object, IDictionary additionalBinaryDataProperties) + internal IDictionary SerializedAdditionalRawData { - this.Object = @object; - _additionalBinaryDataProperties = additionalBinaryDataProperties; + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; } } } diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs index 4c1adc531..b55b412ea 100644 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("error"u8); + if (_additionalBinaryDataProperties?.ContainsKey("error") != true) + { + writer.WritePropertyName("error"u8); + } #if NET6_0_OR_GREATER writer.WriteRawValue(Error); #else diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index d22a7e3c8..1072ff5e8 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -27,9 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunCreationOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("assistant_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) + { + writer.WritePropertyName("assistant_id"u8); + } writer.WriteStringValue(AssistantId); - if (Optional.IsDefined(Stream)) + if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) { @@ -41,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) { @@ -53,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("responseFormat"u8); } } - if (Optional.IsDefined(ModelOverride)) + if (Optional.IsDefined(ModelOverride) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { if (ModelOverride != null) { @@ -65,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("model"u8); } } - if (Optional.IsDefined(InstructionsOverride)) + if (Optional.IsDefined(InstructionsOverride) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { if (InstructionsOverride != null) { @@ -77,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (Optional.IsDefined(AdditionalInstructions)) + if (Optional.IsDefined(AdditionalInstructions) && _additionalBinaryDataProperties?.ContainsKey("additional_instructions") != true) { if (AdditionalInstructions != null) { @@ -89,7 +92,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalInstructions"u8); } } - if (Optional.IsCollectionDefined(AdditionalMessages)) + if (Optional.IsCollectionDefined(AdditionalMessages) && _additionalBinaryDataProperties?.ContainsKey("additional_messages") != true) { if (AdditionalMessages != null) { @@ -106,12 +109,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalMessages"u8); } } - if (Optional.IsDefined(AllowParallelToolCalls)) + if (Optional.IsDefined(AllowParallelToolCalls) && _additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { writer.WritePropertyName("parallel_tool_calls"u8); writer.WriteBooleanValue(AllowParallelToolCalls.Value); } - if (Optional.IsCollectionDefined(ToolsOverride)) + if (Optional.IsCollectionDefined(ToolsOverride) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { if (ToolsOverride != null) { @@ -128,7 +131,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("tools"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -151,7 +154,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -163,7 +166,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (NucleusSamplingFactor != null) { @@ -175,7 +178,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (Optional.IsDefined(MaxInputTokenCount)) + if (Optional.IsDefined(MaxInputTokenCount) && _additionalBinaryDataProperties?.ContainsKey("max_prompt_tokens") != true) { if (MaxInputTokenCount != null) { @@ -187,7 +190,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxPromptTokens"u8); } } - if (Optional.IsDefined(MaxOutputTokenCount)) + if (Optional.IsDefined(MaxOutputTokenCount) && _additionalBinaryDataProperties?.ContainsKey("max_completion_tokens") != true) { if (MaxOutputTokenCount != null) { @@ -199,7 +202,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxCompletionTokens"u8); } } - if (Optional.IsDefined(TruncationStrategy)) + if (Optional.IsDefined(TruncationStrategy) && _additionalBinaryDataProperties?.ContainsKey("truncation_strategy") != true) { if (TruncationStrategy != null) { @@ -211,7 +214,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("truncationStrategy"u8); } } - if (Optional.IsDefined(ToolConstraint)) + if (Optional.IsDefined(ToolConstraint) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { if (ToolConstraint != null) { @@ -227,6 +230,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -351,7 +358,6 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele { if (prop.Value.ValueKind == JsonValueKind.Null) { - allowParallelToolCalls = null; continue; } allowParallelToolCalls = prop.Value.GetBoolean(); diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index 0ec491f60..e1a0bc5d2 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunCreationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList additionalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { @@ -31,5 +31,11 @@ internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseF ToolConstraint = toolConstraint; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index a6bd6342f..bb7d26050 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunError)} does not support writing '{format}' format."); } - writer.WritePropertyName("code"u8); + if (_additionalBinaryDataProperties?.ContainsKey("code") != true) + { + writer.WritePropertyName("code"u8); + } writer.WriteStringValue(Code.ToString()); - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunError.cs b/.dotnet/src/Generated/Models/RunError.cs index 6d3ecadb1..f769954e0 100644 --- a/.dotnet/src/Generated/Models/RunError.cs +++ b/.dotnet/src/Generated/Models/RunError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunError(RunErrorCode code, string message) { @@ -27,5 +27,11 @@ internal RunError(RunErrorCode code, string message, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs index 2db25a483..82cfb30ce 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunIncompleteDetails)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Reason)) + if (Optional.IsDefined(Reason) && _additionalBinaryDataProperties?.ContainsKey("reason") != true) { writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.Value.ToString()); @@ -36,6 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -76,7 +80,6 @@ internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement { if (prop.Value.ValueKind == JsonValueKind.Null) { - reason = null; continue; } reason = new RunIncompleteReason(prop.Value.GetString()); diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs index fc3fc8fbd..cd853f37a 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunIncompleteDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunIncompleteDetails() { @@ -22,5 +22,11 @@ internal RunIncompleteDetails(RunIncompleteReason? reason, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs index 2648a5a22..eac829122 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -54,6 +54,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.cs b/.dotnet/src/Generated/Models/RunModificationOptions.cs index 9e4835521..4295bfb3f 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class RunModificationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public RunModificationOptions() { @@ -24,5 +24,11 @@ internal RunModificationOptions(IDictionary metadata, IDictionar } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index e92cae5bf..fb5c794b0 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -31,102 +31,154 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStep)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (LastError != null) + if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); + writer.WritePropertyName("assistant_id"u8); } - else + writer.WriteStringValue(AssistantId); + if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { - writer.WriteNull("lastError"u8); + writer.WritePropertyName("thread_id"u8); } - if (ExpiredAt != null) + writer.WriteStringValue(ThreadId); + if (_additionalBinaryDataProperties?.ContainsKey("run_id") != true) { - writer.WritePropertyName("expired_at"u8); - writer.WriteNumberValue(ExpiredAt.Value, "U"); + writer.WritePropertyName("run_id"u8); } - else + writer.WriteStringValue(RunId); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { - writer.WriteNull("expiredAt"u8); + writer.WritePropertyName("type"u8); } - if (CancelledAt != null) + writer.WriteStringValue(Type.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); + writer.WritePropertyName("status"u8); } - else + writer.WriteStringValue(Status.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { - writer.WriteNull("cancelledAt"u8); + if (LastError != null) + { + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); + } + else + { + writer.WriteNull("lastError"u8); + } } - if (FailedAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("expired_at") != true) { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); + if (ExpiredAt != null) + { + writer.WritePropertyName("expired_at"u8); + writer.WriteNumberValue(ExpiredAt.Value, "U"); + } + else + { + writer.WriteNull("expiredAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("cancelled_at") != true) { - writer.WriteNull("failedAt"u8); + if (CancelledAt != null) + { + writer.WritePropertyName("cancelled_at"u8); + writer.WriteNumberValue(CancelledAt.Value, "U"); + } + else + { + writer.WriteNull("cancelledAt"u8); + } } - if (CompletedAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("failed_at") != true) { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); + if (FailedAt != null) + { + writer.WritePropertyName("failed_at"u8); + writer.WriteNumberValue(FailedAt.Value, "U"); + } + else + { + writer.WriteNull("failedAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("completed_at") != true) { - writer.WriteNull("completedAt"u8); + if (CompletedAt != null) + { + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); + } + else + { + writer.WriteNull("completedAt"u8); + } } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) { - writer.WriteNull("metadata"u8); + if (Usage != null) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } + else + { + writer.WriteNull("usage"u8); + } } - if (Usage != null) + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); + writer.WritePropertyName("object"u8); } - else + writer.WriteStringValue(this.Object.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("step_details") != true) { - writer.WriteNull("usage"u8); + writer.WritePropertyName("step_details"u8); } - writer.WritePropertyName("object"u8); - writer.WriteStringValue(this.Object.ToString()); - writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(Details, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index bc7cc1c51..de5d3dd58 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStep { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, RunStepDetails details) { @@ -78,5 +78,11 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string public IDictionary Metadata { get; } public RunStepTokenUsage Usage { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 817f54871..472106b00 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepCodeInterpreterOutput)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs index a53dec4c7..742f4c6f3 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepCodeInterpreterOutput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected RunStepCodeInterpreterOutput(string @type) { @@ -23,5 +23,11 @@ internal RunStepCodeInterpreterOutput(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index ad2445caf..aca57b8cb 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepDetails.cs b/.dotnet/src/Generated/Models/RunStepDetails.cs index 83bde91bf..fef8ce678 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepDetails { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected RunStepDetails(string @type) { @@ -23,5 +23,11 @@ internal RunStepDetails(string @type, IDictionary additional } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index 8b7210ef4..71bb8601b 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepError)} does not support writing '{format}' format."); } - writer.WritePropertyName("code"u8); + if (_additionalBinaryDataProperties?.ContainsKey("code") != true) + { + writer.WritePropertyName("code"u8); + } writer.WriteStringValue(Code.ToString()); - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepError.cs b/.dotnet/src/Generated/Models/RunStepError.cs index 30d7a39a8..bcc513242 100644 --- a/.dotnet/src/Generated/Models/RunStepError.cs +++ b/.dotnet/src/Generated/Models/RunStepError.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStepError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunStepError(RunStepErrorCode code, string message) { @@ -27,5 +27,11 @@ internal RunStepError(RunStepErrorCode code, string message, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index 375efa1ef..9ec2e38aa 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -31,13 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepFileSearchResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("file_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + } writer.WriteStringValue(FileId); - writer.WritePropertyName("file_name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_name") != true) + { + writer.WritePropertyName("file_name"u8); + } writer.WriteStringValue(FileName); - writer.WritePropertyName("score"u8); + if (_additionalBinaryDataProperties?.ContainsKey("score") != true) + { + writer.WritePropertyName("score"u8); + } writer.WriteNumberValue(Score); - if (Optional.IsCollectionDefined(Content)) + if (Optional.IsCollectionDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -51,6 +60,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs index 2e3150adb..1df4b9a18 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class RunStepFileSearchResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunStepFileSearchResult(string fileId, string fileName, float score) { @@ -34,5 +34,11 @@ internal RunStepFileSearchResult(string fileId, string fileName, float score, IR public string FileName { get; } public float Score { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index 04644ffff..de6f767a4 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("completion_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) + { + writer.WritePropertyName("completion_tokens"u8); + } writer.WriteNumberValue(OutputTokenCount); - writer.WritePropertyName("prompt_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) + { + writer.WritePropertyName("prompt_tokens"u8); + } writer.WriteNumberValue(InputTokenCount); - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs index 30f2ceb5b..64ae6e1b6 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunStepTokenUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { @@ -25,5 +25,11 @@ internal RunStepTokenUsage(int outputTokenCount, int inputTokenCount, int totalT TotalTokenCount = totalTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index 1238416f7..ec9b88ec7 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepToolCall)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.cs b/.dotnet/src/Generated/Models/RunStepToolCall.cs index 12e01ad4c..6bc3c48f7 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepToolCall { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected RunStepToolCall(string @type) { @@ -23,5 +23,11 @@ internal RunStepToolCall(string @type, IDictionary additiona } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 5a62e5bad..9d83190aa 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -31,12 +31,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunStepUpdateCodeInterpreterOutput)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs index 75491360a..a70737784 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class RunStepUpdateCodeInterpreterOutput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; private protected RunStepUpdateCodeInterpreterOutput(string @type) { @@ -23,5 +23,11 @@ internal RunStepUpdateCodeInterpreterOutput(string @type, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index 471207955..bb05b90e1 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunTokenUsage)} does not support writing '{format}' format."); } - writer.WritePropertyName("completion_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) + { + writer.WritePropertyName("completion_tokens"u8); + } writer.WriteNumberValue(OutputTokenCount); - writer.WritePropertyName("prompt_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) + { + writer.WritePropertyName("prompt_tokens"u8); + } writer.WriteNumberValue(InputTokenCount); - writer.WritePropertyName("total_tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) + { + writer.WritePropertyName("total_tokens"u8); + } writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.cs b/.dotnet/src/Generated/Models/RunTokenUsage.cs index f1ec3615d..134f4a50f 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunTokenUsage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount) { @@ -25,5 +25,11 @@ internal RunTokenUsage(int outputTokenCount, int inputTokenCount, int totalToken TotalTokenCount = totalTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 268496b9c..e12c7f58b 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -31,7 +31,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(RunTruncationStrategy)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LastMessages)) + if (Optional.IsDefined(LastMessages) && _additionalBinaryDataProperties?.ContainsKey("last_messages") != true) { if (LastMessages != null) { @@ -43,12 +43,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("lastMessages"u8); } } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs index cf49d7012..39d09cb7a 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class RunTruncationStrategy { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal RunTruncationStrategy(int? lastMessages, InternalTruncationObjectType @type, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal RunTruncationStrategy(int? lastMessages, InternalTruncationObjectType @ _type = @type; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index 0b4ec4667..e55323d71 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -27,18 +27,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(SpeechGenerationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ResponseFormat)) + if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { writer.WritePropertyName("response_format"u8); writer.WriteStringValue(ResponseFormat.Value.ToString()); } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model.ToString()); - writer.WritePropertyName("input"u8); + if (_additionalBinaryDataProperties?.ContainsKey("input") != true) + { + writer.WritePropertyName("input"u8); + } writer.WriteStringValue(Input); - writer.WritePropertyName("voice"u8); + if (_additionalBinaryDataProperties?.ContainsKey("voice") != true) + { + writer.WritePropertyName("voice"u8); + } writer.WriteStringValue(Voice.ToString()); - if (Optional.IsDefined(SpeedRatio)) + if (Optional.IsDefined(SpeedRatio) && _additionalBinaryDataProperties?.ContainsKey("speed") != true) { writer.WritePropertyName("speed"u8); writer.WriteNumberValue(SpeedRatio.Value); @@ -47,6 +56,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -91,7 +104,6 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE { if (prop.Value.ValueKind == JsonValueKind.Null) { - responseFormat = null; continue; } responseFormat = new GeneratedSpeechFormat(prop.Value.GetString()); @@ -116,7 +128,6 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE { if (prop.Value.ValueKind == JsonValueKind.Null) { - speedRatio = null; continue; } speedRatio = prop.Value.GetSingle(); diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs index ccf0b1c63..e48d5cf02 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public partial class SpeechGenerationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat, InternalCreateSpeechRequestModel model, string input, GeneratedSpeechVoice voice, float? speedRatio, IDictionary additionalBinaryDataProperties) { @@ -22,5 +22,11 @@ internal SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat, Internal } public GeneratedSpeechFormat? ResponseFormat { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index cdacb800b..f7650c716 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(StaticFileChunkingStrategy)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("static"u8); + if (_additionalBinaryDataProperties?.ContainsKey("static") != true) + { + writer.WritePropertyName("static"u8); + } writer.WriteObjectValue(_internalDetails, options); } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 8ba7f69af..8fe0a8d7b 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -31,18 +31,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(StreamingChatCompletionUpdate)} does not support writing '{format}' format."); } - writer.WritePropertyName("model"u8); + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) + { + writer.WritePropertyName("model"u8); + } writer.WriteStringValue(Model); - if (Optional.IsDefined(SystemFingerprint)) + if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); writer.WriteStringValue(SystemFingerprint); } - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(CompletionId); - if (Optional.IsDefined(ServiceTier)) + if (Optional.IsDefined(ServiceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (ServiceTier != null) { @@ -54,16 +63,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("serviceTier"u8); } } - writer.WritePropertyName("choices"u8); + if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) + { + writer.WritePropertyName("choices"u8); + } writer.WriteStartArray(); foreach (InternalCreateChatCompletionStreamResponseChoice item in Choices) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("created"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created") != true) + { + writer.WritePropertyName("created"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - if (Optional.IsDefined(Usage)) + if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); @@ -72,6 +87,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -122,11 +141,6 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion } if (prop.NameEquals("system_fingerprint"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - systemFingerprint = null; - continue; - } systemFingerprint = prop.Value.GetString(); continue; } @@ -169,7 +183,6 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion { if (prop.Value.ValueKind == JsonValueKind.Null) { - usage = null; continue; } usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs index 1dc156105..1271eb74d 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.cs @@ -10,7 +10,7 @@ namespace OpenAI.Chat { public partial class StreamingChatCompletionUpdate { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal StreamingChatCompletionUpdate(string model, string completionId, IEnumerable choices, DateTimeOffset createdAt) { @@ -36,5 +36,11 @@ internal StreamingChatCompletionUpdate(string model, string systemFingerprint, I public string Model { get; } public string SystemFingerprint { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 45b5180a6..9e08755ad 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(StreamingChatFunctionCallUpdate)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FunctionName)) + if (Optional.IsDefined(FunctionName) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(FunctionName); } - if (Optional.IsDefined(FunctionArgumentsUpdate)) + if (Optional.IsDefined(FunctionArgumentsUpdate) && _additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsUpdateValue(writer, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction { if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionName = null; - continue; - } functionName = prop.Value.GetString(); continue; } if (prop.NameEquals("arguments"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - functionArgumentsUpdate = null; - continue; - } DeserializeFunctionArgumentsUpdateValue(prop, ref functionArgumentsUpdate); continue; } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs index 1f7de1602..b8cb58764 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class StreamingChatFunctionCallUpdate { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal StreamingChatFunctionCallUpdate() { @@ -21,5 +21,11 @@ internal StreamingChatFunctionCallUpdate(string functionName, BinaryData functio FunctionArgumentsUpdate = functionArgumentsUpdate; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index bdc7ec0de..2284537c6 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -31,16 +31,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(StreamingChatToolCallUpdate)} does not support writing '{format}' format."); } - writer.WritePropertyName("index"u8); + if (_additionalBinaryDataProperties?.ContainsKey("index") != true) + { + writer.WritePropertyName("index"u8); + } writer.WriteNumberValue(Index); - if (Optional.IsDefined(Function)) + if (Optional.IsDefined(Function) && _additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Kind.ToSerialString()); - if (Optional.IsDefined(ToolCallId)) + if (Optional.IsDefined(ToolCallId) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(ToolCallId); @@ -49,6 +55,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -97,7 +107,6 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda { if (prop.Value.ValueKind == JsonValueKind.Null) { - function = null; continue; } function = InternalChatCompletionMessageToolCallChunkFunction.DeserializeInternalChatCompletionMessageToolCallChunkFunction(prop.Value, options); @@ -107,7 +116,6 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda { if (prop.Value.ValueKind == JsonValueKind.Null) { - kind = null; continue; } kind = prop.Value.GetString().ToChatToolCallKind(); @@ -115,11 +123,6 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolCallId = null; - continue; - } toolCallId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs index 9fa918935..299399632 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class StreamingChatToolCallUpdate { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal StreamingChatToolCallUpdate(int index, InternalChatCompletionMessageToolCallChunkFunction function, Chat.ChatToolCallKind kind, string toolCallId, IDictionary additionalBinaryDataProperties) { @@ -21,5 +21,11 @@ internal StreamingChatToolCallUpdate(int index, InternalChatCompletionMessageToo } public int Index { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index a37034801..c46f20ddc 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -21,7 +21,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SystemChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ParticipantName)) + if (Optional.IsDefined(ParticipantName) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(ParticipantName); @@ -55,11 +55,6 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme { if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - participantName = null; - continue; - } participantName = prop.Value.GetString(); continue; } @@ -70,11 +65,6 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index de5236b59..7e53b83ee 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadCreationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (Optional.IsCollectionDefined(InternalMessages)) + if (Optional.IsCollectionDefined(InternalMessages) && _additionalBinaryDataProperties?.ContainsKey("messages") != true) { writer.WritePropertyName("messages"u8); writer.WriteStartArray(); @@ -76,6 +76,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs index 7a1df5a90..7675b5648 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadCreationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ThreadCreationOptions() { @@ -27,5 +27,11 @@ internal ThreadCreationOptions(IDictionary metadata, ToolResourc } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index 87eee937f..ecc7f18be 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(ThreadId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs index f51902de9..209c7f80a 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ThreadDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ThreadDeletionResult(bool deleted, string threadId) { @@ -26,5 +26,11 @@ internal ThreadDeletionResult(bool deleted, string threadId, InternalDeleteThrea } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index c5216d06a..db8c54d10 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -31,108 +31,154 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadMessage)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (IncompleteDetails != null) + if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); + writer.WritePropertyName("thread_id"u8); } - else + writer.WriteStringValue(ThreadId); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { - writer.WriteNull("incompleteDetails"u8); + writer.WritePropertyName("status"u8); } - if (CompletedAt != null) + writer.WriteStringValue(Status.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("incomplete_details") != true) { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); + if (IncompleteDetails != null) + { + writer.WritePropertyName("incomplete_details"u8); + writer.WriteObjectValue(IncompleteDetails, options); + } + else + { + writer.WriteNull("incompleteDetails"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("completed_at") != true) { - writer.WriteNull("completedAt"u8); + if (CompletedAt != null) + { + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); + } + else + { + writer.WriteNull("completedAt"u8); + } } - if (IncompleteAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("incomplete_at") != true) { - writer.WritePropertyName("incomplete_at"u8); - writer.WriteNumberValue(IncompleteAt.Value, "U"); + if (IncompleteAt != null) + { + writer.WritePropertyName("incomplete_at"u8); + writer.WriteNumberValue(IncompleteAt.Value, "U"); + } + else + { + writer.WriteNull("incompleteAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { - writer.WriteNull("incompleteAt"u8); + writer.WritePropertyName("content"u8); } - writer.WritePropertyName("content"u8); writer.WriteStartArray(); foreach (MessageContent item in Content) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (AssistantId != null) + if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - } - else - { - writer.WriteNull("assistantId"u8); - } - if (RunId != null) - { - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); + if (AssistantId != null) + { + writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); + } + else + { + writer.WriteNull("assistantId"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("run_id") != true) { - writer.WriteNull("runId"u8); + if (RunId != null) + { + writer.WritePropertyName("run_id"u8); + writer.WriteStringValue(RunId); + } + else + { + writer.WriteNull("runId"u8); + } } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WriteNull("metadata"u8); + writer.WritePropertyName("object"u8); } - writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); - writer.WritePropertyName("role"u8); + if (_additionalBinaryDataProperties?.ContainsKey("role") != true) + { + writer.WritePropertyName("role"u8); + } writer.WriteStringValue(Role.ToSerialString()); - if (Attachments != null && Optional.IsCollectionDefined(Attachments)) + if (_additionalBinaryDataProperties?.ContainsKey("attachments") != true) { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (MessageCreationAttachment item in Attachments) + if (Attachments != null && Optional.IsCollectionDefined(Attachments)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachments"u8); + writer.WriteStartArray(); + foreach (MessageCreationAttachment item in Attachments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("attachments"u8); } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"u8); } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -296,6 +342,11 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode } if (prop.NameEquals("attachments"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + attachments = new ChangeTrackingList(); + continue; + } List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 69164afa5..68028a435 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadMessage { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, Assistants.MessageRole role, IEnumerable attachments) { @@ -69,5 +69,11 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes public string RunId { get; } public IDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index 17fb6d78f..7e3ca0999 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(ToolResources)) + if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) { @@ -66,6 +66,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs index 419986124..261bcaf15 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadModificationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ThreadModificationOptions() { @@ -25,5 +25,11 @@ internal ThreadModificationOptions(IDictionary metadata, ToolRes } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index af9540297..79d8719f3 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -31,120 +31,171 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ThreadRun)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (LastError != null) + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); + writer.WritePropertyName("id"u8); } - else + writer.WriteStringValue(Id); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { - writer.WriteNull("lastError"u8); + writer.WritePropertyName("created_at"u8); } - if (ExpiresAt != null) + writer.WriteNumberValue(CreatedAt, "U"); + if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt.Value, "U"); + writer.WritePropertyName("thread_id"u8); } - else + writer.WriteStringValue(ThreadId); + if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { - writer.WriteNull("expiresAt"u8); + writer.WritePropertyName("assistant_id"u8); } - if (StartedAt != null) + writer.WriteStringValue(AssistantId); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { - writer.WritePropertyName("started_at"u8); - writer.WriteNumberValue(StartedAt.Value, "U"); + writer.WritePropertyName("status"u8); } - else + writer.WriteStringValue(Status.ToString()); + if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { - writer.WriteNull("startedAt"u8); + if (LastError != null) + { + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); + } + else + { + writer.WriteNull("lastError"u8); + } } - if (CancelledAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("expires_at") != true) { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); + if (ExpiresAt != null) + { + writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt.Value, "U"); + } + else + { + writer.WriteNull("expiresAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("started_at") != true) { - writer.WriteNull("cancelledAt"u8); + if (StartedAt != null) + { + writer.WritePropertyName("started_at"u8); + writer.WriteNumberValue(StartedAt.Value, "U"); + } + else + { + writer.WriteNull("startedAt"u8); + } } - if (FailedAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("cancelled_at") != true) { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); + if (CancelledAt != null) + { + writer.WritePropertyName("cancelled_at"u8); + writer.WriteNumberValue(CancelledAt.Value, "U"); + } + else + { + writer.WriteNull("cancelledAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("failed_at") != true) { - writer.WriteNull("failedAt"u8); + if (FailedAt != null) + { + writer.WritePropertyName("failed_at"u8); + writer.WriteNumberValue(FailedAt.Value, "U"); + } + else + { + writer.WriteNull("failedAt"u8); + } } - if (CompletedAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("completed_at") != true) { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); + if (CompletedAt != null) + { + writer.WritePropertyName("completed_at"u8); + writer.WriteNumberValue(CompletedAt.Value, "U"); + } + else + { + writer.WriteNull("completedAt"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("incomplete_details") != true) { - writer.WriteNull("completedAt"u8); + if (IncompleteDetails != null) + { + writer.WritePropertyName("incomplete_details"u8); + writer.WriteObjectValue(IncompleteDetails, options); + } + else + { + writer.WriteNull("incompleteDetails"u8); + } } - if (IncompleteDetails != null) + if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); + writer.WritePropertyName("model"u8); } - else + writer.WriteStringValue(Model); + if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) { - writer.WriteNull("incompleteDetails"u8); + writer.WritePropertyName("instructions"u8); } - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); - writer.WritePropertyName("tools"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) + { + writer.WritePropertyName("tools"u8); + } writer.WriteStartArray(); foreach (ToolDefinition item in Tools) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"u8); - } - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); } - else + if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) { - writer.WriteNull("usage"u8); + if (Usage != null) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } + else + { + writer.WriteNull("usage"u8); + } } - if (Optional.IsDefined(Temperature)) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { if (Temperature != null) { @@ -156,36 +207,48 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("temperature"u8); } } - if (TruncationStrategy != null) + if (_additionalBinaryDataProperties?.ContainsKey("truncation_strategy") != true) { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); + if (TruncationStrategy != null) + { + writer.WritePropertyName("truncation_strategy"u8); + writer.WriteObjectValue(TruncationStrategy, options); + } + else + { + writer.WriteNull("truncationStrategy"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WriteNull("truncationStrategy"u8); + writer.WritePropertyName("object"u8); } - writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); - if (ResponseFormat != null) + if (_additionalBinaryDataProperties?.ContainsKey("response_format") != true) { - writer.WritePropertyName("response_format"u8); - writer.WriteObjectValue(ResponseFormat, options); - } - else - { - writer.WriteNull("responseFormat"u8); - } - if (ToolConstraint != null) - { - writer.WritePropertyName("tool_choice"u8); - writer.WriteObjectValue(ToolConstraint, options); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteObjectValue(ResponseFormat, options); + } + else + { + writer.WriteNull("responseFormat"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { - writer.WriteNull("toolChoice"u8); + if (ToolConstraint != null) + { + writer.WritePropertyName("tool_choice"u8); + writer.WriteObjectValue(ToolConstraint, options); + } + else + { + writer.WriteNull("toolChoice"u8); + } } - if (Optional.IsDefined(NucleusSamplingFactor)) + if (Optional.IsDefined(NucleusSamplingFactor) && _additionalBinaryDataProperties?.ContainsKey("top_p") != true) { if (NucleusSamplingFactor != null) { @@ -197,39 +260,55 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(AllowParallelToolCalls.Value); - if (MaxInputTokenCount != null) + if (_additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxInputTokenCount.Value); + writer.WritePropertyName("parallel_tool_calls"u8); } - else - { - writer.WriteNull("maxPromptTokens"u8); - } - if (MaxOutputTokenCount != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxOutputTokenCount.Value); - } - else + writer.WriteBooleanValue(AllowParallelToolCalls.Value); + if (_additionalBinaryDataProperties?.ContainsKey("max_prompt_tokens") != true) { - writer.WriteNull("maxCompletionTokens"u8); + if (MaxInputTokenCount != null) + { + writer.WritePropertyName("max_prompt_tokens"u8); + writer.WriteNumberValue(MaxInputTokenCount.Value); + } + else + { + writer.WriteNull("maxPromptTokens"u8); + } } - if (_internalRequiredAction != null) + if (_additionalBinaryDataProperties?.ContainsKey("max_completion_tokens") != true) { - writer.WritePropertyName("required_action"u8); - writer.WriteObjectValue(_internalRequiredAction, options); + if (MaxOutputTokenCount != null) + { + writer.WritePropertyName("max_completion_tokens"u8); + writer.WriteNumberValue(MaxOutputTokenCount.Value); + } + else + { + writer.WriteNull("maxCompletionTokens"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("required_action") != true) { - writer.WriteNull("requiredAction"u8); + if (_internalRequiredAction != null) + { + writer.WritePropertyName("required_action"u8); + writer.WriteObjectValue(_internalRequiredAction, options); + } + else + { + writer.WriteNull("requiredAction"u8); + } } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -466,11 +545,21 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (prop.NameEquals("response_format"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + responseFormat = null; + continue; + } responseFormat = AssistantResponseFormat.DeserializeAssistantResponseFormat(prop.Value, options); continue; } if (prop.NameEquals("tool_choice"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + toolConstraint = null; + continue; + } toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } @@ -486,11 +575,6 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (prop.NameEquals("parallel_tool_calls"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - allowParallelToolCalls = null; - continue; - } allowParallelToolCalls = prop.Value.GetBoolean(); continue; } @@ -516,6 +600,11 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (prop.NameEquals("required_action"u8)) { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + internalRequiredAction = null; + continue; + } internalRequiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 20f94c305..8424a72ed 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -10,7 +10,7 @@ namespace OpenAI.Assistants { public partial class ThreadRun { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) { @@ -109,5 +109,11 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string public float? Temperature { get; } public RunTruncationStrategy TruncationStrategy { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 94a63fab5..139486ee9 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -25,7 +25,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ToolChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("tool_call_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tool_call_id") != true) + { + writer.WritePropertyName("tool_call_id"u8); + } writer.WriteStringValue(ToolCallId); } @@ -66,11 +69,6 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 2c638f5bb..88428777e 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -23,17 +23,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolConstraint)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Function)) + if (Optional.IsDefined(Function) && _additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(_objectType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ToolConstraint.cs b/.dotnet/src/Generated/Models/ToolConstraint.cs index 65410129f..56d7f7543 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolConstraint { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ToolConstraint(InternalAssistantsNamedToolChoiceFunction function, string objectType, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal ToolConstraint(InternalAssistantsNamedToolChoiceFunction function, stri _objectType = objectType; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 7edf19e74..32f812238 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -24,12 +24,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolDefinition)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + } writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/ToolDefinition.cs b/.dotnet/src/Generated/Models/ToolDefinition.cs index 4b3a0df9c..a257dfa11 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public abstract partial class ToolDefinition { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ToolDefinition(string @type, IDictionary additionalBinaryDataProperties) { @@ -18,5 +18,11 @@ internal ToolDefinition(string @type, IDictionary additional } internal string Type { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs index 28e1f084d..e9bc1ee68 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolOutput)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ToolCallId)) + if (Optional.IsDefined(ToolCallId) && _additionalBinaryDataProperties?.ContainsKey("tool_call_id") != true) { writer.WritePropertyName("tool_call_id"u8); writer.WriteStringValue(ToolCallId); } - if (Optional.IsDefined(Output)) + if (Optional.IsDefined(Output) && _additionalBinaryDataProperties?.ContainsKey("output") != true) { writer.WritePropertyName("output"u8); writer.WriteStringValue(Output); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -80,21 +84,11 @@ internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReade { if (prop.NameEquals("tool_call_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - toolCallId = null; - continue; - } toolCallId = prop.Value.GetString(); continue; } if (prop.NameEquals("output"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - output = null; - continue; - } output = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/ToolOutput.cs b/.dotnet/src/Generated/Models/ToolOutput.cs index 5121e3553..bcee7b40e 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolOutput { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public ToolOutput() { @@ -25,5 +25,11 @@ internal ToolOutput(string toolCallId, string output, IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 2b7958481..225754a84 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -27,12 +27,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ToolResources)} does not support writing '{format}' format."); } - if (Optional.IsDefined(CodeInterpreter)) + if (Optional.IsDefined(CodeInterpreter) && _additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); writer.WriteObjectValue(CodeInterpreter, options); } - if (Optional.IsDefined(FileSearch)) + if (Optional.IsDefined(FileSearch) && _additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); this.SerializeFileSearch(writer, options); @@ -41,6 +41,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -82,7 +86,6 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode { if (prop.Value.ValueKind == JsonValueKind.Null) { - codeInterpreter = null; continue; } codeInterpreter = CodeInterpreterToolResources.DeserializeCodeInterpreterToolResources(prop.Value, options); @@ -92,7 +95,6 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode { if (prop.Value.ValueKind == JsonValueKind.Null) { - fileSearch = null; continue; } fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/ToolResources.cs b/.dotnet/src/Generated/Models/ToolResources.cs index 30280a58e..5a2c85c10 100644 --- a/.dotnet/src/Generated/Models/ToolResources.cs +++ b/.dotnet/src/Generated/Models/ToolResources.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class ToolResources { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal ToolResources(CodeInterpreterToolResources codeInterpreter, FileSearchToolResources fileSearch, IDictionary additionalBinaryDataProperties) { @@ -17,5 +17,11 @@ internal ToolResources(CodeInterpreterToolResources codeInterpreter, FileSearchT FileSearch = fileSearch; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index 2cce9ee54..b5294d59d 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -31,35 +31,69 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions { throw new FormatException($"The model {nameof(TranscribedSegment)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteNumberValue(Id); - writer.WritePropertyName("text"u8); + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) + { + writer.WritePropertyName("text"u8); + } writer.WriteStringValue(Text); - writer.WritePropertyName("temperature"u8); + if (_additionalBinaryDataProperties?.ContainsKey("temperature") != true) + { + writer.WritePropertyName("temperature"u8); + } writer.WriteNumberValue(Temperature); - writer.WritePropertyName("compression_ratio"u8); + if (_additionalBinaryDataProperties?.ContainsKey("compression_ratio") != true) + { + writer.WritePropertyName("compression_ratio"u8); + } writer.WriteNumberValue(CompressionRatio); - writer.WritePropertyName("start"u8); + if (_additionalBinaryDataProperties?.ContainsKey("start") != true) + { + writer.WritePropertyName("start"u8); + } writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); - writer.WritePropertyName("end"u8); + if (_additionalBinaryDataProperties?.ContainsKey("end") != true) + { + writer.WritePropertyName("end"u8); + } writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); - writer.WritePropertyName("seek"u8); + if (_additionalBinaryDataProperties?.ContainsKey("seek") != true) + { + writer.WritePropertyName("seek"u8); + } writer.WriteNumberValue(SeekOffset); - writer.WritePropertyName("tokens"u8); + if (_additionalBinaryDataProperties?.ContainsKey("tokens") != true) + { + writer.WritePropertyName("tokens"u8); + } writer.WriteStartArray(); foreach (int item in TokenIds.Span) { writer.WriteNumberValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("avg_logprob"u8); + if (_additionalBinaryDataProperties?.ContainsKey("avg_logprob") != true) + { + writer.WritePropertyName("avg_logprob"u8); + } writer.WriteNumberValue(AverageLogProbability); - writer.WritePropertyName("no_speech_prob"u8); + if (_additionalBinaryDataProperties?.ContainsKey("no_speech_prob") != true) + { + writer.WritePropertyName("no_speech_prob"u8); + } writer.WriteNumberValue(NoSpeechProbability); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -146,12 +180,14 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele { continue; } - List array = new List(); + int index = 0; + int[] array = new int[prop.Value.GetArrayLength()]; foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetInt32()); + array[index] = item.GetInt32(); + index++; } - tokenIds = array; + tokenIds = new ReadOnlyMemory(array); continue; } if (prop.NameEquals("avg_logprob"u8)) diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index cf6566c82..9f55737ab 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedSegment { - private readonly IDictionary _additionalBinaryDataProperties; + private IDictionary _additionalBinaryDataProperties; internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, ReadOnlyMemory tokenIds, float averageLogProbability, float noSpeechProbability) { @@ -47,5 +47,11 @@ internal TranscribedSegment(int id, string text, float temperature, float compre public float Temperature { get; } public float CompressionRatio { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index 86797724c..fb16160a1 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -31,16 +31,29 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions { throw new FormatException($"The model {nameof(TranscribedWord)} does not support writing '{format}' format."); } - writer.WritePropertyName("word"u8); + if (_additionalBinaryDataProperties?.ContainsKey("word") != true) + { + writer.WritePropertyName("word"u8); + } writer.WriteStringValue(Word); - writer.WritePropertyName("start"u8); + if (_additionalBinaryDataProperties?.ContainsKey("start") != true) + { + writer.WritePropertyName("start"u8); + } writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); - writer.WritePropertyName("end"u8); + if (_additionalBinaryDataProperties?.ContainsKey("end") != true) + { + writer.WritePropertyName("end"u8); + } writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index 94ea4ea8c..577427faf 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedWord { - private readonly IDictionary _additionalBinaryDataProperties; + private IDictionary _additionalBinaryDataProperties; internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime) { @@ -27,5 +27,11 @@ internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime, IDic } public string Word { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs index 449c9e251..9bd1ad5ae 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs @@ -64,11 +64,6 @@ internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestC } if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index 37a2b7911..4684df45e 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -64,11 +64,6 @@ internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index aab739953..fb6976c6a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -69,7 +69,6 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ { if (prop.Value.ValueKind == JsonValueKind.Null) { - status = null; continue; } status = new ConversationItemStatus(prop.Value.GetString()); @@ -82,11 +81,6 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ } if (prop.NameEquals("id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } id = prop.Value.GetString(); continue; } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 3f383025d..265f92c1d 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -21,7 +21,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(UserChatMessage)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ParticipantName)) + if (Optional.IsDefined(ParticipantName) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(ParticipantName); @@ -55,11 +55,6 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, { if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - participantName = null; - continue; - } participantName = prop.Value.GetString(); continue; } @@ -70,11 +65,6 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, } if (prop.NameEquals("content"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } DeserializeContentValue(prop, ref content); continue; } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 799465cac..1256267b7 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -31,19 +31,37 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStore)} does not support writing '{format}' format."); } - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(Id); - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("name"u8); + if (_additionalBinaryDataProperties?.ContainsKey("name") != true) + { + writer.WritePropertyName("name"u8); + } writer.WriteStringValue(Name); - writer.WritePropertyName("usage_bytes"u8); + if (_additionalBinaryDataProperties?.ContainsKey("usage_bytes") != true) + { + writer.WritePropertyName("usage_bytes"u8); + } writer.WriteNumberValue(UsageBytes); - writer.WritePropertyName("file_counts"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_counts") != true) + { + writer.WritePropertyName("file_counts"u8); + } writer.WriteObjectValue(FileCounts, options); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToSerialString()); - if (Optional.IsDefined(ExpiresAt)) + if (Optional.IsDefined(ExpiresAt) && _additionalBinaryDataProperties?.ContainsKey("expires_at") != true) { if (ExpiresAt != null) { @@ -55,38 +73,47 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("expiresAt"u8); } } - if (LastActiveAt != null) + if (_additionalBinaryDataProperties?.ContainsKey("last_active_at") != true) { - writer.WritePropertyName("last_active_at"u8); - writer.WriteNumberValue(LastActiveAt.Value, "U"); - } - else - { - writer.WriteNull("lastActiveAt"u8); + if (LastActiveAt != null) + { + writer.WritePropertyName("last_active_at"u8); + writer.WriteNumberValue(LastActiveAt.Value, "U"); + } + else + { + writer.WriteNull("lastActiveAt"u8); + } } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) + if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) { - writer.WriteNullValue(); - continue; + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); } - writer.WriteStringValue(item.Value); + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); } - writer.WriteEndObject(); } - else + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WriteNull("metadata"u8); + writer.WritePropertyName("object"u8); } - writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); - if (Optional.IsDefined(ExpirationPolicy)) + if (Optional.IsDefined(ExpirationPolicy) && _additionalBinaryDataProperties?.ContainsKey("expires_after") != true) { writer.WritePropertyName("expires_after"u8); writer.WriteObjectValue(ExpirationPolicy, options); @@ -95,6 +122,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -222,7 +253,6 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea { if (prop.Value.ValueKind == JsonValueKind.Null) { - expirationPolicy = null; continue; } expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index 8b0d63489..046a4e136 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStore { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) { @@ -56,5 +56,11 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage public DateTimeOffset? LastActiveAt { get; } public IDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 42e953d13..682fe1928 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -31,22 +31,44 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreBatchFileJob)} does not support writing '{format}' format."); } - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("vector_store_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("vector_store_id") != true) + { + writer.WritePropertyName("vector_store_id"u8); + } writer.WriteStringValue(VectorStoreId); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(BatchId); - writer.WritePropertyName("file_counts"u8); + if (_additionalBinaryDataProperties?.ContainsKey("file_counts") != true) + { + writer.WritePropertyName("file_counts"u8); + } writer.WriteObjectValue(FileCounts, options); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs index 2d0feff10..919b553ca 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreBatchFileJob { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, VectorStoreBatchFileJobStatus status, string batchId, VectorStoreFileCounts fileCounts) { @@ -36,5 +36,11 @@ internal VectorStoreBatchFileJob(DateTimeOffset createdAt, string vectorStoreId, public string VectorStoreId { get; } public VectorStoreBatchFileJobStatus Status { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index d69622ffd..8cf232033 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -28,7 +28,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreCreationHelper)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { writer.WritePropertyName("metadata"u8); writer.WriteStartObject(); @@ -59,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); @@ -68,6 +68,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -152,7 +156,6 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs index 628d5db8f..935039ea4 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.cs @@ -11,7 +11,7 @@ namespace OpenAI.Assistants { public partial class VectorStoreCreationHelper { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public VectorStoreCreationHelper() { @@ -30,5 +30,11 @@ internal VectorStoreCreationHelper(IList fileIds, IDictionary FileIds { get; } public IDictionary Metadata { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 073fc0d65..e3146f06e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreCreationOptions)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(FileIds)) + if (Optional.IsCollectionDefined(FileIds) && _additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); writer.WriteStartArray(); @@ -42,12 +42,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -70,12 +70,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(ExpirationPolicy)) + if (Optional.IsDefined(ExpirationPolicy) && _additionalBinaryDataProperties?.ContainsKey("expires_after") != true) { writer.WritePropertyName("expires_after"u8); writer.WriteObjectValue(ExpirationPolicy, options); } - if (Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); @@ -84,6 +84,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -147,11 +151,6 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions } if (prop.NameEquals("name"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } name = prop.Value.GetString(); continue; } @@ -180,7 +179,6 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - expirationPolicy = null; continue; } expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); @@ -190,7 +188,6 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs index ce527f408..563e1c7d3 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreCreationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public VectorStoreCreationOptions() { @@ -33,5 +33,11 @@ internal VectorStoreCreationOptions(IList fileIds, string name, IDiction public string Name { get; set; } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 996d804f4..8de1cce95 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -31,16 +31,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreDeletionResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("deleted"u8); + if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) + { + writer.WritePropertyName("deleted"u8); + } writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(VectorStoreId); - writer.WritePropertyName("object"u8); + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) + { + writer.WritePropertyName("object"u8); + } writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs index 95aa34708..35a6a2908 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreDeletionResult { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStoreDeletionResult(bool deleted, string vectorStoreId) { @@ -26,5 +26,11 @@ internal VectorStoreDeletionResult(bool deleted, string vectorStoreId, InternalD } public bool Deleted { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index d72f44923..df77fcaeb 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -27,14 +27,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); } - writer.WritePropertyName("anchor"u8); + if (_additionalBinaryDataProperties?.ContainsKey("anchor") != true) + { + writer.WritePropertyName("anchor"u8); + } writer.WriteStringValue(_anchor.ToSerialString()); - writer.WritePropertyName("days"u8); + if (_additionalBinaryDataProperties?.ContainsKey("days") != true) + { + writer.WritePropertyName("days"u8); + } writer.WriteNumberValue(_days); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs index 9f196b20c..2a6147ceb 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.cs @@ -9,6 +9,12 @@ namespace OpenAI.VectorStores { public partial class VectorStoreExpirationPolicy { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index c512f1256..2e8ca06ed 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -31,28 +31,49 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreFileAssociation)} does not support writing '{format}' format."); } - writer.WritePropertyName("created_at"u8); + if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) + { + writer.WritePropertyName("created_at"u8); + } writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("vector_store_id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("vector_store_id") != true) + { + writer.WritePropertyName("vector_store_id"u8); + } writer.WriteStringValue(VectorStoreId); - writer.WritePropertyName("status"u8); + if (_additionalBinaryDataProperties?.ContainsKey("status") != true) + { + writer.WritePropertyName("status"u8); + } writer.WriteStringValue(Status.ToSerialString()); - if (LastError != null) + if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); + if (LastError != null) + { + writer.WritePropertyName("last_error"u8); + writer.WriteObjectValue(LastError, options); + } + else + { + writer.WriteNull("lastError"u8); + } } - else + if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { - writer.WriteNull("lastError"u8); + writer.WritePropertyName("object"u8); } - writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); - writer.WritePropertyName("id"u8); + if (_additionalBinaryDataProperties?.ContainsKey("id") != true) + { + writer.WritePropertyName("id"u8); + } writer.WriteStringValue(FileId); - writer.WritePropertyName("usage_bytes"u8); + if (_additionalBinaryDataProperties?.ContainsKey("usage_bytes") != true) + { + writer.WritePropertyName("usage_bytes"u8); + } writer.WriteNumberValue(Size); - if (Optional.IsDefined(ChunkingStrategy)) + if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); @@ -61,6 +82,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); @@ -148,7 +173,6 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation { if (prop.Value.ValueKind == JsonValueKind.Null) { - chunkingStrategy = null; continue; } chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs index 6b3d23ca0..037763511 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociation { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStoreId, VectorStores.VectorStoreFileAssociationStatus status, VectorStoreFileAssociationError lastError, string fileId, int size) { @@ -41,5 +41,11 @@ internal VectorStoreFileAssociation(DateTimeOffset createdAt, string vectorStore public VectorStores.VectorStoreFileAssociationStatus Status { get; } public VectorStoreFileAssociationError LastError { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index f815f0f11..688c89d40 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -31,14 +31,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreFileAssociationError)} does not support writing '{format}' format."); } - writer.WritePropertyName("code"u8); + if (_additionalBinaryDataProperties?.ContainsKey("code") != true) + { + writer.WritePropertyName("code"u8); + } writer.WriteStringValue(Code.ToString()); - writer.WritePropertyName("message"u8); + if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + { + writer.WritePropertyName("message"u8); + } writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs index fe3bbf316..c57800d5d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileAssociationError { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code, string message) { @@ -27,5 +27,11 @@ internal VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode cod public VectorStoreFileAssociationErrorCode Code { get; } public string Message { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index 44c1a8ce1..a384d28ae 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -31,20 +31,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreFileCounts)} does not support writing '{format}' format."); } - writer.WritePropertyName("in_progress"u8); + if (_additionalBinaryDataProperties?.ContainsKey("in_progress") != true) + { + writer.WritePropertyName("in_progress"u8); + } writer.WriteNumberValue(InProgress); - writer.WritePropertyName("completed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) + { + writer.WritePropertyName("completed"u8); + } writer.WriteNumberValue(Completed); - writer.WritePropertyName("failed"u8); + if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) + { + writer.WritePropertyName("failed"u8); + } writer.WriteNumberValue(Failed); - writer.WritePropertyName("cancelled"u8); + if (_additionalBinaryDataProperties?.ContainsKey("cancelled") != true) + { + writer.WritePropertyName("cancelled"u8); + } writer.WriteNumberValue(Cancelled); - writer.WritePropertyName("total"u8); + if (_additionalBinaryDataProperties?.ContainsKey("total") != true) + { + writer.WritePropertyName("total"u8); + } writer.WriteNumberValue(Total); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs index b1dd3647e..412140d6e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreFileCounts { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; internal VectorStoreFileCounts(int inProgress, int completed, int failed, int cancelled, int total) { @@ -39,5 +39,11 @@ internal VectorStoreFileCounts(int inProgress, int completed, int failed, int ca public int Cancelled { get; } public int Total { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index c7e6d3843..801de2c19 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(VectorStoreModificationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) + if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) { @@ -39,7 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("name"u8); } } - if (Optional.IsCollectionDefined(Metadata)) + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) { @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (Optional.IsDefined(ExpirationPolicy)) + if (Optional.IsDefined(ExpirationPolicy) && _additionalBinaryDataProperties?.ContainsKey("expires_after") != true) { if (ExpirationPolicy != null) { @@ -78,6 +78,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { foreach (var item in _additionalBinaryDataProperties) { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs index 1981b2fff..a9a6d29b1 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.cs @@ -10,7 +10,7 @@ namespace OpenAI.VectorStores { public partial class VectorStoreModificationOptions { - private protected readonly IDictionary _additionalBinaryDataProperties; + private protected IDictionary _additionalBinaryDataProperties; public VectorStoreModificationOptions() { @@ -28,5 +28,11 @@ internal VectorStoreModificationOptions(string name, IDictionary public string Name { get; set; } public IDictionary Metadata { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 7de03afea..844697301 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -32,7 +32,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WeightsAndBiasesIntegration)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("wandb"u8); + if (_additionalBinaryDataProperties?.ContainsKey("wandb") != true) + { + writer.WritePropertyName("wandb"u8); + } writer.WriteObjectValue(Wandb, options); } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index eb75214f0..bf4f1f7da 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -168,12 +168,6 @@ public static MessageCreationOptions MessageCreationOptions(IEnumerable tools = default) { tools ??= new ChangeTrackingList(); @@ -393,7 +387,7 @@ public static RunStepTokenUsage RunStepTokenUsage(int outputTokenCount = default return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); } - public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IDictionary metadata = default, InternalThreadObjectObject @object = default, ToolResources toolResources = default) + public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IReadOnlyDictionary metadata = default, InternalThreadObjectObject @object = default, ToolResources toolResources = default) { metadata ??= new ChangeTrackingDictionary(); @@ -446,16 +440,16 @@ public static ConversationInputTranscriptionOptions ConversationInputTranscripti return new ConversationInputTranscriptionOptions(model, null); } - public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(int kind = default) + public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(string kind = default) { return new UnknownRealtimeTurnDetection(kind.ToConversationTurnDetectionKind(), null); } - public static ConversationTool ConversationTool(ConversationToolKind kind = default) + public static ConversationTool ConversationTool(string kind = default) { - return new UnknownRealtimeTool(kind, null); + return new UnknownRealtimeTool(new ConversationToolKind(kind), null); } public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default) @@ -476,7 +470,7 @@ public static ConversationContentPart ConversationContentPart(ConversationConten return new UnknownRealtimeContentPart(@type, null); } - public static ConversationUpdate ConversationUpdate(string eventId = default, int kind = default) + public static ConversationUpdate ConversationUpdate(string eventId = default, string kind = default) { return new UnknownRealtimeResponseCommand(eventId, kind.ToConversationUpdateKind(), null); @@ -1003,7 +997,7 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt null); } - public static ChatMessage ChatMessage(int role = default, ChatMessageContent content = default) + public static ChatMessage ChatMessage(string role = default, ChatMessageContent content = default) { return new InternalUnknownChatMessage(role.ToChatMessageRole(), content, null); diff --git a/.typespec/threads/client.tsp b/.typespec/threads/client.tsp index 53c643d6e..01644dae9 100644 --- a/.typespec/threads/client.tsp +++ b/.typespec/threads/client.tsp @@ -11,3 +11,5 @@ using OpenAI; @@access(CreateThreadRequestToolResourcesFileSearchBase, Access.public); @@usage(CreateThreadRequestToolResourcesFileSearchBase, Usage.input); + +@@visibility(ThreadObject.metadata, "read"); From ddfdc1dd6684ed7d2b58eab7a94641904b4f4984 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 25 Oct 2024 12:41:27 -0700 Subject: [PATCH 19/54] Add plugin --- .dotnet/Configuration.json | 8 + ...Generator.CSharp.ClientModel.Plugin.csproj | 12 + .../OpenAILibraryPlugin.cs | 21 + .../OpenAILibraryVisitor.cs | 174 + .dotnet/tspCodeModel.json | 51262 ++++++++++++++++ 5 files changed, 51477 insertions(+) create mode 100644 .dotnet/Configuration.json create mode 100644 .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj create mode 100644 .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs create mode 100644 .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs create mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json new file mode 100644 index 000000000..85fab5a06 --- /dev/null +++ b/.dotnet/Configuration.json @@ -0,0 +1,8 @@ +{ + "output-folder": ".", + "namespace": "OpenAI", + "library-name": "OpenAI", + "unreferenced-types-handling": "keepAll", + "use-model-reader-writer": true, + "disable-xml-docs": true +} diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj new file mode 100644 index 000000000..f4b14537e --- /dev/null +++ b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj @@ -0,0 +1,12 @@ + + + + net8.0 + enable + + + + + + + diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs new file mode 100644 index 000000000..0bc0d41ac --- /dev/null +++ b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel.Composition; + +namespace Microsoft.Generator.CSharp.ClientModel.OpenAILibraryPlugin +{ + [Export(typeof(CodeModelPlugin))] + [ExportMetadata("PluginName", nameof(OpenAILibraryPlugin))] + public class OpenAILibraryPlugin : ClientModelPlugin + { + [ImportingConstructor] + public OpenAILibraryPlugin(GeneratorContext context) : base(context) { } + + public override void Configure() + { + base.Configure(); + AddVisitor(new OpenAILibraryVisitor()); + } + } +} \ No newline at end of file diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs new file mode 100644 index 000000000..9550627b9 --- /dev/null +++ b/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Providers; +using Microsoft.Generator.CSharp.Snippets; +using Microsoft.Generator.CSharp.Statements; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Microsoft.Generator.CSharp.ClientModel.OpenAILibraryPlugin +{ + public class OpenAILibraryVisitor : ScmLibraryVisitor + { + private const string RawDataPropertyName = "SerializedAdditionalRawData"; + private const string AdditionalPropertiesFieldName = "_additionalBinaryDataProperties"; + private const string SentinelValueFieldName = "_sentinelValue"; + private const string WritePropertyNameMethodCall = "WritePropertyName(\""; + + private static readonly VariableExpression AdditionalBinaryDataExpression = + new VariableExpression(typeof(IDictionary), AdditionalPropertiesFieldName); + protected override TypeProvider Visit(TypeProvider type) + { + if (type is ModelProvider { BaseModelProvider: null }) + { + var additionalPropertiesField = type.Fields.Single(f => f.Name == AdditionalPropertiesFieldName); + var properties = new List(type.Properties) + { + new PropertyProvider($"", MethodSignatureModifiers.Internal, + typeof(IDictionary), RawDataPropertyName, + new ExpressionPropertyBody( + additionalPropertiesField, + additionalPropertiesField.Assign(Value)), type) + }; + type.Update(properties: properties); + } + else if (type.Name == "ModelSerializationExtensions") + { + var sentinelValueField = new FieldProvider( + FieldModifiers.Private | FieldModifiers.Static | FieldModifiers.ReadOnly, + typeof(BinaryData), + SentinelValueFieldName, + type, + null, + BinaryDataSnippets.FromBytes(LiteralU8("\"__EMPTY__\"").Invoke("ToArray"))); + var fields = new List(type.Fields) + { + sentinelValueField + }; + + var valueParameter = new ParameterProvider("value", $"", typeof(BinaryData)); + var methods = new List(type.Methods) + { + new MethodProvider( + new MethodSignature( + "IsSentinelValue", + $"", + MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static, + typeof(bool), + $"", + [valueParameter]), + new[] + { + Declare("sentinelSpan", typeof(ReadOnlySpan), sentinelValueField.Invoke("ToMemory", []).Property("Span"), out var sentinelVariable), + Declare("valueSpan", typeof(ReadOnlySpan), valueParameter.Invoke("ToMemory", []).Property("Span"), out var valueVariable), + Return(sentinelVariable.Invoke("SequenceEqual", valueVariable)) + }, + type) + }; + type.Update(fields: fields, methods: methods); + } + return type; + } + + protected override FieldProvider? Visit(FieldProvider field) + { + if (field.Name == AdditionalPropertiesFieldName) + { + field.Modifiers &= ~FieldModifiers.ReadOnly; + } + return field; + } + + protected override MethodProvider Visit(MethodProvider method) + { + if (method.Signature.Name != "JsonModelWriteCore") + { + return method; + } + + // If there are no body statements, return the method as is + if (method.BodyStatements == null) + { + return method; + } + + // If the body statements are not MethodBodyStatements, return the method as is + if (method.BodyStatements is not MethodBodyStatements statements) + { + return method; + } + + var updatedStatements = new List(); + + foreach (var statement in Flatten(statements!)) + { + if (statement is IfStatement ifStatement) + { + var body = ifStatement.Body.ToDisplayString(); + if (body.Contains(WritePropertyNameMethodCall)) + { + ifStatement.Condition = ifStatement.Condition.As().And(GetContainsKeyCondition(body)); + updatedStatements.Add(ifStatement); + continue; + } + + if (Flatten(ifStatement.Body).First() is ForeachStatement foreachStatement) + { + foreachStatement.Body.Insert( + 0, + new IfStatement( + Static(new ModelSerializationExtensionsDefinition().Type).Invoke("IsSentinelValue", foreachStatement.ItemVariable.Property("Value"))) + { + Continue + }); + } + } + + var displayString = statement.ToDisplayString(); + if (displayString.Contains(WritePropertyNameMethodCall)) + { + var ifSt = new IfStatement(GetContainsKeyCondition(displayString)) { statement }; + updatedStatements.Add(ifSt); + } + else + { + updatedStatements.Add(statement); + } + } + method.Update(bodyStatements: updatedStatements); + return method; + } + + private static ScopedApi GetContainsKeyCondition(string displayString) + { + var propertyName = displayString.Split('"')[1]; + return AdditionalBinaryDataExpression + .NullConditional() + .Invoke("ContainsKey", Literal(propertyName)).NotEqual(True); + } + + private IEnumerable Flatten(MethodBodyStatement bodyStatement) + { + if (bodyStatement is MethodBodyStatements statements) + { + foreach (var statement in statements.Statements) + { + foreach (var subStatement in Flatten(statement)) + { + yield return subStatement; + } + } + } + else + { + yield return bodyStatement; + } + } + } +} diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json new file mode 100644 index 000000000..d3450f8ba --- /dev/null +++ b/.dotnet/tspCodeModel.json @@ -0,0 +1,51262 @@ +{ + "$id": "1", + "Name": "OpenAI", + "ApiVersions": [], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "CreateUploadRequestPurpose", + "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "12", + "kind": "enum", + "name": "UploadStatus", + "crossLanguageDefinitionId": "Upload.status.anonymous", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "14", + "kind": "enumvalue", + "name": "pending", + "value": "pending", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "Upload_object", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "upload", + "value": "upload", + "description": "upload", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Upload_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "25", + "kind": "enum", + "name": "OpenAIFile_object", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "27", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "26" + }, + "enumType": { + "$ref": "25" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The OpenAIFile_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "28", + "kind": "enum", + "name": "OpenAIFilePurpose", + "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "30", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "assistants_output", + "value": "assistants_output", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "batch_output", + "value": "batch_output", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "fine-tune-results", + "value": "fine-tune-results", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "28" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "OpenAIFileStatus", + "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "uploaded", + "value": "uploaded", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "processed", + "value": "processed", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "UploadPart_object", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "upload.part", + "value": "upload.part", + "description": "upload.part", + "valueType": { + "$ref": "53" + }, + "enumType": { + "$ref": "52" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The UploadPart_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "55", + "kind": "enum", + "name": "ListVectorStoresRequestOrder", + "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", + "valueType": { + "$id": "56", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "57", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + }, + { + "$id": "59", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "60", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "55" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "61", + "kind": "enum", + "name": "ListVectorStoresResponse_object", + "valueType": { + "$id": "62", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "63", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "62" + }, + "enumType": { + "$ref": "61" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoresResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "VectorStoreObject_object", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "vector_store", + "value": "vector_store", + "description": "vector_store", + "valueType": { + "$ref": "65" + }, + "enumType": { + "$ref": "64" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "67", + "kind": "enum", + "name": "VectorStoreObjectStatus", + "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", + "valueType": { + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "69", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "70", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "71", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "72", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + }, + { + "$id": "73", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "74", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "67" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "75", + "kind": "enum", + "name": "VectorStoreExpirationAfter_anchor", + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "77", + "kind": "enumvalue", + "name": "last_active_at", + "value": "last_active_at", + "description": "last_active_at", + "valueType": { + "$ref": "76" + }, + "enumType": { + "$ref": "75" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreExpirationAfter_anchor", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "DeleteVectorStoreResponse_object", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "vector_store.deleted", + "value": "vector_store.deleted", + "description": "vector_store.deleted", + "valueType": { + "$ref": "79" + }, + "enumType": { + "$ref": "78" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "81", + "kind": "enum", + "name": "ListVectorStoreFilesRequestOrder", + "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", + "valueType": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "83", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "84", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + }, + { + "$id": "85", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "86", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "81" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "87", + "kind": "enum", + "name": "ListVectorStoreFilesFilter", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", + "valueType": { + "$id": "88", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "89", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "90", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "91", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "92", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "93", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + }, + { + "$id": "95", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "87" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "97", + "kind": "enum", + "name": "ListVectorStoreFilesResponse_object", + "valueType": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "99", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "98" + }, + "enumType": { + "$ref": "97" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListVectorStoreFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "VectorStoreFileObject_object", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "vector_store.file", + "value": "vector_store.file", + "description": "vector_store.file", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "103", + "kind": "enum", + "name": "VectorStoreFileObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", + "valueType": { + "$id": "104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "105", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "107", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "109", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + }, + { + "$id": "111", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "103" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "113", + "kind": "enum", + "name": "VectorStoreFileObjectLastErrorCode", + "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", + "valueType": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "115", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "117", + "kind": "enumvalue", + "name": "unsupported_file", + "value": "unsupported_file", + "valueType": { + "$id": "118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + }, + { + "$id": "119", + "kind": "enumvalue", + "name": "invalid_file", + "value": "invalid_file", + "valueType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "113" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "121", + "kind": "enum", + "name": "DeleteVectorStoreFileResponse_object", + "valueType": { + "$id": "122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "123", + "kind": "enumvalue", + "name": "vector_store.file.deleted", + "value": "vector_store.file.deleted", + "description": "vector_store.file.deleted", + "valueType": { + "$ref": "122" + }, + "enumType": { + "$ref": "121" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteVectorStoreFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "VectorStoreFileBatchObject_object", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "vector_store.files_batch", + "value": "vector_store.files_batch", + "description": "vector_store.files_batch", + "valueType": { + "$ref": "125" + }, + "enumType": { + "$ref": "124" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The VectorStoreFileBatchObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "127", + "kind": "enum", + "name": "VectorStoreFileBatchObjectStatus", + "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", + "valueType": { + "$id": "128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "129", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "131", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "133", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "135", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "137", + "kind": "enum", + "name": "ListFilesInVectorStoreBatchRequestOrder", + "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", + "valueType": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "139", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + }, + { + "$id": "141", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "143", + "kind": "enum", + "name": "CreateMessageRequestRole", + "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", + "valueType": { + "$id": "144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "145", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + }, + { + "$id": "147", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "143" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "149", + "kind": "enum", + "name": "FileSearchRankingOptionsRanker", + "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", + "valueType": { + "$id": "150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "151", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + }, + { + "$id": "153", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "valueType": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "149" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "155", + "kind": "enum", + "name": "AssistantToolsFileSearchTypeOnly_type", + "valueType": { + "$id": "156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "157", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "description": "file_search", + "valueType": { + "$ref": "156" + }, + "enumType": { + "$ref": "155" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantToolsFileSearchTypeOnly_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "158", + "kind": "enum", + "name": "CreateThreadAndRunRequestModel", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "160", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "164", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "166", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "172", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "200", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "206", + "kind": "enum", + "name": "TruncationObjectType", + "crossLanguageDefinitionId": "TruncationObject.type.anonymous", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "208", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "last_messages", + "value": "last_messages", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "CreateThreadAndRunRequestToolChoice", + "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "AssistantsNamedToolChoiceType", + "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "code_interpreter", + "value": "code_interpreter", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "file_search", + "value": "file_search", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "228", + "kind": "enum", + "name": "RunObject_object", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "230", + "kind": "enumvalue", + "name": "thread.run", + "value": "thread.run", + "description": "thread.run", + "valueType": { + "$ref": "229" + }, + "enumType": { + "$ref": "228" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "231", + "kind": "enum", + "name": "RunObjectStatus", + "crossLanguageDefinitionId": "RunObject.status.anonymous", + "valueType": { + "$id": "232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "233", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "235", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "237", + "kind": "enumvalue", + "name": "requires_action", + "value": "requires_action", + "valueType": { + "$id": "238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "239", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "241", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "243", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "245", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "247", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + }, + { + "$id": "249", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "231" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "251", + "kind": "enum", + "name": "RunObjectRequiredAction_type", + "valueType": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "253", + "kind": "enumvalue", + "name": "submit_tool_outputs", + "value": "submit_tool_outputs", + "description": "submit_tool_outputs", + "valueType": { + "$ref": "252" + }, + "enumType": { + "$ref": "251" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunObjectRequiredAction_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "RunToolCallObject_type", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "255" + }, + "enumType": { + "$ref": "254" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunToolCallObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "257", + "kind": "enum", + "name": "RunObjectLastErrorCode", + "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", + "valueType": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "259", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "261", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + }, + { + "$id": "263", + "kind": "enumvalue", + "name": "invalid_prompt", + "value": "invalid_prompt", + "valueType": { + "$id": "264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "257" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "265", + "kind": "enum", + "name": "RunObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "267", + "kind": "enumvalue", + "name": "max_completion_tokens", + "value": "max_completion_tokens", + "valueType": { + "$id": "268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + }, + { + "$id": "269", + "kind": "enumvalue", + "name": "max_prompt_tokens", + "value": "max_prompt_tokens", + "valueType": { + "$id": "270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "265" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "271", + "kind": "enum", + "name": "CreateRunRequestModel", + "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", + "valueType": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "273", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "275", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "277", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "279", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "281", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "283", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "285", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "287", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "289", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "291", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "293", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "295", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "297", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "299", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "301", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "303", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "305", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "307", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "309", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "311", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "313", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "315", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + }, + { + "$id": "317", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "271" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "319", + "kind": "enum", + "name": "ListRunsRequestOrder", + "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", + "valueType": { + "$id": "320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "321", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + }, + { + "$id": "323", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "319" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "325", + "kind": "enum", + "name": "ListRunsResponse_object", + "valueType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "327", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "326" + }, + "enumType": { + "$ref": "325" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "ListRunStepsRequestOrder", + "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "ListRunStepsResponse_object", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "335" + }, + "enumType": { + "$ref": "334" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListRunStepsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "337", + "kind": "enum", + "name": "RunStepObject_object", + "valueType": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "339", + "kind": "enumvalue", + "name": "thread.run.step", + "value": "thread.run.step", + "description": "thread.run.step", + "valueType": { + "$ref": "338" + }, + "enumType": { + "$ref": "337" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "340", + "kind": "enum", + "name": "RunStepObjectType", + "crossLanguageDefinitionId": "RunStepObject.type.anonymous", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "342", + "kind": "enumvalue", + "name": "message_creation", + "value": "message_creation", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "RunStepObjectStatus", + "crossLanguageDefinitionId": "RunStepObject.status.anonymous", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "350", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "354", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + }, + { + "$id": "356", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "358", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "360", + "kind": "enumvalue", + "name": "default_2024_08_21", + "value": "default_2024_08_21", + "description": "default_2024_08_21", + "valueType": { + "$ref": "359" + }, + "enumType": { + "$ref": "358" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "361", + "kind": "enum", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "valueType": { + "$id": "362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "363", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "362" + }, + "enumType": { + "$ref": "361" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "364", + "kind": "enum", + "name": "RunStepObjectLastErrorCode", + "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", + "valueType": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "366", + "kind": "enumvalue", + "name": "server_error", + "value": "server_error", + "valueType": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + }, + { + "$id": "368", + "kind": "enumvalue", + "name": "rate_limit_exceeded", + "value": "rate_limit_exceeded", + "valueType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "364" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "370", + "kind": "enum", + "name": "ThreadObject_object", + "valueType": { + "$id": "371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "372", + "kind": "enumvalue", + "name": "thread", + "value": "thread", + "description": "thread", + "valueType": { + "$ref": "371" + }, + "enumType": { + "$ref": "370" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ThreadObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "373", + "kind": "enum", + "name": "DeleteThreadResponse_object", + "valueType": { + "$id": "374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "375", + "kind": "enumvalue", + "name": "thread.deleted", + "value": "thread.deleted", + "description": "thread.deleted", + "valueType": { + "$ref": "374" + }, + "enumType": { + "$ref": "373" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteThreadResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "376", + "kind": "enum", + "name": "RealtimeRequestCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", + "valueType": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "378", + "kind": "enumvalue", + "name": "session_update", + "value": "session.update", + "valueType": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "380", + "kind": "enumvalue", + "name": "input_audio_buffer_append", + "value": "input_audio_buffer.append", + "valueType": { + "$id": "381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "382", + "kind": "enumvalue", + "name": "input_audio_buffer_commit", + "value": "input_audio_buffer.commit", + "valueType": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "384", + "kind": "enumvalue", + "name": "input_audio_buffer_clear", + "value": "input_audio_buffer.clear", + "valueType": { + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "386", + "kind": "enumvalue", + "name": "item_create", + "value": "conversation.item.create", + "valueType": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "388", + "kind": "enumvalue", + "name": "item_delete", + "value": "conversation.item.delete", + "valueType": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "390", + "kind": "enumvalue", + "name": "item_truncate", + "value": "conversation.item.truncate", + "valueType": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "392", + "kind": "enumvalue", + "name": "response_create", + "value": "response.create", + "valueType": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + }, + { + "$id": "394", + "kind": "enumvalue", + "name": "response_cancel", + "value": "response.cancel", + "valueType": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "376" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "396", + "kind": "enum", + "name": "RealtimeRequestModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", + "valueType": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "398", + "kind": "enumvalue", + "name": "gpt_4o_realtime", + "value": "gpt-4o-realtime", + "valueType": { + "$id": "399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "396" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "400", + "kind": "enum", + "name": "RealtimeRequestSessionUpdateCommandSessionModality", + "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "402", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "400" + }, + "decorators": [] + }, + { + "$id": "404", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "400" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "406", + "kind": "enum", + "name": "RealtimeVoice", + "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", + "valueType": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "408", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + }, + { + "$id": "410", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + }, + { + "$id": "412", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "406" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "414", + "kind": "enum", + "name": "RealtimeAudioFormat", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", + "valueType": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "416", + "kind": "enumvalue", + "name": "pcm16", + "value": "pcm16", + "valueType": { + "$id": "417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + }, + { + "$id": "418", + "kind": "enumvalue", + "name": "g711_ulaw", + "value": "g711_ulaw", + "valueType": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + }, + { + "$id": "420", + "kind": "enumvalue", + "name": "g711_alaw", + "value": "g711_alaw", + "valueType": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "414" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "422", + "kind": "enum", + "name": "RealtimeAudioInputTranscriptionModel", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", + "valueType": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "424", + "kind": "enumvalue", + "name": "whisper_1", + "value": "whisper-1", + "valueType": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "422" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "426", + "kind": "enum", + "name": "RealtimeTurnDetectionType", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", + "valueType": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "428", + "kind": "enumvalue", + "name": "server_vad", + "value": "server_vad", + "valueType": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "426" + }, + "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "430", + "kind": "enum", + "name": "RealtimeToolType", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", + "valueType": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "432", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "430" + }, + "decorators": [] + } + ], + "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "434", + "kind": "enum", + "name": "RealtimeToolChoiceLiteral", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", + "valueType": { + "$id": "435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "436", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", + "decorators": [] + }, + { + "$id": "438", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should call no tools whatsoever.", + "decorators": [] + }, + { + "$id": "440", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "434" + }, + "description": "Specifies that the model should call at least one tool.", + "decorators": [] + } + ], + "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "442", + "kind": "enum", + "name": "RealtimeItemType", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", + "valueType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "444", + "kind": "enumvalue", + "name": "message", + "value": "message", + "valueType": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + }, + { + "$id": "446", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + }, + { + "$id": "448", + "kind": "enumvalue", + "name": "function_call_output", + "value": "function_call_output", + "valueType": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "442" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "450", + "kind": "enum", + "name": "RealtimeMessageRole", + "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", + "valueType": { + "$id": "451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "452", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "454", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + }, + { + "$id": "456", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "450" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "458", + "kind": "enum", + "name": "RealtimeItemStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", + "valueType": { + "$id": "459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "460", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + }, + { + "$id": "462", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + }, + { + "$id": "464", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "458" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "466", + "kind": "enum", + "name": "RealtimeContentPartType", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", + "valueType": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "468", + "kind": "enumvalue", + "name": "input_text", + "value": "input_text", + "valueType": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "470", + "kind": "enumvalue", + "name": "input_audio", + "value": "input_audio", + "valueType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "472", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + }, + { + "$id": "474", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "466" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "476", + "kind": "enum", + "name": "RealtimeResponseCommandType", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", + "valueType": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "478", + "kind": "enumvalue", + "name": "session_created", + "value": "session.created", + "valueType": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "480", + "kind": "enumvalue", + "name": "session_updated", + "value": "session.updated", + "valueType": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "482", + "kind": "enumvalue", + "name": "item_created", + "value": "conversation.item.created", + "valueType": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "484", + "kind": "enumvalue", + "name": "item_deleted", + "value": "conversation.item.deleted", + "valueType": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "486", + "kind": "enumvalue", + "name": "item_truncated", + "value": "conversation.item.truncated", + "valueType": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "488", + "kind": "enumvalue", + "name": "response_created", + "value": "response.created", + "valueType": { + "$id": "489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "490", + "kind": "enumvalue", + "name": "response_done", + "value": "response.done", + "valueType": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "492", + "kind": "enumvalue", + "name": "rate_limits_updated", + "value": "rate_limits.updated", + "valueType": { + "$id": "493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "494", + "kind": "enumvalue", + "name": "response_output_item_added", + "value": "response.output_item.added", + "valueType": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "496", + "kind": "enumvalue", + "name": "response_output_item_done", + "value": "response.output_item.done", + "valueType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "498", + "kind": "enumvalue", + "name": "response_content_part_added", + "value": "response.content_part.added", + "valueType": { + "$id": "499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "500", + "kind": "enumvalue", + "name": "response_content_part_done", + "value": "response.content_part.done", + "valueType": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "502", + "kind": "enumvalue", + "name": "response_audio_delta", + "value": "response.audio.delta", + "valueType": { + "$id": "503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "504", + "kind": "enumvalue", + "name": "response_audio_done", + "value": "response.audio.done", + "valueType": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "506", + "kind": "enumvalue", + "name": "response_audio_transcript_delta", + "value": "response.audio_transcript.delta", + "valueType": { + "$id": "507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "508", + "kind": "enumvalue", + "name": "response_audio_transcript_done", + "value": "response.audio_transcript.done", + "valueType": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "510", + "kind": "enumvalue", + "name": "response_text_delta", + "value": "response.text.delta", + "valueType": { + "$id": "511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "512", + "kind": "enumvalue", + "name": "response_text_done", + "value": "response.text.done", + "valueType": { + "$id": "513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "514", + "kind": "enumvalue", + "name": "response_function_call_arguments_delta", + "value": "response.function_call_arguments.delta", + "valueType": { + "$id": "515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "516", + "kind": "enumvalue", + "name": "response_function_call_arguments_done", + "value": "response.function_call_arguments.done", + "valueType": { + "$id": "517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "518", + "kind": "enumvalue", + "name": "input_audio_buffer_speech_started", + "value": "input_audio_buffer.speech_started", + "valueType": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "520", + "kind": "enumvalue", + "name": "input_audio_buffer_speech_stopped", + "value": "input_audio_buffer.speech_stopped", + "valueType": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "522", + "kind": "enumvalue", + "name": "item_input_audio_transcription_completed", + "value": "conversation.item.input_audio_transcription.completed", + "valueType": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "524", + "kind": "enumvalue", + "name": "item_input_audio_transcription_failed", + "value": "conversation.item.input_audio_transcription.failed", + "valueType": { + "$id": "525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "526", + "kind": "enumvalue", + "name": "input_audio_buffer_committed", + "value": "input_audio_buffer.committed", + "valueType": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "528", + "kind": "enumvalue", + "name": "input_audio_buffer_cleared", + "value": "input_audio_buffer.cleared", + "valueType": { + "$id": "529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + }, + { + "$id": "530", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "476" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "532", + "kind": "enum", + "name": "RealtimeResponseSession_object", + "valueType": { + "$id": "533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "534", + "kind": "enumvalue", + "name": "realtime.session", + "value": "realtime.session", + "description": "realtime.session", + "valueType": { + "$ref": "533" + }, + "enumType": { + "$ref": "532" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseSession_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "535", + "kind": "enum", + "name": "RealtimeResponseItem_object", + "valueType": { + "$id": "536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "537", + "kind": "enumvalue", + "name": "realtime.item", + "value": "realtime.item", + "description": "realtime.item", + "valueType": { + "$ref": "536" + }, + "enumType": { + "$ref": "535" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponseItem_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "538", + "kind": "enum", + "name": "RealtimeResponse_object", + "valueType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "540", + "kind": "enumvalue", + "name": "realtime.response", + "value": "realtime.response", + "description": "realtime.response", + "valueType": { + "$ref": "539" + }, + "enumType": { + "$ref": "538" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RealtimeResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "541", + "kind": "enum", + "name": "RealtimeResponseStatus", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", + "valueType": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "543", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "545", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "547", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "549", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + }, + { + "$id": "551", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "541" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "553", + "kind": "enum", + "name": "RealtimeResponseCancelledStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", + "valueType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "555", + "kind": "enumvalue", + "name": "turn_detected", + "value": "turn_detected", + "valueType": { + "$id": "556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "553" + }, + "decorators": [] + }, + { + "$id": "557", + "kind": "enumvalue", + "name": "client_cancelled", + "value": "client_cancelled", + "valueType": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "553" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "559", + "kind": "enum", + "name": "RealtimeResponseIncompleteStatusDetailsReason", + "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", + "valueType": { + "$id": "560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "561", + "kind": "enumvalue", + "name": "max_output_tokens", + "value": "max_output_tokens", + "valueType": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "559" + }, + "decorators": [] + }, + { + "$id": "563", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "559" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "565", + "kind": "enum", + "name": "CreateModerationRequestModel", + "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", + "valueType": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "567", + "kind": "enumvalue", + "name": "text-moderation-latest", + "value": "text-moderation-latest", + "valueType": { + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "565" + }, + "decorators": [] + }, + { + "$id": "569", + "kind": "enumvalue", + "name": "text-moderation-stable", + "value": "text-moderation-stable", + "valueType": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "565" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "571", + "kind": "enum", + "name": "ListModelsResponse_object", + "valueType": { + "$id": "572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "573", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "572" + }, + "enumType": { + "$ref": "571" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListModelsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "574", + "kind": "enum", + "name": "Model_object", + "valueType": { + "$id": "575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "576", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "575" + }, + "enumType": { + "$ref": "574" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Model_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "577", + "kind": "enum", + "name": "DeleteModelResponse_object", + "valueType": { + "$id": "578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "579", + "kind": "enumvalue", + "name": "model", + "value": "model", + "description": "model", + "valueType": { + "$ref": "578" + }, + "enumType": { + "$ref": "577" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteModelResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "580", + "kind": "enum", + "name": "MessageObject_object", + "valueType": { + "$id": "581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "582", + "kind": "enumvalue", + "name": "thread.message", + "value": "thread.message", + "description": "thread.message", + "valueType": { + "$ref": "581" + }, + "enumType": { + "$ref": "580" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "583", + "kind": "enum", + "name": "MessageObjectStatus", + "crossLanguageDefinitionId": "MessageObject.status.anonymous", + "valueType": { + "$id": "584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "585", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + }, + { + "$id": "587", + "kind": "enumvalue", + "name": "incomplete", + "value": "incomplete", + "valueType": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + }, + { + "$id": "589", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "583" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "591", + "kind": "enum", + "name": "MessageObjectIncompleteDetailsReason", + "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", + "valueType": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "593", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "595", + "kind": "enumvalue", + "name": "max_tokens", + "value": "max_tokens", + "valueType": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "597", + "kind": "enumvalue", + "name": "run_cancelled", + "value": "run_cancelled", + "valueType": { + "$id": "598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "599", + "kind": "enumvalue", + "name": "run_expired", + "value": "run_expired", + "valueType": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + }, + { + "$id": "601", + "kind": "enumvalue", + "name": "run_failed", + "value": "run_failed", + "valueType": { + "$id": "602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "591" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "603", + "kind": "enum", + "name": "MessageObjectRole", + "crossLanguageDefinitionId": "MessageObject.role.anonymous", + "valueType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "605", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "603" + }, + "decorators": [] + }, + { + "$id": "607", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "603" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "609", + "kind": "enum", + "name": "ListMessagesRequestOrder", + "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", + "valueType": { + "$id": "610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "611", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "609" + }, + "decorators": [] + }, + { + "$id": "613", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "609" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "615", + "kind": "enum", + "name": "ListMessagesResponse_object", + "valueType": { + "$id": "616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "617", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "616" + }, + "enumType": { + "$ref": "615" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListMessagesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "618", + "kind": "enum", + "name": "DeleteMessageResponse_object", + "valueType": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "620", + "kind": "enumvalue", + "name": "thread.message.deleted", + "value": "thread.message.deleted", + "description": "thread.message.deleted", + "valueType": { + "$ref": "619" + }, + "enumType": { + "$ref": "618" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteMessageResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "621", + "kind": "enum", + "name": "CreateImageRequestModel", + "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", + "valueType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "623", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "621" + }, + "decorators": [] + }, + { + "$id": "625", + "kind": "enumvalue", + "name": "dall-e-3", + "value": "dall-e-3", + "valueType": { + "$id": "626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "621" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "627", + "kind": "enum", + "name": "CreateImageRequestQuality", + "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", + "valueType": { + "$id": "628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "629", + "kind": "enumvalue", + "name": "standard", + "value": "standard", + "valueType": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "627" + }, + "decorators": [] + }, + { + "$id": "631", + "kind": "enumvalue", + "name": "hd", + "value": "hd", + "valueType": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "627" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "633", + "kind": "enum", + "name": "CreateImageRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", + "valueType": { + "$id": "634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "635", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "633" + }, + "decorators": [] + }, + { + "$id": "637", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "633" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "639", + "kind": "enum", + "name": "CreateImageRequestSize", + "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", + "valueType": { + "$id": "640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "641", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "643", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "645", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "647", + "kind": "enumvalue", + "name": "1792x1024", + "value": "1792x1024", + "valueType": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + }, + { + "$id": "649", + "kind": "enumvalue", + "name": "1024x1792", + "value": "1024x1792", + "valueType": { + "$id": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "639" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "651", + "kind": "enum", + "name": "CreateImageRequestStyle", + "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", + "valueType": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "653", + "kind": "enumvalue", + "name": "vivid", + "value": "vivid", + "valueType": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "651" + }, + "decorators": [] + }, + { + "$id": "655", + "kind": "enumvalue", + "name": "natural", + "value": "natural", + "valueType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "651" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "657", + "kind": "enum", + "name": "CreateImageEditRequestModel", + "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", + "valueType": { + "$id": "658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "659", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "657" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "661", + "kind": "enum", + "name": "CreateImageEditRequestSize", + "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", + "valueType": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "663", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + }, + { + "$id": "665", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + }, + { + "$id": "667", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "661" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "669", + "kind": "enum", + "name": "CreateImageEditRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", + "valueType": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "671", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "669" + }, + "decorators": [] + }, + { + "$id": "673", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "669" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "675", + "kind": "enum", + "name": "CreateImageVariationRequestModel", + "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", + "valueType": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "677", + "kind": "enumvalue", + "name": "dall-e-2", + "value": "dall-e-2", + "valueType": { + "$id": "678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "675" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "679", + "kind": "enum", + "name": "CreateImageVariationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", + "valueType": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "681", + "kind": "enumvalue", + "name": "url", + "value": "url", + "valueType": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "679" + }, + "decorators": [] + }, + { + "$id": "683", + "kind": "enumvalue", + "name": "b64_json", + "value": "b64_json", + "valueType": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "679" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "685", + "kind": "enum", + "name": "CreateImageVariationRequestSize", + "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", + "valueType": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "687", + "kind": "enumvalue", + "name": "256x256", + "value": "256x256", + "valueType": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + }, + { + "$id": "689", + "kind": "enumvalue", + "name": "512x512", + "value": "512x512", + "valueType": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + }, + { + "$id": "691", + "kind": "enumvalue", + "name": "1024x1024", + "value": "1024x1024", + "valueType": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "685" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "693", + "kind": "enum", + "name": "CreateFineTuningJobRequestModel", + "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", + "valueType": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "695", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "697", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "699", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + }, + { + "$id": "701", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "693" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "703", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "705", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "703" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "707", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "709", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "707" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "711", + "kind": "enum", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "713", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "711" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "715", + "kind": "enum", + "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", + "valueType": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "717", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "715" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "719", + "kind": "enum", + "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", + "valueType": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "721", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "719" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "723", + "kind": "enum", + "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", + "valueType": { + "$id": "724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "725", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "723" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "727", + "kind": "enum", + "name": "FineTuningJob_object", + "valueType": { + "$id": "728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "729", + "kind": "enumvalue", + "name": "fine_tuning.job", + "value": "fine_tuning.job", + "description": "fine_tuning.job", + "valueType": { + "$ref": "728" + }, + "enumType": { + "$ref": "727" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJob_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "730", + "kind": "enum", + "name": "FineTuningJobStatus", + "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", + "valueType": { + "$id": "731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "732", + "kind": "enumvalue", + "name": "validating_files", + "value": "validating_files", + "valueType": { + "$id": "733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "734", + "kind": "enumvalue", + "name": "queued", + "value": "queued", + "valueType": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "736", + "kind": "enumvalue", + "name": "running", + "value": "running", + "valueType": { + "$id": "737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "738", + "kind": "enumvalue", + "name": "succeeded", + "value": "succeeded", + "valueType": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "740", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + }, + { + "$id": "742", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "730" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "744", + "kind": "enum", + "name": "ListPaginatedFineTuningJobsResponse_object", + "valueType": { + "$id": "745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "746", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "745" + }, + "enumType": { + "$ref": "744" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListPaginatedFineTuningJobsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "747", + "kind": "enum", + "name": "FineTuningJobCheckpoint_object", + "valueType": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "749", + "kind": "enumvalue", + "name": "fine_tuning.job.checkpoint", + "value": "fine_tuning.job.checkpoint", + "description": "fine_tuning.job.checkpoint", + "valueType": { + "$ref": "748" + }, + "enumType": { + "$ref": "747" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobCheckpoint_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "750", + "kind": "enum", + "name": "ListFineTuningJobCheckpointsResponse_object", + "valueType": { + "$id": "751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "752", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "751" + }, + "enumType": { + "$ref": "750" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobCheckpointsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "753", + "kind": "enum", + "name": "FineTuningJobEventLevel", + "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", + "valueType": { + "$id": "754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "755", + "kind": "enumvalue", + "name": "info", + "value": "info", + "valueType": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + }, + { + "$id": "757", + "kind": "enumvalue", + "name": "warn", + "value": "warn", + "valueType": { + "$id": "758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + }, + { + "$id": "759", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "753" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "761", + "kind": "enum", + "name": "FineTuningJobEvent_object", + "valueType": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "763", + "kind": "enumvalue", + "name": "fine_tuning.job.event", + "value": "fine_tuning.job.event", + "description": "fine_tuning.job.event", + "valueType": { + "$ref": "762" + }, + "enumType": { + "$ref": "761" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The FineTuningJobEvent_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "764", + "kind": "enum", + "name": "ListFineTuningJobEventsResponse_object", + "valueType": { + "$id": "765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "766", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "765" + }, + "enumType": { + "$ref": "764" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFineTuningJobEventsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "767", + "kind": "enum", + "name": "CreateFileRequestPurpose", + "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", + "valueType": { + "$id": "768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "769", + "kind": "enumvalue", + "name": "assistants", + "value": "assistants", + "valueType": { + "$id": "770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "771", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "valueType": { + "$id": "772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "773", + "kind": "enumvalue", + "name": "fine-tune", + "value": "fine-tune", + "valueType": { + "$id": "774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + }, + { + "$id": "775", + "kind": "enumvalue", + "name": "vision", + "value": "vision", + "valueType": { + "$id": "776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "767" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "777", + "kind": "enum", + "name": "ListFilesResponse_object", + "valueType": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "779", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "778" + }, + "enumType": { + "$ref": "777" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListFilesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "780", + "kind": "enum", + "name": "DeleteFileResponse_object", + "valueType": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "782", + "kind": "enumvalue", + "name": "file", + "value": "file", + "description": "file", + "valueType": { + "$ref": "781" + }, + "enumType": { + "$ref": "780" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteFileResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "783", + "kind": "enum", + "name": "CreateEmbeddingRequestModel", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", + "valueType": { + "$id": "784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "785", + "kind": "enumvalue", + "name": "text-embedding-ada-002", + "value": "text-embedding-ada-002", + "valueType": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + }, + { + "$id": "787", + "kind": "enumvalue", + "name": "text-embedding-3-small", + "value": "text-embedding-3-small", + "valueType": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + }, + { + "$id": "789", + "kind": "enumvalue", + "name": "text-embedding-3-large", + "value": "text-embedding-3-large", + "valueType": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "783" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "791", + "kind": "enum", + "name": "CreateEmbeddingRequestEncodingFormat", + "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", + "valueType": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "793", + "kind": "enumvalue", + "name": "float", + "value": "float", + "valueType": { + "$id": "794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "791" + }, + "decorators": [] + }, + { + "$id": "795", + "kind": "enumvalue", + "name": "base64", + "value": "base64", + "valueType": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "791" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "797", + "kind": "enum", + "name": "Embedding_object", + "valueType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "799", + "kind": "enumvalue", + "name": "embedding", + "value": "embedding", + "description": "embedding", + "valueType": { + "$ref": "798" + }, + "enumType": { + "$ref": "797" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Embedding_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "800", + "kind": "enum", + "name": "CreateEmbeddingResponse_object", + "valueType": { + "$id": "801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "802", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "801" + }, + "enumType": { + "$ref": "800" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateEmbeddingResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "803", + "kind": "enum", + "name": "CreateCompletionRequestModel", + "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", + "valueType": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "805", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-instruct", + "value": "gpt-3.5-turbo-instruct", + "valueType": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + }, + { + "$id": "807", + "kind": "enumvalue", + "name": "davinci-002", + "value": "davinci-002", + "valueType": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + }, + { + "$id": "809", + "kind": "enumvalue", + "name": "babbage-002", + "value": "babbage-002", + "valueType": { + "$id": "810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "803" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "811", + "kind": "enum", + "name": "CreateCompletionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "813", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + }, + { + "$id": "815", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + }, + { + "$id": "817", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "811" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "819", + "kind": "enum", + "name": "CreateCompletionResponse_object", + "valueType": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "821", + "kind": "enumvalue", + "name": "text_completion", + "value": "text_completion", + "description": "text_completion", + "valueType": { + "$ref": "820" + }, + "enumType": { + "$ref": "819" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "822", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartText_type", + "valueType": { + "$id": "823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "824", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "823" + }, + "enumType": { + "$ref": "822" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartText_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "825", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImage_type", + "valueType": { + "$id": "826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "827", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "826" + }, + "enumType": { + "$ref": "825" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartImage_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "828", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", + "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", + "valueType": { + "$id": "829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "830", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + }, + { + "$id": "832", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + }, + { + "$id": "834", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "828" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "836", + "kind": "enum", + "name": "ChatCompletionRequestMessageContentPartRefusal_type", + "valueType": { + "$id": "837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "838", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "837" + }, + "enumType": { + "$ref": "836" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionRequestMessageContentPartRefusal_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "839", + "kind": "enum", + "name": "ChatCompletionMessageToolCall_type", + "valueType": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "841", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "840" + }, + "enumType": { + "$ref": "839" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCall_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "842", + "kind": "enum", + "name": "CreateChatCompletionRequestModel", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", + "valueType": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "844", + "kind": "enumvalue", + "name": "o1-preview", + "value": "o1-preview", + "valueType": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "846", + "kind": "enumvalue", + "name": "o1-preview-2024-09-12", + "value": "o1-preview-2024-09-12", + "valueType": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "848", + "kind": "enumvalue", + "name": "o1-mini", + "value": "o1-mini", + "valueType": { + "$id": "849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "850", + "kind": "enumvalue", + "name": "o1-mini-2024-09-12", + "value": "o1-mini-2024-09-12", + "valueType": { + "$id": "851", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "852", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "854", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "856", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "858", + "kind": "enumvalue", + "name": "chatgpt-4o-latest", + "value": "chatgpt-4o-latest", + "valueType": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "860", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "862", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "864", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "866", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "868", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "870", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "872", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "874", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "876", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "878", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "880", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "882", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "884", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "886", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "888", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "890", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "892", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0301", + "value": "gpt-3.5-turbo-0301", + "valueType": { + "$id": "893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "894", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "895", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "896", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "898", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + }, + { + "$id": "900", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "842" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "902", + "kind": "enum", + "name": "CreateChatCompletionRequestServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", + "valueType": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "904", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "902" + }, + "decorators": [] + }, + { + "$id": "906", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "902" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "908", + "kind": "enum", + "name": "ChatCompletionTool_type", + "valueType": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "910", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "909" + }, + "enumType": { + "$ref": "908" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionTool_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "911", + "kind": "enum", + "name": "CreateChatCompletionRequestToolChoice", + "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", + "valueType": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "913", + "kind": "enumvalue", + "name": "none", + "value": "none", + "valueType": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + }, + { + "$id": "915", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + }, + { + "$id": "917", + "kind": "enumvalue", + "name": "required", + "value": "required", + "valueType": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "911" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "919", + "kind": "enum", + "name": "ChatCompletionNamedToolChoice_type", + "valueType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "921", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "920" + }, + "enumType": { + "$ref": "919" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionNamedToolChoice_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "922", + "kind": "enum", + "name": "CreateChatCompletionResponseChoiceFinishReason1", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "924", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "926", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "928", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "930", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + }, + { + "$id": "932", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "922" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "934", + "kind": "enum", + "name": "ChatCompletionResponseMessage_role", + "valueType": { + "$id": "935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "936", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "935" + }, + "enumType": { + "$ref": "934" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionResponseMessage_role", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "937", + "kind": "enum", + "name": "CreateChatCompletionResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", + "valueType": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "939", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + }, + { + "$id": "941", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "937" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "943", + "kind": "enum", + "name": "CreateChatCompletionResponse_object", + "valueType": { + "$id": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "945", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "944" + }, + "enumType": { + "$ref": "943" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "946", + "kind": "enum", + "name": "CreateBatchRequestEndpoint", + "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", + "valueType": { + "$id": "947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "948", + "kind": "enumvalue", + "name": "/v1/chat/completions", + "value": "/v1/chat/completions", + "valueType": { + "$id": "949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "946" + }, + "decorators": [] + }, + { + "$id": "950", + "kind": "enumvalue", + "name": "/v1/embeddings", + "value": "/v1/embeddings", + "valueType": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "946" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "952", + "kind": "enum", + "name": "CreateBatchRequest_completion_window", + "valueType": { + "$id": "953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "954", + "kind": "enumvalue", + "name": "24h", + "value": "24h", + "description": "24h", + "valueType": { + "$ref": "953" + }, + "enumType": { + "$ref": "952" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateBatchRequest_completion_window", + "isFixed": false, + "isFlags": false, + "usage": "Spread,Json", + "decorators": [] + }, + { + "$id": "955", + "kind": "enum", + "name": "Batch_object", + "valueType": { + "$id": "956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "957", + "kind": "enumvalue", + "name": "batch", + "value": "batch", + "description": "batch", + "valueType": { + "$ref": "956" + }, + "enumType": { + "$ref": "955" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The Batch_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "958", + "kind": "enum", + "name": "BatchErrors_object", + "valueType": { + "$id": "959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "960", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "959" + }, + "enumType": { + "$ref": "958" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchErrors_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "961", + "kind": "enum", + "name": "BatchStatus", + "crossLanguageDefinitionId": "Batch.status.anonymous", + "valueType": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "963", + "kind": "enumvalue", + "name": "validating", + "value": "validating", + "valueType": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "965", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "967", + "kind": "enumvalue", + "name": "in_progress", + "value": "in_progress", + "valueType": { + "$id": "968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "969", + "kind": "enumvalue", + "name": "finalizing", + "value": "finalizing", + "valueType": { + "$id": "970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "971", + "kind": "enumvalue", + "name": "completed", + "value": "completed", + "valueType": { + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "973", + "kind": "enumvalue", + "name": "expired", + "value": "expired", + "valueType": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "975", + "kind": "enumvalue", + "name": "cancelling", + "value": "cancelling", + "valueType": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + }, + { + "$id": "977", + "kind": "enumvalue", + "name": "cancelled", + "value": "cancelled", + "valueType": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "961" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "979", + "kind": "enum", + "name": "ListBatchesResponse_object", + "valueType": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "981", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "980" + }, + "enumType": { + "$ref": "979" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListBatchesResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "982", + "kind": "enum", + "name": "CreateAssistantRequestModel", + "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", + "valueType": { + "$id": "983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "984", + "kind": "enumvalue", + "name": "gpt-4o", + "value": "gpt-4o", + "valueType": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "986", + "kind": "enumvalue", + "name": "gpt-4o-2024-08-06", + "value": "gpt-4o-2024-08-06", + "valueType": { + "$id": "987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "988", + "kind": "enumvalue", + "name": "gpt-4o-2024-05-13", + "value": "gpt-4o-2024-05-13", + "valueType": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "990", + "kind": "enumvalue", + "name": "gpt-4o-mini", + "value": "gpt-4o-mini", + "valueType": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "992", + "kind": "enumvalue", + "name": "gpt-4o-mini-2024-07-18", + "value": "gpt-4o-mini-2024-07-18", + "valueType": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "994", + "kind": "enumvalue", + "name": "gpt-4-turbo", + "value": "gpt-4-turbo", + "valueType": { + "$id": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "996", + "kind": "enumvalue", + "name": "gpt-4-turbo-2024-04-09", + "value": "gpt-4-turbo-2024-04-09", + "valueType": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "998", + "kind": "enumvalue", + "name": "gpt-4-0125-preview", + "value": "gpt-4-0125-preview", + "valueType": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1000", + "kind": "enumvalue", + "name": "gpt-4-turbo-preview", + "value": "gpt-4-turbo-preview", + "valueType": { + "$id": "1001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1002", + "kind": "enumvalue", + "name": "gpt-4-1106-preview", + "value": "gpt-4-1106-preview", + "valueType": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1004", + "kind": "enumvalue", + "name": "gpt-4-vision-preview", + "value": "gpt-4-vision-preview", + "valueType": { + "$id": "1005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1006", + "kind": "enumvalue", + "name": "gpt-4", + "value": "gpt-4", + "valueType": { + "$id": "1007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1008", + "kind": "enumvalue", + "name": "gpt-4-0314", + "value": "gpt-4-0314", + "valueType": { + "$id": "1009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1010", + "kind": "enumvalue", + "name": "gpt-4-0613", + "value": "gpt-4-0613", + "valueType": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1012", + "kind": "enumvalue", + "name": "gpt-4-32k", + "value": "gpt-4-32k", + "valueType": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1014", + "kind": "enumvalue", + "name": "gpt-4-32k-0314", + "value": "gpt-4-32k-0314", + "valueType": { + "$id": "1015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1016", + "kind": "enumvalue", + "name": "gpt-4-32k-0613", + "value": "gpt-4-32k-0613", + "valueType": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1018", + "kind": "enumvalue", + "name": "gpt-3.5-turbo", + "value": "gpt-3.5-turbo", + "valueType": { + "$id": "1019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1020", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k", + "value": "gpt-3.5-turbo-16k", + "valueType": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1022", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0613", + "value": "gpt-3.5-turbo-0613", + "valueType": { + "$id": "1023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1024", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-1106", + "value": "gpt-3.5-turbo-1106", + "valueType": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1026", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-0125", + "value": "gpt-3.5-turbo-0125", + "valueType": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + }, + { + "$id": "1028", + "kind": "enumvalue", + "name": "gpt-3.5-turbo-16k-0613", + "value": "gpt-3.5-turbo-16k-0613", + "valueType": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "982" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1030", + "kind": "enum", + "name": "AssistantObject_object", + "valueType": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1032", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "description": "assistant", + "valueType": { + "$ref": "1031" + }, + "enumType": { + "$ref": "1030" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The AssistantObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1033", + "kind": "enum", + "name": "ListAssistantsRequestOrder", + "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", + "valueType": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1035", + "kind": "enumvalue", + "name": "asc", + "value": "asc", + "valueType": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1033" + }, + "decorators": [] + }, + { + "$id": "1037", + "kind": "enumvalue", + "name": "desc", + "value": "desc", + "valueType": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1033" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1039", + "kind": "enum", + "name": "ListAssistantsResponse_object", + "valueType": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1041", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1040" + }, + "enumType": { + "$ref": "1039" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListAssistantsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1042", + "kind": "enum", + "name": "DeleteAssistantResponse_object", + "valueType": { + "$id": "1043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1044", + "kind": "enumvalue", + "name": "assistant.deleted", + "value": "assistant.deleted", + "description": "assistant.deleted", + "valueType": { + "$ref": "1043" + }, + "enumType": { + "$ref": "1042" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The DeleteAssistantResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1045", + "kind": "enum", + "name": "CreateSpeechRequestModel", + "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", + "valueType": { + "$id": "1046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1047", + "kind": "enumvalue", + "name": "tts-1", + "value": "tts-1", + "valueType": { + "$id": "1048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1045" + }, + "decorators": [] + }, + { + "$id": "1049", + "kind": "enumvalue", + "name": "tts-1-hd", + "value": "tts-1-hd", + "valueType": { + "$id": "1050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1045" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1051", + "kind": "enum", + "name": "CreateSpeechRequestVoice", + "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", + "valueType": { + "$id": "1052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1053", + "kind": "enumvalue", + "name": "alloy", + "value": "alloy", + "valueType": { + "$id": "1054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1055", + "kind": "enumvalue", + "name": "echo", + "value": "echo", + "valueType": { + "$id": "1056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1057", + "kind": "enumvalue", + "name": "fable", + "value": "fable", + "valueType": { + "$id": "1058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1059", + "kind": "enumvalue", + "name": "onyx", + "value": "onyx", + "valueType": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1061", + "kind": "enumvalue", + "name": "nova", + "value": "nova", + "valueType": { + "$id": "1062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + }, + { + "$id": "1063", + "kind": "enumvalue", + "name": "shimmer", + "value": "shimmer", + "valueType": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1051" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1065", + "kind": "enum", + "name": "CreateSpeechRequestResponseFormat", + "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", + "valueType": { + "$id": "1066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1067", + "kind": "enumvalue", + "name": "mp3", + "value": "mp3", + "valueType": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1069", + "kind": "enumvalue", + "name": "opus", + "value": "opus", + "valueType": { + "$id": "1070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1071", + "kind": "enumvalue", + "name": "aac", + "value": "aac", + "valueType": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1073", + "kind": "enumvalue", + "name": "flac", + "value": "flac", + "valueType": { + "$id": "1074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1075", + "kind": "enumvalue", + "name": "wav", + "value": "wav", + "valueType": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + }, + { + "$id": "1077", + "kind": "enumvalue", + "name": "pcm", + "value": "pcm", + "valueType": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1065" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "1079", + "kind": "enum", + "name": "CreateTranscriptionRequestModel", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", + "valueType": { + "$id": "1080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1081", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1079" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1083", + "kind": "enum", + "name": "CreateTranscriptionRequestResponseFormat1", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", + "valueType": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1085", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1087", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1089", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1091", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + }, + { + "$id": "1093", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1083" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1095", + "kind": "enum", + "name": "CreateTranscriptionRequestTimestampGranularity", + "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", + "valueType": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1097", + "kind": "enumvalue", + "name": "word", + "value": "word", + "valueType": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1095" + }, + "decorators": [] + }, + { + "$id": "1099", + "kind": "enumvalue", + "name": "segment", + "value": "segment", + "valueType": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1095" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1101", + "kind": "enum", + "name": "CreateTranscriptionResponseVerboseJson_task", + "valueType": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1103", + "kind": "enumvalue", + "name": "transcribe", + "value": "transcribe", + "description": "transcribe", + "valueType": { + "$ref": "1102" + }, + "enumType": { + "$ref": "1101" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranscriptionResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1104", + "kind": "enum", + "name": "CreateTranslationRequestModel", + "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1106", + "kind": "enumvalue", + "name": "whisper-1", + "value": "whisper-1", + "valueType": { + "$id": "1107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1104" + }, + "decorators": [] + } + ], + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1108", + "kind": "enum", + "name": "CreateTranslationRequestResponseFormat", + "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", + "valueType": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1110", + "kind": "enumvalue", + "name": "json", + "value": "json", + "valueType": { + "$id": "1111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1112", + "kind": "enumvalue", + "name": "text", + "value": "text", + "valueType": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1114", + "kind": "enumvalue", + "name": "srt", + "value": "srt", + "valueType": { + "$id": "1115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1116", + "kind": "enumvalue", + "name": "verbose_json", + "value": "verbose_json", + "valueType": { + "$id": "1117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + }, + { + "$id": "1118", + "kind": "enumvalue", + "name": "vtt", + "value": "vtt", + "valueType": { + "$id": "1119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1108" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1120", + "kind": "enum", + "name": "CreateTranslationResponseVerboseJson_task", + "valueType": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1122", + "kind": "enumvalue", + "name": "translate", + "value": "translate", + "description": "translate", + "valueType": { + "$ref": "1121" + }, + "enumType": { + "$ref": "1120" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateTranslationResponseVerboseJson_task", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "1123", + "kind": "enum", + "name": "BatchRequestInput_method", + "valueType": { + "$id": "1124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1125", + "kind": "enumvalue", + "name": "POST", + "value": "POST", + "description": "POST", + "valueType": { + "$ref": "1124" + }, + "enumType": { + "$ref": "1123" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The BatchRequestInput_method", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "1126", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1128", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1130", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1132", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + }, + { + "$id": "1134", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1126" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1136", + "kind": "enum", + "name": "CreateChatCompletionFunctionResponse_object", + "valueType": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1138", + "kind": "enumvalue", + "name": "chat.completion", + "value": "chat.completion", + "description": "chat.completion", + "valueType": { + "$ref": "1137" + }, + "enumType": { + "$ref": "1136" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionFunctionResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1139", + "kind": "enum", + "name": "ChatCompletionMessageToolCallChunk_type", + "valueType": { + "$id": "1140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1141", + "kind": "enumvalue", + "name": "function", + "value": "function", + "description": "function", + "valueType": { + "$ref": "1140" + }, + "enumType": { + "$ref": "1139" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ChatCompletionMessageToolCallChunk_type", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1142", + "kind": "enum", + "name": "ChatCompletionStreamResponseDeltaRole", + "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", + "valueType": { + "$id": "1143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1144", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1146", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1148", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + }, + { + "$id": "1150", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1142" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1152", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseChoiceFinishReason", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", + "valueType": { + "$id": "1153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1154", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "1155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1156", + "kind": "enumvalue", + "name": "length", + "value": "length", + "valueType": { + "$id": "1157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1158", + "kind": "enumvalue", + "name": "tool_calls", + "value": "tool_calls", + "valueType": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1160", + "kind": "enumvalue", + "name": "content_filter", + "value": "content_filter", + "valueType": { + "$id": "1161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + }, + { + "$id": "1162", + "kind": "enumvalue", + "name": "function_call", + "value": "function_call", + "valueType": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1152" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1164", + "kind": "enum", + "name": "CreateChatCompletionStreamResponseServiceTier", + "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", + "valueType": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1166", + "kind": "enumvalue", + "name": "scale", + "value": "scale", + "valueType": { + "$id": "1167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1164" + }, + "decorators": [] + }, + { + "$id": "1168", + "kind": "enumvalue", + "name": "default", + "value": "default", + "valueType": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1164" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1170", + "kind": "enum", + "name": "CreateChatCompletionStreamResponse_object", + "valueType": { + "$id": "1171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1172", + "kind": "enumvalue", + "name": "chat.completion.chunk", + "value": "chat.completion.chunk", + "description": "chat.completion.chunk", + "valueType": { + "$ref": "1171" + }, + "enumType": { + "$ref": "1170" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The CreateChatCompletionStreamResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1173", + "kind": "enum", + "name": "MessageDeltaContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1175", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + }, + { + "$id": "1177", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + }, + { + "$id": "1179", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1173" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1181", + "kind": "enum", + "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1183", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + }, + { + "$id": "1185", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + }, + { + "$id": "1187", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1181" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1189", + "kind": "enum", + "name": "MessageContentImageFileObject_type", + "valueType": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1191", + "kind": "enumvalue", + "name": "image_file", + "value": "image_file", + "description": "image_file", + "valueType": { + "$ref": "1190" + }, + "enumType": { + "$ref": "1189" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageFileObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1192", + "kind": "enum", + "name": "MessageContentImageFileObjectImageFileDetail", + "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", + "valueType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1194", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + }, + { + "$id": "1196", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + }, + { + "$id": "1198", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1192" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1200", + "kind": "enum", + "name": "MessageContentTextObject_type", + "valueType": { + "$id": "1201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1202", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1201" + }, + "enumType": { + "$ref": "1200" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1203", + "kind": "enum", + "name": "MessageContentRefusalObject_type", + "valueType": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1205", + "kind": "enumvalue", + "name": "refusal", + "value": "refusal", + "description": "refusal", + "valueType": { + "$ref": "1204" + }, + "enumType": { + "$ref": "1203" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentRefusalObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1206", + "kind": "enum", + "name": "MessageContentImageUrlObject_type", + "valueType": { + "$id": "1207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1208", + "kind": "enumvalue", + "name": "image_url", + "value": "image_url", + "description": "image_url", + "valueType": { + "$ref": "1207" + }, + "enumType": { + "$ref": "1206" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageContentImageUrlObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1209", + "kind": "enum", + "name": "MessageContentImageUrlObjectImageUrlDetail", + "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", + "valueType": { + "$id": "1210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1211", + "kind": "enumvalue", + "name": "auto", + "value": "auto", + "valueType": { + "$id": "1212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1213", + "kind": "enumvalue", + "name": "low", + "value": "low", + "valueType": { + "$id": "1214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + }, + { + "$id": "1215", + "kind": "enumvalue", + "name": "high", + "value": "high", + "valueType": { + "$id": "1216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1209" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1217", + "kind": "enum", + "name": "MessageDeltaObject_object", + "valueType": { + "$id": "1218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1219", + "kind": "enumvalue", + "name": "thread.message.delta", + "value": "thread.message.delta", + "description": "thread.message.delta", + "valueType": { + "$ref": "1218" + }, + "enumType": { + "$ref": "1217" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1220", + "kind": "enum", + "name": "MessageDeltaObjectDeltaRole", + "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", + "valueType": { + "$id": "1221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1222", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + }, + { + "$id": "1224", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1220" + }, + "decorators": [] + } + ], + "isFixed": true, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1226", + "kind": "enum", + "name": "MessageRequestContentTextObject_type", + "valueType": { + "$id": "1227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1228", + "kind": "enumvalue", + "name": "text", + "value": "text", + "description": "text", + "valueType": { + "$ref": "1227" + }, + "enumType": { + "$ref": "1226" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The MessageRequestContentTextObject_type", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + }, + { + "$id": "1229", + "kind": "enum", + "name": "RunStepDeltaObject_object", + "valueType": { + "$id": "1230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1231", + "kind": "enumvalue", + "name": "thread.run.step.delta", + "value": "thread.run.step.delta", + "description": "thread.run.step.delta", + "valueType": { + "$ref": "1230" + }, + "enumType": { + "$ref": "1229" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The RunStepDeltaObject_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1232", + "kind": "enum", + "name": "ListThreadsResponse_object", + "valueType": { + "$id": "1233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1234", + "kind": "enumvalue", + "name": "list", + "value": "list", + "description": "list", + "valueType": { + "$ref": "1233" + }, + "enumType": { + "$ref": "1232" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The ListThreadsResponse_object", + "isFixed": false, + "isFlags": false, + "usage": "Output", + "decorators": [] + }, + { + "$id": "1235", + "kind": "enum", + "name": "ChatCompletionRole", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", + "valueType": { + "$id": "1236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "1237", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "1238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1239", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "1240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1241", + "kind": "enumvalue", + "name": "assistant", + "value": "assistant", + "valueType": { + "$id": "1242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1243", + "kind": "enumvalue", + "name": "tool", + "value": "tool", + "valueType": { + "$id": "1244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + }, + { + "$id": "1245", + "kind": "enumvalue", + "name": "function", + "value": "function", + "valueType": { + "$id": "1246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "1235" + }, + "decorators": [] + } + ], + "access": "public", + "description": "The role of the author of a message", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output", + "decorators": [] + } + ], + "Models": [ + { + "$id": "1247", + "kind": "model", + "name": "CreateUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1248", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to upload.", + "type": { + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" + }, + { + "$id": "1250", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" + }, + { + "$id": "1251", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The number of bytes in the file you are uploading.", + "type": { + "$id": "1252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" + }, + { + "$id": "1253", + "kind": "property", + "name": "mime_type", + "serializedName": "mime_type", + "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", + "type": { + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" + } + ] + }, + { + "$id": "1255", + "kind": "model", + "name": "Upload", + "crossLanguageDefinitionId": "OpenAI.Upload", + "usage": "Output,Json", + "description": "The Upload object can accept byte chunks in the form of Parts.", + "decorators": [], + "properties": [ + { + "$id": "1256", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The Upload unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.id" + }, + { + "$id": "1258", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1259", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1260", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.created_at" + }, + { + "$id": "1261", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file to be uploaded.", + "type": { + "$id": "1262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.filename" + }, + { + "$id": "1263", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The intended number of bytes to be uploaded.", + "type": { + "$id": "1264", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.bytes" + }, + { + "$id": "1265", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", + "type": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.purpose" + }, + { + "$id": "1267", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the Upload.", + "type": { + "$ref": "12" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.status" + }, + { + "$id": "1268", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the Upload was created.", + "type": { + "$id": "1269", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1270", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" + }, + { + "$id": "1271", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"upload\".", + "type": { + "$id": "1272", + "kind": "constant", + "valueType": { + "$ref": "22" + }, + "value": "upload", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.object" + }, + { + "$id": "1273", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The ready File object after the Upload is completed.", + "type": { + "$id": "1274", + "kind": "nullable", + "type": { + "$id": "1275", + "kind": "model", + "name": "OpenAIFile", + "crossLanguageDefinitionId": "OpenAI.OpenAIFile", + "usage": "Output,Json", + "description": "The `File` object represents a document that has been uploaded to OpenAI.", + "decorators": [], + "properties": [ + { + "$id": "1276", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The file identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "1277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" + }, + { + "$id": "1278", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "The size of the file, in bytes.", + "type": { + "$id": "1279", + "kind": "nullable", + "type": { + "$id": "1280", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" + }, + { + "$id": "1281", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the file was created.", + "type": { + "$id": "1282", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" + }, + { + "$id": "1284", + "kind": "property", + "name": "filename", + "serializedName": "filename", + "description": "The name of the file.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" + }, + { + "$id": "1286", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `file`.", + "type": { + "$id": "1287", + "kind": "constant", + "valueType": { + "$ref": "25" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" + }, + { + "$id": "1288", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", + "type": { + "$ref": "28" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" + }, + { + "$id": "1289", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" + }, + { + "$id": "1290", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", + "type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Upload.file" + } + ] + }, + { + "$ref": "1275" + }, + { + "$id": "1292", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "OpenAI.ErrorResponse", + "usage": "Output,Error,Json", + "decorators": [], + "properties": [ + { + "$id": "1293", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "1294", + "kind": "model", + "name": "Error", + "crossLanguageDefinitionId": "OpenAI.Error", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1295", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "1296", + "kind": "nullable", + "type": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.code" + }, + { + "$id": "1298", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "1299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.message" + }, + { + "$id": "1300", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "1301", + "kind": "nullable", + "type": { + "$id": "1302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.param" + }, + { + "$id": "1303", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Error.type" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" + } + ] + }, + { + "$ref": "1294" + }, + { + "$id": "1305", + "kind": "model", + "name": "AddUploadPartRequest", + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "1306", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The chunk of bytes for this Part.", + "type": { + "$id": "1307", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" + } + ] + }, + { + "$id": "1308", + "kind": "model", + "name": "UploadPart", + "crossLanguageDefinitionId": "OpenAI.UploadPart", + "usage": "Output,Json", + "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", + "decorators": [], + "properties": [ + { + "$id": "1309", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The upload Part unique identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.id" + }, + { + "$id": "1311", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the Part was created.", + "type": { + "$id": "1312", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1313", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" + }, + { + "$id": "1314", + "kind": "property", + "name": "upload_id", + "serializedName": "upload_id", + "description": "The ID of the Upload object that this Part was added to.", + "type": { + "$id": "1315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" + }, + { + "$id": "1316", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `upload.part`.", + "type": { + "$id": "1317", + "kind": "constant", + "valueType": { + "$ref": "52" + }, + "value": "upload.part", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UploadPart.object" + } + ] + }, + { + "$id": "1318", + "kind": "model", + "name": "CompleteUploadRequest", + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1319", + "kind": "property", + "name": "part_ids", + "serializedName": "part_ids", + "description": "The ordered list of Part IDs.", + "type": { + "$id": "1320", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" + }, + { + "$id": "1322", + "kind": "property", + "name": "md5", + "serializedName": "md5", + "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", + "type": { + "$id": "1323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" + } + ] + }, + { + "$id": "1324", + "kind": "model", + "name": "ListVectorStoresResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1325", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1326", + "kind": "constant", + "valueType": { + "$ref": "61" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" + }, + { + "$id": "1327", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1328", + "kind": "array", + "name": "ArrayVectorStoreObject", + "valueType": { + "$id": "1329", + "kind": "model", + "name": "VectorStoreObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", + "usage": "Output,Json", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", + "decorators": [], + "properties": [ + { + "$id": "1330", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" + }, + { + "$id": "1332", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store`.", + "type": { + "$id": "1333", + "kind": "constant", + "valueType": { + "$ref": "64" + }, + "value": "vector_store", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" + }, + { + "$id": "1334", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store was created.", + "type": { + "$id": "1335", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1336", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" + }, + { + "$id": "1337", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" + }, + { + "$id": "1339", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total number of bytes used by the files in the vector store.", + "type": { + "$id": "1340", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" + }, + { + "$id": "1341", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1342", + "kind": "model", + "name": "VectorStoreObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1343", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1344", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1345", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been successfully processed.", + "type": { + "$id": "1346", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" + }, + { + "$id": "1347", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1348", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" + }, + { + "$id": "1349", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that were cancelled.", + "type": { + "$id": "1350", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1351", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1352", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" + }, + { + "$id": "1353", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", + "type": { + "$ref": "67" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" + }, + { + "$id": "1354", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1355", + "kind": "model", + "name": "VectorStoreExpirationAfter", + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", + "usage": "Input,Output,Json", + "description": "The expiration policy for a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1356", + "kind": "property", + "name": "anchor", + "serializedName": "anchor", + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", + "type": { + "$id": "1357", + "kind": "constant", + "valueType": { + "$ref": "75" + }, + "value": "last_active_at", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" + }, + { + "$id": "1358", + "kind": "property", + "name": "days", + "serializedName": "days", + "description": "The number of days after the anchor time that the vector store will expire.", + "type": { + "$id": "1359", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" + }, + { + "$id": "1360", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", + "type": { + "$id": "1361", + "kind": "nullable", + "type": { + "$id": "1362", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1363", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" + }, + { + "$id": "1364", + "kind": "property", + "name": "last_active_at", + "serializedName": "last_active_at", + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", + "type": { + "$id": "1365", + "kind": "nullable", + "type": { + "$id": "1366", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1367", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" + }, + { + "$id": "1368", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1369", + "kind": "nullable", + "type": { + "$id": "1370", + "kind": "dict", + "keyType": { + "$id": "1371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" + }, + { + "$id": "1373", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" + }, + { + "$id": "1375", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" + }, + { + "$id": "1377", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1378", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" + } + ] + }, + { + "$ref": "1329" + }, + { + "$ref": "1342" + }, + { + "$ref": "1355" + }, + { + "$id": "1379", + "kind": "model", + "name": "CreateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1380", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1381", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" + }, + { + "$id": "1383", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" + }, + { + "$id": "1385", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$ref": "1355" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" + }, + { + "$id": "1386", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1387", + "kind": "union", + "name": "CreateVectorStoreRequestChunkingStrategy", + "variantTypes": [ + { + "$id": "1388", + "kind": "model", + "name": "AutoChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", + "usage": "Input,Json", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$id": "1389", + "kind": "model", + "name": "FileChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1390", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" + }, + "properties": [ + { + "$ref": "1390" + } + ], + "discriminatedSubtypes": { + "$id": "1392", + "auto": { + "$ref": "1388" + }, + "static": { + "$id": "1393", + "kind": "model", + "name": "StaticChunkingStrategyRequestParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", + "usage": "Input,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$ref": "1389" + }, + "properties": [ + { + "$id": "1394", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1395", + "kind": "constant", + "valueType": { + "$id": "1396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" + }, + { + "$id": "1397", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$id": "1398", + "kind": "model", + "name": "StaticChunkingStrategy", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1399", + "kind": "property", + "name": "max_chunk_size_tokens", + "serializedName": "max_chunk_size_tokens", + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", + "type": { + "$id": "1400", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" + }, + { + "$id": "1401", + "kind": "property", + "name": "chunk_overlap_tokens", + "serializedName": "chunk_overlap_tokens", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", + "type": { + "$id": "1402", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" + } + ] + } + } + }, + "properties": [ + { + "$id": "1403", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `auto`.", + "type": { + "$id": "1404", + "kind": "constant", + "valueType": { + "$id": "1405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" + } + ] + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" + }, + { + "$id": "1406", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1407", + "kind": "nullable", + "type": { + "$id": "1408", + "kind": "dict", + "keyType": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" + } + ] + }, + { + "$ref": "1388" + }, + { + "$ref": "1389" + }, + { + "$ref": "1393" + }, + { + "$ref": "1398" + }, + { + "$id": "1411", + "kind": "model", + "name": "UpdateVectorStoreRequest", + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1412", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the vector store.", + "type": { + "$id": "1413", + "kind": "nullable", + "type": { + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" + }, + { + "$id": "1415", + "kind": "property", + "name": "expires_after", + "serializedName": "expires_after", + "type": { + "$id": "1416", + "kind": "nullable", + "type": { + "$ref": "1355" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" + }, + { + "$id": "1417", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1418", + "kind": "nullable", + "type": { + "$id": "1419", + "kind": "dict", + "keyType": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" + } + ] + }, + { + "$id": "1422", + "kind": "model", + "name": "DeleteVectorStoreResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1423", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" + }, + { + "$id": "1425", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1426", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" + }, + { + "$id": "1427", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1428", + "kind": "constant", + "valueType": { + "$ref": "78" + }, + "value": "vector_store.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" + } + ] + }, + { + "$id": "1429", + "kind": "model", + "name": "ListVectorStoreFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1430", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1431", + "kind": "constant", + "valueType": { + "$ref": "97" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" + }, + { + "$id": "1432", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1433", + "kind": "array", + "name": "ArrayVectorStoreFileObject", + "valueType": { + "$id": "1434", + "kind": "model", + "name": "VectorStoreFileObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", + "usage": "Output,Json", + "description": "A list of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1435", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" + }, + { + "$id": "1437", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file`.", + "type": { + "$id": "1438", + "kind": "constant", + "valueType": { + "$ref": "100" + }, + "value": "vector_store.file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" + }, + { + "$id": "1439", + "kind": "property", + "name": "usage_bytes", + "serializedName": "usage_bytes", + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", + "type": { + "$id": "1440", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" + }, + { + "$id": "1441", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", + "type": { + "$id": "1442", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1443", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" + }, + { + "$id": "1444", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" + }, + { + "$id": "1446", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", + "type": { + "$ref": "103" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" + }, + { + "$id": "1447", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", + "type": { + "$id": "1448", + "kind": "nullable", + "type": { + "$id": "1449", + "kind": "model", + "name": "VectorStoreFileObjectLastError", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1450", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "113" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" + }, + { + "$id": "1451", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" + }, + { + "$id": "1453", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The strategy used to chunk the file.", + "type": { + "$id": "1454", + "kind": "union", + "name": "VectorStoreFileObjectChunkingStrategy", + "variantTypes": [ + { + "$id": "1455", + "kind": "model", + "name": "StaticChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "discriminatorValue": "static", + "decorators": [], + "baseModel": { + "$id": "1456", + "kind": "model", + "name": "FileChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1457", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" + }, + "properties": [ + { + "$ref": "1457" + } + ], + "discriminatedSubtypes": { + "$id": "1459", + "static": { + "$ref": "1455" + }, + "other": { + "$id": "1460", + "kind": "model", + "name": "OtherChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", + "usage": "Input,Output,Json", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", + "discriminatorValue": "other", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1461", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `other`.", + "type": { + "$id": "1462", + "kind": "constant", + "valueType": { + "$id": "1463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "other", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" + } + ] + }, + "auto": { + "$id": "1464", + "kind": "model", + "name": "AutoChunkingStrategyResponseParam", + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", + "access": "public", + "usage": "Input,Output", + "discriminatorValue": "auto", + "decorators": [], + "baseModel": { + "$ref": "1456" + }, + "properties": [ + { + "$id": "1465", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1466", + "kind": "constant", + "valueType": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" + } + ] + } + } + }, + "properties": [ + { + "$id": "1468", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `static`.", + "type": { + "$id": "1469", + "kind": "constant", + "valueType": { + "$id": "1470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "static", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" + }, + { + "$id": "1471", + "kind": "property", + "name": "static", + "serializedName": "static", + "type": { + "$ref": "1398" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" + } + ] + }, + { + "$ref": "1460" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" + }, + { + "$id": "1472", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" + }, + { + "$id": "1474", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" + }, + { + "$id": "1476", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1477", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" + } + ] + }, + { + "$ref": "1434" + }, + { + "$ref": "1449" + }, + { + "$ref": "1455" + }, + { + "$ref": "1456" + }, + { + "$ref": "1460" + }, + { + "$ref": "1464" + }, + { + "$id": "1478", + "kind": "model", + "name": "CreateVectorStoreFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1479", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" + }, + { + "$id": "1481", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1482", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" + } + ] + }, + { + "$id": "1483", + "kind": "model", + "name": "DeleteVectorStoreFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1484", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "1485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" + }, + { + "$id": "1486", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "1487", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" + }, + { + "$id": "1488", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1489", + "kind": "constant", + "valueType": { + "$ref": "121" + }, + "value": "vector_store.file.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" + } + ] + }, + { + "$id": "1490", + "kind": "model", + "name": "CreateVectorStoreFileBatchRequest", + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1491", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": { + "$id": "1492", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" + }, + { + "$id": "1494", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "type": { + "$id": "1495", + "kind": "union", + "name": "ChunkingStrategyRequestParam", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" + } + ] + }, + { + "$id": "1496", + "kind": "model", + "name": "VectorStoreFileBatchObject", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", + "usage": "Output,Json", + "description": "A batch of files attached to a vector store.", + "decorators": [], + "properties": [ + { + "$id": "1497", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" + }, + { + "$id": "1499", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `vector_store.file_batch`.", + "type": { + "$id": "1500", + "kind": "constant", + "valueType": { + "$ref": "124" + }, + "value": "vector_store.files_batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" + }, + { + "$id": "1501", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", + "type": { + "$id": "1502", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1503", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" + }, + { + "$id": "1504", + "kind": "property", + "name": "vector_store_id", + "serializedName": "vector_store_id", + "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", + "type": { + "$id": "1505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" + }, + { + "$id": "1506", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", + "type": { + "$ref": "127" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" + }, + { + "$id": "1507", + "kind": "property", + "name": "file_counts", + "serializedName": "file_counts", + "type": { + "$id": "1508", + "kind": "model", + "name": "VectorStoreFileBatchObjectFileCounts", + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1509", + "kind": "property", + "name": "in_progress", + "serializedName": "in_progress", + "description": "The number of files that are currently being processed.", + "type": { + "$id": "1510", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" + }, + { + "$id": "1511", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "The number of files that have been processed.", + "type": { + "$id": "1512", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" + }, + { + "$id": "1513", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "The number of files that have failed to process.", + "type": { + "$id": "1514", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" + }, + { + "$id": "1515", + "kind": "property", + "name": "cancelled", + "serializedName": "cancelled", + "description": "The number of files that where cancelled.", + "type": { + "$id": "1516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" + }, + { + "$id": "1517", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "The total number of files.", + "type": { + "$id": "1518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" + } + ] + }, + { + "$ref": "1508" + }, + { + "$id": "1519", + "kind": "model", + "name": "CreateThreadAndRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1520", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" + }, + { + "$id": "1522", + "kind": "property", + "name": "thread", + "serializedName": "thread", + "description": "If no thread is provided, an empty thread will be created.", + "type": { + "$id": "1523", + "kind": "model", + "name": "CreateThreadRequest", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1524", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "type": { + "$id": "1525", + "kind": "array", + "name": "ArrayCreateMessageRequest", + "valueType": { + "$id": "1526", + "kind": "model", + "name": "CreateMessageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1527", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", + "type": { + "$ref": "143" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" + }, + { + "$id": "1528", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "1529", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$id": "1530", + "kind": "model", + "name": "MessageContent", + "crossLanguageDefinitionId": "OpenAI.MessageContent", + "access": "public", + "usage": "Input,Output,Json", + "description": "Represents a single piece of content in an Assistants API message.", + "decorators": [], + "properties": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" + }, + { + "$id": "1531", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they should be added to.", + "type": { + "$id": "1532", + "kind": "nullable", + "type": { + "$id": "1533", + "kind": "array", + "name": "CreateMessageRequestAttachments", + "valueType": { + "$id": "1534", + "kind": "model", + "name": "CreateMessageRequestAttachment", + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1535", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "1536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" + }, + { + "$id": "1537", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "1538", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1539", + "kind": "union", + "name": "CreateMessageRequestAttachmentTool", + "variantTypes": [ + { + "$id": "1540", + "kind": "model", + "name": "AssistantToolsCode", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", + "usage": "Input,Output,Json", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$id": "1541", + "kind": "model", + "name": "AssistantToolDefinition", + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1542", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" + }, + "properties": [ + { + "$ref": "1542" + } + ], + "discriminatedSubtypes": { + "$id": "1544", + "code_interpreter": { + "$ref": "1540" + }, + "file_search": { + "$id": "1545", + "kind": "model", + "name": "AssistantToolsFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", + "usage": "Input,Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1541" + }, + "properties": [ + { + "$id": "1546", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1547", + "kind": "constant", + "valueType": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" + }, + { + "$id": "1549", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "Overrides for the file search tool.", + "type": { + "$id": "1550", + "kind": "model", + "name": "AssistantToolsFileSearchFileSearch", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1551", + "kind": "property", + "name": "max_num_results", + "serializedName": "max_num_results", + "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "type": { + "$id": "1552", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" + }, + { + "$id": "1553", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1554", + "kind": "model", + "name": "FileSearchRankingOptions", + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", + "usage": "Input,Output,Json", + "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", + "decorators": [], + "properties": [ + { + "$id": "1555", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", + "type": { + "$ref": "149" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" + }, + { + "$id": "1556", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1557", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" + } + ] + }, + "function": { + "$id": "1558", + "kind": "model", + "name": "AssistantToolsFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", + "usage": "Input,Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1541" + }, + "properties": [ + { + "$id": "1559", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `function`", + "type": { + "$id": "1560", + "kind": "constant", + "valueType": { + "$id": "1561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" + }, + { + "$id": "1562", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1563", + "kind": "model", + "name": "FunctionObject", + "crossLanguageDefinitionId": "OpenAI.FunctionObject", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1564", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" + }, + { + "$id": "1566", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" + }, + { + "$id": "1568", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "1569", + "kind": "model", + "name": "FunctionParameters", + "crossLanguageDefinitionId": "OpenAI.FunctionParameters", + "usage": "Input,Output,Json", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", + "decorators": [], + "additionalProperties": { + "$id": "1570", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" + }, + { + "$id": "1571", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", + "type": { + "$id": "1572", + "kind": "nullable", + "type": { + "$id": "1573", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" + } + ] + } + } + }, + "properties": [ + { + "$id": "1574", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `code_interpreter`", + "type": { + "$id": "1575", + "kind": "constant", + "valueType": { + "$id": "1576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" + } + ] + }, + { + "$id": "1577", + "kind": "model", + "name": "AssistantToolsFileSearchTypeOnly", + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1578", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool being defined: `file_search`", + "type": { + "$id": "1579", + "kind": "constant", + "valueType": { + "$ref": "155" + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" + }, + { + "$id": "1580", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1581", + "kind": "nullable", + "type": { + "$id": "1582", + "kind": "dict", + "keyType": { + "$id": "1583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" + }, + { + "$id": "1585", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1586", + "kind": "nullable", + "type": { + "$id": "1587", + "kind": "model", + "name": "CreateThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1588", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1589", + "kind": "model", + "name": "CreateThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1590", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1591", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1593", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1594", + "kind": "model", + "name": "ToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1595", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1596", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" + }, + { + "$id": "1598", + "kind": "property", + "name": "vector_stores", + "serializedName": "vector_stores", + "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", + "type": { + "$id": "1599", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1600", + "kind": "model", + "name": "ToolResourcesFileSearchVectorStore", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1601", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", + "type": { + "$id": "1602", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" + }, + { + "$id": "1604", + "kind": "property", + "name": "chunking_strategy", + "serializedName": "chunking_strategy", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "type": { + "$id": "1605", + "kind": "union", + "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", + "variantTypes": [ + { + "$ref": "1388" + }, + { + "$ref": "1393" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" + }, + { + "$id": "1606", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1607", + "kind": "dict", + "keyType": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" + }, + { + "$id": "1610", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1611", + "kind": "nullable", + "type": { + "$id": "1612", + "kind": "dict", + "keyType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" + }, + { + "$id": "1615", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1616", + "kind": "nullable", + "type": { + "$ref": "158" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" + }, + { + "$id": "1617", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1618", + "kind": "nullable", + "type": { + "$id": "1619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" + }, + { + "$id": "1620", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1621", + "kind": "nullable", + "type": { + "$id": "1622", + "kind": "array", + "name": "CreateThreadAndRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" + }, + { + "$id": "1623", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "1624", + "kind": "nullable", + "type": { + "$id": "1625", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1626", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "1627", + "kind": "model", + "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1628", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "1629", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "1631", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "1632", + "kind": "model", + "name": "ToolResourcesFileSearchIdsOnly", + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1633", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", + "type": { + "$id": "1634", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" + }, + { + "$id": "1636", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1637", + "kind": "nullable", + "type": { + "$id": "1638", + "kind": "dict", + "keyType": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" + }, + { + "$id": "1641", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1642", + "kind": "nullable", + "type": { + "$id": "1643", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" + }, + { + "$id": "1644", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1645", + "kind": "nullable", + "type": { + "$id": "1646", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" + }, + { + "$id": "1647", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1648", + "kind": "nullable", + "type": { + "$id": "1649", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" + }, + { + "$id": "1650", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1651", + "kind": "nullable", + "type": { + "$id": "1652", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" + }, + { + "$id": "1653", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1654", + "kind": "nullable", + "type": { + "$id": "1655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" + }, + { + "$id": "1656", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1657", + "kind": "nullable", + "type": { + "$id": "1658", + "kind": "model", + "name": "TruncationObject", + "crossLanguageDefinitionId": "OpenAI.TruncationObject", + "usage": "Input,Output,Json", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", + "decorators": [], + "properties": [ + { + "$id": "1659", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "type": { + "$ref": "206" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" + }, + { + "$id": "1660", + "kind": "property", + "name": "last_messages", + "serializedName": "last_messages", + "description": "The number of most recent messages from the thread when constructing the context for the run.", + "type": { + "$id": "1661", + "kind": "nullable", + "type": { + "$id": "1662", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" + }, + { + "$id": "1663", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1664", + "kind": "nullable", + "type": { + "$id": "1665", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$id": "1666", + "kind": "model", + "name": "AssistantsNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", + "usage": "Input,Output,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", + "decorators": [], + "properties": [ + { + "$id": "1667", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. If type is `function`, the function name must be set", + "type": { + "$ref": "220" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" + }, + { + "$id": "1668", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "1669", + "kind": "model", + "name": "AssistantsNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1670", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "1671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" + }, + { + "$id": "1672", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1673", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" + }, + { + "$id": "1674", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1675", + "kind": "nullable", + "type": { + "$id": "1676", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1677", + "kind": "constant", + "valueType": { + "$id": "1678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "1679", + "kind": "model", + "name": "ResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", + "usage": "Input,Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$id": "1680", + "kind": "model", + "name": "OmniTypedResponseFormat", + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "1681", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "1682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" + }, + "properties": [ + { + "$ref": "1681" + } + ], + "discriminatedSubtypes": { + "$id": "1683", + "text": { + "$ref": "1679" + }, + "json_object": { + "$id": "1684", + "kind": "model", + "name": "ResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", + "usage": "Input,Output,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1685", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "1686", + "kind": "constant", + "valueType": { + "$id": "1687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "1688", + "kind": "model", + "name": "ResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", + "usage": "Input,Output,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "1680" + }, + "properties": [ + { + "$id": "1689", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "1690", + "kind": "constant", + "valueType": { + "$id": "1691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" + }, + { + "$id": "1692", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$id": "1693", + "kind": "model", + "name": "ResponseFormatJsonSchemaJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1694", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", + "type": { + "$id": "1695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" + }, + { + "$id": "1696", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "1697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" + }, + { + "$id": "1698", + "kind": "property", + "name": "schema", + "serializedName": "schema", + "type": { + "$id": "1699", + "kind": "model", + "name": "ResponseFormatJsonSchemaSchema", + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", + "usage": "Input,Output,Json", + "description": "The schema for the response format, described as a JSON Schema object.", + "decorators": [], + "additionalProperties": { + "$id": "1700", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" + }, + { + "$id": "1701", + "kind": "property", + "name": "strict", + "serializedName": "strict", + "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", + "type": { + "$id": "1702", + "kind": "nullable", + "type": { + "$id": "1703", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "properties": [ + { + "$id": "1704", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "1705", + "kind": "constant", + "valueType": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" + } + ] + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" + } + ] + }, + { + "$ref": "1523" + }, + { + "$ref": "1526" + }, + { + "$ref": "1530" + }, + { + "$ref": "1534" + }, + { + "$ref": "1540" + }, + { + "$ref": "1541" + }, + { + "$ref": "1545" + }, + { + "$ref": "1550" + }, + { + "$ref": "1554" + }, + { + "$ref": "1558" + }, + { + "$ref": "1563" + }, + { + "$ref": "1569" + }, + { + "$ref": "1577" + }, + { + "$ref": "1587" + }, + { + "$ref": "1589" + }, + { + "$ref": "1594" + }, + { + "$ref": "1600" + }, + { + "$ref": "1625" + }, + { + "$ref": "1627" + }, + { + "$ref": "1632" + }, + { + "$ref": "1658" + }, + { + "$ref": "1666" + }, + { + "$ref": "1669" + }, + { + "$ref": "1679" + }, + { + "$ref": "1680" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + }, + { + "$ref": "1693" + }, + { + "$ref": "1699" + }, + { + "$id": "1707", + "kind": "model", + "name": "RunObject", + "crossLanguageDefinitionId": "OpenAI.RunObject", + "usage": "Output,Json", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "1708", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "1709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.id" + }, + { + "$id": "1710", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run`.", + "type": { + "$id": "1711", + "kind": "constant", + "valueType": { + "$ref": "228" + }, + "value": "thread.run", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.object" + }, + { + "$id": "1712", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": { + "$id": "1713", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1714", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" + }, + { + "$id": "1715", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": { + "$id": "1716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" + }, + { + "$id": "1717", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "type": { + "$id": "1718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" + }, + { + "$id": "1719", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", + "type": { + "$ref": "231" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.status" + }, + { + "$id": "1720", + "kind": "property", + "name": "required_action", + "serializedName": "required_action", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "type": { + "$id": "1721", + "kind": "nullable", + "type": { + "$id": "1722", + "kind": "model", + "name": "RunObjectRequiredAction", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1723", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "For now, this is always `submit_tool_outputs`.", + "type": { + "$id": "1724", + "kind": "constant", + "valueType": { + "$ref": "251" + }, + "value": "submit_tool_outputs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" + }, + { + "$id": "1725", + "kind": "property", + "name": "submit_tool_outputs", + "serializedName": "submit_tool_outputs", + "description": "Details on the tool outputs needed for this run to continue.", + "type": { + "$id": "1726", + "kind": "model", + "name": "RunObjectRequiredActionSubmitToolOutputs", + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1727", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "A list of the relevant tool calls.", + "type": { + "$id": "1728", + "kind": "array", + "name": "ArrayRunToolCallObject", + "valueType": { + "$id": "1729", + "kind": "model", + "name": "RunToolCallObject", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", + "usage": "Output,Json", + "description": "Tool call objects", + "decorators": [], + "properties": [ + { + "$id": "1730", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", + "type": { + "$id": "1731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" + }, + { + "$id": "1732", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "type": { + "$id": "1733", + "kind": "constant", + "valueType": { + "$ref": "254" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" + }, + { + "$id": "1734", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function definition.", + "type": { + "$id": "1735", + "kind": "model", + "name": "RunToolCallObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1736", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "1737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" + }, + { + "$id": "1738", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments that the model expects you to pass to the function.", + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" + }, + { + "$id": "1740", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "type": { + "$id": "1741", + "kind": "nullable", + "type": { + "$id": "1742", + "kind": "model", + "name": "RunObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1743", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", + "type": { + "$ref": "257" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" + }, + { + "$id": "1744", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" + }, + { + "$id": "1746", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": { + "$id": "1747", + "kind": "nullable", + "type": { + "$id": "1748", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1749", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" + }, + { + "$id": "1750", + "kind": "property", + "name": "started_at", + "serializedName": "started_at", + "description": "The Unix timestamp (in seconds) for when the run was started.", + "type": { + "$id": "1751", + "kind": "nullable", + "type": { + "$id": "1752", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1753", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" + }, + { + "$id": "1754", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "type": { + "$id": "1755", + "kind": "nullable", + "type": { + "$id": "1756", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1757", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" + }, + { + "$id": "1758", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run failed.", + "type": { + "$id": "1759", + "kind": "nullable", + "type": { + "$id": "1760", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1761", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" + }, + { + "$id": "1762", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "type": { + "$id": "1763", + "kind": "nullable", + "type": { + "$id": "1764", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1765", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" + }, + { + "$id": "1766", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", + "type": { + "$id": "1767", + "kind": "nullable", + "type": { + "$id": "1768", + "kind": "model", + "name": "RunObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1769", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", + "type": { + "$ref": "265" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" + }, + { + "$id": "1770", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.model" + }, + { + "$id": "1772", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" + }, + { + "$id": "1774", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": { + "$id": "1775", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tools" + }, + { + "$id": "1776", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1777", + "kind": "nullable", + "type": { + "$id": "1778", + "kind": "dict", + "keyType": { + "$id": "1779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" + }, + { + "$id": "1781", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "1782", + "kind": "nullable", + "type": { + "$id": "1783", + "kind": "model", + "name": "RunCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", + "decorators": [], + "properties": [ + { + "$id": "1784", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run.", + "type": { + "$id": "1785", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" + }, + { + "$id": "1786", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run.", + "type": { + "$id": "1787", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" + }, + { + "$id": "1788", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "1789", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.usage" + }, + { + "$id": "1790", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "type": { + "$id": "1791", + "kind": "nullable", + "type": { + "$id": "1792", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" + }, + { + "$id": "1793", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "type": { + "$id": "1794", + "kind": "nullable", + "type": { + "$id": "1795", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" + }, + { + "$id": "1796", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", + "type": { + "$id": "1797", + "kind": "nullable", + "type": { + "$id": "1798", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" + }, + { + "$id": "1799", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens specified to have been used over the course of the run.", + "type": { + "$id": "1800", + "kind": "nullable", + "type": { + "$id": "1801", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" + }, + { + "$id": "1802", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1803", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" + }, + { + "$id": "1804", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1805", + "kind": "nullable", + "type": { + "$id": "1806", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" + }, + { + "$id": "1807", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1808", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" + }, + { + "$id": "1809", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1810", + "kind": "nullable", + "type": { + "$id": "1811", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1812", + "kind": "constant", + "valueType": { + "$id": "1813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" + } + ] + }, + { + "$ref": "1722" + }, + { + "$ref": "1726" + }, + { + "$ref": "1729" + }, + { + "$ref": "1735" + }, + { + "$ref": "1742" + }, + { + "$ref": "1768" + }, + { + "$ref": "1783" + }, + { + "$id": "1814", + "kind": "model", + "name": "CreateRunRequest", + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1815", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": { + "$id": "1816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" + }, + { + "$id": "1817", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "type": { + "$id": "1818", + "kind": "nullable", + "type": { + "$ref": "271" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" + }, + { + "$id": "1819", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1820", + "kind": "nullable", + "type": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" + }, + { + "$id": "1822", + "kind": "property", + "name": "additional_instructions", + "serializedName": "additional_instructions", + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "type": { + "$id": "1823", + "kind": "nullable", + "type": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" + }, + { + "$id": "1825", + "kind": "property", + "name": "additional_messages", + "serializedName": "additional_messages", + "description": "Adds additional messages to the thread before creating the run.", + "type": { + "$id": "1826", + "kind": "nullable", + "type": { + "$id": "1827", + "kind": "array", + "name": "CreateRunRequestAdditional_messages", + "valueType": { + "$ref": "1526" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" + }, + { + "$id": "1828", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "type": { + "$id": "1829", + "kind": "nullable", + "type": { + "$id": "1830", + "kind": "array", + "name": "CreateRunRequestTools", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" + }, + { + "$id": "1831", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1832", + "kind": "nullable", + "type": { + "$id": "1833", + "kind": "dict", + "keyType": { + "$id": "1834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" + }, + { + "$id": "1836", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "1837", + "kind": "nullable", + "type": { + "$id": "1838", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" + }, + { + "$id": "1839", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "1840", + "kind": "nullable", + "type": { + "$id": "1841", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" + }, + { + "$id": "1842", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1843", + "kind": "nullable", + "type": { + "$id": "1844", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" + }, + { + "$id": "1845", + "kind": "property", + "name": "max_prompt_tokens", + "serializedName": "max_prompt_tokens", + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1846", + "kind": "nullable", + "type": { + "$id": "1847", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" + }, + { + "$id": "1848", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", + "type": { + "$id": "1849", + "kind": "nullable", + "type": { + "$id": "1850", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" + }, + { + "$id": "1851", + "kind": "property", + "name": "truncation_strategy", + "serializedName": "truncation_strategy", + "type": { + "$id": "1852", + "kind": "nullable", + "type": { + "$ref": "1658" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" + }, + { + "$id": "1853", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "1854", + "kind": "nullable", + "type": { + "$id": "1855", + "kind": "union", + "name": "AssistantsApiToolChoiceOption", + "variantTypes": [ + { + "$ref": "212" + }, + { + "$ref": "1666" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" + }, + { + "$id": "1856", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "1857", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" + }, + { + "$id": "1858", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "1859", + "kind": "nullable", + "type": { + "$id": "1860", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "1861", + "kind": "constant", + "valueType": { + "$id": "1862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" + } + ] + }, + { + "$id": "1863", + "kind": "model", + "name": "ListRunsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1864", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1865", + "kind": "constant", + "valueType": { + "$ref": "325" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" + }, + { + "$id": "1866", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1867", + "kind": "array", + "name": "ArrayRunObject", + "valueType": { + "$ref": "1707" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" + }, + { + "$id": "1868", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "1869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" + }, + { + "$id": "1870", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "1871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" + }, + { + "$id": "1872", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "1873", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" + } + ] + }, + { + "$id": "1874", + "kind": "model", + "name": "ModifyRunRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1875", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "1876", + "kind": "nullable", + "type": { + "$id": "1877", + "kind": "dict", + "keyType": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" + } + ] + }, + { + "$id": "1880", + "kind": "model", + "name": "SubmitToolOutputsRunRequest", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1881", + "kind": "property", + "name": "tool_outputs", + "serializedName": "tool_outputs", + "description": "A list of tools for which the outputs are being submitted.", + "type": { + "$id": "1882", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1883", + "kind": "model", + "name": "SubmitToolOutputsRunRequestToolOutput", + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "1884", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", + "type": { + "$id": "1885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" + }, + { + "$id": "1886", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the tool call to be submitted to continue the run.", + "type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" + }, + { + "$id": "1888", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", + "type": { + "$id": "1889", + "kind": "nullable", + "type": { + "$id": "1890", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" + } + ] + }, + { + "$ref": "1883" + }, + { + "$id": "1891", + "kind": "model", + "name": "ListRunStepsResponse", + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1892", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "1893", + "kind": "constant", + "valueType": { + "$ref": "334" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" + }, + { + "$id": "1894", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "1895", + "kind": "array", + "name": "ArrayRunStepObject", + "valueType": { + "$id": "1896", + "kind": "model", + "name": "RunStepObject", + "crossLanguageDefinitionId": "OpenAI.RunStepObject", + "usage": "Output,Json", + "description": "Represents a step in execution of a run.", + "decorators": [], + "properties": [ + { + "$id": "1897", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" + }, + { + "$id": "1899", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step`.", + "type": { + "$id": "1900", + "kind": "constant", + "valueType": { + "$ref": "337" + }, + "value": "thread.run.step", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" + }, + { + "$id": "1901", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": { + "$id": "1902", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "1903", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" + }, + { + "$id": "1904", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": { + "$id": "1905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" + }, + { + "$id": "1906", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": { + "$id": "1907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" + }, + { + "$id": "1908", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", + "type": { + "$id": "1909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" + }, + { + "$id": "1910", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", + "type": { + "$ref": "340" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" + }, + { + "$id": "1911", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": { + "$ref": "346" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" + }, + { + "$id": "1912", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$id": "1913", + "kind": "model", + "name": "RunStepObjectStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", + "usage": "Output,Json", + "description": "Abstractly represents a run step details object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1914", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" + }, + "properties": [ + { + "$ref": "1914" + } + ], + "discriminatedSubtypes": { + "$id": "1916", + "message_creation": { + "$id": "1917", + "kind": "model", + "name": "RunStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", + "usage": "Output,Json", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1918", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "1919", + "kind": "constant", + "valueType": { + "$id": "1920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" + }, + { + "$id": "1921", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "1922", + "kind": "model", + "name": "RunStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1923", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "1924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "1925", + "kind": "model", + "name": "RunStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", + "usage": "Output,Json", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "1913" + }, + "properties": [ + { + "$id": "1926", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "1927", + "kind": "constant", + "valueType": { + "$id": "1928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" + }, + { + "$id": "1929", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "1930", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "1931", + "kind": "model", + "name": "RunStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "1932", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "1932" + } + ], + "discriminatedSubtypes": { + "$id": "1934", + "code_interpreter": { + "$id": "1935", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", + "usage": "Output,Json", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1936", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "1937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "1938", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "1939", + "kind": "constant", + "valueType": { + "$id": "1940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "1941", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "1942", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1943", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "1944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "1945", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "1946", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "1947", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output,Json", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "1948", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "1949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "1948" + } + ], + "discriminatedSubtypes": { + "$id": "1950", + "logs": { + "$id": "1951", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", + "usage": "Output,Json", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1952", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "1953", + "kind": "constant", + "valueType": { + "$id": "1954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "1955", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "1956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "1957", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", + "usage": "Output,Json", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "1947" + }, + "properties": [ + { + "$id": "1958", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "1959", + "kind": "constant", + "valueType": { + "$id": "1960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "1961", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "1962", + "kind": "model", + "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1963", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "1964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "1965", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", + "usage": "Output,Json", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1966", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "1968", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "1969", + "kind": "constant", + "valueType": { + "$id": "1970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "1971", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "1972", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1973", + "kind": "property", + "name": "ranking_options", + "serializedName": "ranking_options", + "type": { + "$id": "1974", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", + "usage": "Output,Json", + "description": "The ranking options for the file search.", + "decorators": [], + "properties": [ + { + "$id": "1975", + "kind": "property", + "name": "ranker", + "serializedName": "ranker", + "description": "The ranker used for the file search.", + "type": { + "$id": "1976", + "kind": "constant", + "valueType": { + "$ref": "358" + }, + "value": "default_2024_08_21", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" + }, + { + "$id": "1977", + "kind": "property", + "name": "score_threshold", + "serializedName": "score_threshold", + "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1978", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" + }, + { + "$id": "1979", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "The results of the file search.", + "type": { + "$id": "1980", + "kind": "array", + "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", + "valueType": { + "$id": "1981", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", + "usage": "Output,Json", + "description": "A result instance of the file search.", + "decorators": [], + "properties": [ + { + "$id": "1982", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that result was found in.", + "type": { + "$id": "1983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" + }, + { + "$id": "1984", + "kind": "property", + "name": "file_name", + "serializedName": "file_name", + "description": "The name of the file that result was found in.", + "type": { + "$id": "1985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" + }, + { + "$id": "1986", + "kind": "property", + "name": "score", + "serializedName": "score", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", + "type": { + "$id": "1987", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" + }, + { + "$id": "1988", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", + "type": { + "$id": "1989", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1990", + "kind": "model", + "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "1991", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content.", + "type": { + "$id": "1992", + "kind": "constant", + "valueType": { + "$ref": "361" + }, + "value": "text", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" + }, + { + "$id": "1993", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content of the file.", + "type": { + "$id": "1994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "1995", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", + "usage": "Output,Json", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "1931" + }, + "properties": [ + { + "$id": "1996", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "1997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "1998", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "1999", + "kind": "constant", + "valueType": { + "$id": "2000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "2001", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "2002", + "kind": "model", + "name": "RunStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2003", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "2004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "2005", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "2006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "2007", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "2008", + "kind": "nullable", + "type": { + "$id": "2009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" + }, + { + "$id": "2010", + "kind": "property", + "name": "last_error", + "serializedName": "last_error", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "type": { + "$id": "2011", + "kind": "nullable", + "type": { + "$id": "2012", + "kind": "model", + "name": "RunStepObjectLastError", + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2013", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "type": { + "$ref": "364" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" + }, + { + "$id": "2014", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable description of the error.", + "type": { + "$id": "2015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" + }, + { + "$id": "2016", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "type": { + "$id": "2017", + "kind": "nullable", + "type": { + "$id": "2018", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2019", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" + }, + { + "$id": "2020", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "type": { + "$id": "2021", + "kind": "nullable", + "type": { + "$id": "2022", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2023", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" + }, + { + "$id": "2024", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "type": { + "$id": "2025", + "kind": "nullable", + "type": { + "$id": "2026", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2027", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" + }, + { + "$id": "2028", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "type": { + "$id": "2029", + "kind": "nullable", + "type": { + "$id": "2030", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2031", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" + }, + { + "$id": "2032", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2033", + "kind": "nullable", + "type": { + "$id": "2034", + "kind": "dict", + "keyType": { + "$id": "2035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" + }, + { + "$id": "2037", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2038", + "kind": "nullable", + "type": { + "$id": "2039", + "kind": "model", + "name": "RunStepCompletionUsage", + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", + "decorators": [], + "properties": [ + { + "$id": "2040", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of completion tokens used over the course of the run step.", + "type": { + "$id": "2041", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" + }, + { + "$id": "2042", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of prompt tokens used over the course of the run step.", + "type": { + "$id": "2043", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" + }, + { + "$id": "2044", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used (prompt + completion).", + "type": { + "$id": "2045", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" + }, + { + "$id": "2046", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" + }, + { + "$id": "2048", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" + }, + { + "$id": "2050", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2051", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" + } + ] + }, + { + "$ref": "1896" + }, + { + "$ref": "1913" + }, + { + "$ref": "1917" + }, + { + "$ref": "1922" + }, + { + "$ref": "1925" + }, + { + "$ref": "1931" + }, + { + "$ref": "1935" + }, + { + "$ref": "1942" + }, + { + "$ref": "1947" + }, + { + "$ref": "1951" + }, + { + "$ref": "1957" + }, + { + "$ref": "1962" + }, + { + "$ref": "1965" + }, + { + "$ref": "1972" + }, + { + "$ref": "1974" + }, + { + "$ref": "1981" + }, + { + "$ref": "1990" + }, + { + "$ref": "1995" + }, + { + "$ref": "2002" + }, + { + "$ref": "2012" + }, + { + "$ref": "2039" + }, + { + "$id": "2052", + "kind": "model", + "name": "ThreadObject", + "crossLanguageDefinitionId": "OpenAI.ThreadObject", + "usage": "Output,Json", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "decorators": [], + "properties": [ + { + "$id": "2053", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" + }, + { + "$id": "2055", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread`.", + "type": { + "$id": "2056", + "kind": "constant", + "valueType": { + "$ref": "370" + }, + "value": "thread", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" + }, + { + "$id": "2057", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": { + "$id": "2058", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2059", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" + }, + { + "$id": "2060", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2061", + "kind": "nullable", + "type": { + "$id": "2062", + "kind": "model", + "name": "ThreadObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2063", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2064", + "kind": "model", + "name": "ThreadObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2065", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2066", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2067", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2068", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$id": "2069", + "kind": "model", + "name": "ThreadObjectToolResourcesFileSearch", + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2070", + "kind": "property", + "name": "vector_store_ids", + "serializedName": "vector_store_ids", + "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", + "type": { + "$id": "2071", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" + }, + { + "$id": "2073", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2074", + "kind": "nullable", + "type": { + "$id": "2075", + "kind": "dict", + "keyType": { + "$id": "2076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" + } + ] + }, + { + "$ref": "2062" + }, + { + "$ref": "2064" + }, + { + "$ref": "2069" + }, + { + "$id": "2078", + "kind": "model", + "name": "ModifyThreadRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2079", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "2080", + "kind": "nullable", + "type": { + "$id": "2081", + "kind": "model", + "name": "ModifyThreadRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2082", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "2083", + "kind": "model", + "name": "ModifyThreadRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2084", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "2085", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "2087", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" + }, + { + "$id": "2088", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2089", + "kind": "nullable", + "type": { + "$id": "2090", + "kind": "dict", + "keyType": { + "$id": "2091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" + } + ] + }, + { + "$ref": "2081" + }, + { + "$ref": "2083" + }, + { + "$id": "2093", + "kind": "model", + "name": "DeleteThreadResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2094", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" + }, + { + "$id": "2096", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2097", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" + }, + { + "$id": "2098", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2099", + "kind": "constant", + "valueType": { + "$ref": "373" + }, + "value": "thread.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" + } + ] + }, + { + "$id": "2100", + "kind": "model", + "name": "RealtimeRequestCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", + "usage": "Input,Json", + "description": "A base representation for messages sent by the client to the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2101", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "376" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" + }, + "properties": [ + { + "$ref": "2101" + }, + { + "$id": "2102", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2104", + "session.update": { + "$id": "2105", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", + "usage": "Input,Json", + "discriminatorValue": "session.update", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2106", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2107", + "kind": "constant", + "valueType": { + "$id": "2108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.update", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" + }, + { + "$id": "2109", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2110", + "kind": "model", + "name": "RealtimeRequestSessionUpdateCommandSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2111", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "396" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" + }, + { + "$id": "2112", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2113", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" + }, + { + "$id": "2114", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" + }, + { + "$id": "2115", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" + }, + { + "$id": "2117", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" + }, + { + "$id": "2118", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" + }, + { + "$id": "2119", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2120", + "kind": "model", + "name": "RealtimeAudioInputTranscriptionSettings", + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2121", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$ref": "422" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" + }, + { + "$id": "2122", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$id": "2123", + "kind": "model", + "name": "RealtimeTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2124", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "426" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" + }, + "properties": [ + { + "$ref": "2124" + } + ], + "discriminatedSubtypes": { + "$id": "2125", + "server_vad": { + "$id": "2126", + "kind": "model", + "name": "RealtimeServerVadTurnDetection", + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", + "usage": "Input,Output,Json", + "discriminatorValue": "server_vad", + "decorators": [], + "baseModel": { + "$ref": "2123" + }, + "properties": [ + { + "$id": "2127", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2128", + "kind": "constant", + "valueType": { + "$id": "2129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "server_vad", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" + }, + { + "$id": "2130", + "kind": "property", + "name": "threshold", + "serializedName": "threshold", + "type": { + "$id": "2131", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" + }, + { + "$id": "2132", + "kind": "property", + "name": "prefix_padding_ms", + "serializedName": "prefix_padding_ms", + "type": { + "$id": "2133", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" + }, + { + "$id": "2135", + "kind": "property", + "name": "silence_duration_ms", + "serializedName": "silence_duration_ms", + "type": { + "$id": "2136", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" + }, + { + "$id": "2138", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2139", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$id": "2140", + "kind": "model", + "name": "RealtimeTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeTool", + "usage": "Input,Output,Json", + "description": "The base representation of a realtime tool definition.", + "decorators": [], + "discriminatorProperty": { + "$id": "2141", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" + }, + "properties": [ + { + "$ref": "2141" + } + ], + "discriminatedSubtypes": { + "$id": "2142", + "function": { + "$id": "2143", + "kind": "model", + "name": "RealtimeFunctionTool", + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", + "usage": "Input,Output,Json", + "description": "The definition of a function tool as used by the realtime endpoint.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2140" + }, + "properties": [ + { + "$id": "2144", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2145", + "kind": "constant", + "valueType": { + "$id": "2146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" + }, + { + "$id": "2147", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" + }, + { + "$id": "2149", + "kind": "property", + "name": "description", + "serializedName": "description", + "type": { + "$id": "2150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" + }, + { + "$id": "2151", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$id": "2152", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" + }, + { + "$id": "2153", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2154", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$id": "2155", + "kind": "model", + "name": "RealtimeToolChoiceObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", + "usage": "Input,Output,Json", + "description": "A base representation for a realtime tool_choice selecting a named tool.", + "decorators": [], + "discriminatorProperty": { + "$id": "2156", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "430" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" + }, + "properties": [ + { + "$ref": "2156" + } + ], + "discriminatedSubtypes": { + "$id": "2157", + "function": { + "$id": "2158", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", + "usage": "Input,Output,Json", + "description": "The representation of a realtime tool_choice selecting a named function tool.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "2155" + }, + "properties": [ + { + "$id": "2159", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2145" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" + }, + { + "$id": "2160", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "2161", + "kind": "model", + "name": "RealtimeToolChoiceFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2162", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" + } + ] + } + } + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" + }, + { + "$id": "2164", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2165", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" + }, + { + "$id": "2166", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2167", + "kind": "union", + "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", + "variantTypes": [ + { + "$id": "2168", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2169", + "kind": "constant", + "valueType": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" + } + ] + }, + "input_audio_buffer.append": { + "$id": "2171", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferAppendCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.append", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2172", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2173", + "kind": "constant", + "valueType": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.append", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" + }, + { + "$id": "2175", + "kind": "property", + "name": "audio", + "serializedName": "audio", + "type": { + "$id": "2176", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" + } + ] + }, + "input_audio_buffer.commit": { + "$id": "2177", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferCommitCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.commit", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2178", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2179", + "kind": "constant", + "valueType": { + "$id": "2180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.commit", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" + } + ] + }, + "input_audio_buffer.clear": { + "$id": "2181", + "kind": "model", + "name": "RealtimeRequestInputAudioBufferClearCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", + "usage": "Input,Json", + "discriminatorValue": "input_audio_buffer.clear", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2182", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2183", + "kind": "constant", + "valueType": { + "$id": "2184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.clear", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" + } + ] + }, + "conversation.item.create": { + "$id": "2185", + "kind": "model", + "name": "RealtimeRequestItemCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2186", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2187", + "kind": "constant", + "valueType": { + "$id": "2188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" + }, + { + "$id": "2189", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" + }, + { + "$id": "2191", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2192", + "kind": "model", + "name": "RealtimeRequestItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2193", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" + }, + "properties": [ + { + "$ref": "2193" + }, + { + "$id": "2194", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2196", + "message": { + "$id": "2197", + "kind": "model", + "name": "RealtimeRequestMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", + "usage": "Input,Json", + "discriminatorValue": "message", + "decorators": [], + "discriminatorProperty": { + "$id": "2198", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" + }, + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2199", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2200", + "kind": "constant", + "valueType": { + "$id": "2201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" + }, + { + "$ref": "2198" + }, + { + "$id": "2202", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" + } + ], + "discriminatedSubtypes": { + "$id": "2203", + "system": { + "$id": "2204", + "kind": "model", + "name": "RealtimeRequestSystemMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2205", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2206", + "kind": "constant", + "valueType": { + "$id": "2207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" + }, + { + "$id": "2208", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2209", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$id": "2210", + "kind": "model", + "name": "RealtimeRequestTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_text", + "decorators": [], + "baseModel": { + "$id": "2211", + "kind": "model", + "name": "RealtimeContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", + "usage": "Input,Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2212", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "466" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" + }, + "properties": [ + { + "$ref": "2212" + } + ], + "discriminatedSubtypes": { + "$id": "2213", + "input_text": { + "$ref": "2210" + }, + "input_audio": { + "$id": "2214", + "kind": "model", + "name": "RealtimeRequestAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", + "usage": "Input,Output,Json", + "discriminatorValue": "input_audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2215", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2216", + "kind": "constant", + "valueType": { + "$id": "2217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" + }, + { + "$id": "2218", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" + } + ] + }, + "text": { + "$id": "2220", + "kind": "model", + "name": "RealtimeResponseTextContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", + "usage": "Output,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2221", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2222", + "kind": "constant", + "valueType": { + "$id": "2223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" + }, + { + "$id": "2224", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" + } + ] + }, + "audio": { + "$id": "2226", + "kind": "model", + "name": "RealtimeResponseAudioContentPart", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", + "usage": "Output,Json", + "discriminatorValue": "audio", + "decorators": [], + "baseModel": { + "$ref": "2211" + }, + "properties": [ + { + "$id": "2227", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2228", + "kind": "constant", + "valueType": { + "$id": "2229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" + }, + { + "$id": "2230", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2231", + "kind": "nullable", + "type": { + "$id": "2232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" + } + ] + } + } + }, + "properties": [ + { + "$id": "2233", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2234", + "kind": "constant", + "valueType": { + "$id": "2235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" + }, + { + "$id": "2236", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "2237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" + } + ] + }, + "user": { + "$id": "2238", + "kind": "model", + "name": "RealtimeRequestUserMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2239", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2240", + "kind": "constant", + "valueType": { + "$id": "2241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" + }, + { + "$id": "2242", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2243", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2244", + "kind": "union", + "name": "RealtimeRequestUserMessageItemContent", + "variantTypes": [ + { + "$ref": "2210" + }, + { + "$ref": "2214" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" + } + ] + }, + "assistant": { + "$id": "2245", + "kind": "model", + "name": "RealtimeRequestAssistantMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "2197" + }, + "properties": [ + { + "$id": "2246", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$id": "2247", + "kind": "constant", + "valueType": { + "$id": "2248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" + }, + { + "$id": "2249", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2250", + "kind": "array", + "name": "ArrayRealtimeRequestTextContentPart", + "valueType": { + "$ref": "2210" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" + } + ] + } + } + }, + "function_call": { + "$id": "2251", + "kind": "model", + "name": "RealtimeRequestFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", + "usage": "Input,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2252", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2253", + "kind": "constant", + "valueType": { + "$id": "2254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" + }, + { + "$id": "2255", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" + }, + { + "$id": "2257", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" + }, + { + "$id": "2259", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" + }, + { + "$id": "2261", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2262", + "kind": "model", + "name": "RealtimeRequestFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", + "usage": "Input,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2192" + }, + "properties": [ + { + "$id": "2263", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2264", + "kind": "constant", + "valueType": { + "$id": "2265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function_call_output", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" + }, + { + "$id": "2266", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" + }, + { + "$id": "2268", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" + } + ] + }, + "conversation.item.delete": { + "$id": "2270", + "kind": "model", + "name": "RealtimeRequestItemDeleteCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.delete", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2271", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2272", + "kind": "constant", + "valueType": { + "$id": "2273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.delete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" + }, + { + "$id": "2274", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" + } + ] + }, + "conversation.item.truncate": { + "$id": "2276", + "kind": "model", + "name": "RealtimeRequestItemTruncateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", + "usage": "Input,Json", + "discriminatorValue": "conversation.item.truncate", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2277", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2278", + "kind": "constant", + "valueType": { + "$id": "2279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" + }, + { + "$id": "2280", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" + }, + { + "$id": "2282", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2283", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" + }, + { + "$id": "2284", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2285", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" + } + ] + }, + "response.create": { + "$id": "2286", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", + "usage": "Input,Json", + "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", + "discriminatorValue": "response.create", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2287", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2288", + "kind": "constant", + "valueType": { + "$id": "2289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.create", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" + }, + { + "$id": "2290", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2291", + "kind": "model", + "name": "RealtimeRequestResponseCreateCommandResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2292", + "kind": "property", + "name": "commit", + "serializedName": "commit", + "type": { + "$id": "2293", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" + }, + { + "$id": "2294", + "kind": "property", + "name": "cancel_previous", + "serializedName": "cancel_previous", + "type": { + "$id": "2295", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" + }, + { + "$id": "2296", + "kind": "property", + "name": "append_input_items", + "serializedName": "append_input_items", + "type": { + "$id": "2297", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" + }, + { + "$id": "2298", + "kind": "property", + "name": "input_items", + "serializedName": "input_items", + "type": { + "$id": "2299", + "kind": "array", + "name": "ArrayRealtimeRequestItem", + "valueType": { + "$ref": "2192" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" + }, + { + "$id": "2300", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" + }, + { + "$id": "2302", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2303", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" + }, + { + "$id": "2304", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" + }, + { + "$id": "2305", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2306", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" + }, + { + "$id": "2307", + "kind": "property", + "name": "max_output_tokens", + "serializedName": "max_output_tokens", + "type": { + "$id": "2308", + "kind": "nullable", + "type": { + "$id": "2309", + "kind": "union", + "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", + "variantTypes": [ + { + "$id": "2310", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + { + "$id": "2311", + "kind": "constant", + "valueType": { + "$id": "2312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "inf", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" + }, + { + "$id": "2313", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2314", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" + }, + { + "$id": "2315", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2316", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" + }, + { + "$id": "2317", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" + } + ] + }, + "response.cancel": { + "$id": "2318", + "kind": "model", + "name": "RealtimeRequestResponseCancelCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", + "usage": "Input,Json", + "discriminatorValue": "response.cancel", + "decorators": [], + "baseModel": { + "$ref": "2100" + }, + "properties": [ + { + "$id": "2319", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2320", + "kind": "constant", + "valueType": { + "$id": "2321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.cancel", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" + } + ] + } + } + }, + { + "$ref": "2105" + }, + { + "$ref": "2110" + }, + { + "$ref": "2120" + }, + { + "$ref": "2123" + }, + { + "$ref": "2126" + }, + { + "$ref": "2140" + }, + { + "$ref": "2143" + }, + { + "$ref": "2155" + }, + { + "$ref": "2158" + }, + { + "$ref": "2161" + }, + { + "$ref": "2171" + }, + { + "$ref": "2177" + }, + { + "$ref": "2181" + }, + { + "$ref": "2185" + }, + { + "$ref": "2192" + }, + { + "$ref": "2197" + }, + { + "$ref": "2204" + }, + { + "$ref": "2210" + }, + { + "$ref": "2211" + }, + { + "$ref": "2214" + }, + { + "$ref": "2220" + }, + { + "$ref": "2226" + }, + { + "$ref": "2238" + }, + { + "$ref": "2245" + }, + { + "$ref": "2251" + }, + { + "$ref": "2262" + }, + { + "$ref": "2270" + }, + { + "$ref": "2276" + }, + { + "$ref": "2286" + }, + { + "$ref": "2291" + }, + { + "$ref": "2318" + }, + { + "$id": "2322", + "kind": "model", + "name": "RealtimeResponseCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", + "usage": "Output,Json", + "description": "Base representation of a WebSocket message received from the service.", + "decorators": [], + "discriminatorProperty": { + "$id": "2323", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$ref": "476" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" + }, + "properties": [ + { + "$ref": "2323" + }, + { + "$id": "2324", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2325", + "kind": "nullable", + "type": { + "$id": "2326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" + } + ], + "discriminatedSubtypes": { + "$id": "2327", + "session.created": { + "$id": "2328", + "kind": "model", + "name": "RealtimeResponseSessionCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2329", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2330", + "kind": "constant", + "valueType": { + "$id": "2331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" + }, + { + "$id": "2332", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$id": "2333", + "kind": "model", + "name": "RealtimeResponseSession", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2334", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2335", + "kind": "constant", + "valueType": { + "$ref": "532" + }, + "value": "realtime.session", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" + }, + { + "$id": "2336", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" + }, + { + "$id": "2338", + "kind": "property", + "name": "model", + "serializedName": "model", + "type": { + "$id": "2339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" + }, + { + "$id": "2340", + "kind": "property", + "name": "modalities", + "serializedName": "modalities", + "type": { + "$id": "2341", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "400" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" + }, + { + "$id": "2342", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "type": { + "$id": "2343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" + }, + { + "$id": "2344", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "type": { + "$ref": "406" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" + }, + { + "$id": "2345", + "kind": "property", + "name": "input_audio_format", + "serializedName": "input_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" + }, + { + "$id": "2346", + "kind": "property", + "name": "output_audio_format", + "serializedName": "output_audio_format", + "type": { + "$ref": "414" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" + }, + { + "$id": "2347", + "kind": "property", + "name": "input_audio_transcription", + "serializedName": "input_audio_transcription", + "type": { + "$id": "2348", + "kind": "nullable", + "type": { + "$ref": "2120" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" + }, + { + "$id": "2349", + "kind": "property", + "name": "turn_detection", + "serializedName": "turn_detection", + "type": { + "$ref": "2123" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" + }, + { + "$id": "2350", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "type": { + "$id": "2351", + "kind": "array", + "name": "ArrayRealtimeTool", + "valueType": { + "$ref": "2140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" + }, + { + "$id": "2352", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "2353", + "kind": "union", + "name": "RealtimeToolChoice", + "variantTypes": [ + { + "$ref": "434" + }, + { + "$ref": "2155" + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" + }, + { + "$id": "2354", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "type": { + "$id": "2355", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" + }, + { + "$id": "2356", + "kind": "property", + "name": "max_response_output_tokens", + "serializedName": "max_response_output_tokens", + "type": { + "$id": "2357", + "kind": "nullable", + "type": { + "$id": "2358", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" + } + ] + }, + "session.updated": { + "$id": "2359", + "kind": "model", + "name": "RealtimeResponseSessionUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "session.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2360", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2361", + "kind": "constant", + "valueType": { + "$id": "2362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "session.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" + }, + { + "$id": "2363", + "kind": "property", + "name": "session", + "serializedName": "session", + "type": { + "$ref": "2333" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" + } + ] + }, + "conversation.item.created": { + "$id": "2364", + "kind": "model", + "name": "RealtimeResponseItemCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2365", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2366", + "kind": "constant", + "valueType": { + "$id": "2367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" + }, + { + "$id": "2368", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$id": "2369", + "kind": "model", + "name": "RealtimeResponseItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2370", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "442" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" + }, + "properties": [ + { + "$id": "2371", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2372", + "kind": "constant", + "valueType": { + "$ref": "535" + }, + "value": "realtime.item", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" + }, + { + "$ref": "2370" + }, + { + "$id": "2373", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2374", + "kind": "nullable", + "type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" + } + ], + "discriminatedSubtypes": { + "$id": "2376", + "message": { + "$id": "2377", + "kind": "model", + "name": "RealtimeResponseMessageItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", + "usage": "Output,Json", + "discriminatorValue": "message", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2378", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2200" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" + }, + { + "$id": "2379", + "kind": "property", + "name": "role", + "serializedName": "role", + "type": { + "$ref": "450" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" + }, + { + "$id": "2380", + "kind": "property", + "name": "content", + "serializedName": "content", + "type": { + "$id": "2381", + "kind": "array", + "name": "ArrayRealtimeContentPart", + "valueType": { + "$ref": "2211" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" + }, + { + "$id": "2382", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" + } + ] + }, + "function_call": { + "$id": "2383", + "kind": "model", + "name": "RealtimeResponseFunctionCallItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", + "usage": "Output,Json", + "discriminatorValue": "function_call", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2384", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2253" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" + }, + { + "$id": "2385", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" + }, + { + "$id": "2387", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" + }, + { + "$id": "2389", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" + }, + { + "$id": "2391", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "458" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" + } + ] + }, + "function_call_output": { + "$id": "2392", + "kind": "model", + "name": "RealtimeResponseFunctionCallOutputItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", + "usage": "Output,Json", + "discriminatorValue": "function_call_output", + "decorators": [], + "baseModel": { + "$ref": "2369" + }, + "properties": [ + { + "$id": "2393", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "2264" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" + }, + { + "$id": "2394", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" + }, + { + "$id": "2396", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" + } + ] + }, + "conversation.item.deleted": { + "$id": "2398", + "kind": "model", + "name": "RealtimeResponseItemDeletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.deleted", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2399", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2400", + "kind": "constant", + "valueType": { + "$id": "2401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" + }, + { + "$id": "2402", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" + } + ] + }, + "conversation.item.truncated": { + "$id": "2404", + "kind": "model", + "name": "RealtimeResponseItemTruncatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.truncated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2405", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2406", + "kind": "constant", + "valueType": { + "$id": "2407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.truncated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" + }, + { + "$id": "2408", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" + }, + { + "$id": "2410", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2411", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" + }, + { + "$id": "2412", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "2413", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" + } + ] + }, + "response.created": { + "$id": "2414", + "kind": "model", + "name": "RealtimeResponseCreatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.created", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2415", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2416", + "kind": "constant", + "valueType": { + "$id": "2417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.created", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" + }, + { + "$id": "2418", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "2419", + "kind": "model", + "name": "RealtimeResponse", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2420", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2421", + "kind": "constant", + "valueType": { + "$ref": "538" + }, + "value": "realtime.response", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" + }, + { + "$id": "2422", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" + }, + { + "$id": "2424", + "kind": "property", + "name": "status", + "serializedName": "status", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" + }, + { + "$id": "2425", + "kind": "property", + "name": "status_details", + "serializedName": "status_details", + "type": { + "$id": "2426", + "kind": "nullable", + "type": { + "$id": "2427", + "kind": "model", + "name": "RealtimeResponseStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2428", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "541" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" + }, + "properties": [ + { + "$ref": "2428" + } + ], + "discriminatedSubtypes": { + "$id": "2429", + "cancelled": { + "$id": "2430", + "kind": "model", + "name": "RealtimeResponseCancelledStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "cancelled", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2431", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2432", + "kind": "constant", + "valueType": { + "$id": "2433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "cancelled", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" + }, + { + "$id": "2434", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "553" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" + } + ] + }, + "incomplete": { + "$id": "2435", + "kind": "model", + "name": "RealtimeResponseIncompleteStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "incomplete", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2436", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2437", + "kind": "constant", + "valueType": { + "$id": "2438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "incomplete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" + }, + { + "$id": "2439", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "type": { + "$ref": "559" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" + } + ] + }, + "failed": { + "$id": "2440", + "kind": "model", + "name": "RealtimeResponseFailedStatusDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", + "usage": "Output,Json", + "discriminatorValue": "failed", + "decorators": [], + "baseModel": { + "$ref": "2427" + }, + "properties": [ + { + "$id": "2441", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2442", + "kind": "constant", + "valueType": { + "$id": "2443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" + }, + { + "$id": "2444", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2445", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" + } + ] + } + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" + }, + { + "$id": "2446", + "kind": "property", + "name": "output", + "serializedName": "output", + "type": { + "$id": "2447", + "kind": "array", + "name": "ArrayRealtimeResponseItem", + "valueType": { + "$ref": "2369" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" + }, + { + "$id": "2448", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "2449", + "kind": "model", + "name": "RealtimeResponseUsage", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2450", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "type": { + "$id": "2451", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" + }, + { + "$id": "2452", + "kind": "property", + "name": "input_tokens", + "serializedName": "input_tokens", + "type": { + "$id": "2453", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" + }, + { + "$id": "2454", + "kind": "property", + "name": "output_tokens", + "serializedName": "output_tokens", + "type": { + "$id": "2455", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" + }, + { + "$id": "2456", + "kind": "property", + "name": "input_token_details", + "serializedName": "input_token_details", + "type": { + "$id": "2457", + "kind": "model", + "name": "RealtimeResponseUsageInputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2458", + "kind": "property", + "name": "cached_tokens", + "serializedName": "cached_tokens", + "type": { + "$id": "2459", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" + }, + { + "$id": "2460", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2461", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" + }, + { + "$id": "2462", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2463", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" + }, + { + "$id": "2464", + "kind": "property", + "name": "output_token_details", + "serializedName": "output_token_details", + "type": { + "$id": "2465", + "kind": "model", + "name": "RealtimeResponseUsageOutputTokenDetails", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2466", + "kind": "property", + "name": "text_tokens", + "serializedName": "text_tokens", + "type": { + "$id": "2467", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" + }, + { + "$id": "2468", + "kind": "property", + "name": "audio_tokens", + "serializedName": "audio_tokens", + "type": { + "$id": "2469", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" + } + ] + }, + "response.done": { + "$id": "2470", + "kind": "model", + "name": "RealtimeResponseDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2471", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2472", + "kind": "constant", + "valueType": { + "$id": "2473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" + }, + { + "$id": "2474", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$ref": "2419" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" + } + ] + }, + "rate_limits.updated": { + "$id": "2475", + "kind": "model", + "name": "RealtimeResponseRateLimitsUpdatedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", + "usage": "Output,Json", + "discriminatorValue": "rate_limits.updated", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2476", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2477", + "kind": "constant", + "valueType": { + "$id": "2478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "rate_limits.updated", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" + }, + { + "$id": "2479", + "kind": "property", + "name": "rate_limits", + "serializedName": "rate_limits", + "type": { + "$id": "2480", + "kind": "array", + "name": "ArrayRealtimeResponseRateLimitDetailsItem", + "valueType": { + "$id": "2481", + "kind": "model", + "name": "RealtimeResponseRateLimitDetailsItem", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2482", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" + }, + { + "$id": "2484", + "kind": "property", + "name": "limit", + "serializedName": "limit", + "type": { + "$id": "2485", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" + }, + { + "$id": "2486", + "kind": "property", + "name": "remaining", + "serializedName": "remaining", + "type": { + "$id": "2487", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" + }, + { + "$id": "2488", + "kind": "property", + "name": "reset_seconds", + "serializedName": "reset_seconds", + "type": { + "$id": "2489", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" + } + ] + }, + "response.output_item.added": { + "$id": "2490", + "kind": "model", + "name": "RealtimeResponseOutputItemAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2491", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2492", + "kind": "constant", + "valueType": { + "$id": "2493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" + }, + { + "$id": "2494", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" + }, + { + "$id": "2496", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2497", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" + }, + { + "$id": "2498", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" + } + ] + }, + "response.output_item.done": { + "$id": "2499", + "kind": "model", + "name": "RealtimeResponseOutputItemDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.output_item.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2500", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2501", + "kind": "constant", + "valueType": { + "$id": "2502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.output_item.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" + }, + { + "$id": "2503", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" + }, + { + "$id": "2505", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2506", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" + }, + { + "$id": "2507", + "kind": "property", + "name": "item", + "serializedName": "item", + "type": { + "$ref": "2369" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" + } + ] + }, + "response.content_part.added": { + "$id": "2508", + "kind": "model", + "name": "RealtimeResponseContentPartAddedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.added", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2509", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2510", + "kind": "constant", + "valueType": { + "$id": "2511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.content_part.added", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" + }, + { + "$id": "2512", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" + }, + { + "$id": "2514", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" + }, + { + "$id": "2516", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2517", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" + }, + { + "$id": "2518", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2519", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" + }, + { + "$id": "2520", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" + } + ] + }, + "response.content_part.done": { + "$id": "2521", + "kind": "model", + "name": "RealtimeResponseContentPartDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.content_part.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2522", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2523", + "kind": "constant", + "valueType": { + "$id": "2524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.content_part.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" + }, + { + "$id": "2525", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" + }, + { + "$id": "2527", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" + }, + { + "$id": "2529", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2530", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" + }, + { + "$id": "2531", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2532", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" + }, + { + "$id": "2533", + "kind": "property", + "name": "part", + "serializedName": "part", + "type": { + "$ref": "2211" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" + } + ] + }, + "response.audio.delta": { + "$id": "2534", + "kind": "model", + "name": "RealtimeResponseAudioDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2535", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2536", + "kind": "constant", + "valueType": { + "$id": "2537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" + }, + { + "$id": "2538", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" + }, + { + "$id": "2540", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2541", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" + }, + { + "$id": "2542", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2543", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" + }, + { + "$id": "2544", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2545", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" + }, + { + "$id": "2546", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2547", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" + } + ] + }, + "response.audio.done": { + "$id": "2548", + "kind": "model", + "name": "RealtimeResponseAudioDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2549", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2550", + "kind": "constant", + "valueType": { + "$id": "2551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" + }, + { + "$id": "2552", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" + }, + { + "$id": "2554", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" + }, + { + "$id": "2556", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2557", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" + }, + { + "$id": "2558", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2559", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" + } + ] + }, + "response.audio_transcript.delta": { + "$id": "2560", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2561", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2562", + "kind": "constant", + "valueType": { + "$id": "2563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio_transcript.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" + }, + { + "$id": "2564", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" + }, + { + "$id": "2566", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" + }, + { + "$id": "2568", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2569", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" + }, + { + "$id": "2570", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" + }, + { + "$id": "2572", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" + } + ] + }, + "response.audio_transcript.done": { + "$id": "2574", + "kind": "model", + "name": "RealtimeResponseAudioTranscriptDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.audio_transcript.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2575", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2576", + "kind": "constant", + "valueType": { + "$id": "2577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.audio_transcript.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" + }, + { + "$id": "2578", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" + }, + { + "$id": "2580", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" + }, + { + "$id": "2582", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2583", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" + }, + { + "$id": "2584", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2585", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" + } + ] + }, + "response.text.delta": { + "$id": "2586", + "kind": "model", + "name": "RealtimeResponseTextDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2587", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2588", + "kind": "constant", + "valueType": { + "$id": "2589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" + }, + { + "$id": "2590", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" + }, + { + "$id": "2592", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" + }, + { + "$id": "2594", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2595", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" + }, + { + "$id": "2596", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2597", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" + }, + { + "$id": "2598", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" + } + ] + }, + "response.text.done": { + "$id": "2600", + "kind": "model", + "name": "RealtimeResponseTextDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.text.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2601", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2602", + "kind": "constant", + "valueType": { + "$id": "2603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.text.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" + }, + { + "$id": "2604", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" + }, + { + "$id": "2606", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" + }, + { + "$id": "2608", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2609", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" + }, + { + "$id": "2610", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2611", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" + }, + { + "$id": "2612", + "kind": "property", + "name": "value", + "serializedName": "value", + "type": { + "$id": "2613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" + } + ] + }, + "response.function_call_arguments.delta": { + "$id": "2614", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.delta", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2615", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2616", + "kind": "constant", + "valueType": { + "$id": "2617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" + }, + { + "$id": "2618", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" + }, + { + "$id": "2620", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" + }, + { + "$id": "2622", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2623", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" + }, + { + "$id": "2624", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" + }, + { + "$id": "2626", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$id": "2627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" + } + ] + }, + "response.function_call_arguments.done": { + "$id": "2628", + "kind": "model", + "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", + "usage": "Output,Json", + "discriminatorValue": "response.function_call_arguments.done", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2629", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2630", + "kind": "constant", + "valueType": { + "$id": "2631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "response.function_call_arguments.done", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" + }, + { + "$id": "2632", + "kind": "property", + "name": "response_id", + "serializedName": "response_id", + "type": { + "$id": "2633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" + }, + { + "$id": "2634", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" + }, + { + "$id": "2636", + "kind": "property", + "name": "output_index", + "serializedName": "output_index", + "type": { + "$id": "2637", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" + }, + { + "$id": "2638", + "kind": "property", + "name": "call_id", + "serializedName": "call_id", + "type": { + "$id": "2639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" + }, + { + "$id": "2640", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" + }, + { + "$id": "2642", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "type": { + "$id": "2643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" + } + ] + }, + "input_audio_buffer.speech_started": { + "$id": "2644", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_started", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2645", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2646", + "kind": "constant", + "valueType": { + "$id": "2647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_started", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" + }, + { + "$id": "2648", + "kind": "property", + "name": "audio_start_ms", + "serializedName": "audio_start_ms", + "type": { + "$id": "2649", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" + }, + { + "$id": "2650", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" + } + ] + }, + "input_audio_buffer.speech_stopped": { + "$id": "2652", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.speech_stopped", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2653", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2654", + "kind": "constant", + "valueType": { + "$id": "2655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.speech_stopped", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" + }, + { + "$id": "2656", + "kind": "property", + "name": "audio_end_ms", + "serializedName": "audio_end_ms", + "type": { + "$id": "2657", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" + }, + { + "$id": "2658", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" + } + ] + }, + "conversation.item.input_audio_transcription.completed": { + "$id": "2660", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.completed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2661", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2662", + "kind": "constant", + "valueType": { + "$id": "2663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.completed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" + }, + { + "$id": "2664", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" + }, + { + "$id": "2666", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2667", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" + }, + { + "$id": "2668", + "kind": "property", + "name": "transcript", + "serializedName": "transcript", + "type": { + "$id": "2669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" + } + ] + }, + "conversation.item.input_audio_transcription.failed": { + "$id": "2670", + "kind": "model", + "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", + "usage": "Output,Json", + "discriminatorValue": "conversation.item.input_audio_transcription.failed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2671", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2672", + "kind": "constant", + "valueType": { + "$id": "2673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "conversation.item.input_audio_transcription.failed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" + }, + { + "$id": "2674", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" + }, + { + "$id": "2676", + "kind": "property", + "name": "content_index", + "serializedName": "content_index", + "type": { + "$id": "2677", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" + }, + { + "$id": "2678", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2679", + "kind": "model", + "name": "RealtimeResponseApiError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2680", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" + }, + { + "$id": "2682", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" + }, + { + "$id": "2684", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" + }, + { + "$id": "2686", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" + } + ] + }, + "input_audio_buffer.committed": { + "$id": "2688", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferCommittedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.committed", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2689", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2690", + "kind": "constant", + "valueType": { + "$id": "2691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.committed", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" + }, + { + "$id": "2692", + "kind": "property", + "name": "item_id", + "serializedName": "item_id", + "type": { + "$id": "2693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" + }, + { + "$id": "2694", + "kind": "property", + "name": "previous_item_id", + "serializedName": "previous_item_id", + "type": { + "$id": "2695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" + } + ] + }, + "input_audio_buffer.cleared": { + "$id": "2696", + "kind": "model", + "name": "RealtimeResponseInputAudioBufferClearedCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", + "usage": "Output,Json", + "discriminatorValue": "input_audio_buffer.cleared", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2697", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2698", + "kind": "constant", + "valueType": { + "$id": "2699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "input_audio_buffer.cleared", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" + } + ] + }, + "error": { + "$id": "2700", + "kind": "model", + "name": "RealtimeResponseErrorCommand", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", + "usage": "Output,Json", + "description": "A command that describes an error encountered during a realtime operation.", + "discriminatorValue": "error", + "decorators": [], + "baseModel": { + "$ref": "2322" + }, + "properties": [ + { + "$id": "2701", + "kind": "property", + "name": "Kind", + "serializedName": "type", + "type": { + "$id": "2702", + "kind": "constant", + "valueType": { + "$id": "2703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "error", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" + }, + { + "$id": "2704", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$id": "2705", + "kind": "model", + "name": "RealtimeResponseError", + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2706", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" + }, + { + "$id": "2708", + "kind": "property", + "name": "code", + "serializedName": "code", + "type": { + "$id": "2709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" + }, + { + "$id": "2710", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "2711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" + }, + { + "$id": "2712", + "kind": "property", + "name": "param", + "serializedName": "param", + "type": { + "$id": "2713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" + }, + { + "$id": "2714", + "kind": "property", + "name": "event_id", + "serializedName": "event_id", + "type": { + "$id": "2715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" + } + ] + } + } + }, + { + "$ref": "2328" + }, + { + "$ref": "2333" + }, + { + "$ref": "2359" + }, + { + "$ref": "2364" + }, + { + "$ref": "2369" + }, + { + "$ref": "2377" + }, + { + "$ref": "2383" + }, + { + "$ref": "2392" + }, + { + "$ref": "2398" + }, + { + "$ref": "2404" + }, + { + "$ref": "2414" + }, + { + "$ref": "2419" + }, + { + "$ref": "2427" + }, + { + "$ref": "2430" + }, + { + "$ref": "2435" + }, + { + "$ref": "2440" + }, + { + "$ref": "2449" + }, + { + "$ref": "2457" + }, + { + "$ref": "2465" + }, + { + "$ref": "2470" + }, + { + "$ref": "2475" + }, + { + "$ref": "2481" + }, + { + "$ref": "2490" + }, + { + "$ref": "2499" + }, + { + "$ref": "2508" + }, + { + "$ref": "2521" + }, + { + "$ref": "2534" + }, + { + "$ref": "2548" + }, + { + "$ref": "2560" + }, + { + "$ref": "2574" + }, + { + "$ref": "2586" + }, + { + "$ref": "2600" + }, + { + "$ref": "2614" + }, + { + "$ref": "2628" + }, + { + "$ref": "2644" + }, + { + "$ref": "2652" + }, + { + "$ref": "2660" + }, + { + "$ref": "2670" + }, + { + "$ref": "2679" + }, + { + "$ref": "2688" + }, + { + "$ref": "2696" + }, + { + "$ref": "2700" + }, + { + "$ref": "2705" + }, + { + "$id": "2716", + "kind": "model", + "name": "CreateModerationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2717", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input text to classify", + "type": { + "$id": "2718", + "kind": "union", + "name": "CreateModerationRequestInput", + "variantTypes": [ + { + "$id": "2719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "2720", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" + }, + { + "$id": "2722", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", + "type": { + "$ref": "565" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" + } + ] + }, + { + "$id": "2723", + "kind": "model", + "name": "CreateModerationResponse", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", + "usage": "Output,Json", + "description": "Represents if a given text input is potentially harmful.", + "decorators": [], + "properties": [ + { + "$id": "2724", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The unique identifier for the moderation request.", + "type": { + "$id": "2725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" + }, + { + "$id": "2726", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used to generate the moderation results.", + "type": { + "$id": "2727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" + }, + { + "$id": "2728", + "kind": "property", + "name": "results", + "serializedName": "results", + "description": "A list of moderation objects.", + "type": { + "$id": "2729", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2730", + "kind": "model", + "name": "CreateModerationResponseResult", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2731", + "kind": "property", + "name": "flagged", + "serializedName": "flagged", + "description": "Whether any of the below categories are flagged.", + "type": { + "$id": "2732", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" + }, + { + "$id": "2733", + "kind": "property", + "name": "categories", + "serializedName": "categories", + "description": "A list of the categories, and whether they are flagged or not.", + "type": { + "$id": "2734", + "kind": "model", + "name": "CreateModerationResponseResultCategories", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2735", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", + "type": { + "$id": "2736", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" + }, + { + "$id": "2737", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", + "type": { + "$id": "2738", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" + }, + { + "$id": "2739", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "Content that expresses, incites, or promotes harassing language towards any target.", + "type": { + "$id": "2740", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" + }, + { + "$id": "2741", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "Harassment content that also includes violence or serious harm towards any target.", + "type": { + "$id": "2742", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" + }, + { + "$id": "2743", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "2744", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" + }, + { + "$id": "2745", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": { + "$id": "2746", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" + }, + { + "$id": "2747", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", + "type": { + "$id": "2748", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" + }, + { + "$id": "2749", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", + "type": { + "$id": "2750", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" + }, + { + "$id": "2751", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "Sexual content that includes an individual who is under 18 years old.", + "type": { + "$id": "2752", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" + }, + { + "$id": "2753", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "Content that depicts death, violence, or physical injury.", + "type": { + "$id": "2754", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" + }, + { + "$id": "2755", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "Content that depicts death, violence, or physical injury in graphic detail.", + "type": { + "$id": "2756", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" + }, + { + "$id": "2757", + "kind": "property", + "name": "category_scores", + "serializedName": "category_scores", + "description": "A list of the categories along with their scores as predicted by model.", + "type": { + "$id": "2758", + "kind": "model", + "name": "CreateModerationResponseResultCategoryScores", + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2759", + "kind": "property", + "name": "hate", + "serializedName": "hate", + "description": "The score for the category 'hate'.", + "type": { + "$id": "2760", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" + }, + { + "$id": "2761", + "kind": "property", + "name": "hate/threatening", + "serializedName": "hate/threatening", + "description": "The score for the category 'hate/threatening'.", + "type": { + "$id": "2762", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" + }, + { + "$id": "2763", + "kind": "property", + "name": "harassment", + "serializedName": "harassment", + "description": "The score for the category 'harassment'.", + "type": { + "$id": "2764", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" + }, + { + "$id": "2765", + "kind": "property", + "name": "harassment/threatening", + "serializedName": "harassment/threatening", + "description": "The score for the category 'harassment/threatening'.", + "type": { + "$id": "2766", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" + }, + { + "$id": "2767", + "kind": "property", + "name": "self-harm", + "serializedName": "self-harm", + "description": "The score for the category 'self-harm'.", + "type": { + "$id": "2768", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" + }, + { + "$id": "2769", + "kind": "property", + "name": "self-harm/intent", + "serializedName": "self-harm/intent", + "description": "The score for the category 'self-harm/intent'.", + "type": { + "$id": "2770", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" + }, + { + "$id": "2771", + "kind": "property", + "name": "self-harm/instructions", + "serializedName": "self-harm/instructions", + "description": "The score for the category 'self-harm/instructions'.", + "type": { + "$id": "2772", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" + }, + { + "$id": "2773", + "kind": "property", + "name": "sexual", + "serializedName": "sexual", + "description": "The score for the category 'sexual'.", + "type": { + "$id": "2774", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" + }, + { + "$id": "2775", + "kind": "property", + "name": "sexual/minors", + "serializedName": "sexual/minors", + "description": "The score for the category 'sexual/minors'.", + "type": { + "$id": "2776", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" + }, + { + "$id": "2777", + "kind": "property", + "name": "violence", + "serializedName": "violence", + "description": "The score for the category 'violence'.", + "type": { + "$id": "2778", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" + }, + { + "$id": "2779", + "kind": "property", + "name": "violence/graphic", + "serializedName": "violence/graphic", + "description": "The score for the category 'violence/graphic'.", + "type": { + "$id": "2780", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" + } + ] + }, + { + "$ref": "2730" + }, + { + "$ref": "2734" + }, + { + "$ref": "2758" + }, + { + "$id": "2781", + "kind": "model", + "name": "ListModelsResponse", + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2782", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2783", + "kind": "constant", + "valueType": { + "$ref": "571" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" + }, + { + "$id": "2784", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2785", + "kind": "array", + "name": "ArrayModel", + "valueType": { + "$id": "2786", + "kind": "model", + "name": "Model", + "crossLanguageDefinitionId": "OpenAI.Model", + "usage": "Output,Json", + "description": "Describes an OpenAI model offering that can be used with the API.", + "decorators": [], + "properties": [ + { + "$id": "2787", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The model identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.id" + }, + { + "$id": "2789", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) when the model was created.", + "type": { + "$id": "2790", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2791", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.created" + }, + { + "$id": "2792", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"model\".", + "type": { + "$id": "2793", + "kind": "constant", + "valueType": { + "$ref": "574" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.object" + }, + { + "$id": "2794", + "kind": "property", + "name": "owned_by", + "serializedName": "owned_by", + "description": "The organization that owns the model.", + "type": { + "$id": "2795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Model.owned_by" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" + } + ] + }, + { + "$ref": "2786" + }, + { + "$id": "2796", + "kind": "model", + "name": "DeleteModelResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2797", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" + }, + { + "$id": "2799", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2800", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" + }, + { + "$id": "2801", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2802", + "kind": "constant", + "valueType": { + "$ref": "577" + }, + "value": "model", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" + } + ] + }, + { + "$id": "2803", + "kind": "model", + "name": "MessageObject", + "crossLanguageDefinitionId": "OpenAI.MessageObject", + "usage": "Output,Json", + "description": "Represents a message within a [thread](/docs/api-reference/threads).", + "decorators": [], + "properties": [ + { + "$id": "2804", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "2805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.id" + }, + { + "$id": "2806", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message`.", + "type": { + "$id": "2807", + "kind": "constant", + "valueType": { + "$ref": "580" + }, + "value": "thread.message", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.object" + }, + { + "$id": "2808", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the message was created.", + "type": { + "$id": "2809", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2810", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" + }, + { + "$id": "2811", + "kind": "property", + "name": "thread_id", + "serializedName": "thread_id", + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", + "type": { + "$id": "2812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" + }, + { + "$id": "2813", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", + "type": { + "$ref": "583" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.status" + }, + { + "$id": "2814", + "kind": "property", + "name": "incomplete_details", + "serializedName": "incomplete_details", + "description": "On an incomplete message, details about why the message is incomplete.", + "type": { + "$id": "2815", + "kind": "nullable", + "type": { + "$id": "2816", + "kind": "model", + "name": "MessageObjectIncompleteDetails", + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2817", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "description": "The reason the message is incomplete.", + "type": { + "$ref": "591" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" + }, + { + "$id": "2818", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the message was completed.", + "type": { + "$id": "2819", + "kind": "nullable", + "type": { + "$id": "2820", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2821", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" + }, + { + "$id": "2822", + "kind": "property", + "name": "incomplete_at", + "serializedName": "incomplete_at", + "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", + "type": { + "$id": "2823", + "kind": "nullable", + "type": { + "$id": "2824", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2825", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" + }, + { + "$id": "2826", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "603" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.role" + }, + { + "$id": "2827", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "2828", + "kind": "array", + "name": "ArrayMessageContent", + "valueType": { + "$ref": "1530" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.content" + }, + { + "$id": "2829", + "kind": "property", + "name": "assistant_id", + "serializedName": "assistant_id", + "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", + "type": { + "$id": "2830", + "kind": "nullable", + "type": { + "$id": "2831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" + }, + { + "$id": "2832", + "kind": "property", + "name": "run_id", + "serializedName": "run_id", + "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", + "type": { + "$id": "2833", + "kind": "nullable", + "type": { + "$id": "2834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" + }, + { + "$id": "2835", + "kind": "property", + "name": "attachments", + "serializedName": "attachments", + "description": "A list of files attached to the message, and the tools they were added to.", + "type": { + "$id": "2836", + "kind": "nullable", + "type": { + "$id": "2837", + "kind": "array", + "name": "MessageObjectAttachments", + "valueType": { + "$id": "2838", + "kind": "model", + "name": "MessageObjectAttachment", + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2839", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file to attach to the message.", + "type": { + "$id": "2840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" + }, + { + "$id": "2841", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "The tools to add this file to.", + "type": { + "$id": "2842", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2843", + "kind": "union", + "name": "MessageObjectAttachmentTool", + "variantTypes": [ + { + "$ref": "1540" + }, + { + "$ref": "1577" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" + }, + { + "$id": "2844", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2845", + "kind": "nullable", + "type": { + "$id": "2846", + "kind": "dict", + "keyType": { + "$id": "2847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" + } + ] + }, + { + "$ref": "2816" + }, + { + "$ref": "2838" + }, + { + "$id": "2849", + "kind": "model", + "name": "ListMessagesResponse", + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2850", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2851", + "kind": "constant", + "valueType": { + "$ref": "615" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" + }, + { + "$id": "2852", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2853", + "kind": "array", + "name": "ArrayMessageObject", + "valueType": { + "$ref": "2803" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" + }, + { + "$id": "2854", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "2855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" + }, + { + "$id": "2856", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "2857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" + }, + { + "$id": "2858", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "2859", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" + } + ] + }, + { + "$id": "2860", + "kind": "model", + "name": "ModifyMessageRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2861", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "2862", + "kind": "nullable", + "type": { + "$id": "2863", + "kind": "dict", + "keyType": { + "$id": "2864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" + } + ] + }, + { + "$id": "2866", + "kind": "model", + "name": "DeleteMessageResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2867", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "2868", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" + }, + { + "$id": "2869", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "2870", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" + }, + { + "$id": "2871", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "2872", + "kind": "constant", + "valueType": { + "$ref": "618" + }, + "value": "thread.message.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" + } + ] + }, + { + "$id": "2873", + "kind": "model", + "name": "CreateImageRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2874", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", + "type": { + "$id": "2875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" + }, + { + "$id": "2876", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation.", + "type": { + "$id": "2877", + "kind": "nullable", + "type": { + "$ref": "621" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" + }, + { + "$id": "2878", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2879", + "kind": "nullable", + "type": { + "$id": "2880", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" + }, + { + "$id": "2881", + "kind": "property", + "name": "quality", + "serializedName": "quality", + "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", + "type": { + "$ref": "627" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" + }, + { + "$id": "2882", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2883", + "kind": "nullable", + "type": { + "$ref": "633" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" + }, + { + "$id": "2884", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", + "type": { + "$id": "2885", + "kind": "nullable", + "type": { + "$ref": "639" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" + }, + { + "$id": "2886", + "kind": "property", + "name": "style", + "serializedName": "style", + "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", + "type": { + "$id": "2887", + "kind": "nullable", + "type": { + "$ref": "651" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" + }, + { + "$id": "2888", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" + } + ] + }, + { + "$id": "2890", + "kind": "model", + "name": "ImagesResponse", + "crossLanguageDefinitionId": "OpenAI.ImagesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2891", + "kind": "property", + "name": "created", + "serializedName": "created", + "type": { + "$id": "2892", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2893", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" + }, + { + "$id": "2894", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "2895", + "kind": "array", + "name": "ArrayImage", + "valueType": { + "$id": "2896", + "kind": "model", + "name": "Image", + "crossLanguageDefinitionId": "OpenAI.Image", + "usage": "Output,Json", + "description": "Represents the url or the content of an image generated by the OpenAI API.", + "decorators": [], + "properties": [ + { + "$id": "2897", + "kind": "property", + "name": "b64_json", + "serializedName": "b64_json", + "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", + "type": { + "$id": "2898", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.b64_json" + }, + { + "$id": "2899", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the generated image, if `response_format` is `url` (default).", + "type": { + "$id": "2900", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.url" + }, + { + "$id": "2901", + "kind": "property", + "name": "revised_prompt", + "serializedName": "revised_prompt", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", + "type": { + "$id": "2902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" + } + ] + }, + { + "$ref": "2896" + }, + { + "$id": "2903", + "kind": "model", + "name": "CreateImageEditRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2904", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", + "type": { + "$id": "2905", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" + }, + { + "$id": "2906", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "A text description of the desired image(s). The maximum length is 1000 characters.", + "type": { + "$id": "2907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" + }, + { + "$id": "2908", + "kind": "property", + "name": "mask", + "serializedName": "mask", + "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", + "type": { + "$id": "2909", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" + }, + { + "$id": "2910", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2911", + "kind": "nullable", + "type": { + "$ref": "657" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" + }, + { + "$id": "2912", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10.", + "type": { + "$id": "2913", + "kind": "nullable", + "type": { + "$id": "2914", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" + }, + { + "$id": "2915", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2916", + "kind": "nullable", + "type": { + "$ref": "661" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" + }, + { + "$id": "2917", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2918", + "kind": "nullable", + "type": { + "$ref": "669" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" + }, + { + "$id": "2919", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" + } + ] + }, + { + "$id": "2921", + "kind": "model", + "name": "CreateImageVariationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "2922", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", + "type": { + "$id": "2923", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" + }, + { + "$id": "2924", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "type": { + "$id": "2925", + "kind": "nullable", + "type": { + "$ref": "675" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" + }, + { + "$id": "2926", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", + "type": { + "$id": "2927", + "kind": "nullable", + "type": { + "$id": "2928", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" + }, + { + "$id": "2929", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", + "type": { + "$id": "2930", + "kind": "nullable", + "type": { + "$ref": "679" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" + }, + { + "$id": "2931", + "kind": "property", + "name": "size", + "serializedName": "size", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "type": { + "$id": "2932", + "kind": "nullable", + "type": { + "$ref": "685" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" + }, + { + "$id": "2933", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "2934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" + } + ] + }, + { + "$id": "2935", + "kind": "model", + "name": "CreateFineTuningJobRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2936", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", + "type": { + "$ref": "693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" + }, + { + "$id": "2937", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" + }, + { + "$id": "2939", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job.", + "type": { + "$id": "2940", + "kind": "model", + "name": "CreateFineTuningJobRequestHyperparameters", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2941", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "2942", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "703" + }, + { + "$id": "2943", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" + }, + { + "$id": "2944", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "2945", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "707" + }, + { + "$id": "2946", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" + }, + { + "$id": "2947", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "2948", + "kind": "union", + "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "711" + }, + { + "$id": "2949", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" + }, + { + "$id": "2950", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", + "type": { + "$id": "2951", + "kind": "nullable", + "type": { + "$id": "2952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" + }, + { + "$id": "2953", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "2954", + "kind": "nullable", + "type": { + "$id": "2955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" + }, + { + "$id": "2956", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for your fine-tuning job.", + "type": { + "$id": "2957", + "kind": "nullable", + "type": { + "$id": "2958", + "kind": "array", + "name": "CreateFineTuningJobRequestIntegrations", + "valueType": { + "$id": "2959", + "kind": "model", + "name": "CreateFineTuningJobRequestIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "2960", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" + }, + "properties": [ + { + "$ref": "2960" + } + ], + "discriminatedSubtypes": { + "$id": "2962", + "wandb": { + "$id": "2963", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegration", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", + "usage": "Input,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "2959" + }, + "properties": [ + { + "$id": "2964", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "2965", + "kind": "constant", + "valueType": { + "$id": "2966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" + }, + { + "$id": "2967", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "type": { + "$id": "2968", + "kind": "model", + "name": "CreateFineTuningJobRequestWandbIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "2969", + "kind": "property", + "name": "project", + "serializedName": "project", + "type": { + "$id": "2970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" + }, + { + "$id": "2971", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "2972", + "kind": "nullable", + "type": { + "$id": "2973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" + }, + { + "$id": "2974", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "type": { + "$id": "2975", + "kind": "nullable", + "type": { + "$id": "2976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" + }, + { + "$id": "2977", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "type": { + "$id": "2978", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" + }, + { + "$id": "2980", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", + "type": { + "$id": "2981", + "kind": "nullable", + "type": { + "$id": "2982", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" + } + ] + }, + { + "$ref": "2940" + }, + { + "$ref": "2959" + }, + { + "$ref": "2963" + }, + { + "$ref": "2968" + }, + { + "$id": "2983", + "kind": "model", + "name": "FineTuningJob", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob", + "usage": "Output,Json", + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", + "decorators": [], + "properties": [ + { + "$id": "2984", + "kind": "property", + "name": "user_provided_suffix", + "serializedName": "user_provided_suffix", + "description": "The descriptive suffix applied to the job, as specified in the job creation request.", + "type": { + "$id": "2985", + "kind": "nullable", + "type": { + "$id": "2986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" + }, + { + "$id": "2987", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The object identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "2988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" + }, + { + "$id": "2989", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", + "type": { + "$id": "2990", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "2991", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" + }, + { + "$id": "2992", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", + "type": { + "$id": "2993", + "kind": "nullable", + "type": { + "$id": "2994", + "kind": "model", + "name": "FineTuningJobError", + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "2995", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "2996", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" + }, + { + "$id": "2997", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "2998", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" + }, + { + "$id": "2999", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", + "type": { + "$id": "3000", + "kind": "nullable", + "type": { + "$id": "3001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" + }, + { + "$id": "3002", + "kind": "property", + "name": "fine_tuned_model", + "serializedName": "fine_tuned_model", + "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3003", + "kind": "nullable", + "type": { + "$id": "3004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" + }, + { + "$id": "3005", + "kind": "property", + "name": "finished_at", + "serializedName": "finished_at", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3006", + "kind": "nullable", + "type": { + "$id": "3007", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3008", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" + }, + { + "$id": "3009", + "kind": "property", + "name": "hyperparameters", + "serializedName": "hyperparameters", + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "type": { + "$id": "3010", + "kind": "model", + "name": "FineTuningJobHyperparameters", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3011", + "kind": "property", + "name": "n_epochs", + "serializedName": "n_epochs", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", + "type": { + "$id": "3012", + "kind": "union", + "name": "FineTuningJobHyperparametersNEpochs", + "variantTypes": [ + { + "$ref": "715" + }, + { + "$id": "3013", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" + }, + { + "$id": "3014", + "kind": "property", + "name": "batch_size", + "serializedName": "batch_size", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", + "type": { + "$id": "3015", + "kind": "union", + "name": "FineTuningJobHyperparametersBatchSize", + "variantTypes": [ + { + "$ref": "719" + }, + { + "$id": "3016", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" + }, + { + "$id": "3017", + "kind": "property", + "name": "learning_rate_multiplier", + "serializedName": "learning_rate_multiplier", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", + "type": { + "$id": "3018", + "kind": "union", + "name": "FineTuningJobHyperparametersLearningRateMultiplier", + "variantTypes": [ + { + "$ref": "723" + }, + { + "$id": "3019", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" + }, + { + "$id": "3020", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The base model that is being fine-tuned.", + "type": { + "$id": "3021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" + }, + { + "$id": "3022", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job\".", + "type": { + "$id": "3023", + "kind": "constant", + "valueType": { + "$ref": "727" + }, + "value": "fine_tuning.job", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" + }, + { + "$id": "3024", + "kind": "property", + "name": "organization_id", + "serializedName": "organization_id", + "description": "The organization that owns the fine-tuning job.", + "type": { + "$id": "3025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" + }, + { + "$id": "3026", + "kind": "property", + "name": "result_files", + "serializedName": "result_files", + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3027", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" + }, + { + "$id": "3029", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", + "type": { + "$ref": "730" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" + }, + { + "$id": "3030", + "kind": "property", + "name": "trained_tokens", + "serializedName": "trained_tokens", + "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", + "type": { + "$id": "3031", + "kind": "nullable", + "type": { + "$id": "3032", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" + }, + { + "$id": "3033", + "kind": "property", + "name": "training_file", + "serializedName": "training_file", + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" + }, + { + "$id": "3035", + "kind": "property", + "name": "validation_file", + "serializedName": "validation_file", + "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": { + "$id": "3036", + "kind": "nullable", + "type": { + "$id": "3037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" + }, + { + "$id": "3038", + "kind": "property", + "name": "integrations", + "serializedName": "integrations", + "description": "A list of integrations to enable for this fine-tuning job.", + "type": { + "$id": "3039", + "kind": "nullable", + "type": { + "$id": "3040", + "kind": "array", + "name": "FineTuningJobIntegrations", + "valueType": { + "$id": "3041", + "kind": "model", + "name": "FineTuningIntegration", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", + "usage": "Output,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3042", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" + }, + "properties": [ + { + "$ref": "3042" + } + ], + "discriminatedSubtypes": { + "$id": "3044", + "wandb": { + "$id": "3045", + "kind": "model", + "name": "FineTuningIntegrationWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", + "usage": "Output,Json", + "discriminatorValue": "wandb", + "decorators": [], + "baseModel": { + "$ref": "3041" + }, + "properties": [ + { + "$id": "3046", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the integration being enabled for the fine-tuning job", + "type": { + "$id": "3047", + "kind": "constant", + "valueType": { + "$id": "3048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "wandb", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" + }, + { + "$id": "3049", + "kind": "property", + "name": "wandb", + "serializedName": "wandb", + "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", + "type": { + "$id": "3050", + "kind": "model", + "name": "FineTuningIntegrationWandbWandb", + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3051", + "kind": "property", + "name": "project", + "serializedName": "project", + "description": "The name of the project that the new run will be created under.", + "type": { + "$id": "3052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" + }, + { + "$id": "3053", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", + "type": { + "$id": "3054", + "kind": "nullable", + "type": { + "$id": "3055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" + }, + { + "$id": "3056", + "kind": "property", + "name": "entity", + "serializedName": "entity", + "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", + "type": { + "$id": "3057", + "kind": "nullable", + "type": { + "$id": "3058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" + }, + { + "$id": "3059", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", + "type": { + "$id": "3060", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" + } + ] + } + } + }, + "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" + }, + { + "$id": "3062", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "The seed used for the fine-tuning job.", + "type": { + "$id": "3063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" + }, + { + "$id": "3064", + "kind": "property", + "name": "estimated_finish", + "serializedName": "estimated_finish", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", + "type": { + "$id": "3065", + "kind": "nullable", + "type": { + "$id": "3066", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3067", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" + } + ] + }, + { + "$ref": "2994" + }, + { + "$ref": "3010" + }, + { + "$ref": "3041" + }, + { + "$ref": "3045" + }, + { + "$ref": "3050" + }, + { + "$id": "3068", + "kind": "model", + "name": "ListPaginatedFineTuningJobsResponse", + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3069", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3070", + "kind": "array", + "name": "ArrayFineTuningJob", + "valueType": { + "$ref": "2983" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" + }, + { + "$id": "3071", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3072", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" + }, + { + "$id": "3073", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3074", + "kind": "constant", + "valueType": { + "$ref": "744" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" + } + ] + }, + { + "$id": "3075", + "kind": "model", + "name": "ListFineTuningJobCheckpointsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3076", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3077", + "kind": "array", + "name": "ArrayFineTuningJobCheckpoint", + "valueType": { + "$id": "3078", + "kind": "model", + "name": "FineTuningJobCheckpoint", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", + "usage": "Output,Json", + "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", + "decorators": [], + "properties": [ + { + "$id": "3079", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The checkpoint identifier, which can be referenced in the API endpoints.", + "type": { + "$id": "3080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" + }, + { + "$id": "3081", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", + "type": { + "$id": "3082", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3083", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" + }, + { + "$id": "3084", + "kind": "property", + "name": "fine_tuned_model_checkpoint", + "serializedName": "fine_tuned_model_checkpoint", + "description": "The name of the fine-tuned checkpoint model that is created.", + "type": { + "$id": "3085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" + }, + { + "$id": "3086", + "kind": "property", + "name": "step_number", + "serializedName": "step_number", + "description": "The step number that the checkpoint was created at.", + "type": { + "$id": "3087", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" + }, + { + "$id": "3088", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "description": "Metrics at the step number during the fine-tuning job.", + "type": { + "$id": "3089", + "kind": "model", + "name": "FineTuningJobCheckpointMetrics", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3090", + "kind": "property", + "name": "step", + "serializedName": "step", + "type": { + "$id": "3091", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" + }, + { + "$id": "3092", + "kind": "property", + "name": "train_loss", + "serializedName": "train_loss", + "type": { + "$id": "3093", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" + }, + { + "$id": "3094", + "kind": "property", + "name": "train_mean_token_accuracy", + "serializedName": "train_mean_token_accuracy", + "type": { + "$id": "3095", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" + }, + { + "$id": "3096", + "kind": "property", + "name": "valid_loss", + "serializedName": "valid_loss", + "type": { + "$id": "3097", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" + }, + { + "$id": "3098", + "kind": "property", + "name": "valid_mean_token_accuracy", + "serializedName": "valid_mean_token_accuracy", + "type": { + "$id": "3099", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" + }, + { + "$id": "3100", + "kind": "property", + "name": "full_valid_loss", + "serializedName": "full_valid_loss", + "type": { + "$id": "3101", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" + }, + { + "$id": "3102", + "kind": "property", + "name": "full_valid_mean_token_accuracy", + "serializedName": "full_valid_mean_token_accuracy", + "type": { + "$id": "3103", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" + }, + { + "$id": "3104", + "kind": "property", + "name": "fine_tuning_job_id", + "serializedName": "fine_tuning_job_id", + "description": "The name of the fine-tuning job that this checkpoint was created from.", + "type": { + "$id": "3105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" + }, + { + "$id": "3106", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", + "type": { + "$id": "3107", + "kind": "constant", + "valueType": { + "$ref": "747" + }, + "value": "fine_tuning.job.checkpoint", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" + }, + { + "$id": "3108", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3109", + "kind": "constant", + "valueType": { + "$ref": "750" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" + }, + { + "$id": "3110", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3111", + "kind": "nullable", + "type": { + "$id": "3112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" + }, + { + "$id": "3113", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3114", + "kind": "nullable", + "type": { + "$id": "3115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" + }, + { + "$id": "3116", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3117", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" + } + ] + }, + { + "$ref": "3078" + }, + { + "$ref": "3089" + }, + { + "$id": "3118", + "kind": "model", + "name": "ListFineTuningJobEventsResponse", + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3119", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3120", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" + }, + { + "$id": "3121", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3122", + "kind": "array", + "name": "ArrayFineTuningJobEvent", + "valueType": { + "$id": "3123", + "kind": "model", + "name": "FineTuningJobEvent", + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", + "usage": "Output,Json", + "description": "Fine-tuning job event object", + "decorators": [], + "properties": [ + { + "$id": "3124", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" + }, + { + "$id": "3126", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "type": { + "$id": "3127", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3128", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" + }, + { + "$id": "3129", + "kind": "property", + "name": "level", + "serializedName": "level", + "type": { + "$ref": "753" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" + }, + { + "$id": "3130", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "3131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" + }, + { + "$id": "3132", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3133", + "kind": "constant", + "valueType": { + "$ref": "761" + }, + "value": "fine_tuning.job.event", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" + }, + { + "$id": "3134", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3135", + "kind": "constant", + "valueType": { + "$ref": "764" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" + } + ] + }, + { + "$ref": "3123" + }, + { + "$id": "3136", + "kind": "model", + "name": "CreateFileRequest", + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3137", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The File object (not file name) to be uploaded.", + "type": { + "$id": "3138", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" + }, + { + "$id": "3139", + "kind": "property", + "name": "purpose", + "serializedName": "purpose", + "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", + "type": { + "$ref": "767" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" + } + ] + }, + { + "$id": "3140", + "kind": "model", + "name": "ListFilesResponse", + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3141", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3142", + "kind": "array", + "name": "ArrayOpenAiFile", + "valueType": { + "$ref": "1275" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" + }, + { + "$id": "3143", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3144", + "kind": "constant", + "valueType": { + "$ref": "777" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" + } + ] + }, + { + "$id": "3145", + "kind": "model", + "name": "DeleteFileResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3146", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" + }, + { + "$id": "3148", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3149", + "kind": "constant", + "valueType": { + "$ref": "780" + }, + "value": "file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" + }, + { + "$id": "3150", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "3151", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" + } + ] + }, + { + "$id": "3152", + "kind": "model", + "name": "CreateEmbeddingRequest", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3153", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "3154", + "kind": "union", + "name": "CreateEmbeddingRequestInput", + "variantTypes": [ + { + "$id": "3155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3156", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3158", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3159", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3160", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "3161", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3162", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" + }, + { + "$id": "3163", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "783" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" + }, + { + "$id": "3164", + "kind": "property", + "name": "encoding_format", + "serializedName": "encoding_format", + "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", + "type": { + "$ref": "791" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" + }, + { + "$id": "3165", + "kind": "property", + "name": "dimensions", + "serializedName": "dimensions", + "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", + "type": { + "$id": "3166", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" + }, + { + "$id": "3167", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" + } + ] + }, + { + "$id": "3169", + "kind": "model", + "name": "CreateEmbeddingResponse", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3170", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "The list of embeddings generated by the model.", + "type": { + "$id": "3171", + "kind": "array", + "name": "ArrayEmbedding", + "valueType": { + "$id": "3172", + "kind": "model", + "name": "Embedding", + "crossLanguageDefinitionId": "OpenAI.Embedding", + "usage": "Output,Json", + "description": "Represents an embedding vector returned by embedding endpoint.", + "decorators": [], + "properties": [ + { + "$id": "3173", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the embedding in the list of embeddings.", + "type": { + "$id": "3174", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.index" + }, + { + "$id": "3175", + "kind": "property", + "name": "embedding", + "serializedName": "embedding", + "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", + "type": { + "$id": "3176", + "kind": "union", + "name": "EmbeddingEmbedding", + "variantTypes": [ + { + "$id": "3177", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3178", + "kind": "float", + "name": "float", + "crossLanguageDefinitionId": "TypeSpec.float", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" + }, + { + "$id": "3180", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"embedding\".", + "type": { + "$id": "3181", + "kind": "constant", + "valueType": { + "$ref": "797" + }, + "value": "embedding", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Embedding.object" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" + }, + { + "$id": "3182", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The name of the model used to generate the embedding.", + "type": { + "$id": "3183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" + }, + { + "$id": "3184", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"list\".", + "type": { + "$id": "3185", + "kind": "constant", + "valueType": { + "$ref": "800" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" + }, + { + "$id": "3186", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "The usage information for the request.", + "type": { + "$id": "3187", + "kind": "model", + "name": "CreateEmbeddingResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3188", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "The number of tokens used by the prompt.", + "type": { + "$id": "3189", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "3190", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "The total number of tokens used by the request.", + "type": { + "$id": "3191", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" + } + ] + }, + { + "$ref": "3172" + }, + { + "$ref": "3187" + }, + { + "$id": "3192", + "kind": "model", + "name": "CreateCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3193", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "803" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" + }, + { + "$id": "3194", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", + "type": { + "$id": "3195", + "kind": "nullable", + "type": { + "$id": "3196", + "kind": "union", + "name": "CreateCompletionRequestPrompt", + "variantTypes": [ + { + "$id": "3197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3198", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3200", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3201", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + { + "$id": "3202", + "kind": "array", + "name": "ArrayArray", + "valueType": { + "$id": "3203", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3204", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" + }, + { + "$id": "3205", + "kind": "property", + "name": "best_of", + "serializedName": "best_of", + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "3206", + "kind": "nullable", + "type": { + "$id": "3207", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" + }, + { + "$id": "3208", + "kind": "property", + "name": "echo", + "serializedName": "echo", + "description": "Echo back the prompt in addition to the completion", + "type": { + "$id": "3209", + "kind": "nullable", + "type": { + "$id": "3210", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" + }, + { + "$id": "3211", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3212", + "kind": "nullable", + "type": { + "$id": "3213", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" + }, + { + "$id": "3214", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", + "type": { + "$id": "3215", + "kind": "nullable", + "type": { + "$id": "3216", + "kind": "dict", + "keyType": { + "$id": "3217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3218", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" + }, + { + "$id": "3219", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", + "type": { + "$id": "3220", + "kind": "nullable", + "type": { + "$id": "3221", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" + }, + { + "$id": "3222", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", + "type": { + "$id": "3223", + "kind": "nullable", + "type": { + "$id": "3224", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" + }, + { + "$id": "3225", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", + "type": { + "$id": "3226", + "kind": "nullable", + "type": { + "$id": "3227", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" + }, + { + "$id": "3228", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3229", + "kind": "nullable", + "type": { + "$id": "3230", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" + }, + { + "$id": "3231", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "3232", + "kind": "nullable", + "type": { + "$id": "3233", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" + }, + { + "$id": "3234", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", + "type": { + "$id": "3235", + "kind": "nullable", + "type": { + "$id": "3236", + "kind": "union", + "name": "CreateCompletionRequestStop", + "variantTypes": [ + { + "$id": "3237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3238", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" + }, + { + "$id": "3240", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "3241", + "kind": "nullable", + "type": { + "$id": "3242", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" + }, + { + "$id": "3243", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "3244", + "kind": "nullable", + "type": { + "$id": "3245", + "kind": "model", + "name": "ChatCompletionStreamOptions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", + "usage": "Input,Json", + "description": "Options for streaming response. Only set this when you set `stream: true`.", + "decorators": [], + "properties": [ + { + "$id": "3246", + "kind": "property", + "name": "include_usage", + "serializedName": "include_usage", + "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", + "type": { + "$id": "3247", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" + }, + { + "$id": "3248", + "kind": "property", + "name": "suffix", + "serializedName": "suffix", + "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", + "type": { + "$id": "3249", + "kind": "nullable", + "type": { + "$id": "3250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" + }, + { + "$id": "3251", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "3252", + "kind": "nullable", + "type": { + "$id": "3253", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" + }, + { + "$id": "3254", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "3255", + "kind": "nullable", + "type": { + "$id": "3256", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" + }, + { + "$id": "3257", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" + } + ] + }, + { + "$ref": "3245" + }, + { + "$id": "3259", + "kind": "model", + "name": "CreateCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", + "usage": "Output,Json", + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", + "decorators": [], + "properties": [ + { + "$id": "3260", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the completion.", + "type": { + "$id": "3261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" + }, + { + "$id": "3262", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "The list of completion choices the model generated for the input prompt.", + "type": { + "$id": "3263", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3264", + "kind": "model", + "name": "CreateCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3265", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", + "type": { + "$ref": "811" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3266", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "3267", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" + }, + { + "$id": "3268", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "type": { + "$id": "3269", + "kind": "nullable", + "type": { + "$id": "3270", + "kind": "model", + "name": "CreateCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3271", + "kind": "property", + "name": "text_offset", + "serializedName": "text_offset", + "type": { + "$id": "3272", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3273", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" + }, + { + "$id": "3274", + "kind": "property", + "name": "token_logprobs", + "serializedName": "token_logprobs", + "type": { + "$id": "3275", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3276", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" + }, + { + "$id": "3277", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "type": { + "$id": "3278", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" + }, + { + "$id": "3280", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "type": { + "$id": "3281", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "3282", + "kind": "dict", + "keyType": { + "$id": "3283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3284", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" + }, + { + "$id": "3285", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" + }, + { + "$id": "3287", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the completion was created.", + "type": { + "$id": "3288", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3289", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" + }, + { + "$id": "3290", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for completion.", + "type": { + "$id": "3291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" + }, + { + "$id": "3292", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" + }, + { + "$id": "3294", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always \"text_completion\"", + "type": { + "$id": "3295", + "kind": "constant", + "valueType": { + "$ref": "819" + }, + "value": "text_completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" + }, + { + "$id": "3296", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$id": "3297", + "kind": "model", + "name": "CompletionUsage", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage", + "usage": "Output,Json", + "description": "Usage statistics for the completion request.", + "decorators": [], + "properties": [ + { + "$id": "3298", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "3299", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" + }, + { + "$id": "3300", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "3301", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" + }, + { + "$id": "3302", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "3303", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" + }, + { + "$id": "3304", + "kind": "property", + "name": "completion_tokens_details", + "serializedName": "completion_tokens_details", + "description": "Breakdown of tokens used in a completion.", + "type": { + "$id": "3305", + "kind": "model", + "name": "CompletionUsageCompletionTokensDetails", + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3306", + "kind": "property", + "name": "reasoning_tokens", + "serializedName": "reasoning_tokens", + "description": "Tokens generated by the model for reasoning.", + "type": { + "$id": "3307", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" + } + ] + }, + { + "$ref": "3264" + }, + { + "$ref": "3270" + }, + { + "$ref": "3297" + }, + { + "$ref": "3305" + }, + { + "$id": "3308", + "kind": "model", + "name": "CreateChatCompletionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3309", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", + "type": { + "$id": "3310", + "kind": "array", + "name": "ArrayChatCompletionRequestMessage", + "valueType": { + "$id": "3311", + "kind": "model", + "name": "ChatCompletionRequestMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3312", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "3313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" + }, + "properties": [ + { + "$ref": "3312" + } + ], + "discriminatedSubtypes": { + "$id": "3314", + "system": { + "$id": "3315", + "kind": "model", + "name": "ChatCompletionRequestSystemMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", + "usage": "Input,Json", + "discriminatorValue": "system", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3316", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the system message.", + "type": { + "$id": "3317", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContent", + "variantTypes": [ + { + "$id": "3318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3319", + "kind": "array", + "name": "ArrayChatCompletionRequestSystemMessageContentPart", + "valueType": { + "$id": "3320", + "kind": "union", + "name": "ChatCompletionRequestSystemMessageContentPart", + "variantTypes": [ + { + "$id": "3321", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartText", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3322", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3323", + "kind": "constant", + "valueType": { + "$ref": "822" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" + }, + { + "$id": "3324", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text content.", + "type": { + "$id": "3325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" + }, + { + "$id": "3326", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `system`.", + "type": { + "$id": "3327", + "kind": "constant", + "valueType": { + "$id": "3328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "system", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" + }, + { + "$id": "3329", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" + } + ] + }, + "user": { + "$id": "3331", + "kind": "model", + "name": "ChatCompletionRequestUserMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", + "usage": "Input,Json", + "discriminatorValue": "user", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3332", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the user message.", + "type": { + "$id": "3333", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContent", + "variantTypes": [ + { + "$id": "3334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3335", + "kind": "array", + "name": "ArrayChatCompletionRequestUserMessageContentPart", + "valueType": { + "$id": "3336", + "kind": "union", + "name": "ChatCompletionRequestUserMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + }, + { + "$id": "3337", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3338", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3339", + "kind": "constant", + "valueType": { + "$ref": "825" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" + }, + { + "$id": "3340", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "3341", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartImageImageUrl", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3342", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "Either a URL of the image or the base64 encoded image data.", + "type": { + "$id": "3343", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" + }, + { + "$id": "3344", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", + "type": { + "$ref": "828" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" + }, + { + "$id": "3345", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `user`.", + "type": { + "$id": "3346", + "kind": "constant", + "valueType": { + "$id": "3347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "user", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" + }, + { + "$id": "3348", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" + } + ] + }, + "assistant": { + "$id": "3350", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", + "usage": "Input,Json", + "discriminatorValue": "assistant", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3351", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", + "type": { + "$id": "3352", + "kind": "nullable", + "type": { + "$id": "3353", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContent", + "variantTypes": [ + { + "$id": "3354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3355", + "kind": "array", + "name": "ArrayChatCompletionRequestAssistantMessageContentPart", + "valueType": { + "$id": "3356", + "kind": "union", + "name": "ChatCompletionRequestAssistantMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + }, + { + "$id": "3357", + "kind": "model", + "name": "ChatCompletionRequestMessageContentPartRefusal", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3358", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "3359", + "kind": "constant", + "valueType": { + "$ref": "836" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" + }, + { + "$id": "3360", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "3361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" + } + ] + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" + }, + { + "$id": "3362", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message by the assistant.", + "type": { + "$id": "3363", + "kind": "nullable", + "type": { + "$id": "3364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" + }, + { + "$id": "3365", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `assistant`.", + "type": { + "$id": "3366", + "kind": "constant", + "valueType": { + "$id": "3367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" + }, + { + "$id": "3368", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "type": { + "$id": "3369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" + }, + { + "$id": "3370", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3371", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$id": "3372", + "kind": "model", + "name": "ChatCompletionMessageToolCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3373", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" + }, + { + "$id": "3375", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3376", + "kind": "constant", + "valueType": { + "$ref": "839" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" + }, + { + "$id": "3377", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The function that the model called.", + "type": { + "$id": "3378", + "kind": "model", + "name": "ChatCompletionMessageToolCallFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", + "usage": "Input,Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3379", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" + }, + { + "$id": "3381", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" + } + ] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" + }, + { + "$id": "3383", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3384", + "kind": "nullable", + "type": { + "$id": "3385", + "kind": "model", + "name": "ChatCompletionRequestAssistantMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3386", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" + }, + { + "$id": "3388", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" + } + ] + }, + "tool": { + "$id": "3390", + "kind": "model", + "name": "ChatCompletionRequestToolMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", + "usage": "Input,Json", + "discriminatorValue": "tool", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3391", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `tool`.", + "type": { + "$id": "3392", + "kind": "constant", + "valueType": { + "$id": "3393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" + }, + { + "$id": "3394", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the tool message.", + "type": { + "$id": "3395", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContent", + "variantTypes": [ + { + "$id": "3396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3397", + "kind": "array", + "name": "ArrayChatCompletionRequestToolMessageContentPart", + "valueType": { + "$id": "3398", + "kind": "union", + "name": "ChatCompletionRequestToolMessageContentPart", + "variantTypes": [ + { + "$ref": "3321" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" + }, + { + "$id": "3399", + "kind": "property", + "name": "tool_call_id", + "serializedName": "tool_call_id", + "description": "Tool call that this message is responding to.", + "type": { + "$id": "3400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" + } + ] + }, + "function": { + "$id": "3401", + "kind": "model", + "name": "ChatCompletionRequestFunctionMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "3311" + }, + "properties": [ + { + "$id": "3402", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the messages author, in this case `function`.", + "type": { + "$id": "3403", + "kind": "constant", + "valueType": { + "$id": "3404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" + }, + { + "$id": "3405", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the function message.", + "type": { + "$id": "3406", + "kind": "nullable", + "type": { + "$id": "3407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" + }, + { + "$id": "3408", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" + }, + { + "$id": "3410", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", + "type": { + "$ref": "842" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" + }, + { + "$id": "3411", + "kind": "property", + "name": "frequency_penalty", + "serializedName": "frequency_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3412", + "kind": "nullable", + "type": { + "$id": "3413", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" + }, + { + "$id": "3414", + "kind": "property", + "name": "logit_bias", + "serializedName": "logit_bias", + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", + "type": { + "$id": "3415", + "kind": "nullable", + "type": { + "$id": "3416", + "kind": "dict", + "keyType": { + "$id": "3417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3418", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" + }, + { + "$id": "3419", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", + "type": { + "$id": "3420", + "kind": "nullable", + "type": { + "$id": "3421", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" + }, + { + "$id": "3422", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", + "type": { + "$id": "3423", + "kind": "nullable", + "type": { + "$id": "3424", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" + }, + { + "$id": "3425", + "kind": "property", + "name": "max_tokens", + "serializedName": "max_tokens", + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", + "type": { + "$id": "3426", + "kind": "nullable", + "type": { + "$id": "3427", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" + }, + { + "$id": "3428", + "kind": "property", + "name": "max_completion_tokens", + "serializedName": "max_completion_tokens", + "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", + "type": { + "$id": "3429", + "kind": "nullable", + "type": { + "$id": "3430", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" + }, + { + "$id": "3431", + "kind": "property", + "name": "n", + "serializedName": "n", + "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", + "type": { + "$id": "3432", + "kind": "nullable", + "type": { + "$id": "3433", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" + }, + { + "$id": "3434", + "kind": "property", + "name": "presence_penalty", + "serializedName": "presence_penalty", + "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", + "type": { + "$id": "3435", + "kind": "nullable", + "type": { + "$id": "3436", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" + }, + { + "$id": "3437", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", + "type": { + "$id": "3438", + "kind": "model", + "name": "ChatResponseFormat", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", + "usage": "Input,Json", + "decorators": [], + "discriminatorProperty": { + "$id": "3439", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" + }, + "properties": [ + { + "$ref": "3439" + } + ], + "discriminatedSubtypes": { + "$id": "3441", + "text": { + "$id": "3442", + "kind": "model", + "name": "ChatResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", + "usage": "Input,Json", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3443", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "3444", + "kind": "constant", + "valueType": { + "$id": "3445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "3446", + "kind": "model", + "name": "ChatResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", + "usage": "Input,Json", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3447", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "3448", + "kind": "constant", + "valueType": { + "$id": "3449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "3450", + "kind": "model", + "name": "ChatResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", + "access": "public", + "usage": "Input,Json", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "3438" + }, + "properties": [ + { + "$id": "3451", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "3452", + "kind": "constant", + "valueType": { + "$id": "3453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" + }, + { + "$id": "3454", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" + }, + { + "$id": "3455", + "kind": "property", + "name": "seed", + "serializedName": "seed", + "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "type": { + "$id": "3456", + "kind": "nullable", + "type": { + "$id": "3457", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" + }, + { + "$id": "3458", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", + "type": { + "$id": "3459", + "kind": "nullable", + "type": { + "$ref": "902" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" + }, + { + "$id": "3460", + "kind": "property", + "name": "stop", + "serializedName": "stop", + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "type": { + "$id": "3461", + "kind": "nullable", + "type": { + "$id": "3462", + "kind": "union", + "name": "CreateChatCompletionRequestStop", + "variantTypes": [ + { + "$id": "3463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + { + "$id": "3464", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" + }, + { + "$id": "3466", + "kind": "property", + "name": "stream", + "serializedName": "stream", + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "type": { + "$id": "3467", + "kind": "nullable", + "type": { + "$id": "3468", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" + }, + { + "$id": "3469", + "kind": "property", + "name": "stream_options", + "serializedName": "stream_options", + "type": { + "$id": "3470", + "kind": "nullable", + "type": { + "$ref": "3245" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" + }, + { + "$id": "3471", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "type": { + "$id": "3472", + "kind": "nullable", + "type": { + "$id": "3473", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" + }, + { + "$id": "3474", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "type": { + "$id": "3475", + "kind": "nullable", + "type": { + "$id": "3476", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" + }, + { + "$id": "3477", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", + "type": { + "$id": "3478", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$id": "3479", + "kind": "model", + "name": "ChatCompletionTool", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3480", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3481", + "kind": "constant", + "valueType": { + "$ref": "908" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" + }, + { + "$id": "3482", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$ref": "1563" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" + }, + { + "$id": "3483", + "kind": "property", + "name": "tool_choice", + "serializedName": "tool_choice", + "type": { + "$id": "3484", + "kind": "union", + "name": "ChatCompletionToolChoiceOption", + "variantTypes": [ + { + "$ref": "911" + }, + { + "$id": "3485", + "kind": "model", + "name": "ChatCompletionNamedToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", + "usage": "Input,Json", + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", + "decorators": [], + "properties": [ + { + "$id": "3486", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "3487", + "kind": "constant", + "valueType": { + "$ref": "919" + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" + }, + { + "$id": "3488", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "3489", + "kind": "model", + "name": "ChatCompletionNamedToolChoiceFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3490", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" + }, + { + "$id": "3492", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "3493", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" + }, + { + "$id": "3494", + "kind": "property", + "name": "user", + "serializedName": "user", + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", + "type": { + "$id": "3495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" + }, + { + "$id": "3496", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", + "type": { + "$id": "3497", + "kind": "union", + "name": "CreateChatCompletionRequestFunctionCall", + "variantTypes": [ + { + "$id": "3498", + "kind": "constant", + "valueType": { + "$id": "3499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "none", + "decorators": [] + }, + { + "$id": "3500", + "kind": "constant", + "valueType": { + "$id": "3501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$id": "3502", + "kind": "model", + "name": "ChatCompletionFunctionCallOption", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", + "usage": "Input,Json", + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", + "decorators": [], + "properties": [ + { + "$id": "3503", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" + } + ] + } + ], + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" + }, + { + "$id": "3505", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", + "type": { + "$id": "3506", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$id": "3507", + "kind": "model", + "name": "ChatCompletionFunctions", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", + "usage": "Input,Json", + "deprecation": "This field is marked as deprecated.", + "decorators": [], + "properties": [ + { + "$id": "3508", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": { + "$id": "3509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" + }, + { + "$id": "3510", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": { + "$id": "3511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" + }, + { + "$id": "3512", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "type": { + "$ref": "1569" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" + } + ] + }, + { + "$ref": "3311" + }, + { + "$ref": "3315" + }, + { + "$ref": "3321" + }, + { + "$ref": "3331" + }, + { + "$ref": "3337" + }, + { + "$ref": "3341" + }, + { + "$ref": "3350" + }, + { + "$ref": "3357" + }, + { + "$ref": "3372" + }, + { + "$ref": "3378" + }, + { + "$ref": "3385" + }, + { + "$ref": "3390" + }, + { + "$ref": "3401" + }, + { + "$ref": "3438" + }, + { + "$ref": "3442" + }, + { + "$ref": "3446" + }, + { + "$ref": "3450" + }, + { + "$ref": "3479" + }, + { + "$ref": "3485" + }, + { + "$ref": "3489" + }, + { + "$ref": "3502" + }, + { + "$ref": "3507" + }, + { + "$id": "3513", + "kind": "model", + "name": "CreateChatCompletionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", + "usage": "Output,Json", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3514", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "3515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" + }, + { + "$id": "3516", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "3517", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3518", + "kind": "model", + "name": "CreateChatCompletionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3519", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$ref": "922" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3520", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3521", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" + }, + { + "$id": "3522", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$id": "3523", + "kind": "model", + "name": "ChatCompletionResponseMessage", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", + "usage": "Output,Json", + "description": "A chat completion message generated by the model.", + "decorators": [], + "properties": [ + { + "$id": "3524", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the message.", + "type": { + "$id": "3525", + "kind": "nullable", + "type": { + "$id": "3526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" + }, + { + "$id": "3527", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "3528", + "kind": "nullable", + "type": { + "$id": "3529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" + }, + { + "$id": "3530", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3531", + "kind": "array", + "name": "ChatCompletionMessageToolCalls", + "valueType": { + "$ref": "3372" + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" + }, + { + "$id": "3532", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$id": "3533", + "kind": "constant", + "valueType": { + "$ref": "934" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" + }, + { + "$id": "3534", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3535", + "kind": "model", + "name": "ChatCompletionResponseMessageFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3536", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" + }, + { + "$id": "3538", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" + }, + { + "$id": "3540", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "3541", + "kind": "nullable", + "type": { + "$id": "3542", + "kind": "model", + "name": "CreateChatCompletionResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3543", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "3544", + "kind": "nullable", + "type": { + "$id": "3545", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$id": "3546", + "kind": "model", + "name": "ChatCompletionTokenLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3547", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "3548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" + }, + { + "$id": "3549", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "3550", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" + }, + { + "$id": "3551", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "3552", + "kind": "nullable", + "type": { + "$id": "3553", + "kind": "array", + "name": "ChatCompletionTokenLogprobBytes", + "valueType": { + "$id": "3554", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" + }, + { + "$id": "3555", + "kind": "property", + "name": "top_logprobs", + "serializedName": "top_logprobs", + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", + "type": { + "$id": "3556", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3557", + "kind": "model", + "name": "ChatCompletionTokenLogprobTopLogprob", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3558", + "kind": "property", + "name": "token", + "serializedName": "token", + "description": "The token.", + "type": { + "$id": "3559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" + }, + { + "$id": "3560", + "kind": "property", + "name": "logprob", + "serializedName": "logprob", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "type": { + "$id": "3561", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" + }, + { + "$id": "3562", + "kind": "property", + "name": "bytes", + "serializedName": "bytes", + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": { + "$id": "3563", + "kind": "nullable", + "type": { + "$id": "3564", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3565", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "3566", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "3567", + "kind": "nullable", + "type": { + "$id": "3568", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" + }, + { + "$id": "3569", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "3570", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" + }, + { + "$id": "3572", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "3573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" + }, + { + "$id": "3574", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "3575", + "kind": "nullable", + "type": { + "$ref": "937" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" + }, + { + "$id": "3576", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" + }, + { + "$id": "3578", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "3579", + "kind": "constant", + "valueType": { + "$ref": "943" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" + }, + { + "$id": "3580", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "3297" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" + } + ] + }, + { + "$ref": "3518" + }, + { + "$ref": "3523" + }, + { + "$ref": "3535" + }, + { + "$ref": "3542" + }, + { + "$ref": "3546" + }, + { + "$ref": "3557" + }, + { + "$id": "3581", + "kind": "model", + "name": "CreateBatchRequest", + "crossLanguageDefinitionId": "createBatch.Request.anonymous", + "usage": "Spread,Json", + "decorators": [], + "properties": [ + { + "$id": "3582", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", + "type": { + "$id": "3583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" + }, + { + "$id": "3584", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", + "type": { + "$ref": "946" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" + }, + { + "$id": "3585", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", + "type": { + "$id": "3586", + "kind": "constant", + "valueType": { + "$ref": "952" + }, + "value": "24h", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" + }, + { + "$id": "3587", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Optional custom metadata for the batch.", + "type": { + "$id": "3588", + "kind": "nullable", + "type": { + "$id": "3589", + "kind": "dict", + "keyType": { + "$id": "3590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" + } + ] + }, + { + "$id": "3592", + "kind": "model", + "name": "Batch", + "crossLanguageDefinitionId": "OpenAI.Batch", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3593", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.id" + }, + { + "$id": "3595", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `batch`.", + "type": { + "$id": "3596", + "kind": "constant", + "valueType": { + "$ref": "955" + }, + "value": "batch", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.object" + }, + { + "$id": "3597", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "description": "The OpenAI API endpoint used by the batch.", + "type": { + "$id": "3598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" + }, + { + "$id": "3599", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "type": { + "$id": "3600", + "kind": "model", + "name": "BatchErrors", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3601", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `list`.", + "type": { + "$id": "3602", + "kind": "constant", + "valueType": { + "$ref": "958" + }, + "value": "list", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" + }, + { + "$id": "3603", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3604", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3605", + "kind": "model", + "name": "BatchErrorsDatum", + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3606", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "An error code identifying the error type.", + "type": { + "$id": "3607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" + }, + { + "$id": "3608", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable message providing more details about the error.", + "type": { + "$id": "3609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" + }, + { + "$id": "3610", + "kind": "property", + "name": "param", + "serializedName": "param", + "description": "The name of the parameter that caused the error, if applicable.", + "type": { + "$id": "3611", + "kind": "nullable", + "type": { + "$id": "3612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" + }, + { + "$id": "3613", + "kind": "property", + "name": "line", + "serializedName": "line", + "description": "The line number of the input file where the error occurred, if applicable.", + "type": { + "$id": "3614", + "kind": "nullable", + "type": { + "$id": "3615", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.errors" + }, + { + "$id": "3616", + "kind": "property", + "name": "input_file_id", + "serializedName": "input_file_id", + "description": "The ID of the input file for the batch.", + "type": { + "$id": "3617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" + }, + { + "$id": "3618", + "kind": "property", + "name": "completion_window", + "serializedName": "completion_window", + "description": "The time frame within which the batch should be processed.", + "type": { + "$id": "3619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" + }, + { + "$id": "3620", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The current status of the batch.", + "type": { + "$ref": "961" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.status" + }, + { + "$id": "3621", + "kind": "property", + "name": "output_file_id", + "serializedName": "output_file_id", + "description": "The ID of the file containing the outputs of successfully executed requests.", + "type": { + "$id": "3622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" + }, + { + "$id": "3623", + "kind": "property", + "name": "error_file_id", + "serializedName": "error_file_id", + "description": "The ID of the file containing the outputs of requests with errors.", + "type": { + "$id": "3624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" + }, + { + "$id": "3625", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the batch was created.", + "type": { + "$id": "3626", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3627", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.created_at" + }, + { + "$id": "3628", + "kind": "property", + "name": "in_progress_at", + "serializedName": "in_progress_at", + "description": "The Unix timestamp (in seconds) for when the batch started processing.", + "type": { + "$id": "3629", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3630", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" + }, + { + "$id": "3631", + "kind": "property", + "name": "expires_at", + "serializedName": "expires_at", + "description": "The Unix timestamp (in seconds) for when the batch will expire.", + "type": { + "$id": "3632", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3633", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" + }, + { + "$id": "3634", + "kind": "property", + "name": "finalizing_at", + "serializedName": "finalizing_at", + "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", + "type": { + "$id": "3635", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3636", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" + }, + { + "$id": "3637", + "kind": "property", + "name": "completed_at", + "serializedName": "completed_at", + "description": "The Unix timestamp (in seconds) for when the batch was completed.", + "type": { + "$id": "3638", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3639", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" + }, + { + "$id": "3640", + "kind": "property", + "name": "failed_at", + "serializedName": "failed_at", + "description": "The Unix timestamp (in seconds) for when the batch failed.", + "type": { + "$id": "3641", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3642", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" + }, + { + "$id": "3643", + "kind": "property", + "name": "expired_at", + "serializedName": "expired_at", + "description": "The Unix timestamp (in seconds) for when the batch expired.", + "type": { + "$id": "3644", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3645", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" + }, + { + "$id": "3646", + "kind": "property", + "name": "cancelling_at", + "serializedName": "cancelling_at", + "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", + "type": { + "$id": "3647", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3648", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" + }, + { + "$id": "3649", + "kind": "property", + "name": "cancelled_at", + "serializedName": "cancelled_at", + "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", + "type": { + "$id": "3650", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3651", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" + }, + { + "$id": "3652", + "kind": "property", + "name": "request_counts", + "serializedName": "request_counts", + "description": "The request counts for different statuses within the batch.", + "type": { + "$id": "3653", + "kind": "model", + "name": "BatchRequestCounts", + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3654", + "kind": "property", + "name": "total", + "serializedName": "total", + "description": "Total number of requests in the batch.", + "type": { + "$id": "3655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" + }, + { + "$id": "3656", + "kind": "property", + "name": "completed", + "serializedName": "completed", + "description": "Number of requests that have been completed successfully.", + "type": { + "$id": "3657", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" + }, + { + "$id": "3658", + "kind": "property", + "name": "failed", + "serializedName": "failed", + "description": "Number of requests that have failed.", + "type": { + "$id": "3659", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" + }, + { + "$id": "3660", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3661", + "kind": "nullable", + "type": { + "$id": "3662", + "kind": "dict", + "keyType": { + "$id": "3663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.Batch.metadata" + } + ] + }, + { + "$ref": "3600" + }, + { + "$ref": "3605" + }, + { + "$ref": "3653" + }, + { + "$id": "3665", + "kind": "model", + "name": "ListBatchesResponse", + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3666", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3667", + "kind": "array", + "name": "ArrayBatch", + "valueType": { + "$ref": "3592" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" + }, + { + "$id": "3668", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" + }, + { + "$id": "3670", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" + }, + { + "$id": "3672", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3673", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" + }, + { + "$id": "3674", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3675", + "kind": "constant", + "valueType": { + "$ref": "979" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" + } + ] + }, + { + "$id": "3676", + "kind": "model", + "name": "CreateAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3677", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$ref": "982" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" + }, + { + "$id": "3678", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3679", + "kind": "nullable", + "type": { + "$id": "3680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" + }, + { + "$id": "3681", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3682", + "kind": "nullable", + "type": { + "$id": "3683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" + }, + { + "$id": "3684", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3685", + "kind": "nullable", + "type": { + "$id": "3686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" + }, + { + "$id": "3687", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3688", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" + }, + { + "$id": "3689", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3690", + "kind": "nullable", + "type": { + "$id": "3691", + "kind": "model", + "name": "CreateAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3692", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3693", + "kind": "model", + "name": "CreateAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3694", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3695", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3697", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1594" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" + }, + { + "$id": "3698", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3699", + "kind": "nullable", + "type": { + "$id": "3700", + "kind": "dict", + "keyType": { + "$id": "3701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" + }, + { + "$id": "3703", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3704", + "kind": "nullable", + "type": { + "$id": "3705", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" + }, + { + "$id": "3706", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3707", + "kind": "nullable", + "type": { + "$id": "3708", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" + }, + { + "$id": "3709", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3710", + "kind": "nullable", + "type": { + "$id": "3711", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3712", + "kind": "constant", + "valueType": { + "$id": "3713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" + } + ] + }, + { + "$ref": "3691" + }, + { + "$ref": "3693" + }, + { + "$id": "3714", + "kind": "model", + "name": "AssistantObject", + "crossLanguageDefinitionId": "OpenAI.AssistantObject", + "usage": "Output,Json", + "description": "Represents an `assistant` that can call the model and use tools.", + "decorators": [], + "properties": [ + { + "$id": "3715", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier, which can be referenced in API endpoints.", + "type": { + "$id": "3716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" + }, + { + "$id": "3717", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `assistant`.", + "type": { + "$id": "3718", + "kind": "constant", + "valueType": { + "$ref": "1030" + }, + "value": "assistant", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" + }, + { + "$id": "3719", + "kind": "property", + "name": "created_at", + "serializedName": "created_at", + "description": "The Unix timestamp (in seconds) for when the assistant was created.", + "type": { + "$id": "3720", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3721", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" + }, + { + "$id": "3722", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3723", + "kind": "nullable", + "type": { + "$id": "3724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" + }, + { + "$id": "3725", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3726", + "kind": "nullable", + "type": { + "$id": "3727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" + }, + { + "$id": "3728", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "3729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" + }, + { + "$id": "3730", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3731", + "kind": "nullable", + "type": { + "$id": "3732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" + }, + { + "$id": "3733", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3734", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" + }, + { + "$id": "3735", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3736", + "kind": "nullable", + "type": { + "$id": "3737", + "kind": "model", + "name": "AssistantObjectToolResources", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3738", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3739", + "kind": "model", + "name": "AssistantObjectToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3740", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3741", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3743", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" + }, + { + "$id": "3744", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3745", + "kind": "nullable", + "type": { + "$id": "3746", + "kind": "dict", + "keyType": { + "$id": "3747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" + }, + { + "$id": "3749", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3750", + "kind": "nullable", + "type": { + "$id": "3751", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" + }, + { + "$id": "3752", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3753", + "kind": "nullable", + "type": { + "$id": "3754", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" + }, + { + "$id": "3755", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3756", + "kind": "nullable", + "type": { + "$id": "3757", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3758", + "kind": "constant", + "valueType": { + "$id": "3759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" + } + ] + }, + { + "$ref": "3737" + }, + { + "$ref": "3739" + }, + { + "$id": "3760", + "kind": "model", + "name": "ListAssistantsResponse", + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3761", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3762", + "kind": "constant", + "valueType": { + "$ref": "1039" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" + }, + { + "$id": "3763", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "3764", + "kind": "array", + "name": "ArrayAssistantObject", + "valueType": { + "$ref": "3714" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" + }, + { + "$id": "3765", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "3766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" + }, + { + "$id": "3767", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "3768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" + }, + { + "$id": "3769", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "3770", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" + } + ] + }, + { + "$id": "3771", + "kind": "model", + "name": "ModifyAssistantRequest", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3772", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", + "type": { + "$id": "3773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" + }, + { + "$id": "3774", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the assistant. The maximum length is 256 characters.", + "type": { + "$id": "3775", + "kind": "nullable", + "type": { + "$id": "3776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" + }, + { + "$id": "3777", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description of the assistant. The maximum length is 512 characters.", + "type": { + "$id": "3778", + "kind": "nullable", + "type": { + "$id": "3779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" + }, + { + "$id": "3780", + "kind": "property", + "name": "instructions", + "serializedName": "instructions", + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", + "type": { + "$id": "3781", + "kind": "nullable", + "type": { + "$id": "3782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" + }, + { + "$id": "3783", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "3784", + "kind": "array", + "name": "ArrayAssistantToolDefinition", + "valueType": { + "$ref": "1541" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" + }, + { + "$id": "3785", + "kind": "property", + "name": "tool_resources", + "serializedName": "tool_resources", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", + "type": { + "$id": "3786", + "kind": "nullable", + "type": { + "$id": "3787", + "kind": "model", + "name": "ModifyAssistantRequestToolResources", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3788", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "type": { + "$id": "3789", + "kind": "model", + "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3790", + "kind": "property", + "name": "file_ids", + "serializedName": "file_ids", + "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", + "type": { + "$id": "3791", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" + }, + { + "$id": "3793", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "type": { + "$ref": "1632" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" + }, + { + "$id": "3794", + "kind": "property", + "name": "metadata", + "serializedName": "metadata", + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", + "type": { + "$id": "3795", + "kind": "nullable", + "type": { + "$id": "3796", + "kind": "dict", + "keyType": { + "$id": "3797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" + }, + { + "$id": "3799", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + "type": { + "$id": "3800", + "kind": "nullable", + "type": { + "$id": "3801", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" + }, + { + "$id": "3802", + "kind": "property", + "name": "top_p", + "serializedName": "top_p", + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", + "type": { + "$id": "3803", + "kind": "nullable", + "type": { + "$id": "3804", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" + }, + { + "$id": "3805", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "type": { + "$id": "3806", + "kind": "nullable", + "type": { + "$id": "3807", + "kind": "union", + "name": "AssistantsApiResponseFormatOption", + "variantTypes": [ + { + "$id": "3808", + "kind": "constant", + "valueType": { + "$id": "3809", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "auto", + "decorators": [] + }, + { + "$ref": "1679" + }, + { + "$ref": "1684" + }, + { + "$ref": "1688" + } + ], + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" + } + ] + }, + { + "$ref": "3787" + }, + { + "$ref": "3789" + }, + { + "$id": "3810", + "kind": "model", + "name": "DeleteAssistantResponse", + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3811", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" + }, + { + "$id": "3813", + "kind": "property", + "name": "deleted", + "serializedName": "deleted", + "type": { + "$id": "3814", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" + }, + { + "$id": "3815", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "3816", + "kind": "constant", + "valueType": { + "$ref": "1042" + }, + "value": "assistant.deleted", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" + } + ] + }, + { + "$id": "3817", + "kind": "model", + "name": "CreateSpeechRequest", + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", + "usage": "Input,Json", + "decorators": [], + "properties": [ + { + "$id": "3818", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", + "type": { + "$ref": "1045" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" + }, + { + "$id": "3819", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The text to generate audio for. The maximum length is 4096 characters.", + "type": { + "$id": "3820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" + }, + { + "$id": "3821", + "kind": "property", + "name": "voice", + "serializedName": "voice", + "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", + "type": { + "$ref": "1051" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" + }, + { + "$id": "3822", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", + "type": { + "$ref": "1065" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" + }, + { + "$id": "3823", + "kind": "property", + "name": "speed", + "serializedName": "speed", + "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", + "type": { + "$id": "3824", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" + } + ] + }, + { + "$id": "3825", + "kind": "model", + "name": "CreateTranscriptionRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3826", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3827", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" + }, + { + "$id": "3828", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "1079" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" + }, + { + "$id": "3829", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", + "type": { + "$id": "3830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" + }, + { + "$id": "3831", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", + "type": { + "$id": "3832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" + }, + { + "$id": "3833", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "1083" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" + }, + { + "$id": "3834", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3835", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" + }, + { + "$id": "3836", + "kind": "property", + "name": "timestamp_granularities", + "serializedName": "timestamp_granularities", + "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", + "type": { + "$id": "3837", + "kind": "array", + "name": "Array", + "valueType": { + "$ref": "1095" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" + } + ] + }, + { + "$id": "3838", + "kind": "model", + "name": "CreateTranscriptionResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", + "usage": "Output,Json", + "description": "Represents a verbose json transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3839", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3840", + "kind": "constant", + "valueType": { + "$ref": "1101" + }, + "value": "transcribe", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" + }, + { + "$id": "3841", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the input audio.", + "type": { + "$id": "3842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" + }, + { + "$id": "3843", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3844", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3845", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" + }, + { + "$id": "3846", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" + }, + { + "$id": "3848", + "kind": "property", + "name": "words", + "serializedName": "words", + "description": "Extracted words and their corresponding timestamps.", + "type": { + "$id": "3849", + "kind": "array", + "name": "ArrayTranscriptionWord", + "valueType": { + "$id": "3850", + "kind": "model", + "name": "TranscriptionWord", + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3851", + "kind": "property", + "name": "word", + "serializedName": "word", + "description": "The text content of the word.", + "type": { + "$id": "3852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" + }, + { + "$id": "3853", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the word in seconds.", + "type": { + "$id": "3854", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3855", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" + }, + { + "$id": "3856", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the word in seconds.", + "type": { + "$id": "3857", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3858", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" + }, + { + "$id": "3859", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the transcribed text and their corresponding details.", + "type": { + "$id": "3860", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$id": "3861", + "kind": "model", + "name": "TranscriptionSegment", + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3862", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Unique identifier of the segment.", + "type": { + "$id": "3863", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" + }, + { + "$id": "3864", + "kind": "property", + "name": "seek", + "serializedName": "seek", + "description": "Seek offset of the segment.", + "type": { + "$id": "3865", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" + }, + { + "$id": "3866", + "kind": "property", + "name": "start", + "serializedName": "start", + "description": "Start time of the segment in seconds.", + "type": { + "$id": "3867", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3868", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" + }, + { + "$id": "3869", + "kind": "property", + "name": "end", + "serializedName": "end", + "description": "End time of the segment in seconds.", + "type": { + "$id": "3870", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3871", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" + }, + { + "$id": "3872", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content of the segment.", + "type": { + "$id": "3873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" + }, + { + "$id": "3874", + "kind": "property", + "name": "tokens", + "serializedName": "tokens", + "description": "Array of token IDs for the text content.", + "type": { + "$id": "3875", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3876", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" + }, + { + "$id": "3877", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "Temperature parameter used for generating the segment.", + "type": { + "$id": "3878", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" + }, + { + "$id": "3879", + "kind": "property", + "name": "avg_logprob", + "serializedName": "avg_logprob", + "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", + "type": { + "$id": "3880", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" + }, + { + "$id": "3881", + "kind": "property", + "name": "compression_ratio", + "serializedName": "compression_ratio", + "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", + "type": { + "$id": "3882", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" + }, + { + "$id": "3883", + "kind": "property", + "name": "no_speech_prob", + "serializedName": "no_speech_prob", + "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", + "type": { + "$id": "3884", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" + } + ] + }, + { + "$ref": "3850" + }, + { + "$ref": "3861" + }, + { + "$id": "3885", + "kind": "model", + "name": "CreateTranscriptionResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", + "usage": "Output,Json", + "description": "Represents a transcription response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3886", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The transcribed text.", + "type": { + "$id": "3887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" + } + ] + }, + { + "$id": "3888", + "kind": "model", + "name": "CreateTranslationRequest", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "3889", + "kind": "property", + "name": "file", + "serializedName": "file", + "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", + "type": { + "$id": "3890", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" + }, + { + "$id": "3891", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", + "type": { + "$ref": "1104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" + }, + { + "$id": "3892", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", + "type": { + "$id": "3893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" + }, + { + "$id": "3894", + "kind": "property", + "name": "response_format", + "serializedName": "response_format", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", + "type": { + "$ref": "1108" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" + }, + { + "$id": "3895", + "kind": "property", + "name": "temperature", + "serializedName": "temperature", + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", + "type": { + "$id": "3896", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" + } + ] + }, + { + "$id": "3897", + "kind": "model", + "name": "CreateTranslationResponseVerboseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3898", + "kind": "property", + "name": "task", + "serializedName": "task", + "description": "The task label.", + "type": { + "$id": "3899", + "kind": "constant", + "valueType": { + "$ref": "1120" + }, + "value": "translate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" + }, + { + "$id": "3900", + "kind": "property", + "name": "language", + "serializedName": "language", + "description": "The language of the output translation (always `english`).", + "type": { + "$id": "3901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" + }, + { + "$id": "3902", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "The duration of the input audio.", + "type": { + "$id": "3903", + "kind": "duration", + "name": "duration", + "encode": "seconds", + "wireType": { + "$id": "3904", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" + }, + { + "$id": "3905", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The translated text.", + "type": { + "$id": "3906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" + }, + { + "$id": "3907", + "kind": "property", + "name": "segments", + "serializedName": "segments", + "description": "Segments of the translated text and their corresponding details.", + "type": { + "$id": "3908", + "kind": "array", + "name": "ArrayTranscriptionSegment", + "valueType": { + "$ref": "3861" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" + } + ] + }, + { + "$id": "3909", + "kind": "model", + "name": "CreateTranslationResponseJson", + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "3910", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "3911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" + } + ] + }, + { + "$id": "3912", + "kind": "model", + "name": "AssistantResponseFormat", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", + "access": "public", + "usage": "Input", + "decorators": [], + "discriminatorProperty": { + "$id": "3913", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "3914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" + }, + "properties": [ + { + "$ref": "3913" + } + ], + "discriminatedSubtypes": { + "$id": "3915", + "text": { + "$id": "3916", + "kind": "model", + "name": "AssistantResponseFormatText", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", + "usage": "Input", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3917", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `text`", + "type": { + "$id": "3918", + "kind": "constant", + "valueType": { + "$id": "3919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" + } + ] + }, + "json_object": { + "$id": "3920", + "kind": "model", + "name": "AssistantResponseFormatJsonObject", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", + "usage": "Input", + "discriminatorValue": "json_object", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3921", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_object`", + "type": { + "$id": "3922", + "kind": "constant", + "valueType": { + "$id": "3923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_object", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" + } + ] + }, + "json_schema": { + "$id": "3924", + "kind": "model", + "name": "AssistantResponseFormatJsonSchema", + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", + "usage": "Input", + "discriminatorValue": "json_schema", + "decorators": [], + "baseModel": { + "$ref": "3912" + }, + "properties": [ + { + "$id": "3925", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of response format being defined: `json_schema`", + "type": { + "$id": "3926", + "kind": "constant", + "valueType": { + "$id": "3927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "json_schema", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" + }, + { + "$id": "3928", + "kind": "property", + "name": "json_schema", + "serializedName": "json_schema", + "type": { + "$ref": "1693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" + } + ] + } + } + }, + { + "$ref": "3916" + }, + { + "$ref": "3920" + }, + { + "$ref": "3924" + }, + { + "$id": "3929", + "kind": "model", + "name": "BatchRequestInput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line object of the batch input file", + "decorators": [], + "properties": [ + { + "$id": "3930", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", + "type": { + "$id": "3931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" + }, + { + "$id": "3932", + "kind": "property", + "name": "method", + "serializedName": "method", + "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", + "type": { + "$id": "3933", + "kind": "constant", + "valueType": { + "$ref": "1123" + }, + "value": "POST", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" + }, + { + "$id": "3934", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", + "type": { + "$id": "3935", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" + } + ] + }, + { + "$id": "3936", + "kind": "model", + "name": "BatchRequestOutput", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", + "access": "public", + "usage": "Output", + "description": "The per-line object of the batch output and error files", + "decorators": [], + "properties": [ + { + "$id": "3937", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "3938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" + }, + { + "$id": "3939", + "kind": "property", + "name": "custom_id", + "serializedName": "custom_id", + "description": "A developer-provided per-request id that will be used to match outputs to inputs.", + "type": { + "$id": "3940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" + }, + { + "$id": "3941", + "kind": "property", + "name": "response", + "serializedName": "response", + "type": { + "$id": "3942", + "kind": "nullable", + "type": { + "$id": "3943", + "kind": "model", + "name": "BatchRequestOutputResponse", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3944", + "kind": "property", + "name": "status_code", + "serializedName": "status_code", + "description": "The HTTP status code of the response", + "type": { + "$id": "3945", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" + }, + { + "$id": "3946", + "kind": "property", + "name": "request_id", + "serializedName": "request_id", + "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", + "type": { + "$id": "3947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" + }, + { + "$id": "3948", + "kind": "property", + "name": "body", + "serializedName": "body", + "description": "The JSON body of the response", + "type": { + "$id": "3949", + "kind": "dict", + "keyType": { + "$id": "3950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "3951", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" + }, + { + "$id": "3952", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", + "type": { + "$id": "3953", + "kind": "nullable", + "type": { + "$id": "3954", + "kind": "model", + "name": "BatchRequestOutputError", + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3955", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "A machine-readable error code.", + "type": { + "$id": "3956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" + }, + { + "$id": "3957", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "A human-readable error message.", + "type": { + "$id": "3958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" + } + ] + }, + { + "$ref": "3943" + }, + { + "$ref": "3954" + }, + { + "$id": "3959", + "kind": "model", + "name": "ChatCompletionFunctionChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3960", + "kind": "model", + "name": "ChatCompletionToolChoice", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "3961", + "kind": "model", + "name": "ChatMessageContent", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3962", + "kind": "model", + "name": "ChatMessageContentPart", + "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "properties": [] + }, + { + "$id": "3963", + "kind": "model", + "name": "CreateChatCompletionFunctionResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", + "access": "public", + "usage": "Output", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "3964", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion.", + "type": { + "$id": "3965", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" + }, + { + "$id": "3966", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "type": { + "$id": "3967", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "3968", + "kind": "model", + "name": "CreateChatCompletionFunctionResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3969", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", + "type": { + "$ref": "1126" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" + }, + { + "$id": "3970", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "3971", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" + }, + { + "$id": "3972", + "kind": "property", + "name": "message", + "serializedName": "message", + "type": { + "$ref": "3523" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" + }, + { + "$id": "3973", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": { + "$id": "3974", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "3975", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" + }, + { + "$id": "3976", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model used for the chat completion.", + "type": { + "$id": "3977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" + }, + { + "$id": "3978", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "3979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" + }, + { + "$id": "3980", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion`.", + "type": { + "$id": "3981", + "kind": "constant", + "valueType": { + "$ref": "1136" + }, + "value": "chat.completion", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" + }, + { + "$id": "3982", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "type": { + "$ref": "3297" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" + } + ] + }, + { + "$ref": "3968" + }, + { + "$id": "3983", + "kind": "model", + "name": "ChatCompletionStreamResponseDelta", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", + "usage": "Output", + "description": "A chat completion delta generated by streamed model responses.", + "decorators": [], + "properties": [ + { + "$id": "3984", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The contents of the chunk message.", + "type": { + "$id": "3985", + "kind": "nullable", + "type": { + "$id": "3986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" + }, + { + "$id": "3987", + "kind": "property", + "name": "function_call", + "serializedName": "function_call", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "type": { + "$id": "3988", + "kind": "model", + "name": "ChatCompletionStreamResponseDeltaFunctionCall", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3989", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "3990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" + }, + { + "$id": "3991", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "3992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" + }, + { + "$id": "3993", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "type": { + "$id": "3994", + "kind": "array", + "name": "ArrayChatCompletionMessageToolCallChunk", + "valueType": { + "$id": "3995", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunk", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "3996", + "kind": "property", + "name": "index", + "serializedName": "index", + "type": { + "$id": "3997", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" + }, + { + "$id": "3998", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "3999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" + }, + { + "$id": "4000", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the tool. Currently, only `function` is supported.", + "type": { + "$id": "4001", + "kind": "constant", + "valueType": { + "$ref": "1139" + }, + "value": "function", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" + }, + { + "$id": "4002", + "kind": "property", + "name": "function", + "serializedName": "function", + "type": { + "$id": "4003", + "kind": "model", + "name": "ChatCompletionMessageToolCallChunkFunction", + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4004", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function to call.", + "type": { + "$id": "4005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" + }, + { + "$id": "4006", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": { + "$id": "4007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" + }, + { + "$id": "4008", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The role of the author of this message.", + "type": { + "$ref": "1142" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" + }, + { + "$id": "4009", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "The refusal message generated by the model.", + "type": { + "$id": "4010", + "kind": "nullable", + "type": { + "$id": "4011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" + } + ] + }, + { + "$ref": "3988" + }, + { + "$ref": "3995" + }, + { + "$ref": "4003" + }, + { + "$id": "4012", + "kind": "model", + "name": "CreateChatCompletionStreamResponse", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", + "access": "public", + "usage": "Output", + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "decorators": [], + "properties": [ + { + "$id": "4013", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "A unique identifier for the chat completion. Each chunk has the same ID.", + "type": { + "$id": "4014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" + }, + { + "$id": "4015", + "kind": "property", + "name": "choices", + "serializedName": "choices", + "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", + "type": { + "$id": "4016", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "4017", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoice", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4018", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "type": { + "$ref": "3983" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" + }, + { + "$id": "4019", + "kind": "property", + "name": "logprobs", + "serializedName": "logprobs", + "description": "Log probability information for the choice.", + "type": { + "$id": "4020", + "kind": "nullable", + "type": { + "$id": "4021", + "kind": "model", + "name": "CreateChatCompletionStreamResponseChoiceLogprobs", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4022", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "A list of message content tokens with log probability information.", + "type": { + "$id": "4023", + "kind": "nullable", + "type": { + "$id": "4024", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" + }, + { + "$id": "4025", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "description": "A list of message refusal tokens with log probability information.", + "type": { + "$id": "4026", + "kind": "nullable", + "type": { + "$id": "4027", + "kind": "array", + "name": "ArrayChatCompletionTokenLogprob", + "valueType": { + "$ref": "3546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" + } + ] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" + }, + { + "$id": "4028", + "kind": "property", + "name": "finish_reason", + "serializedName": "finish_reason", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", + "type": { + "$id": "4029", + "kind": "nullable", + "type": { + "$ref": "1152" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" + }, + { + "$id": "4030", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the choice in the list of choices.", + "type": { + "$id": "4031", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" + }, + { + "$id": "4032", + "kind": "property", + "name": "created", + "serializedName": "created", + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", + "type": { + "$id": "4033", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "unixTimestamp", + "wireType": { + "$id": "4034", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" + }, + { + "$id": "4035", + "kind": "property", + "name": "model", + "serializedName": "model", + "description": "The model to generate the completion.", + "type": { + "$id": "4036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" + }, + { + "$id": "4037", + "kind": "property", + "name": "service_tier", + "serializedName": "service_tier", + "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", + "type": { + "$id": "4038", + "kind": "nullable", + "type": { + "$ref": "1164" + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" + }, + { + "$id": "4039", + "kind": "property", + "name": "system_fingerprint", + "serializedName": "system_fingerprint", + "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "type": { + "$id": "4040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" + }, + { + "$id": "4041", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `chat.completion.chunk`.", + "type": { + "$id": "4042", + "kind": "constant", + "valueType": { + "$ref": "1170" + }, + "value": "chat.completion.chunk", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" + }, + { + "$id": "4043", + "kind": "property", + "name": "usage", + "serializedName": "usage", + "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", + "type": { + "$id": "4044", + "kind": "model", + "name": "CreateChatCompletionStreamResponseUsage", + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4045", + "kind": "property", + "name": "completion_tokens", + "serializedName": "completion_tokens", + "description": "Number of tokens in the generated completion.", + "type": { + "$id": "4046", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" + }, + { + "$id": "4047", + "kind": "property", + "name": "prompt_tokens", + "serializedName": "prompt_tokens", + "description": "Number of tokens in the prompt.", + "type": { + "$id": "4048", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" + }, + { + "$id": "4049", + "kind": "property", + "name": "total_tokens", + "serializedName": "total_tokens", + "description": "Total number of tokens used in the request (prompt + completion).", + "type": { + "$id": "4050", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" + } + ] + }, + { + "$ref": "4017" + }, + { + "$ref": "4021" + }, + { + "$ref": "4044" + }, + { + "$id": "4051", + "kind": "model", + "name": "FinetuneChatRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for chat models", + "decorators": [], + "properties": [ + { + "$id": "4052", + "kind": "property", + "name": "messages", + "serializedName": "messages", + "type": { + "$id": "4053", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "4054", + "kind": "union", + "name": "FinetuneChatRequestInputMessage", + "variantTypes": [ + { + "$ref": "3315" + }, + { + "$ref": "3331" + }, + { + "$id": "4055", + "kind": "model", + "name": "FineTuneChatCompletionRequestAssistantMessage", + "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", + "usage": "Input", + "decorators": [], + "baseModel": { + "$ref": "3350" + }, + "properties": [] + }, + { + "$ref": "3390" + }, + { + "$ref": "3401" + } + ], + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" + }, + { + "$id": "4056", + "kind": "property", + "name": "tools", + "serializedName": "tools", + "description": "A list of tools the model may generate JSON inputs for.", + "type": { + "$id": "4057", + "kind": "array", + "name": "ArrayChatCompletionTool", + "valueType": { + "$ref": "3479" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" + }, + { + "$id": "4058", + "kind": "property", + "name": "parallel_tool_calls", + "serializedName": "parallel_tool_calls", + "type": { + "$id": "4059", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" + }, + { + "$id": "4060", + "kind": "property", + "name": "functions", + "serializedName": "functions", + "description": "A list of functions the model may generate JSON inputs for.", + "type": { + "$id": "4061", + "kind": "array", + "name": "ArrayChatCompletionFunctions", + "valueType": { + "$ref": "3507" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" + } + ] + }, + { + "$ref": "4055" + }, + { + "$id": "4062", + "kind": "model", + "name": "FinetuneCompletionRequestInput", + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", + "access": "public", + "usage": "Input", + "description": "The per-line training example of a fine-tuning input file for completions models", + "decorators": [], + "properties": [ + { + "$id": "4063", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "description": "The input prompt for this training example.", + "type": { + "$id": "4064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" + }, + { + "$id": "4065", + "kind": "property", + "name": "completion", + "serializedName": "completion", + "description": "The desired completion for this training example.", + "type": { + "$id": "4066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" + } + ] + }, + { + "$id": "4067", + "kind": "model", + "name": "MessageContentTextObjectAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", + "access": "public", + "usage": "Input,Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4068", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" + }, + "properties": [ + { + "$ref": "4068" + } + ], + "discriminatedSubtypes": { + "$id": "4070", + "file_citation": { + "$id": "4071", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Input,Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "4067" + }, + "properties": [ + { + "$id": "4072", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "4073", + "kind": "constant", + "valueType": { + "$id": "4074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "4075", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "4077", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "4078", + "kind": "model", + "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4079", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "4080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "4081", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4082", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "4083", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4084", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "4085", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Input,Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "4067" + }, + "properties": [ + { + "$id": "4086", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "4087", + "kind": "constant", + "valueType": { + "$id": "4088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "4089", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "4091", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "4092", + "kind": "model", + "name": "MessageContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4093", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "4094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "4095", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4096", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "4097", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4098", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + { + "$ref": "4071" + }, + { + "$ref": "4078" + }, + { + "$ref": "4085" + }, + { + "$ref": "4092" + }, + { + "$id": "4099", + "kind": "model", + "name": "MessageDeltaContent", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", + "access": "public", + "usage": "Output", + "description": "Represents a single piece of incremental content in an Assistants API streaming response.", + "decorators": [], + "discriminatorProperty": { + "$id": "4100", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" + }, + "properties": [ + { + "$ref": "4100" + } + ], + "discriminatedSubtypes": { + "$id": "4102", + "image_file": { + "$id": "4103", + "kind": "model", + "name": "MessageDeltaContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", + "access": "public", + "usage": "Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "discriminatorValue": "image_file", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4104", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4105", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" + }, + { + "$id": "4106", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "4107", + "kind": "constant", + "valueType": { + "$id": "4108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" + }, + { + "$id": "4109", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "4110", + "kind": "model", + "name": "MessageDeltaContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4111", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "4112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "4113", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1173" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" + } + ] + }, + "image_url": { + "$id": "4114", + "kind": "model", + "name": "MessageDeltaContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", + "access": "public", + "usage": "Output", + "description": "References an image URL in the content of a message.", + "discriminatorValue": "image_url", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4115", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4116", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" + }, + { + "$id": "4117", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_url`.", + "type": { + "$id": "4118", + "kind": "constant", + "valueType": { + "$id": "4119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" + }, + { + "$id": "4120", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "4121", + "kind": "model", + "name": "MessageDeltaContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4122", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "4123", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "4124", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1181" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" + } + ] + }, + "text": { + "$id": "4125", + "kind": "model", + "name": "MessageDeltaContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", + "access": "public", + "usage": "Output", + "description": "The text content that is part of a message.", + "discriminatorValue": "text", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4126", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the content part in the message.", + "type": { + "$id": "4127", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" + }, + { + "$id": "4128", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4129", + "kind": "constant", + "valueType": { + "$id": "4130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" + }, + { + "$id": "4131", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "4132", + "kind": "model", + "name": "MessageDeltaContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4133", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "4134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" + }, + { + "$id": "4135", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "4136", + "kind": "array", + "name": "ArrayMessageDeltaTextContentAnnotation", + "valueType": { + "$id": "4137", + "kind": "model", + "name": "MessageDeltaTextContentAnnotation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", + "access": "public", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4138", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the content item.", + "type": { + "$id": "4139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" + }, + "properties": [ + { + "$ref": "4138" + } + ], + "discriminatedSubtypes": { + "$id": "4140", + "file_citation": { + "$id": "4141", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", + "access": "public", + "usage": "Output", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "discriminatorValue": "file_citation", + "decorators": [], + "baseModel": { + "$ref": "4137" + }, + "properties": [ + { + "$id": "4142", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "4143", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" + }, + { + "$id": "4144", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_citation`.", + "type": { + "$id": "4145", + "kind": "constant", + "valueType": { + "$id": "4146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_citation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" + }, + { + "$id": "4147", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" + }, + { + "$id": "4149", + "kind": "property", + "name": "file_citation", + "serializedName": "file_citation", + "type": { + "$id": "4150", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4151", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the specific File the citation is from.", + "type": { + "$id": "4152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" + }, + { + "$id": "4153", + "kind": "property", + "name": "quote", + "serializedName": "quote", + "description": "The specific quote in the file.", + "type": { + "$id": "4154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" + }, + { + "$id": "4155", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4156", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" + }, + { + "$id": "4157", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4158", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" + } + ] + }, + "file_path": { + "$id": "4159", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", + "access": "public", + "usage": "Output", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "discriminatorValue": "file_path", + "decorators": [], + "baseModel": { + "$ref": "4137" + }, + "properties": [ + { + "$id": "4160", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the annotation in the text content part.", + "type": { + "$id": "4161", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" + }, + { + "$id": "4162", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `file_path`.", + "type": { + "$id": "4163", + "kind": "constant", + "valueType": { + "$id": "4164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_path", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" + }, + { + "$id": "4165", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "The text in the message content that needs to be replaced.", + "type": { + "$id": "4166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" + }, + { + "$id": "4167", + "kind": "property", + "name": "file_path", + "serializedName": "file_path", + "type": { + "$id": "4168", + "kind": "model", + "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4169", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The ID of the file that was generated.", + "type": { + "$id": "4170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" + }, + { + "$id": "4171", + "kind": "property", + "name": "start_index", + "serializedName": "start_index", + "type": { + "$id": "4172", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" + }, + { + "$id": "4173", + "kind": "property", + "name": "end_index", + "serializedName": "end_index", + "type": { + "$id": "4174", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" + } + ] + }, + "refusal": { + "$id": "4175", + "kind": "model", + "name": "MessageDeltaContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", + "usage": "Output", + "description": "The refusal content that is part of a message.", + "discriminatorValue": "refusal", + "decorators": [], + "baseModel": { + "$ref": "4099" + }, + "properties": [ + { + "$id": "4176", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the refusal part in the message.", + "type": { + "$id": "4177", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" + }, + { + "$id": "4178", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "4179", + "kind": "constant", + "valueType": { + "$id": "4180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" + }, + { + "$id": "4181", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "4182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" + } + ] + } + } + }, + { + "$ref": "4103" + }, + { + "$ref": "4110" + }, + { + "$ref": "4114" + }, + { + "$ref": "4121" + }, + { + "$ref": "4125" + }, + { + "$ref": "4132" + }, + { + "$ref": "4137" + }, + { + "$ref": "4141" + }, + { + "$ref": "4150" + }, + { + "$ref": "4159" + }, + { + "$ref": "4168" + }, + { + "$ref": "4175" + }, + { + "$id": "4183", + "kind": "model", + "name": "MessageContentImageFileObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4184", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image_file`.", + "type": { + "$id": "4185", + "kind": "constant", + "valueType": { + "$ref": "1189" + }, + "value": "image_file", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" + }, + { + "$id": "4186", + "kind": "property", + "name": "image_file", + "serializedName": "image_file", + "type": { + "$id": "4187", + "kind": "model", + "name": "MessageContentImageFileObjectImageFile", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4188", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", + "type": { + "$id": "4189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" + }, + { + "$id": "4190", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", + "type": { + "$ref": "1192" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" + } + ] + }, + { + "$ref": "4187" + }, + { + "$id": "4191", + "kind": "model", + "name": "MessageContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4192", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4193", + "kind": "constant", + "valueType": { + "$ref": "1200" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" + }, + { + "$id": "4194", + "kind": "property", + "name": "text", + "serializedName": "text", + "type": { + "$id": "4195", + "kind": "model", + "name": "MessageContentTextObjectText", + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4196", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The data that makes up the text.", + "type": { + "$id": "4197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" + }, + { + "$id": "4198", + "kind": "property", + "name": "annotations", + "serializedName": "annotations", + "type": { + "$id": "4199", + "kind": "array", + "name": "ArrayMessageContentTextObjectAnnotation", + "valueType": { + "$ref": "4067" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" + } + ] + }, + { + "$ref": "4195" + }, + { + "$id": "4200", + "kind": "model", + "name": "MessageContentRefusalObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", + "access": "public", + "usage": "Input,Output", + "description": "The refusal content generated by the assistant.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4201", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `refusal`.", + "type": { + "$id": "4202", + "kind": "constant", + "valueType": { + "$ref": "1203" + }, + "value": "refusal", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" + }, + { + "$id": "4203", + "kind": "property", + "name": "refusal", + "serializedName": "refusal", + "type": { + "$id": "4204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" + } + ] + }, + { + "$id": "4205", + "kind": "model", + "name": "MessageContentImageUrlObject", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", + "access": "public", + "usage": "Input,Output", + "description": "References an image URL in the content of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4206", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the content part.", + "type": { + "$id": "4207", + "kind": "constant", + "valueType": { + "$ref": "1206" + }, + "value": "image_url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" + }, + { + "$id": "4208", + "kind": "property", + "name": "image_url", + "serializedName": "image_url", + "type": { + "$id": "4209", + "kind": "model", + "name": "MessageContentImageUrlObjectImageUrl", + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", + "usage": "Input,Output", + "decorators": [], + "properties": [ + { + "$id": "4210", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", + "type": { + "$id": "4211", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" + }, + { + "$id": "4212", + "kind": "property", + "name": "detail", + "serializedName": "detail", + "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", + "type": { + "$ref": "1209" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" + } + ] + }, + { + "$ref": "4209" + }, + { + "$id": "4213", + "kind": "model", + "name": "MessageDeltaObject", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a message delta i.e. any changed fields on a message during streaming.", + "decorators": [], + "properties": [ + { + "$id": "4214", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the message, which can be referenced in API endpoints.", + "type": { + "$id": "4215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" + }, + { + "$id": "4216", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.message.delta`.", + "type": { + "$id": "4217", + "kind": "constant", + "valueType": { + "$ref": "1217" + }, + "value": "thread.message.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" + }, + { + "$id": "4218", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the Message.", + "type": { + "$id": "4219", + "kind": "model", + "name": "MessageDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4220", + "kind": "property", + "name": "role", + "serializedName": "role", + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": { + "$ref": "1220" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" + }, + { + "$id": "4221", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "The content of the message in array of text and/or images.", + "type": { + "$id": "4222", + "kind": "array", + "name": "ArrayMessageDeltaContent", + "valueType": { + "$ref": "4099" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" + } + ] + }, + { + "$ref": "4219" + }, + { + "$id": "4223", + "kind": "model", + "name": "MessageRequestContentTextObject", + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", + "access": "public", + "usage": "Input,Output", + "description": "The text content that is part of a message.", + "decorators": [], + "baseModel": { + "$ref": "1530" + }, + "properties": [ + { + "$id": "4224", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `text`.", + "type": { + "$id": "4225", + "kind": "constant", + "valueType": { + "$ref": "1226" + }, + "value": "text", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" + }, + { + "$id": "4226", + "kind": "property", + "name": "text", + "serializedName": "text", + "description": "Text content to be sent to the model", + "type": { + "$id": "4227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" + } + ] + }, + { + "$id": "4228", + "kind": "model", + "name": "RunStepDeltaStepDetails", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", + "usage": "Output", + "decorators": [], + "discriminatorProperty": { + "$id": "4229", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" + }, + "properties": [ + { + "$ref": "4229" + } + ], + "discriminatedSubtypes": { + "$id": "4231", + "message_creation": { + "$id": "4232", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", + "access": "public", + "usage": "Output", + "description": "Details of the message creation by the run step.", + "discriminatorValue": "message_creation", + "decorators": [], + "baseModel": { + "$ref": "4228" + }, + "properties": [ + { + "$id": "4233", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `message_creation`.", + "type": { + "$id": "4234", + "kind": "constant", + "valueType": { + "$id": "4235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "message_creation", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" + }, + { + "$id": "4236", + "kind": "property", + "name": "message_creation", + "serializedName": "message_creation", + "type": { + "$id": "4237", + "kind": "model", + "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4238", + "kind": "property", + "name": "message_id", + "serializedName": "message_id", + "description": "The ID of the message that was created by this run step.", + "type": { + "$id": "4239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" + } + ] + }, + "tool_calls": { + "$id": "4240", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", + "access": "public", + "usage": "Output", + "description": "Details of the tool call.", + "discriminatorValue": "tool_calls", + "decorators": [], + "baseModel": { + "$ref": "4228" + }, + "properties": [ + { + "$id": "4241", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `tool_calls`.", + "type": { + "$id": "4242", + "kind": "constant", + "valueType": { + "$id": "4243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "tool_calls", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" + }, + { + "$id": "4244", + "kind": "property", + "name": "tool_calls", + "serializedName": "tool_calls", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", + "type": { + "$id": "4245", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "valueType": { + "$id": "4246", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details inner object.", + "decorators": [], + "discriminatorProperty": { + "$id": "4247", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" + }, + "properties": [ + { + "$ref": "4247" + } + ], + "discriminatedSubtypes": { + "$id": "4249", + "code_interpreter": { + "$id": "4250", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", + "access": "public", + "usage": "Output", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "discriminatorValue": "code_interpreter", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4251", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" + }, + { + "$id": "4253", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call.", + "type": { + "$id": "4254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" + }, + { + "$id": "4255", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "type": { + "$id": "4256", + "kind": "constant", + "valueType": { + "$id": "4257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "code_interpreter", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" + }, + { + "$id": "4258", + "kind": "property", + "name": "code_interpreter", + "serializedName": "code_interpreter", + "description": "The Code Interpreter tool call definition.", + "type": { + "$id": "4259", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4260", + "kind": "property", + "name": "input", + "serializedName": "input", + "description": "The input to the Code Interpreter tool call.", + "type": { + "$id": "4261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" + }, + { + "$id": "4262", + "kind": "property", + "name": "outputs", + "serializedName": "outputs", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "type": { + "$id": "4263", + "kind": "array", + "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "valueType": { + "$id": "4264", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", + "usage": "Output", + "description": "Abstractly represents a run step tool call details code interpreter output.", + "decorators": [], + "discriminatorProperty": { + "$id": "4265", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The discriminated type identifier for the details object.", + "type": { + "$id": "4266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" + }, + "properties": [ + { + "$ref": "4265" + } + ], + "discriminatedSubtypes": { + "$id": "4267", + "logs": { + "$id": "4268", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", + "access": "public", + "usage": "Output", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "discriminatorValue": "logs", + "decorators": [], + "baseModel": { + "$ref": "4264" + }, + "properties": [ + { + "$id": "4269", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "4270", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" + }, + { + "$id": "4271", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `logs`.", + "type": { + "$id": "4272", + "kind": "constant", + "valueType": { + "$id": "4273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "logs", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" + }, + { + "$id": "4274", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "description": "The text output from the Code Interpreter tool call.", + "type": { + "$id": "4275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" + } + ] + }, + "image": { + "$id": "4276", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "4264" + }, + "properties": [ + { + "$id": "4277", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the output in the outputs array.", + "type": { + "$id": "4278", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" + }, + { + "$id": "4279", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Always `image`.", + "type": { + "$id": "4280", + "kind": "constant", + "valueType": { + "$id": "4281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" + }, + { + "$id": "4282", + "kind": "property", + "name": "image", + "serializedName": "image", + "type": { + "$id": "4283", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4284", + "kind": "property", + "name": "file_id", + "serializedName": "file_id", + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": { + "$id": "4285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" + } + ] + }, + "file_search": { + "$id": "4286", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "file_search", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4287", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4288", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" + }, + { + "$id": "4289", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "4290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" + }, + { + "$id": "4291", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "type": { + "$id": "4292", + "kind": "constant", + "valueType": { + "$id": "4293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "file_search", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" + }, + { + "$id": "4294", + "kind": "property", + "name": "file_search", + "serializedName": "file_search", + "description": "For now, this is always going to be an empty object.", + "type": { + "$id": "4295", + "kind": "dict", + "keyType": { + "$id": "4296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "4297", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" + } + ] + }, + "function": { + "$id": "4298", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", + "access": "public", + "usage": "Output", + "discriminatorValue": "function", + "decorators": [], + "baseModel": { + "$ref": "4246" + }, + "properties": [ + { + "$id": "4299", + "kind": "property", + "name": "index", + "serializedName": "index", + "description": "The index of the tool call in the tool calls array.", + "type": { + "$id": "4300", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" + }, + { + "$id": "4301", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ID of the tool call object.", + "type": { + "$id": "4302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" + }, + { + "$id": "4303", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "type": { + "$id": "4304", + "kind": "constant", + "valueType": { + "$id": "4305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "function", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" + }, + { + "$id": "4306", + "kind": "property", + "name": "function", + "serializedName": "function", + "description": "The definition of the function that was called.", + "type": { + "$id": "4307", + "kind": "model", + "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4308", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the function.", + "type": { + "$id": "4309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" + }, + { + "$id": "4310", + "kind": "property", + "name": "arguments", + "serializedName": "arguments", + "description": "The arguments passed to the function.", + "type": { + "$id": "4311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" + }, + { + "$id": "4312", + "kind": "property", + "name": "output", + "serializedName": "output", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "type": { + "$id": "4313", + "kind": "nullable", + "type": { + "$id": "4314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" + } + ] + } + } + }, + { + "$ref": "4232" + }, + { + "$ref": "4237" + }, + { + "$ref": "4240" + }, + { + "$ref": "4246" + }, + { + "$ref": "4250" + }, + { + "$ref": "4259" + }, + { + "$ref": "4264" + }, + { + "$ref": "4268" + }, + { + "$ref": "4276" + }, + { + "$ref": "4283" + }, + { + "$ref": "4286" + }, + { + "$ref": "4298" + }, + { + "$ref": "4307" + }, + { + "$id": "4315", + "kind": "model", + "name": "RunStepDeltaObject", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", + "access": "public", + "usage": "Output", + "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", + "decorators": [], + "properties": [ + { + "$id": "4316", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": { + "$id": "4317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" + }, + { + "$id": "4318", + "kind": "property", + "name": "object", + "serializedName": "object", + "description": "The object type, which is always `thread.run.step.delta`.", + "type": { + "$id": "4319", + "kind": "constant", + "valueType": { + "$ref": "1229" + }, + "value": "thread.run.step.delta", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" + }, + { + "$id": "4320", + "kind": "property", + "name": "delta", + "serializedName": "delta", + "description": "The delta containing the fields that have changed on the run step.", + "type": { + "$id": "4321", + "kind": "model", + "name": "RunStepDeltaObjectDelta", + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4322", + "kind": "property", + "name": "step_details", + "serializedName": "step_details", + "description": "The details of the run step.", + "type": { + "$ref": "4228" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" + } + ] + }, + { + "$ref": "4321" + }, + { + "$id": "4323", + "kind": "model", + "name": "CreateThreadRequestToolResourcesFileSearchBase", + "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", + "access": "public", + "usage": "Input", + "decorators": [], + "properties": [] + }, + { + "$id": "4324", + "kind": "model", + "name": "ListThreadsResponse", + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", + "access": "public", + "usage": "Output", + "decorators": [], + "properties": [ + { + "$id": "4325", + "kind": "property", + "name": "object", + "serializedName": "object", + "type": { + "$id": "4326", + "kind": "constant", + "valueType": { + "$ref": "1232" + }, + "value": "list", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" + }, + { + "$id": "4327", + "kind": "property", + "name": "data", + "serializedName": "data", + "type": { + "$id": "4328", + "kind": "array", + "name": "ArrayThreadObject", + "valueType": { + "$ref": "2052" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" + }, + { + "$id": "4329", + "kind": "property", + "name": "first_id", + "serializedName": "first_id", + "type": { + "$id": "4330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" + }, + { + "$id": "4331", + "kind": "property", + "name": "last_id", + "serializedName": "last_id", + "type": { + "$id": "4332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" + }, + { + "$id": "4333", + "kind": "property", + "name": "has_more", + "serializedName": "has_more", + "type": { + "$id": "4334", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" + } + ] + } + ], + "Clients": [ + { + "$id": "4335", + "Name": "OpenAIClient", + "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", + "Operations": [], + "Protocol": { + "$id": "4336" + }, + "Parameters": [ + { + "$id": "4337", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4338", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4339", + "Type": { + "$id": "4340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + } + ], + "Decorators": [] + }, + { + "$id": "4341", + "Name": "Audio", + "Operations": [ + { + "$id": "4342", + "Name": "createSpeech", + "ResourceName": "Audio", + "Summary": "Generates audio from the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4343", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4344", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4345", + "Type": { + "$id": "4346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4347", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4348", + "kind": "constant", + "valueType": { + "$id": "4349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4350", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4351", + "kind": "constant", + "valueType": { + "$id": "4352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4353", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3817" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4354", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4355", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4356", + "Name": "transferEncoding", + "NameInResponse": "Transfer-Encoding", + "Description": "chunked", + "Type": { + "$id": "4357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4358", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4359", + "kind": "constant", + "valueType": { + "$id": "4360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/octet-stream" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/speech", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", + "Decorators": [] + }, + { + "$id": "4361", + "Name": "createTranscription", + "ResourceName": "Audio", + "Summary": "Transcribes audio into the input language.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4343" + }, + { + "$id": "4362", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4363", + "kind": "constant", + "valueType": { + "$id": "4364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4365", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4366", + "kind": "constant", + "valueType": { + "$id": "4367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4368", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3825" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4369", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4371", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4372", + "kind": "constant", + "valueType": { + "$id": "4373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/transcriptions", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", + "Decorators": [] + }, + { + "$id": "4374", + "Name": "createTranslation", + "ResourceName": "Audio", + "Summary": "Translates audio into English..", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4343" + }, + { + "$id": "4375", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4376", + "kind": "constant", + "valueType": { + "$id": "4377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4378", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4379", + "kind": "constant", + "valueType": { + "$id": "4380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4381", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3888" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4382", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "4384", + "Name": "contentType", + "NameInResponse": "content-type", + "Type": { + "$id": "4385", + "kind": "constant", + "valueType": { + "$id": "4386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json", + "application/json", + "text/plain" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/audio/translations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4387" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4343" + } + ], + "Decorators": [] + }, + { + "$id": "4388", + "Name": "Assistants", + "Operations": [ + { + "$id": "4389", + "Name": "createAssistant", + "ResourceName": "Assistants", + "Summary": "Create an assistant with a model and instructions.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4390", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4391", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4392", + "Type": { + "$id": "4393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4394", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4395", + "kind": "constant", + "valueType": { + "$id": "4396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4397", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4398", + "kind": "constant", + "valueType": { + "$id": "4399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4400", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3676" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4401", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", + "Decorators": [] + }, + { + "$id": "4402", + "Name": "listAssistants", + "ResourceName": "Assistants", + "Summary": "Returns a list of assistants.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4403", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4404", + "kind": "constant", + "valueType": { + "$id": "4405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4406", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4407", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4408", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "1033" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4409", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4411", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4413", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3760" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", + "Decorators": [] + }, + { + "$id": "4414", + "Name": "getAssistant", + "ResourceName": "Assistants", + "Summary": "Retrieves an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4415", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4416", + "kind": "constant", + "valueType": { + "$id": "4417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4418", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to retrieve.", + "Type": { + "$id": "4419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4420", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", + "Decorators": [] + }, + { + "$id": "4421", + "Name": "modifyAssistant", + "ResourceName": "Assistants", + "Summary": "Modifies an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4422", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4423", + "kind": "constant", + "valueType": { + "$id": "4424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4425", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to modify.", + "Type": { + "$id": "4426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4427", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4428", + "kind": "constant", + "valueType": { + "$id": "4429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4430", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3771" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4431", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3714" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", + "Decorators": [] + }, + { + "$id": "4432", + "Name": "deleteAssistant", + "ResourceName": "Assistants", + "Summary": "Delete an assistant.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4390" + }, + { + "$id": "4433", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4434", + "kind": "constant", + "valueType": { + "$id": "4435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4436", + "Name": "assistant_id", + "NameInRequest": "assistant_id", + "Description": "The ID of the assistant to delete.", + "Type": { + "$id": "4437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4438", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3810" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/assistants/{assistant_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4439" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4390" + } + ], + "Decorators": [] + }, + { + "$id": "4440", + "Name": "Batches", + "Operations": [ + { + "$id": "4441", + "Name": "createBatch", + "ResourceName": "Batches", + "Summary": "Creates and executes a batch from an uploaded file of requests", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4442", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4443", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4444", + "Type": { + "$id": "4445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4446", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4447", + "kind": "constant", + "valueType": { + "$id": "4448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4449", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4450", + "kind": "constant", + "valueType": { + "$id": "4451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4452", + "Name": "createBatchRequest", + "NameInRequest": "createBatchRequest", + "Type": { + "$ref": "3581" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Spread", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4453", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", + "Decorators": [] + }, + { + "$id": "4454", + "Name": "listBatches", + "ResourceName": "Batches", + "Summary": "List your organization's batches.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4455", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4456", + "kind": "constant", + "valueType": { + "$id": "4457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4458", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4460", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4461", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4462", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3665" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", + "Decorators": [] + }, + { + "$id": "4463", + "Name": "retrieveBatch", + "ResourceName": "Batches", + "Summary": "Retrieves a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4464", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4465", + "kind": "constant", + "valueType": { + "$id": "4466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4467", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to retrieve.", + "Type": { + "$id": "4468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4469", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", + "Decorators": [] + }, + { + "$id": "4470", + "Name": "cancelBatch", + "ResourceName": "Batches", + "Summary": "Cancels an in-progress batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4442" + }, + { + "$id": "4471", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4472", + "kind": "constant", + "valueType": { + "$id": "4473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4474", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the batch to cancel.", + "Type": { + "$id": "4475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4476", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3592" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4477" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4442" + } + ], + "Decorators": [] + }, + { + "$id": "4478", + "Name": "Chat", + "Operations": [ + { + "$id": "4479", + "Name": "createChatCompletion", + "ResourceName": "Chat", + "Summary": "Creates a model response for the given chat conversation.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4480", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4481", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4482", + "Type": { + "$id": "4483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4484", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4485", + "kind": "constant", + "valueType": { + "$id": "4486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4487", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4488", + "kind": "constant", + "valueType": { + "$id": "4489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4490", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3308" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4491", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3513" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/chat/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4492" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4480" + } + ], + "Decorators": [] + }, + { + "$id": "4493", + "Name": "Completions", + "Operations": [ + { + "$id": "4494", + "Name": "createCompletion", + "ResourceName": "Completions", + "Summary": "Creates a completion for the provided prompt and parameters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4495", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4496", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4497", + "Type": { + "$id": "4498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4499", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4500", + "kind": "constant", + "valueType": { + "$id": "4501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4502", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4503", + "kind": "constant", + "valueType": { + "$id": "4504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4505", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3192" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4506", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3259" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/completions", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4507" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4495" + } + ], + "Decorators": [] + }, + { + "$id": "4508", + "Name": "Embeddings", + "Operations": [ + { + "$id": "4509", + "Name": "createEmbedding", + "ResourceName": "Embeddings", + "Summary": "Creates an embedding vector representing the input text.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4510", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4511", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4512", + "Type": { + "$id": "4513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4514", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4515", + "kind": "constant", + "valueType": { + "$id": "4516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4517", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4518", + "kind": "constant", + "valueType": { + "$id": "4519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4520", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3152" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4521", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3169" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/embeddings", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4522" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4510" + } + ], + "Decorators": [] + }, + { + "$id": "4523", + "Name": "Files", + "Operations": [ + { + "$id": "4524", + "Name": "createFile", + "ResourceName": "Files", + "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4525", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4526", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4527", + "Type": { + "$id": "4528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4529", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4530", + "kind": "constant", + "valueType": { + "$id": "4531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4532", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4533", + "kind": "constant", + "valueType": { + "$id": "4534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4535", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "3136" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4536", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1275" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/files", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.createFile", + "Decorators": [] + }, + { + "$id": "4537", + "Name": "listFiles", + "ResourceName": "Files", + "Summary": "Returns a list of files that belong to the user's organization.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4538", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4539", + "kind": "constant", + "valueType": { + "$id": "4540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4541", + "Name": "purpose", + "NameInRequest": "purpose", + "Description": "Only return files with the given purpose.", + "Type": { + "$id": "4542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4543", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3140" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", + "Decorators": [] + }, + { + "$id": "4544", + "Name": "retrieveFile", + "ResourceName": "Files", + "Summary": "Returns information about a specific file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4545", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4546", + "kind": "constant", + "valueType": { + "$id": "4547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4548", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4550", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1275" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", + "Decorators": [] + }, + { + "$id": "4551", + "Name": "deleteFile", + "ResourceName": "Files", + "Summary": "Delete a file", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4552", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4553", + "kind": "constant", + "valueType": { + "$id": "4554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4555", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4557", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3145" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", + "Decorators": [] + }, + { + "$id": "4558", + "Name": "downloadFile", + "ResourceName": "Files", + "Summary": "Returns the contents of the specified file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4525" + }, + { + "$id": "4559", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4560", + "kind": "constant", + "valueType": { + "$id": "4561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4562", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to use for this request.", + "Type": { + "$id": "4563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4564", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4565", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/files/{file_id}/content", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4566" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4525" + } + ], + "Decorators": [] + }, + { + "$id": "4567", + "Name": "FineTuning", + "Operations": [ + { + "$id": "4568", + "Name": "createFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4569", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4570", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4571", + "Type": { + "$id": "4572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4573", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4574", + "kind": "constant", + "valueType": { + "$id": "4575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4576", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4577", + "kind": "constant", + "valueType": { + "$id": "4578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4579", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2935" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4580", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", + "Decorators": [] + }, + { + "$id": "4581", + "Name": "listPaginatedFineTuningJobs", + "ResourceName": "FineTuning", + "Summary": "List your organization's fine-tuning jobs", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4582", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4583", + "kind": "constant", + "valueType": { + "$id": "4584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4585", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last job from the previous pagination request.", + "Type": { + "$id": "4586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4587", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of fine-tuning jobs to retrieve.", + "Type": { + "$id": "4588", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4589", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3068" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", + "Decorators": [] + }, + { + "$id": "4590", + "Name": "retrieveFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4591", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4592", + "kind": "constant", + "valueType": { + "$id": "4593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4594", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job.", + "Type": { + "$id": "4595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4596", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", + "Decorators": [] + }, + { + "$id": "4597", + "Name": "cancelFineTuningJob", + "ResourceName": "FineTuning", + "Summary": "Immediately cancel a fine-tune job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4598", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4599", + "kind": "constant", + "valueType": { + "$id": "4600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4601", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to cancel.", + "Type": { + "$id": "4602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4603", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2983" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", + "Decorators": [] + }, + { + "$id": "4604", + "Name": "listFineTuningJobCheckpoints", + "ResourceName": "FineTuning", + "Summary": "List the checkpoints for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4605", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4606", + "kind": "constant", + "valueType": { + "$id": "4607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4608", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get checkpoints for.", + "Type": { + "$id": "4609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4610", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last checkpoint ID from the previous pagination request.", + "Type": { + "$id": "4611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4612", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of checkpoints to retrieve.", + "Type": { + "$id": "4613", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4614", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3075" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", + "Decorators": [] + }, + { + "$id": "4615", + "Name": "listFineTuningEvents", + "ResourceName": "FineTuning", + "Summary": "Get status updates for a fine-tuning job.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4569" + }, + { + "$id": "4616", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4617", + "kind": "constant", + "valueType": { + "$id": "4618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4619", + "Name": "fine_tuning_job_id", + "NameInRequest": "fine_tuning_job_id", + "Description": "The ID of the fine-tuning job to get events for.", + "Type": { + "$id": "4620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4621", + "Name": "after", + "NameInRequest": "after", + "Description": "Identifier for the last event from the previous pagination request.", + "Type": { + "$id": "4622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4623", + "Name": "limit", + "NameInRequest": "limit", + "Description": "Number of events to retrieve.", + "Type": { + "$id": "4624", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4625", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "3118" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4626" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4569" + } + ], + "Decorators": [] + }, + { + "$id": "4627", + "Name": "Images", + "Operations": [ + { + "$id": "4628", + "Name": "createImage", + "ResourceName": "Images", + "Summary": "Creates an image given a prompt", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4629", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4630", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4631", + "Type": { + "$id": "4632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4633", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4634", + "kind": "constant", + "valueType": { + "$id": "4635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4636", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4637", + "kind": "constant", + "valueType": { + "$id": "4638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4639", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2873" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4640", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/generations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImage", + "Decorators": [] + }, + { + "$id": "4641", + "Name": "createImageEdit", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4629" + }, + { + "$id": "4642", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4643", + "kind": "constant", + "valueType": { + "$id": "4644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4645", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4646", + "kind": "constant", + "valueType": { + "$id": "4647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4648", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2903" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4649", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/edits", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", + "Decorators": [] + }, + { + "$id": "4650", + "Name": "createImageVariation", + "ResourceName": "Images", + "Summary": "Creates an edited or extended image given an original image and a prompt.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4629" + }, + { + "$id": "4651", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4652", + "kind": "constant", + "valueType": { + "$id": "4653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4654", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "4655", + "kind": "constant", + "valueType": { + "$id": "4656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4657", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2921" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4658", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2890" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/images/variations", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4659" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4629" + } + ], + "Decorators": [] + }, + { + "$id": "4660", + "Name": "Messages", + "Operations": [ + { + "$id": "4661", + "Name": "createMessage", + "ResourceName": "Messages", + "Summary": "Create a message.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4662", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4663", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4664", + "Type": { + "$id": "4665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4666", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4667", + "kind": "constant", + "valueType": { + "$id": "4668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4669", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", + "Type": { + "$id": "4670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4671", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4672", + "kind": "constant", + "valueType": { + "$id": "4673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4674", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1526" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4675", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", + "Decorators": [] + }, + { + "$id": "4676", + "Name": "listMessages", + "ResourceName": "Messages", + "Summary": "Returns a list of messages for a given thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4677", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4678", + "kind": "constant", + "valueType": { + "$id": "4679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4680", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", + "Type": { + "$id": "4681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4682", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4683", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4684", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "609" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4685", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4687", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4689", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2849" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", + "Decorators": [] + }, + { + "$id": "4690", + "Name": "getMessage", + "ResourceName": "Messages", + "Summary": "Retrieve a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4691", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4692", + "kind": "constant", + "valueType": { + "$id": "4693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4694", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", + "Type": { + "$id": "4695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4696", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to retrieve.", + "Type": { + "$id": "4697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4698", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", + "Decorators": [] + }, + { + "$id": "4699", + "Name": "modifyMessage", + "ResourceName": "Messages", + "Summary": "Modifies a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4700", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4701", + "kind": "constant", + "valueType": { + "$id": "4702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4703", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "4704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4705", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to modify.", + "Type": { + "$id": "4706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4707", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4708", + "kind": "constant", + "valueType": { + "$id": "4709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4710", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2860" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4711", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2803" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", + "Decorators": [] + }, + { + "$id": "4712", + "Name": "deleteMessage", + "ResourceName": "Messages", + "Summary": "Deletes a message.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4662" + }, + { + "$id": "4713", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4714", + "kind": "constant", + "valueType": { + "$id": "4715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4716", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this message belongs.", + "Type": { + "$id": "4717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4718", + "Name": "message_id", + "NameInRequest": "message_id", + "Description": "The ID of the message to delete.", + "Type": { + "$id": "4719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4720", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2866" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/messages/{message_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4721" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4662" + } + ], + "Decorators": [] + }, + { + "$id": "4722", + "Name": "ModelsOps", + "Operations": [ + { + "$id": "4723", + "Name": "listModels", + "ResourceName": "Models", + "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4724", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4725", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4726", + "Type": { + "$id": "4727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4728", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4729", + "kind": "constant", + "valueType": { + "$id": "4730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4731", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2781" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.listModels", + "Decorators": [] + }, + { + "$id": "4732", + "Name": "retrieveModel", + "ResourceName": "Models", + "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4724" + }, + { + "$id": "4733", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4734", + "kind": "constant", + "valueType": { + "$id": "4735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4736", + "Name": "model", + "NameInRequest": "model", + "Description": "The ID of the model to use for this request.", + "Type": { + "$id": "4737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4738", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2786" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", + "Decorators": [] + }, + { + "$id": "4739", + "Name": "deleteModel", + "ResourceName": "Models", + "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4724" + }, + { + "$id": "4740", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4741", + "kind": "constant", + "valueType": { + "$id": "4742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4743", + "Name": "model", + "NameInRequest": "model", + "Description": "The model to delete", + "Type": { + "$id": "4744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4745", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2796" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/models/{model}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4746" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4724" + } + ], + "Decorators": [] + }, + { + "$id": "4747", + "Name": "Moderations", + "Operations": [ + { + "$id": "4748", + "Name": "createModeration", + "ResourceName": "Moderations", + "Summary": "Classifies if text is potentially harmful.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4749", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4750", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4751", + "Type": { + "$id": "4752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4753", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4754", + "kind": "constant", + "valueType": { + "$id": "4755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4756", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4757", + "kind": "constant", + "valueType": { + "$id": "4758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4759", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2716" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4760", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2723" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/moderations", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4761" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4749" + } + ], + "Decorators": [] + }, + { + "$id": "4762", + "Name": "Realtime", + "Operations": [ + { + "$id": "4763", + "Name": "startRealtimeSession", + "ResourceName": "Realtime", + "Summary": "Starts a real-time conversation session.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4764", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4765", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4766", + "Type": { + "$id": "4767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4768", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4769", + "kind": "constant", + "valueType": { + "$id": "4770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4771", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4772", + "kind": "constant", + "valueType": { + "$id": "4773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4774", + "Name": "requestMessages", + "NameInRequest": "requestMessages", + "Type": { + "$id": "4775", + "kind": "array", + "name": "ArrayRealtimeRequestCommand", + "valueType": { + "$ref": "2100" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4776", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "4777", + "kind": "array", + "name": "ArrayRealtimeResponseCommand", + "valueType": { + "$ref": "2322" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/realtime", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4778" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4764" + } + ], + "Decorators": [] + }, + { + "$id": "4779", + "Name": "Threads", + "Operations": [ + { + "$id": "4780", + "Name": "createThread", + "ResourceName": "Threads", + "Summary": "Create a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4781", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4782", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4783", + "Type": { + "$id": "4784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4785", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4786", + "kind": "constant", + "valueType": { + "$id": "4787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4788", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4789", + "kind": "constant", + "valueType": { + "$id": "4790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4791", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1523" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4792", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", + "Decorators": [] + }, + { + "$id": "4793", + "Name": "getThread", + "ResourceName": "Threads", + "Summary": "Retrieves a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4794", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4795", + "kind": "constant", + "valueType": { + "$id": "4796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4797", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to retrieve.", + "Type": { + "$id": "4798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4799", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", + "Decorators": [] + }, + { + "$id": "4800", + "Name": "modifyThread", + "ResourceName": "Threads", + "Summary": "Modifies a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4801", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4802", + "kind": "constant", + "valueType": { + "$id": "4803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4804", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", + "Type": { + "$id": "4805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4806", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4807", + "kind": "constant", + "valueType": { + "$id": "4808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4809", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "2078" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4810", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2052" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", + "Decorators": [] + }, + { + "$id": "4811", + "Name": "deleteThread", + "ResourceName": "Threads", + "Summary": "Delete a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4781" + }, + { + "$id": "4812", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4813", + "kind": "constant", + "valueType": { + "$id": "4814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4815", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to delete.", + "Type": { + "$id": "4816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4817", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "2093" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4818" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4781" + } + ], + "Decorators": [] + }, + { + "$id": "4819", + "Name": "Runs", + "Operations": [ + { + "$id": "4820", + "Name": "createThreadAndRun", + "ResourceName": "Runs", + "Summary": "Create a thread and run it in one request.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4821", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4822", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4823", + "Type": { + "$id": "4824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4825", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4826", + "kind": "constant", + "valueType": { + "$id": "4827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4828", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4829", + "kind": "constant", + "valueType": { + "$id": "4830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4831", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1519" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4832", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", + "Decorators": [] + }, + { + "$id": "4833", + "Name": "createRun", + "ResourceName": "Runs", + "Summary": "Create a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4834", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4835", + "kind": "constant", + "valueType": { + "$id": "4836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4837", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to run.", + "Type": { + "$id": "4838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4839", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4840", + "kind": "constant", + "valueType": { + "$id": "4841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4842", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1814" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4843", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", + "Decorators": [] + }, + { + "$id": "4844", + "Name": "listRuns", + "ResourceName": "Runs", + "Summary": "Returns a list of runs belonging to a thread.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4845", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4846", + "kind": "constant", + "valueType": { + "$id": "4847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4848", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run belongs to.", + "Type": { + "$id": "4849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4850", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4851", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4852", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "319" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4853", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4855", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4857", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1863" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", + "Decorators": [] + }, + { + "$id": "4858", + "Name": "getRun", + "ResourceName": "Runs", + "Summary": "Retrieves a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4859", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4860", + "kind": "constant", + "valueType": { + "$id": "4861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4862", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4864", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to retrieve.", + "Type": { + "$id": "4865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4866", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", + "Decorators": [] + }, + { + "$id": "4867", + "Name": "modifyRun", + "ResourceName": "Runs", + "Summary": "Modifies a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4868", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4869", + "kind": "constant", + "valueType": { + "$id": "4870", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4871", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "Type": { + "$id": "4872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4873", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to modify.", + "Type": { + "$id": "4874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4875", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4876", + "kind": "constant", + "valueType": { + "$id": "4877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4878", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1874" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4879", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", + "Decorators": [] + }, + { + "$id": "4880", + "Name": "cancelRun", + "ResourceName": "Runs", + "Summary": "Cancels a run that is `in_progress`.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4881", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4882", + "kind": "constant", + "valueType": { + "$id": "4883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4884", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which this run belongs.", + "Type": { + "$id": "4885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4886", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to cancel.", + "Type": { + "$id": "4887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4888", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", + "Decorators": [] + }, + { + "$id": "4889", + "Name": "submitToolOutputsToRun", + "ResourceName": "Runs", + "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4890", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4891", + "kind": "constant", + "valueType": { + "$id": "4892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4893", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", + "Type": { + "$id": "4894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4895", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run that requires the tool output submission.", + "Type": { + "$id": "4896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4897", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4898", + "kind": "constant", + "valueType": { + "$id": "4899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4900", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1880" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4901", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1707" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", + "Decorators": [] + }, + { + "$id": "4902", + "Name": "listRunSteps", + "ResourceName": "Runs", + "Summary": "Returns a list of run steps belonging to a run.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4903", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4904", + "kind": "constant", + "valueType": { + "$id": "4905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4906", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread the run and run steps belong to.", + "Type": { + "$id": "4907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4908", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run the run steps belong to.", + "Type": { + "$id": "4909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4910", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4911", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4912", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "328" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4913", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4915", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4917", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1891" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", + "Decorators": [] + }, + { + "$id": "4918", + "Name": "getRunStep", + "ResourceName": "Runs", + "Summary": "Retrieves a run step.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4821" + }, + { + "$id": "4919", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4920", + "kind": "constant", + "valueType": { + "$id": "4921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4922", + "Name": "thread_id", + "NameInRequest": "thread_id", + "Description": "The ID of the thread to which the run and run step belongs.", + "Type": { + "$id": "4923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4924", + "Name": "run_id", + "NameInRequest": "run_id", + "Description": "The ID of the run to which the run step belongs.", + "Type": { + "$id": "4925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4926", + "Name": "step_id", + "NameInRequest": "step_id", + "Description": "The ID of the run step to retrieve.", + "Type": { + "$id": "4927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4928", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1896" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", + "Decorators": [] + } + ], + "Protocol": { + "$id": "4929" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4821" + } + ], + "Decorators": [] + }, + { + "$id": "4930", + "Name": "VectorStores", + "Operations": [ + { + "$id": "4931", + "Name": "listVectorStores", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector-stores.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4932", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4933", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4934", + "Type": { + "$id": "4935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "4936", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4937", + "kind": "constant", + "valueType": { + "$id": "4938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4939", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4940", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4941", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "55" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4942", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4944", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4946", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1324" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", + "Decorators": [] + }, + { + "$id": "4947", + "Name": "createVectorStore", + "ResourceName": "VectorStores", + "Summary": "Creates a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4948", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4949", + "kind": "constant", + "valueType": { + "$id": "4950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4951", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4952", + "kind": "constant", + "valueType": { + "$id": "4953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4954", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1379" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4955", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", + "Decorators": [] + }, + { + "$id": "4956", + "Name": "getVectorStore", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4957", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4958", + "kind": "constant", + "valueType": { + "$id": "4959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4960", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to retrieve.", + "Type": { + "$id": "4961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4962", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", + "Decorators": [] + }, + { + "$id": "4963", + "Name": "modifyVectorStore", + "ResourceName": "VectorStores", + "Summary": "Modifies a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4964", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4965", + "kind": "constant", + "valueType": { + "$id": "4966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4967", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to modify.", + "Type": { + "$id": "4968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4969", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4970", + "kind": "constant", + "valueType": { + "$id": "4971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4972", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1411" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4973", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1329" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", + "Decorators": [] + }, + { + "$id": "4974", + "Name": "deleteVectorStore", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4975", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4976", + "kind": "constant", + "valueType": { + "$id": "4977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4978", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store to delete.", + "Type": { + "$id": "4979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4980", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1422" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", + "Decorators": [] + }, + { + "$id": "4981", + "Name": "listVectorStoreFiles", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4982", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4983", + "kind": "constant", + "valueType": { + "$id": "4984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4985", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the files belong to.", + "Type": { + "$id": "4986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4987", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "4988", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4989", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "81" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4990", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "4991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4992", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "4993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4994", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4995", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1429" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", + "Decorators": [] + }, + { + "$id": "4996", + "Name": "createVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "4997", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4998", + "kind": "constant", + "valueType": { + "$id": "4999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5000", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a File.", + "Type": { + "$id": "5001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5002", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5003", + "kind": "constant", + "valueType": { + "$id": "5004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5005", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1478" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5006", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1434" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5007", + "Name": "getVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5008", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5009", + "kind": "constant", + "valueType": { + "$id": "5010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5011", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "5012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5013", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file being retrieved.", + "Type": { + "$id": "5014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5015", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1434" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5016", + "Name": "deleteVectorStoreFile", + "ResourceName": "VectorStores", + "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5017", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5018", + "kind": "constant", + "valueType": { + "$id": "5019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5020", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file belongs to.", + "Type": { + "$id": "5021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5022", + "Name": "file_id", + "NameInRequest": "file_id", + "Description": "The ID of the file to delete.", + "Type": { + "$id": "5023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5024", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1483" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/files/{file_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", + "Decorators": [] + }, + { + "$id": "5025", + "Name": "createVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Create a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5026", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5027", + "kind": "constant", + "valueType": { + "$id": "5028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5029", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store for which to create a file batch.", + "Type": { + "$id": "5030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5031", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5032", + "kind": "constant", + "valueType": { + "$id": "5033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5034", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1490" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5035", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5036", + "Name": "getVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Retrieves a vector store file batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5037", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5038", + "kind": "constant", + "valueType": { + "$id": "5039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5040", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5042", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch being retrieved.", + "Type": { + "$id": "5043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5044", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5045", + "Name": "cancelVectorStoreFileBatch", + "ResourceName": "VectorStores", + "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5046", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5047", + "kind": "constant", + "valueType": { + "$id": "5048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5049", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5051", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch to cancel.", + "Type": { + "$id": "5052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5053", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1496" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", + "Decorators": [] + }, + { + "$id": "5054", + "Name": "listFilesInVectorStoreBatch", + "ResourceName": "VectorStores", + "Summary": "Returns a list of vector store files in a batch.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "4932" + }, + { + "$id": "5055", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5056", + "kind": "constant", + "valueType": { + "$id": "5057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5058", + "Name": "vector_store_id", + "NameInRequest": "vector_store_id", + "Description": "The ID of the vector store that the file batch belongs to.", + "Type": { + "$id": "5059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5060", + "Name": "batch_id", + "NameInRequest": "batch_id", + "Description": "The ID of the file batch that the files belong to.", + "Type": { + "$id": "5061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5062", + "Name": "limit", + "NameInRequest": "limit", + "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "Type": { + "$id": "5063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5064", + "Name": "order", + "NameInRequest": "order", + "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "Type": { + "$ref": "137" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5065", + "Name": "after", + "NameInRequest": "after", + "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", + "Type": { + "$id": "5066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5067", + "Name": "before", + "NameInRequest": "before", + "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", + "Type": { + "$id": "5068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5069", + "Name": "filter", + "NameInRequest": "filter", + "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "Type": { + "$ref": "87" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5070", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1429" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", + "Decorators": [] + } + ], + "Protocol": { + "$id": "5071" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "4932" + } + ], + "Decorators": [] + }, + { + "$id": "5072", + "Name": "Uploads", + "Operations": [ + { + "$id": "5073", + "Name": "createUpload", + "ResourceName": "Uploads", + "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5074", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "5075", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "5076", + "Type": { + "$id": "5077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://api.openai.com/v1" + } + }, + { + "$id": "5078", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5079", + "kind": "constant", + "valueType": { + "$id": "5080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5081", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5082", + "kind": "constant", + "valueType": { + "$id": "5083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5084", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1247" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5085", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", + "Decorators": [] + }, + { + "$id": "5086", + "Name": "addUploadPart", + "ResourceName": "Uploads", + "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5087", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5088", + "kind": "constant", + "valueType": { + "$id": "5089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5090", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "5091", + "kind": "constant", + "valueType": { + "$id": "5092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5093", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5095", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1305" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5096", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1308" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/parts", + "RequestMediaTypes": [ + "multipart/form-data" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", + "Decorators": [] + }, + { + "$id": "5097", + "Name": "completeUpload", + "ResourceName": "Uploads", + "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5098", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5099", + "kind": "constant", + "valueType": { + "$id": "5100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5101", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5103", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5104", + "kind": "constant", + "valueType": { + "$id": "5105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5106", + "Name": "requestBody", + "NameInRequest": "requestBody", + "Type": { + "$ref": "1318" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5107", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/complete", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", + "Decorators": [] + }, + { + "$id": "5108", + "Name": "cancelUpload", + "ResourceName": "Uploads", + "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "5074" + }, + { + "$id": "5109", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5110", + "kind": "constant", + "valueType": { + "$id": "5111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5112", + "Name": "upload_id", + "NameInRequest": "upload_id", + "Type": { + "$id": "5113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5114", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1255" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/uploads/{upload_id}/cancel", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", + "Decorators": [] + } + ], + "Protocol": { + "$id": "5115" + }, + "Parent": "OpenAIClient", + "Parameters": [ + { + "$ref": "5074" + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "5116", + "ApiKey": { + "$id": "5117", + "Name": "Authorization", + "Prefix": "Bearer" + } + } +} From a31aba40236bbca3615953b3fa7cd0b35f69f702 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 25 Oct 2024 12:42:13 -0700 Subject: [PATCH 20/54] delete artifacts again --- .dotnet/Configuration.json | 8 - .dotnet/tspCodeModel.json | 51262 ----------------------------------- 2 files changed, 51270 deletions(-) delete mode 100644 .dotnet/Configuration.json delete mode 100644 .dotnet/tspCodeModel.json diff --git a/.dotnet/Configuration.json b/.dotnet/Configuration.json deleted file mode 100644 index 85fab5a06..000000000 --- a/.dotnet/Configuration.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "output-folder": ".", - "namespace": "OpenAI", - "library-name": "OpenAI", - "unreferenced-types-handling": "keepAll", - "use-model-reader-writer": true, - "disable-xml-docs": true -} diff --git a/.dotnet/tspCodeModel.json b/.dotnet/tspCodeModel.json deleted file mode 100644 index d3450f8ba..000000000 --- a/.dotnet/tspCodeModel.json +++ /dev/null @@ -1,51262 +0,0 @@ -{ - "$id": "1", - "Name": "OpenAI", - "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "kind": "enum", - "name": "CreateUploadRequestPurpose", - "crossLanguageDefinitionId": "CreateUploadRequest.purpose.anonymous", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "5", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "6", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "7", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "8", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "9", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - }, - { - "$id": "10", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "11", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "12", - "kind": "enum", - "name": "UploadStatus", - "crossLanguageDefinitionId": "Upload.status.anonymous", - "valueType": { - "$id": "13", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "14", - "kind": "enumvalue", - "name": "pending", - "value": "pending", - "valueType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "16", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "18", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - }, - { - "$id": "20", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "21", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "12" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "22", - "kind": "enum", - "name": "Upload_object", - "valueType": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "24", - "kind": "enumvalue", - "name": "upload", - "value": "upload", - "description": "upload", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Upload_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "25", - "kind": "enum", - "name": "OpenAIFile_object", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "27", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "26" - }, - "enumType": { - "$ref": "25" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The OpenAIFile_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "28", - "kind": "enum", - "name": "OpenAIFilePurpose", - "crossLanguageDefinitionId": "OpenAIFile.purpose.anonymous", - "valueType": { - "$id": "29", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "30", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "32", - "kind": "enumvalue", - "name": "assistants_output", - "value": "assistants_output", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "34", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "35", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "36", - "kind": "enumvalue", - "name": "batch_output", - "value": "batch_output", - "valueType": { - "$id": "37", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "38", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "40", - "kind": "enumvalue", - "name": "fine-tune-results", - "value": "fine-tune-results", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - }, - { - "$id": "42", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "28" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "44", - "kind": "enum", - "name": "OpenAIFileStatus", - "crossLanguageDefinitionId": "OpenAIFile.status.anonymous", - "valueType": { - "$id": "45", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "46", - "kind": "enumvalue", - "name": "uploaded", - "value": "uploaded", - "valueType": { - "$id": "47", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "48", - "kind": "enumvalue", - "name": "processed", - "value": "processed", - "valueType": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - }, - { - "$id": "50", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "51", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "44" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "52", - "kind": "enum", - "name": "UploadPart_object", - "valueType": { - "$id": "53", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "54", - "kind": "enumvalue", - "name": "upload.part", - "value": "upload.part", - "description": "upload.part", - "valueType": { - "$ref": "53" - }, - "enumType": { - "$ref": "52" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The UploadPart_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "55", - "kind": "enum", - "name": "ListVectorStoresRequestOrder", - "crossLanguageDefinitionId": "listVectorStores.RequestOrder.anonymous", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "57", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - }, - { - "$id": "59", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "55" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "61", - "kind": "enum", - "name": "ListVectorStoresResponse_object", - "valueType": { - "$id": "62", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "63", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "62" - }, - "enumType": { - "$ref": "61" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoresResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "64", - "kind": "enum", - "name": "VectorStoreObject_object", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "66", - "kind": "enumvalue", - "name": "vector_store", - "value": "vector_store", - "description": "vector_store", - "valueType": { - "$ref": "65" - }, - "enumType": { - "$ref": "64" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "67", - "kind": "enum", - "name": "VectorStoreObjectStatus", - "crossLanguageDefinitionId": "VectorStoreObject.status.anonymous", - "valueType": { - "$id": "68", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "69", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "70", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "71", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "72", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - }, - { - "$id": "73", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "74", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "67" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "75", - "kind": "enum", - "name": "VectorStoreExpirationAfter_anchor", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "77", - "kind": "enumvalue", - "name": "last_active_at", - "value": "last_active_at", - "description": "last_active_at", - "valueType": { - "$ref": "76" - }, - "enumType": { - "$ref": "75" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreExpirationAfter_anchor", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "78", - "kind": "enum", - "name": "DeleteVectorStoreResponse_object", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "80", - "kind": "enumvalue", - "name": "vector_store.deleted", - "value": "vector_store.deleted", - "description": "vector_store.deleted", - "valueType": { - "$ref": "79" - }, - "enumType": { - "$ref": "78" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "81", - "kind": "enum", - "name": "ListVectorStoreFilesRequestOrder", - "crossLanguageDefinitionId": "listVectorStoreFiles.RequestOrder.anonymous", - "valueType": { - "$id": "82", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "83", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "84", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - }, - { - "$id": "85", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "81" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "87", - "kind": "enum", - "name": "ListVectorStoreFilesFilter", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesFilter", - "valueType": { - "$id": "88", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "89", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "90", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "91", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "92", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "93", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - }, - { - "$id": "95", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "96", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "87" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "97", - "kind": "enum", - "name": "ListVectorStoreFilesResponse_object", - "valueType": { - "$id": "98", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "99", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "98" - }, - "enumType": { - "$ref": "97" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListVectorStoreFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "100", - "kind": "enum", - "name": "VectorStoreFileObject_object", - "valueType": { - "$id": "101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "102", - "kind": "enumvalue", - "name": "vector_store.file", - "value": "vector_store.file", - "description": "vector_store.file", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "103", - "kind": "enum", - "name": "VectorStoreFileObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileObject.status.anonymous", - "valueType": { - "$id": "104", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "105", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "107", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "109", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - }, - { - "$id": "111", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "103" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "113", - "kind": "enum", - "name": "VectorStoreFileObjectLastErrorCode", - "crossLanguageDefinitionId": "VectorStoreFileObject.last_error.code.anonymous", - "valueType": { - "$id": "114", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "115", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "117", - "kind": "enumvalue", - "name": "unsupported_file", - "value": "unsupported_file", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - }, - { - "$id": "119", - "kind": "enumvalue", - "name": "invalid_file", - "value": "invalid_file", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "113" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "121", - "kind": "enum", - "name": "DeleteVectorStoreFileResponse_object", - "valueType": { - "$id": "122", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "123", - "kind": "enumvalue", - "name": "vector_store.file.deleted", - "value": "vector_store.file.deleted", - "description": "vector_store.file.deleted", - "valueType": { - "$ref": "122" - }, - "enumType": { - "$ref": "121" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteVectorStoreFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "124", - "kind": "enum", - "name": "VectorStoreFileBatchObject_object", - "valueType": { - "$id": "125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "126", - "kind": "enumvalue", - "name": "vector_store.files_batch", - "value": "vector_store.files_batch", - "description": "vector_store.files_batch", - "valueType": { - "$ref": "125" - }, - "enumType": { - "$ref": "124" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The VectorStoreFileBatchObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "127", - "kind": "enum", - "name": "VectorStoreFileBatchObjectStatus", - "crossLanguageDefinitionId": "VectorStoreFileBatchObject.status.anonymous", - "valueType": { - "$id": "128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "129", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "131", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "133", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "135", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "137", - "kind": "enum", - "name": "ListFilesInVectorStoreBatchRequestOrder", - "crossLanguageDefinitionId": "listFilesInVectorStoreBatch.RequestOrder.anonymous", - "valueType": { - "$id": "138", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "139", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - }, - { - "$id": "141", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "143", - "kind": "enum", - "name": "CreateMessageRequestRole", - "crossLanguageDefinitionId": "CreateMessageRequest.role.anonymous", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "145", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - }, - { - "$id": "147", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "143" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "149", - "kind": "enum", - "name": "FileSearchRankingOptionsRanker", - "crossLanguageDefinitionId": "FileSearchRankingOptions.ranker.anonymous", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "151", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - }, - { - "$id": "153", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "valueType": { - "$id": "154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "149" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "155", - "kind": "enum", - "name": "AssistantToolsFileSearchTypeOnly_type", - "valueType": { - "$id": "156", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "157", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "description": "file_search", - "valueType": { - "$ref": "156" - }, - "enumType": { - "$ref": "155" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantToolsFileSearchTypeOnly_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "158", - "kind": "enum", - "name": "CreateThreadAndRunRequestModel", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.model.anonymous", - "valueType": { - "$id": "159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "160", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "162", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "164", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "166", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "168", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "170", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "172", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "173", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "174", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "175", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "176", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "177", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "178", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "180", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "182", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "184", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "185", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "186", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "187", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "188", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "190", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "191", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "192", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "194", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "196", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "198", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "200", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "202", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "203", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - }, - { - "$id": "204", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "205", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "158" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "206", - "kind": "enum", - "name": "TruncationObjectType", - "crossLanguageDefinitionId": "TruncationObject.type.anonymous", - "valueType": { - "$id": "207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "208", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - }, - { - "$id": "210", - "kind": "enumvalue", - "name": "last_messages", - "value": "last_messages", - "valueType": { - "$id": "211", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "206" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "212", - "kind": "enum", - "name": "CreateThreadAndRunRequestToolChoice", - "crossLanguageDefinitionId": "CreateThreadAndRunRequest.tool_choice.anonymous", - "valueType": { - "$id": "213", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "214", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "216", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - }, - { - "$id": "218", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "212" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "220", - "kind": "enum", - "name": "AssistantsNamedToolChoiceType", - "crossLanguageDefinitionId": "AssistantsNamedToolChoice.type.anonymous", - "valueType": { - "$id": "221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "222", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "224", - "kind": "enumvalue", - "name": "code_interpreter", - "value": "code_interpreter", - "valueType": { - "$id": "225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - }, - { - "$id": "226", - "kind": "enumvalue", - "name": "file_search", - "value": "file_search", - "valueType": { - "$id": "227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "228", - "kind": "enum", - "name": "RunObject_object", - "valueType": { - "$id": "229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "230", - "kind": "enumvalue", - "name": "thread.run", - "value": "thread.run", - "description": "thread.run", - "valueType": { - "$ref": "229" - }, - "enumType": { - "$ref": "228" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "231", - "kind": "enum", - "name": "RunObjectStatus", - "crossLanguageDefinitionId": "RunObject.status.anonymous", - "valueType": { - "$id": "232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "233", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "235", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "237", - "kind": "enumvalue", - "name": "requires_action", - "value": "requires_action", - "valueType": { - "$id": "238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "239", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "241", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "243", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "245", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "247", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - }, - { - "$id": "249", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "231" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "251", - "kind": "enum", - "name": "RunObjectRequiredAction_type", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "253", - "kind": "enumvalue", - "name": "submit_tool_outputs", - "value": "submit_tool_outputs", - "description": "submit_tool_outputs", - "valueType": { - "$ref": "252" - }, - "enumType": { - "$ref": "251" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunObjectRequiredAction_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "254", - "kind": "enum", - "name": "RunToolCallObject_type", - "valueType": { - "$id": "255", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "256", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "255" - }, - "enumType": { - "$ref": "254" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunToolCallObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "257", - "kind": "enum", - "name": "RunObjectLastErrorCode", - "crossLanguageDefinitionId": "RunObject.last_error.code.anonymous", - "valueType": { - "$id": "258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "259", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "261", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - }, - { - "$id": "263", - "kind": "enumvalue", - "name": "invalid_prompt", - "value": "invalid_prompt", - "valueType": { - "$id": "264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "257" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "265", - "kind": "enum", - "name": "RunObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "RunObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "267", - "kind": "enumvalue", - "name": "max_completion_tokens", - "value": "max_completion_tokens", - "valueType": { - "$id": "268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - }, - { - "$id": "269", - "kind": "enumvalue", - "name": "max_prompt_tokens", - "value": "max_prompt_tokens", - "valueType": { - "$id": "270", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "265" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "271", - "kind": "enum", - "name": "CreateRunRequestModel", - "crossLanguageDefinitionId": "CreateRunRequest.model.anonymous", - "valueType": { - "$id": "272", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "273", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "274", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "275", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "277", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "278", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "279", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "280", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "281", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "282", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "283", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "284", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "285", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "287", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "289", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "291", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "292", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "293", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "294", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "295", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "297", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "298", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "299", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "300", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "301", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "303", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "305", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "306", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "307", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "308", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "309", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "311", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "313", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "315", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "316", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - }, - { - "$id": "317", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "271" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "319", - "kind": "enum", - "name": "ListRunsRequestOrder", - "crossLanguageDefinitionId": "listRuns.RequestOrder.anonymous", - "valueType": { - "$id": "320", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "321", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "322", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - }, - { - "$id": "323", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "319" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "325", - "kind": "enum", - "name": "ListRunsResponse_object", - "valueType": { - "$id": "326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "327", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "326" - }, - "enumType": { - "$ref": "325" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "328", - "kind": "enum", - "name": "ListRunStepsRequestOrder", - "crossLanguageDefinitionId": "listRunSteps.RequestOrder.anonymous", - "valueType": { - "$id": "329", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "330", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - }, - { - "$id": "332", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "333", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "328" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "334", - "kind": "enum", - "name": "ListRunStepsResponse_object", - "valueType": { - "$id": "335", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "336", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "335" - }, - "enumType": { - "$ref": "334" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListRunStepsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "337", - "kind": "enum", - "name": "RunStepObject_object", - "valueType": { - "$id": "338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "339", - "kind": "enumvalue", - "name": "thread.run.step", - "value": "thread.run.step", - "description": "thread.run.step", - "valueType": { - "$ref": "338" - }, - "enumType": { - "$ref": "337" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "340", - "kind": "enum", - "name": "RunStepObjectType", - "crossLanguageDefinitionId": "RunStepObject.type.anonymous", - "valueType": { - "$id": "341", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "342", - "kind": "enumvalue", - "name": "message_creation", - "value": "message_creation", - "valueType": { - "$id": "343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - }, - { - "$id": "344", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "345", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "340" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "346", - "kind": "enum", - "name": "RunStepObjectStatus", - "crossLanguageDefinitionId": "RunStepObject.status.anonymous", - "valueType": { - "$id": "347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "348", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "350", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "351", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "352", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "353", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "354", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "355", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - }, - { - "$id": "356", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "346" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "358", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "valueType": { - "$id": "359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "360", - "kind": "enumvalue", - "name": "default_2024_08_21", - "value": "default_2024_08_21", - "description": "default_2024_08_21", - "valueType": { - "$ref": "359" - }, - "enumType": { - "$ref": "358" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchRankingOptionsObject_ranker", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "361", - "kind": "enum", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "valueType": { - "$id": "362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "363", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "362" - }, - "enumType": { - "$ref": "361" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDetailsToolCallsFileSearchResultObjectContent_type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "364", - "kind": "enum", - "name": "RunStepObjectLastErrorCode", - "crossLanguageDefinitionId": "RunStepObject.last_error.code.anonymous", - "valueType": { - "$id": "365", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "366", - "kind": "enumvalue", - "name": "server_error", - "value": "server_error", - "valueType": { - "$id": "367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - }, - { - "$id": "368", - "kind": "enumvalue", - "name": "rate_limit_exceeded", - "value": "rate_limit_exceeded", - "valueType": { - "$id": "369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "364" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "370", - "kind": "enum", - "name": "ThreadObject_object", - "valueType": { - "$id": "371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "372", - "kind": "enumvalue", - "name": "thread", - "value": "thread", - "description": "thread", - "valueType": { - "$ref": "371" - }, - "enumType": { - "$ref": "370" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ThreadObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "373", - "kind": "enum", - "name": "DeleteThreadResponse_object", - "valueType": { - "$id": "374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "375", - "kind": "enumvalue", - "name": "thread.deleted", - "value": "thread.deleted", - "description": "thread.deleted", - "valueType": { - "$ref": "374" - }, - "enumType": { - "$ref": "373" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteThreadResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "376", - "kind": "enum", - "name": "RealtimeRequestCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommandType", - "valueType": { - "$id": "377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "378", - "kind": "enumvalue", - "name": "session_update", - "value": "session.update", - "valueType": { - "$id": "379", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "380", - "kind": "enumvalue", - "name": "input_audio_buffer_append", - "value": "input_audio_buffer.append", - "valueType": { - "$id": "381", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "382", - "kind": "enumvalue", - "name": "input_audio_buffer_commit", - "value": "input_audio_buffer.commit", - "valueType": { - "$id": "383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "384", - "kind": "enumvalue", - "name": "input_audio_buffer_clear", - "value": "input_audio_buffer.clear", - "valueType": { - "$id": "385", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "386", - "kind": "enumvalue", - "name": "item_create", - "value": "conversation.item.create", - "valueType": { - "$id": "387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "388", - "kind": "enumvalue", - "name": "item_delete", - "value": "conversation.item.delete", - "valueType": { - "$id": "389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "390", - "kind": "enumvalue", - "name": "item_truncate", - "value": "conversation.item.truncate", - "valueType": { - "$id": "391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "392", - "kind": "enumvalue", - "name": "response_create", - "value": "response.create", - "valueType": { - "$id": "393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - }, - { - "$id": "394", - "kind": "enumvalue", - "name": "response_cancel", - "value": "response.cancel", - "valueType": { - "$id": "395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "376" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "396", - "kind": "enum", - "name": "RealtimeRequestModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestModel", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "398", - "kind": "enumvalue", - "name": "gpt_4o_realtime", - "value": "gpt-4o-realtime", - "valueType": { - "$id": "399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "396" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "400", - "kind": "enum", - "name": "RealtimeRequestSessionUpdateCommandSessionModality", - "crossLanguageDefinitionId": "RealtimeRequestSessionUpdateCommand.session.modality.anonymous", - "valueType": { - "$id": "401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "402", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - }, - { - "$id": "404", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "400" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "406", - "kind": "enum", - "name": "RealtimeVoice", - "crossLanguageDefinitionId": "OpenAI.RealtimeVoice", - "valueType": { - "$id": "407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "408", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "410", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "411", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - }, - { - "$id": "412", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "413", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "406" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "414", - "kind": "enum", - "name": "RealtimeAudioFormat", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioFormat", - "valueType": { - "$id": "415", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "416", - "kind": "enumvalue", - "name": "pcm16", - "value": "pcm16", - "valueType": { - "$id": "417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "418", - "kind": "enumvalue", - "name": "g711_ulaw", - "value": "g711_ulaw", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - }, - { - "$id": "420", - "kind": "enumvalue", - "name": "g711_alaw", - "value": "g711_alaw", - "valueType": { - "$id": "421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "414" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "422", - "kind": "enum", - "name": "RealtimeAudioInputTranscriptionModel", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionModel", - "valueType": { - "$id": "423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "424", - "kind": "enumvalue", - "name": "whisper_1", - "value": "whisper-1", - "valueType": { - "$id": "425", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "422" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "426", - "kind": "enum", - "name": "RealtimeTurnDetectionType", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetectionType", - "valueType": { - "$id": "427", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "428", - "kind": "enumvalue", - "name": "server_vad", - "value": "server_vad", - "valueType": { - "$id": "429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "426" - }, - "description": "Indicates that server-side voice activity detection (VAD) should be enabled, allowing the server to determine when\nadd_user_audio commands present ends of speech and should be automatically committed.\n\nThe API will also detect when the user begins talking, sending a generation_canceled command.", - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "430", - "kind": "enum", - "name": "RealtimeToolType", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolType", - "valueType": { - "$id": "431", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "432", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "430" - }, - "decorators": [] - } - ], - "description": "The supported tool type discriminators for realtime tools.\nCurrently, only 'function' tools are supported.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "434", - "kind": "enum", - "name": "RealtimeToolChoiceLiteral", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceLiteral", - "valueType": { - "$id": "435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "436", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should freely determine which tool or tools, if any, to call.", - "decorators": [] - }, - { - "$id": "438", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "439", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call no tools whatsoever.", - "decorators": [] - }, - { - "$id": "440", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "441", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "434" - }, - "description": "Specifies that the model should call at least one tool.", - "decorators": [] - } - ], - "description": "The available set of mode-level, string literal tool_choice options for the realtime endpoint.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "442", - "kind": "enum", - "name": "RealtimeItemType", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemType", - "valueType": { - "$id": "443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "444", - "kind": "enumvalue", - "name": "message", - "value": "message", - "valueType": { - "$id": "445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "446", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "447", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - }, - { - "$id": "448", - "kind": "enumvalue", - "name": "function_call_output", - "value": "function_call_output", - "valueType": { - "$id": "449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "442" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "450", - "kind": "enum", - "name": "RealtimeMessageRole", - "crossLanguageDefinitionId": "OpenAI.RealtimeMessageRole", - "valueType": { - "$id": "451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "452", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "454", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "455", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - }, - { - "$id": "456", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "450" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "458", - "kind": "enum", - "name": "RealtimeItemStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeItemStatus", - "valueType": { - "$id": "459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "460", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "462", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - }, - { - "$id": "464", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "458" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "466", - "kind": "enum", - "name": "RealtimeContentPartType", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPartType", - "valueType": { - "$id": "467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "468", - "kind": "enumvalue", - "name": "input_text", - "value": "input_text", - "valueType": { - "$id": "469", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "470", - "kind": "enumvalue", - "name": "input_audio", - "value": "input_audio", - "valueType": { - "$id": "471", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "472", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - }, - { - "$id": "474", - "kind": "enumvalue", - "name": "audio", - "value": "audio", - "valueType": { - "$id": "475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "466" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "476", - "kind": "enum", - "name": "RealtimeResponseCommandType", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommandType", - "valueType": { - "$id": "477", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "478", - "kind": "enumvalue", - "name": "session_created", - "value": "session.created", - "valueType": { - "$id": "479", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "480", - "kind": "enumvalue", - "name": "session_updated", - "value": "session.updated", - "valueType": { - "$id": "481", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "482", - "kind": "enumvalue", - "name": "item_created", - "value": "conversation.item.created", - "valueType": { - "$id": "483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "484", - "kind": "enumvalue", - "name": "item_deleted", - "value": "conversation.item.deleted", - "valueType": { - "$id": "485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "486", - "kind": "enumvalue", - "name": "item_truncated", - "value": "conversation.item.truncated", - "valueType": { - "$id": "487", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "488", - "kind": "enumvalue", - "name": "response_created", - "value": "response.created", - "valueType": { - "$id": "489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "490", - "kind": "enumvalue", - "name": "response_done", - "value": "response.done", - "valueType": { - "$id": "491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "492", - "kind": "enumvalue", - "name": "rate_limits_updated", - "value": "rate_limits.updated", - "valueType": { - "$id": "493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "494", - "kind": "enumvalue", - "name": "response_output_item_added", - "value": "response.output_item.added", - "valueType": { - "$id": "495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "496", - "kind": "enumvalue", - "name": "response_output_item_done", - "value": "response.output_item.done", - "valueType": { - "$id": "497", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "498", - "kind": "enumvalue", - "name": "response_content_part_added", - "value": "response.content_part.added", - "valueType": { - "$id": "499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "500", - "kind": "enumvalue", - "name": "response_content_part_done", - "value": "response.content_part.done", - "valueType": { - "$id": "501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "502", - "kind": "enumvalue", - "name": "response_audio_delta", - "value": "response.audio.delta", - "valueType": { - "$id": "503", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "504", - "kind": "enumvalue", - "name": "response_audio_done", - "value": "response.audio.done", - "valueType": { - "$id": "505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "506", - "kind": "enumvalue", - "name": "response_audio_transcript_delta", - "value": "response.audio_transcript.delta", - "valueType": { - "$id": "507", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "508", - "kind": "enumvalue", - "name": "response_audio_transcript_done", - "value": "response.audio_transcript.done", - "valueType": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "510", - "kind": "enumvalue", - "name": "response_text_delta", - "value": "response.text.delta", - "valueType": { - "$id": "511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "512", - "kind": "enumvalue", - "name": "response_text_done", - "value": "response.text.done", - "valueType": { - "$id": "513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "514", - "kind": "enumvalue", - "name": "response_function_call_arguments_delta", - "value": "response.function_call_arguments.delta", - "valueType": { - "$id": "515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "516", - "kind": "enumvalue", - "name": "response_function_call_arguments_done", - "value": "response.function_call_arguments.done", - "valueType": { - "$id": "517", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "518", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_started", - "value": "input_audio_buffer.speech_started", - "valueType": { - "$id": "519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "520", - "kind": "enumvalue", - "name": "input_audio_buffer_speech_stopped", - "value": "input_audio_buffer.speech_stopped", - "valueType": { - "$id": "521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "522", - "kind": "enumvalue", - "name": "item_input_audio_transcription_completed", - "value": "conversation.item.input_audio_transcription.completed", - "valueType": { - "$id": "523", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "524", - "kind": "enumvalue", - "name": "item_input_audio_transcription_failed", - "value": "conversation.item.input_audio_transcription.failed", - "valueType": { - "$id": "525", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "526", - "kind": "enumvalue", - "name": "input_audio_buffer_committed", - "value": "input_audio_buffer.committed", - "valueType": { - "$id": "527", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "528", - "kind": "enumvalue", - "name": "input_audio_buffer_cleared", - "value": "input_audio_buffer.cleared", - "valueType": { - "$id": "529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - }, - { - "$id": "530", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "476" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "532", - "kind": "enum", - "name": "RealtimeResponseSession_object", - "valueType": { - "$id": "533", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "534", - "kind": "enumvalue", - "name": "realtime.session", - "value": "realtime.session", - "description": "realtime.session", - "valueType": { - "$ref": "533" - }, - "enumType": { - "$ref": "532" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseSession_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "535", - "kind": "enum", - "name": "RealtimeResponseItem_object", - "valueType": { - "$id": "536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "537", - "kind": "enumvalue", - "name": "realtime.item", - "value": "realtime.item", - "description": "realtime.item", - "valueType": { - "$ref": "536" - }, - "enumType": { - "$ref": "535" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponseItem_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "538", - "kind": "enum", - "name": "RealtimeResponse_object", - "valueType": { - "$id": "539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "540", - "kind": "enumvalue", - "name": "realtime.response", - "value": "realtime.response", - "description": "realtime.response", - "valueType": { - "$ref": "539" - }, - "enumType": { - "$ref": "538" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RealtimeResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "541", - "kind": "enum", - "name": "RealtimeResponseStatus", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatus", - "valueType": { - "$id": "542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "543", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "544", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "545", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "546", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "547", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "549", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "550", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - }, - { - "$id": "551", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "552", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "541" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "553", - "kind": "enum", - "name": "RealtimeResponseCancelledStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseCancelledStatusDetails.reason.anonymous", - "valueType": { - "$id": "554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "555", - "kind": "enumvalue", - "name": "turn_detected", - "value": "turn_detected", - "valueType": { - "$id": "556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - }, - { - "$id": "557", - "kind": "enumvalue", - "name": "client_cancelled", - "value": "client_cancelled", - "valueType": { - "$id": "558", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "553" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "559", - "kind": "enum", - "name": "RealtimeResponseIncompleteStatusDetailsReason", - "crossLanguageDefinitionId": "RealtimeResponseIncompleteStatusDetails.reason.anonymous", - "valueType": { - "$id": "560", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "561", - "kind": "enumvalue", - "name": "max_output_tokens", - "value": "max_output_tokens", - "valueType": { - "$id": "562", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - }, - { - "$id": "563", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "564", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "559" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "565", - "kind": "enum", - "name": "CreateModerationRequestModel", - "crossLanguageDefinitionId": "CreateModerationRequest.model.anonymous", - "valueType": { - "$id": "566", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "567", - "kind": "enumvalue", - "name": "text-moderation-latest", - "value": "text-moderation-latest", - "valueType": { - "$id": "568", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - }, - { - "$id": "569", - "kind": "enumvalue", - "name": "text-moderation-stable", - "value": "text-moderation-stable", - "valueType": { - "$id": "570", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "565" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "571", - "kind": "enum", - "name": "ListModelsResponse_object", - "valueType": { - "$id": "572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "573", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "572" - }, - "enumType": { - "$ref": "571" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListModelsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "574", - "kind": "enum", - "name": "Model_object", - "valueType": { - "$id": "575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "576", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "575" - }, - "enumType": { - "$ref": "574" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Model_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "577", - "kind": "enum", - "name": "DeleteModelResponse_object", - "valueType": { - "$id": "578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "579", - "kind": "enumvalue", - "name": "model", - "value": "model", - "description": "model", - "valueType": { - "$ref": "578" - }, - "enumType": { - "$ref": "577" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteModelResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "580", - "kind": "enum", - "name": "MessageObject_object", - "valueType": { - "$id": "581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "582", - "kind": "enumvalue", - "name": "thread.message", - "value": "thread.message", - "description": "thread.message", - "valueType": { - "$ref": "581" - }, - "enumType": { - "$ref": "580" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "583", - "kind": "enum", - "name": "MessageObjectStatus", - "crossLanguageDefinitionId": "MessageObject.status.anonymous", - "valueType": { - "$id": "584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "585", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "587", - "kind": "enumvalue", - "name": "incomplete", - "value": "incomplete", - "valueType": { - "$id": "588", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - }, - { - "$id": "589", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "583" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "591", - "kind": "enum", - "name": "MessageObjectIncompleteDetailsReason", - "crossLanguageDefinitionId": "MessageObject.incomplete_details.reason.anonymous", - "valueType": { - "$id": "592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "593", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "595", - "kind": "enumvalue", - "name": "max_tokens", - "value": "max_tokens", - "valueType": { - "$id": "596", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "597", - "kind": "enumvalue", - "name": "run_cancelled", - "value": "run_cancelled", - "valueType": { - "$id": "598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "599", - "kind": "enumvalue", - "name": "run_expired", - "value": "run_expired", - "valueType": { - "$id": "600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - }, - { - "$id": "601", - "kind": "enumvalue", - "name": "run_failed", - "value": "run_failed", - "valueType": { - "$id": "602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "591" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "603", - "kind": "enum", - "name": "MessageObjectRole", - "crossLanguageDefinitionId": "MessageObject.role.anonymous", - "valueType": { - "$id": "604", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "605", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "606", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - }, - { - "$id": "607", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "603" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "609", - "kind": "enum", - "name": "ListMessagesRequestOrder", - "crossLanguageDefinitionId": "listMessages.RequestOrder.anonymous", - "valueType": { - "$id": "610", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "611", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - }, - { - "$id": "613", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "609" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "615", - "kind": "enum", - "name": "ListMessagesResponse_object", - "valueType": { - "$id": "616", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "617", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "616" - }, - "enumType": { - "$ref": "615" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListMessagesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "618", - "kind": "enum", - "name": "DeleteMessageResponse_object", - "valueType": { - "$id": "619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "620", - "kind": "enumvalue", - "name": "thread.message.deleted", - "value": "thread.message.deleted", - "description": "thread.message.deleted", - "valueType": { - "$ref": "619" - }, - "enumType": { - "$ref": "618" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteMessageResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "621", - "kind": "enum", - "name": "CreateImageRequestModel", - "crossLanguageDefinitionId": "CreateImageRequest.model.anonymous", - "valueType": { - "$id": "622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "623", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - }, - { - "$id": "625", - "kind": "enumvalue", - "name": "dall-e-3", - "value": "dall-e-3", - "valueType": { - "$id": "626", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "621" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "627", - "kind": "enum", - "name": "CreateImageRequestQuality", - "crossLanguageDefinitionId": "CreateImageRequest.quality.anonymous", - "valueType": { - "$id": "628", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "629", - "kind": "enumvalue", - "name": "standard", - "value": "standard", - "valueType": { - "$id": "630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - }, - { - "$id": "631", - "kind": "enumvalue", - "name": "hd", - "value": "hd", - "valueType": { - "$id": "632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "627" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "633", - "kind": "enum", - "name": "CreateImageRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageRequest.response_format.anonymous", - "valueType": { - "$id": "634", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "635", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "636", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - }, - { - "$id": "637", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "633" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "639", - "kind": "enum", - "name": "CreateImageRequestSize", - "crossLanguageDefinitionId": "CreateImageRequest.size.anonymous", - "valueType": { - "$id": "640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "641", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "642", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "643", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "645", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "646", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "647", - "kind": "enumvalue", - "name": "1792x1024", - "value": "1792x1024", - "valueType": { - "$id": "648", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - }, - { - "$id": "649", - "kind": "enumvalue", - "name": "1024x1792", - "value": "1024x1792", - "valueType": { - "$id": "650", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "639" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "651", - "kind": "enum", - "name": "CreateImageRequestStyle", - "crossLanguageDefinitionId": "CreateImageRequest.style.anonymous", - "valueType": { - "$id": "652", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "653", - "kind": "enumvalue", - "name": "vivid", - "value": "vivid", - "valueType": { - "$id": "654", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - }, - { - "$id": "655", - "kind": "enumvalue", - "name": "natural", - "value": "natural", - "valueType": { - "$id": "656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "651" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "657", - "kind": "enum", - "name": "CreateImageEditRequestModel", - "crossLanguageDefinitionId": "CreateImageEditRequest.model.anonymous", - "valueType": { - "$id": "658", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "659", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "660", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "657" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "661", - "kind": "enum", - "name": "CreateImageEditRequestSize", - "crossLanguageDefinitionId": "CreateImageEditRequest.size.anonymous", - "valueType": { - "$id": "662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "663", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "665", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "666", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - }, - { - "$id": "667", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "661" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "669", - "kind": "enum", - "name": "CreateImageEditRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageEditRequest.response_format.anonymous", - "valueType": { - "$id": "670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "671", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "672", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - }, - { - "$id": "673", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "674", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "669" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "675", - "kind": "enum", - "name": "CreateImageVariationRequestModel", - "crossLanguageDefinitionId": "CreateImageVariationRequest.model.anonymous", - "valueType": { - "$id": "676", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "677", - "kind": "enumvalue", - "name": "dall-e-2", - "value": "dall-e-2", - "valueType": { - "$id": "678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "675" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "679", - "kind": "enum", - "name": "CreateImageVariationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateImageVariationRequest.response_format.anonymous", - "valueType": { - "$id": "680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "681", - "kind": "enumvalue", - "name": "url", - "value": "url", - "valueType": { - "$id": "682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - }, - { - "$id": "683", - "kind": "enumvalue", - "name": "b64_json", - "value": "b64_json", - "valueType": { - "$id": "684", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "679" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "685", - "kind": "enum", - "name": "CreateImageVariationRequestSize", - "crossLanguageDefinitionId": "CreateImageVariationRequest.size.anonymous", - "valueType": { - "$id": "686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "687", - "kind": "enumvalue", - "name": "256x256", - "value": "256x256", - "valueType": { - "$id": "688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "689", - "kind": "enumvalue", - "name": "512x512", - "value": "512x512", - "valueType": { - "$id": "690", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - }, - { - "$id": "691", - "kind": "enumvalue", - "name": "1024x1024", - "value": "1024x1024", - "valueType": { - "$id": "692", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "685" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "693", - "kind": "enum", - "name": "CreateFineTuningJobRequestModel", - "crossLanguageDefinitionId": "CreateFineTuningJobRequest.model.anonymous", - "valueType": { - "$id": "694", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "695", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "697", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "698", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "699", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "700", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - }, - { - "$id": "701", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "693" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "703", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "705", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "703" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "707", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "708", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "709", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "710", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "707" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "711", - "kind": "enum", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "712", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "713", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "714", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "711" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "715", - "kind": "enum", - "name": "FineTuningJobHyperparametersNEpochsChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersNEpochsChoiceEnum", - "valueType": { - "$id": "716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "717", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "715" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "719", - "kind": "enum", - "name": "FineTuningJobHyperparametersBatchSizeChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersBatchSizeChoiceEnum", - "valueType": { - "$id": "720", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "721", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "722", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "719" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "723", - "kind": "enum", - "name": "FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum", - "valueType": { - "$id": "724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "725", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "726", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "723" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "727", - "kind": "enum", - "name": "FineTuningJob_object", - "valueType": { - "$id": "728", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "729", - "kind": "enumvalue", - "name": "fine_tuning.job", - "value": "fine_tuning.job", - "description": "fine_tuning.job", - "valueType": { - "$ref": "728" - }, - "enumType": { - "$ref": "727" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJob_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "730", - "kind": "enum", - "name": "FineTuningJobStatus", - "crossLanguageDefinitionId": "FineTuningJob.status.anonymous", - "valueType": { - "$id": "731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "732", - "kind": "enumvalue", - "name": "validating_files", - "value": "validating_files", - "valueType": { - "$id": "733", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "734", - "kind": "enumvalue", - "name": "queued", - "value": "queued", - "valueType": { - "$id": "735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "736", - "kind": "enumvalue", - "name": "running", - "value": "running", - "valueType": { - "$id": "737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "738", - "kind": "enumvalue", - "name": "succeeded", - "value": "succeeded", - "valueType": { - "$id": "739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "740", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "741", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - }, - { - "$id": "742", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "743", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "730" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "744", - "kind": "enum", - "name": "ListPaginatedFineTuningJobsResponse_object", - "valueType": { - "$id": "745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "746", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "745" - }, - "enumType": { - "$ref": "744" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListPaginatedFineTuningJobsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "747", - "kind": "enum", - "name": "FineTuningJobCheckpoint_object", - "valueType": { - "$id": "748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "749", - "kind": "enumvalue", - "name": "fine_tuning.job.checkpoint", - "value": "fine_tuning.job.checkpoint", - "description": "fine_tuning.job.checkpoint", - "valueType": { - "$ref": "748" - }, - "enumType": { - "$ref": "747" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobCheckpoint_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "750", - "kind": "enum", - "name": "ListFineTuningJobCheckpointsResponse_object", - "valueType": { - "$id": "751", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "752", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "751" - }, - "enumType": { - "$ref": "750" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobCheckpointsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "753", - "kind": "enum", - "name": "FineTuningJobEventLevel", - "crossLanguageDefinitionId": "FineTuningJobEvent.level.anonymous", - "valueType": { - "$id": "754", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "755", - "kind": "enumvalue", - "name": "info", - "value": "info", - "valueType": { - "$id": "756", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "757", - "kind": "enumvalue", - "name": "warn", - "value": "warn", - "valueType": { - "$id": "758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - }, - { - "$id": "759", - "kind": "enumvalue", - "name": "error", - "value": "error", - "valueType": { - "$id": "760", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "753" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "761", - "kind": "enum", - "name": "FineTuningJobEvent_object", - "valueType": { - "$id": "762", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "763", - "kind": "enumvalue", - "name": "fine_tuning.job.event", - "value": "fine_tuning.job.event", - "description": "fine_tuning.job.event", - "valueType": { - "$ref": "762" - }, - "enumType": { - "$ref": "761" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The FineTuningJobEvent_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "764", - "kind": "enum", - "name": "ListFineTuningJobEventsResponse_object", - "valueType": { - "$id": "765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "766", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "765" - }, - "enumType": { - "$ref": "764" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFineTuningJobEventsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "767", - "kind": "enum", - "name": "CreateFileRequestPurpose", - "crossLanguageDefinitionId": "CreateFileRequest.purpose.anonymous", - "valueType": { - "$id": "768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "769", - "kind": "enumvalue", - "name": "assistants", - "value": "assistants", - "valueType": { - "$id": "770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "771", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "valueType": { - "$id": "772", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "773", - "kind": "enumvalue", - "name": "fine-tune", - "value": "fine-tune", - "valueType": { - "$id": "774", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - }, - { - "$id": "775", - "kind": "enumvalue", - "name": "vision", - "value": "vision", - "valueType": { - "$id": "776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "767" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "777", - "kind": "enum", - "name": "ListFilesResponse_object", - "valueType": { - "$id": "778", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "779", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "778" - }, - "enumType": { - "$ref": "777" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListFilesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "780", - "kind": "enum", - "name": "DeleteFileResponse_object", - "valueType": { - "$id": "781", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "782", - "kind": "enumvalue", - "name": "file", - "value": "file", - "description": "file", - "valueType": { - "$ref": "781" - }, - "enumType": { - "$ref": "780" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteFileResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "783", - "kind": "enum", - "name": "CreateEmbeddingRequestModel", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.model.anonymous", - "valueType": { - "$id": "784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "785", - "kind": "enumvalue", - "name": "text-embedding-ada-002", - "value": "text-embedding-ada-002", - "valueType": { - "$id": "786", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "787", - "kind": "enumvalue", - "name": "text-embedding-3-small", - "value": "text-embedding-3-small", - "valueType": { - "$id": "788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - }, - { - "$id": "789", - "kind": "enumvalue", - "name": "text-embedding-3-large", - "value": "text-embedding-3-large", - "valueType": { - "$id": "790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "783" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "791", - "kind": "enum", - "name": "CreateEmbeddingRequestEncodingFormat", - "crossLanguageDefinitionId": "CreateEmbeddingRequest.encoding_format.anonymous", - "valueType": { - "$id": "792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "793", - "kind": "enumvalue", - "name": "float", - "value": "float", - "valueType": { - "$id": "794", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - }, - { - "$id": "795", - "kind": "enumvalue", - "name": "base64", - "value": "base64", - "valueType": { - "$id": "796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "791" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "797", - "kind": "enum", - "name": "Embedding_object", - "valueType": { - "$id": "798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "799", - "kind": "enumvalue", - "name": "embedding", - "value": "embedding", - "description": "embedding", - "valueType": { - "$ref": "798" - }, - "enumType": { - "$ref": "797" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Embedding_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "800", - "kind": "enum", - "name": "CreateEmbeddingResponse_object", - "valueType": { - "$id": "801", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "802", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "801" - }, - "enumType": { - "$ref": "800" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateEmbeddingResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "803", - "kind": "enum", - "name": "CreateCompletionRequestModel", - "crossLanguageDefinitionId": "CreateCompletionRequest.model.anonymous", - "valueType": { - "$id": "804", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "805", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-instruct", - "value": "gpt-3.5-turbo-instruct", - "valueType": { - "$id": "806", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "807", - "kind": "enumvalue", - "name": "davinci-002", - "value": "davinci-002", - "valueType": { - "$id": "808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - }, - { - "$id": "809", - "kind": "enumvalue", - "name": "babbage-002", - "value": "babbage-002", - "valueType": { - "$id": "810", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "803" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "811", - "kind": "enum", - "name": "CreateCompletionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "813", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "815", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - }, - { - "$id": "817", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "818", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "811" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "819", - "kind": "enum", - "name": "CreateCompletionResponse_object", - "valueType": { - "$id": "820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "821", - "kind": "enumvalue", - "name": "text_completion", - "value": "text_completion", - "description": "text_completion", - "valueType": { - "$ref": "820" - }, - "enumType": { - "$ref": "819" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "822", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartText_type", - "valueType": { - "$id": "823", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "824", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "823" - }, - "enumType": { - "$ref": "822" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartText_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "825", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImage_type", - "valueType": { - "$id": "826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "827", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "826" - }, - "enumType": { - "$ref": "825" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartImage_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "828", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartImageImageUrlDetail", - "crossLanguageDefinitionId": "ChatCompletionRequestMessageContentPartImage.image_url.detail.anonymous", - "valueType": { - "$id": "829", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "830", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "832", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "833", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - }, - { - "$id": "834", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "828" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "836", - "kind": "enum", - "name": "ChatCompletionRequestMessageContentPartRefusal_type", - "valueType": { - "$id": "837", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "838", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "837" - }, - "enumType": { - "$ref": "836" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionRequestMessageContentPartRefusal_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "839", - "kind": "enum", - "name": "ChatCompletionMessageToolCall_type", - "valueType": { - "$id": "840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "841", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "840" - }, - "enumType": { - "$ref": "839" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCall_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "842", - "kind": "enum", - "name": "CreateChatCompletionRequestModel", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.model.anonymous", - "valueType": { - "$id": "843", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "844", - "kind": "enumvalue", - "name": "o1-preview", - "value": "o1-preview", - "valueType": { - "$id": "845", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "846", - "kind": "enumvalue", - "name": "o1-preview-2024-09-12", - "value": "o1-preview-2024-09-12", - "valueType": { - "$id": "847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "848", - "kind": "enumvalue", - "name": "o1-mini", - "value": "o1-mini", - "valueType": { - "$id": "849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "850", - "kind": "enumvalue", - "name": "o1-mini-2024-09-12", - "value": "o1-mini-2024-09-12", - "valueType": { - "$id": "851", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "852", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "853", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "854", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "856", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "858", - "kind": "enumvalue", - "name": "chatgpt-4o-latest", - "value": "chatgpt-4o-latest", - "valueType": { - "$id": "859", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "860", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "862", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "864", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "866", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "867", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "868", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "870", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "872", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "874", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "876", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "878", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "880", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "881", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "882", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "884", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "886", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "888", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "890", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "891", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "892", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0301", - "value": "gpt-3.5-turbo-0301", - "valueType": { - "$id": "893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "894", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "895", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "896", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "897", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "898", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - }, - { - "$id": "900", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "842" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "902", - "kind": "enum", - "name": "CreateChatCompletionRequestServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.service_tier.anonymous", - "valueType": { - "$id": "903", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "904", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - }, - { - "$id": "906", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "902" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "908", - "kind": "enum", - "name": "ChatCompletionTool_type", - "valueType": { - "$id": "909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "910", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "909" - }, - "enumType": { - "$ref": "908" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionTool_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "911", - "kind": "enum", - "name": "CreateChatCompletionRequestToolChoice", - "crossLanguageDefinitionId": "CreateChatCompletionRequest.tool_choice.anonymous", - "valueType": { - "$id": "912", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "913", - "kind": "enumvalue", - "name": "none", - "value": "none", - "valueType": { - "$id": "914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "915", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - }, - { - "$id": "917", - "kind": "enumvalue", - "name": "required", - "value": "required", - "valueType": { - "$id": "918", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "911" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "919", - "kind": "enum", - "name": "ChatCompletionNamedToolChoice_type", - "valueType": { - "$id": "920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "921", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "920" - }, - "enumType": { - "$ref": "919" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionNamedToolChoice_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "922", - "kind": "enum", - "name": "CreateChatCompletionResponseChoiceFinishReason1", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "924", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "926", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "928", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "929", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "930", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - }, - { - "$id": "932", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "922" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "934", - "kind": "enum", - "name": "ChatCompletionResponseMessage_role", - "valueType": { - "$id": "935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "936", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "935" - }, - "enumType": { - "$ref": "934" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionResponseMessage_role", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "937", - "kind": "enum", - "name": "CreateChatCompletionResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionResponse.service_tier.anonymous", - "valueType": { - "$id": "938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "939", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - }, - { - "$id": "941", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "942", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "937" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "943", - "kind": "enum", - "name": "CreateChatCompletionResponse_object", - "valueType": { - "$id": "944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "945", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "944" - }, - "enumType": { - "$ref": "943" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "946", - "kind": "enum", - "name": "CreateBatchRequestEndpoint", - "crossLanguageDefinitionId": "createBatch.Request.endpoint.anonymous", - "valueType": { - "$id": "947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "948", - "kind": "enumvalue", - "name": "/v1/chat/completions", - "value": "/v1/chat/completions", - "valueType": { - "$id": "949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - }, - { - "$id": "950", - "kind": "enumvalue", - "name": "/v1/embeddings", - "value": "/v1/embeddings", - "valueType": { - "$id": "951", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "946" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "952", - "kind": "enum", - "name": "CreateBatchRequest_completion_window", - "valueType": { - "$id": "953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "954", - "kind": "enumvalue", - "name": "24h", - "value": "24h", - "description": "24h", - "valueType": { - "$ref": "953" - }, - "enumType": { - "$ref": "952" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateBatchRequest_completion_window", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "955", - "kind": "enum", - "name": "Batch_object", - "valueType": { - "$id": "956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "957", - "kind": "enumvalue", - "name": "batch", - "value": "batch", - "description": "batch", - "valueType": { - "$ref": "956" - }, - "enumType": { - "$ref": "955" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The Batch_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "958", - "kind": "enum", - "name": "BatchErrors_object", - "valueType": { - "$id": "959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "960", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "959" - }, - "enumType": { - "$ref": "958" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchErrors_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "961", - "kind": "enum", - "name": "BatchStatus", - "crossLanguageDefinitionId": "Batch.status.anonymous", - "valueType": { - "$id": "962", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "963", - "kind": "enumvalue", - "name": "validating", - "value": "validating", - "valueType": { - "$id": "964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "965", - "kind": "enumvalue", - "name": "failed", - "value": "failed", - "valueType": { - "$id": "966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "967", - "kind": "enumvalue", - "name": "in_progress", - "value": "in_progress", - "valueType": { - "$id": "968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "969", - "kind": "enumvalue", - "name": "finalizing", - "value": "finalizing", - "valueType": { - "$id": "970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "971", - "kind": "enumvalue", - "name": "completed", - "value": "completed", - "valueType": { - "$id": "972", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "973", - "kind": "enumvalue", - "name": "expired", - "value": "expired", - "valueType": { - "$id": "974", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "975", - "kind": "enumvalue", - "name": "cancelling", - "value": "cancelling", - "valueType": { - "$id": "976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - }, - { - "$id": "977", - "kind": "enumvalue", - "name": "cancelled", - "value": "cancelled", - "valueType": { - "$id": "978", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "961" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "979", - "kind": "enum", - "name": "ListBatchesResponse_object", - "valueType": { - "$id": "980", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "981", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "980" - }, - "enumType": { - "$ref": "979" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListBatchesResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "982", - "kind": "enum", - "name": "CreateAssistantRequestModel", - "crossLanguageDefinitionId": "CreateAssistantRequest.model.anonymous", - "valueType": { - "$id": "983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "984", - "kind": "enumvalue", - "name": "gpt-4o", - "value": "gpt-4o", - "valueType": { - "$id": "985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "986", - "kind": "enumvalue", - "name": "gpt-4o-2024-08-06", - "value": "gpt-4o-2024-08-06", - "valueType": { - "$id": "987", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "988", - "kind": "enumvalue", - "name": "gpt-4o-2024-05-13", - "value": "gpt-4o-2024-05-13", - "valueType": { - "$id": "989", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "990", - "kind": "enumvalue", - "name": "gpt-4o-mini", - "value": "gpt-4o-mini", - "valueType": { - "$id": "991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "992", - "kind": "enumvalue", - "name": "gpt-4o-mini-2024-07-18", - "value": "gpt-4o-mini-2024-07-18", - "valueType": { - "$id": "993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "994", - "kind": "enumvalue", - "name": "gpt-4-turbo", - "value": "gpt-4-turbo", - "valueType": { - "$id": "995", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "996", - "kind": "enumvalue", - "name": "gpt-4-turbo-2024-04-09", - "value": "gpt-4-turbo-2024-04-09", - "valueType": { - "$id": "997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "998", - "kind": "enumvalue", - "name": "gpt-4-0125-preview", - "value": "gpt-4-0125-preview", - "valueType": { - "$id": "999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1000", - "kind": "enumvalue", - "name": "gpt-4-turbo-preview", - "value": "gpt-4-turbo-preview", - "valueType": { - "$id": "1001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1002", - "kind": "enumvalue", - "name": "gpt-4-1106-preview", - "value": "gpt-4-1106-preview", - "valueType": { - "$id": "1003", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1004", - "kind": "enumvalue", - "name": "gpt-4-vision-preview", - "value": "gpt-4-vision-preview", - "valueType": { - "$id": "1005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1006", - "kind": "enumvalue", - "name": "gpt-4", - "value": "gpt-4", - "valueType": { - "$id": "1007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1008", - "kind": "enumvalue", - "name": "gpt-4-0314", - "value": "gpt-4-0314", - "valueType": { - "$id": "1009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1010", - "kind": "enumvalue", - "name": "gpt-4-0613", - "value": "gpt-4-0613", - "valueType": { - "$id": "1011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1012", - "kind": "enumvalue", - "name": "gpt-4-32k", - "value": "gpt-4-32k", - "valueType": { - "$id": "1013", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1014", - "kind": "enumvalue", - "name": "gpt-4-32k-0314", - "value": "gpt-4-32k-0314", - "valueType": { - "$id": "1015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1016", - "kind": "enumvalue", - "name": "gpt-4-32k-0613", - "value": "gpt-4-32k-0613", - "valueType": { - "$id": "1017", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1018", - "kind": "enumvalue", - "name": "gpt-3.5-turbo", - "value": "gpt-3.5-turbo", - "valueType": { - "$id": "1019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1020", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k", - "value": "gpt-3.5-turbo-16k", - "valueType": { - "$id": "1021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1022", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0613", - "value": "gpt-3.5-turbo-0613", - "valueType": { - "$id": "1023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1024", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-1106", - "value": "gpt-3.5-turbo-1106", - "valueType": { - "$id": "1025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1026", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-0125", - "value": "gpt-3.5-turbo-0125", - "valueType": { - "$id": "1027", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - }, - { - "$id": "1028", - "kind": "enumvalue", - "name": "gpt-3.5-turbo-16k-0613", - "value": "gpt-3.5-turbo-16k-0613", - "valueType": { - "$id": "1029", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "982" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1030", - "kind": "enum", - "name": "AssistantObject_object", - "valueType": { - "$id": "1031", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1032", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "description": "assistant", - "valueType": { - "$ref": "1031" - }, - "enumType": { - "$ref": "1030" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AssistantObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1033", - "kind": "enum", - "name": "ListAssistantsRequestOrder", - "crossLanguageDefinitionId": "listAssistants.RequestOrder.anonymous", - "valueType": { - "$id": "1034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1035", - "kind": "enumvalue", - "name": "asc", - "value": "asc", - "valueType": { - "$id": "1036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - }, - { - "$id": "1037", - "kind": "enumvalue", - "name": "desc", - "value": "desc", - "valueType": { - "$id": "1038", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1033" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1039", - "kind": "enum", - "name": "ListAssistantsResponse_object", - "valueType": { - "$id": "1040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1041", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1040" - }, - "enumType": { - "$ref": "1039" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListAssistantsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1042", - "kind": "enum", - "name": "DeleteAssistantResponse_object", - "valueType": { - "$id": "1043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1044", - "kind": "enumvalue", - "name": "assistant.deleted", - "value": "assistant.deleted", - "description": "assistant.deleted", - "valueType": { - "$ref": "1043" - }, - "enumType": { - "$ref": "1042" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The DeleteAssistantResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1045", - "kind": "enum", - "name": "CreateSpeechRequestModel", - "crossLanguageDefinitionId": "CreateSpeechRequest.model.anonymous", - "valueType": { - "$id": "1046", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1047", - "kind": "enumvalue", - "name": "tts-1", - "value": "tts-1", - "valueType": { - "$id": "1048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - }, - { - "$id": "1049", - "kind": "enumvalue", - "name": "tts-1-hd", - "value": "tts-1-hd", - "valueType": { - "$id": "1050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1045" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1051", - "kind": "enum", - "name": "CreateSpeechRequestVoice", - "crossLanguageDefinitionId": "CreateSpeechRequest.voice.anonymous", - "valueType": { - "$id": "1052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1053", - "kind": "enumvalue", - "name": "alloy", - "value": "alloy", - "valueType": { - "$id": "1054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1055", - "kind": "enumvalue", - "name": "echo", - "value": "echo", - "valueType": { - "$id": "1056", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1057", - "kind": "enumvalue", - "name": "fable", - "value": "fable", - "valueType": { - "$id": "1058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1059", - "kind": "enumvalue", - "name": "onyx", - "value": "onyx", - "valueType": { - "$id": "1060", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1061", - "kind": "enumvalue", - "name": "nova", - "value": "nova", - "valueType": { - "$id": "1062", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - }, - { - "$id": "1063", - "kind": "enumvalue", - "name": "shimmer", - "value": "shimmer", - "valueType": { - "$id": "1064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1051" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1065", - "kind": "enum", - "name": "CreateSpeechRequestResponseFormat", - "crossLanguageDefinitionId": "CreateSpeechRequest.response_format.anonymous", - "valueType": { - "$id": "1066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1067", - "kind": "enumvalue", - "name": "mp3", - "value": "mp3", - "valueType": { - "$id": "1068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1069", - "kind": "enumvalue", - "name": "opus", - "value": "opus", - "valueType": { - "$id": "1070", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1071", - "kind": "enumvalue", - "name": "aac", - "value": "aac", - "valueType": { - "$id": "1072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1073", - "kind": "enumvalue", - "name": "flac", - "value": "flac", - "valueType": { - "$id": "1074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1075", - "kind": "enumvalue", - "name": "wav", - "value": "wav", - "valueType": { - "$id": "1076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - }, - { - "$id": "1077", - "kind": "enumvalue", - "name": "pcm", - "value": "pcm", - "valueType": { - "$id": "1078", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1065" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Json", - "decorators": [] - }, - { - "$id": "1079", - "kind": "enum", - "name": "CreateTranscriptionRequestModel", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.model.anonymous", - "valueType": { - "$id": "1080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1081", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1082", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1079" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1083", - "kind": "enum", - "name": "CreateTranscriptionRequestResponseFormat1", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.response_format.anonymous", - "valueType": { - "$id": "1084", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1085", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1087", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1089", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1091", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - }, - { - "$id": "1093", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1083" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1095", - "kind": "enum", - "name": "CreateTranscriptionRequestTimestampGranularity", - "crossLanguageDefinitionId": "CreateTranscriptionRequest.timestamp_granularity.anonymous", - "valueType": { - "$id": "1096", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1097", - "kind": "enumvalue", - "name": "word", - "value": "word", - "valueType": { - "$id": "1098", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - }, - { - "$id": "1099", - "kind": "enumvalue", - "name": "segment", - "value": "segment", - "valueType": { - "$id": "1100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1095" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1101", - "kind": "enum", - "name": "CreateTranscriptionResponseVerboseJson_task", - "valueType": { - "$id": "1102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1103", - "kind": "enumvalue", - "name": "transcribe", - "value": "transcribe", - "description": "transcribe", - "valueType": { - "$ref": "1102" - }, - "enumType": { - "$ref": "1101" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranscriptionResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1104", - "kind": "enum", - "name": "CreateTranslationRequestModel", - "crossLanguageDefinitionId": "CreateTranslationRequest.model.anonymous", - "valueType": { - "$id": "1105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1106", - "kind": "enumvalue", - "name": "whisper-1", - "value": "whisper-1", - "valueType": { - "$id": "1107", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1104" - }, - "decorators": [] - } - ], - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1108", - "kind": "enum", - "name": "CreateTranslationRequestResponseFormat", - "crossLanguageDefinitionId": "CreateTranslationRequest.response_format.anonymous", - "valueType": { - "$id": "1109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1110", - "kind": "enumvalue", - "name": "json", - "value": "json", - "valueType": { - "$id": "1111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1112", - "kind": "enumvalue", - "name": "text", - "value": "text", - "valueType": { - "$id": "1113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1114", - "kind": "enumvalue", - "name": "srt", - "value": "srt", - "valueType": { - "$id": "1115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1116", - "kind": "enumvalue", - "name": "verbose_json", - "value": "verbose_json", - "valueType": { - "$id": "1117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - }, - { - "$id": "1118", - "kind": "enumvalue", - "name": "vtt", - "value": "vtt", - "valueType": { - "$id": "1119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1108" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1120", - "kind": "enum", - "name": "CreateTranslationResponseVerboseJson_task", - "valueType": { - "$id": "1121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1122", - "kind": "enumvalue", - "name": "translate", - "value": "translate", - "description": "translate", - "valueType": { - "$ref": "1121" - }, - "enumType": { - "$ref": "1120" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateTranslationResponseVerboseJson_task", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "1123", - "kind": "enum", - "name": "BatchRequestInput_method", - "valueType": { - "$id": "1124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1125", - "kind": "enumvalue", - "name": "POST", - "value": "POST", - "description": "POST", - "valueType": { - "$ref": "1124" - }, - "enumType": { - "$ref": "1123" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The BatchRequestInput_method", - "isFixed": false, - "isFlags": false, - "usage": "Input", - "decorators": [] - }, - { - "$id": "1126", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionFunctionResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1127", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1128", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1130", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1132", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1133", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - }, - { - "$id": "1134", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1135", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1126" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1136", - "kind": "enum", - "name": "CreateChatCompletionFunctionResponse_object", - "valueType": { - "$id": "1137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1138", - "kind": "enumvalue", - "name": "chat.completion", - "value": "chat.completion", - "description": "chat.completion", - "valueType": { - "$ref": "1137" - }, - "enumType": { - "$ref": "1136" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionFunctionResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1139", - "kind": "enum", - "name": "ChatCompletionMessageToolCallChunk_type", - "valueType": { - "$id": "1140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1141", - "kind": "enumvalue", - "name": "function", - "value": "function", - "description": "function", - "valueType": { - "$ref": "1140" - }, - "enumType": { - "$ref": "1139" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ChatCompletionMessageToolCallChunk_type", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1142", - "kind": "enum", - "name": "ChatCompletionStreamResponseDeltaRole", - "crossLanguageDefinitionId": "ChatCompletionStreamResponseDelta.role.anonymous", - "valueType": { - "$id": "1143", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1144", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1145", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1146", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1148", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1149", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - }, - { - "$id": "1150", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1142" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1152", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseChoiceFinishReason", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.choice.finish_reason.anonymous", - "valueType": { - "$id": "1153", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1154", - "kind": "enumvalue", - "name": "stop", - "value": "stop", - "valueType": { - "$id": "1155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1156", - "kind": "enumvalue", - "name": "length", - "value": "length", - "valueType": { - "$id": "1157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1158", - "kind": "enumvalue", - "name": "tool_calls", - "value": "tool_calls", - "valueType": { - "$id": "1159", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1160", - "kind": "enumvalue", - "name": "content_filter", - "value": "content_filter", - "valueType": { - "$id": "1161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - }, - { - "$id": "1162", - "kind": "enumvalue", - "name": "function_call", - "value": "function_call", - "valueType": { - "$id": "1163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1152" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1164", - "kind": "enum", - "name": "CreateChatCompletionStreamResponseServiceTier", - "crossLanguageDefinitionId": "CreateChatCompletionStreamResponse.service_tier.anonymous", - "valueType": { - "$id": "1165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1166", - "kind": "enumvalue", - "name": "scale", - "value": "scale", - "valueType": { - "$id": "1167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - }, - { - "$id": "1168", - "kind": "enumvalue", - "name": "default", - "value": "default", - "valueType": { - "$id": "1169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1164" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1170", - "kind": "enum", - "name": "CreateChatCompletionStreamResponse_object", - "valueType": { - "$id": "1171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1172", - "kind": "enumvalue", - "name": "chat.completion.chunk", - "value": "chat.completion.chunk", - "description": "chat.completion.chunk", - "valueType": { - "$ref": "1171" - }, - "enumType": { - "$ref": "1170" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The CreateChatCompletionStreamResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1173", - "kind": "enum", - "name": "MessageDeltaContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1175", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1177", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1178", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - }, - { - "$id": "1179", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1173" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1181", - "kind": "enum", - "name": "MessageDeltaContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageDeltaContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1183", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1185", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1186", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - }, - { - "$id": "1187", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1181" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1189", - "kind": "enum", - "name": "MessageContentImageFileObject_type", - "valueType": { - "$id": "1190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1191", - "kind": "enumvalue", - "name": "image_file", - "value": "image_file", - "description": "image_file", - "valueType": { - "$ref": "1190" - }, - "enumType": { - "$ref": "1189" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageFileObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1192", - "kind": "enum", - "name": "MessageContentImageFileObjectImageFileDetail", - "crossLanguageDefinitionId": "MessageContentImageFileObject.image_file.detail.anonymous", - "valueType": { - "$id": "1193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1194", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1196", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - }, - { - "$id": "1198", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1192" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1200", - "kind": "enum", - "name": "MessageContentTextObject_type", - "valueType": { - "$id": "1201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1202", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1201" - }, - "enumType": { - "$ref": "1200" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1203", - "kind": "enum", - "name": "MessageContentRefusalObject_type", - "valueType": { - "$id": "1204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1205", - "kind": "enumvalue", - "name": "refusal", - "value": "refusal", - "description": "refusal", - "valueType": { - "$ref": "1204" - }, - "enumType": { - "$ref": "1203" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentRefusalObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1206", - "kind": "enum", - "name": "MessageContentImageUrlObject_type", - "valueType": { - "$id": "1207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1208", - "kind": "enumvalue", - "name": "image_url", - "value": "image_url", - "description": "image_url", - "valueType": { - "$ref": "1207" - }, - "enumType": { - "$ref": "1206" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageContentImageUrlObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1209", - "kind": "enum", - "name": "MessageContentImageUrlObjectImageUrlDetail", - "crossLanguageDefinitionId": "MessageContentImageUrlObject.image_url.detail.anonymous", - "valueType": { - "$id": "1210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1211", - "kind": "enumvalue", - "name": "auto", - "value": "auto", - "valueType": { - "$id": "1212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1213", - "kind": "enumvalue", - "name": "low", - "value": "low", - "valueType": { - "$id": "1214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - }, - { - "$id": "1215", - "kind": "enumvalue", - "name": "high", - "value": "high", - "valueType": { - "$id": "1216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1209" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1217", - "kind": "enum", - "name": "MessageDeltaObject_object", - "valueType": { - "$id": "1218", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1219", - "kind": "enumvalue", - "name": "thread.message.delta", - "value": "thread.message.delta", - "description": "thread.message.delta", - "valueType": { - "$ref": "1218" - }, - "enumType": { - "$ref": "1217" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1220", - "kind": "enum", - "name": "MessageDeltaObjectDeltaRole", - "crossLanguageDefinitionId": "MessageDeltaObject.delta.role.anonymous", - "valueType": { - "$id": "1221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1222", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - }, - { - "$id": "1224", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1220" - }, - "decorators": [] - } - ], - "isFixed": true, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1226", - "kind": "enum", - "name": "MessageRequestContentTextObject_type", - "valueType": { - "$id": "1227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1228", - "kind": "enumvalue", - "name": "text", - "value": "text", - "description": "text", - "valueType": { - "$ref": "1227" - }, - "enumType": { - "$ref": "1226" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The MessageRequestContentTextObject_type", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - }, - { - "$id": "1229", - "kind": "enum", - "name": "RunStepDeltaObject_object", - "valueType": { - "$id": "1230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1231", - "kind": "enumvalue", - "name": "thread.run.step.delta", - "value": "thread.run.step.delta", - "description": "thread.run.step.delta", - "valueType": { - "$ref": "1230" - }, - "enumType": { - "$ref": "1229" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The RunStepDeltaObject_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1232", - "kind": "enum", - "name": "ListThreadsResponse_object", - "valueType": { - "$id": "1233", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1234", - "kind": "enumvalue", - "name": "list", - "value": "list", - "description": "list", - "valueType": { - "$ref": "1233" - }, - "enumType": { - "$ref": "1232" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The ListThreadsResponse_object", - "isFixed": false, - "isFlags": false, - "usage": "Output", - "decorators": [] - }, - { - "$id": "1235", - "kind": "enum", - "name": "ChatCompletionRole", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRole", - "valueType": { - "$id": "1236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "1237", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$id": "1238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1239", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$id": "1240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1241", - "kind": "enumvalue", - "name": "assistant", - "value": "assistant", - "valueType": { - "$id": "1242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1243", - "kind": "enumvalue", - "name": "tool", - "value": "tool", - "valueType": { - "$id": "1244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - }, - { - "$id": "1245", - "kind": "enumvalue", - "name": "function", - "value": "function", - "valueType": { - "$id": "1246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "1235" - }, - "decorators": [] - } - ], - "access": "public", - "description": "The role of the author of a message", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output", - "decorators": [] - } - ], - "Models": [ - { - "$id": "1247", - "kind": "model", - "name": "CreateUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1248", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to upload.", - "type": { - "$id": "1249", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.filename" - }, - { - "$id": "1250", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nSee the [documentation on File purposes](/docs/api-reference/files/create#files-create-purpose).", - "type": { - "$ref": "2" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.purpose" - }, - { - "$id": "1251", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The number of bytes in the file you are uploading.", - "type": { - "$id": "1252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.bytes" - }, - { - "$id": "1253", - "kind": "property", - "name": "mime_type", - "serializedName": "mime_type", - "description": "The MIME type of the file.\n\nThis must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.", - "type": { - "$id": "1254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateUploadRequest.mime_type" - } - ] - }, - { - "$id": "1255", - "kind": "model", - "name": "Upload", - "crossLanguageDefinitionId": "OpenAI.Upload", - "usage": "Output,Json", - "description": "The Upload object can accept byte chunks in the form of Parts.", - "decorators": [], - "properties": [ - { - "$id": "1256", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The Upload unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.id" - }, - { - "$id": "1258", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1259", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1260", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.created_at" - }, - { - "$id": "1261", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file to be uploaded.", - "type": { - "$id": "1262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.filename" - }, - { - "$id": "1263", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The intended number of bytes to be uploaded.", - "type": { - "$id": "1264", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.bytes" - }, - { - "$id": "1265", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.", - "type": { - "$id": "1266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.purpose" - }, - { - "$id": "1267", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the Upload.", - "type": { - "$ref": "12" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.status" - }, - { - "$id": "1268", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the Upload was created.", - "type": { - "$id": "1269", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.expires_at" - }, - { - "$id": "1271", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"upload\".", - "type": { - "$id": "1272", - "kind": "constant", - "valueType": { - "$ref": "22" - }, - "value": "upload", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.object" - }, - { - "$id": "1273", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The ready File object after the Upload is completed.", - "type": { - "$id": "1274", - "kind": "nullable", - "type": { - "$id": "1275", - "kind": "model", - "name": "OpenAIFile", - "crossLanguageDefinitionId": "OpenAI.OpenAIFile", - "usage": "Output,Json", - "description": "The `File` object represents a document that has been uploaded to OpenAI.", - "decorators": [], - "properties": [ - { - "$id": "1276", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The file identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "1277", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.id" - }, - { - "$id": "1278", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "The size of the file, in bytes.", - "type": { - "$id": "1279", - "kind": "nullable", - "type": { - "$id": "1280", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.bytes" - }, - { - "$id": "1281", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the file was created.", - "type": { - "$id": "1282", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.created_at" - }, - { - "$id": "1284", - "kind": "property", - "name": "filename", - "serializedName": "filename", - "description": "The name of the file.", - "type": { - "$id": "1285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.filename" - }, - { - "$id": "1286", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `file`.", - "type": { - "$id": "1287", - "kind": "constant", - "valueType": { - "$ref": "25" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.object" - }, - { - "$id": "1288", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.", - "type": { - "$ref": "28" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.purpose" - }, - { - "$id": "1289", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", - "type": { - "$ref": "44" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status" - }, - { - "$id": "1290", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", - "type": { - "$id": "1291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OpenAIFile.status_details" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Upload.file" - } - ] - }, - { - "$ref": "1275" - }, - { - "$id": "1292", - "kind": "model", - "name": "ErrorResponse", - "crossLanguageDefinitionId": "OpenAI.ErrorResponse", - "usage": "Output,Error,Json", - "decorators": [], - "properties": [ - { - "$id": "1293", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "1294", - "kind": "model", - "name": "Error", - "crossLanguageDefinitionId": "OpenAI.Error", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1295", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "1296", - "kind": "nullable", - "type": { - "$id": "1297", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.code" - }, - { - "$id": "1298", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "1299", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.message" - }, - { - "$id": "1300", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "1301", - "kind": "nullable", - "type": { - "$id": "1302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.param" - }, - { - "$id": "1303", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Error.type" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ErrorResponse.error" - } - ] - }, - { - "$ref": "1294" - }, - { - "$id": "1305", - "kind": "model", - "name": "AddUploadPartRequest", - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "1306", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The chunk of bytes for this Part.", - "type": { - "$id": "1307", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AddUploadPartRequest.data" - } - ] - }, - { - "$id": "1308", - "kind": "model", - "name": "UploadPart", - "crossLanguageDefinitionId": "OpenAI.UploadPart", - "usage": "Output,Json", - "description": "The upload Part represents a chunk of bytes we can add to an Upload object.", - "decorators": [], - "properties": [ - { - "$id": "1309", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The upload Part unique identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1310", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.id" - }, - { - "$id": "1311", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the Part was created.", - "type": { - "$id": "1312", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1313", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.created_at" - }, - { - "$id": "1314", - "kind": "property", - "name": "upload_id", - "serializedName": "upload_id", - "description": "The ID of the Upload object that this Part was added to.", - "type": { - "$id": "1315", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.upload_id" - }, - { - "$id": "1316", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `upload.part`.", - "type": { - "$id": "1317", - "kind": "constant", - "valueType": { - "$ref": "52" - }, - "value": "upload.part", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UploadPart.object" - } - ] - }, - { - "$id": "1318", - "kind": "model", - "name": "CompleteUploadRequest", - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1319", - "kind": "property", - "name": "part_ids", - "serializedName": "part_ids", - "description": "The ordered list of Part IDs.", - "type": { - "$id": "1320", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.part_ids" - }, - { - "$id": "1322", - "kind": "property", - "name": "md5", - "serializedName": "md5", - "description": "The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.", - "type": { - "$id": "1323", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompleteUploadRequest.md5" - } - ] - }, - { - "$id": "1324", - "kind": "model", - "name": "ListVectorStoresResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1326", - "kind": "constant", - "valueType": { - "$ref": "61" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.object" - }, - { - "$id": "1327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1328", - "kind": "array", - "name": "ArrayVectorStoreObject", - "valueType": { - "$id": "1329", - "kind": "model", - "name": "VectorStoreObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject", - "usage": "Output,Json", - "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", - "decorators": [], - "properties": [ - { - "$id": "1330", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.id" - }, - { - "$id": "1332", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store`.", - "type": { - "$id": "1333", - "kind": "constant", - "valueType": { - "$ref": "64" - }, - "value": "vector_store", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.object" - }, - { - "$id": "1334", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store was created.", - "type": { - "$id": "1335", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1336", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.created_at" - }, - { - "$id": "1337", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.name" - }, - { - "$id": "1339", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total number of bytes used by the files in the vector store.", - "type": { - "$id": "1340", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.usage_bytes" - }, - { - "$id": "1341", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1342", - "kind": "model", - "name": "VectorStoreObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1343", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1344", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1345", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been successfully processed.", - "type": { - "$id": "1346", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.completed" - }, - { - "$id": "1347", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1348", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.failed" - }, - { - "$id": "1349", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that were cancelled.", - "type": { - "$id": "1350", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1351", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1352", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.file_counts" - }, - { - "$id": "1353", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", - "type": { - "$ref": "67" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.status" - }, - { - "$id": "1354", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1355", - "kind": "model", - "name": "VectorStoreExpirationAfter", - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter", - "usage": "Input,Output,Json", - "description": "The expiration policy for a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1356", - "kind": "property", - "name": "anchor", - "serializedName": "anchor", - "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", - "type": { - "$id": "1357", - "kind": "constant", - "valueType": { - "$ref": "75" - }, - "value": "last_active_at", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.anchor" - }, - { - "$id": "1358", - "kind": "property", - "name": "days", - "serializedName": "days", - "description": "The number of days after the anchor time that the vector store will expire.", - "type": { - "$id": "1359", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreExpirationAfter.days" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_after" - }, - { - "$id": "1360", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the vector store will expire.", - "type": { - "$id": "1361", - "kind": "nullable", - "type": { - "$id": "1362", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1363", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.expires_at" - }, - { - "$id": "1364", - "kind": "property", - "name": "last_active_at", - "serializedName": "last_active_at", - "description": "The Unix timestamp (in seconds) for when the vector store was last active.", - "type": { - "$id": "1365", - "kind": "nullable", - "type": { - "$id": "1366", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1367", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.last_active_at" - }, - { - "$id": "1368", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1369", - "kind": "nullable", - "type": { - "$id": "1370", - "kind": "dict", - "keyType": { - "$id": "1371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1372", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreObject.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.data" - }, - { - "$id": "1373", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.first_id" - }, - { - "$id": "1375", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1376", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.last_id" - }, - { - "$id": "1377", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1378", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoresResponse.has_more" - } - ] - }, - { - "$ref": "1329" - }, - { - "$ref": "1342" - }, - { - "$ref": "1355" - }, - { - "$id": "1379", - "kind": "model", - "name": "CreateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1380", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1381", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.file_ids" - }, - { - "$id": "1383", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1384", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.name" - }, - { - "$id": "1385", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$ref": "1355" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.expires_after" - }, - { - "$id": "1386", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1387", - "kind": "union", - "name": "CreateVectorStoreRequestChunkingStrategy", - "variantTypes": [ - { - "$id": "1388", - "kind": "model", - "name": "AutoChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam", - "usage": "Input,Json", - "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$id": "1389", - "kind": "model", - "name": "FileChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1390", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1391", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyRequestParam.type" - }, - "properties": [ - { - "$ref": "1390" - } - ], - "discriminatedSubtypes": { - "$id": "1392", - "auto": { - "$ref": "1388" - }, - "static": { - "$id": "1393", - "kind": "model", - "name": "StaticChunkingStrategyRequestParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam", - "usage": "Input,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$ref": "1389" - }, - "properties": [ - { - "$id": "1394", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1395", - "kind": "constant", - "valueType": { - "$id": "1396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.type" - }, - { - "$id": "1397", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$id": "1398", - "kind": "model", - "name": "StaticChunkingStrategy", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1399", - "kind": "property", - "name": "max_chunk_size_tokens", - "serializedName": "max_chunk_size_tokens", - "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.", - "type": { - "$id": "1400", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.max_chunk_size_tokens" - }, - { - "$id": "1401", - "kind": "property", - "name": "chunk_overlap_tokens", - "serializedName": "chunk_overlap_tokens", - "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.", - "type": { - "$id": "1402", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategy.chunk_overlap_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyRequestParam.static" - } - ] - } - } - }, - "properties": [ - { - "$id": "1403", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `auto`.", - "type": { - "$id": "1404", - "kind": "constant", - "valueType": { - "$id": "1405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyRequestParam.type" - } - ] - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.chunking_strategy" - }, - { - "$id": "1406", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1407", - "kind": "nullable", - "type": { - "$id": "1408", - "kind": "dict", - "keyType": { - "$id": "1409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreRequest.metadata" - } - ] - }, - { - "$ref": "1388" - }, - { - "$ref": "1389" - }, - { - "$ref": "1393" - }, - { - "$ref": "1398" - }, - { - "$id": "1411", - "kind": "model", - "name": "UpdateVectorStoreRequest", - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1412", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the vector store.", - "type": { - "$id": "1413", - "kind": "nullable", - "type": { - "$id": "1414", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.name" - }, - { - "$id": "1415", - "kind": "property", - "name": "expires_after", - "serializedName": "expires_after", - "type": { - "$id": "1416", - "kind": "nullable", - "type": { - "$ref": "1355" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.expires_after" - }, - { - "$id": "1417", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1418", - "kind": "nullable", - "type": { - "$id": "1419", - "kind": "dict", - "keyType": { - "$id": "1420", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1421", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.UpdateVectorStoreRequest.metadata" - } - ] - }, - { - "$id": "1422", - "kind": "model", - "name": "DeleteVectorStoreResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1423", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.id" - }, - { - "$id": "1425", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1426", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.deleted" - }, - { - "$id": "1427", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1428", - "kind": "constant", - "valueType": { - "$ref": "78" - }, - "value": "vector_store.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreResponse.object" - } - ] - }, - { - "$id": "1429", - "kind": "model", - "name": "ListVectorStoreFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1430", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1431", - "kind": "constant", - "valueType": { - "$ref": "97" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.object" - }, - { - "$id": "1432", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1433", - "kind": "array", - "name": "ArrayVectorStoreFileObject", - "valueType": { - "$id": "1434", - "kind": "model", - "name": "VectorStoreFileObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject", - "usage": "Output,Json", - "description": "A list of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1435", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1436", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.id" - }, - { - "$id": "1437", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file`.", - "type": { - "$id": "1438", - "kind": "constant", - "valueType": { - "$ref": "100" - }, - "value": "vector_store.file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.object" - }, - { - "$id": "1439", - "kind": "property", - "name": "usage_bytes", - "serializedName": "usage_bytes", - "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", - "type": { - "$id": "1440", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.usage_bytes" - }, - { - "$id": "1441", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store file was created.", - "type": { - "$id": "1442", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1443", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.created_at" - }, - { - "$id": "1444", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.vector_store_id" - }, - { - "$id": "1446", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.", - "type": { - "$ref": "103" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.status" - }, - { - "$id": "1447", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", - "type": { - "$id": "1448", - "kind": "nullable", - "type": { - "$id": "1449", - "kind": "model", - "name": "VectorStoreFileObjectLastError", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1450", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "113" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.code" - }, - { - "$id": "1451", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1452", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.last_error" - }, - { - "$id": "1453", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The strategy used to chunk the file.", - "type": { - "$id": "1454", - "kind": "union", - "name": "VectorStoreFileObjectChunkingStrategy", - "variantTypes": [ - { - "$id": "1455", - "kind": "model", - "name": "StaticChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "discriminatorValue": "static", - "decorators": [], - "baseModel": { - "$id": "1456", - "kind": "model", - "name": "FileChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1457", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1458", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileChunkingStrategyResponseParam.type" - }, - "properties": [ - { - "$ref": "1457" - } - ], - "discriminatedSubtypes": { - "$id": "1459", - "static": { - "$ref": "1455" - }, - "other": { - "$id": "1460", - "kind": "model", - "name": "OtherChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam", - "usage": "Input,Output,Json", - "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", - "discriminatorValue": "other", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1461", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `other`.", - "type": { - "$id": "1462", - "kind": "constant", - "valueType": { - "$id": "1463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "other", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OtherChunkingStrategyResponseParam.type" - } - ] - }, - "auto": { - "$id": "1464", - "kind": "model", - "name": "AutoChunkingStrategyResponseParam", - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam", - "access": "public", - "usage": "Input,Output", - "discriminatorValue": "auto", - "decorators": [], - "baseModel": { - "$ref": "1456" - }, - "properties": [ - { - "$id": "1465", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1466", - "kind": "constant", - "valueType": { - "$id": "1467", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AutoChunkingStrategyResponseParam.type" - } - ] - } - } - }, - "properties": [ - { - "$id": "1468", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `static`.", - "type": { - "$id": "1469", - "kind": "constant", - "valueType": { - "$id": "1470", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "static", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.type" - }, - { - "$id": "1471", - "kind": "property", - "name": "static", - "serializedName": "static", - "type": { - "$ref": "1398" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.StaticChunkingStrategyResponseParam.static" - } - ] - }, - { - "$ref": "1460" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileObject.chunking_strategy" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.data" - }, - { - "$id": "1472", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.first_id" - }, - { - "$id": "1474", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.last_id" - }, - { - "$id": "1476", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1477", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListVectorStoreFilesResponse.has_more" - } - ] - }, - { - "$ref": "1434" - }, - { - "$ref": "1449" - }, - { - "$ref": "1455" - }, - { - "$ref": "1456" - }, - { - "$ref": "1460" - }, - { - "$ref": "1464" - }, - { - "$id": "1478", - "kind": "model", - "name": "CreateVectorStoreFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1479", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1480", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.file_id" - }, - { - "$id": "1481", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1482", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileRequest.chunking_strategy" - } - ] - }, - { - "$id": "1483", - "kind": "model", - "name": "DeleteVectorStoreFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1484", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "1485", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.id" - }, - { - "$id": "1486", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "1487", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.deleted" - }, - { - "$id": "1488", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1489", - "kind": "constant", - "valueType": { - "$ref": "121" - }, - "value": "vector_store.file.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteVectorStoreFileResponse.object" - } - ] - }, - { - "$id": "1490", - "kind": "model", - "name": "CreateVectorStoreFileBatchRequest", - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1491", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.", - "type": { - "$id": "1492", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.file_ids" - }, - { - "$id": "1494", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "type": { - "$id": "1495", - "kind": "union", - "name": "ChunkingStrategyRequestParam", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateVectorStoreFileBatchRequest.chunking_strategy" - } - ] - }, - { - "$id": "1496", - "kind": "model", - "name": "VectorStoreFileBatchObject", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject", - "usage": "Output,Json", - "description": "A batch of files attached to a vector store.", - "decorators": [], - "properties": [ - { - "$id": "1497", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.id" - }, - { - "$id": "1499", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `vector_store.file_batch`.", - "type": { - "$id": "1500", - "kind": "constant", - "valueType": { - "$ref": "124" - }, - "value": "vector_store.files_batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.object" - }, - { - "$id": "1501", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", - "type": { - "$id": "1502", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1503", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.created_at" - }, - { - "$id": "1504", - "kind": "property", - "name": "vector_store_id", - "serializedName": "vector_store_id", - "description": "The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.", - "type": { - "$id": "1505", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.vector_store_id" - }, - { - "$id": "1506", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.", - "type": { - "$ref": "127" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.status" - }, - { - "$id": "1507", - "kind": "property", - "name": "file_counts", - "serializedName": "file_counts", - "type": { - "$id": "1508", - "kind": "model", - "name": "VectorStoreFileBatchObjectFileCounts", - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1509", - "kind": "property", - "name": "in_progress", - "serializedName": "in_progress", - "description": "The number of files that are currently being processed.", - "type": { - "$id": "1510", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.in_progress" - }, - { - "$id": "1511", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "The number of files that have been processed.", - "type": { - "$id": "1512", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.completed" - }, - { - "$id": "1513", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "The number of files that have failed to process.", - "type": { - "$id": "1514", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.failed" - }, - { - "$id": "1515", - "kind": "property", - "name": "cancelled", - "serializedName": "cancelled", - "description": "The number of files that where cancelled.", - "type": { - "$id": "1516", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.cancelled" - }, - { - "$id": "1517", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "The total number of files.", - "type": { - "$id": "1518", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts.anonymous.total" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.VectorStoreFileBatchObject.file_counts" - } - ] - }, - { - "$ref": "1508" - }, - { - "$id": "1519", - "kind": "model", - "name": "CreateThreadAndRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1520", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1521", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.assistant_id" - }, - { - "$id": "1522", - "kind": "property", - "name": "thread", - "serializedName": "thread", - "description": "If no thread is provided, an empty thread will be created.", - "type": { - "$id": "1523", - "kind": "model", - "name": "CreateThreadRequest", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1524", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", - "type": { - "$id": "1525", - "kind": "array", - "name": "ArrayCreateMessageRequest", - "valueType": { - "$id": "1526", - "kind": "model", - "name": "CreateMessageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1527", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.", - "type": { - "$ref": "143" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.role" - }, - { - "$id": "1528", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "1529", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$id": "1530", - "kind": "model", - "name": "MessageContent", - "crossLanguageDefinitionId": "OpenAI.MessageContent", - "access": "public", - "usage": "Input,Output,Json", - "description": "Represents a single piece of content in an Assistants API message.", - "decorators": [], - "properties": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.content" - }, - { - "$id": "1531", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they should be added to.", - "type": { - "$id": "1532", - "kind": "nullable", - "type": { - "$id": "1533", - "kind": "array", - "name": "CreateMessageRequestAttachments", - "valueType": { - "$id": "1534", - "kind": "model", - "name": "CreateMessageRequestAttachment", - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1535", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "1536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.file_id" - }, - { - "$id": "1537", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "1538", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1539", - "kind": "union", - "name": "CreateMessageRequestAttachmentTool", - "variantTypes": [ - { - "$id": "1540", - "kind": "model", - "name": "AssistantToolsCode", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode", - "usage": "Input,Output,Json", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$id": "1541", - "kind": "model", - "name": "AssistantToolDefinition", - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1542", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1543", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolDefinition.type" - }, - "properties": [ - { - "$ref": "1542" - } - ], - "discriminatedSubtypes": { - "$id": "1544", - "code_interpreter": { - "$ref": "1540" - }, - "file_search": { - "$id": "1545", - "kind": "model", - "name": "AssistantToolsFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch", - "usage": "Input,Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1546", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1547", - "kind": "constant", - "valueType": { - "$id": "1548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.type" - }, - { - "$id": "1549", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "Overrides for the file search tool.", - "type": { - "$id": "1550", - "kind": "model", - "name": "AssistantToolsFileSearchFileSearch", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1551", - "kind": "property", - "name": "max_num_results", - "serializedName": "max_num_results", - "description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "type": { - "$id": "1552", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.max_num_results" - }, - { - "$id": "1553", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1554", - "kind": "model", - "name": "FileSearchRankingOptions", - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions", - "usage": "Input,Output,Json", - "description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.", - "decorators": [], - "properties": [ - { - "$id": "1555", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker to use for the file search. If not specified will use the `auto` ranker.", - "type": { - "$ref": "149" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.ranker" - }, - { - "$id": "1556", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1557", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FileSearchRankingOptions.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search.anonymous.ranking_options" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearch.file_search" - } - ] - }, - "function": { - "$id": "1558", - "kind": "model", - "name": "AssistantToolsFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction", - "usage": "Input,Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1541" - }, - "properties": [ - { - "$id": "1559", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `function`", - "type": { - "$id": "1560", - "kind": "constant", - "valueType": { - "$id": "1561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.type" - }, - { - "$id": "1562", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1563", - "kind": "model", - "name": "FunctionObject", - "crossLanguageDefinitionId": "OpenAI.FunctionObject", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1564", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "1565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.description" - }, - { - "$id": "1566", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.name" - }, - { - "$id": "1568", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "1569", - "kind": "model", - "name": "FunctionParameters", - "crossLanguageDefinitionId": "OpenAI.FunctionParameters", - "usage": "Input,Output,Json", - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.", - "decorators": [], - "additionalProperties": { - "$id": "1570", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.parameters" - }, - { - "$id": "1571", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).", - "type": { - "$id": "1572", - "kind": "nullable", - "type": { - "$id": "1573", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FunctionObject.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFunction.function" - } - ] - } - } - }, - "properties": [ - { - "$id": "1574", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `code_interpreter`", - "type": { - "$id": "1575", - "kind": "constant", - "valueType": { - "$id": "1576", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsCode.type" - } - ] - }, - { - "$id": "1577", - "kind": "model", - "name": "AssistantToolsFileSearchTypeOnly", - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1578", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool being defined: `file_search`", - "type": { - "$id": "1579", - "kind": "constant", - "valueType": { - "$ref": "155" - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantToolsFileSearchTypeOnly.type" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequestAttachments", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.attachments" - }, - { - "$id": "1580", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1581", - "kind": "nullable", - "type": { - "$id": "1582", - "kind": "dict", - "keyType": { - "$id": "1583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateMessageRequest.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.messages" - }, - { - "$id": "1585", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1586", - "kind": "nullable", - "type": { - "$id": "1587", - "kind": "model", - "name": "CreateThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1588", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1589", - "kind": "model", - "name": "CreateThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1590", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1591", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1592", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1593", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1594", - "kind": "model", - "name": "ToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1595", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1596", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1597", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store_ids" - }, - { - "$id": "1598", - "kind": "property", - "name": "vector_stores", - "serializedName": "vector_stores", - "description": "A helper to create a [vector store](/docs/api-reference/vector-stores/object) with\nfile_ids and attach it to this assistant. There can be a maximum of 1 vector store\nattached to the assistant.", - "type": { - "$id": "1599", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1600", - "kind": "model", - "name": "ToolResourcesFileSearchVectorStore", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1601", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs to add to the vector store. There can be\na maximum of 10000 files in a vector store.", - "type": { - "$id": "1602", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.file_ids" - }, - { - "$id": "1604", - "kind": "property", - "name": "chunking_strategy", - "serializedName": "chunking_strategy", - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", - "type": { - "$id": "1605", - "kind": "union", - "name": "ToolResourcesFileSearchVectorStoreChunkingStrategy", - "variantTypes": [ - { - "$ref": "1388" - }, - { - "$ref": "1393" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.chunking_strategy" - }, - { - "$id": "1606", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for\nstoring additional information about the vector store in a structured format. Keys can\nbe a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1607", - "kind": "dict", - "keyType": { - "$id": "1608", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_store.anonymous.metadata" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearch.vector_stores" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.tool_resources" - }, - { - "$id": "1610", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1611", - "kind": "nullable", - "type": { - "$id": "1612", - "kind": "dict", - "keyType": { - "$id": "1613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1614", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequest.metadata" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.thread" - }, - { - "$id": "1615", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1616", - "kind": "nullable", - "type": { - "$ref": "158" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.model" - }, - { - "$id": "1617", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1618", - "kind": "nullable", - "type": { - "$id": "1619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.instructions" - }, - { - "$id": "1620", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1621", - "kind": "nullable", - "type": { - "$id": "1622", - "kind": "array", - "name": "CreateThreadAndRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tools" - }, - { - "$id": "1623", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "1624", - "kind": "nullable", - "type": { - "$id": "1625", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1626", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "1627", - "kind": "model", - "name": "CreateThreadAndRunRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1628", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "1629", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1630", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "1631", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "1632", - "kind": "model", - "name": "ToolResourcesFileSearchIdsOnly", - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1633", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant.\nThere can be a maximum of 1 vector store attached to the assistant.", - "type": { - "$id": "1634", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ToolResourcesFileSearchIdsOnly.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_resources" - }, - { - "$id": "1636", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1637", - "kind": "nullable", - "type": { - "$id": "1638", - "kind": "dict", - "keyType": { - "$id": "1639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1640", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.metadata" - }, - { - "$id": "1641", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1642", - "kind": "nullable", - "type": { - "$id": "1643", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.temperature" - }, - { - "$id": "1644", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1645", - "kind": "nullable", - "type": { - "$id": "1646", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.top_p" - }, - { - "$id": "1647", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1648", - "kind": "nullable", - "type": { - "$id": "1649", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.stream" - }, - { - "$id": "1650", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1651", - "kind": "nullable", - "type": { - "$id": "1652", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_prompt_tokens" - }, - { - "$id": "1653", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1654", - "kind": "nullable", - "type": { - "$id": "1655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.max_completion_tokens" - }, - { - "$id": "1656", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1657", - "kind": "nullable", - "type": { - "$id": "1658", - "kind": "model", - "name": "TruncationObject", - "crossLanguageDefinitionId": "OpenAI.TruncationObject", - "usage": "Input,Output,Json", - "description": "Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.", - "decorators": [], - "properties": [ - { - "$id": "1659", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", - "type": { - "$ref": "206" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.type" - }, - { - "$id": "1660", - "kind": "property", - "name": "last_messages", - "serializedName": "last_messages", - "description": "The number of most recent messages from the thread when constructing the context for the run.", - "type": { - "$id": "1661", - "kind": "nullable", - "type": { - "$id": "1662", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TruncationObject.last_messages" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.truncation_strategy" - }, - { - "$id": "1663", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1664", - "kind": "nullable", - "type": { - "$id": "1665", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$id": "1666", - "kind": "model", - "name": "AssistantsNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice", - "usage": "Input,Output,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", - "decorators": [], - "properties": [ - { - "$id": "1667", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. If type is `function`, the function name must be set", - "type": { - "$ref": "220" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.type" - }, - { - "$id": "1668", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "1669", - "kind": "model", - "name": "AssistantsNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1670", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "1671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantsNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.tool_choice" - }, - { - "$id": "1672", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.parallel_tool_calls" - }, - { - "$id": "1674", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1675", - "kind": "nullable", - "type": { - "$id": "1676", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1677", - "kind": "constant", - "valueType": { - "$id": "1678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "1679", - "kind": "model", - "name": "ResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText", - "usage": "Input,Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$id": "1680", - "kind": "model", - "name": "OmniTypedResponseFormat", - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "1681", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "1682", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.OmniTypedResponseFormat.type" - }, - "properties": [ - { - "$ref": "1681" - } - ], - "discriminatedSubtypes": { - "$id": "1683", - "text": { - "$ref": "1679" - }, - "json_object": { - "$id": "1684", - "kind": "model", - "name": "ResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject", - "usage": "Input,Output,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1685", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "1686", - "kind": "constant", - "valueType": { - "$id": "1687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "1688", - "kind": "model", - "name": "ResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema", - "usage": "Input,Output,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "1680" - }, - "properties": [ - { - "$id": "1689", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "1690", - "kind": "constant", - "valueType": { - "$id": "1691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.type" - }, - { - "$id": "1692", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$id": "1693", - "kind": "model", - "name": "ResponseFormatJsonSchemaJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1694", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", - "type": { - "$id": "1695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.description" - }, - { - "$id": "1696", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "1697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.name" - }, - { - "$id": "1698", - "kind": "property", - "name": "schema", - "serializedName": "schema", - "type": { - "$id": "1699", - "kind": "model", - "name": "ResponseFormatJsonSchemaSchema", - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchemaSchema", - "usage": "Input,Output,Json", - "description": "The schema for the response format, described as a JSON Schema object.", - "decorators": [], - "additionalProperties": { - "$id": "1700", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "properties": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.schema" - }, - { - "$id": "1701", - "kind": "property", - "name": "strict", - "serializedName": "strict", - "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).", - "type": { - "$id": "1702", - "kind": "nullable", - "type": { - "$id": "1703", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema.anonymous.strict" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "properties": [ - { - "$id": "1704", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "1705", - "kind": "constant", - "valueType": { - "$id": "1706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ResponseFormatText.type" - } - ] - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateThreadAndRunRequest.response_format" - } - ] - }, - { - "$ref": "1523" - }, - { - "$ref": "1526" - }, - { - "$ref": "1530" - }, - { - "$ref": "1534" - }, - { - "$ref": "1540" - }, - { - "$ref": "1541" - }, - { - "$ref": "1545" - }, - { - "$ref": "1550" - }, - { - "$ref": "1554" - }, - { - "$ref": "1558" - }, - { - "$ref": "1563" - }, - { - "$ref": "1569" - }, - { - "$ref": "1577" - }, - { - "$ref": "1587" - }, - { - "$ref": "1589" - }, - { - "$ref": "1594" - }, - { - "$ref": "1600" - }, - { - "$ref": "1625" - }, - { - "$ref": "1627" - }, - { - "$ref": "1632" - }, - { - "$ref": "1658" - }, - { - "$ref": "1666" - }, - { - "$ref": "1669" - }, - { - "$ref": "1679" - }, - { - "$ref": "1680" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - }, - { - "$ref": "1693" - }, - { - "$ref": "1699" - }, - { - "$id": "1707", - "kind": "model", - "name": "RunObject", - "crossLanguageDefinitionId": "OpenAI.RunObject", - "usage": "Output,Json", - "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "1708", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "1709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.id" - }, - { - "$id": "1710", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run`.", - "type": { - "$id": "1711", - "kind": "constant", - "valueType": { - "$ref": "228" - }, - "value": "thread.run", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.object" - }, - { - "$id": "1712", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run was created.", - "type": { - "$id": "1713", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1714", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.created_at" - }, - { - "$id": "1715", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", - "type": { - "$id": "1716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.thread_id" - }, - { - "$id": "1717", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", - "type": { - "$id": "1718", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.assistant_id" - }, - { - "$id": "1719", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.", - "type": { - "$ref": "231" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.status" - }, - { - "$id": "1720", - "kind": "property", - "name": "required_action", - "serializedName": "required_action", - "description": "Details on the action required to continue the run. Will be `null` if no action is required.", - "type": { - "$id": "1721", - "kind": "nullable", - "type": { - "$id": "1722", - "kind": "model", - "name": "RunObjectRequiredAction", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1723", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "For now, this is always `submit_tool_outputs`.", - "type": { - "$id": "1724", - "kind": "constant", - "valueType": { - "$ref": "251" - }, - "value": "submit_tool_outputs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.type" - }, - { - "$id": "1725", - "kind": "property", - "name": "submit_tool_outputs", - "serializedName": "submit_tool_outputs", - "description": "Details on the tool outputs needed for this run to continue.", - "type": { - "$id": "1726", - "kind": "model", - "name": "RunObjectRequiredActionSubmitToolOutputs", - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1727", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "A list of the relevant tool calls.", - "type": { - "$id": "1728", - "kind": "array", - "name": "ArrayRunToolCallObject", - "valueType": { - "$id": "1729", - "kind": "model", - "name": "RunToolCallObject", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject", - "usage": "Output,Json", - "description": "Tool call objects", - "decorators": [], - "properties": [ - { - "$id": "1730", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", - "type": { - "$id": "1731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.id" - }, - { - "$id": "1732", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call the output is required for. For now, this is always `function`.", - "type": { - "$id": "1733", - "kind": "constant", - "valueType": { - "$ref": "254" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.type" - }, - { - "$id": "1734", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function definition.", - "type": { - "$id": "1735", - "kind": "model", - "name": "RunToolCallObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1736", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "1737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.name" - }, - { - "$id": "1738", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments that the model expects you to pass to the function.", - "type": { - "$id": "1739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunToolCallObject.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.submit_tool_outputs.anonymous.tool_calls" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action.anonymous.submit_tool_outputs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.required_action" - }, - { - "$id": "1740", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run. Will be `null` if there are no errors.", - "type": { - "$id": "1741", - "kind": "nullable", - "type": { - "$id": "1742", - "kind": "model", - "name": "RunObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1743", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.", - "type": { - "$ref": "257" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.code" - }, - { - "$id": "1744", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "1745", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.last_error" - }, - { - "$id": "1746", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the run will expire.", - "type": { - "$id": "1747", - "kind": "nullable", - "type": { - "$id": "1748", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1749", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.expires_at" - }, - { - "$id": "1750", - "kind": "property", - "name": "started_at", - "serializedName": "started_at", - "description": "The Unix timestamp (in seconds) for when the run was started.", - "type": { - "$id": "1751", - "kind": "nullable", - "type": { - "$id": "1752", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1753", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.started_at" - }, - { - "$id": "1754", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run was cancelled.", - "type": { - "$id": "1755", - "kind": "nullable", - "type": { - "$id": "1756", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1757", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.cancelled_at" - }, - { - "$id": "1758", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run failed.", - "type": { - "$id": "1759", - "kind": "nullable", - "type": { - "$id": "1760", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1761", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.failed_at" - }, - { - "$id": "1762", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run was completed.", - "type": { - "$id": "1763", - "kind": "nullable", - "type": { - "$id": "1764", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1765", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.completed_at" - }, - { - "$id": "1766", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", - "type": { - "$id": "1767", - "kind": "nullable", - "type": { - "$id": "1768", - "kind": "model", - "name": "RunObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1769", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", - "type": { - "$ref": "265" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.incomplete_details" - }, - { - "$id": "1770", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1771", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.model" - }, - { - "$id": "1772", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.instructions" - }, - { - "$id": "1774", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", - "type": { - "$id": "1775", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tools" - }, - { - "$id": "1776", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1777", - "kind": "nullable", - "type": { - "$id": "1778", - "kind": "dict", - "keyType": { - "$id": "1779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1780", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.metadata" - }, - { - "$id": "1781", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "1782", - "kind": "nullable", - "type": { - "$id": "1783", - "kind": "model", - "name": "RunCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", - "decorators": [], - "properties": [ - { - "$id": "1784", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run.", - "type": { - "$id": "1785", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.completion_tokens" - }, - { - "$id": "1786", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run.", - "type": { - "$id": "1787", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.prompt_tokens" - }, - { - "$id": "1788", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "1789", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.usage" - }, - { - "$id": "1790", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature used for this run. If not set, defaults to 1.", - "type": { - "$id": "1791", - "kind": "nullable", - "type": { - "$id": "1792", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.temperature" - }, - { - "$id": "1793", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", - "type": { - "$id": "1794", - "kind": "nullable", - "type": { - "$id": "1795", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.top_p" - }, - { - "$id": "1796", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", - "type": { - "$id": "1797", - "kind": "nullable", - "type": { - "$id": "1798", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_prompt_tokens" - }, - { - "$id": "1799", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens specified to have been used over the course of the run.", - "type": { - "$id": "1800", - "kind": "nullable", - "type": { - "$id": "1801", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.max_completion_tokens" - }, - { - "$id": "1802", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1803", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.truncation_strategy" - }, - { - "$id": "1804", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1805", - "kind": "nullable", - "type": { - "$id": "1806", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.tool_choice" - }, - { - "$id": "1807", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1808", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.parallel_tool_calls" - }, - { - "$id": "1809", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1810", - "kind": "nullable", - "type": { - "$id": "1811", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1812", - "kind": "constant", - "valueType": { - "$id": "1813", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunObject.response_format" - } - ] - }, - { - "$ref": "1722" - }, - { - "$ref": "1726" - }, - { - "$ref": "1729" - }, - { - "$ref": "1735" - }, - { - "$ref": "1742" - }, - { - "$ref": "1768" - }, - { - "$ref": "1783" - }, - { - "$id": "1814", - "kind": "model", - "name": "CreateRunRequest", - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1815", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", - "type": { - "$id": "1816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.assistant_id" - }, - { - "$id": "1817", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", - "type": { - "$id": "1818", - "kind": "nullable", - "type": { - "$ref": "271" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.model" - }, - { - "$id": "1819", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1820", - "kind": "nullable", - "type": { - "$id": "1821", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.instructions" - }, - { - "$id": "1822", - "kind": "property", - "name": "additional_instructions", - "serializedName": "additional_instructions", - "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", - "type": { - "$id": "1823", - "kind": "nullable", - "type": { - "$id": "1824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_instructions" - }, - { - "$id": "1825", - "kind": "property", - "name": "additional_messages", - "serializedName": "additional_messages", - "description": "Adds additional messages to the thread before creating the run.", - "type": { - "$id": "1826", - "kind": "nullable", - "type": { - "$id": "1827", - "kind": "array", - "name": "CreateRunRequestAdditional_messages", - "valueType": { - "$ref": "1526" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestAdditional_messages", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.additional_messages" - }, - { - "$id": "1828", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", - "type": { - "$id": "1829", - "kind": "nullable", - "type": { - "$id": "1830", - "kind": "array", - "name": "CreateRunRequestTools", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "OpenAI.CreateRunRequestTools", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tools" - }, - { - "$id": "1831", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1832", - "kind": "nullable", - "type": { - "$id": "1833", - "kind": "dict", - "keyType": { - "$id": "1834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.metadata" - }, - { - "$id": "1836", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "1837", - "kind": "nullable", - "type": { - "$id": "1838", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.temperature" - }, - { - "$id": "1839", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "1840", - "kind": "nullable", - "type": { - "$id": "1841", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.top_p" - }, - { - "$id": "1842", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1843", - "kind": "nullable", - "type": { - "$id": "1844", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.stream" - }, - { - "$id": "1845", - "kind": "property", - "name": "max_prompt_tokens", - "serializedName": "max_prompt_tokens", - "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1846", - "kind": "nullable", - "type": { - "$id": "1847", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_prompt_tokens" - }, - { - "$id": "1848", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", - "type": { - "$id": "1849", - "kind": "nullable", - "type": { - "$id": "1850", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.max_completion_tokens" - }, - { - "$id": "1851", - "kind": "property", - "name": "truncation_strategy", - "serializedName": "truncation_strategy", - "type": { - "$id": "1852", - "kind": "nullable", - "type": { - "$ref": "1658" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.truncation_strategy" - }, - { - "$id": "1853", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "1854", - "kind": "nullable", - "type": { - "$id": "1855", - "kind": "union", - "name": "AssistantsApiToolChoiceOption", - "variantTypes": [ - { - "$ref": "212" - }, - { - "$ref": "1666" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.tool_choice" - }, - { - "$id": "1856", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "1857", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.parallel_tool_calls" - }, - { - "$id": "1858", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "1859", - "kind": "nullable", - "type": { - "$id": "1860", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "1861", - "kind": "constant", - "valueType": { - "$id": "1862", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateRunRequest.response_format" - } - ] - }, - { - "$id": "1863", - "kind": "model", - "name": "ListRunsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1864", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1865", - "kind": "constant", - "valueType": { - "$ref": "325" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.object" - }, - { - "$id": "1866", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1867", - "kind": "array", - "name": "ArrayRunObject", - "valueType": { - "$ref": "1707" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.data" - }, - { - "$id": "1868", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "1869", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.first_id" - }, - { - "$id": "1870", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "1871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.last_id" - }, - { - "$id": "1872", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "1873", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunsResponse.has_more" - } - ] - }, - { - "$id": "1874", - "kind": "model", - "name": "ModifyRunRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1875", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "1876", - "kind": "nullable", - "type": { - "$id": "1877", - "kind": "dict", - "keyType": { - "$id": "1878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "1879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyRunRequest.metadata" - } - ] - }, - { - "$id": "1880", - "kind": "model", - "name": "SubmitToolOutputsRunRequest", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1881", - "kind": "property", - "name": "tool_outputs", - "serializedName": "tool_outputs", - "description": "A list of tools for which the outputs are being submitted.", - "type": { - "$id": "1882", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1883", - "kind": "model", - "name": "SubmitToolOutputsRunRequestToolOutput", - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "1884", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", - "type": { - "$id": "1885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.tool_call_id" - }, - { - "$id": "1886", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the tool call to be submitted to continue the run.", - "type": { - "$id": "1887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_output.anonymous.output" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.tool_outputs" - }, - { - "$id": "1888", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.", - "type": { - "$id": "1889", - "kind": "nullable", - "type": { - "$id": "1890", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.SubmitToolOutputsRunRequest.stream" - } - ] - }, - { - "$ref": "1883" - }, - { - "$id": "1891", - "kind": "model", - "name": "ListRunStepsResponse", - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1892", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "1893", - "kind": "constant", - "valueType": { - "$ref": "334" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.object" - }, - { - "$id": "1894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "1895", - "kind": "array", - "name": "ArrayRunStepObject", - "valueType": { - "$id": "1896", - "kind": "model", - "name": "RunStepObject", - "crossLanguageDefinitionId": "OpenAI.RunStepObject", - "usage": "Output,Json", - "description": "Represents a step in execution of a run.", - "decorators": [], - "properties": [ - { - "$id": "1897", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "1898", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.id" - }, - { - "$id": "1899", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step`.", - "type": { - "$id": "1900", - "kind": "constant", - "valueType": { - "$ref": "337" - }, - "value": "thread.run.step", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.object" - }, - { - "$id": "1901", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the run step was created.", - "type": { - "$id": "1902", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "1903", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.created_at" - }, - { - "$id": "1904", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", - "type": { - "$id": "1905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.assistant_id" - }, - { - "$id": "1906", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "type": { - "$id": "1907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.thread_id" - }, - { - "$id": "1908", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", - "type": { - "$id": "1909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.run_id" - }, - { - "$id": "1910", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", - "type": { - "$ref": "340" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.type" - }, - { - "$id": "1911", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", - "type": { - "$ref": "346" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.status" - }, - { - "$id": "1912", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$id": "1913", - "kind": "model", - "name": "RunStepObjectStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails", - "usage": "Output,Json", - "description": "Abstractly represents a run step details object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1914", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1915", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObjectStepDetails.type" - }, - "properties": [ - { - "$ref": "1914" - } - ], - "discriminatedSubtypes": { - "$id": "1916", - "message_creation": { - "$id": "1917", - "kind": "model", - "name": "RunStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject", - "usage": "Output,Json", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1918", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "1919", - "kind": "constant", - "valueType": { - "$id": "1920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.type" - }, - { - "$id": "1921", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "1922", - "kind": "model", - "name": "RunStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1923", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "1924", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "1925", - "kind": "model", - "name": "RunStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject", - "usage": "Output,Json", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "1913" - }, - "properties": [ - { - "$id": "1926", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "1927", - "kind": "constant", - "valueType": { - "$id": "1928", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.type" - }, - { - "$id": "1929", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "1930", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "1931", - "kind": "model", - "name": "RunStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "1932", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1933", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "1932" - } - ], - "discriminatedSubtypes": { - "$id": "1934", - "code_interpreter": { - "$id": "1935", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject", - "usage": "Output,Json", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1936", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "1937", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "1938", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "1939", - "kind": "constant", - "valueType": { - "$id": "1940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "1941", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "1942", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1943", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "1944", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "1945", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "1946", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "1947", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output,Json", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "1948", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "1949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "1948" - } - ], - "discriminatedSubtypes": { - "$id": "1950", - "logs": { - "$id": "1951", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject", - "usage": "Output,Json", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1952", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "1953", - "kind": "constant", - "valueType": { - "$id": "1954", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "1955", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "1956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "1957", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject", - "usage": "Output,Json", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "1947" - }, - "properties": [ - { - "$id": "1958", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "1959", - "kind": "constant", - "valueType": { - "$id": "1960", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "1961", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "1962", - "kind": "model", - "name": "RunStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1963", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "1964", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "1965", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject", - "usage": "Output,Json", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1966", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1967", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "1968", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "1969", - "kind": "constant", - "valueType": { - "$id": "1970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "1971", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "1972", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchObjectFileSearch", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1973", - "kind": "property", - "name": "ranking_options", - "serializedName": "ranking_options", - "type": { - "$id": "1974", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject", - "usage": "Output,Json", - "description": "The ranking options for the file search.", - "decorators": [], - "properties": [ - { - "$id": "1975", - "kind": "property", - "name": "ranker", - "serializedName": "ranker", - "description": "The ranker used for the file search.", - "type": { - "$id": "1976", - "kind": "constant", - "valueType": { - "$ref": "358" - }, - "value": "default_2024_08_21", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.ranker" - }, - { - "$id": "1977", - "kind": "property", - "name": "score_threshold", - "serializedName": "score_threshold", - "description": "The score threshold for the file search. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1978", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject.score_threshold" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.ranking_options" - }, - { - "$id": "1979", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "The results of the file search.", - "type": { - "$id": "1980", - "kind": "array", - "name": "ArrayRunStepDetailsToolCallsFileSearchResultObject", - "valueType": { - "$id": "1981", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject", - "usage": "Output,Json", - "description": "A result instance of the file search.", - "decorators": [], - "properties": [ - { - "$id": "1982", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that result was found in.", - "type": { - "$id": "1983", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_id" - }, - { - "$id": "1984", - "kind": "property", - "name": "file_name", - "serializedName": "file_name", - "description": "The name of the file that result was found in.", - "type": { - "$id": "1985", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.file_name" - }, - { - "$id": "1986", - "kind": "property", - "name": "score", - "serializedName": "score", - "description": "The score of the result. All values must be a floating point number between 0 and 1.", - "type": { - "$id": "1987", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.score" - }, - { - "$id": "1988", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", - "type": { - "$id": "1989", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "1990", - "kind": "model", - "name": "RunStepDetailsToolCallsFileSearchResultObjectContent", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "1991", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content.", - "type": { - "$id": "1992", - "kind": "constant", - "valueType": { - "$ref": "361" - }, - "value": "text", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.type" - }, - { - "$id": "1993", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content of the file.", - "type": { - "$id": "1994", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchResultObject.content" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search.anonymous.results" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "1995", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject", - "usage": "Output,Json", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "1931" - }, - "properties": [ - { - "$id": "1996", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "1997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "1998", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "1999", - "kind": "constant", - "valueType": { - "$id": "2000", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "2001", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "2002", - "kind": "model", - "name": "RunStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2003", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "2004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "2005", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "2006", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "2007", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "2008", - "kind": "nullable", - "type": { - "$id": "2009", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.step_details" - }, - { - "$id": "2010", - "kind": "property", - "name": "last_error", - "serializedName": "last_error", - "description": "The last error associated with this run step. Will be `null` if there are no errors.", - "type": { - "$id": "2011", - "kind": "nullable", - "type": { - "$id": "2012", - "kind": "model", - "name": "RunStepObjectLastError", - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2013", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "One of `server_error` or `rate_limit_exceeded`.", - "type": { - "$ref": "364" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.code" - }, - { - "$id": "2014", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable description of the error.", - "type": { - "$id": "2015", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error.anonymous.message" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.last_error" - }, - { - "$id": "2016", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", - "type": { - "$id": "2017", - "kind": "nullable", - "type": { - "$id": "2018", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2019", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.expired_at" - }, - { - "$id": "2020", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", - "type": { - "$id": "2021", - "kind": "nullable", - "type": { - "$id": "2022", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2023", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.cancelled_at" - }, - { - "$id": "2024", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the run step failed.", - "type": { - "$id": "2025", - "kind": "nullable", - "type": { - "$id": "2026", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2027", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.failed_at" - }, - { - "$id": "2028", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the run step completed.", - "type": { - "$id": "2029", - "kind": "nullable", - "type": { - "$id": "2030", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.completed_at" - }, - { - "$id": "2032", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2033", - "kind": "nullable", - "type": { - "$id": "2034", - "kind": "dict", - "keyType": { - "$id": "2035", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.metadata" - }, - { - "$id": "2037", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2038", - "kind": "nullable", - "type": { - "$id": "2039", - "kind": "model", - "name": "RunStepCompletionUsage", - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", - "decorators": [], - "properties": [ - { - "$id": "2040", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of completion tokens used over the course of the run step.", - "type": { - "$id": "2041", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.completion_tokens" - }, - { - "$id": "2042", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of prompt tokens used over the course of the run step.", - "type": { - "$id": "2043", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.prompt_tokens" - }, - { - "$id": "2044", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used (prompt + completion).", - "type": { - "$id": "2045", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepCompletionUsage.total_tokens" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepObject.usage" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.data" - }, - { - "$id": "2046", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2047", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.first_id" - }, - { - "$id": "2048", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2049", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.last_id" - }, - { - "$id": "2050", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2051", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListRunStepsResponse.has_more" - } - ] - }, - { - "$ref": "1896" - }, - { - "$ref": "1913" - }, - { - "$ref": "1917" - }, - { - "$ref": "1922" - }, - { - "$ref": "1925" - }, - { - "$ref": "1931" - }, - { - "$ref": "1935" - }, - { - "$ref": "1942" - }, - { - "$ref": "1947" - }, - { - "$ref": "1951" - }, - { - "$ref": "1957" - }, - { - "$ref": "1962" - }, - { - "$ref": "1965" - }, - { - "$ref": "1972" - }, - { - "$ref": "1974" - }, - { - "$ref": "1981" - }, - { - "$ref": "1990" - }, - { - "$ref": "1995" - }, - { - "$ref": "2002" - }, - { - "$ref": "2012" - }, - { - "$ref": "2039" - }, - { - "$id": "2052", - "kind": "model", - "name": "ThreadObject", - "crossLanguageDefinitionId": "OpenAI.ThreadObject", - "usage": "Output,Json", - "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", - "decorators": [], - "properties": [ - { - "$id": "2053", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2054", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.id" - }, - { - "$id": "2055", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread`.", - "type": { - "$id": "2056", - "kind": "constant", - "valueType": { - "$ref": "370" - }, - "value": "thread", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.object" - }, - { - "$id": "2057", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the thread was created.", - "type": { - "$id": "2058", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2059", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.created_at" - }, - { - "$id": "2060", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2061", - "kind": "nullable", - "type": { - "$id": "2062", - "kind": "model", - "name": "ThreadObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2063", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2064", - "kind": "model", - "name": "ThreadObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2065", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2066", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2067", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2068", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$id": "2069", - "kind": "model", - "name": "ThreadObjectToolResourcesFileSearch", - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2070", - "kind": "property", - "name": "vector_store_ids", - "serializedName": "vector_store_ids", - "description": "The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.", - "type": { - "$id": "2071", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.file_search.anonymous.vector_store_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.tool_resources" - }, - { - "$id": "2073", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2074", - "kind": "nullable", - "type": { - "$id": "2075", - "kind": "dict", - "keyType": { - "$id": "2076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ThreadObject.metadata" - } - ] - }, - { - "$ref": "2062" - }, - { - "$ref": "2064" - }, - { - "$ref": "2069" - }, - { - "$id": "2078", - "kind": "model", - "name": "ModifyThreadRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2079", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "2080", - "kind": "nullable", - "type": { - "$id": "2081", - "kind": "model", - "name": "ModifyThreadRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2082", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "2083", - "kind": "model", - "name": "ModifyThreadRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2084", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "2085", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "2087", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.tool_resources" - }, - { - "$id": "2088", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2089", - "kind": "nullable", - "type": { - "$id": "2090", - "kind": "dict", - "keyType": { - "$id": "2091", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyThreadRequest.metadata" - } - ] - }, - { - "$ref": "2081" - }, - { - "$ref": "2083" - }, - { - "$id": "2093", - "kind": "model", - "name": "DeleteThreadResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2094", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2095", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.id" - }, - { - "$id": "2096", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2097", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.deleted" - }, - { - "$id": "2098", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2099", - "kind": "constant", - "valueType": { - "$ref": "373" - }, - "value": "thread.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteThreadResponse.object" - } - ] - }, - { - "$id": "2100", - "kind": "model", - "name": "RealtimeRequestCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand", - "usage": "Input,Json", - "description": "A base representation for messages sent by the client to the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2101", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "376" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.type" - }, - "properties": [ - { - "$ref": "2101" - }, - { - "$id": "2102", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2103", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2104", - "session.update": { - "$id": "2105", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand", - "usage": "Input,Json", - "discriminatorValue": "session.update", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2106", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2107", - "kind": "constant", - "valueType": { - "$id": "2108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.update", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.type" - }, - { - "$id": "2109", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2110", - "kind": "model", - "name": "RealtimeRequestSessionUpdateCommandSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2111", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "396" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.model" - }, - { - "$id": "2112", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2113", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.modalities" - }, - { - "$id": "2114", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.voice" - }, - { - "$id": "2115", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.instructions" - }, - { - "$id": "2117", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_format" - }, - { - "$id": "2118", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.output_audio_format" - }, - { - "$id": "2119", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2120", - "kind": "model", - "name": "RealtimeAudioInputTranscriptionSettings", - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2121", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$ref": "422" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeAudioInputTranscriptionSettings.model" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.input_audio_transcription" - }, - { - "$id": "2122", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$id": "2123", - "kind": "model", - "name": "RealtimeTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2124", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "426" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTurnDetection.type" - }, - "properties": [ - { - "$ref": "2124" - } - ], - "discriminatedSubtypes": { - "$id": "2125", - "server_vad": { - "$id": "2126", - "kind": "model", - "name": "RealtimeServerVadTurnDetection", - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection", - "usage": "Input,Output,Json", - "discriminatorValue": "server_vad", - "decorators": [], - "baseModel": { - "$ref": "2123" - }, - "properties": [ - { - "$id": "2127", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2128", - "kind": "constant", - "valueType": { - "$id": "2129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "server_vad", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.type" - }, - { - "$id": "2130", - "kind": "property", - "name": "threshold", - "serializedName": "threshold", - "type": { - "$id": "2131", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.threshold" - }, - { - "$id": "2132", - "kind": "property", - "name": "prefix_padding_ms", - "serializedName": "prefix_padding_ms", - "type": { - "$id": "2133", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.prefix_padding_ms" - }, - { - "$id": "2135", - "kind": "property", - "name": "silence_duration_ms", - "serializedName": "silence_duration_ms", - "type": { - "$id": "2136", - "kind": "duration", - "name": "duration", - "encode": "ISO8601", - "wireType": { - "$id": "2137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeServerVadTurnDetection.silence_duration_ms" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.turn_detection" - }, - { - "$id": "2138", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2139", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$id": "2140", - "kind": "model", - "name": "RealtimeTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeTool", - "usage": "Input,Output,Json", - "description": "The base representation of a realtime tool definition.", - "decorators": [], - "discriminatorProperty": { - "$id": "2141", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeTool.type" - }, - "properties": [ - { - "$ref": "2141" - } - ], - "discriminatedSubtypes": { - "$id": "2142", - "function": { - "$id": "2143", - "kind": "model", - "name": "RealtimeFunctionTool", - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool", - "usage": "Input,Output,Json", - "description": "The definition of a function tool as used by the realtime endpoint.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2140" - }, - "properties": [ - { - "$id": "2144", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2145", - "kind": "constant", - "valueType": { - "$id": "2146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.type" - }, - { - "$id": "2147", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.name" - }, - { - "$id": "2149", - "kind": "property", - "name": "description", - "serializedName": "description", - "type": { - "$id": "2150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.description" - }, - { - "$id": "2151", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$id": "2152", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeFunctionTool.parameters" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tools" - }, - { - "$id": "2153", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2154", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$id": "2155", - "kind": "model", - "name": "RealtimeToolChoiceObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject", - "usage": "Input,Output,Json", - "description": "A base representation for a realtime tool_choice selecting a named tool.", - "decorators": [], - "discriminatorProperty": { - "$id": "2156", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "430" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceObject.type" - }, - "properties": [ - { - "$ref": "2156" - } - ], - "discriminatedSubtypes": { - "$id": "2157", - "function": { - "$id": "2158", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject", - "usage": "Input,Output,Json", - "description": "The representation of a realtime tool_choice selecting a named function tool.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "2155" - }, - "properties": [ - { - "$id": "2159", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2145" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.type" - }, - { - "$id": "2160", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "2161", - "kind": "model", - "name": "RealtimeToolChoiceFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2162", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2163", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeToolChoiceFunctionObject.function" - } - ] - } - } - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.tool_choice" - }, - { - "$id": "2164", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2165", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.temperature" - }, - { - "$id": "2166", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2167", - "kind": "union", - "name": "RealtimeRequestSessionUpdateCommandSessionMaxResponseOutputTokens", - "variantTypes": [ - { - "$id": "2168", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2169", - "kind": "constant", - "valueType": { - "$id": "2170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session.anonymous.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSessionUpdateCommand.session" - } - ] - }, - "input_audio_buffer.append": { - "$id": "2171", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferAppendCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.append", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2172", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2173", - "kind": "constant", - "valueType": { - "$id": "2174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.append", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.type" - }, - { - "$id": "2175", - "kind": "property", - "name": "audio", - "serializedName": "audio", - "type": { - "$id": "2176", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferAppendCommand.audio" - } - ] - }, - "input_audio_buffer.commit": { - "$id": "2177", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferCommitCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.commit", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2178", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2179", - "kind": "constant", - "valueType": { - "$id": "2180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.commit", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferCommitCommand.type" - } - ] - }, - "input_audio_buffer.clear": { - "$id": "2181", - "kind": "model", - "name": "RealtimeRequestInputAudioBufferClearCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand", - "usage": "Input,Json", - "discriminatorValue": "input_audio_buffer.clear", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2182", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2183", - "kind": "constant", - "valueType": { - "$id": "2184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.clear", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestInputAudioBufferClearCommand.type" - } - ] - }, - "conversation.item.create": { - "$id": "2185", - "kind": "model", - "name": "RealtimeRequestItemCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2186", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2187", - "kind": "constant", - "valueType": { - "$id": "2188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.type" - }, - { - "$id": "2189", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.previous_item_id" - }, - { - "$id": "2191", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2192", - "kind": "model", - "name": "RealtimeRequestItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2193", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.type" - }, - "properties": [ - { - "$ref": "2193" - }, - { - "$id": "2194", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2196", - "message": { - "$id": "2197", - "kind": "model", - "name": "RealtimeRequestMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem", - "usage": "Input,Json", - "discriminatorValue": "message", - "decorators": [], - "discriminatorProperty": { - "$id": "2198", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.role" - }, - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2199", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2200", - "kind": "constant", - "valueType": { - "$id": "2201", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.type" - }, - { - "$ref": "2198" - }, - { - "$id": "2202", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestMessageItem.status" - } - ], - "discriminatedSubtypes": { - "$id": "2203", - "system": { - "$id": "2204", - "kind": "model", - "name": "RealtimeRequestSystemMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2205", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2206", - "kind": "constant", - "valueType": { - "$id": "2207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.role" - }, - { - "$id": "2208", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2209", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$id": "2210", - "kind": "model", - "name": "RealtimeRequestTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_text", - "decorators": [], - "baseModel": { - "$id": "2211", - "kind": "model", - "name": "RealtimeContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart", - "usage": "Input,Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2212", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "466" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeContentPart.type" - }, - "properties": [ - { - "$ref": "2212" - } - ], - "discriminatedSubtypes": { - "$id": "2213", - "input_text": { - "$ref": "2210" - }, - "input_audio": { - "$id": "2214", - "kind": "model", - "name": "RealtimeRequestAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart", - "usage": "Input,Output,Json", - "discriminatorValue": "input_audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2215", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2216", - "kind": "constant", - "valueType": { - "$id": "2217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.type" - }, - { - "$id": "2218", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAudioContentPart.transcript" - } - ] - }, - "text": { - "$id": "2220", - "kind": "model", - "name": "RealtimeResponseTextContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart", - "usage": "Output,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2221", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2222", - "kind": "constant", - "valueType": { - "$id": "2223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.type" - }, - { - "$id": "2224", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextContentPart.text" - } - ] - }, - "audio": { - "$id": "2226", - "kind": "model", - "name": "RealtimeResponseAudioContentPart", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart", - "usage": "Output,Json", - "discriminatorValue": "audio", - "decorators": [], - "baseModel": { - "$ref": "2211" - }, - "properties": [ - { - "$id": "2227", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2228", - "kind": "constant", - "valueType": { - "$id": "2229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "audio", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.type" - }, - { - "$id": "2230", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2231", - "kind": "nullable", - "type": { - "$id": "2232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioContentPart.transcript" - } - ] - } - } - }, - "properties": [ - { - "$id": "2233", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2234", - "kind": "constant", - "valueType": { - "$id": "2235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.type" - }, - { - "$id": "2236", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "2237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestTextContentPart.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestSystemMessageItem.content" - } - ] - }, - "user": { - "$id": "2238", - "kind": "model", - "name": "RealtimeRequestUserMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2239", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2240", - "kind": "constant", - "valueType": { - "$id": "2241", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.role" - }, - { - "$id": "2242", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2243", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2244", - "kind": "union", - "name": "RealtimeRequestUserMessageItemContent", - "variantTypes": [ - { - "$ref": "2210" - }, - { - "$ref": "2214" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestUserMessageItem.content" - } - ] - }, - "assistant": { - "$id": "2245", - "kind": "model", - "name": "RealtimeRequestAssistantMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "2197" - }, - "properties": [ - { - "$id": "2246", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$id": "2247", - "kind": "constant", - "valueType": { - "$id": "2248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.role" - }, - { - "$id": "2249", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2250", - "kind": "array", - "name": "ArrayRealtimeRequestTextContentPart", - "valueType": { - "$ref": "2210" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestAssistantMessageItem.content" - } - ] - } - } - }, - "function_call": { - "$id": "2251", - "kind": "model", - "name": "RealtimeRequestFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem", - "usage": "Input,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2252", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2253", - "kind": "constant", - "valueType": { - "$id": "2254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.type" - }, - { - "$id": "2255", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.name" - }, - { - "$id": "2257", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.call_id" - }, - { - "$id": "2259", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.arguments" - }, - { - "$id": "2261", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2262", - "kind": "model", - "name": "RealtimeRequestFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem", - "usage": "Input,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2192" - }, - "properties": [ - { - "$id": "2263", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2264", - "kind": "constant", - "valueType": { - "$id": "2265", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function_call_output", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.type" - }, - { - "$id": "2266", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2267", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.call_id" - }, - { - "$id": "2268", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2269", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemCreateCommand.item" - } - ] - }, - "conversation.item.delete": { - "$id": "2270", - "kind": "model", - "name": "RealtimeRequestItemDeleteCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.delete", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2271", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2272", - "kind": "constant", - "valueType": { - "$id": "2273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.delete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.type" - }, - { - "$id": "2274", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemDeleteCommand.item_id" - } - ] - }, - "conversation.item.truncate": { - "$id": "2276", - "kind": "model", - "name": "RealtimeRequestItemTruncateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand", - "usage": "Input,Json", - "discriminatorValue": "conversation.item.truncate", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2277", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2278", - "kind": "constant", - "valueType": { - "$id": "2279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.type" - }, - { - "$id": "2280", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.item_id" - }, - { - "$id": "2282", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2283", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.content_index" - }, - { - "$id": "2284", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2285", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestItemTruncateCommand.audio_end_ms" - } - ] - }, - "response.create": { - "$id": "2286", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand", - "usage": "Input,Json", - "description": "Trigger model inference to generate a model turn, the response will be streamed back with\na series of events, starting with an add_message event and ending with a turn_finished event.\nIf functions are enabled the response may be two, the second being a tool_call.\n\nFields:\n- conversation_label: References a conversation. If empty or set to a label that does not exist,\nGenerate will create a new conversation, otherwise it will be based on the context of the\nexisting conversation.\n- commit: If true, the generated messages will be appended to the end of the conversation.\nOnly valid if conversation_label is set.\n- cancel_previous: If True, the generation will cancel any pending generation for that specific\nconversation. If False, the generation will be queued and will be generated after the\nprevious generation has completed.\n- append_messages: If set, these messages will be appended to the end of the conversation before\na response is generated. If commit is false, these messages will be discarded. This can only\nbe done with an existing conversation, and thus will throw an error if conversation_label is\nnot set or does not exist.\n- messages: If conversation_label is not set or does not exist, this will be the initial messages\nof the conversation, i.e. the context of the generation. If the conversation exists, this will\nthrow an error.", - "discriminatorValue": "response.create", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2287", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2288", - "kind": "constant", - "valueType": { - "$id": "2289", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.create", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.type" - }, - { - "$id": "2290", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2291", - "kind": "model", - "name": "RealtimeRequestResponseCreateCommandResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2292", - "kind": "property", - "name": "commit", - "serializedName": "commit", - "type": { - "$id": "2293", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.commit" - }, - { - "$id": "2294", - "kind": "property", - "name": "cancel_previous", - "serializedName": "cancel_previous", - "type": { - "$id": "2295", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.cancel_previous" - }, - { - "$id": "2296", - "kind": "property", - "name": "append_input_items", - "serializedName": "append_input_items", - "type": { - "$id": "2297", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.append_input_items" - }, - { - "$id": "2298", - "kind": "property", - "name": "input_items", - "serializedName": "input_items", - "type": { - "$id": "2299", - "kind": "array", - "name": "ArrayRealtimeRequestItem", - "valueType": { - "$ref": "2192" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.input_items" - }, - { - "$id": "2300", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2301", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.instructions" - }, - { - "$id": "2302", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2303", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.modalities" - }, - { - "$id": "2304", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.voice" - }, - { - "$id": "2305", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2306", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.temperature" - }, - { - "$id": "2307", - "kind": "property", - "name": "max_output_tokens", - "serializedName": "max_output_tokens", - "type": { - "$id": "2308", - "kind": "nullable", - "type": { - "$id": "2309", - "kind": "union", - "name": "RealtimeRequestResponseCreateCommandResponseMaxOutputTokens", - "variantTypes": [ - { - "$id": "2310", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - { - "$id": "2311", - "kind": "constant", - "valueType": { - "$id": "2312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "inf", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.max_output_tokens" - }, - { - "$id": "2313", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2314", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tools" - }, - { - "$id": "2315", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2316", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.tool_choice" - }, - { - "$id": "2317", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response.anonymous.output_audio_format" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCreateCommand.response" - } - ] - }, - "response.cancel": { - "$id": "2318", - "kind": "model", - "name": "RealtimeRequestResponseCancelCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand", - "usage": "Input,Json", - "discriminatorValue": "response.cancel", - "decorators": [], - "baseModel": { - "$ref": "2100" - }, - "properties": [ - { - "$id": "2319", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2320", - "kind": "constant", - "valueType": { - "$id": "2321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.cancel", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeRequestResponseCancelCommand.type" - } - ] - } - } - }, - { - "$ref": "2105" - }, - { - "$ref": "2110" - }, - { - "$ref": "2120" - }, - { - "$ref": "2123" - }, - { - "$ref": "2126" - }, - { - "$ref": "2140" - }, - { - "$ref": "2143" - }, - { - "$ref": "2155" - }, - { - "$ref": "2158" - }, - { - "$ref": "2161" - }, - { - "$ref": "2171" - }, - { - "$ref": "2177" - }, - { - "$ref": "2181" - }, - { - "$ref": "2185" - }, - { - "$ref": "2192" - }, - { - "$ref": "2197" - }, - { - "$ref": "2204" - }, - { - "$ref": "2210" - }, - { - "$ref": "2211" - }, - { - "$ref": "2214" - }, - { - "$ref": "2220" - }, - { - "$ref": "2226" - }, - { - "$ref": "2238" - }, - { - "$ref": "2245" - }, - { - "$ref": "2251" - }, - { - "$ref": "2262" - }, - { - "$ref": "2270" - }, - { - "$ref": "2276" - }, - { - "$ref": "2286" - }, - { - "$ref": "2291" - }, - { - "$ref": "2318" - }, - { - "$id": "2322", - "kind": "model", - "name": "RealtimeResponseCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand", - "usage": "Output,Json", - "description": "Base representation of a WebSocket message received from the service.", - "decorators": [], - "discriminatorProperty": { - "$id": "2323", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$ref": "476" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.type" - }, - "properties": [ - { - "$ref": "2323" - }, - { - "$id": "2324", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2325", - "kind": "nullable", - "type": { - "$id": "2326", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCommand.event_id" - } - ], - "discriminatedSubtypes": { - "$id": "2327", - "session.created": { - "$id": "2328", - "kind": "model", - "name": "RealtimeResponseSessionCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2329", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2330", - "kind": "constant", - "valueType": { - "$id": "2331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.type" - }, - { - "$id": "2332", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$id": "2333", - "kind": "model", - "name": "RealtimeResponseSession", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2334", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2335", - "kind": "constant", - "valueType": { - "$ref": "532" - }, - "value": "realtime.session", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.object" - }, - { - "$id": "2336", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2337", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.id" - }, - { - "$id": "2338", - "kind": "property", - "name": "model", - "serializedName": "model", - "type": { - "$id": "2339", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.model" - }, - { - "$id": "2340", - "kind": "property", - "name": "modalities", - "serializedName": "modalities", - "type": { - "$id": "2341", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "400" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.modalities" - }, - { - "$id": "2342", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "type": { - "$id": "2343", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.instructions" - }, - { - "$id": "2344", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "type": { - "$ref": "406" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.voice" - }, - { - "$id": "2345", - "kind": "property", - "name": "input_audio_format", - "serializedName": "input_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_format" - }, - { - "$id": "2346", - "kind": "property", - "name": "output_audio_format", - "serializedName": "output_audio_format", - "type": { - "$ref": "414" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.output_audio_format" - }, - { - "$id": "2347", - "kind": "property", - "name": "input_audio_transcription", - "serializedName": "input_audio_transcription", - "type": { - "$id": "2348", - "kind": "nullable", - "type": { - "$ref": "2120" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.input_audio_transcription" - }, - { - "$id": "2349", - "kind": "property", - "name": "turn_detection", - "serializedName": "turn_detection", - "type": { - "$ref": "2123" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.turn_detection" - }, - { - "$id": "2350", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "type": { - "$id": "2351", - "kind": "array", - "name": "ArrayRealtimeTool", - "valueType": { - "$ref": "2140" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tools" - }, - { - "$id": "2352", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "2353", - "kind": "union", - "name": "RealtimeToolChoice", - "variantTypes": [ - { - "$ref": "434" - }, - { - "$ref": "2155" - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.tool_choice" - }, - { - "$id": "2354", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "type": { - "$id": "2355", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.temperature" - }, - { - "$id": "2356", - "kind": "property", - "name": "max_response_output_tokens", - "serializedName": "max_response_output_tokens", - "type": { - "$id": "2357", - "kind": "nullable", - "type": { - "$id": "2358", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSession.max_response_output_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionCreatedCommand.session" - } - ] - }, - "session.updated": { - "$id": "2359", - "kind": "model", - "name": "RealtimeResponseSessionUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "session.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2360", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2361", - "kind": "constant", - "valueType": { - "$id": "2362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "session.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.type" - }, - { - "$id": "2363", - "kind": "property", - "name": "session", - "serializedName": "session", - "type": { - "$ref": "2333" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseSessionUpdatedCommand.session" - } - ] - }, - "conversation.item.created": { - "$id": "2364", - "kind": "model", - "name": "RealtimeResponseItemCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2365", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2366", - "kind": "constant", - "valueType": { - "$id": "2367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.type" - }, - { - "$id": "2368", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "2369", - "kind": "model", - "name": "RealtimeResponseItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2370", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "442" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.type" - }, - "properties": [ - { - "$id": "2371", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2372", - "kind": "constant", - "valueType": { - "$ref": "535" - }, - "value": "realtime.item", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.object" - }, - { - "$ref": "2370" - }, - { - "$id": "2373", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2374", - "kind": "nullable", - "type": { - "$id": "2375", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItem.id" - } - ], - "discriminatedSubtypes": { - "$id": "2376", - "message": { - "$id": "2377", - "kind": "model", - "name": "RealtimeResponseMessageItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem", - "usage": "Output,Json", - "discriminatorValue": "message", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2378", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2200" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.type" - }, - { - "$id": "2379", - "kind": "property", - "name": "role", - "serializedName": "role", - "type": { - "$ref": "450" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.role" - }, - { - "$id": "2380", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "2381", - "kind": "array", - "name": "ArrayRealtimeContentPart", - "valueType": { - "$ref": "2211" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.content" - }, - { - "$id": "2382", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseMessageItem.status" - } - ] - }, - "function_call": { - "$id": "2383", - "kind": "model", - "name": "RealtimeResponseFunctionCallItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem", - "usage": "Output,Json", - "discriminatorValue": "function_call", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2384", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2253" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.type" - }, - { - "$id": "2385", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.name" - }, - { - "$id": "2387", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2388", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.call_id" - }, - { - "$id": "2389", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2390", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.arguments" - }, - { - "$id": "2391", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "458" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallItem.status" - } - ] - }, - "function_call_output": { - "$id": "2392", - "kind": "model", - "name": "RealtimeResponseFunctionCallOutputItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem", - "usage": "Output,Json", - "discriminatorValue": "function_call_output", - "decorators": [], - "baseModel": { - "$ref": "2369" - }, - "properties": [ - { - "$id": "2393", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "2264" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.type" - }, - { - "$id": "2394", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2395", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.call_id" - }, - { - "$id": "2396", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallOutputItem.output" - } - ] - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemCreatedCommand.item" - } - ] - }, - "conversation.item.deleted": { - "$id": "2398", - "kind": "model", - "name": "RealtimeResponseItemDeletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.deleted", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2399", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2400", - "kind": "constant", - "valueType": { - "$id": "2401", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.type" - }, - { - "$id": "2402", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2403", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemDeletedCommand.item_id" - } - ] - }, - "conversation.item.truncated": { - "$id": "2404", - "kind": "model", - "name": "RealtimeResponseItemTruncatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.truncated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2405", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2406", - "kind": "constant", - "valueType": { - "$id": "2407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.truncated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.type" - }, - { - "$id": "2408", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.item_id" - }, - { - "$id": "2410", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2411", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.audio_end_ms" - }, - { - "$id": "2412", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "2413", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemTruncatedCommand.index" - } - ] - }, - "response.created": { - "$id": "2414", - "kind": "model", - "name": "RealtimeResponseCreatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.created", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2415", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2416", - "kind": "constant", - "valueType": { - "$id": "2417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.created", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.type" - }, - { - "$id": "2418", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "2419", - "kind": "model", - "name": "RealtimeResponse", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2420", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2421", - "kind": "constant", - "valueType": { - "$ref": "538" - }, - "value": "realtime.response", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.object" - }, - { - "$id": "2422", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2423", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.id" - }, - { - "$id": "2424", - "kind": "property", - "name": "status", - "serializedName": "status", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status" - }, - { - "$id": "2425", - "kind": "property", - "name": "status_details", - "serializedName": "status_details", - "type": { - "$id": "2426", - "kind": "nullable", - "type": { - "$id": "2427", - "kind": "model", - "name": "RealtimeResponseStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2428", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$ref": "541" - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseStatusDetails.type" - }, - "properties": [ - { - "$ref": "2428" - } - ], - "discriminatedSubtypes": { - "$id": "2429", - "cancelled": { - "$id": "2430", - "kind": "model", - "name": "RealtimeResponseCancelledStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "cancelled", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2431", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2432", - "kind": "constant", - "valueType": { - "$id": "2433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "cancelled", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.type" - }, - { - "$id": "2434", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "553" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCancelledStatusDetails.reason" - } - ] - }, - "incomplete": { - "$id": "2435", - "kind": "model", - "name": "RealtimeResponseIncompleteStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "incomplete", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2436", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2437", - "kind": "constant", - "valueType": { - "$id": "2438", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "incomplete", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.type" - }, - { - "$id": "2439", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "type": { - "$ref": "559" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseIncompleteStatusDetails.reason" - } - ] - }, - "failed": { - "$id": "2440", - "kind": "model", - "name": "RealtimeResponseFailedStatusDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails", - "usage": "Output,Json", - "discriminatorValue": "failed", - "decorators": [], - "baseModel": { - "$ref": "2427" - }, - "properties": [ - { - "$id": "2441", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2442", - "kind": "constant", - "valueType": { - "$id": "2443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.type" - }, - { - "$id": "2444", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2445", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFailedStatusDetails.error" - } - ] - } - } - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.status_details" - }, - { - "$id": "2446", - "kind": "property", - "name": "output", - "serializedName": "output", - "type": { - "$id": "2447", - "kind": "array", - "name": "ArrayRealtimeResponseItem", - "valueType": { - "$ref": "2369" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.output" - }, - { - "$id": "2448", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "2449", - "kind": "model", - "name": "RealtimeResponseUsage", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2450", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "type": { - "$id": "2451", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.total_tokens" - }, - { - "$id": "2452", - "kind": "property", - "name": "input_tokens", - "serializedName": "input_tokens", - "type": { - "$id": "2453", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_tokens" - }, - { - "$id": "2454", - "kind": "property", - "name": "output_tokens", - "serializedName": "output_tokens", - "type": { - "$id": "2455", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_tokens" - }, - { - "$id": "2456", - "kind": "property", - "name": "input_token_details", - "serializedName": "input_token_details", - "type": { - "$id": "2457", - "kind": "model", - "name": "RealtimeResponseUsageInputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2458", - "kind": "property", - "name": "cached_tokens", - "serializedName": "cached_tokens", - "type": { - "$id": "2459", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.cached_tokens" - }, - { - "$id": "2460", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.text_tokens" - }, - { - "$id": "2462", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2463", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.input_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.input_token_details" - }, - { - "$id": "2464", - "kind": "property", - "name": "output_token_details", - "serializedName": "output_token_details", - "type": { - "$id": "2465", - "kind": "model", - "name": "RealtimeResponseUsageOutputTokenDetails", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2466", - "kind": "property", - "name": "text_tokens", - "serializedName": "text_tokens", - "type": { - "$id": "2467", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.text_tokens" - }, - { - "$id": "2468", - "kind": "property", - "name": "audio_tokens", - "serializedName": "audio_tokens", - "type": { - "$id": "2469", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.output_token_details.anonymous.audio_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage.anonymous.output_token_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponse.usage" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseCreatedCommand.response" - } - ] - }, - "response.done": { - "$id": "2470", - "kind": "model", - "name": "RealtimeResponseDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2471", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2472", - "kind": "constant", - "valueType": { - "$id": "2473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.type" - }, - { - "$id": "2474", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$ref": "2419" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseDoneCommand.response" - } - ] - }, - "rate_limits.updated": { - "$id": "2475", - "kind": "model", - "name": "RealtimeResponseRateLimitsUpdatedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand", - "usage": "Output,Json", - "discriminatorValue": "rate_limits.updated", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2476", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2477", - "kind": "constant", - "valueType": { - "$id": "2478", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "rate_limits.updated", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.type" - }, - { - "$id": "2479", - "kind": "property", - "name": "rate_limits", - "serializedName": "rate_limits", - "type": { - "$id": "2480", - "kind": "array", - "name": "ArrayRealtimeResponseRateLimitDetailsItem", - "valueType": { - "$id": "2481", - "kind": "model", - "name": "RealtimeResponseRateLimitDetailsItem", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2482", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.name" - }, - { - "$id": "2484", - "kind": "property", - "name": "limit", - "serializedName": "limit", - "type": { - "$id": "2485", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.limit" - }, - { - "$id": "2486", - "kind": "property", - "name": "remaining", - "serializedName": "remaining", - "type": { - "$id": "2487", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.remaining" - }, - { - "$id": "2488", - "kind": "property", - "name": "reset_seconds", - "serializedName": "reset_seconds", - "type": { - "$id": "2489", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitDetailsItem.reset_seconds" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseRateLimitsUpdatedCommand.rate_limits" - } - ] - }, - "response.output_item.added": { - "$id": "2490", - "kind": "model", - "name": "RealtimeResponseOutputItemAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2491", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2492", - "kind": "constant", - "valueType": { - "$id": "2493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.type" - }, - { - "$id": "2494", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.response_id" - }, - { - "$id": "2496", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2497", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.output_index" - }, - { - "$id": "2498", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemAddedCommand.item" - } - ] - }, - "response.output_item.done": { - "$id": "2499", - "kind": "model", - "name": "RealtimeResponseOutputItemDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.output_item.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2500", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2501", - "kind": "constant", - "valueType": { - "$id": "2502", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.output_item.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.type" - }, - { - "$id": "2503", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.response_id" - }, - { - "$id": "2505", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2506", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.output_index" - }, - { - "$id": "2507", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$ref": "2369" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseOutputItemDoneCommand.item" - } - ] - }, - "response.content_part.added": { - "$id": "2508", - "kind": "model", - "name": "RealtimeResponseContentPartAddedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.added", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2509", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2510", - "kind": "constant", - "valueType": { - "$id": "2511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.added", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.type" - }, - { - "$id": "2512", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.response_id" - }, - { - "$id": "2514", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.item_id" - }, - { - "$id": "2516", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2517", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.output_index" - }, - { - "$id": "2518", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2519", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.content_index" - }, - { - "$id": "2520", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartAddedCommand.part" - } - ] - }, - "response.content_part.done": { - "$id": "2521", - "kind": "model", - "name": "RealtimeResponseContentPartDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.content_part.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2522", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2523", - "kind": "constant", - "valueType": { - "$id": "2524", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.content_part.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.type" - }, - { - "$id": "2525", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.response_id" - }, - { - "$id": "2527", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.item_id" - }, - { - "$id": "2529", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2530", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.output_index" - }, - { - "$id": "2531", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2532", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.content_index" - }, - { - "$id": "2533", - "kind": "property", - "name": "part", - "serializedName": "part", - "type": { - "$ref": "2211" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseContentPartDoneCommand.part" - } - ] - }, - "response.audio.delta": { - "$id": "2534", - "kind": "model", - "name": "RealtimeResponseAudioDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2535", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2536", - "kind": "constant", - "valueType": { - "$id": "2537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.type" - }, - { - "$id": "2538", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.response_id" - }, - { - "$id": "2540", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2541", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.item_id" - }, - { - "$id": "2542", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2543", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.output_index" - }, - { - "$id": "2544", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2545", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.content_index" - }, - { - "$id": "2546", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2547", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDeltaCommand.delta" - } - ] - }, - "response.audio.done": { - "$id": "2548", - "kind": "model", - "name": "RealtimeResponseAudioDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2549", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2550", - "kind": "constant", - "valueType": { - "$id": "2551", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.type" - }, - { - "$id": "2552", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2553", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.response_id" - }, - { - "$id": "2554", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2555", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.item_id" - }, - { - "$id": "2556", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2557", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.output_index" - }, - { - "$id": "2558", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2559", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioDoneCommand.content_index" - } - ] - }, - "response.audio_transcript.delta": { - "$id": "2560", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2561", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2562", - "kind": "constant", - "valueType": { - "$id": "2563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.type" - }, - { - "$id": "2564", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2565", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.response_id" - }, - { - "$id": "2566", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.item_id" - }, - { - "$id": "2568", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2569", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.output_index" - }, - { - "$id": "2570", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.content_index" - }, - { - "$id": "2572", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDeltaCommand.delta" - } - ] - }, - "response.audio_transcript.done": { - "$id": "2574", - "kind": "model", - "name": "RealtimeResponseAudioTranscriptDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.audio_transcript.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2575", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2576", - "kind": "constant", - "valueType": { - "$id": "2577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.audio_transcript.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.type" - }, - { - "$id": "2578", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2579", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.response_id" - }, - { - "$id": "2580", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.item_id" - }, - { - "$id": "2582", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2583", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.output_index" - }, - { - "$id": "2584", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2585", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseAudioTranscriptDoneCommand.content_index" - } - ] - }, - "response.text.delta": { - "$id": "2586", - "kind": "model", - "name": "RealtimeResponseTextDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2587", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2588", - "kind": "constant", - "valueType": { - "$id": "2589", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.type" - }, - { - "$id": "2590", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.response_id" - }, - { - "$id": "2592", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.item_id" - }, - { - "$id": "2594", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2595", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.output_index" - }, - { - "$id": "2596", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2597", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.content_index" - }, - { - "$id": "2598", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2599", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDeltaCommand.delta" - } - ] - }, - "response.text.done": { - "$id": "2600", - "kind": "model", - "name": "RealtimeResponseTextDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.text.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2601", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2602", - "kind": "constant", - "valueType": { - "$id": "2603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.text.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.type" - }, - { - "$id": "2604", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2605", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.response_id" - }, - { - "$id": "2606", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.item_id" - }, - { - "$id": "2608", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2609", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.output_index" - }, - { - "$id": "2610", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2611", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.content_index" - }, - { - "$id": "2612", - "kind": "property", - "name": "value", - "serializedName": "value", - "type": { - "$id": "2613", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseTextDoneCommand.value" - } - ] - }, - "response.function_call_arguments.delta": { - "$id": "2614", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDeltaCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.delta", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2615", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2616", - "kind": "constant", - "valueType": { - "$id": "2617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.type" - }, - { - "$id": "2618", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.response_id" - }, - { - "$id": "2620", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2621", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.item_id" - }, - { - "$id": "2622", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2623", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.output_index" - }, - { - "$id": "2624", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2625", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.call_id" - }, - { - "$id": "2626", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$id": "2627", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDeltaCommand.delta" - } - ] - }, - "response.function_call_arguments.done": { - "$id": "2628", - "kind": "model", - "name": "RealtimeResponseFunctionCallArgumentsDoneCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand", - "usage": "Output,Json", - "discriminatorValue": "response.function_call_arguments.done", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2629", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2630", - "kind": "constant", - "valueType": { - "$id": "2631", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "response.function_call_arguments.done", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.type" - }, - { - "$id": "2632", - "kind": "property", - "name": "response_id", - "serializedName": "response_id", - "type": { - "$id": "2633", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.response_id" - }, - { - "$id": "2634", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.item_id" - }, - { - "$id": "2636", - "kind": "property", - "name": "output_index", - "serializedName": "output_index", - "type": { - "$id": "2637", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.output_index" - }, - { - "$id": "2638", - "kind": "property", - "name": "call_id", - "serializedName": "call_id", - "type": { - "$id": "2639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.call_id" - }, - { - "$id": "2640", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2641", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.name" - }, - { - "$id": "2642", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "type": { - "$id": "2643", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseFunctionCallArgumentsDoneCommand.arguments" - } - ] - }, - "input_audio_buffer.speech_started": { - "$id": "2644", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStartedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_started", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2645", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2646", - "kind": "constant", - "valueType": { - "$id": "2647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_started", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.type" - }, - { - "$id": "2648", - "kind": "property", - "name": "audio_start_ms", - "serializedName": "audio_start_ms", - "type": { - "$id": "2649", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.audio_start_ms" - }, - { - "$id": "2650", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2651", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStartedCommand.item_id" - } - ] - }, - "input_audio_buffer.speech_stopped": { - "$id": "2652", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.speech_stopped", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2653", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2654", - "kind": "constant", - "valueType": { - "$id": "2655", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.speech_stopped", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.type" - }, - { - "$id": "2656", - "kind": "property", - "name": "audio_end_ms", - "serializedName": "audio_end_ms", - "type": { - "$id": "2657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.audio_end_ms" - }, - { - "$id": "2658", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2659", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferSpeechStoppedCommand.item_id" - } - ] - }, - "conversation.item.input_audio_transcription.completed": { - "$id": "2660", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.completed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2661", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2662", - "kind": "constant", - "valueType": { - "$id": "2663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.completed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.type" - }, - { - "$id": "2664", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.item_id" - }, - { - "$id": "2666", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2667", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.content_index" - }, - { - "$id": "2668", - "kind": "property", - "name": "transcript", - "serializedName": "transcript", - "type": { - "$id": "2669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionCompletedCommand.transcript" - } - ] - }, - "conversation.item.input_audio_transcription.failed": { - "$id": "2670", - "kind": "model", - "name": "RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand", - "usage": "Output,Json", - "discriminatorValue": "conversation.item.input_audio_transcription.failed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2671", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2672", - "kind": "constant", - "valueType": { - "$id": "2673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "conversation.item.input_audio_transcription.failed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.type" - }, - { - "$id": "2674", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2675", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.item_id" - }, - { - "$id": "2676", - "kind": "property", - "name": "content_index", - "serializedName": "content_index", - "type": { - "$id": "2677", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.content_index" - }, - { - "$id": "2678", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2679", - "kind": "model", - "name": "RealtimeResponseApiError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2680", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.type" - }, - { - "$id": "2682", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.code" - }, - { - "$id": "2684", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2685", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.message" - }, - { - "$id": "2686", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2687", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseApiError.param" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseItemInputAudioTranscriptionFailedCommand.error" - } - ] - }, - "input_audio_buffer.committed": { - "$id": "2688", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferCommittedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.committed", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2689", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2690", - "kind": "constant", - "valueType": { - "$id": "2691", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.committed", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.type" - }, - { - "$id": "2692", - "kind": "property", - "name": "item_id", - "serializedName": "item_id", - "type": { - "$id": "2693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.item_id" - }, - { - "$id": "2694", - "kind": "property", - "name": "previous_item_id", - "serializedName": "previous_item_id", - "type": { - "$id": "2695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferCommittedCommand.previous_item_id" - } - ] - }, - "input_audio_buffer.cleared": { - "$id": "2696", - "kind": "model", - "name": "RealtimeResponseInputAudioBufferClearedCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand", - "usage": "Output,Json", - "discriminatorValue": "input_audio_buffer.cleared", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2697", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2698", - "kind": "constant", - "valueType": { - "$id": "2699", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "input_audio_buffer.cleared", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseInputAudioBufferClearedCommand.type" - } - ] - }, - "error": { - "$id": "2700", - "kind": "model", - "name": "RealtimeResponseErrorCommand", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand", - "usage": "Output,Json", - "description": "A command that describes an error encountered during a realtime operation.", - "discriminatorValue": "error", - "decorators": [], - "baseModel": { - "$ref": "2322" - }, - "properties": [ - { - "$id": "2701", - "kind": "property", - "name": "Kind", - "serializedName": "type", - "type": { - "$id": "2702", - "kind": "constant", - "valueType": { - "$id": "2703", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "error", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.type" - }, - { - "$id": "2704", - "kind": "property", - "name": "error", - "serializedName": "error", - "type": { - "$id": "2705", - "kind": "model", - "name": "RealtimeResponseError", - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2706", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2707", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.type" - }, - { - "$id": "2708", - "kind": "property", - "name": "code", - "serializedName": "code", - "type": { - "$id": "2709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.code" - }, - { - "$id": "2710", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "2711", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.message" - }, - { - "$id": "2712", - "kind": "property", - "name": "param", - "serializedName": "param", - "type": { - "$id": "2713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.param" - }, - { - "$id": "2714", - "kind": "property", - "name": "event_id", - "serializedName": "event_id", - "type": { - "$id": "2715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseError.event_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RealtimeResponseErrorCommand.error" - } - ] - } - } - }, - { - "$ref": "2328" - }, - { - "$ref": "2333" - }, - { - "$ref": "2359" - }, - { - "$ref": "2364" - }, - { - "$ref": "2369" - }, - { - "$ref": "2377" - }, - { - "$ref": "2383" - }, - { - "$ref": "2392" - }, - { - "$ref": "2398" - }, - { - "$ref": "2404" - }, - { - "$ref": "2414" - }, - { - "$ref": "2419" - }, - { - "$ref": "2427" - }, - { - "$ref": "2430" - }, - { - "$ref": "2435" - }, - { - "$ref": "2440" - }, - { - "$ref": "2449" - }, - { - "$ref": "2457" - }, - { - "$ref": "2465" - }, - { - "$ref": "2470" - }, - { - "$ref": "2475" - }, - { - "$ref": "2481" - }, - { - "$ref": "2490" - }, - { - "$ref": "2499" - }, - { - "$ref": "2508" - }, - { - "$ref": "2521" - }, - { - "$ref": "2534" - }, - { - "$ref": "2548" - }, - { - "$ref": "2560" - }, - { - "$ref": "2574" - }, - { - "$ref": "2586" - }, - { - "$ref": "2600" - }, - { - "$ref": "2614" - }, - { - "$ref": "2628" - }, - { - "$ref": "2644" - }, - { - "$ref": "2652" - }, - { - "$ref": "2660" - }, - { - "$ref": "2670" - }, - { - "$ref": "2679" - }, - { - "$ref": "2688" - }, - { - "$ref": "2696" - }, - { - "$ref": "2700" - }, - { - "$ref": "2705" - }, - { - "$id": "2716", - "kind": "model", - "name": "CreateModerationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2717", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input text to classify", - "type": { - "$id": "2718", - "kind": "union", - "name": "CreateModerationRequestInput", - "variantTypes": [ - { - "$id": "2719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "2720", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2721", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.input" - }, - { - "$id": "2722", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", - "type": { - "$ref": "565" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationRequest.model" - } - ] - }, - { - "$id": "2723", - "kind": "model", - "name": "CreateModerationResponse", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse", - "usage": "Output,Json", - "description": "Represents if a given text input is potentially harmful.", - "decorators": [], - "properties": [ - { - "$id": "2724", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The unique identifier for the moderation request.", - "type": { - "$id": "2725", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.id" - }, - { - "$id": "2726", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used to generate the moderation results.", - "type": { - "$id": "2727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.model" - }, - { - "$id": "2728", - "kind": "property", - "name": "results", - "serializedName": "results", - "description": "A list of moderation objects.", - "type": { - "$id": "2729", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2730", - "kind": "model", - "name": "CreateModerationResponseResult", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2731", - "kind": "property", - "name": "flagged", - "serializedName": "flagged", - "description": "Whether any of the below categories are flagged.", - "type": { - "$id": "2732", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.flagged" - }, - { - "$id": "2733", - "kind": "property", - "name": "categories", - "serializedName": "categories", - "description": "A list of the categories, and whether they are flagged or not.", - "type": { - "$id": "2734", - "kind": "model", - "name": "CreateModerationResponseResultCategories", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2735", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.", - "type": { - "$id": "2736", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate" - }, - { - "$id": "2737", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", - "type": { - "$id": "2738", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.hate/threatening" - }, - { - "$id": "2739", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "Content that expresses, incites, or promotes harassing language towards any target.", - "type": { - "$id": "2740", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment" - }, - { - "$id": "2741", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "Harassment content that also includes violence or serious harm towards any target.", - "type": { - "$id": "2742", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.harassment/threatening" - }, - { - "$id": "2743", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2744", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm" - }, - { - "$id": "2745", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", - "type": { - "$id": "2746", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/intent" - }, - { - "$id": "2747", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", - "type": { - "$id": "2748", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.self-harm/instructions" - }, - { - "$id": "2749", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", - "type": { - "$id": "2750", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual" - }, - { - "$id": "2751", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "Sexual content that includes an individual who is under 18 years old.", - "type": { - "$id": "2752", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.sexual/minors" - }, - { - "$id": "2753", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "Content that depicts death, violence, or physical injury.", - "type": { - "$id": "2754", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence" - }, - { - "$id": "2755", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "Content that depicts death, violence, or physical injury in graphic detail.", - "type": { - "$id": "2756", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.categories.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.categories" - }, - { - "$id": "2757", - "kind": "property", - "name": "category_scores", - "serializedName": "category_scores", - "description": "A list of the categories along with their scores as predicted by model.", - "type": { - "$id": "2758", - "kind": "model", - "name": "CreateModerationResponseResultCategoryScores", - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2759", - "kind": "property", - "name": "hate", - "serializedName": "hate", - "description": "The score for the category 'hate'.", - "type": { - "$id": "2760", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate" - }, - { - "$id": "2761", - "kind": "property", - "name": "hate/threatening", - "serializedName": "hate/threatening", - "description": "The score for the category 'hate/threatening'.", - "type": { - "$id": "2762", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.hate/threatening" - }, - { - "$id": "2763", - "kind": "property", - "name": "harassment", - "serializedName": "harassment", - "description": "The score for the category 'harassment'.", - "type": { - "$id": "2764", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment" - }, - { - "$id": "2765", - "kind": "property", - "name": "harassment/threatening", - "serializedName": "harassment/threatening", - "description": "The score for the category 'harassment/threatening'.", - "type": { - "$id": "2766", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.harassment/threatening" - }, - { - "$id": "2767", - "kind": "property", - "name": "self-harm", - "serializedName": "self-harm", - "description": "The score for the category 'self-harm'.", - "type": { - "$id": "2768", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm" - }, - { - "$id": "2769", - "kind": "property", - "name": "self-harm/intent", - "serializedName": "self-harm/intent", - "description": "The score for the category 'self-harm/intent'.", - "type": { - "$id": "2770", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/intent" - }, - { - "$id": "2771", - "kind": "property", - "name": "self-harm/instructions", - "serializedName": "self-harm/instructions", - "description": "The score for the category 'self-harm/instructions'.", - "type": { - "$id": "2772", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.self-harm/instructions" - }, - { - "$id": "2773", - "kind": "property", - "name": "sexual", - "serializedName": "sexual", - "description": "The score for the category 'sexual'.", - "type": { - "$id": "2774", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual" - }, - { - "$id": "2775", - "kind": "property", - "name": "sexual/minors", - "serializedName": "sexual/minors", - "description": "The score for the category 'sexual/minors'.", - "type": { - "$id": "2776", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.sexual/minors" - }, - { - "$id": "2777", - "kind": "property", - "name": "violence", - "serializedName": "violence", - "description": "The score for the category 'violence'.", - "type": { - "$id": "2778", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence" - }, - { - "$id": "2779", - "kind": "property", - "name": "violence/graphic", - "serializedName": "violence/graphic", - "description": "The score for the category 'violence/graphic'.", - "type": { - "$id": "2780", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.category_scores.anonymous.violence/graphic" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.result.anonymous.category_scores" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateModerationResponse.results" - } - ] - }, - { - "$ref": "2730" - }, - { - "$ref": "2734" - }, - { - "$ref": "2758" - }, - { - "$id": "2781", - "kind": "model", - "name": "ListModelsResponse", - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2782", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2783", - "kind": "constant", - "valueType": { - "$ref": "571" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.object" - }, - { - "$id": "2784", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2785", - "kind": "array", - "name": "ArrayModel", - "valueType": { - "$id": "2786", - "kind": "model", - "name": "Model", - "crossLanguageDefinitionId": "OpenAI.Model", - "usage": "Output,Json", - "description": "Describes an OpenAI model offering that can be used with the API.", - "decorators": [], - "properties": [ - { - "$id": "2787", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The model identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.id" - }, - { - "$id": "2789", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) when the model was created.", - "type": { - "$id": "2790", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2791", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.created" - }, - { - "$id": "2792", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"model\".", - "type": { - "$id": "2793", - "kind": "constant", - "valueType": { - "$ref": "574" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.object" - }, - { - "$id": "2794", - "kind": "property", - "name": "owned_by", - "serializedName": "owned_by", - "description": "The organization that owns the model.", - "type": { - "$id": "2795", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Model.owned_by" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListModelsResponse.data" - } - ] - }, - { - "$ref": "2786" - }, - { - "$id": "2796", - "kind": "model", - "name": "DeleteModelResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2797", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.id" - }, - { - "$id": "2799", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2800", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.deleted" - }, - { - "$id": "2801", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2802", - "kind": "constant", - "valueType": { - "$ref": "577" - }, - "value": "model", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteModelResponse.object" - } - ] - }, - { - "$id": "2803", - "kind": "model", - "name": "MessageObject", - "crossLanguageDefinitionId": "OpenAI.MessageObject", - "usage": "Output,Json", - "description": "Represents a message within a [thread](/docs/api-reference/threads).", - "decorators": [], - "properties": [ - { - "$id": "2804", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "2805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.id" - }, - { - "$id": "2806", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message`.", - "type": { - "$id": "2807", - "kind": "constant", - "valueType": { - "$ref": "580" - }, - "value": "thread.message", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.object" - }, - { - "$id": "2808", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the message was created.", - "type": { - "$id": "2809", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2810", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.created_at" - }, - { - "$id": "2811", - "kind": "property", - "name": "thread_id", - "serializedName": "thread_id", - "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", - "type": { - "$id": "2812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.thread_id" - }, - { - "$id": "2813", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", - "type": { - "$ref": "583" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.status" - }, - { - "$id": "2814", - "kind": "property", - "name": "incomplete_details", - "serializedName": "incomplete_details", - "description": "On an incomplete message, details about why the message is incomplete.", - "type": { - "$id": "2815", - "kind": "nullable", - "type": { - "$id": "2816", - "kind": "model", - "name": "MessageObjectIncompleteDetails", - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2817", - "kind": "property", - "name": "reason", - "serializedName": "reason", - "description": "The reason the message is incomplete.", - "type": { - "$ref": "591" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details.anonymous.reason" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_details" - }, - { - "$id": "2818", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the message was completed.", - "type": { - "$id": "2819", - "kind": "nullable", - "type": { - "$id": "2820", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2821", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.completed_at" - }, - { - "$id": "2822", - "kind": "property", - "name": "incomplete_at", - "serializedName": "incomplete_at", - "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", - "type": { - "$id": "2823", - "kind": "nullable", - "type": { - "$id": "2824", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2825", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.incomplete_at" - }, - { - "$id": "2826", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "603" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.role" - }, - { - "$id": "2827", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "2828", - "kind": "array", - "name": "ArrayMessageContent", - "valueType": { - "$ref": "1530" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.content" - }, - { - "$id": "2829", - "kind": "property", - "name": "assistant_id", - "serializedName": "assistant_id", - "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", - "type": { - "$id": "2830", - "kind": "nullable", - "type": { - "$id": "2831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.assistant_id" - }, - { - "$id": "2832", - "kind": "property", - "name": "run_id", - "serializedName": "run_id", - "description": "The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.", - "type": { - "$id": "2833", - "kind": "nullable", - "type": { - "$id": "2834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.run_id" - }, - { - "$id": "2835", - "kind": "property", - "name": "attachments", - "serializedName": "attachments", - "description": "A list of files attached to the message, and the tools they were added to.", - "type": { - "$id": "2836", - "kind": "nullable", - "type": { - "$id": "2837", - "kind": "array", - "name": "MessageObjectAttachments", - "valueType": { - "$id": "2838", - "kind": "model", - "name": "MessageObjectAttachment", - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2839", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file to attach to the message.", - "type": { - "$id": "2840", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.file_id" - }, - { - "$id": "2841", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "The tools to add this file to.", - "type": { - "$id": "2842", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2843", - "kind": "union", - "name": "MessageObjectAttachmentTool", - "variantTypes": [ - { - "$ref": "1540" - }, - { - "$ref": "1577" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachment.anonymous.tools" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.MessageObjectAttachments", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.attachments" - }, - { - "$id": "2844", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2845", - "kind": "nullable", - "type": { - "$id": "2846", - "kind": "dict", - "keyType": { - "$id": "2847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2848", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageObject.metadata" - } - ] - }, - { - "$ref": "2816" - }, - { - "$ref": "2838" - }, - { - "$id": "2849", - "kind": "model", - "name": "ListMessagesResponse", - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2850", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2851", - "kind": "constant", - "valueType": { - "$ref": "615" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.object" - }, - { - "$id": "2852", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2853", - "kind": "array", - "name": "ArrayMessageObject", - "valueType": { - "$ref": "2803" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.data" - }, - { - "$id": "2854", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "2855", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.first_id" - }, - { - "$id": "2856", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "2857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.last_id" - }, - { - "$id": "2858", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "2859", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListMessagesResponse.has_more" - } - ] - }, - { - "$id": "2860", - "kind": "model", - "name": "ModifyMessageRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2861", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "2862", - "kind": "nullable", - "type": { - "$id": "2863", - "kind": "dict", - "keyType": { - "$id": "2864", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "2865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyMessageRequest.metadata" - } - ] - }, - { - "$id": "2866", - "kind": "model", - "name": "DeleteMessageResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2867", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "2868", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.id" - }, - { - "$id": "2869", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "2870", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.deleted" - }, - { - "$id": "2871", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "2872", - "kind": "constant", - "valueType": { - "$ref": "618" - }, - "value": "thread.message.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteMessageResponse.object" - } - ] - }, - { - "$id": "2873", - "kind": "model", - "name": "CreateImageRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2874", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.", - "type": { - "$id": "2875", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.prompt" - }, - { - "$id": "2876", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation.", - "type": { - "$id": "2877", - "kind": "nullable", - "type": { - "$ref": "621" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.model" - }, - { - "$id": "2878", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2879", - "kind": "nullable", - "type": { - "$id": "2880", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.n" - }, - { - "$id": "2881", - "kind": "property", - "name": "quality", - "serializedName": "quality", - "description": "The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.", - "type": { - "$ref": "627" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.quality" - }, - { - "$id": "2882", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2883", - "kind": "nullable", - "type": { - "$ref": "633" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.response_format" - }, - { - "$id": "2884", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.", - "type": { - "$id": "2885", - "kind": "nullable", - "type": { - "$ref": "639" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.size" - }, - { - "$id": "2886", - "kind": "property", - "name": "style", - "serializedName": "style", - "description": "The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.", - "type": { - "$id": "2887", - "kind": "nullable", - "type": { - "$ref": "651" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.style" - }, - { - "$id": "2888", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageRequest.user" - } - ] - }, - { - "$id": "2890", - "kind": "model", - "name": "ImagesResponse", - "crossLanguageDefinitionId": "OpenAI.ImagesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2891", - "kind": "property", - "name": "created", - "serializedName": "created", - "type": { - "$id": "2892", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2893", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.created" - }, - { - "$id": "2894", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "2895", - "kind": "array", - "name": "ArrayImage", - "valueType": { - "$id": "2896", - "kind": "model", - "name": "Image", - "crossLanguageDefinitionId": "OpenAI.Image", - "usage": "Output,Json", - "description": "Represents the url or the content of an image generated by the OpenAI API.", - "decorators": [], - "properties": [ - { - "$id": "2897", - "kind": "property", - "name": "b64_json", - "serializedName": "b64_json", - "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", - "type": { - "$id": "2898", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.b64_json" - }, - { - "$id": "2899", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the generated image, if `response_format` is `url` (default).", - "type": { - "$id": "2900", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.url" - }, - { - "$id": "2901", - "kind": "property", - "name": "revised_prompt", - "serializedName": "revised_prompt", - "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", - "type": { - "$id": "2902", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Image.revised_prompt" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ImagesResponse.data" - } - ] - }, - { - "$ref": "2896" - }, - { - "$id": "2903", - "kind": "model", - "name": "CreateImageEditRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2904", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", - "type": { - "$id": "2905", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.image" - }, - { - "$id": "2906", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "A text description of the desired image(s). The maximum length is 1000 characters.", - "type": { - "$id": "2907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.prompt" - }, - { - "$id": "2908", - "kind": "property", - "name": "mask", - "serializedName": "mask", - "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", - "type": { - "$id": "2909", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.mask" - }, - { - "$id": "2910", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2911", - "kind": "nullable", - "type": { - "$ref": "657" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.model" - }, - { - "$id": "2912", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10.", - "type": { - "$id": "2913", - "kind": "nullable", - "type": { - "$id": "2914", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.n" - }, - { - "$id": "2915", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2916", - "kind": "nullable", - "type": { - "$ref": "661" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.size" - }, - { - "$id": "2917", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2918", - "kind": "nullable", - "type": { - "$ref": "669" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.response_format" - }, - { - "$id": "2919", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageEditRequest.user" - } - ] - }, - { - "$id": "2921", - "kind": "model", - "name": "CreateImageVariationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "2922", - "kind": "property", - "name": "image", - "serializedName": "image", - "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", - "type": { - "$id": "2923", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.image" - }, - { - "$id": "2924", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", - "type": { - "$id": "2925", - "kind": "nullable", - "type": { - "$ref": "675" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.model" - }, - { - "$id": "2926", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.", - "type": { - "$id": "2927", - "kind": "nullable", - "type": { - "$id": "2928", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.n" - }, - { - "$id": "2929", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.", - "type": { - "$id": "2930", - "kind": "nullable", - "type": { - "$ref": "679" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.response_format" - }, - { - "$id": "2931", - "kind": "property", - "name": "size", - "serializedName": "size", - "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "type": { - "$id": "2932", - "kind": "nullable", - "type": { - "$ref": "685" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.size" - }, - { - "$id": "2933", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "2934", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateImageVariationRequest.user" - } - ] - }, - { - "$id": "2935", - "kind": "model", - "name": "CreateFineTuningJobRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2936", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/which-models-can-be-fine-tuned).", - "type": { - "$ref": "693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.model" - }, - { - "$id": "2937", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) format.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.training_file" - }, - { - "$id": "2939", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job.", - "type": { - "$id": "2940", - "kind": "model", - "name": "CreateFineTuningJobRequestHyperparameters", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2941", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "2942", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "703" - }, - { - "$id": "2943", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.n_epochs" - }, - { - "$id": "2944", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "2945", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "707" - }, - { - "$id": "2946", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.batch_size" - }, - { - "$id": "2947", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "2948", - "kind": "union", - "name": "CreateFineTuningJobRequestHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "711" - }, - { - "$id": "2949", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.hyperparameters" - }, - { - "$id": "2950", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.", - "type": { - "$id": "2951", - "kind": "nullable", - "type": { - "$id": "2952", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.suffix" - }, - { - "$id": "2953", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "2954", - "kind": "nullable", - "type": { - "$id": "2955", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.validation_file" - }, - { - "$id": "2956", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for your fine-tuning job.", - "type": { - "$id": "2957", - "kind": "nullable", - "type": { - "$id": "2958", - "kind": "array", - "name": "CreateFineTuningJobRequestIntegrations", - "valueType": { - "$id": "2959", - "kind": "model", - "name": "CreateFineTuningJobRequestIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "2960", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegration.type" - }, - "properties": [ - { - "$ref": "2960" - } - ], - "discriminatedSubtypes": { - "$id": "2962", - "wandb": { - "$id": "2963", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegration", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration", - "usage": "Input,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "2959" - }, - "properties": [ - { - "$id": "2964", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "2965", - "kind": "constant", - "valueType": { - "$id": "2966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.type" - }, - { - "$id": "2967", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "type": { - "$id": "2968", - "kind": "model", - "name": "CreateFineTuningJobRequestWandbIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "2969", - "kind": "property", - "name": "project", - "serializedName": "project", - "type": { - "$id": "2970", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.project" - }, - { - "$id": "2971", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "2972", - "kind": "nullable", - "type": { - "$id": "2973", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.name" - }, - { - "$id": "2974", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "type": { - "$id": "2975", - "kind": "nullable", - "type": { - "$id": "2976", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.entity" - }, - { - "$id": "2977", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "type": { - "$id": "2978", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "2979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestWandbIntegration.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequestIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.integrations" - }, - { - "$id": "2980", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.", - "type": { - "$id": "2981", - "kind": "nullable", - "type": { - "$id": "2982", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFineTuningJobRequest.seed" - } - ] - }, - { - "$ref": "2940" - }, - { - "$ref": "2959" - }, - { - "$ref": "2963" - }, - { - "$ref": "2968" - }, - { - "$id": "2983", - "kind": "model", - "name": "FineTuningJob", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob", - "usage": "Output,Json", - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", - "decorators": [], - "properties": [ - { - "$id": "2984", - "kind": "property", - "name": "user_provided_suffix", - "serializedName": "user_provided_suffix", - "description": "The descriptive suffix applied to the job, as specified in the job creation request.", - "type": { - "$id": "2985", - "kind": "nullable", - "type": { - "$id": "2986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.user_provided_suffix" - }, - { - "$id": "2987", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The object identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "2988", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.id" - }, - { - "$id": "2989", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", - "type": { - "$id": "2990", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "2991", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.created_at" - }, - { - "$id": "2992", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", - "type": { - "$id": "2993", - "kind": "nullable", - "type": { - "$id": "2994", - "kind": "model", - "name": "FineTuningJobError", - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "2995", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "2996", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.code" - }, - { - "$id": "2997", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "2998", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.message" - }, - { - "$id": "2999", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", - "type": { - "$id": "3000", - "kind": "nullable", - "type": { - "$id": "3001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error.anonymous.param" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.error" - }, - { - "$id": "3002", - "kind": "property", - "name": "fine_tuned_model", - "serializedName": "fine_tuned_model", - "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3003", - "kind": "nullable", - "type": { - "$id": "3004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.fine_tuned_model" - }, - { - "$id": "3005", - "kind": "property", - "name": "finished_at", - "serializedName": "finished_at", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3006", - "kind": "nullable", - "type": { - "$id": "3007", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3008", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.finished_at" - }, - { - "$id": "3009", - "kind": "property", - "name": "hyperparameters", - "serializedName": "hyperparameters", - "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", - "type": { - "$id": "3010", - "kind": "model", - "name": "FineTuningJobHyperparameters", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3011", - "kind": "property", - "name": "n_epochs", - "serializedName": "n_epochs", - "description": "The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.", - "type": { - "$id": "3012", - "kind": "union", - "name": "FineTuningJobHyperparametersNEpochs", - "variantTypes": [ - { - "$ref": "715" - }, - { - "$id": "3013", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.n_epochs" - }, - { - "$id": "3014", - "kind": "property", - "name": "batch_size", - "serializedName": "batch_size", - "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.", - "type": { - "$id": "3015", - "kind": "union", - "name": "FineTuningJobHyperparametersBatchSize", - "variantTypes": [ - { - "$ref": "719" - }, - { - "$id": "3016", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.batch_size" - }, - { - "$id": "3017", - "kind": "property", - "name": "learning_rate_multiplier", - "serializedName": "learning_rate_multiplier", - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.", - "type": { - "$id": "3018", - "kind": "union", - "name": "FineTuningJobHyperparametersLearningRateMultiplier", - "variantTypes": [ - { - "$ref": "723" - }, - { - "$id": "3019", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobHyperparameters.learning_rate_multiplier" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.hyperparameters" - }, - { - "$id": "3020", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The base model that is being fine-tuned.", - "type": { - "$id": "3021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.model" - }, - { - "$id": "3022", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job\".", - "type": { - "$id": "3023", - "kind": "constant", - "valueType": { - "$ref": "727" - }, - "value": "fine_tuning.job", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.object" - }, - { - "$id": "3024", - "kind": "property", - "name": "organization_id", - "serializedName": "organization_id", - "description": "The organization that owns the fine-tuning job.", - "type": { - "$id": "3025", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.organization_id" - }, - { - "$id": "3026", - "kind": "property", - "name": "result_files", - "serializedName": "result_files", - "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3027", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.result_files" - }, - { - "$id": "3029", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", - "type": { - "$ref": "730" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.status" - }, - { - "$id": "3030", - "kind": "property", - "name": "trained_tokens", - "serializedName": "trained_tokens", - "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", - "type": { - "$id": "3031", - "kind": "nullable", - "type": { - "$id": "3032", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.trained_tokens" - }, - { - "$id": "3033", - "kind": "property", - "name": "training_file", - "serializedName": "training_file", - "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3034", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.training_file" - }, - { - "$id": "3035", - "kind": "property", - "name": "validation_file", - "serializedName": "validation_file", - "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", - "type": { - "$id": "3036", - "kind": "nullable", - "type": { - "$id": "3037", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.validation_file" - }, - { - "$id": "3038", - "kind": "property", - "name": "integrations", - "serializedName": "integrations", - "description": "A list of integrations to enable for this fine-tuning job.", - "type": { - "$id": "3039", - "kind": "nullable", - "type": { - "$id": "3040", - "kind": "array", - "name": "FineTuningJobIntegrations", - "valueType": { - "$id": "3041", - "kind": "model", - "name": "FineTuningIntegration", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration", - "usage": "Output,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3042", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegration.type" - }, - "properties": [ - { - "$ref": "3042" - } - ], - "discriminatedSubtypes": { - "$id": "3044", - "wandb": { - "$id": "3045", - "kind": "model", - "name": "FineTuningIntegrationWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb", - "usage": "Output,Json", - "discriminatorValue": "wandb", - "decorators": [], - "baseModel": { - "$ref": "3041" - }, - "properties": [ - { - "$id": "3046", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the integration being enabled for the fine-tuning job", - "type": { - "$id": "3047", - "kind": "constant", - "valueType": { - "$id": "3048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "wandb", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.type" - }, - { - "$id": "3049", - "kind": "property", - "name": "wandb", - "serializedName": "wandb", - "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.", - "type": { - "$id": "3050", - "kind": "model", - "name": "FineTuningIntegrationWandbWandb", - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3051", - "kind": "property", - "name": "project", - "serializedName": "project", - "description": "The name of the project that the new run will be created under.", - "type": { - "$id": "3052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.project" - }, - { - "$id": "3053", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "A display name to set for the run. If not set, we will use the Job ID as the name.", - "type": { - "$id": "3054", - "kind": "nullable", - "type": { - "$id": "3055", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.name" - }, - { - "$id": "3056", - "kind": "property", - "name": "entity", - "serializedName": "entity", - "description": "The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.", - "type": { - "$id": "3057", - "kind": "nullable", - "type": { - "$id": "3058", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.entity" - }, - { - "$id": "3059", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "description": "A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".", - "type": { - "$id": "3060", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb.anonymous.tags" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningIntegrationWandb.wandb" - } - ] - } - } - }, - "crossLanguageDefinitionId": "OpenAI.FineTuningJobIntegrations", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.integrations" - }, - { - "$id": "3062", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "The seed used for the fine-tuning job.", - "type": { - "$id": "3063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.seed" - }, - { - "$id": "3064", - "kind": "property", - "name": "estimated_finish", - "serializedName": "estimated_finish", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", - "type": { - "$id": "3065", - "kind": "nullable", - "type": { - "$id": "3066", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3067", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJob.estimated_finish" - } - ] - }, - { - "$ref": "2994" - }, - { - "$ref": "3010" - }, - { - "$ref": "3041" - }, - { - "$ref": "3045" - }, - { - "$ref": "3050" - }, - { - "$id": "3068", - "kind": "model", - "name": "ListPaginatedFineTuningJobsResponse", - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3069", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3070", - "kind": "array", - "name": "ArrayFineTuningJob", - "valueType": { - "$ref": "2983" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.data" - }, - { - "$id": "3071", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3072", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.has_more" - }, - { - "$id": "3073", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3074", - "kind": "constant", - "valueType": { - "$ref": "744" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListPaginatedFineTuningJobsResponse.object" - } - ] - }, - { - "$id": "3075", - "kind": "model", - "name": "ListFineTuningJobCheckpointsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3076", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3077", - "kind": "array", - "name": "ArrayFineTuningJobCheckpoint", - "valueType": { - "$id": "3078", - "kind": "model", - "name": "FineTuningJobCheckpoint", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint", - "usage": "Output,Json", - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", - "decorators": [], - "properties": [ - { - "$id": "3079", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The checkpoint identifier, which can be referenced in the API endpoints.", - "type": { - "$id": "3080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.id" - }, - { - "$id": "3081", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", - "type": { - "$id": "3082", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3083", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.created_at" - }, - { - "$id": "3084", - "kind": "property", - "name": "fine_tuned_model_checkpoint", - "serializedName": "fine_tuned_model_checkpoint", - "description": "The name of the fine-tuned checkpoint model that is created.", - "type": { - "$id": "3085", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuned_model_checkpoint" - }, - { - "$id": "3086", - "kind": "property", - "name": "step_number", - "serializedName": "step_number", - "description": "The step number that the checkpoint was created at.", - "type": { - "$id": "3087", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.step_number" - }, - { - "$id": "3088", - "kind": "property", - "name": "metrics", - "serializedName": "metrics", - "description": "Metrics at the step number during the fine-tuning job.", - "type": { - "$id": "3089", - "kind": "model", - "name": "FineTuningJobCheckpointMetrics", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3090", - "kind": "property", - "name": "step", - "serializedName": "step", - "type": { - "$id": "3091", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.step" - }, - { - "$id": "3092", - "kind": "property", - "name": "train_loss", - "serializedName": "train_loss", - "type": { - "$id": "3093", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_loss" - }, - { - "$id": "3094", - "kind": "property", - "name": "train_mean_token_accuracy", - "serializedName": "train_mean_token_accuracy", - "type": { - "$id": "3095", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.train_mean_token_accuracy" - }, - { - "$id": "3096", - "kind": "property", - "name": "valid_loss", - "serializedName": "valid_loss", - "type": { - "$id": "3097", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_loss" - }, - { - "$id": "3098", - "kind": "property", - "name": "valid_mean_token_accuracy", - "serializedName": "valid_mean_token_accuracy", - "type": { - "$id": "3099", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.valid_mean_token_accuracy" - }, - { - "$id": "3100", - "kind": "property", - "name": "full_valid_loss", - "serializedName": "full_valid_loss", - "type": { - "$id": "3101", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_loss" - }, - { - "$id": "3102", - "kind": "property", - "name": "full_valid_mean_token_accuracy", - "serializedName": "full_valid_mean_token_accuracy", - "type": { - "$id": "3103", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics.anonymous.full_valid_mean_token_accuracy" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.metrics" - }, - { - "$id": "3104", - "kind": "property", - "name": "fine_tuning_job_id", - "serializedName": "fine_tuning_job_id", - "description": "The name of the fine-tuning job that this checkpoint was created from.", - "type": { - "$id": "3105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.fine_tuning_job_id" - }, - { - "$id": "3106", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "type": { - "$id": "3107", - "kind": "constant", - "valueType": { - "$ref": "747" - }, - "value": "fine_tuning.job.checkpoint", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobCheckpoint.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.data" - }, - { - "$id": "3108", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3109", - "kind": "constant", - "valueType": { - "$ref": "750" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.object" - }, - { - "$id": "3110", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3111", - "kind": "nullable", - "type": { - "$id": "3112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.first_id" - }, - { - "$id": "3113", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3114", - "kind": "nullable", - "type": { - "$id": "3115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.last_id" - }, - { - "$id": "3116", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3117", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobCheckpointsResponse.has_more" - } - ] - }, - { - "$ref": "3078" - }, - { - "$ref": "3089" - }, - { - "$id": "3118", - "kind": "model", - "name": "ListFineTuningJobEventsResponse", - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3119", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3120", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.has_more" - }, - { - "$id": "3121", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3122", - "kind": "array", - "name": "ArrayFineTuningJobEvent", - "valueType": { - "$id": "3123", - "kind": "model", - "name": "FineTuningJobEvent", - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent", - "usage": "Output,Json", - "description": "Fine-tuning job event object", - "decorators": [], - "properties": [ - { - "$id": "3124", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.id" - }, - { - "$id": "3126", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "type": { - "$id": "3127", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3128", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.created_at" - }, - { - "$id": "3129", - "kind": "property", - "name": "level", - "serializedName": "level", - "type": { - "$ref": "753" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.level" - }, - { - "$id": "3130", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.message" - }, - { - "$id": "3132", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3133", - "kind": "constant", - "valueType": { - "$ref": "761" - }, - "value": "fine_tuning.job.event", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FineTuningJobEvent.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.data" - }, - { - "$id": "3134", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3135", - "kind": "constant", - "valueType": { - "$ref": "764" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFineTuningJobEventsResponse.object" - } - ] - }, - { - "$ref": "3123" - }, - { - "$id": "3136", - "kind": "model", - "name": "CreateFileRequest", - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3137", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The File object (not file name) to be uploaded.", - "type": { - "$id": "3138", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.file" - }, - { - "$id": "3139", - "kind": "property", - "name": "purpose", - "serializedName": "purpose", - "description": "The intended purpose of the uploaded file.\n\nUse \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Message](/docs/api-reference/messages) files, \"vision\" for Assistants image file inputs, \"batch\" for [Batch API](/docs/guides/batch), and \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning).", - "type": { - "$ref": "767" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateFileRequest.purpose" - } - ] - }, - { - "$id": "3140", - "kind": "model", - "name": "ListFilesResponse", - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3141", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3142", - "kind": "array", - "name": "ArrayOpenAiFile", - "valueType": { - "$ref": "1275" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.data" - }, - { - "$id": "3143", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3144", - "kind": "constant", - "valueType": { - "$ref": "777" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListFilesResponse.object" - } - ] - }, - { - "$id": "3145", - "kind": "model", - "name": "DeleteFileResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3146", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.id" - }, - { - "$id": "3148", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3149", - "kind": "constant", - "valueType": { - "$ref": "780" - }, - "value": "file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.object" - }, - { - "$id": "3150", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3151", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteFileResponse.deleted" - } - ] - }, - { - "$id": "3152", - "kind": "model", - "name": "CreateEmbeddingRequest", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3153", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3154", - "kind": "union", - "name": "CreateEmbeddingRequestInput", - "variantTypes": [ - { - "$id": "3155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3156", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3158", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3159", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3160", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3161", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3162", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.input" - }, - { - "$id": "3163", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "783" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.model" - }, - { - "$id": "3164", - "kind": "property", - "name": "encoding_format", - "serializedName": "encoding_format", - "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", - "type": { - "$ref": "791" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.encoding_format" - }, - { - "$id": "3165", - "kind": "property", - "name": "dimensions", - "serializedName": "dimensions", - "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", - "type": { - "$id": "3166", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.dimensions" - }, - { - "$id": "3167", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3168", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingRequest.user" - } - ] - }, - { - "$id": "3169", - "kind": "model", - "name": "CreateEmbeddingResponse", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3170", - "kind": "property", - "name": "data", - "serializedName": "data", - "description": "The list of embeddings generated by the model.", - "type": { - "$id": "3171", - "kind": "array", - "name": "ArrayEmbedding", - "valueType": { - "$id": "3172", - "kind": "model", - "name": "Embedding", - "crossLanguageDefinitionId": "OpenAI.Embedding", - "usage": "Output,Json", - "description": "Represents an embedding vector returned by embedding endpoint.", - "decorators": [], - "properties": [ - { - "$id": "3173", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the embedding in the list of embeddings.", - "type": { - "$id": "3174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.index" - }, - { - "$id": "3175", - "kind": "property", - "name": "embedding", - "serializedName": "embedding", - "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).", - "type": { - "$id": "3176", - "kind": "union", - "name": "EmbeddingEmbedding", - "variantTypes": [ - { - "$id": "3177", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3178", - "kind": "float", - "name": "float", - "crossLanguageDefinitionId": "TypeSpec.float", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3179", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.embedding" - }, - { - "$id": "3180", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"embedding\".", - "type": { - "$id": "3181", - "kind": "constant", - "valueType": { - "$ref": "797" - }, - "value": "embedding", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Embedding.object" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.data" - }, - { - "$id": "3182", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The name of the model used to generate the embedding.", - "type": { - "$id": "3183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.model" - }, - { - "$id": "3184", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"list\".", - "type": { - "$id": "3185", - "kind": "constant", - "valueType": { - "$ref": "800" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.object" - }, - { - "$id": "3186", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "The usage information for the request.", - "type": { - "$id": "3187", - "kind": "model", - "name": "CreateEmbeddingResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3188", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "The number of tokens used by the prompt.", - "type": { - "$id": "3189", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "3190", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "The total number of tokens used by the request.", - "type": { - "$id": "3191", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateEmbeddingResponse.usage" - } - ] - }, - { - "$ref": "3172" - }, - { - "$ref": "3187" - }, - { - "$id": "3192", - "kind": "model", - "name": "CreateCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3193", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "803" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.model" - }, - { - "$id": "3194", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.", - "type": { - "$id": "3195", - "kind": "nullable", - "type": { - "$id": "3196", - "kind": "union", - "name": "CreateCompletionRequestPrompt", - "variantTypes": [ - { - "$id": "3197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3198", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3200", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3201", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "3202", - "kind": "array", - "name": "ArrayArray", - "valueType": { - "$id": "3203", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3204", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.prompt" - }, - { - "$id": "3205", - "kind": "property", - "name": "best_of", - "serializedName": "best_of", - "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3206", - "kind": "nullable", - "type": { - "$id": "3207", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.best_of" - }, - { - "$id": "3208", - "kind": "property", - "name": "echo", - "serializedName": "echo", - "description": "Echo back the prompt in addition to the completion", - "type": { - "$id": "3209", - "kind": "nullable", - "type": { - "$id": "3210", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.echo" - }, - { - "$id": "3211", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3212", - "kind": "nullable", - "type": { - "$id": "3213", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.frequency_penalty" - }, - { - "$id": "3214", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.", - "type": { - "$id": "3215", - "kind": "nullable", - "type": { - "$id": "3216", - "kind": "dict", - "keyType": { - "$id": "3217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3218", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logit_bias" - }, - { - "$id": "3219", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.", - "type": { - "$id": "3220", - "kind": "nullable", - "type": { - "$id": "3221", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.logprobs" - }, - { - "$id": "3222", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.", - "type": { - "$id": "3223", - "kind": "nullable", - "type": { - "$id": "3224", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.max_tokens" - }, - { - "$id": "3225", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", - "type": { - "$id": "3226", - "kind": "nullable", - "type": { - "$id": "3227", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.n" - }, - { - "$id": "3228", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3229", - "kind": "nullable", - "type": { - "$id": "3230", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.presence_penalty" - }, - { - "$id": "3231", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3232", - "kind": "nullable", - "type": { - "$id": "3233", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.seed" - }, - { - "$id": "3234", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.", - "type": { - "$id": "3235", - "kind": "nullable", - "type": { - "$id": "3236", - "kind": "union", - "name": "CreateCompletionRequestStop", - "variantTypes": [ - { - "$id": "3237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3238", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stop" - }, - { - "$id": "3240", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3241", - "kind": "nullable", - "type": { - "$id": "3242", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream" - }, - { - "$id": "3243", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3244", - "kind": "nullable", - "type": { - "$id": "3245", - "kind": "model", - "name": "ChatCompletionStreamOptions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions", - "usage": "Input,Json", - "description": "Options for streaming response. Only set this when you set `stream: true`.", - "decorators": [], - "properties": [ - { - "$id": "3246", - "kind": "property", - "name": "include_usage", - "serializedName": "include_usage", - "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", - "type": { - "$id": "3247", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamOptions.include_usage" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.stream_options" - }, - { - "$id": "3248", - "kind": "property", - "name": "suffix", - "serializedName": "suffix", - "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.", - "type": { - "$id": "3249", - "kind": "nullable", - "type": { - "$id": "3250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.suffix" - }, - { - "$id": "3251", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3252", - "kind": "nullable", - "type": { - "$id": "3253", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.temperature" - }, - { - "$id": "3254", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3255", - "kind": "nullable", - "type": { - "$id": "3256", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.top_p" - }, - { - "$id": "3257", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3258", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionRequest.user" - } - ] - }, - { - "$ref": "3245" - }, - { - "$id": "3259", - "kind": "model", - "name": "CreateCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse", - "usage": "Output,Json", - "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).", - "decorators": [], - "properties": [ - { - "$id": "3260", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the completion.", - "type": { - "$id": "3261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.id" - }, - { - "$id": "3262", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "The list of completion choices the model generated for the input prompt.", - "type": { - "$id": "3263", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3264", - "kind": "model", - "name": "CreateCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3265", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.", - "type": { - "$ref": "811" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3266", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3267", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3268", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "type": { - "$id": "3269", - "kind": "nullable", - "type": { - "$id": "3270", - "kind": "model", - "name": "CreateCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3271", - "kind": "property", - "name": "text_offset", - "serializedName": "text_offset", - "type": { - "$id": "3272", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3273", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.text_offset" - }, - { - "$id": "3274", - "kind": "property", - "name": "token_logprobs", - "serializedName": "token_logprobs", - "type": { - "$id": "3275", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3276", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.token_logprobs" - }, - { - "$id": "3277", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "type": { - "$id": "3278", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.tokens" - }, - { - "$id": "3280", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "type": { - "$id": "3281", - "kind": "array", - "name": "ArrayRecord", - "valueType": { - "$id": "3282", - "kind": "dict", - "keyType": { - "$id": "3283", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3284", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.logprobs.anonymous.top_logprobs" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.logprobs" - }, - { - "$id": "3285", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choice.anonymous.text" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.choices" - }, - { - "$id": "3287", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the completion was created.", - "type": { - "$id": "3288", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3289", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.created" - }, - { - "$id": "3290", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for completion.", - "type": { - "$id": "3291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.model" - }, - { - "$id": "3292", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.system_fingerprint" - }, - { - "$id": "3294", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always \"text_completion\"", - "type": { - "$id": "3295", - "kind": "constant", - "valueType": { - "$ref": "819" - }, - "value": "text_completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.object" - }, - { - "$id": "3296", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$id": "3297", - "kind": "model", - "name": "CompletionUsage", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage", - "usage": "Output,Json", - "description": "Usage statistics for the completion request.", - "decorators": [], - "properties": [ - { - "$id": "3298", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "3299", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens" - }, - { - "$id": "3300", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "3301", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.prompt_tokens" - }, - { - "$id": "3302", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "3303", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.total_tokens" - }, - { - "$id": "3304", - "kind": "property", - "name": "completion_tokens_details", - "serializedName": "completion_tokens_details", - "description": "Breakdown of tokens used in a completion.", - "type": { - "$id": "3305", - "kind": "model", - "name": "CompletionUsageCompletionTokensDetails", - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3306", - "kind": "property", - "name": "reasoning_tokens", - "serializedName": "reasoning_tokens", - "description": "Tokens generated by the model for reasoning.", - "type": { - "$id": "3307", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details.anonymous.reasoning_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CompletionUsage.completion_tokens_details" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateCompletionResponse.usage" - } - ] - }, - { - "$ref": "3264" - }, - { - "$ref": "3270" - }, - { - "$ref": "3297" - }, - { - "$ref": "3305" - }, - { - "$id": "3308", - "kind": "model", - "name": "CreateChatCompletionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3309", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", - "type": { - "$id": "3310", - "kind": "array", - "name": "ArrayChatCompletionRequestMessage", - "valueType": { - "$id": "3311", - "kind": "model", - "name": "ChatCompletionRequestMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3312", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessage.role" - }, - "properties": [ - { - "$ref": "3312" - } - ], - "discriminatedSubtypes": { - "$id": "3314", - "system": { - "$id": "3315", - "kind": "model", - "name": "ChatCompletionRequestSystemMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage", - "usage": "Input,Json", - "discriminatorValue": "system", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3316", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the system message.", - "type": { - "$id": "3317", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContent", - "variantTypes": [ - { - "$id": "3318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3319", - "kind": "array", - "name": "ArrayChatCompletionRequestSystemMessageContentPart", - "valueType": { - "$id": "3320", - "kind": "union", - "name": "ChatCompletionRequestSystemMessageContentPart", - "variantTypes": [ - { - "$id": "3321", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartText", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3322", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3323", - "kind": "constant", - "valueType": { - "$ref": "822" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.type" - }, - { - "$id": "3324", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text content.", - "type": { - "$id": "3325", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartText.text" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.content" - }, - { - "$id": "3326", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `system`.", - "type": { - "$id": "3327", - "kind": "constant", - "valueType": { - "$id": "3328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "system", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.role" - }, - { - "$id": "3329", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestSystemMessage.name" - } - ] - }, - "user": { - "$id": "3331", - "kind": "model", - "name": "ChatCompletionRequestUserMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage", - "usage": "Input,Json", - "discriminatorValue": "user", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3332", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the user message.", - "type": { - "$id": "3333", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContent", - "variantTypes": [ - { - "$id": "3334", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3335", - "kind": "array", - "name": "ArrayChatCompletionRequestUserMessageContentPart", - "valueType": { - "$id": "3336", - "kind": "union", - "name": "ChatCompletionRequestUserMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3337", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3338", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3339", - "kind": "constant", - "valueType": { - "$ref": "825" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.type" - }, - { - "$id": "3340", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "3341", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartImageImageUrl", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3342", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "Either a URL of the image or the base64 encoded image data.", - "type": { - "$id": "3343", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.url" - }, - { - "$id": "3344", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).", - "type": { - "$ref": "828" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartImage.image_url" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.content" - }, - { - "$id": "3345", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `user`.", - "type": { - "$id": "3346", - "kind": "constant", - "valueType": { - "$id": "3347", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "user", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.role" - }, - { - "$id": "3348", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestUserMessage.name" - } - ] - }, - "assistant": { - "$id": "3350", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage", - "usage": "Input,Json", - "discriminatorValue": "assistant", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3351", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.", - "type": { - "$id": "3352", - "kind": "nullable", - "type": { - "$id": "3353", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContent", - "variantTypes": [ - { - "$id": "3354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3355", - "kind": "array", - "name": "ArrayChatCompletionRequestAssistantMessageContentPart", - "valueType": { - "$id": "3356", - "kind": "union", - "name": "ChatCompletionRequestAssistantMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - }, - { - "$id": "3357", - "kind": "model", - "name": "ChatCompletionRequestMessageContentPartRefusal", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3358", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "3359", - "kind": "constant", - "valueType": { - "$ref": "836" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.type" - }, - { - "$id": "3360", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3361", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestMessageContentPartRefusal.refusal" - } - ] - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.content" - }, - { - "$id": "3362", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message by the assistant.", - "type": { - "$id": "3363", - "kind": "nullable", - "type": { - "$id": "3364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.refusal" - }, - { - "$id": "3365", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `assistant`.", - "type": { - "$id": "3366", - "kind": "constant", - "valueType": { - "$id": "3367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.role" - }, - { - "$id": "3368", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", - "type": { - "$id": "3369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.name" - }, - { - "$id": "3370", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3371", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$id": "3372", - "kind": "model", - "name": "ChatCompletionMessageToolCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3373", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.id" - }, - { - "$id": "3375", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3376", - "kind": "constant", - "valueType": { - "$ref": "839" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.type" - }, - { - "$id": "3377", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The function that the model called.", - "type": { - "$id": "3378", - "kind": "model", - "name": "ChatCompletionMessageToolCallFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous", - "usage": "Input,Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3379", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.name" - }, - { - "$id": "3381", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function.anonymous.arguments" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCall.function" - } - ] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.tool_calls" - }, - { - "$id": "3383", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3384", - "kind": "nullable", - "type": { - "$id": "3385", - "kind": "model", - "name": "ChatCompletionRequestAssistantMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3386", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.name" - }, - { - "$id": "3388", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call.anonymous.arguments" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestAssistantMessage.function_call" - } - ] - }, - "tool": { - "$id": "3390", - "kind": "model", - "name": "ChatCompletionRequestToolMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage", - "usage": "Input,Json", - "discriminatorValue": "tool", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3391", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `tool`.", - "type": { - "$id": "3392", - "kind": "constant", - "valueType": { - "$id": "3393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.role" - }, - { - "$id": "3394", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the tool message.", - "type": { - "$id": "3395", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContent", - "variantTypes": [ - { - "$id": "3396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3397", - "kind": "array", - "name": "ArrayChatCompletionRequestToolMessageContentPart", - "valueType": { - "$id": "3398", - "kind": "union", - "name": "ChatCompletionRequestToolMessageContentPart", - "variantTypes": [ - { - "$ref": "3321" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.content" - }, - { - "$id": "3399", - "kind": "property", - "name": "tool_call_id", - "serializedName": "tool_call_id", - "description": "Tool call that this message is responding to.", - "type": { - "$id": "3400", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestToolMessage.tool_call_id" - } - ] - }, - "function": { - "$id": "3401", - "kind": "model", - "name": "ChatCompletionRequestFunctionMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "3311" - }, - "properties": [ - { - "$id": "3402", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the messages author, in this case `function`.", - "type": { - "$id": "3403", - "kind": "constant", - "valueType": { - "$id": "3404", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.role" - }, - { - "$id": "3405", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the function message.", - "type": { - "$id": "3406", - "kind": "nullable", - "type": { - "$id": "3407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.content" - }, - { - "$id": "3408", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionRequestFunctionMessage.name" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.messages" - }, - { - "$id": "3410", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", - "type": { - "$ref": "842" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.model" - }, - { - "$id": "3411", - "kind": "property", - "name": "frequency_penalty", - "serializedName": "frequency_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3412", - "kind": "nullable", - "type": { - "$id": "3413", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.frequency_penalty" - }, - { - "$id": "3414", - "kind": "property", - "name": "logit_bias", - "serializedName": "logit_bias", - "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", - "type": { - "$id": "3415", - "kind": "nullable", - "type": { - "$id": "3416", - "kind": "dict", - "keyType": { - "$id": "3417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3418", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logit_bias" - }, - { - "$id": "3419", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", - "type": { - "$id": "3420", - "kind": "nullable", - "type": { - "$id": "3421", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.logprobs" - }, - { - "$id": "3422", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", - "type": { - "$id": "3423", - "kind": "nullable", - "type": { - "$id": "3424", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_logprobs" - }, - { - "$id": "3425", - "kind": "property", - "name": "max_tokens", - "serializedName": "max_tokens", - "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](/docs/guides/reasoning).", - "type": { - "$id": "3426", - "kind": "nullable", - "type": { - "$id": "3427", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_tokens" - }, - { - "$id": "3428", - "kind": "property", - "name": "max_completion_tokens", - "serializedName": "max_completion_tokens", - "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).", - "type": { - "$id": "3429", - "kind": "nullable", - "type": { - "$id": "3430", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.max_completion_tokens" - }, - { - "$id": "3431", - "kind": "property", - "name": "n", - "serializedName": "n", - "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", - "type": { - "$id": "3432", - "kind": "nullable", - "type": { - "$id": "3433", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.n" - }, - { - "$id": "3434", - "kind": "property", - "name": "presence_penalty", - "serializedName": "presence_penalty", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)", - "type": { - "$id": "3435", - "kind": "nullable", - "type": { - "$id": "3436", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.presence_penalty" - }, - { - "$id": "3437", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4o mini](/docs/models/gpt-4o-mini), [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", - "type": { - "$id": "3438", - "kind": "model", - "name": "ChatResponseFormat", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat", - "usage": "Input,Json", - "decorators": [], - "discriminatorProperty": { - "$id": "3439", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3440", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormat.type" - }, - "properties": [ - { - "$ref": "3439" - } - ], - "discriminatedSubtypes": { - "$id": "3441", - "text": { - "$id": "3442", - "kind": "model", - "name": "ChatResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText", - "usage": "Input,Json", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3443", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3444", - "kind": "constant", - "valueType": { - "$id": "3445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3446", - "kind": "model", - "name": "ChatResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject", - "usage": "Input,Json", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3447", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3448", - "kind": "constant", - "valueType": { - "$id": "3449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3450", - "kind": "model", - "name": "ChatResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema", - "access": "public", - "usage": "Input,Json", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3438" - }, - "properties": [ - { - "$id": "3451", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3452", - "kind": "constant", - "valueType": { - "$id": "3453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.type" - }, - { - "$id": "3454", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.response_format" - }, - { - "$id": "3455", - "kind": "property", - "name": "seed", - "serializedName": "seed", - "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", - "type": { - "$id": "3456", - "kind": "nullable", - "type": { - "$id": "3457", - "kind": "int64", - "name": "int64", - "crossLanguageDefinitionId": "TypeSpec.int64", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.seed" - }, - { - "$id": "3458", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:\n - If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. \n - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.\n - When not set, the default behavior is 'auto'.\n\n When this parameter is set, the response body will include the `service_tier` utilized.", - "type": { - "$id": "3459", - "kind": "nullable", - "type": { - "$ref": "902" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.service_tier" - }, - { - "$id": "3460", - "kind": "property", - "name": "stop", - "serializedName": "stop", - "description": "Up to 4 sequences where the API will stop generating further tokens.", - "type": { - "$id": "3461", - "kind": "nullable", - "type": { - "$id": "3462", - "kind": "union", - "name": "CreateChatCompletionRequestStop", - "variantTypes": [ - { - "$id": "3463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "3464", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3465", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stop" - }, - { - "$id": "3466", - "kind": "property", - "name": "stream", - "serializedName": "stream", - "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", - "type": { - "$id": "3467", - "kind": "nullable", - "type": { - "$id": "3468", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream" - }, - { - "$id": "3469", - "kind": "property", - "name": "stream_options", - "serializedName": "stream_options", - "type": { - "$id": "3470", - "kind": "nullable", - "type": { - "$ref": "3245" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.stream_options" - }, - { - "$id": "3471", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", - "type": { - "$id": "3472", - "kind": "nullable", - "type": { - "$id": "3473", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.temperature" - }, - { - "$id": "3474", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "type": { - "$id": "3475", - "kind": "nullable", - "type": { - "$id": "3476", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.top_p" - }, - { - "$id": "3477", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", - "type": { - "$id": "3478", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$id": "3479", - "kind": "model", - "name": "ChatCompletionTool", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3480", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3481", - "kind": "constant", - "valueType": { - "$ref": "908" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.type" - }, - { - "$id": "3482", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$ref": "1563" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTool.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tools" - }, - { - "$id": "3483", - "kind": "property", - "name": "tool_choice", - "serializedName": "tool_choice", - "type": { - "$id": "3484", - "kind": "union", - "name": "ChatCompletionToolChoiceOption", - "variantTypes": [ - { - "$ref": "911" - }, - { - "$id": "3485", - "kind": "model", - "name": "ChatCompletionNamedToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice", - "usage": "Input,Json", - "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", - "decorators": [], - "properties": [ - { - "$id": "3486", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "3487", - "kind": "constant", - "valueType": { - "$ref": "919" - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.type" - }, - { - "$id": "3488", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "3489", - "kind": "model", - "name": "ChatCompletionNamedToolChoiceFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3490", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3491", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function.anonymous.name" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionNamedToolChoice.function" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.tool_choice" - }, - { - "$id": "3492", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "3493", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.parallel_tool_calls" - }, - { - "$id": "3494", - "kind": "property", - "name": "user", - "serializedName": "user", - "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", - "type": { - "$id": "3495", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.user" - }, - { - "$id": "3496", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.", - "type": { - "$id": "3497", - "kind": "union", - "name": "CreateChatCompletionRequestFunctionCall", - "variantTypes": [ - { - "$id": "3498", - "kind": "constant", - "valueType": { - "$id": "3499", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "none", - "decorators": [] - }, - { - "$id": "3500", - "kind": "constant", - "valueType": { - "$id": "3501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$id": "3502", - "kind": "model", - "name": "ChatCompletionFunctionCallOption", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption", - "usage": "Input,Json", - "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.", - "decorators": [], - "properties": [ - { - "$id": "3503", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionCallOption.name" - } - ] - } - ], - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.function_call" - }, - { - "$id": "3505", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", - "type": { - "$id": "3506", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$id": "3507", - "kind": "model", - "name": "ChatCompletionFunctions", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions", - "usage": "Input,Json", - "deprecation": "This field is marked as deprecated.", - "decorators": [], - "properties": [ - { - "$id": "3508", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "A description of what the function does, used by the model to choose when and how to call the function.", - "type": { - "$id": "3509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.description" - }, - { - "$id": "3510", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "type": { - "$id": "3511", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.name" - }, - { - "$id": "3512", - "kind": "property", - "name": "parameters", - "serializedName": "parameters", - "type": { - "$ref": "1569" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctions.parameters" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionRequest.functions" - } - ] - }, - { - "$ref": "3311" - }, - { - "$ref": "3315" - }, - { - "$ref": "3321" - }, - { - "$ref": "3331" - }, - { - "$ref": "3337" - }, - { - "$ref": "3341" - }, - { - "$ref": "3350" - }, - { - "$ref": "3357" - }, - { - "$ref": "3372" - }, - { - "$ref": "3378" - }, - { - "$ref": "3385" - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - }, - { - "$ref": "3438" - }, - { - "$ref": "3442" - }, - { - "$ref": "3446" - }, - { - "$ref": "3450" - }, - { - "$ref": "3479" - }, - { - "$ref": "3485" - }, - { - "$ref": "3489" - }, - { - "$ref": "3502" - }, - { - "$ref": "3507" - }, - { - "$id": "3513", - "kind": "model", - "name": "CreateChatCompletionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse", - "usage": "Output,Json", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3514", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.id" - }, - { - "$id": "3516", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3517", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3518", - "kind": "model", - "name": "CreateChatCompletionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3519", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$ref": "922" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3520", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3521", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.index" - }, - { - "$id": "3522", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$id": "3523", - "kind": "model", - "name": "ChatCompletionResponseMessage", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage", - "usage": "Output,Json", - "description": "A chat completion message generated by the model.", - "decorators": [], - "properties": [ - { - "$id": "3524", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the message.", - "type": { - "$id": "3525", - "kind": "nullable", - "type": { - "$id": "3526", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.content" - }, - { - "$id": "3527", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "3528", - "kind": "nullable", - "type": { - "$id": "3529", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.refusal" - }, - { - "$id": "3530", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3531", - "kind": "array", - "name": "ChatCompletionMessageToolCalls", - "valueType": { - "$ref": "3372" - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCalls", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.tool_calls" - }, - { - "$id": "3532", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$id": "3533", - "kind": "constant", - "valueType": { - "$ref": "934" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.role" - }, - { - "$id": "3534", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3535", - "kind": "model", - "name": "ChatCompletionResponseMessageFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3536", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3537", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.name" - }, - { - "$id": "3538", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3539", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionResponseMessage.function_call" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.message" - }, - { - "$id": "3540", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "3541", - "kind": "nullable", - "type": { - "$id": "3542", - "kind": "model", - "name": "CreateChatCompletionResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3543", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "3544", - "kind": "nullable", - "type": { - "$id": "3545", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$id": "3546", - "kind": "model", - "name": "ChatCompletionTokenLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3547", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3548", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.token" - }, - { - "$id": "3549", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3550", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.logprob" - }, - { - "$id": "3551", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3552", - "kind": "nullable", - "type": { - "$id": "3553", - "kind": "array", - "name": "ChatCompletionTokenLogprobBytes", - "valueType": { - "$id": "3554", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprobBytes", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.bytes" - }, - { - "$id": "3555", - "kind": "property", - "name": "top_logprobs", - "serializedName": "top_logprobs", - "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", - "type": { - "$id": "3556", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3557", - "kind": "model", - "name": "ChatCompletionTokenLogprobTopLogprob", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3558", - "kind": "property", - "name": "token", - "serializedName": "token", - "description": "The token.", - "type": { - "$id": "3559", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.token" - }, - { - "$id": "3560", - "kind": "property", - "name": "logprob", - "serializedName": "logprob", - "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", - "type": { - "$id": "3561", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.logprob" - }, - { - "$id": "3562", - "kind": "property", - "name": "bytes", - "serializedName": "bytes", - "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", - "type": { - "$id": "3563", - "kind": "nullable", - "type": { - "$id": "3564", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3565", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprob.anonymous.bytes" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionTokenLogprob.top_logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "3566", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "3567", - "kind": "nullable", - "type": { - "$id": "3568", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choice.anonymous.logprobs" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.choices" - }, - { - "$id": "3569", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3570", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.created" - }, - { - "$id": "3572", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3573", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.model" - }, - { - "$id": "3574", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "3575", - "kind": "nullable", - "type": { - "$ref": "937" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.service_tier" - }, - { - "$id": "3576", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3577", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.system_fingerprint" - }, - { - "$id": "3578", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3579", - "kind": "constant", - "valueType": { - "$ref": "943" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.object" - }, - { - "$id": "3580", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionResponse.usage" - } - ] - }, - { - "$ref": "3518" - }, - { - "$ref": "3523" - }, - { - "$ref": "3535" - }, - { - "$ref": "3542" - }, - { - "$ref": "3546" - }, - { - "$ref": "3557" - }, - { - "$id": "3581", - "kind": "model", - "name": "CreateBatchRequest", - "crossLanguageDefinitionId": "createBatch.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ - { - "$id": "3582", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/requestInput),\nand must be uploaded with the purpose `batch`.", - "type": { - "$id": "3583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.input_file_id" - }, - { - "$id": "3584", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions` and\n`/v1/embeddings` are supported.", - "type": { - "$ref": "946" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.endpoint" - }, - { - "$id": "3585", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed. Currently only `24h` is supported.", - "type": { - "$id": "3586", - "kind": "constant", - "valueType": { - "$ref": "952" - }, - "value": "24h", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.completion_window" - }, - { - "$id": "3587", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Optional custom metadata for the batch.", - "type": { - "$id": "3588", - "kind": "nullable", - "type": { - "$id": "3589", - "kind": "dict", - "keyType": { - "$id": "3590", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "createBatch.Request.anonymous.metadata" - } - ] - }, - { - "$id": "3592", - "kind": "model", - "name": "Batch", - "crossLanguageDefinitionId": "OpenAI.Batch", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3593", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3594", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.id" - }, - { - "$id": "3595", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `batch`.", - "type": { - "$id": "3596", - "kind": "constant", - "valueType": { - "$ref": "955" - }, - "value": "batch", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.object" - }, - { - "$id": "3597", - "kind": "property", - "name": "endpoint", - "serializedName": "endpoint", - "description": "The OpenAI API endpoint used by the batch.", - "type": { - "$id": "3598", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.endpoint" - }, - { - "$id": "3599", - "kind": "property", - "name": "errors", - "serializedName": "errors", - "type": { - "$id": "3600", - "kind": "model", - "name": "BatchErrors", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3601", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `list`.", - "type": { - "$id": "3602", - "kind": "constant", - "valueType": { - "$ref": "958" - }, - "value": "list", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.object" - }, - { - "$id": "3603", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3604", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3605", - "kind": "model", - "name": "BatchErrorsDatum", - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3606", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "An error code identifying the error type.", - "type": { - "$id": "3607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.code" - }, - { - "$id": "3608", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable message providing more details about the error.", - "type": { - "$id": "3609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.message" - }, - { - "$id": "3610", - "kind": "property", - "name": "param", - "serializedName": "param", - "description": "The name of the parameter that caused the error, if applicable.", - "type": { - "$id": "3611", - "kind": "nullable", - "type": { - "$id": "3612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.param" - }, - { - "$id": "3613", - "kind": "property", - "name": "line", - "serializedName": "line", - "description": "The line number of the input file where the error occurred, if applicable.", - "type": { - "$id": "3614", - "kind": "nullable", - "type": { - "$id": "3615", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.datum.anonymous.line" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors.anonymous.data" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.errors" - }, - { - "$id": "3616", - "kind": "property", - "name": "input_file_id", - "serializedName": "input_file_id", - "description": "The ID of the input file for the batch.", - "type": { - "$id": "3617", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.input_file_id" - }, - { - "$id": "3618", - "kind": "property", - "name": "completion_window", - "serializedName": "completion_window", - "description": "The time frame within which the batch should be processed.", - "type": { - "$id": "3619", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completion_window" - }, - { - "$id": "3620", - "kind": "property", - "name": "status", - "serializedName": "status", - "description": "The current status of the batch.", - "type": { - "$ref": "961" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.status" - }, - { - "$id": "3621", - "kind": "property", - "name": "output_file_id", - "serializedName": "output_file_id", - "description": "The ID of the file containing the outputs of successfully executed requests.", - "type": { - "$id": "3622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.output_file_id" - }, - { - "$id": "3623", - "kind": "property", - "name": "error_file_id", - "serializedName": "error_file_id", - "description": "The ID of the file containing the outputs of requests with errors.", - "type": { - "$id": "3624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.error_file_id" - }, - { - "$id": "3625", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the batch was created.", - "type": { - "$id": "3626", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3627", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.created_at" - }, - { - "$id": "3628", - "kind": "property", - "name": "in_progress_at", - "serializedName": "in_progress_at", - "description": "The Unix timestamp (in seconds) for when the batch started processing.", - "type": { - "$id": "3629", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3630", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.in_progress_at" - }, - { - "$id": "3631", - "kind": "property", - "name": "expires_at", - "serializedName": "expires_at", - "description": "The Unix timestamp (in seconds) for when the batch will expire.", - "type": { - "$id": "3632", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3633", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expires_at" - }, - { - "$id": "3634", - "kind": "property", - "name": "finalizing_at", - "serializedName": "finalizing_at", - "description": "The Unix timestamp (in seconds) for when the batch started finalizing.", - "type": { - "$id": "3635", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3636", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.finalizing_at" - }, - { - "$id": "3637", - "kind": "property", - "name": "completed_at", - "serializedName": "completed_at", - "description": "The Unix timestamp (in seconds) for when the batch was completed.", - "type": { - "$id": "3638", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3639", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.completed_at" - }, - { - "$id": "3640", - "kind": "property", - "name": "failed_at", - "serializedName": "failed_at", - "description": "The Unix timestamp (in seconds) for when the batch failed.", - "type": { - "$id": "3641", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3642", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.failed_at" - }, - { - "$id": "3643", - "kind": "property", - "name": "expired_at", - "serializedName": "expired_at", - "description": "The Unix timestamp (in seconds) for when the batch expired.", - "type": { - "$id": "3644", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3645", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.expired_at" - }, - { - "$id": "3646", - "kind": "property", - "name": "cancelling_at", - "serializedName": "cancelling_at", - "description": "The Unix timestamp (in seconds) for when the batch started cancelling.", - "type": { - "$id": "3647", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3648", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelling_at" - }, - { - "$id": "3649", - "kind": "property", - "name": "cancelled_at", - "serializedName": "cancelled_at", - "description": "The Unix timestamp (in seconds) for when the batch was cancelled.", - "type": { - "$id": "3650", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3651", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.cancelled_at" - }, - { - "$id": "3652", - "kind": "property", - "name": "request_counts", - "serializedName": "request_counts", - "description": "The request counts for different statuses within the batch.", - "type": { - "$id": "3653", - "kind": "model", - "name": "BatchRequestCounts", - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3654", - "kind": "property", - "name": "total", - "serializedName": "total", - "description": "Total number of requests in the batch.", - "type": { - "$id": "3655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.total" - }, - { - "$id": "3656", - "kind": "property", - "name": "completed", - "serializedName": "completed", - "description": "Number of requests that have been completed successfully.", - "type": { - "$id": "3657", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.completed" - }, - { - "$id": "3658", - "kind": "property", - "name": "failed", - "serializedName": "failed", - "description": "Number of requests that have failed.", - "type": { - "$id": "3659", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts.anonymous.failed" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.request_counts" - }, - { - "$id": "3660", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3661", - "kind": "nullable", - "type": { - "$id": "3662", - "kind": "dict", - "keyType": { - "$id": "3663", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.Batch.metadata" - } - ] - }, - { - "$ref": "3600" - }, - { - "$ref": "3605" - }, - { - "$ref": "3653" - }, - { - "$id": "3665", - "kind": "model", - "name": "ListBatchesResponse", - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3666", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3667", - "kind": "array", - "name": "ArrayBatch", - "valueType": { - "$ref": "3592" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.data" - }, - { - "$id": "3668", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.first_id" - }, - { - "$id": "3670", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.last_id" - }, - { - "$id": "3672", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3673", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.has_more" - }, - { - "$id": "3674", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3675", - "kind": "constant", - "valueType": { - "$ref": "979" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListBatchesResponse.object" - } - ] - }, - { - "$id": "3676", - "kind": "model", - "name": "CreateAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3677", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$ref": "982" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.model" - }, - { - "$id": "3678", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3679", - "kind": "nullable", - "type": { - "$id": "3680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.name" - }, - { - "$id": "3681", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3682", - "kind": "nullable", - "type": { - "$id": "3683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.description" - }, - { - "$id": "3684", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3685", - "kind": "nullable", - "type": { - "$id": "3686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.instructions" - }, - { - "$id": "3687", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3688", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tools" - }, - { - "$id": "3689", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3690", - "kind": "nullable", - "type": { - "$id": "3691", - "kind": "model", - "name": "CreateAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3692", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3693", - "kind": "model", - "name": "CreateAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3694", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3695", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3697", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1594" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.tool_resources" - }, - { - "$id": "3698", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3699", - "kind": "nullable", - "type": { - "$id": "3700", - "kind": "dict", - "keyType": { - "$id": "3701", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.metadata" - }, - { - "$id": "3703", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3704", - "kind": "nullable", - "type": { - "$id": "3705", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.temperature" - }, - { - "$id": "3706", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3707", - "kind": "nullable", - "type": { - "$id": "3708", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.top_p" - }, - { - "$id": "3709", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3710", - "kind": "nullable", - "type": { - "$id": "3711", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3712", - "kind": "constant", - "valueType": { - "$id": "3713", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3691" - }, - { - "$ref": "3693" - }, - { - "$id": "3714", - "kind": "model", - "name": "AssistantObject", - "crossLanguageDefinitionId": "OpenAI.AssistantObject", - "usage": "Output,Json", - "description": "Represents an `assistant` that can call the model and use tools.", - "decorators": [], - "properties": [ - { - "$id": "3715", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier, which can be referenced in API endpoints.", - "type": { - "$id": "3716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.id" - }, - { - "$id": "3717", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `assistant`.", - "type": { - "$id": "3718", - "kind": "constant", - "valueType": { - "$ref": "1030" - }, - "value": "assistant", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.object" - }, - { - "$id": "3719", - "kind": "property", - "name": "created_at", - "serializedName": "created_at", - "description": "The Unix timestamp (in seconds) for when the assistant was created.", - "type": { - "$id": "3720", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3721", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.created_at" - }, - { - "$id": "3722", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3723", - "kind": "nullable", - "type": { - "$id": "3724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.name" - }, - { - "$id": "3725", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3726", - "kind": "nullable", - "type": { - "$id": "3727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.description" - }, - { - "$id": "3728", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3729", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.model" - }, - { - "$id": "3730", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3731", - "kind": "nullable", - "type": { - "$id": "3732", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.instructions" - }, - { - "$id": "3733", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3734", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tools" - }, - { - "$id": "3735", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3736", - "kind": "nullable", - "type": { - "$id": "3737", - "kind": "model", - "name": "AssistantObjectToolResources", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3738", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3739", - "kind": "model", - "name": "AssistantObjectToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3740", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3741", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3743", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.tool_resources" - }, - { - "$id": "3744", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3745", - "kind": "nullable", - "type": { - "$id": "3746", - "kind": "dict", - "keyType": { - "$id": "3747", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3748", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.metadata" - }, - { - "$id": "3749", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3750", - "kind": "nullable", - "type": { - "$id": "3751", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.temperature" - }, - { - "$id": "3752", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3753", - "kind": "nullable", - "type": { - "$id": "3754", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.top_p" - }, - { - "$id": "3755", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3756", - "kind": "nullable", - "type": { - "$id": "3757", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3758", - "kind": "constant", - "valueType": { - "$id": "3759", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantObject.response_format" - } - ] - }, - { - "$ref": "3737" - }, - { - "$ref": "3739" - }, - { - "$id": "3760", - "kind": "model", - "name": "ListAssistantsResponse", - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3761", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3762", - "kind": "constant", - "valueType": { - "$ref": "1039" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.object" - }, - { - "$id": "3763", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "3764", - "kind": "array", - "name": "ArrayAssistantObject", - "valueType": { - "$ref": "3714" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.data" - }, - { - "$id": "3765", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "3766", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.first_id" - }, - { - "$id": "3767", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "3768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.last_id" - }, - { - "$id": "3769", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "3770", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListAssistantsResponse.has_more" - } - ] - }, - { - "$id": "3771", - "kind": "model", - "name": "ModifyAssistantRequest", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3772", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", - "type": { - "$id": "3773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.model" - }, - { - "$id": "3774", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the assistant. The maximum length is 256 characters.", - "type": { - "$id": "3775", - "kind": "nullable", - "type": { - "$id": "3776", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.name" - }, - { - "$id": "3777", - "kind": "property", - "name": "description", - "serializedName": "description", - "description": "The description of the assistant. The maximum length is 512 characters.", - "type": { - "$id": "3778", - "kind": "nullable", - "type": { - "$id": "3779", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.description" - }, - { - "$id": "3780", - "kind": "property", - "name": "instructions", - "serializedName": "instructions", - "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.", - "type": { - "$id": "3781", - "kind": "nullable", - "type": { - "$id": "3782", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.instructions" - }, - { - "$id": "3783", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "3784", - "kind": "array", - "name": "ArrayAssistantToolDefinition", - "valueType": { - "$ref": "1541" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tools" - }, - { - "$id": "3785", - "kind": "property", - "name": "tool_resources", - "serializedName": "tool_resources", - "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", - "type": { - "$id": "3786", - "kind": "nullable", - "type": { - "$id": "3787", - "kind": "model", - "name": "ModifyAssistantRequestToolResources", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3788", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "type": { - "$id": "3789", - "kind": "model", - "name": "ModifyAssistantRequestToolResourcesCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3790", - "kind": "property", - "name": "file_ids", - "serializedName": "file_ids", - "description": "Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.", - "type": { - "$id": "3791", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3792", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.code_interpreter.anonymous.file_ids" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.code_interpreter" - }, - { - "$id": "3793", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "type": { - "$ref": "1632" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources.anonymous.file_search" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.tool_resources" - }, - { - "$id": "3794", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.", - "type": { - "$id": "3795", - "kind": "nullable", - "type": { - "$id": "3796", - "kind": "dict", - "keyType": { - "$id": "3797", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.metadata" - }, - { - "$id": "3799", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", - "type": { - "$id": "3800", - "kind": "nullable", - "type": { - "$id": "3801", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.temperature" - }, - { - "$id": "3802", - "kind": "property", - "name": "top_p", - "serializedName": "top_p", - "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", - "type": { - "$id": "3803", - "kind": "nullable", - "type": { - "$id": "3804", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.top_p" - }, - { - "$id": "3805", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "type": { - "$id": "3806", - "kind": "nullable", - "type": { - "$id": "3807", - "kind": "union", - "name": "AssistantsApiResponseFormatOption", - "variantTypes": [ - { - "$id": "3808", - "kind": "constant", - "valueType": { - "$id": "3809", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "auto", - "decorators": [] - }, - { - "$ref": "1679" - }, - { - "$ref": "1684" - }, - { - "$ref": "1688" - } - ], - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ModifyAssistantRequest.response_format" - } - ] - }, - { - "$ref": "3787" - }, - { - "$ref": "3789" - }, - { - "$id": "3810", - "kind": "model", - "name": "DeleteAssistantResponse", - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3811", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3812", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.id" - }, - { - "$id": "3813", - "kind": "property", - "name": "deleted", - "serializedName": "deleted", - "type": { - "$id": "3814", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.deleted" - }, - { - "$id": "3815", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "3816", - "kind": "constant", - "valueType": { - "$ref": "1042" - }, - "value": "assistant.deleted", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.DeleteAssistantResponse.object" - } - ] - }, - { - "$id": "3817", - "kind": "model", - "name": "CreateSpeechRequest", - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest", - "usage": "Input,Json", - "decorators": [], - "properties": [ - { - "$id": "3818", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`", - "type": { - "$ref": "1045" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.model" - }, - { - "$id": "3819", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The text to generate audio for. The maximum length is 4096 characters.", - "type": { - "$id": "3820", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.input" - }, - { - "$id": "3821", - "kind": "property", - "name": "voice", - "serializedName": "voice", - "description": "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).", - "type": { - "$ref": "1051" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.voice" - }, - { - "$id": "3822", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.", - "type": { - "$ref": "1065" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.response_format" - }, - { - "$id": "3823", - "kind": "property", - "name": "speed", - "serializedName": "speed", - "description": "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", - "type": { - "$id": "3824", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateSpeechRequest.speed" - } - ] - }, - { - "$id": "3825", - "kind": "model", - "name": "CreateTranscriptionRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3826", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3827", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.file" - }, - { - "$id": "3828", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1079" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.model" - }, - { - "$id": "3829", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.", - "type": { - "$id": "3830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.language" - }, - { - "$id": "3831", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", - "type": { - "$id": "3832", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.prompt" - }, - { - "$id": "3833", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1083" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.response_format" - }, - { - "$id": "3834", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3835", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.temperature" - }, - { - "$id": "3836", - "kind": "property", - "name": "timestamp_granularities", - "serializedName": "timestamp_granularities", - "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", - "type": { - "$id": "3837", - "kind": "array", - "name": "Array", - "valueType": { - "$ref": "1095" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionRequest.timestamp_granularities" - } - ] - }, - { - "$id": "3838", - "kind": "model", - "name": "CreateTranscriptionResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson", - "usage": "Output,Json", - "description": "Represents a verbose json transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3839", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3840", - "kind": "constant", - "valueType": { - "$ref": "1101" - }, - "value": "transcribe", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.task" - }, - { - "$id": "3841", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the input audio.", - "type": { - "$id": "3842", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.language" - }, - { - "$id": "3843", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3844", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3845", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.duration" - }, - { - "$id": "3846", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.text" - }, - { - "$id": "3848", - "kind": "property", - "name": "words", - "serializedName": "words", - "description": "Extracted words and their corresponding timestamps.", - "type": { - "$id": "3849", - "kind": "array", - "name": "ArrayTranscriptionWord", - "valueType": { - "$id": "3850", - "kind": "model", - "name": "TranscriptionWord", - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3851", - "kind": "property", - "name": "word", - "serializedName": "word", - "description": "The text content of the word.", - "type": { - "$id": "3852", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.word" - }, - { - "$id": "3853", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the word in seconds.", - "type": { - "$id": "3854", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3855", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.start" - }, - { - "$id": "3856", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the word in seconds.", - "type": { - "$id": "3857", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3858", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionWord.end" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.words" - }, - { - "$id": "3859", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the transcribed text and their corresponding details.", - "type": { - "$id": "3860", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$id": "3861", - "kind": "model", - "name": "TranscriptionSegment", - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3862", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "Unique identifier of the segment.", - "type": { - "$id": "3863", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.id" - }, - { - "$id": "3864", - "kind": "property", - "name": "seek", - "serializedName": "seek", - "description": "Seek offset of the segment.", - "type": { - "$id": "3865", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.seek" - }, - { - "$id": "3866", - "kind": "property", - "name": "start", - "serializedName": "start", - "description": "Start time of the segment in seconds.", - "type": { - "$id": "3867", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3868", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.start" - }, - { - "$id": "3869", - "kind": "property", - "name": "end", - "serializedName": "end", - "description": "End time of the segment in seconds.", - "type": { - "$id": "3870", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3871", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.end" - }, - { - "$id": "3872", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content of the segment.", - "type": { - "$id": "3873", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.text" - }, - { - "$id": "3874", - "kind": "property", - "name": "tokens", - "serializedName": "tokens", - "description": "Array of token IDs for the text content.", - "type": { - "$id": "3875", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3876", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.tokens" - }, - { - "$id": "3877", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "Temperature parameter used for generating the segment.", - "type": { - "$id": "3878", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.temperature" - }, - { - "$id": "3879", - "kind": "property", - "name": "avg_logprob", - "serializedName": "avg_logprob", - "description": "Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", - "type": { - "$id": "3880", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.avg_logprob" - }, - { - "$id": "3881", - "kind": "property", - "name": "compression_ratio", - "serializedName": "compression_ratio", - "description": "Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", - "type": { - "$id": "3882", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.compression_ratio" - }, - { - "$id": "3883", - "kind": "property", - "name": "no_speech_prob", - "serializedName": "no_speech_prob", - "description": "Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", - "type": { - "$id": "3884", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.TranscriptionSegment.no_speech_prob" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseVerboseJson.segments" - } - ] - }, - { - "$ref": "3850" - }, - { - "$ref": "3861" - }, - { - "$id": "3885", - "kind": "model", - "name": "CreateTranscriptionResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson", - "usage": "Output,Json", - "description": "Represents a transcription response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3886", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The transcribed text.", - "type": { - "$id": "3887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranscriptionResponseJson.text" - } - ] - }, - { - "$id": "3888", - "kind": "model", - "name": "CreateTranslationRequest", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "3889", - "kind": "property", - "name": "file", - "serializedName": "file", - "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.", - "type": { - "$id": "3890", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.file" - }, - { - "$id": "3891", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.", - "type": { - "$ref": "1104" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.model" - }, - { - "$id": "3892", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.", - "type": { - "$id": "3893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.prompt" - }, - { - "$id": "3894", - "kind": "property", - "name": "response_format", - "serializedName": "response_format", - "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.", - "type": { - "$ref": "1108" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.response_format" - }, - { - "$id": "3895", - "kind": "property", - "name": "temperature", - "serializedName": "temperature", - "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.", - "type": { - "$id": "3896", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationRequest.temperature" - } - ] - }, - { - "$id": "3897", - "kind": "model", - "name": "CreateTranslationResponseVerboseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3898", - "kind": "property", - "name": "task", - "serializedName": "task", - "description": "The task label.", - "type": { - "$id": "3899", - "kind": "constant", - "valueType": { - "$ref": "1120" - }, - "value": "translate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.task" - }, - { - "$id": "3900", - "kind": "property", - "name": "language", - "serializedName": "language", - "description": "The language of the output translation (always `english`).", - "type": { - "$id": "3901", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.language" - }, - { - "$id": "3902", - "kind": "property", - "name": "duration", - "serializedName": "duration", - "description": "The duration of the input audio.", - "type": { - "$id": "3903", - "kind": "duration", - "name": "duration", - "encode": "seconds", - "wireType": { - "$id": "3904", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.duration", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.duration" - }, - { - "$id": "3905", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The translated text.", - "type": { - "$id": "3906", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.text" - }, - { - "$id": "3907", - "kind": "property", - "name": "segments", - "serializedName": "segments", - "description": "Segments of the translated text and their corresponding details.", - "type": { - "$id": "3908", - "kind": "array", - "name": "ArrayTranscriptionSegment", - "valueType": { - "$ref": "3861" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseVerboseJson.segments" - } - ] - }, - { - "$id": "3909", - "kind": "model", - "name": "CreateTranslationResponseJson", - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson", - "usage": "Output,Json", - "decorators": [], - "properties": [ - { - "$id": "3910", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "3911", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateTranslationResponseJson.text" - } - ] - }, - { - "$id": "3912", - "kind": "model", - "name": "AssistantResponseFormat", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat", - "access": "public", - "usage": "Input", - "decorators": [], - "discriminatorProperty": { - "$id": "3913", - "kind": "property", - "name": "type", - "serializedName": "type", - "type": { - "$id": "3914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormat.type" - }, - "properties": [ - { - "$ref": "3913" - } - ], - "discriminatedSubtypes": { - "$id": "3915", - "text": { - "$id": "3916", - "kind": "model", - "name": "AssistantResponseFormatText", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText", - "usage": "Input", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3917", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `text`", - "type": { - "$id": "3918", - "kind": "constant", - "valueType": { - "$id": "3919", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatText.type" - } - ] - }, - "json_object": { - "$id": "3920", - "kind": "model", - "name": "AssistantResponseFormatJsonObject", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject", - "usage": "Input", - "discriminatorValue": "json_object", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3921", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_object`", - "type": { - "$id": "3922", - "kind": "constant", - "valueType": { - "$id": "3923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_object", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonObject.type" - } - ] - }, - "json_schema": { - "$id": "3924", - "kind": "model", - "name": "AssistantResponseFormatJsonSchema", - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema", - "usage": "Input", - "discriminatorValue": "json_schema", - "decorators": [], - "baseModel": { - "$ref": "3912" - }, - "properties": [ - { - "$id": "3925", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of response format being defined: `json_schema`", - "type": { - "$id": "3926", - "kind": "constant", - "valueType": { - "$id": "3927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "json_schema", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.type" - }, - { - "$id": "3928", - "kind": "property", - "name": "json_schema", - "serializedName": "json_schema", - "type": { - "$ref": "1693" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.AssistantResponseFormatJsonSchema.json_schema" - } - ] - } - } - }, - { - "$ref": "3916" - }, - { - "$ref": "3920" - }, - { - "$ref": "3924" - }, - { - "$id": "3929", - "kind": "model", - "name": "BatchRequestInput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line object of the batch input file", - "decorators": [], - "properties": [ - { - "$id": "3930", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.", - "type": { - "$id": "3931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.custom_id" - }, - { - "$id": "3932", - "kind": "property", - "name": "method", - "serializedName": "method", - "description": "The HTTP method to be used for the request. Currently only `POST` is supported.", - "type": { - "$id": "3933", - "kind": "constant", - "valueType": { - "$ref": "1123" - }, - "value": "POST", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.method" - }, - { - "$id": "3934", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.", - "type": { - "$id": "3935", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestInput.url" - } - ] - }, - { - "$id": "3936", - "kind": "model", - "name": "BatchRequestOutput", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput", - "access": "public", - "usage": "Output", - "description": "The per-line object of the batch output and error files", - "decorators": [], - "properties": [ - { - "$id": "3937", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "3938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.id" - }, - { - "$id": "3939", - "kind": "property", - "name": "custom_id", - "serializedName": "custom_id", - "description": "A developer-provided per-request id that will be used to match outputs to inputs.", - "type": { - "$id": "3940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.custom_id" - }, - { - "$id": "3941", - "kind": "property", - "name": "response", - "serializedName": "response", - "type": { - "$id": "3942", - "kind": "nullable", - "type": { - "$id": "3943", - "kind": "model", - "name": "BatchRequestOutputResponse", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3944", - "kind": "property", - "name": "status_code", - "serializedName": "status_code", - "description": "The HTTP status code of the response", - "type": { - "$id": "3945", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.status_code" - }, - { - "$id": "3946", - "kind": "property", - "name": "request_id", - "serializedName": "request_id", - "description": "An unique identifier for the OpenAI API request. Please include this request ID when contacting support.", - "type": { - "$id": "3947", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.request_id" - }, - { - "$id": "3948", - "kind": "property", - "name": "body", - "serializedName": "body", - "description": "The JSON body of the response", - "type": { - "$id": "3949", - "kind": "dict", - "keyType": { - "$id": "3950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "3951", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response.anonymous.body" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.response" - }, - { - "$id": "3952", - "kind": "property", - "name": "error", - "serializedName": "error", - "description": "For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.", - "type": { - "$id": "3953", - "kind": "nullable", - "type": { - "$id": "3954", - "kind": "model", - "name": "BatchRequestOutputError", - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3955", - "kind": "property", - "name": "code", - "serializedName": "code", - "description": "A machine-readable error code.", - "type": { - "$id": "3956", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.code" - }, - { - "$id": "3957", - "kind": "property", - "name": "message", - "serializedName": "message", - "description": "A human-readable error message.", - "type": { - "$id": "3958", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error.anonymous.message" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.BatchRequestOutput.error" - } - ] - }, - { - "$ref": "3943" - }, - { - "$ref": "3954" - }, - { - "$id": "3959", - "kind": "model", - "name": "ChatCompletionFunctionChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionFunctionChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3960", - "kind": "model", - "name": "ChatCompletionToolChoice", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionToolChoice", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "3961", - "kind": "model", - "name": "ChatMessageContent", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContent", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3962", - "kind": "model", - "name": "ChatMessageContentPart", - "crossLanguageDefinitionId": "OpenAI.ChatMessageContentPart", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "properties": [] - }, - { - "$id": "3963", - "kind": "model", - "name": "CreateChatCompletionFunctionResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse", - "access": "public", - "usage": "Output", - "description": "Represents a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "3964", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion.", - "type": { - "$id": "3965", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.id" - }, - { - "$id": "3966", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", - "type": { - "$id": "3967", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "3968", - "kind": "model", - "name": "CreateChatCompletionFunctionResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3969", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.", - "type": { - "$ref": "1126" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.finish_reason" - }, - { - "$id": "3970", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "3971", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.index" - }, - { - "$id": "3972", - "kind": "property", - "name": "message", - "serializedName": "message", - "type": { - "$ref": "3523" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choice.anonymous.message" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.choices" - }, - { - "$id": "3973", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created.", - "type": { - "$id": "3974", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "3975", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.created" - }, - { - "$id": "3976", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model used for the chat completion.", - "type": { - "$id": "3977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.model" - }, - { - "$id": "3978", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "3979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.system_fingerprint" - }, - { - "$id": "3980", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion`.", - "type": { - "$id": "3981", - "kind": "constant", - "valueType": { - "$ref": "1136" - }, - "value": "chat.completion", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.object" - }, - { - "$id": "3982", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "type": { - "$ref": "3297" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionFunctionResponse.usage" - } - ] - }, - { - "$ref": "3968" - }, - { - "$id": "3983", - "kind": "model", - "name": "ChatCompletionStreamResponseDelta", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta", - "usage": "Output", - "description": "A chat completion delta generated by streamed model responses.", - "decorators": [], - "properties": [ - { - "$id": "3984", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The contents of the chunk message.", - "type": { - "$id": "3985", - "kind": "nullable", - "type": { - "$id": "3986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.content" - }, - { - "$id": "3987", - "kind": "property", - "name": "function_call", - "serializedName": "function_call", - "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", - "type": { - "$id": "3988", - "kind": "model", - "name": "ChatCompletionStreamResponseDeltaFunctionCall", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3989", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "3990", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.name" - }, - { - "$id": "3991", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "3992", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.function_call" - }, - { - "$id": "3993", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "type": { - "$id": "3994", - "kind": "array", - "name": "ArrayChatCompletionMessageToolCallChunk", - "valueType": { - "$id": "3995", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunk", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "3996", - "kind": "property", - "name": "index", - "serializedName": "index", - "type": { - "$id": "3997", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.index" - }, - { - "$id": "3998", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "3999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.id" - }, - { - "$id": "4000", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the tool. Currently, only `function` is supported.", - "type": { - "$id": "4001", - "kind": "constant", - "valueType": { - "$ref": "1139" - }, - "value": "function", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.type" - }, - { - "$id": "4002", - "kind": "property", - "name": "function", - "serializedName": "function", - "type": { - "$id": "4003", - "kind": "model", - "name": "ChatCompletionMessageToolCallChunkFunction", - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4004", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function to call.", - "type": { - "$id": "4005", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.name" - }, - { - "$id": "4006", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", - "type": { - "$id": "4007", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function.anonymous.arguments" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionMessageToolCallChunk.function" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.tool_calls" - }, - { - "$id": "4008", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The role of the author of this message.", - "type": { - "$ref": "1142" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.role" - }, - { - "$id": "4009", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "The refusal message generated by the model.", - "type": { - "$id": "4010", - "kind": "nullable", - "type": { - "$id": "4011", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ChatCompletionStreamResponseDelta.refusal" - } - ] - }, - { - "$ref": "3988" - }, - { - "$ref": "3995" - }, - { - "$ref": "4003" - }, - { - "$id": "4012", - "kind": "model", - "name": "CreateChatCompletionStreamResponse", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse", - "access": "public", - "usage": "Output", - "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", - "decorators": [], - "properties": [ - { - "$id": "4013", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "A unique identifier for the chat completion. Each chunk has the same ID.", - "type": { - "$id": "4014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.id" - }, - { - "$id": "4015", - "kind": "property", - "name": "choices", - "serializedName": "choices", - "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.", - "type": { - "$id": "4016", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4017", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoice", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4018", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "type": { - "$ref": "3983" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.delta" - }, - { - "$id": "4019", - "kind": "property", - "name": "logprobs", - "serializedName": "logprobs", - "description": "Log probability information for the choice.", - "type": { - "$id": "4020", - "kind": "nullable", - "type": { - "$id": "4021", - "kind": "model", - "name": "CreateChatCompletionStreamResponseChoiceLogprobs", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4022", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "A list of message content tokens with log probability information.", - "type": { - "$id": "4023", - "kind": "nullable", - "type": { - "$id": "4024", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.content" - }, - { - "$id": "4025", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "description": "A list of message refusal tokens with log probability information.", - "type": { - "$id": "4026", - "kind": "nullable", - "type": { - "$id": "4027", - "kind": "array", - "name": "ArrayChatCompletionTokenLogprob", - "valueType": { - "$ref": "3546" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.logprobs.anonymous.refusal" - } - ] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.logprobs" - }, - { - "$id": "4028", - "kind": "property", - "name": "finish_reason", - "serializedName": "finish_reason", - "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.", - "type": { - "$id": "4029", - "kind": "nullable", - "type": { - "$ref": "1152" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.finish_reason" - }, - { - "$id": "4030", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the choice in the list of choices.", - "type": { - "$id": "4031", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choice.anonymous.index" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.choices" - }, - { - "$id": "4032", - "kind": "property", - "name": "created", - "serializedName": "created", - "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", - "type": { - "$id": "4033", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "unixTimestamp", - "wireType": { - "$id": "4034", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.created" - }, - { - "$id": "4035", - "kind": "property", - "name": "model", - "serializedName": "model", - "description": "The model to generate the completion.", - "type": { - "$id": "4036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.model" - }, - { - "$id": "4037", - "kind": "property", - "name": "service_tier", - "serializedName": "service_tier", - "description": "The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.", - "type": { - "$id": "4038", - "kind": "nullable", - "type": { - "$ref": "1164" - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.service_tier" - }, - { - "$id": "4039", - "kind": "property", - "name": "system_fingerprint", - "serializedName": "system_fingerprint", - "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", - "type": { - "$id": "4040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.system_fingerprint" - }, - { - "$id": "4041", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `chat.completion.chunk`.", - "type": { - "$id": "4042", - "kind": "constant", - "valueType": { - "$ref": "1170" - }, - "value": "chat.completion.chunk", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.object" - }, - { - "$id": "4043", - "kind": "property", - "name": "usage", - "serializedName": "usage", - "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request.\nWhen present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.", - "type": { - "$id": "4044", - "kind": "model", - "name": "CreateChatCompletionStreamResponseUsage", - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4045", - "kind": "property", - "name": "completion_tokens", - "serializedName": "completion_tokens", - "description": "Number of tokens in the generated completion.", - "type": { - "$id": "4046", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.completion_tokens" - }, - { - "$id": "4047", - "kind": "property", - "name": "prompt_tokens", - "serializedName": "prompt_tokens", - "description": "Number of tokens in the prompt.", - "type": { - "$id": "4048", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.prompt_tokens" - }, - { - "$id": "4049", - "kind": "property", - "name": "total_tokens", - "serializedName": "total_tokens", - "description": "Total number of tokens used in the request (prompt + completion).", - "type": { - "$id": "4050", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage.anonymous.total_tokens" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.CreateChatCompletionStreamResponse.usage" - } - ] - }, - { - "$ref": "4017" - }, - { - "$ref": "4021" - }, - { - "$ref": "4044" - }, - { - "$id": "4051", - "kind": "model", - "name": "FinetuneChatRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for chat models", - "decorators": [], - "properties": [ - { - "$id": "4052", - "kind": "property", - "name": "messages", - "serializedName": "messages", - "type": { - "$id": "4053", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "4054", - "kind": "union", - "name": "FinetuneChatRequestInputMessage", - "variantTypes": [ - { - "$ref": "3315" - }, - { - "$ref": "3331" - }, - { - "$id": "4055", - "kind": "model", - "name": "FineTuneChatCompletionRequestAssistantMessage", - "crossLanguageDefinitionId": "OpenAI.FineTuneChatCompletionRequestAssistantMessage", - "usage": "Input", - "decorators": [], - "baseModel": { - "$ref": "3350" - }, - "properties": [] - }, - { - "$ref": "3390" - }, - { - "$ref": "3401" - } - ], - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.messages" - }, - { - "$id": "4056", - "kind": "property", - "name": "tools", - "serializedName": "tools", - "description": "A list of tools the model may generate JSON inputs for.", - "type": { - "$id": "4057", - "kind": "array", - "name": "ArrayChatCompletionTool", - "valueType": { - "$ref": "3479" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.tools" - }, - { - "$id": "4058", - "kind": "property", - "name": "parallel_tool_calls", - "serializedName": "parallel_tool_calls", - "type": { - "$id": "4059", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.parallel_tool_calls" - }, - { - "$id": "4060", - "kind": "property", - "name": "functions", - "serializedName": "functions", - "description": "A list of functions the model may generate JSON inputs for.", - "type": { - "$id": "4061", - "kind": "array", - "name": "ArrayChatCompletionFunctions", - "valueType": { - "$ref": "3507" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneChatRequestInput.functions" - } - ] - }, - { - "$ref": "4055" - }, - { - "$id": "4062", - "kind": "model", - "name": "FinetuneCompletionRequestInput", - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput", - "access": "public", - "usage": "Input", - "description": "The per-line training example of a fine-tuning input file for completions models", - "decorators": [], - "properties": [ - { - "$id": "4063", - "kind": "property", - "name": "prompt", - "serializedName": "prompt", - "description": "The input prompt for this training example.", - "type": { - "$id": "4064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.prompt" - }, - { - "$id": "4065", - "kind": "property", - "name": "completion", - "serializedName": "completion", - "description": "The desired completion for this training example.", - "type": { - "$id": "4066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.FinetuneCompletionRequestInput.completion" - } - ] - }, - { - "$id": "4067", - "kind": "model", - "name": "MessageContentTextObjectAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation", - "access": "public", - "usage": "Input,Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4068", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4069", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObjectAnnotation.type" - }, - "properties": [ - { - "$ref": "4068" - } - ], - "discriminatedSubtypes": { - "$id": "4070", - "file_citation": { - "$id": "4071", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Input,Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4072", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4073", - "kind": "constant", - "valueType": { - "$id": "4074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4075", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4077", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4078", - "kind": "model", - "name": "MessageContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4079", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4081", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4082", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4083", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4084", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4085", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Input,Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4067" - }, - "properties": [ - { - "$id": "4086", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4087", - "kind": "constant", - "valueType": { - "$id": "4088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4089", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4090", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4091", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4092", - "kind": "model", - "name": "MessageContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4093", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4095", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4096", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4097", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4098", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - { - "$ref": "4071" - }, - { - "$ref": "4078" - }, - { - "$ref": "4085" - }, - { - "$ref": "4092" - }, - { - "$id": "4099", - "kind": "model", - "name": "MessageDeltaContent", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent", - "access": "public", - "usage": "Output", - "description": "Represents a single piece of incremental content in an Assistants API streaming response.", - "decorators": [], - "discriminatorProperty": { - "$id": "4100", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContent.type" - }, - "properties": [ - { - "$ref": "4100" - } - ], - "discriminatedSubtypes": { - "$id": "4102", - "image_file": { - "$id": "4103", - "kind": "model", - "name": "MessageDeltaContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject", - "access": "public", - "usage": "Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "discriminatorValue": "image_file", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4104", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4105", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.index" - }, - { - "$id": "4106", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4107", - "kind": "constant", - "valueType": { - "$id": "4108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.type" - }, - { - "$id": "4109", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4110", - "kind": "model", - "name": "MessageDeltaContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4111", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4113", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1173" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageFileObject.image_file" - } - ] - }, - "image_url": { - "$id": "4114", - "kind": "model", - "name": "MessageDeltaContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject", - "access": "public", - "usage": "Output", - "description": "References an image URL in the content of a message.", - "discriminatorValue": "image_url", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4115", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4116", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.index" - }, - { - "$id": "4117", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_url`.", - "type": { - "$id": "4118", - "kind": "constant", - "valueType": { - "$id": "4119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.type" - }, - { - "$id": "4120", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4121", - "kind": "model", - "name": "MessageDeltaContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4122", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4123", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4124", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1181" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentImageUrlObject.image_url" - } - ] - }, - "text": { - "$id": "4125", - "kind": "model", - "name": "MessageDeltaContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject", - "access": "public", - "usage": "Output", - "description": "The text content that is part of a message.", - "discriminatorValue": "text", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4126", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the content part in the message.", - "type": { - "$id": "4127", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.index" - }, - { - "$id": "4128", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4129", - "kind": "constant", - "valueType": { - "$id": "4130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.type" - }, - { - "$id": "4131", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4132", - "kind": "model", - "name": "MessageDeltaContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4133", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.value" - }, - { - "$id": "4135", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4136", - "kind": "array", - "name": "ArrayMessageDeltaTextContentAnnotation", - "valueType": { - "$id": "4137", - "kind": "model", - "name": "MessageDeltaTextContentAnnotation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation", - "access": "public", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4138", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the content item.", - "type": { - "$id": "4139", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaTextContentAnnotation.type" - }, - "properties": [ - { - "$ref": "4138" - } - ], - "discriminatedSubtypes": { - "$id": "4140", - "file_citation": { - "$id": "4141", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject", - "access": "public", - "usage": "Output", - "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", - "discriminatorValue": "file_citation", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4142", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4143", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.index" - }, - { - "$id": "4144", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_citation`.", - "type": { - "$id": "4145", - "kind": "constant", - "valueType": { - "$id": "4146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_citation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.type" - }, - { - "$id": "4147", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.text" - }, - { - "$id": "4149", - "kind": "property", - "name": "file_citation", - "serializedName": "file_citation", - "type": { - "$id": "4150", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4151", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the specific File the citation is from.", - "type": { - "$id": "4152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.file_id" - }, - { - "$id": "4153", - "kind": "property", - "name": "quote", - "serializedName": "quote", - "description": "The specific quote in the file.", - "type": { - "$id": "4154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation.anonymous.quote" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.file_citation" - }, - { - "$id": "4155", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4156", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.start_index" - }, - { - "$id": "4157", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4158", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject.end_index" - } - ] - }, - "file_path": { - "$id": "4159", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject", - "access": "public", - "usage": "Output", - "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", - "discriminatorValue": "file_path", - "decorators": [], - "baseModel": { - "$ref": "4137" - }, - "properties": [ - { - "$id": "4160", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the annotation in the text content part.", - "type": { - "$id": "4161", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.index" - }, - { - "$id": "4162", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `file_path`.", - "type": { - "$id": "4163", - "kind": "constant", - "valueType": { - "$id": "4164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_path", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.type" - }, - { - "$id": "4165", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "The text in the message content that needs to be replaced.", - "type": { - "$id": "4166", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.text" - }, - { - "$id": "4167", - "kind": "property", - "name": "file_path", - "serializedName": "file_path", - "type": { - "$id": "4168", - "kind": "model", - "name": "MessageDeltaContentTextAnnotationsFilePathObjectFilePath", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4169", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The ID of the file that was generated.", - "type": { - "$id": "4170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.file_path" - }, - { - "$id": "4171", - "kind": "property", - "name": "start_index", - "serializedName": "start_index", - "type": { - "$id": "4172", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.start_index" - }, - { - "$id": "4173", - "kind": "property", - "name": "end_index", - "serializedName": "end_index", - "type": { - "$id": "4174", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextAnnotationsFilePathObject.end_index" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentTextObject.text" - } - ] - }, - "refusal": { - "$id": "4175", - "kind": "model", - "name": "MessageDeltaContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject", - "usage": "Output", - "description": "The refusal content that is part of a message.", - "discriminatorValue": "refusal", - "decorators": [], - "baseModel": { - "$ref": "4099" - }, - "properties": [ - { - "$id": "4176", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the refusal part in the message.", - "type": { - "$id": "4177", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.index" - }, - { - "$id": "4178", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4179", - "kind": "constant", - "valueType": { - "$id": "4180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.type" - }, - { - "$id": "4181", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaContentRefusalObject.refusal" - } - ] - } - } - }, - { - "$ref": "4103" - }, - { - "$ref": "4110" - }, - { - "$ref": "4114" - }, - { - "$ref": "4121" - }, - { - "$ref": "4125" - }, - { - "$ref": "4132" - }, - { - "$ref": "4137" - }, - { - "$ref": "4141" - }, - { - "$ref": "4150" - }, - { - "$ref": "4159" - }, - { - "$ref": "4168" - }, - { - "$ref": "4175" - }, - { - "$id": "4183", - "kind": "model", - "name": "MessageContentImageFileObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image [File](/docs/api-reference/files) in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4184", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image_file`.", - "type": { - "$id": "4185", - "kind": "constant", - "valueType": { - "$ref": "1189" - }, - "value": "image_file", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.type" - }, - { - "$id": "4186", - "kind": "property", - "name": "image_file", - "serializedName": "image_file", - "type": { - "$id": "4187", - "kind": "model", - "name": "MessageContentImageFileObjectImageFile", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4188", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.", - "type": { - "$id": "4189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.file_id" - }, - { - "$id": "4190", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.", - "type": { - "$ref": "1192" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageFileObject.image_file" - } - ] - }, - { - "$ref": "4187" - }, - { - "$id": "4191", - "kind": "model", - "name": "MessageContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4192", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4193", - "kind": "constant", - "valueType": { - "$ref": "1200" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.type" - }, - { - "$id": "4194", - "kind": "property", - "name": "text", - "serializedName": "text", - "type": { - "$id": "4195", - "kind": "model", - "name": "MessageContentTextObjectText", - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4196", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The data that makes up the text.", - "type": { - "$id": "4197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.value" - }, - { - "$id": "4198", - "kind": "property", - "name": "annotations", - "serializedName": "annotations", - "type": { - "$id": "4199", - "kind": "array", - "name": "ArrayMessageContentTextObjectAnnotation", - "valueType": { - "$ref": "4067" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text.anonymous.annotations" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentTextObject.text" - } - ] - }, - { - "$ref": "4195" - }, - { - "$id": "4200", - "kind": "model", - "name": "MessageContentRefusalObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject", - "access": "public", - "usage": "Input,Output", - "description": "The refusal content generated by the assistant.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4201", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `refusal`.", - "type": { - "$id": "4202", - "kind": "constant", - "valueType": { - "$ref": "1203" - }, - "value": "refusal", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.type" - }, - { - "$id": "4203", - "kind": "property", - "name": "refusal", - "serializedName": "refusal", - "type": { - "$id": "4204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentRefusalObject.refusal" - } - ] - }, - { - "$id": "4205", - "kind": "model", - "name": "MessageContentImageUrlObject", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject", - "access": "public", - "usage": "Input,Output", - "description": "References an image URL in the content of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4206", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of the content part.", - "type": { - "$id": "4207", - "kind": "constant", - "valueType": { - "$ref": "1206" - }, - "value": "image_url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.type" - }, - { - "$id": "4208", - "kind": "property", - "name": "image_url", - "serializedName": "image_url", - "type": { - "$id": "4209", - "kind": "model", - "name": "MessageContentImageUrlObjectImageUrl", - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous", - "usage": "Input,Output", - "decorators": [], - "properties": [ - { - "$id": "4210", - "kind": "property", - "name": "url", - "serializedName": "url", - "description": "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", - "type": { - "$id": "4211", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.url" - }, - { - "$id": "4212", - "kind": "property", - "name": "detail", - "serializedName": "detail", - "description": "Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`", - "type": { - "$ref": "1209" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url.anonymous.detail" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageContentImageUrlObject.image_url" - } - ] - }, - { - "$ref": "4209" - }, - { - "$id": "4213", - "kind": "model", - "name": "MessageDeltaObject", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a message delta i.e. any changed fields on a message during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4214", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the message, which can be referenced in API endpoints.", - "type": { - "$id": "4215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.id" - }, - { - "$id": "4216", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.message.delta`.", - "type": { - "$id": "4217", - "kind": "constant", - "valueType": { - "$ref": "1217" - }, - "value": "thread.message.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.object" - }, - { - "$id": "4218", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the Message.", - "type": { - "$id": "4219", - "kind": "model", - "name": "MessageDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4220", - "kind": "property", - "name": "role", - "serializedName": "role", - "description": "The entity that produced the message. One of `user` or `assistant`.", - "type": { - "$ref": "1220" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.role" - }, - { - "$id": "4221", - "kind": "property", - "name": "content", - "serializedName": "content", - "description": "The content of the message in array of text and/or images.", - "type": { - "$id": "4222", - "kind": "array", - "name": "ArrayMessageDeltaContent", - "valueType": { - "$ref": "4099" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta.anonymous.content" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageDeltaObject.delta" - } - ] - }, - { - "$ref": "4219" - }, - { - "$id": "4223", - "kind": "model", - "name": "MessageRequestContentTextObject", - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject", - "access": "public", - "usage": "Input,Output", - "description": "The text content that is part of a message.", - "decorators": [], - "baseModel": { - "$ref": "1530" - }, - "properties": [ - { - "$id": "4224", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `text`.", - "type": { - "$id": "4225", - "kind": "constant", - "valueType": { - "$ref": "1226" - }, - "value": "text", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.type" - }, - { - "$id": "4226", - "kind": "property", - "name": "text", - "serializedName": "text", - "description": "Text content to be sent to the model", - "type": { - "$id": "4227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.MessageRequestContentTextObject.text" - } - ] - }, - { - "$id": "4228", - "kind": "model", - "name": "RunStepDeltaStepDetails", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails", - "usage": "Output", - "decorators": [], - "discriminatorProperty": { - "$id": "4229", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetails.type" - }, - "properties": [ - { - "$ref": "4229" - } - ], - "discriminatedSubtypes": { - "$id": "4231", - "message_creation": { - "$id": "4232", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject", - "access": "public", - "usage": "Output", - "description": "Details of the message creation by the run step.", - "discriminatorValue": "message_creation", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4233", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `message_creation`.", - "type": { - "$id": "4234", - "kind": "constant", - "valueType": { - "$id": "4235", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "message_creation", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.type" - }, - { - "$id": "4236", - "kind": "property", - "name": "message_creation", - "serializedName": "message_creation", - "type": { - "$id": "4237", - "kind": "model", - "name": "RunStepDeltaStepDetailsMessageCreationObjectMessageCreation", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4238", - "kind": "property", - "name": "message_id", - "serializedName": "message_id", - "description": "The ID of the message that was created by this run step.", - "type": { - "$id": "4239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation.anonymous.message_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsMessageCreationObject.message_creation" - } - ] - }, - "tool_calls": { - "$id": "4240", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject", - "access": "public", - "usage": "Output", - "description": "Details of the tool call.", - "discriminatorValue": "tool_calls", - "decorators": [], - "baseModel": { - "$ref": "4228" - }, - "properties": [ - { - "$id": "4241", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `tool_calls`.", - "type": { - "$id": "4242", - "kind": "constant", - "valueType": { - "$id": "4243", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "tool_calls", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.type" - }, - { - "$id": "4244", - "kind": "property", - "name": "tool_calls", - "serializedName": "tool_calls", - "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.", - "type": { - "$id": "4245", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "valueType": { - "$id": "4246", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details inner object.", - "decorators": [], - "discriminatorProperty": { - "$id": "4247", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObjectToolCallsObject.type" - }, - "properties": [ - { - "$ref": "4247" - } - ], - "discriminatedSubtypes": { - "$id": "4249", - "code_interpreter": { - "$id": "4250", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject", - "access": "public", - "usage": "Output", - "description": "Details of the Code Interpreter tool call the run step was involved in.", - "discriminatorValue": "code_interpreter", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4251", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4252", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.index" - }, - { - "$id": "4253", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call.", - "type": { - "$id": "4254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.id" - }, - { - "$id": "4255", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", - "type": { - "$id": "4256", - "kind": "constant", - "valueType": { - "$id": "4257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "code_interpreter", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.type" - }, - { - "$id": "4258", - "kind": "property", - "name": "code_interpreter", - "serializedName": "code_interpreter", - "description": "The Code Interpreter tool call definition.", - "type": { - "$id": "4259", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4260", - "kind": "property", - "name": "input", - "serializedName": "input", - "description": "The input to the Code Interpreter tool call.", - "type": { - "$id": "4261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.input" - }, - { - "$id": "4262", - "kind": "property", - "name": "outputs", - "serializedName": "outputs", - "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", - "type": { - "$id": "4263", - "kind": "array", - "name": "ArrayRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "valueType": { - "$id": "4264", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject", - "usage": "Output", - "description": "Abstractly represents a run step tool call details code interpreter output.", - "decorators": [], - "discriminatorProperty": { - "$id": "4265", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The discriminated type identifier for the details object.", - "type": { - "$id": "4266", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.type" - }, - "properties": [ - { - "$ref": "4265" - } - ], - "discriminatedSubtypes": { - "$id": "4267", - "logs": { - "$id": "4268", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject", - "access": "public", - "usage": "Output", - "description": "Text output from the Code Interpreter tool call as part of a run step.", - "discriminatorValue": "logs", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4269", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4270", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.index" - }, - { - "$id": "4271", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `logs`.", - "type": { - "$id": "4272", - "kind": "constant", - "valueType": { - "$id": "4273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "logs", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.type" - }, - { - "$id": "4274", - "kind": "property", - "name": "logs", - "serializedName": "logs", - "description": "The text output from the Code Interpreter tool call.", - "type": { - "$id": "4275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.logs" - } - ] - }, - "image": { - "$id": "4276", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "image", - "decorators": [], - "baseModel": { - "$ref": "4264" - }, - "properties": [ - { - "$id": "4277", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the output in the outputs array.", - "type": { - "$id": "4278", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.index" - }, - { - "$id": "4279", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "Always `image`.", - "type": { - "$id": "4280", - "kind": "constant", - "valueType": { - "$id": "4281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.type" - }, - { - "$id": "4282", - "kind": "property", - "name": "image", - "serializedName": "image", - "type": { - "$id": "4283", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4284", - "kind": "property", - "name": "file_id", - "serializedName": "file_id", - "description": "The [file](/docs/api-reference/files) ID of the image.", - "type": { - "$id": "4285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image.anonymous.file_id" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.image" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter.anonymous.outputs" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject.code_interpreter" - } - ] - }, - "file_search": { - "$id": "4286", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFileSearchObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "file_search", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4287", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4288", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.index" - }, - { - "$id": "4289", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.id" - }, - { - "$id": "4291", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", - "type": { - "$id": "4292", - "kind": "constant", - "valueType": { - "$id": "4293", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "file_search", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.type" - }, - { - "$id": "4294", - "kind": "property", - "name": "file_search", - "serializedName": "file_search", - "description": "For now, this is always going to be an empty object.", - "type": { - "$id": "4295", - "kind": "dict", - "keyType": { - "$id": "4296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "4297", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject.file_search" - } - ] - }, - "function": { - "$id": "4298", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject", - "access": "public", - "usage": "Output", - "discriminatorValue": "function", - "decorators": [], - "baseModel": { - "$ref": "4246" - }, - "properties": [ - { - "$id": "4299", - "kind": "property", - "name": "index", - "serializedName": "index", - "description": "The index of the tool call in the tool calls array.", - "type": { - "$id": "4300", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.index" - }, - { - "$id": "4301", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The ID of the tool call object.", - "type": { - "$id": "4302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.id" - }, - { - "$id": "4303", - "kind": "property", - "name": "type", - "serializedName": "type", - "description": "The type of tool call. This is always going to be `function` for this type of tool call.", - "type": { - "$id": "4304", - "kind": "constant", - "valueType": { - "$id": "4305", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "function", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": true, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.type" - }, - { - "$id": "4306", - "kind": "property", - "name": "function", - "serializedName": "function", - "description": "The definition of the function that was called.", - "type": { - "$id": "4307", - "kind": "model", - "name": "RunStepDeltaStepDetailsToolCallsFunctionObjectFunction", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4308", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "The name of the function.", - "type": { - "$id": "4309", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.name" - }, - { - "$id": "4310", - "kind": "property", - "name": "arguments", - "serializedName": "arguments", - "description": "The arguments passed to the function.", - "type": { - "$id": "4311", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.arguments" - }, - { - "$id": "4312", - "kind": "property", - "name": "output", - "serializedName": "output", - "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", - "type": { - "$id": "4313", - "kind": "nullable", - "type": { - "$id": "4314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function.anonymous.output" - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject.function" - } - ] - } - } - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaStepDetailsToolCallsObject.tool_calls" - } - ] - } - } - }, - { - "$ref": "4232" - }, - { - "$ref": "4237" - }, - { - "$ref": "4240" - }, - { - "$ref": "4246" - }, - { - "$ref": "4250" - }, - { - "$ref": "4259" - }, - { - "$ref": "4264" - }, - { - "$ref": "4268" - }, - { - "$ref": "4276" - }, - { - "$ref": "4283" - }, - { - "$ref": "4286" - }, - { - "$ref": "4298" - }, - { - "$ref": "4307" - }, - { - "$id": "4315", - "kind": "model", - "name": "RunStepDeltaObject", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject", - "access": "public", - "usage": "Output", - "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", - "decorators": [], - "properties": [ - { - "$id": "4316", - "kind": "property", - "name": "id", - "serializedName": "id", - "description": "The identifier of the run step, which can be referenced in API endpoints.", - "type": { - "$id": "4317", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.id" - }, - { - "$id": "4318", - "kind": "property", - "name": "object", - "serializedName": "object", - "description": "The object type, which is always `thread.run.step.delta`.", - "type": { - "$id": "4319", - "kind": "constant", - "valueType": { - "$ref": "1229" - }, - "value": "thread.run.step.delta", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.object" - }, - { - "$id": "4320", - "kind": "property", - "name": "delta", - "serializedName": "delta", - "description": "The delta containing the fields that have changed on the run step.", - "type": { - "$id": "4321", - "kind": "model", - "name": "RunStepDeltaObjectDelta", - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4322", - "kind": "property", - "name": "step_details", - "serializedName": "step_details", - "description": "The details of the run step.", - "type": { - "$ref": "4228" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta.anonymous.step_details" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.RunStepDeltaObject.delta" - } - ] - }, - { - "$ref": "4321" - }, - { - "$id": "4323", - "kind": "model", - "name": "CreateThreadRequestToolResourcesFileSearchBase", - "crossLanguageDefinitionId": "OpenAI.CreateThreadRequestToolResourcesFileSearchBase", - "access": "public", - "usage": "Input", - "decorators": [], - "properties": [] - }, - { - "$id": "4324", - "kind": "model", - "name": "ListThreadsResponse", - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse", - "access": "public", - "usage": "Output", - "decorators": [], - "properties": [ - { - "$id": "4325", - "kind": "property", - "name": "object", - "serializedName": "object", - "type": { - "$id": "4326", - "kind": "constant", - "valueType": { - "$ref": "1232" - }, - "value": "list", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.object" - }, - { - "$id": "4327", - "kind": "property", - "name": "data", - "serializedName": "data", - "type": { - "$id": "4328", - "kind": "array", - "name": "ArrayThreadObject", - "valueType": { - "$ref": "2052" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.data" - }, - { - "$id": "4329", - "kind": "property", - "name": "first_id", - "serializedName": "first_id", - "type": { - "$id": "4330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.first_id" - }, - { - "$id": "4331", - "kind": "property", - "name": "last_id", - "serializedName": "last_id", - "type": { - "$id": "4332", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.last_id" - }, - { - "$id": "4333", - "kind": "property", - "name": "has_more", - "serializedName": "has_more", - "type": { - "$id": "4334", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "OpenAI.ListThreadsResponse.has_more" - } - ] - } - ], - "Clients": [ - { - "$id": "4335", - "Name": "OpenAIClient", - "Description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", - "Operations": [], - "Protocol": { - "$id": "4336" - }, - "Parameters": [ - { - "$id": "4337", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4338", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4339", - "Type": { - "$id": "4340", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - } - ], - "Decorators": [] - }, - { - "$id": "4341", - "Name": "Audio", - "Operations": [ - { - "$id": "4342", - "Name": "createSpeech", - "ResourceName": "Audio", - "Summary": "Generates audio from the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4343", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4344", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4345", - "Type": { - "$id": "4346", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4347", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4348", - "kind": "constant", - "valueType": { - "$id": "4349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4350", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4351", - "kind": "constant", - "valueType": { - "$id": "4352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4353", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3817" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4354", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4355", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4356", - "Name": "transferEncoding", - "NameInResponse": "Transfer-Encoding", - "Description": "chunked", - "Type": { - "$id": "4357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "$id": "4358", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4359", - "kind": "constant", - "valueType": { - "$id": "4360", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/octet-stream" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/speech", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createSpeech", - "Decorators": [] - }, - { - "$id": "4361", - "Name": "createTranscription", - "ResourceName": "Audio", - "Summary": "Transcribes audio into the input language.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4362", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4363", - "kind": "constant", - "valueType": { - "$id": "4364", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4365", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4366", - "kind": "constant", - "valueType": { - "$id": "4367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4368", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3825" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4369", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4370", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4371", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4372", - "kind": "constant", - "valueType": { - "$id": "4373", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/transcriptions", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranscription", - "Decorators": [] - }, - { - "$id": "4374", - "Name": "createTranslation", - "ResourceName": "Audio", - "Summary": "Translates audio into English..", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4343" - }, - { - "$id": "4375", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4376", - "kind": "constant", - "valueType": { - "$id": "4377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4378", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4379", - "kind": "constant", - "valueType": { - "$id": "4380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4381", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3888" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4382", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "4384", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "4385", - "kind": "constant", - "valueType": { - "$id": "4386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json", - "application/json", - "text/plain" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/audio/translations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Audio.createTranslation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4387" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4343" - } - ], - "Decorators": [] - }, - { - "$id": "4388", - "Name": "Assistants", - "Operations": [ - { - "$id": "4389", - "Name": "createAssistant", - "ResourceName": "Assistants", - "Summary": "Create an assistant with a model and instructions.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4390", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4391", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4392", - "Type": { - "$id": "4393", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4394", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4395", - "kind": "constant", - "valueType": { - "$id": "4396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4397", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4398", - "kind": "constant", - "valueType": { - "$id": "4399", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4400", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3676" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4401", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.createAssistant", - "Decorators": [] - }, - { - "$id": "4402", - "Name": "listAssistants", - "ResourceName": "Assistants", - "Summary": "Returns a list of assistants.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4403", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4404", - "kind": "constant", - "valueType": { - "$id": "4405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4406", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4407", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4408", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "1033" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4409", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4410", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4411", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4412", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4413", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3760" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.listAssistants", - "Decorators": [] - }, - { - "$id": "4414", - "Name": "getAssistant", - "ResourceName": "Assistants", - "Summary": "Retrieves an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4415", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4416", - "kind": "constant", - "valueType": { - "$id": "4417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4418", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to retrieve.", - "Type": { - "$id": "4419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4420", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.getAssistant", - "Decorators": [] - }, - { - "$id": "4421", - "Name": "modifyAssistant", - "ResourceName": "Assistants", - "Summary": "Modifies an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4422", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4423", - "kind": "constant", - "valueType": { - "$id": "4424", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4425", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to modify.", - "Type": { - "$id": "4426", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4427", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4428", - "kind": "constant", - "valueType": { - "$id": "4429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4430", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3771" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4431", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3714" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.modifyAssistant", - "Decorators": [] - }, - { - "$id": "4432", - "Name": "deleteAssistant", - "ResourceName": "Assistants", - "Summary": "Delete an assistant.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4390" - }, - { - "$id": "4433", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4434", - "kind": "constant", - "valueType": { - "$id": "4435", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4436", - "Name": "assistant_id", - "NameInRequest": "assistant_id", - "Description": "The ID of the assistant to delete.", - "Type": { - "$id": "4437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4438", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3810" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/assistants/{assistant_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Assistants.deleteAssistant", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4439" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4390" - } - ], - "Decorators": [] - }, - { - "$id": "4440", - "Name": "Batches", - "Operations": [ - { - "$id": "4441", - "Name": "createBatch", - "ResourceName": "Batches", - "Summary": "Creates and executes a batch from an uploaded file of requests", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4442", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4443", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4444", - "Type": { - "$id": "4445", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4446", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4447", - "kind": "constant", - "valueType": { - "$id": "4448", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4449", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4450", - "kind": "constant", - "valueType": { - "$id": "4451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4452", - "Name": "createBatchRequest", - "NameInRequest": "createBatchRequest", - "Type": { - "$ref": "3581" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Spread", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4453", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.createBatch", - "Decorators": [] - }, - { - "$id": "4454", - "Name": "listBatches", - "ResourceName": "Batches", - "Summary": "List your organization's batches.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4455", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4456", - "kind": "constant", - "valueType": { - "$id": "4457", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4458", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4459", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4460", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4461", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4462", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3665" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.listBatches", - "Decorators": [] - }, - { - "$id": "4463", - "Name": "retrieveBatch", - "ResourceName": "Batches", - "Summary": "Retrieves a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4464", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4465", - "kind": "constant", - "valueType": { - "$id": "4466", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4467", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to retrieve.", - "Type": { - "$id": "4468", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4469", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.retrieveBatch", - "Decorators": [] - }, - { - "$id": "4470", - "Name": "cancelBatch", - "ResourceName": "Batches", - "Summary": "Cancels an in-progress batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4442" - }, - { - "$id": "4471", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4472", - "kind": "constant", - "valueType": { - "$id": "4473", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4474", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the batch to cancel.", - "Type": { - "$id": "4475", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4476", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3592" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Batches.cancelBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4477" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4442" - } - ], - "Decorators": [] - }, - { - "$id": "4478", - "Name": "Chat", - "Operations": [ - { - "$id": "4479", - "Name": "createChatCompletion", - "ResourceName": "Chat", - "Summary": "Creates a model response for the given chat conversation.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4480", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4481", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4482", - "Type": { - "$id": "4483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4484", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4485", - "kind": "constant", - "valueType": { - "$id": "4486", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4487", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4488", - "kind": "constant", - "valueType": { - "$id": "4489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4490", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3308" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4491", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3513" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/chat/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Chat.createChatCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4492" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4480" - } - ], - "Decorators": [] - }, - { - "$id": "4493", - "Name": "Completions", - "Operations": [ - { - "$id": "4494", - "Name": "createCompletion", - "ResourceName": "Completions", - "Summary": "Creates a completion for the provided prompt and parameters.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4495", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4496", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4497", - "Type": { - "$id": "4498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4499", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4500", - "kind": "constant", - "valueType": { - "$id": "4501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4502", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4503", - "kind": "constant", - "valueType": { - "$id": "4504", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4505", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3192" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4506", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3259" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/completions", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Completions.createCompletion", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4507" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4495" - } - ], - "Decorators": [] - }, - { - "$id": "4508", - "Name": "Embeddings", - "Operations": [ - { - "$id": "4509", - "Name": "createEmbedding", - "ResourceName": "Embeddings", - "Summary": "Creates an embedding vector representing the input text.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4510", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4511", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4512", - "Type": { - "$id": "4513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4514", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4515", - "kind": "constant", - "valueType": { - "$id": "4516", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4517", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4518", - "kind": "constant", - "valueType": { - "$id": "4519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4520", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3152" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4521", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3169" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/embeddings", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Embeddings.createEmbedding", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4522" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4510" - } - ], - "Decorators": [] - }, - { - "$id": "4523", - "Name": "Files", - "Operations": [ - { - "$id": "4524", - "Name": "createFile", - "ResourceName": "Files", - "Summary": "Upload a file that can be used across various endpoints. The size of all the files uploaded by\none organization can be up to 100 GB.\n\nThe size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See\nthe [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files\nsupported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4525", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4526", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4527", - "Type": { - "$id": "4528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4529", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4530", - "kind": "constant", - "valueType": { - "$id": "4531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4532", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4533", - "kind": "constant", - "valueType": { - "$id": "4534", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4535", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "3136" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4536", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/files", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.createFile", - "Decorators": [] - }, - { - "$id": "4537", - "Name": "listFiles", - "ResourceName": "Files", - "Summary": "Returns a list of files that belong to the user's organization.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4538", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4539", - "kind": "constant", - "valueType": { - "$id": "4540", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4541", - "Name": "purpose", - "NameInRequest": "purpose", - "Description": "Only return files with the given purpose.", - "Type": { - "$id": "4542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4543", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3140" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.listFiles", - "Decorators": [] - }, - { - "$id": "4544", - "Name": "retrieveFile", - "ResourceName": "Files", - "Summary": "Returns information about a specific file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4545", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4546", - "kind": "constant", - "valueType": { - "$id": "4547", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4548", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4549", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4550", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1275" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.retrieveFile", - "Decorators": [] - }, - { - "$id": "4551", - "Name": "deleteFile", - "ResourceName": "Files", - "Summary": "Delete a file", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4552", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4553", - "kind": "constant", - "valueType": { - "$id": "4554", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4555", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4556", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4557", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3145" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.deleteFile", - "Decorators": [] - }, - { - "$id": "4558", - "Name": "downloadFile", - "ResourceName": "Files", - "Summary": "Returns the contents of the specified file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4525" - }, - { - "$id": "4559", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4560", - "kind": "constant", - "valueType": { - "$id": "4561", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4562", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to use for this request.", - "Type": { - "$id": "4563", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4564", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4565", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/files/{file_id}/content", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Files.downloadFile", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4566" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4525" - } - ], - "Decorators": [] - }, - { - "$id": "4567", - "Name": "FineTuning", - "Operations": [ - { - "$id": "4568", - "Name": "createFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4569", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4570", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4571", - "Type": { - "$id": "4572", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4573", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4574", - "kind": "constant", - "valueType": { - "$id": "4575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4576", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4577", - "kind": "constant", - "valueType": { - "$id": "4578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4579", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2935" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4580", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.createFineTuningJob", - "Decorators": [] - }, - { - "$id": "4581", - "Name": "listPaginatedFineTuningJobs", - "ResourceName": "FineTuning", - "Summary": "List your organization's fine-tuning jobs", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4582", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4583", - "kind": "constant", - "valueType": { - "$id": "4584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4585", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last job from the previous pagination request.", - "Type": { - "$id": "4586", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4587", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of fine-tuning jobs to retrieve.", - "Type": { - "$id": "4588", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4589", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3068" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listPaginatedFineTuningJobs", - "Decorators": [] - }, - { - "$id": "4590", - "Name": "retrieveFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4591", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4592", - "kind": "constant", - "valueType": { - "$id": "4593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4594", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job.", - "Type": { - "$id": "4595", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4596", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.retrieveFineTuningJob", - "Decorators": [] - }, - { - "$id": "4597", - "Name": "cancelFineTuningJob", - "ResourceName": "FineTuning", - "Summary": "Immediately cancel a fine-tune job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4598", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4599", - "kind": "constant", - "valueType": { - "$id": "4600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4601", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to cancel.", - "Type": { - "$id": "4602", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4603", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2983" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.cancelFineTuningJob", - "Decorators": [] - }, - { - "$id": "4604", - "Name": "listFineTuningJobCheckpoints", - "ResourceName": "FineTuning", - "Summary": "List the checkpoints for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4605", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4606", - "kind": "constant", - "valueType": { - "$id": "4607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4608", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get checkpoints for.", - "Type": { - "$id": "4609", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4610", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last checkpoint ID from the previous pagination request.", - "Type": { - "$id": "4611", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4612", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of checkpoints to retrieve.", - "Type": { - "$id": "4613", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4614", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3075" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningJobCheckpoints", - "Decorators": [] - }, - { - "$id": "4615", - "Name": "listFineTuningEvents", - "ResourceName": "FineTuning", - "Summary": "Get status updates for a fine-tuning job.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4569" - }, - { - "$id": "4616", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4617", - "kind": "constant", - "valueType": { - "$id": "4618", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4619", - "Name": "fine_tuning_job_id", - "NameInRequest": "fine_tuning_job_id", - "Description": "The ID of the fine-tuning job to get events for.", - "Type": { - "$id": "4620", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4621", - "Name": "after", - "NameInRequest": "after", - "Description": "Identifier for the last event from the previous pagination request.", - "Type": { - "$id": "4622", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4623", - "Name": "limit", - "NameInRequest": "limit", - "Description": "Number of events to retrieve.", - "Type": { - "$id": "4624", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4625", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "3118" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/fine_tuning/jobs/{fine_tuning_job_id}/events", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.FineTuning.listFineTuningEvents", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4626" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4569" - } - ], - "Decorators": [] - }, - { - "$id": "4627", - "Name": "Images", - "Operations": [ - { - "$id": "4628", - "Name": "createImage", - "ResourceName": "Images", - "Summary": "Creates an image given a prompt", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4629", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4630", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4631", - "Type": { - "$id": "4632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4633", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4634", - "kind": "constant", - "valueType": { - "$id": "4635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4636", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4637", - "kind": "constant", - "valueType": { - "$id": "4638", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4639", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2873" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4640", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/generations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImage", - "Decorators": [] - }, - { - "$id": "4641", - "Name": "createImageEdit", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4642", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4643", - "kind": "constant", - "valueType": { - "$id": "4644", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4645", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4646", - "kind": "constant", - "valueType": { - "$id": "4647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4648", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2903" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4649", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/edits", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageEdit", - "Decorators": [] - }, - { - "$id": "4650", - "Name": "createImageVariation", - "ResourceName": "Images", - "Summary": "Creates an edited or extended image given an original image and a prompt.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4629" - }, - { - "$id": "4651", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4652", - "kind": "constant", - "valueType": { - "$id": "4653", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4654", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "4655", - "kind": "constant", - "valueType": { - "$id": "4656", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4657", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2921" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4658", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2890" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/images/variations", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Images.createImageVariation", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4659" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4629" - } - ], - "Decorators": [] - }, - { - "$id": "4660", - "Name": "Messages", - "Operations": [ - { - "$id": "4661", - "Name": "createMessage", - "ResourceName": "Messages", - "Summary": "Create a message.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4662", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4663", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4664", - "Type": { - "$id": "4665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4666", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4667", - "kind": "constant", - "valueType": { - "$id": "4668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4669", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", - "Type": { - "$id": "4670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4671", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4672", - "kind": "constant", - "valueType": { - "$id": "4673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4674", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1526" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4675", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.createMessage", - "Decorators": [] - }, - { - "$id": "4676", - "Name": "listMessages", - "ResourceName": "Messages", - "Summary": "Returns a list of messages for a given thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4677", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4678", - "kind": "constant", - "valueType": { - "$id": "4679", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4680", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", - "Type": { - "$id": "4681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4682", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4683", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4684", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "609" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4685", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4686", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4687", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4688", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4689", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2849" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.listMessages", - "Decorators": [] - }, - { - "$id": "4690", - "Name": "getMessage", - "ResourceName": "Messages", - "Summary": "Retrieve a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4691", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4692", - "kind": "constant", - "valueType": { - "$id": "4693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4694", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", - "Type": { - "$id": "4695", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4696", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to retrieve.", - "Type": { - "$id": "4697", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4698", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.getMessage", - "Decorators": [] - }, - { - "$id": "4699", - "Name": "modifyMessage", - "ResourceName": "Messages", - "Summary": "Modifies a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4700", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4701", - "kind": "constant", - "valueType": { - "$id": "4702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4703", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4705", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to modify.", - "Type": { - "$id": "4706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4707", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4708", - "kind": "constant", - "valueType": { - "$id": "4709", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4710", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2860" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4711", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2803" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.modifyMessage", - "Decorators": [] - }, - { - "$id": "4712", - "Name": "deleteMessage", - "ResourceName": "Messages", - "Summary": "Deletes a message.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4662" - }, - { - "$id": "4713", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4714", - "kind": "constant", - "valueType": { - "$id": "4715", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4716", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this message belongs.", - "Type": { - "$id": "4717", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4718", - "Name": "message_id", - "NameInRequest": "message_id", - "Description": "The ID of the message to delete.", - "Type": { - "$id": "4719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4720", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2866" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/messages/{message_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Messages.deleteMessage", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4721" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4662" - } - ], - "Decorators": [] - }, - { - "$id": "4722", - "Name": "ModelsOps", - "Operations": [ - { - "$id": "4723", - "Name": "listModels", - "ResourceName": "Models", - "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4724", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4725", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4726", - "Type": { - "$id": "4727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4728", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4729", - "kind": "constant", - "valueType": { - "$id": "4730", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4731", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2781" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.listModels", - "Decorators": [] - }, - { - "$id": "4732", - "Name": "retrieveModel", - "ResourceName": "Models", - "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4733", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4734", - "kind": "constant", - "valueType": { - "$id": "4735", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4736", - "Name": "model", - "NameInRequest": "model", - "Description": "The ID of the model to use for this request.", - "Type": { - "$id": "4737", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4738", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2786" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.retrieveModel", - "Decorators": [] - }, - { - "$id": "4739", - "Name": "deleteModel", - "ResourceName": "Models", - "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4724" - }, - { - "$id": "4740", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4741", - "kind": "constant", - "valueType": { - "$id": "4742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4743", - "Name": "model", - "NameInRequest": "model", - "Description": "The model to delete", - "Type": { - "$id": "4744", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4745", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2796" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/models/{model}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Models.deleteModel", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4746" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4724" - } - ], - "Decorators": [] - }, - { - "$id": "4747", - "Name": "Moderations", - "Operations": [ - { - "$id": "4748", - "Name": "createModeration", - "ResourceName": "Moderations", - "Summary": "Classifies if text is potentially harmful.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4749", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4750", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4751", - "Type": { - "$id": "4752", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4753", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4754", - "kind": "constant", - "valueType": { - "$id": "4755", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4756", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4757", - "kind": "constant", - "valueType": { - "$id": "4758", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4759", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2716" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4760", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2723" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/moderations", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Moderations.createModeration", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4761" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4749" - } - ], - "Decorators": [] - }, - { - "$id": "4762", - "Name": "Realtime", - "Operations": [ - { - "$id": "4763", - "Name": "startRealtimeSession", - "ResourceName": "Realtime", - "Summary": "Starts a real-time conversation session.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4764", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4765", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4766", - "Type": { - "$id": "4767", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4768", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4769", - "kind": "constant", - "valueType": { - "$id": "4770", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4771", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4772", - "kind": "constant", - "valueType": { - "$id": "4773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4774", - "Name": "requestMessages", - "NameInRequest": "requestMessages", - "Type": { - "$id": "4775", - "kind": "array", - "name": "ArrayRealtimeRequestCommand", - "valueType": { - "$ref": "2100" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4776", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$id": "4777", - "kind": "array", - "name": "ArrayRealtimeResponseCommand", - "valueType": { - "$ref": "2322" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/realtime", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Realtime.startRealtimeSession", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4778" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4764" - } - ], - "Decorators": [] - }, - { - "$id": "4779", - "Name": "Threads", - "Operations": [ - { - "$id": "4780", - "Name": "createThread", - "ResourceName": "Threads", - "Summary": "Create a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4781", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4782", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4783", - "Type": { - "$id": "4784", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4785", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4786", - "kind": "constant", - "valueType": { - "$id": "4787", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4788", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4789", - "kind": "constant", - "valueType": { - "$id": "4790", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4791", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1523" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4792", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.createThread", - "Decorators": [] - }, - { - "$id": "4793", - "Name": "getThread", - "ResourceName": "Threads", - "Summary": "Retrieves a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4794", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4795", - "kind": "constant", - "valueType": { - "$id": "4796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4797", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to retrieve.", - "Type": { - "$id": "4798", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4799", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.getThread", - "Decorators": [] - }, - { - "$id": "4800", - "Name": "modifyThread", - "ResourceName": "Threads", - "Summary": "Modifies a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4801", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4802", - "kind": "constant", - "valueType": { - "$id": "4803", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4804", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to modify. Only the `metadata` can be modified.", - "Type": { - "$id": "4805", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4806", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4807", - "kind": "constant", - "valueType": { - "$id": "4808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4809", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "2078" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4810", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2052" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.modifyThread", - "Decorators": [] - }, - { - "$id": "4811", - "Name": "deleteThread", - "ResourceName": "Threads", - "Summary": "Delete a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4781" - }, - { - "$id": "4812", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4813", - "kind": "constant", - "valueType": { - "$id": "4814", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4815", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to delete.", - "Type": { - "$id": "4816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4817", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2093" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Threads.deleteThread", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4818" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4781" - } - ], - "Decorators": [] - }, - { - "$id": "4819", - "Name": "Runs", - "Operations": [ - { - "$id": "4820", - "Name": "createThreadAndRun", - "ResourceName": "Runs", - "Summary": "Create a thread and run it in one request.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4821", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4822", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4823", - "Type": { - "$id": "4824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4825", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4826", - "kind": "constant", - "valueType": { - "$id": "4827", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4828", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4829", - "kind": "constant", - "valueType": { - "$id": "4830", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4831", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1519" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4832", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createThreadAndRun", - "Decorators": [] - }, - { - "$id": "4833", - "Name": "createRun", - "ResourceName": "Runs", - "Summary": "Create a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4834", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4835", - "kind": "constant", - "valueType": { - "$id": "4836", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4837", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to run.", - "Type": { - "$id": "4838", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4839", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4840", - "kind": "constant", - "valueType": { - "$id": "4841", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4842", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1814" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4843", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.createRun", - "Decorators": [] - }, - { - "$id": "4844", - "Name": "listRuns", - "ResourceName": "Runs", - "Summary": "Returns a list of runs belonging to a thread.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4845", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4846", - "kind": "constant", - "valueType": { - "$id": "4847", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4848", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run belongs to.", - "Type": { - "$id": "4849", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4850", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4851", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4852", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "319" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4853", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4854", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4855", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4856", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4857", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1863" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRuns", - "Decorators": [] - }, - { - "$id": "4858", - "Name": "getRun", - "ResourceName": "Runs", - "Summary": "Retrieves a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4859", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4860", - "kind": "constant", - "valueType": { - "$id": "4861", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4862", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4864", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to retrieve.", - "Type": { - "$id": "4865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4866", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRun", - "Decorators": [] - }, - { - "$id": "4867", - "Name": "modifyRun", - "ResourceName": "Runs", - "Summary": "Modifies a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4868", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4869", - "kind": "constant", - "valueType": { - "$id": "4870", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4871", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) that was run.", - "Type": { - "$id": "4872", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4873", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to modify.", - "Type": { - "$id": "4874", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4875", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4876", - "kind": "constant", - "valueType": { - "$id": "4877", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4878", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1874" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4879", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.modifyRun", - "Decorators": [] - }, - { - "$id": "4880", - "Name": "cancelRun", - "ResourceName": "Runs", - "Summary": "Cancels a run that is `in_progress`.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4881", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4882", - "kind": "constant", - "valueType": { - "$id": "4883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4884", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which this run belongs.", - "Type": { - "$id": "4885", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4886", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to cancel.", - "Type": { - "$id": "4887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4888", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.cancelRun", - "Decorators": [] - }, - { - "$id": "4889", - "Name": "submitToolOutputsToRun", - "ResourceName": "Runs", - "Summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is\n`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once\nthey're all completed. All outputs must be submitted in a single request.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4890", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4891", - "kind": "constant", - "valueType": { - "$id": "4892", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4893", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", - "Type": { - "$id": "4894", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4895", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run that requires the tool output submission.", - "Type": { - "$id": "4896", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4897", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4898", - "kind": "constant", - "valueType": { - "$id": "4899", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4900", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1880" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4901", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1707" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.submitToolOutputsToRun", - "Decorators": [] - }, - { - "$id": "4902", - "Name": "listRunSteps", - "ResourceName": "Runs", - "Summary": "Returns a list of run steps belonging to a run.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4903", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4904", - "kind": "constant", - "valueType": { - "$id": "4905", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4906", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread the run and run steps belong to.", - "Type": { - "$id": "4907", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4908", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run the run steps belong to.", - "Type": { - "$id": "4909", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4910", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4911", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4912", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "328" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4913", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4914", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4915", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4916", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4917", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1891" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.listRunSteps", - "Decorators": [] - }, - { - "$id": "4918", - "Name": "getRunStep", - "ResourceName": "Runs", - "Summary": "Retrieves a run step.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4821" - }, - { - "$id": "4919", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4920", - "kind": "constant", - "valueType": { - "$id": "4921", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4922", - "Name": "thread_id", - "NameInRequest": "thread_id", - "Description": "The ID of the thread to which the run and run step belongs.", - "Type": { - "$id": "4923", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4924", - "Name": "run_id", - "NameInRequest": "run_id", - "Description": "The ID of the run to which the run step belongs.", - "Type": { - "$id": "4925", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4926", - "Name": "step_id", - "NameInRequest": "step_id", - "Description": "The ID of the run step to retrieve.", - "Type": { - "$id": "4927", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4928", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1896" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/threads/{thread_id}/runs/{run_id}/steps/{step_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Runs.getRunStep", - "Decorators": [] - } - ], - "Protocol": { - "$id": "4929" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4821" - } - ], - "Decorators": [] - }, - { - "$id": "4930", - "Name": "VectorStores", - "Operations": [ - { - "$id": "4931", - "Name": "listVectorStores", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector-stores.", - "Accessibility": "public", - "Parameters": [ - { - "$id": "4932", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "4933", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "4934", - "Type": { - "$id": "4935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "4936", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4937", - "kind": "constant", - "valueType": { - "$id": "4938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4939", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4940", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4941", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "55" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4942", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4943", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4944", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4945", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4946", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1324" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStores", - "Decorators": [] - }, - { - "$id": "4947", - "Name": "createVectorStore", - "ResourceName": "VectorStores", - "Summary": "Creates a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4948", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4949", - "kind": "constant", - "valueType": { - "$id": "4950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4951", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4952", - "kind": "constant", - "valueType": { - "$id": "4953", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4954", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1379" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4955", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStore", - "Decorators": [] - }, - { - "$id": "4956", - "Name": "getVectorStore", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4957", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4958", - "kind": "constant", - "valueType": { - "$id": "4959", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4960", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to retrieve.", - "Type": { - "$id": "4961", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4962", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStore", - "Decorators": [] - }, - { - "$id": "4963", - "Name": "modifyVectorStore", - "ResourceName": "VectorStores", - "Summary": "Modifies a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4964", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4965", - "kind": "constant", - "valueType": { - "$id": "4966", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4967", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to modify.", - "Type": { - "$id": "4968", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4969", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "4970", - "kind": "constant", - "valueType": { - "$id": "4971", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4972", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1411" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4973", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1329" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.modifyVectorStore", - "Decorators": [] - }, - { - "$id": "4974", - "Name": "deleteVectorStore", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4975", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4976", - "kind": "constant", - "valueType": { - "$id": "4977", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4978", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store to delete.", - "Type": { - "$id": "4979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4980", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1422" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStore", - "Decorators": [] - }, - { - "$id": "4981", - "Name": "listVectorStoreFiles", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4982", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4983", - "kind": "constant", - "valueType": { - "$id": "4984", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4985", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the files belong to.", - "Type": { - "$id": "4986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4987", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "4988", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4989", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "81" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4990", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "4991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4992", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "4993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "4994", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "4995", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listVectorStoreFiles", - "Decorators": [] - }, - { - "$id": "4996", - "Name": "createVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "4997", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "4998", - "kind": "constant", - "valueType": { - "$id": "4999", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5000", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a File.", - "Type": { - "$id": "5001", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5002", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5003", - "kind": "constant", - "valueType": { - "$id": "5004", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5005", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1478" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5006", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5007", - "Name": "getVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5008", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5009", - "kind": "constant", - "valueType": { - "$id": "5010", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5011", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5012", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5013", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file being retrieved.", - "Type": { - "$id": "5014", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5015", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1434" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5016", - "Name": "deleteVectorStoreFile", - "ResourceName": "VectorStores", - "Summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5017", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5018", - "kind": "constant", - "valueType": { - "$id": "5019", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5020", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file belongs to.", - "Type": { - "$id": "5021", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5022", - "Name": "file_id", - "NameInRequest": "file_id", - "Description": "The ID of the file to delete.", - "Type": { - "$id": "5023", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5024", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1483" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "DELETE", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/files/{file_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.deleteVectorStoreFile", - "Decorators": [] - }, - { - "$id": "5025", - "Name": "createVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Create a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5026", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5027", - "kind": "constant", - "valueType": { - "$id": "5028", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5029", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store for which to create a file batch.", - "Type": { - "$id": "5030", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5031", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5032", - "kind": "constant", - "valueType": { - "$id": "5033", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5034", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1490" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5035", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.createVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5036", - "Name": "getVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Retrieves a vector store file batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5037", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5038", - "kind": "constant", - "valueType": { - "$id": "5039", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5040", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5041", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5042", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch being retrieved.", - "Type": { - "$id": "5043", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5044", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.getVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5045", - "Name": "cancelVectorStoreFileBatch", - "ResourceName": "VectorStores", - "Summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5046", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5047", - "kind": "constant", - "valueType": { - "$id": "5048", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5049", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5050", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5051", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch to cancel.", - "Type": { - "$id": "5052", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5053", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1496" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.cancelVectorStoreFileBatch", - "Decorators": [] - }, - { - "$id": "5054", - "Name": "listFilesInVectorStoreBatch", - "ResourceName": "VectorStores", - "Summary": "Returns a list of vector store files in a batch.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "4932" - }, - { - "$id": "5055", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5056", - "kind": "constant", - "valueType": { - "$id": "5057", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5058", - "Name": "vector_store_id", - "NameInRequest": "vector_store_id", - "Description": "The ID of the vector store that the file batch belongs to.", - "Type": { - "$id": "5059", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5060", - "Name": "batch_id", - "NameInRequest": "batch_id", - "Description": "The ID of the file batch that the files belong to.", - "Type": { - "$id": "5061", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5062", - "Name": "limit", - "NameInRequest": "limit", - "Description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "Type": { - "$id": "5063", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5064", - "Name": "order", - "NameInRequest": "order", - "Description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "Type": { - "$ref": "137" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5065", - "Name": "after", - "NameInRequest": "after", - "Description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "Type": { - "$id": "5066", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5067", - "Name": "before", - "NameInRequest": "before", - "Description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "Type": { - "$id": "5068", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5069", - "Name": "filter", - "NameInRequest": "filter", - "Description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", - "Type": { - "$ref": "87" - }, - "Location": "Query", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": false, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5070", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1429" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.VectorStores.listFilesInVectorStoreBatch", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5071" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "4932" - } - ], - "Decorators": [] - }, - { - "$id": "5072", - "Name": "Uploads", - "Operations": [ - { - "$id": "5073", - "Name": "createUpload", - "ResourceName": "Uploads", - "Summary": "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.\n\nOnce you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.\n\nFor certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case:\n- [Assistants](/docs/assistants/tools/file-search/supported-files)\n\nFor guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).", - "Accessibility": "public", - "Parameters": [ - { - "$id": "5074", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "5075", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "5076", - "Type": { - "$id": "5077", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "https://api.openai.com/v1" - } - }, - { - "$id": "5078", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5079", - "kind": "constant", - "valueType": { - "$id": "5080", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5081", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5082", - "kind": "constant", - "valueType": { - "$id": "5083", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5084", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1247" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5085", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.createUpload", - "Decorators": [] - }, - { - "$id": "5086", - "Name": "addUploadPart", - "ResourceName": "Uploads", - "Summary": "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5087", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5088", - "kind": "constant", - "valueType": { - "$id": "5089", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5090", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "5091", - "kind": "constant", - "valueType": { - "$id": "5092", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5093", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5095", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1305" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5096", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1308" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/parts", - "RequestMediaTypes": [ - "multipart/form-data" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.addUploadPart", - "Decorators": [] - }, - { - "$id": "5097", - "Name": "completeUpload", - "ResourceName": "Uploads", - "Summary": "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5098", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5099", - "kind": "constant", - "valueType": { - "$id": "5100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5101", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5103", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "5104", - "kind": "constant", - "valueType": { - "$id": "5105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5106", - "Name": "requestBody", - "NameInRequest": "requestBody", - "Type": { - "$ref": "1318" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5107", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/complete", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.completeUpload", - "Decorators": [] - }, - { - "$id": "5108", - "Name": "cancelUpload", - "ResourceName": "Uploads", - "Summary": "Cancels the Upload. No Parts may be added after an Upload is cancelled.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "5074" - }, - { - "$id": "5109", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "5110", - "kind": "constant", - "valueType": { - "$id": "5111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "5112", - "Name": "upload_id", - "NameInRequest": "upload_id", - "Type": { - "$id": "5113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "Location": "Path", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "5114", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "1255" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/uploads/{upload_id}/cancel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "OpenAI.Uploads.cancelUpload", - "Decorators": [] - } - ], - "Protocol": { - "$id": "5115" - }, - "Parent": "OpenAIClient", - "Parameters": [ - { - "$ref": "5074" - } - ], - "Decorators": [] - } - ], - "Auth": { - "$id": "5116", - "ApiKey": { - "$id": "5117", - "Name": "Authorization", - "Prefix": "Bearer" - } - } -} From fa5d171ed02ff404ecf8b0a1d8ab2ab74ecc8124 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 25 Oct 2024 15:30:07 -0700 Subject: [PATCH 21/54] regen --- .../Assistants/RunTruncationStrategy.cs | 32 -------------- .../src/Custom/Assistants/ToolConstraint.cs | 1 - .../src/Custom/Audio/TranscribedSegment.cs | 3 -- .../Embeddings/OpenAIEmbeddingCollection.cs | 33 --------------- .../FineTuning/Internal/GeneratorStubs.cs | 1 - .../Custom/Images/GeneratedImageCollection.cs | 33 --------------- .../Custom/Models/OpenAIModelCollection.cs | 33 --------------- .../Custom/Moderations/ModerationResult.cs | 2 - .../Moderations/ModerationResultCollection.cs | 33 --------------- .../VectorStoreExpirationPolicy.cs | 2 - .../Models/Assistant.Serialization.cs | 20 ++++----- .../AssistantCreationOptions.Serialization.cs | 2 +- .../AssistantDeletionResult.Serialization.cs | 6 +-- .../AssistantResponseFormat.Serialization.cs | 2 +- .../Models/AssistantThread.Serialization.cs | 6 +-- .../AudioTranscription.Serialization.cs | 8 ++-- ...AudioTranscriptionOptions.Serialization.cs | 4 +- .../Models/AudioTranslation.Serialization.cs | 8 ++-- .../AudioTranslationOptions.Serialization.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 20 ++++----- .../ChatCompletionOptions.Serialization.cs | 4 +- .../Models/ChatFunction.Serialization.cs | 2 +- .../Models/ChatFunctionCall.Serialization.cs | 4 +- .../Models/ChatMessage.Serialization.cs | 2 +- ...atOutputTokenUsageDetails.Serialization.cs | 2 +- .../ChatResponseFormat.Serialization.cs | 2 +- ...okenLogProbabilityDetails.Serialization.cs | 16 +++---- ...nTopLogProbabilityDetails.Serialization.cs | 4 +- .../Models/ChatTokenUsage.Serialization.cs | 6 +-- .../Models/ChatTool.Serialization.cs | 4 +- .../Models/ChatToolCall.Serialization.cs | 6 +-- ...versationAudioDeltaUpdate.Serialization.cs | 10 ++--- ...nversationAudioDoneUpdate.Serialization.cs | 10 ++--- .../ConversationContentPart.Serialization.cs | 2 +- ...ContentPartFinishedUpdate.Serialization.cs | 10 ++--- ...nContentPartStartedUpdate.Serialization.cs | 10 ++--- .../ConversationErrorUpdate.Serialization.cs | 2 +- ...nCallArgumentsDeltaUpdate.Serialization.cs | 10 ++--- ...onCallArgumentsDoneUpdate.Serialization.cs | 12 +++--- .../ConversationFunctionTool.Serialization.cs | 2 +- ...udioBufferCommittedUpdate.Serialization.cs | 2 +- ...InputSpeechFinishedUpdate.Serialization.cs | 4 +- ...nInputSpeechStartedUpdate.Serialization.cs | 4 +- ...ionInputTokenUsageDetails.Serialization.cs | 6 +-- ...TranscriptionFailedUpdate.Serialization.cs | 6 +-- ...anscriptionFinishedUpdate.Serialization.cs | 6 +-- .../Models/ConversationItem.Serialization.cs | 2 +- ...ionItemAcknowledgedUpdate.Serialization.cs | 2 +- ...ersationItemDeletedUpdate.Serialization.cs | 2 +- ...rsationItemFinishedUpdate.Serialization.cs | 6 +-- ...ersationItemStartedUpdate.Serialization.cs | 6 +-- ...sationItemTruncatedUpdate.Serialization.cs | 6 +-- ...onOutputTokenUsageDetails.Serialization.cs | 4 +- ...tTranscriptionDeltaUpdate.Serialization.cs | 10 ++--- ...anscriptionFinishedUpdate.Serialization.cs | 8 ++-- ...ationRateLimitDetailsItem.Serialization.cs | 8 ++-- ...onRateLimitsUpdatedUpdate.Serialization.cs | 12 +++--- ...ionResponseFinishedUpdate.Serialization.cs | 2 +- ...tionResponseStartedUpdate.Serialization.cs | 2 +- ...onSessionConfiguredUpdate.Serialization.cs | 2 +- ...ationSessionStartedUpdate.Serialization.cs | 2 +- ...nversationTextDeltaUpdate.Serialization.cs | 10 ++--- ...onversationTextDoneUpdate.Serialization.cs | 10 ++--- .../ConversationTokenUsage.Serialization.cs | 10 ++--- .../Models/ConversationTool.Serialization.cs | 2 +- ...ationTurnDetectionOptions.Serialization.cs | 2 +- .../ConversationUpdate.Serialization.cs | 2 +- ...mbeddingGenerationOptions.Serialization.cs | 14 +++---- .../EmbeddingTokenUsage.Serialization.cs | 4 +- .../FileChunkingStrategy.Serialization.cs | 2 +- .../FileDeletionResult.Serialization.cs | 6 +-- ...ileFromStoreRemovalResult.Serialization.cs | 6 +-- .../FileSearchRankingOptions.Serialization.cs | 2 +- .../FineTuningIntegration.Serialization.cs | 2 +- ...ningIntegrationWandbWandb.Serialization.cs | 2 +- .../Models/FineTuningJob.Serialization.cs | 36 ++++++++-------- .../FineTuningJobError.Serialization.cs | 4 +- .../FineTuningJobEvent.Serialization.cs | 10 ++--- ...eTuningJobHyperparameters.Serialization.cs | 36 ++++++++-------- .../Models/FineTuningJobHyperparameters.cs | 8 +--- .../Models/FineTuningOptions.Serialization.cs | 4 +- .../FunctionChatMessage.Serialization.cs | 2 +- .../FunctionToolDefinition.Serialization.cs | 2 +- .../GeneratedImageCollection.Serialization.cs | 2 +- .../Models/ImageEditOptions.Serialization.cs | 4 +- .../ImageGenerationOptions.Serialization.cs | 2 +- .../ImageVariationOptions.Serialization.cs | 2 +- ...ernalAddUploadPartRequest.Serialization.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 2 +- ...tsNamedToolChoiceFunction.Serialization.cs | 2 +- .../Models/InternalBatchJob.Serialization.cs | 14 +++---- ...nternalBatchRequestCounts.Serialization.cs | 6 +-- ...pletionFunctionCallOption.Serialization.cs | 2 +- ...onMessageToolCallFunction.Serialization.cs | 4 +- ...CompletionNamedToolChoice.Serialization.cs | 4 +- ...onNamedToolChoiceFunction.Serialization.cs | 2 +- ...stMessageContentPartImage.Serialization.cs | 4 +- ...eContentPartImageImageUrl.Serialization.cs | 2 +- ...MessageContentPartRefusal.Serialization.cs | 4 +- ...estMessageContentPartText.Serialization.cs | 4 +- ...CompletionResponseMessage.Serialization.cs | 2 +- ...sponseMessageFunctionCall.Serialization.cs | 4 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...rnalCompleteUploadRequest.Serialization.cs | 18 ++++---- ...nternalCreateBatchRequest.Serialization.cs | 6 +-- ...ompletionFunctionResponse.Serialization.cs | 20 ++++----- ...ionFunctionResponseChoice.Serialization.cs | 6 +-- ...tCompletionResponseChoice.Serialization.cs | 6 +-- ...etionStreamResponseChoice.Serialization.cs | 4 +- ...letionStreamResponseUsage.Serialization.cs | 6 +-- ...alCreateCompletionRequest.Serialization.cs | 2 +- ...lCreateCompletionResponse.Serialization.cs | 20 ++++----- ...eCompletionResponseChoice.Serialization.cs | 6 +-- ...uestWandbIntegrationWandb.Serialization.cs | 2 +- ...CreateThreadAndRunRequest.Serialization.cs | 2 +- ...TranscriptionResponseJson.Serialization.cs | 2 +- ...teTranslationResponseJson.Serialization.cs | 2 +- ...ternalCreateUploadRequest.Serialization.cs | 8 ++-- ...ctorStoreFileBatchRequest.Serialization.cs | 18 ++++---- ...ateVectorStoreFileRequest.Serialization.cs | 2 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...InternalFileUploadOptions.Serialization.cs | 14 +++---- ...rnalFineTuningIntegration.Serialization.cs | 2 +- ...ineTuningIntegrationWandb.Serialization.cs | 2 +- ...alFineTuningJobCheckpoint.Serialization.cs | 14 +++---- ...nternalFunctionDefinition.Serialization.cs | 2 +- ...nalListAssistantsResponse.Serialization.cs | 8 ++-- ...ternalListBatchesResponse.Serialization.cs | 16 +++---- ...ingJobCheckpointsResponse.Serialization.cs | 16 +++---- ...neTuningJobEventsResponse.Serialization.cs | 16 +++---- ...ernalListMessagesResponse.Serialization.cs | 8 ++-- ...tedFineTuningJobsResponse.Serialization.cs | 16 +++---- ...ernalListRunStepsResponse.Serialization.cs | 8 ++-- .../InternalListRunsResponse.Serialization.cs | 8 ++-- ...ternalListThreadsResponse.Serialization.cs | 8 ++-- ...tVectorStoreFilesResponse.Serialization.cs | 8 ++-- ...lListVectorStoresResponse.Serialization.cs | 8 ++-- ...entImageUrlObjectImageUrl.Serialization.cs | 2 +- ...ntItemFileObjectImageFile.Serialization.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 8 ++-- ...itationObjectFileCitation.Serialization.cs | 2 +- ...AnnotationsFilePathObject.Serialization.cs | 8 ++-- ...onsFilePathObjectFilePath.Serialization.cs | 2 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...sageContentTextObjectText.Serialization.cs | 14 +++---- ...ternalMessageDeltaContent.Serialization.cs | 2 +- ...ltaContentImageFileObject.Serialization.cs | 2 +- ...eltaContentImageUrlObject.Serialization.cs | 2 +- ...DeltaContentRefusalObject.Serialization.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 2 +- ...AnnotationsFilePathObject.Serialization.cs | 2 +- ...ageDeltaContentTextObject.Serialization.cs | 2 +- ...nternalMessageDeltaObject.Serialization.cs | 6 +-- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 4 +- ...nalMessageImageUrlContent.Serialization.cs | 4 +- ...rnalMessageRefusalContent.Serialization.cs | 4 +- ...ernalModerationCategories.Serialization.cs | 22 +++++----- ...lModerationCategoryScores.Serialization.cs | 22 +++++----- ...alOmniTypedResponseFormat.Serialization.cs | 2 +- ...questAssistantMessageItem.Serialization.cs | 12 +++--- ...nalRealtimeRequestCommand.Serialization.cs | 2 +- ...meRequestFunctionCallItem.Serialization.cs | 6 +-- ...estFunctionCallOutputItem.Serialization.cs | 4 +- ...tAudioBufferAppendCommand.Serialization.cs | 2 +- ...eRequestItemCreateCommand.Serialization.cs | 2 +- ...eRequestItemDeleteCommand.Serialization.cs | 2 +- ...equestItemTruncateCommand.Serialization.cs | 6 +-- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...onseCreateCommandResponse.Serialization.cs | 4 +- ...questSessionUpdateCommand.Serialization.cs | 2 +- ...eRequestSystemMessageItem.Serialization.cs | 12 +++--- ...imeRequestTextContentPart.Serialization.cs | 2 +- ...imeRequestUserMessageItem.Serialization.cs | 12 +++--- .../InternalRealtimeResponse.Serialization.cs | 20 ++++----- ...lRealtimeResponseApiError.Serialization.cs | 4 +- ...nseCancelledStatusDetails.Serialization.cs | 2 +- ...rnalRealtimeResponseError.Serialization.cs | 4 +- ...eResponseFunctionCallItem.Serialization.cs | 8 ++-- ...nseFunctionCallOutputItem.Serialization.cs | 4 +- ...seIncompleteStatusDetails.Serialization.cs | 2 +- ...ernalRealtimeResponseItem.Serialization.cs | 4 +- ...altimeResponseMessageItem.Serialization.cs | 4 +- ...alRealtimeResponseSession.Serialization.cs | 42 +++++++++---------- ...timeResponseStatusDetails.Serialization.cs | 2 +- ...meResponseTextContentPart.Serialization.cs | 2 +- ...eToolChoiceFunctionObject.Serialization.cs | 2 +- ...iceFunctionObjectFunction.Serialization.cs | 2 +- ...lRealtimeToolChoiceObject.Serialization.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 4 +- ...lRequiredFunctionToolCall.Serialization.cs | 6 +-- ...lResponseFormatJsonSchema.Serialization.cs | 2 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 2 +- ...esponseMessageTextContent.Serialization.cs | 4 +- ...InternalRunRequiredAction.Serialization.cs | 4 +- ...pCodeInterpreterLogOutput.Serialization.cs | 2 +- ...nterpreterToolCallDetails.Serialization.cs | 4 +- .../InternalRunStepDelta.Serialization.cs | 6 +-- ...alRunStepDeltaStepDetails.Serialization.cs | 2 +- ...etailsToolCallsCodeObject.Serialization.cs | 2 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...CallsCodeOutputLogsObject.Serialization.cs | 2 +- ...ToolCallsFileSearchObject.Serialization.cs | 32 +++++++------- ...lsToolCallsFunctionObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...tionObjectMessageCreation.Serialization.cs | 2 +- ...CodeObjectCodeInterpreter.Serialization.cs | 2 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...odeOutputImageObjectImage.Serialization.cs | 2 +- ...earchRankingOptionsObject.Serialization.cs | 4 +- ...llsFunctionObjectFunction.Serialization.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 12 +++--- ...FileSearchToolCallDetails.Serialization.cs | 4 +- ...epFunctionToolCallDetails.Serialization.cs | 4 +- ...RunToolCallObjectFunction.Serialization.cs | 4 +- ...icChunkingStrategyDetails.Serialization.cs | 4 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...bmitToolOutputsRunRequest.Serialization.cs | 12 +++--- .../Models/InternalUpload.Serialization.cs | 14 +++---- .../InternalUploadPart.Serialization.cs | 8 ++-- ...FileBatchObjectFileCounts.Serialization.cs | 10 ++--- ...MessageCreationAttachment.Serialization.cs | 4 +- .../MessageCreationOptions.Serialization.cs | 4 +- .../MessageDeletionResult.Serialization.cs | 6 +-- .../MessageFailureDetails.Serialization.cs | 2 +- .../ModelDeletionResult.Serialization.cs | 6 +-- .../Models/ModerationOptions.Serialization.cs | 12 +++--- .../Models/ModerationResult.Serialization.cs | 2 +- ...oderationResultCollection.Serialization.cs | 4 +- .../Models/OpenAIEmbedding.Serialization.cs | 16 +++---- ...OpenAIEmbeddingCollection.Serialization.cs | 6 +-- .../Models/OpenAIError.Serialization.cs | 4 +- .../OpenAIErrorResponse.Serialization.cs | 2 +- .../Models/OpenAIFile.Serialization.cs | 12 +++--- .../OpenAIFileCollection.Serialization.cs | 2 +- .../Models/OpenAIModel.Serialization.cs | 8 ++-- .../OpenAIModelCollection.Serialization.cs | 2 +- ...sponseFailedStatusDetails.Serialization.cs | 12 +++--- .../RunCreationOptions.Serialization.cs | 2 +- .../Models/RunError.Serialization.cs | 4 +- .../Generated/Models/RunStep.Serialization.cs | 18 ++++---- ...StepCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunStepDetails.Serialization.cs | 2 +- .../Models/RunStepError.Serialization.cs | 4 +- .../RunStepFileSearchResult.Serialization.cs | 6 +-- .../Models/RunStepTokenUsage.Serialization.cs | 6 +-- .../Models/RunStepToolCall.Serialization.cs | 2 +- ...dateCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunTokenUsage.Serialization.cs | 6 +-- .../RunTruncationStrategy.Serialization.cs | 2 +- .../SpeechGenerationOptions.Serialization.cs | 6 +-- ...taticFileChunkingStrategy.Serialization.cs | 2 +- ...amingChatCompletionUpdate.Serialization.cs | 20 ++++----- ...reamingChatToolCallUpdate.Serialization.cs | 4 +- .../ThreadDeletionResult.Serialization.cs | 6 +-- .../Models/ThreadMessage.Serialization.cs | 24 +++++------ .../Models/ThreadRun.Serialization.cs | 30 ++++++------- .../Models/ToolChatMessage.Serialization.cs | 2 +- .../Models/ToolConstraint.Serialization.cs | 2 +- .../Models/ToolDefinition.Serialization.cs | 2 +- .../TranscribedSegment.Serialization.cs | 30 ++++++------- .../Generated/Models/TranscribedSegment.cs | 8 +--- .../Models/TranscribedWord.Serialization.cs | 6 +-- .../src/Generated/Models/TranscribedWord.cs | 8 +--- .../Models/VectorStore.Serialization.cs | 14 +++---- .../VectorStoreBatchFileJob.Serialization.cs | 12 +++--- ...VectorStoreDeletionResult.Serialization.cs | 6 +-- ...ctorStoreExpirationPolicy.Serialization.cs | 4 +- ...ectorStoreFileAssociation.Serialization.cs | 12 +++--- ...StoreFileAssociationError.Serialization.cs | 4 +- .../VectorStoreFileCounts.Serialization.cs | 10 ++--- ...ightsAndBiasesIntegration.Serialization.cs | 2 +- .openapi3/openapi3-openai.yaml | 10 +++++ 275 files changed, 841 insertions(+), 1016 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs index 01700e9f5..fe895710d 100644 --- a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs +++ b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs @@ -10,38 +10,6 @@ namespace OpenAI.Assistants [CodeGenSuppress(nameof(RunTruncationStrategy), typeof(InternalTruncationObjectType))] public partial class RunTruncationStrategy { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - /// The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. [CodeGenMember("Type")] internal readonly InternalTruncationObjectType _type; diff --git a/.dotnet/src/Custom/Assistants/ToolConstraint.cs b/.dotnet/src/Custom/Assistants/ToolConstraint.cs index b333236f8..e19da8e75 100644 --- a/.dotnet/src/Custom/Assistants/ToolConstraint.cs +++ b/.dotnet/src/Custom/Assistants/ToolConstraint.cs @@ -12,7 +12,6 @@ public partial class ToolConstraint [CodeGenMember("Type")] private readonly string _objectType; private readonly string _objectFunctionName; - private readonly IDictionary SerializedAdditionalRawData; // CUSTOM: Made internal. /// Gets or sets the function. diff --git a/.dotnet/src/Custom/Audio/TranscribedSegment.cs b/.dotnet/src/Custom/Audio/TranscribedSegment.cs index e71554a91..ab11007c3 100644 --- a/.dotnet/src/Custom/Audio/TranscribedSegment.cs +++ b/.dotnet/src/Custom/Audio/TranscribedSegment.cs @@ -9,9 +9,6 @@ namespace OpenAI.Audio; [StructLayout(LayoutKind.Auto)] public readonly partial struct TranscribedSegment { - // CUSTOM: Remove setter. Auto-implemented instance properties in readonly structs must be readonly. - internal IDictionary SerializedAdditionalRawData { get; } - // CUSTOM: Renamed. /// The start time of the segment. [CodeGenMember("Start")] diff --git a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs index fbcb81fdd..212807087 100644 --- a/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs +++ b/.dotnet/src/Custom/Embeddings/OpenAIEmbeddingCollection.cs @@ -16,39 +16,6 @@ public partial class OpenAIEmbeddingCollection : ReadOnlyCollection - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - // CUSTOM: Set the inherited Items property via the base constructor in favor of the suppressed Data property. /// Initializes a new instance of . /// The list of embeddings generated by the model. diff --git a/.dotnet/src/Custom/FineTuning/Internal/GeneratorStubs.cs b/.dotnet/src/Custom/FineTuning/Internal/GeneratorStubs.cs index 80b6db2c7..eb14cf3bd 100644 --- a/.dotnet/src/Custom/FineTuning/Internal/GeneratorStubs.cs +++ b/.dotnet/src/Custom/FineTuning/Internal/GeneratorStubs.cs @@ -111,7 +111,6 @@ internal enum FineTuningJobEventLevel [StructLayout(LayoutKind.Auto)] internal readonly partial struct FineTuningJobHyperparameters { - internal readonly IDictionary SerializedAdditionalRawData { get; } public BinaryData NEpochs { get; } public BinaryData BatchSize { get; } public BinaryData LearningRateMultiplier { get; } diff --git a/.dotnet/src/Custom/Images/GeneratedImageCollection.cs b/.dotnet/src/Custom/Images/GeneratedImageCollection.cs index 45100a3ba..4679345ae 100644 --- a/.dotnet/src/Custom/Images/GeneratedImageCollection.cs +++ b/.dotnet/src/Custom/Images/GeneratedImageCollection.cs @@ -15,39 +15,6 @@ namespace OpenAI.Images; [CodeGenSuppress(nameof(GeneratedImageCollection), typeof(DateTimeOffset), typeof(IDictionary))] public partial class GeneratedImageCollection : ReadOnlyCollection { - // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - // CUSTOM: Set the inherited Items property via the base constructor in favor of the suppressed Data property. /// Initializes a new instance of . /// diff --git a/.dotnet/src/Custom/Models/OpenAIModelCollection.cs b/.dotnet/src/Custom/Models/OpenAIModelCollection.cs index f2dc879d6..a3f179dc4 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelCollection.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelCollection.cs @@ -18,39 +18,6 @@ public partial class OpenAIModelCollection : ReadOnlyCollection /// Gets the object. private InternalListModelsResponseObject Object { get; } = InternalListModelsResponseObject.List; - // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - /// Initializes a new instance of . /// /// is null. diff --git a/.dotnet/src/Custom/Moderations/ModerationResult.cs b/.dotnet/src/Custom/Moderations/ModerationResult.cs index d9338fa56..41b430074 100644 --- a/.dotnet/src/Custom/Moderations/ModerationResult.cs +++ b/.dotnet/src/Custom/Moderations/ModerationResult.cs @@ -12,8 +12,6 @@ namespace OpenAI.Moderations; [CodeGenSuppress(nameof(ModerationResult), typeof(bool), typeof(InternalModerationCategories), typeof(InternalModerationCategoryScores), typeof(IDictionary))] public partial class ModerationResult { - internal IDictionary SerializedAdditionalRawData { get; set; } - internal ModerationResult(bool flagged, ModerationCategory hate, ModerationCategory hateThreatening, ModerationCategory harassment, ModerationCategory harassmentThreatening, ModerationCategory selfHarm, ModerationCategory selfHarmIntent, ModerationCategory selfHarmInstructions, ModerationCategory sexual, ModerationCategory sexualMinors, ModerationCategory violence, ModerationCategory violenceGraphic) { Flagged = flagged; diff --git a/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs b/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs index 5daa5f5f5..e21362f71 100644 --- a/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs +++ b/.dotnet/src/Custom/Moderations/ModerationResultCollection.cs @@ -11,39 +11,6 @@ namespace OpenAI.Moderations; [CodeGenSuppress(nameof(ModerationResultCollection), typeof(string), typeof(string), typeof(IDictionary))] public partial class ModerationResultCollection : ReadOnlyCollection { - // CUSTOM: Recovered this field. See https://github.com/Azure/autorest.csharp/issues/4636. - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary SerializedAdditionalRawData; - /// Initializes a new instance of . /// The unique identifier for the moderation request. /// The model used to generate the moderation results. diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreExpirationPolicy.cs b/.dotnet/src/Custom/VectorStores/VectorStoreExpirationPolicy.cs index 8b437809f..bf8bb7907 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreExpirationPolicy.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreExpirationPolicy.cs @@ -14,8 +14,6 @@ namespace OpenAI.VectorStores; [CodeGenSuppress(nameof(VectorStoreExpirationPolicy), typeof(VectorStoreExpirationAnchor), typeof(int), typeof(IDictionary))] public partial class VectorStoreExpirationPolicy { - private IDictionary SerializedAdditionalRawData; - [CodeGenMember("Anchor")] private VectorStoreExpirationAnchor _anchor; [CodeGenMember("Days")] diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index 7f1b986ae..bb5b0621b 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) @@ -68,8 +68,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) { if (Instructions != null) @@ -85,13 +85,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ToolDefinition item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ToolDefinition item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (Optional.IsDefined(ToolResources) && _additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) @@ -142,8 +142,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ResponseFormat) && _additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index 5fd241155..54e5ccb94 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -101,8 +101,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index 130d8804b..8c296d266 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(AssistantId); } - writer.WriteStringValue(AssistantId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index 7e7a250a3..dcf2afef8 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -27,8 +27,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index 4fc8fb93f..a86dfcfb5 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) @@ -67,8 +67,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("tool_resources") != true) { if (ToolResources != null) diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index 1254784da..ead1bdd89 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("language") != true) { writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); } - writer.WriteStringValue(Language); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) { writer.WritePropertyName("words"u8); @@ -64,13 +64,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("task") != true) { writer.WritePropertyName("task"u8); + writer.WriteStringValue(Task.ToString()); } - writer.WriteStringValue(Task.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("duration") != true) { writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 8d78d6dd1..0ba5e4eb1 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -50,13 +50,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file") != true) { writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); } - writer.WriteBase64StringValue(File.ToArray(), "D"); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (Optional.IsCollectionDefined(InternalTimestampGranularities) && _additionalBinaryDataProperties?.ContainsKey("timestamp_granularities") != true) { writer.WritePropertyName("timestamp_granularities"u8); diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index c7ef15ddf..ca3671665 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("language") != true) { writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); } - writer.WriteStringValue(Language); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); @@ -54,13 +54,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("task") != true) { writer.WritePropertyName("task"u8); + writer.WriteStringValue(Task.ToString()); } - writer.WriteStringValue(Task.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("duration") != true) { writer.WritePropertyName("duration"u8); + writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index d2201ad0b..fae64d899 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -45,13 +45,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file") != true) { writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); } - writer.WriteBase64StringValue(File.ToArray(), "D"); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index dab4006d7..4fa749004 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); @@ -54,8 +54,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ServiceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (ServiceTier != null) @@ -71,18 +71,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) { writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionResponseChoice item in Choices) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalCreateChatCompletionResponseChoice item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 736ae7c00..f6c132ec5 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -93,13 +93,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("messages") != true) { writer.WritePropertyName("messages"u8); + this.SerializeMessagesValue(writer, options); } - this.SerializeMessagesValue(writer, options); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index fcfef4055..dac9e20ab 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); } - writer.WriteStringValue(FunctionName); if (Optional.IsDefined(FunctionDescription) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index e22d1dba9..1c2f0aef2 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); } - writer.WriteStringValue(FunctionName); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + this.SerializeFunctionArgumentsValue(writer, options); } - this.SerializeFunctionArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 6cb23d35c..e5a0b1661 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -23,8 +23,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToSerialString()); } - writer.WriteStringValue(Role.ToSerialString()); if (options.Format != "W" && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 7bdd0b8ed..cef4e9254 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -30,8 +30,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("reasoning_tokens") != true) { writer.WritePropertyName("reasoning_tokens"u8); + writer.WriteNumberValue(ReasoningTokenCount); } - writer.WriteNumberValue(ReasoningTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 6cbb920ee..acdfee0d1 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -23,8 +23,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 40063c8e1..6c35ca29b 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("token") != true) { writer.WritePropertyName("token"u8); + writer.WriteStringValue(Token); } - writer.WriteStringValue(Token); if (_additionalBinaryDataProperties?.ContainsKey("logprob") != true) { writer.WritePropertyName("logprob"u8); + writer.WriteNumberValue(LogProbability); } - writer.WriteNumberValue(LogProbability); if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { if (Utf8Bytes != null) @@ -61,13 +61,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("top_logprobs") != true) { writer.WritePropertyName("top_logprobs"u8); + writer.WriteStartArray(); + foreach (ChatTokenTopLogProbabilityDetails item in TopLogProbabilities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ChatTokenTopLogProbabilityDetails item in TopLogProbabilities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 5ce59699a..f32d68b1b 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("token") != true) { writer.WritePropertyName("token"u8); + writer.WriteStringValue(Token); } - writer.WriteStringValue(Token); if (_additionalBinaryDataProperties?.ContainsKey("logprob") != true) { writer.WritePropertyName("logprob"u8); + writer.WriteNumberValue(LogProbability); } - writer.WriteNumberValue(LogProbability); if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { if (Utf8Bytes != null) diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index 22c843849..0fb56b0af 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) { writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(OutputTokenCount); } - writer.WriteNumberValue(OutputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) { writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); } - writer.WriteNumberValue(InputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); } - writer.WriteNumberValue(TotalTokenCount); if (Optional.IsDefined(OutputTokenDetails) && _additionalBinaryDataProperties?.ContainsKey("completion_tokens_details") != true) { writer.WritePropertyName("completion_tokens_details"u8); diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 102953f4d..b4c70475e 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - writer.WriteObjectValue(Function, options); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToSerialString()); } - writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 608a7b256..844b3dbe9 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - writer.WriteObjectValue(Function, options); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToSerialString()); } - writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs index fd33675a4..382554fba 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteBase64StringValue(Delta.ToArray(), "D"); } - writer.WriteBase64StringValue(Delta.ToArray(), "D"); } ConversationAudioDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationAudioDeltaUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs index 835b7447e..2d014f839 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); } ConversationAudioDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationAudioDoneUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index 7a74e89cf..90fe4bdba 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs index 1662c92ee..3d635148f 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("part") != true) { writer.WritePropertyName("part"u8); + writer.WriteObjectValue(_internalContentPart, options); } - writer.WriteObjectValue(_internalContentPart, options); } ConversationContentPartFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs index 0276da1bf..b4379ee96 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("part") != true) { writer.WritePropertyName("part"u8); + writer.WriteObjectValue(_internalContentPart, options); } - writer.WriteObjectValue(_internalContentPart, options); } ConversationContentPartStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 69cc7cf83..4be2921d1 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); + writer.WriteObjectValue(_error, options); } - writer.WriteObjectValue(_error, options); } ConversationErrorUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationErrorUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs index 8b3dc8df7..660e865db 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); } - writer.WriteStringValue(Delta); } ConversationFunctionCallArgumentsDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDeltaUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs index c8209b845..f2ea9a61b 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs @@ -35,33 +35,33 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); } ConversationFunctionCallArgumentsDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDoneUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index 068a9e76e..63d9b0cf4 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -31,8 +31,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(_name); } - writer.WriteStringValue(_name); if (Optional.IsDefined(_description) && _additionalBinaryDataProperties?.ContainsKey("description") != true) { writer.WritePropertyName("description"u8); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs index f38606784..f2cdb02fc 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (Optional.IsDefined(PreviousItemId) && _additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 784683aec..04694a3bf 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) { writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); } - writer.WriteNumberValue(AudioEndMs); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); } ConversationInputSpeechFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 019c6469e..3c4780c25 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("audio_start_ms") != true) { writer.WritePropertyName("audio_start_ms"u8); + writer.WriteNumberValue(AudioStartMs); } - writer.WriteNumberValue(AudioStartMs); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); } ConversationInputSpeechStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechStartedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs index 15f05bd8d..b78b9836e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("cached_tokens") != true) { writer.WritePropertyName("cached_tokens"u8); + writer.WriteNumberValue(CachedTokens); } - writer.WriteNumberValue(CachedTokens); if (_additionalBinaryDataProperties?.ContainsKey("text_tokens") != true) { writer.WritePropertyName("text_tokens"u8); + writer.WriteNumberValue(TextTokens); } - writer.WriteNumberValue(TextTokens); if (_additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) { writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokens); } - writer.WriteNumberValue(AudioTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 72946aa55..b5b16db35 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); + writer.WriteObjectValue(_error, options); } - writer.WriteObjectValue(_error, options); } ConversationInputTranscriptionFailedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFailedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index 558b48090..dd632ea4d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("transcript") != true) { writer.WritePropertyName("transcript"u8); + writer.WriteStringValue(Transcript); } - writer.WriteStringValue(Transcript); } ConversationInputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputTranscriptionFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index a7b83d427..ffb3ff974 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs index 9de07086e..e546160f2 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); } - writer.WriteObjectValue(Item, options); } ConversationItemAcknowledgedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemAcknowledgedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 87367ec51..fc3cb3f44 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); } ConversationItemDeletedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemDeletedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs index b69317d81..3a5ebba54 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { writer.WritePropertyName("item"u8); + writer.WriteObjectValue(_internalItem, options); } - writer.WriteObjectValue(_internalItem, options); } ConversationItemFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs index 544dd4593..8479efc9e 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { writer.WritePropertyName("item"u8); + writer.WriteObjectValue(_internalItem, options); } - writer.WriteObjectValue(_internalItem, options); } ConversationItemStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStartedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index b9d87c86a..9b943a9e8 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) { writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); } - writer.WriteNumberValue(AudioEndMs); if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); } ConversationItemTruncatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemTruncatedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs index f821975f3..d21be628c 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("text_tokens") != true) { writer.WritePropertyName("text_tokens"u8); + writer.WriteNumberValue(TextTokens); } - writer.WriteNumberValue(TextTokens); if (_additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) { writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokens); } - writer.WriteNumberValue(AudioTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs index b669ee7bd..ff90f03ae 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); } - writer.WriteStringValue(Delta); } ConversationOutputTranscriptionDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionDeltaUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs index a9929bfb1..1a746ba1c 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs @@ -35,23 +35,23 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); } ConversationOutputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index aaa6fdce4..3bd0d2110 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("limit") != true) { writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit); } - writer.WriteNumberValue(Limit); if (_additionalBinaryDataProperties?.ContainsKey("remaining") != true) { writer.WritePropertyName("remaining"u8); + writer.WriteNumberValue(Remaining); } - writer.WriteNumberValue(Remaining); if (_additionalBinaryDataProperties?.ContainsKey("reset_seconds") != true) { writer.WritePropertyName("reset_seconds"u8); + writer.WriteNumberValue(ResetSeconds); } - writer.WriteNumberValue(ResetSeconds); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs index bb327e1ef..59e0fec4e 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("rate_limits") != true) { writer.WritePropertyName("rate_limits"u8); + writer.WriteStartArray(); + foreach (ConversationRateLimitDetailsItem item in RateLimits) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ConversationRateLimitDetailsItem item in RateLimits) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); } ConversationRateLimitsUpdatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationRateLimitsUpdatedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 92fc9066c..6a3f41cab 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); + writer.WriteObjectValue(_internalResponse, options); } - writer.WriteObjectValue(_internalResponse, options); } ConversationResponseFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseFinishedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 41e54ac93..fdc4f9820 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); + writer.WriteObjectValue(_internalResponse, options); } - writer.WriteObjectValue(_internalResponse, options); } ConversationResponseStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationResponseStartedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index fa12d13da..c7540d9fd 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); + writer.WriteObjectValue(_internalSession, options); } - writer.WriteObjectValue(_internalSession, options); } ConversationSessionConfiguredUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionConfiguredUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index f6fa75d07..d8ff43151 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); + writer.WriteObjectValue(_internalSession, options); } - writer.WriteObjectValue(_internalSession, options); } ConversationSessionStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationSessionStartedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs index 21041367a..b84610739 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteStringValue(Delta); } - writer.WriteStringValue(Delta); } ConversationTextDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationTextDeltaUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs index f8001644a..f96d80c6f 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs @@ -35,28 +35,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); } - writer.WriteStringValue(ResponseId); if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(OutputIndex); } - writer.WriteNumberValue(OutputIndex); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("value") != true) { writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - writer.WriteStringValue(Value); } ConversationTextDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationTextDoneUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs index 933afb7bf..3236445db 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); } - writer.WriteNumberValue(TotalTokens); if (_additionalBinaryDataProperties?.ContainsKey("input_tokens") != true) { writer.WritePropertyName("input_tokens"u8); + writer.WriteNumberValue(InputTokens); } - writer.WriteNumberValue(InputTokens); if (_additionalBinaryDataProperties?.ContainsKey("output_tokens") != true) { writer.WritePropertyName("output_tokens"u8); + writer.WriteNumberValue(OutputTokens); } - writer.WriteNumberValue(OutputTokens); if (_additionalBinaryDataProperties?.ContainsKey("input_token_details") != true) { writer.WritePropertyName("input_token_details"u8); + writer.WriteObjectValue(InputTokenDetails, options); } - writer.WriteObjectValue(InputTokenDetails, options); if (_additionalBinaryDataProperties?.ContainsKey("output_token_details") != true) { writer.WritePropertyName("output_token_details"u8); + writer.WriteObjectValue(OutputTokenDetails, options); } - writer.WriteObjectValue(OutputTokenDetails, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index 751a74744..cb20f4c74 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToString()); } - writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index 42c9b8bc8..6ed5abccb 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToSerialString()); } - writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index 00942d5e9..416f0710f 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -46,8 +46,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToSerialString()); } - writer.WriteStringValue(Kind.ToSerialString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 308d20fd4..2832ad322 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -35,20 +35,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("input") != true) { writer.WritePropertyName("input"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(Input); + writer.WriteRawValue(Input); #else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(Input)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (Optional.IsDefined(EncodingFormat) && _additionalBinaryDataProperties?.ContainsKey("encoding_format") != true) { writer.WritePropertyName("encoding_format"u8); diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index 5844b87c9..f2c7a63f5 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) { writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); } - writer.WriteNumberValue(InputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); } - writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index ebeaeff21..583e067fb 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index 75b69c08d..e901c0d84 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index 126265932..df928d774 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Removed); } - writer.WriteBooleanValue(Removed); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 3f3324324..57fc9d33d 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -35,8 +35,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("score_threshold") != true) { writer.WritePropertyName("score_threshold"u8); + writer.WriteNumberValue(_scoreThreshold); } - writer.WriteNumberValue(_scoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index 6eb9756ed..81e1b574b 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index 5a982b628..60c8dff54 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("project") != true) { writer.WritePropertyName("project"u8); + writer.WriteStringValue(Project); } - writer.WriteStringValue(Project); if (Optional.IsDefined(Name) && _additionalBinaryDataProperties?.ContainsKey("name") != true) { if (Name != null) diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index e1ec795d1..305c274d4 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -46,13 +46,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { if (Error != null) @@ -92,43 +92,43 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("hyperparameters") != true) { writer.WritePropertyName("hyperparameters"u8); + writer.WriteObjectValue(Hyperparameters, options); } - writer.WriteObjectValue(Hyperparameters, options); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("organization_id") != true) { writer.WritePropertyName("organization_id"u8); + writer.WriteStringValue(OrganizationId); } - writer.WriteStringValue(OrganizationId); if (_additionalBinaryDataProperties?.ContainsKey("result_files") != true) { writer.WritePropertyName("result_files"u8); - } - writer.WriteStartArray(); - foreach (string item in ResultFiles) - { - if (item == null) + writer.WriteStartArray(); + foreach (string item in ResultFiles) { - writer.WriteNullValue(); - continue; + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); } - writer.WriteStringValue(item); + writer.WriteEndArray(); } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("trained_tokens") != true) { if (TrainedTokens != null) @@ -144,8 +144,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("training_file") != true) { writer.WritePropertyName("training_file"u8); + writer.WriteStringValue(TrainingFile); } - writer.WriteStringValue(TrainingFile); if (_additionalBinaryDataProperties?.ContainsKey("validation_file") != true) { if (ValidationFile != null) @@ -178,8 +178,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("seed") != true) { writer.WritePropertyName("seed"u8); + writer.WriteNumberValue(Seed); } - writer.WriteNumberValue(Seed); if (Optional.IsDefined(EstimatedFinish) && _additionalBinaryDataProperties?.ContainsKey("estimated_finish") != true) { if (EstimatedFinish != null) diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index f7542e17a..96e00c7c4 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); } - writer.WriteStringValue(Code); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (_additionalBinaryDataProperties?.ContainsKey("param") != true) { if (Param != null) diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index 3202ee238..28247da6b 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("level") != true) { writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.ToSerialString()); } - writer.WriteStringValue(Level.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index b549ed1c3..19a1ce083 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -34,39 +34,39 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions if (_additionalBinaryDataProperties?.ContainsKey("n_epochs") != true) { writer.WritePropertyName("n_epochs"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(NEpochs); + writer.WriteRawValue(NEpochs); #else - using (JsonDocument document = JsonDocument.Parse(NEpochs)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(NEpochs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("batch_size") != true) { writer.WritePropertyName("batch_size"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(BatchSize); + writer.WriteRawValue(BatchSize); #else - using (JsonDocument document = JsonDocument.Parse(BatchSize)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(BatchSize)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("learning_rate_multiplier") != true) { writer.WritePropertyName("learning_rate_multiplier"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(LearningRateMultiplier); + writer.WriteRawValue(LearningRateMultiplier); #else - using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(LearningRateMultiplier)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs index 1bcf78cf7..2da0a095b 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.cs @@ -9,7 +9,7 @@ namespace OpenAI.FineTuning { internal readonly partial struct FineTuningJobHyperparameters { - private IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, BinaryData learningRateMultiplier) { @@ -26,10 +26,6 @@ internal FineTuningJobHyperparameters(BinaryData nEpochs, BinaryData batchSize, _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal IDictionary SerializedAdditionalRawData - { - get => _additionalBinaryDataProperties; - set => _additionalBinaryDataProperties = value; - } + internal IDictionary SerializedAdditionalRawData => _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index ccb70cc7b..0d3cd7581 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("training_file") != true) { writer.WritePropertyName("training_file"u8); + writer.WriteStringValue(TrainingFile); } - writer.WriteStringValue(TrainingFile); if (Optional.IsDefined(Hyperparameters) && _additionalBinaryDataProperties?.ContainsKey("hyperparameters") != true) { writer.WritePropertyName("hyperparameters"u8); diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 60891da83..9e1b979b9 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -28,8 +28,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(FunctionName); } - writer.WriteStringValue(FunctionName); } FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionChatMessage)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index 00a4bef05..837a00f66 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -24,8 +24,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(_internalFunction, options); } - writer.WriteObjectValue(_internalFunction, options); } FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FunctionToolDefinition)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 6e761c328..e9554a998 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -22,8 +22,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index af09d62f5..fb1d0f810 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -42,13 +42,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("image") != true) { writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); } - writer.WriteBase64StringValue(Image.ToArray(), "D"); if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) { writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); } - writer.WriteStringValue(Prompt); if (Optional.IsDefined(Mask) && _additionalBinaryDataProperties?.ContainsKey("mask") != true) { writer.WritePropertyName("mask"u8); diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index f1c8b50af..f310b55e0 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -83,8 +83,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) { writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); } - writer.WriteStringValue(Prompt); if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 79f319275..d33bb82fb 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -42,8 +42,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("image") != true) { writer.WritePropertyName("image"u8); + writer.WriteBase64StringValue(Image.ToArray(), "D"); } - writer.WriteBase64StringValue(Image.ToArray(), "D"); if (Optional.IsDefined(N) && _additionalBinaryDataProperties?.ContainsKey("n") != true) { if (N != null) diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index 114222fcc..0a1b5246b 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); + writer.WriteBase64StringValue(Data.ToArray(), "D"); } - writer.WriteBase64StringValue(Data.ToArray(), "D"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index ff09e608a..ca30aa11b 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -36,8 +36,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) { writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); } - writer.WriteObjectValue(JsonSchema, options); } InternalAssistantResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalAssistantResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index feaf32d4f..31d837982 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -30,8 +30,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index 37559c4b3..7f3bf91d3 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index 9fb5c54ca..7d9e008d4 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("endpoint") != true) { writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); } - writer.WriteStringValue(Endpoint); if (Optional.IsDefined(Errors) && _additionalBinaryDataProperties?.ContainsKey("errors") != true) { writer.WritePropertyName("errors"u8); @@ -54,18 +54,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("input_file_id") != true) { writer.WritePropertyName("input_file_id"u8); + writer.WriteStringValue(InputFileId); } - writer.WriteStringValue(InputFileId); if (_additionalBinaryDataProperties?.ContainsKey("completion_window") != true) { writer.WritePropertyName("completion_window"u8); + writer.WriteStringValue(CompletionWindow); } - writer.WriteStringValue(CompletionWindow); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(OutputFileId) && _additionalBinaryDataProperties?.ContainsKey("output_file_id") != true) { writer.WritePropertyName("output_file_id"u8); @@ -79,8 +79,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (Optional.IsDefined(InProgressAt) && _additionalBinaryDataProperties?.ContainsKey("in_progress_at") != true) { writer.WritePropertyName("in_progress_at"u8); diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index f61ceca43..bfd3ab516 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("total") != true) { writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); } - writer.WriteNumberValue(Total); if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) { writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); } - writer.WriteNumberValue(Completed); if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) { writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); } - writer.WriteNumberValue(Failed); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index b8bf97fc1..1b616862a 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index e7015c269..418509beb 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + this.SerializeArgumentsValue(writer, options); } - this.SerializeArgumentsValue(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index 6b44ef9bd..c449bd57e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - writer.WriteObjectValue(Function, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index 406c70d01..3f9d7d0be 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index 8a6ad3ebb..3c1977083 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("image_url") != true) { writer.WritePropertyName("image_url"u8); + writer.WriteObjectValue(ImageUrl, options); } - writer.WriteObjectValue(ImageUrl, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index 09717f004..19f395d7c 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -39,8 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("url") != true) { writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); } - writer.WriteStringValue(Url); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 94945b7fe..4cce8f17f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) { writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(Refusal); } - writer.WriteStringValue(Refusal); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index 66810823d..4a296da66 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 21306c122..b61ea60bb 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -56,8 +56,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToSerialString()); } - writer.WriteStringValue(Role.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null) diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index ea63b212c..9460c15f2 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index 2681edb79..7f43ba6f5 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -29,8 +29,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) { writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); } - writer.WriteObjectValue(JsonSchema, options); } InternalChatResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalChatResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 366b1192a..1fd85a174 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("part_ids") != true) { writer.WritePropertyName("part_ids"u8); - } - writer.WriteStartArray(); - foreach (string item in PartIds) - { - if (item == null) + writer.WriteStartArray(); + foreach (string item in PartIds) { - writer.WriteNullValue(); - continue; + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); } - writer.WriteStringValue(item); + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(Md5) && _additionalBinaryDataProperties?.ContainsKey("md5") != true) { writer.WritePropertyName("md5"u8); diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index 66f87adbc..48e794ffb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("input_file_id") != true) { writer.WritePropertyName("input_file_id"u8); + writer.WriteStringValue(InputFileId); } - writer.WriteStringValue(InputFileId); if (_additionalBinaryDataProperties?.ContainsKey("endpoint") != true) { writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint.ToString()); } - writer.WriteStringValue(Endpoint.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("completion_window") != true) { writer.WritePropertyName("completion_window"u8); + writer.WriteStringValue(CompletionWindow.ToString()); } - writer.WriteStringValue(CompletionWindow.ToString()); if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null) diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index 7238f5a90..14fa3ee4e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) { writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionFunctionResponseChoice item in Choices) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalCreateChatCompletionFunctionResponseChoice item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); } - writer.WriteNumberValue(Created, "U"); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); @@ -64,8 +64,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index a95e7b759..1ed580715 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) { writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToString()); } - writer.WriteStringValue(FinishReason.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteObjectValue(Message, options); } - writer.WriteObjectValue(Message, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index b67979ccd..760376208 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) { writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToSerialString()); } - writer.WriteStringValue(FinishReason.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteObjectValue(Message, options); } - writer.WriteObjectValue(Message, options); if (_additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (Logprobs != null) diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 076d6a6dc..63b9f8d10 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -26,8 +26,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); } - writer.WriteObjectValue(Delta, options); if (Optional.IsDefined(Logprobs) && _additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (Logprobs != null) @@ -43,8 +43,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) { if (FinishReason != null) diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index 316c13102..1e823185c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) { writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); } - writer.WriteNumberValue(CompletionTokens); if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) { writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); } - writer.WriteNumberValue(PromptTokens); if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); } - writer.WriteNumberValue(TotalTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index e3e5f29d3..9e89c3b81 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -35,8 +35,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("prompt") != true) { if (Prompt != null) diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index a7c06fd8a..2de0c6d19 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -35,28 +35,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) { writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateCompletionResponseChoice item in Choices) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalCreateCompletionResponseChoice item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(Created, "U"); } - writer.WriteNumberValue(Created, "U"); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); @@ -65,8 +65,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index e3809bdc7..7dee78c39 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("finish_reason") != true) { writer.WritePropertyName("finish_reason"u8); + writer.WriteStringValue(FinishReason.ToString()); } - writer.WriteStringValue(FinishReason.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (_additionalBinaryDataProperties?.ContainsKey("logprobs") != true) { if (Logprobs != null) @@ -56,8 +56,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index 1fa1986b2..e6b7606d4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -73,8 +73,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("project") != true) { writer.WritePropertyName("project"u8); + writer.WriteStringValue(Project); } - writer.WriteStringValue(Project); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 285605dcb..575a15b38 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); } - writer.WriteStringValue(AssistantId); if (Optional.IsDefined(Thread) && _additionalBinaryDataProperties?.ContainsKey("thread") != true) { writer.WritePropertyName("thread"u8); diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index 0cdc3a8d8..5bf83e21b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index 995d8cd4a..70a704fab 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index 4f1a0f097..f9b583329 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) { writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); } - writer.WriteStringValue(Filename); if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) { writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToString()); } - writer.WriteStringValue(Purpose.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes); } - writer.WriteNumberValue(Bytes); if (_additionalBinaryDataProperties?.ContainsKey("mime_type") != true) { writer.WritePropertyName("mime_type"u8); + writer.WriteStringValue(MimeType); } - writer.WriteStringValue(MimeType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index d22490cbb..c7611a609 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_ids") != true) { writer.WritePropertyName("file_ids"u8); - } - writer.WriteStartArray(); - foreach (string item in FileIds) - { - if (item == null) + writer.WriteStartArray(); + foreach (string item in FileIds) { - writer.WriteNullValue(); - continue; + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); } - writer.WriteStringValue(item); + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index 0fa9a53b6..a02b10b9f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 5cbdb3e61..c5bdd10d1 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index df68303dc..fd7cdda5e 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -31,20 +31,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file") != true) { writer.WritePropertyName("file"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(global::System.BinaryData.FromStream(File)); + writer.WriteRawValue(global::System.BinaryData.FromStream(File)); #else - using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(File))) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(File))) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) { writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToString()); } - writer.WriteStringValue(Purpose.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index 29a005ec1..ef36fb3c9 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index a474876f7..f571a14a7 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("wandb") != true) { writer.WritePropertyName("wandb"u8); + writer.WriteObjectValue(Wandb, options); } - writer.WriteObjectValue(Wandb, options); } InternalFineTuningIntegrationWandb IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalFineTuningIntegrationWandb)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index 99d2e3f18..7a8f75bd2 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -34,38 +34,38 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("fine_tuned_model_checkpoint") != true) { writer.WritePropertyName("fine_tuned_model_checkpoint"u8); + writer.WriteStringValue(FineTunedModelCheckpoint); } - writer.WriteStringValue(FineTunedModelCheckpoint); if (_additionalBinaryDataProperties?.ContainsKey("step_number") != true) { writer.WritePropertyName("step_number"u8); + writer.WriteNumberValue(StepNumber); } - writer.WriteNumberValue(StepNumber); if (_additionalBinaryDataProperties?.ContainsKey("metrics") != true) { writer.WritePropertyName("metrics"u8); + writer.WriteObjectValue(Metrics, options); } - writer.WriteObjectValue(Metrics, options); if (_additionalBinaryDataProperties?.ContainsKey("fine_tuning_job_id") != true) { writer.WritePropertyName("fine_tuning_job_id"u8); + writer.WriteStringValue(FineTuningJobId); } - writer.WriteStringValue(FineTuningJobId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index 302d7e681..e1a1a5689 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -38,8 +38,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (Optional.IsDefined(Strict) && _additionalBinaryDataProperties?.ContainsKey("strict") != true) { if (Strict != null) diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 320c3d6b2..66377eadf 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index 517f45f18..8fa3c921d 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (InternalBatchJob item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalBatchJob item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (Optional.IsDefined(FirstId) && _additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); @@ -54,13 +54,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index ebff9e24d..56ca2e33b 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (InternalFineTuningJobCheckpoint item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalFineTuningJobCheckpoint item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (Optional.IsDefined(FirstId) && _additionalBinaryDataProperties?.ContainsKey("first_id") != true) { if (FirstId != null) @@ -73,8 +73,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index 1c2b32fc6..6489a37cf 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (_additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (FineTuningJobEvent item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (FineTuningJobEvent item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index 3cfbf6787..6f8793420 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index 2661fe202..438084018 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (FineTuningJob item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (FineTuningJob item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 68b155c32..426a97cd1 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index b7cc636ed..ae1d3ed41 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index 0a26a6ee7..e41d11358 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index ccf717492..7edeacad9 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 5bd0ef174..4274849e9 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); @@ -49,18 +49,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("first_id") != true) { writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); } - writer.WriteStringValue(FirstId); if (_additionalBinaryDataProperties?.ContainsKey("last_id") != true) { writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); } - writer.WriteStringValue(LastId); if (_additionalBinaryDataProperties?.ContainsKey("has_more") != true) { writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); } - writer.WriteBooleanValue(HasMore); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index d24deeeb2..5d281c94b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("url") != true) { writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url.AbsoluteUri); } - writer.WriteStringValue(Url.AbsoluteUri); if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index b393507d9..b8dcd4367 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (Optional.IsDefined(Detail) && _additionalBinaryDataProperties?.ContainsKey("detail") != true) { writer.WritePropertyName("detail"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index 3cdac1163..9dddbd194 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -35,23 +35,23 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (_additionalBinaryDataProperties?.ContainsKey("file_citation") != true) { writer.WritePropertyName("file_citation"u8); + writer.WriteObjectValue(FileCitation, options); } - writer.WriteObjectValue(FileCitation, options); if (_additionalBinaryDataProperties?.ContainsKey("start_index") != true) { writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex); } - writer.WriteNumberValue(StartIndex); if (_additionalBinaryDataProperties?.ContainsKey("end_index") != true) { writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex); } - writer.WriteNumberValue(EndIndex); } InternalMessageContentTextAnnotationsFileCitationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFileCitationObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 9a1b0af93..347c23486 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index 1877df707..3c7f6b77d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -35,23 +35,23 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (_additionalBinaryDataProperties?.ContainsKey("file_path") != true) { writer.WritePropertyName("file_path"u8); + writer.WriteObjectValue(FilePath, options); } - writer.WriteObjectValue(FilePath, options); if (_additionalBinaryDataProperties?.ContainsKey("start_index") != true) { writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex); } - writer.WriteNumberValue(StartIndex); if (_additionalBinaryDataProperties?.ContainsKey("end_index") != true) { writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex); } - writer.WriteNumberValue(EndIndex); } InternalMessageContentTextAnnotationsFilePathObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageContentTextAnnotationsFilePathObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index c7544557b..9fee404cf 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index 270f5acb4..d9cb9a142 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index b3cd833d5..e7f709c05 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("value") != true) { writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - writer.WriteStringValue(Value); if (_additionalBinaryDataProperties?.ContainsKey("annotations") != true) { writer.WritePropertyName("annotations"u8); + writer.WriteStartArray(); + foreach (InternalMessageContentTextObjectAnnotation item in Annotations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalMessageContentTextObjectAnnotation item in Annotations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index c77edf53d..87b0d2030 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index c1df577bc..ded3bee32 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(ImageFile) && _additionalBinaryDataProperties?.ContainsKey("image_file") != true) { writer.WritePropertyName("image_file"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index 17f6f680b..8bd03a228 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(ImageUrl) && _additionalBinaryDataProperties?.ContainsKey("image_url") != true) { writer.WritePropertyName("image_url"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index e8f6bb385..82bbd747a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Refusal) && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { writer.WritePropertyName("refusal"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index 30eaf5865..625f68663 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 626a20291..6553afae4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 89e8d7ff5..6b879d583 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Text) && _additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index 8b952a0df..4f2ced20d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); } - writer.WriteObjectValue(Delta, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index d856ddb69..662b00290 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index e22ea3b1c..e5fb83cde 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -28,13 +28,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type); } - writer.WriteStringValue(_type); if (_additionalBinaryDataProperties?.ContainsKey("image_file") != true) { writer.WritePropertyName("image_file"u8); + writer.WriteObjectValue(_imageFile, options); } - writer.WriteObjectValue(_imageFile, options); } InternalMessageImageFileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageFileContent)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 17b380bdd..d46fcacc3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -28,13 +28,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type); } - writer.WriteStringValue(_type); if (_additionalBinaryDataProperties?.ContainsKey("image_url") != true) { writer.WritePropertyName("image_url"u8); + writer.WriteObjectValue(_imageUrl, options); } - writer.WriteObjectValue(_imageUrl, options); } InternalMessageImageUrlContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageImageUrlContent)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index dacc851d1..a889b4fd3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -28,13 +28,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) { writer.WritePropertyName("refusal"u8); + writer.WriteStringValue(InternalRefusal); } - writer.WriteStringValue(InternalRefusal); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type); } - writer.WriteStringValue(_type); } InternalMessageRefusalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalMessageRefusalContent)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 4322faff1..31402b685 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -34,58 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("hate") != true) { writer.WritePropertyName("hate"u8); + writer.WriteBooleanValue(Hate); } - writer.WriteBooleanValue(Hate); if (_additionalBinaryDataProperties?.ContainsKey("hate/threatening") != true) { writer.WritePropertyName("hate/threatening"u8); + writer.WriteBooleanValue(HateThreatening); } - writer.WriteBooleanValue(HateThreatening); if (_additionalBinaryDataProperties?.ContainsKey("harassment") != true) { writer.WritePropertyName("harassment"u8); + writer.WriteBooleanValue(Harassment); } - writer.WriteBooleanValue(Harassment); if (_additionalBinaryDataProperties?.ContainsKey("harassment/threatening") != true) { writer.WritePropertyName("harassment/threatening"u8); + writer.WriteBooleanValue(HarassmentThreatening); } - writer.WriteBooleanValue(HarassmentThreatening); if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) { writer.WritePropertyName("self-harm"u8); + writer.WriteBooleanValue(SelfHarm); } - writer.WriteBooleanValue(SelfHarm); if (_additionalBinaryDataProperties?.ContainsKey("self-harm/intent") != true) { writer.WritePropertyName("self-harm/intent"u8); + writer.WriteBooleanValue(SelfHarmIntent); } - writer.WriteBooleanValue(SelfHarmIntent); if (_additionalBinaryDataProperties?.ContainsKey("self-harm/instructions") != true) { writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteBooleanValue(SelfHarmInstructions); } - writer.WriteBooleanValue(SelfHarmInstructions); if (_additionalBinaryDataProperties?.ContainsKey("sexual") != true) { writer.WritePropertyName("sexual"u8); + writer.WriteBooleanValue(Sexual); } - writer.WriteBooleanValue(Sexual); if (_additionalBinaryDataProperties?.ContainsKey("sexual/minors") != true) { writer.WritePropertyName("sexual/minors"u8); + writer.WriteBooleanValue(SexualMinors); } - writer.WriteBooleanValue(SexualMinors); if (_additionalBinaryDataProperties?.ContainsKey("violence") != true) { writer.WritePropertyName("violence"u8); + writer.WriteBooleanValue(Violence); } - writer.WriteBooleanValue(Violence); if (_additionalBinaryDataProperties?.ContainsKey("violence/graphic") != true) { writer.WritePropertyName("violence/graphic"u8); + writer.WriteBooleanValue(ViolenceGraphic); } - writer.WriteBooleanValue(ViolenceGraphic); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index 60564ec3d..774d0096b 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -34,58 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("hate") != true) { writer.WritePropertyName("hate"u8); + writer.WriteNumberValue(Hate); } - writer.WriteNumberValue(Hate); if (_additionalBinaryDataProperties?.ContainsKey("hate/threatening") != true) { writer.WritePropertyName("hate/threatening"u8); + writer.WriteNumberValue(HateThreatening); } - writer.WriteNumberValue(HateThreatening); if (_additionalBinaryDataProperties?.ContainsKey("harassment") != true) { writer.WritePropertyName("harassment"u8); + writer.WriteNumberValue(Harassment); } - writer.WriteNumberValue(Harassment); if (_additionalBinaryDataProperties?.ContainsKey("harassment/threatening") != true) { writer.WritePropertyName("harassment/threatening"u8); + writer.WriteNumberValue(HarassmentThreatening); } - writer.WriteNumberValue(HarassmentThreatening); if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) { writer.WritePropertyName("self-harm"u8); + writer.WriteNumberValue(SelfHarm); } - writer.WriteNumberValue(SelfHarm); if (_additionalBinaryDataProperties?.ContainsKey("self-harm/intent") != true) { writer.WritePropertyName("self-harm/intent"u8); + writer.WriteNumberValue(SelfHarmIntent); } - writer.WriteNumberValue(SelfHarmIntent); if (_additionalBinaryDataProperties?.ContainsKey("self-harm/instructions") != true) { writer.WritePropertyName("self-harm/instructions"u8); + writer.WriteNumberValue(SelfHarmInstructions); } - writer.WriteNumberValue(SelfHarmInstructions); if (_additionalBinaryDataProperties?.ContainsKey("sexual") != true) { writer.WritePropertyName("sexual"u8); + writer.WriteNumberValue(Sexual); } - writer.WriteNumberValue(Sexual); if (_additionalBinaryDataProperties?.ContainsKey("sexual/minors") != true) { writer.WritePropertyName("sexual/minors"u8); + writer.WriteNumberValue(SexualMinors); } - writer.WriteNumberValue(SexualMinors); if (_additionalBinaryDataProperties?.ContainsKey("violence") != true) { writer.WritePropertyName("violence"u8); + writer.WriteNumberValue(Violence); } - writer.WriteNumberValue(Violence); if (_additionalBinaryDataProperties?.ContainsKey("violence/graphic") != true) { writer.WritePropertyName("violence/graphic"u8); + writer.WriteNumberValue(ViolenceGraphic); } - writer.WriteNumberValue(ViolenceGraphic); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index 150bd49c0..5c2e75ed2 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index 915eb10e8..d8d416e5c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ConversationContentPart item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); } InternalRealtimeRequestAssistantMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestAssistantMessageItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs index 8c73b0058..1b7368fb6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToString()); } - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) { writer.WritePropertyName("event_id"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index f675a59cd..cb909e5ba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); if (Optional.IsDefined(Status) && _additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index 3884517e3..c4c6a9315 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("output") != true) { writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); } - writer.WriteStringValue(Output); } InternalRealtimeRequestFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestFunctionCallOutputItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs index b9ce48c2a..ecf713a20 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("audio") != true) { writer.WritePropertyName("audio"u8); + writer.WriteBase64StringValue(Audio.ToArray(), "D"); } - writer.WriteBase64StringValue(Audio.ToArray(), "D"); } InternalRealtimeRequestInputAudioBufferAppendCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferAppendCommand)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs index 6120eef9d..414af9edd 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs @@ -40,8 +40,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { writer.WritePropertyName("item"u8); + writer.WriteObjectValue(Item, options); } - writer.WriteObjectValue(Item, options); } InternalRealtimeRequestItemCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemCreateCommand)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs index 0638df8ce..25eaaa159 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); } InternalRealtimeRequestItemDeleteCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemDeleteCommand)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs index 00e882aec..3c58c7d9e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs @@ -35,18 +35,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteStringValue(ItemId); if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); } - writer.WriteNumberValue(ContentIndex); if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) { writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(AudioEndMs); } - writer.WriteNumberValue(AudioEndMs); } InternalRealtimeRequestItemTruncateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemTruncateCommand)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index 9b718afce..c0b10772f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); } - writer.WriteStringValue(Role.ToString()); if (Optional.IsDefined(Status) && _additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs index 220b7c5cc..ea4d79fd1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("commit") != true) { writer.WritePropertyName("commit"u8); + writer.WriteBooleanValue(Commit); } - writer.WriteBooleanValue(Commit); if (_additionalBinaryDataProperties?.ContainsKey("cancel_previous") != true) { writer.WritePropertyName("cancel_previous"u8); + writer.WriteBooleanValue(CancelPrevious); } - writer.WriteBooleanValue(CancelPrevious); if (Optional.IsCollectionDefined(AppendInputItems) && _additionalBinaryDataProperties?.ContainsKey("append_input_items") != true) { writer.WritePropertyName("append_input_items"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs index f212f014e..357dedee2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); + writer.WriteObjectValue(Session, options); } - writer.WriteObjectValue(Session, options); } InternalRealtimeRequestSessionUpdateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestSessionUpdateCommand)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index fdaff24d9..75b0988d8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ConversationContentPart item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); } InternalRealtimeRequestSystemMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestSystemMessageItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index b5ff01a5c..b07ae70e1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); } InternalRealtimeRequestTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestTextContentPart)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 38dd313e3..1a5e2741c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (ConversationContentPart item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ConversationContentPart item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); } InternalRealtimeRequestUserMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestUserMessageItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 820eddf7b..7a5002d50 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("status_details") != true) { if (StatusDetails != null) @@ -61,18 +61,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); } - writer.WriteObjectValue(Usage, options); if (_additionalBinaryDataProperties?.ContainsKey("output") != true) { writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (ConversationItem item in Output) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ConversationItem item in Output) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs index bef17d3d8..b349e3955 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); @@ -44,8 +44,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (Optional.IsDefined(Param) && _additionalBinaryDataProperties?.ContainsKey("param") != true) { writer.WritePropertyName("param"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs index f8738f549..020f9c5af 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) { writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); } - writer.WriteStringValue(Reason.ToString()); } InternalRealtimeResponseCancelledStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseCancelledStatusDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs index 363d2c84e..bff4ec437 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (Optional.IsDefined(Code) && _additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); @@ -44,8 +44,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (Optional.IsDefined(Param) && _additionalBinaryDataProperties?.ContainsKey("param") != true) { writer.WritePropertyName("param"u8); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index 91989276e..1a9df21fc 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -35,23 +35,23 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); } InternalRealtimeResponseFunctionCallItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index ca3ea922d..db5d42e0b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("call_id") != true) { writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); } - writer.WriteStringValue(CallId); if (_additionalBinaryDataProperties?.ContainsKey("output") != true) { writer.WritePropertyName("output"u8); + writer.WriteStringValue(Output); } - writer.WriteStringValue(Output); } InternalRealtimeResponseFunctionCallOutputItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseFunctionCallOutputItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs index a12a611ed..49ea41160 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) { writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); } - writer.WriteStringValue(Reason.ToString()); } InternalRealtimeResponseIncompleteStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseIncompleteStatusDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index 34c89f965..c92b161eb 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { if (Id != null) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 139e3f6b7..b6af37bdc 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -45,13 +45,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); } - writer.WriteStringValue(Role.ToString()); } InternalRealtimeResponseMessageItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseMessageItem)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 3069f02b9..88cdbc574 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -34,48 +34,48 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (_additionalBinaryDataProperties?.ContainsKey("modalities") != true) { writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) { writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); } - writer.WriteStringValue(Instructions); if (_additionalBinaryDataProperties?.ContainsKey("voice") != true) { writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.ToString()); } - writer.WriteStringValue(Voice.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("input_audio_format") != true) { writer.WritePropertyName("input_audio_format"u8); + writer.WriteStringValue(InputAudioFormat.ToString()); } - writer.WriteStringValue(InputAudioFormat.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) { writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat.ToString()); } - writer.WriteStringValue(OutputAudioFormat.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("input_audio_transcription") != true) { if (InputAudioTranscription != null) @@ -91,8 +91,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("turn_detection") != true) { writer.WritePropertyName("turn_detection"u8); + writer.WriteObjectValue(TurnDetection, options); } - writer.WriteObjectValue(TurnDetection, options); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); @@ -106,20 +106,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { writer.WritePropertyName("tool_choice"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); + writer.WriteRawValue(ToolChoice); #else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); } - writer.WriteNumberValue(Temperature); if (_additionalBinaryDataProperties?.ContainsKey("max_response_output_tokens") != true) { if (_maxResponseOutputTokens != null) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs index b1e2def0c..361e84e81 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 0a3c4eb2f..da3d051c2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); } InternalRealtimeResponseTextContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseTextContentPart)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index 30b404bb3..b0818e24f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(Function, options); } - writer.WriteObjectValue(Function, options); } InternalRealtimeToolChoiceFunctionObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeToolChoiceFunctionObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs index 4ec9942e3..5327b7047 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index 163e58aef..01af7ecbd 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index 292a107df..a693e79e8 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -28,13 +28,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(InternalText); } - writer.WriteStringValue(InternalText); } InternalRequestMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRequestMessageTextContent)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index ece9a70f5..f8acc4930 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteObjectValue(_type, options); } - writer.WriteObjectValue(_type, options); if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(_internalFunction, options); } - writer.WriteObjectValue(_internalFunction, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index 2aa8e4689..ffa694268 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("json_schema") != true) { writer.WritePropertyName("json_schema"u8); + writer.WriteObjectValue(JsonSchema, options); } - writer.WriteObjectValue(JsonSchema, options); } InternalResponseFormatJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseFormatJsonSchema)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 23cb48fe9..91aab90a2 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -39,8 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (Optional.IsDefined(Strict) && _additionalBinaryDataProperties?.ContainsKey("strict") != true) { if (Strict != null) diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 413c84ac7..6b1d77cbc 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -28,13 +28,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type); } - writer.WriteStringValue(_type); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteObjectValue(_text, options); } - writer.WriteObjectValue(_text, options); } InternalResponseMessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalResponseMessageTextContent)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index 5278d30f4..44fc1a799 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("submit_tool_outputs") != true) { writer.WritePropertyName("submit_tool_outputs"u8); + writer.WriteObjectValue(SubmitToolOutputs, options); } - writer.WriteObjectValue(SubmitToolOutputs, options); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteObjectValue(Type, options); } - writer.WriteObjectValue(Type, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 56e4521d8..9758ae1a4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("logs") != true) { writer.WritePropertyName("logs"u8); + writer.WriteStringValue(InternalLogs); } - writer.WriteStringValue(InternalLogs); } InternalRunStepCodeInterpreterLogOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterLogOutput)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index 9c21672c0..ddf78daa2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("code_interpreter") != true) { writer.WritePropertyName("code_interpreter"u8); + writer.WriteObjectValue(_codeInterpreter, options); } - writer.WriteObjectValue(_codeInterpreter, options); } InternalRunStepCodeInterpreterToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepCodeInterpreterToolCallDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index 79866720a..ff5342edf 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("delta") != true) { writer.WritePropertyName("delta"u8); + writer.WriteObjectValue(Delta, options); } - writer.WriteObjectValue(Delta, options); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteObjectValue(this.Object, options); } - writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index e1b3e51e4..26945f3b4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 39bedfc51..7021fd369 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index f27fd4f82..861fe1b80 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Image) && _additionalBinaryDataProperties?.ContainsKey("image") != true) { writer.WritePropertyName("image"u8); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 52aa552cf..8579e44d1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(InternalLogs) && _additionalBinaryDataProperties?.ContainsKey("logs") != true) { writer.WritePropertyName("logs"u8); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index 4aa71868b..73bee14ba 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); @@ -45,26 +45,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); - } - writer.WriteStartObject(); - foreach (var item in FileSearch) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WriteStartObject(); + foreach (var item in FileSearch) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); } InternalRunStepDeltaStepDetailsToolCallsFileSearchObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDeltaStepDetailsToolCallsFileSearchObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 31078b51b..47d7df79a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index dfdd7a6e0..2e18644ff 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index f967ce828..2fe45b00a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("message_creation") != true) { writer.WritePropertyName("message_creation"u8); + writer.WriteObjectValue(_messageCreation, options); } - writer.WriteObjectValue(_messageCreation, options); } InternalRunStepDetailsMessageCreationObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsMessageCreationObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 87f0a867b..b2bd9b539 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("message_id") != true) { writer.WritePropertyName("message_id"u8); + writer.WriteStringValue(MessageId); } - writer.WriteStringValue(MessageId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index e4fd8c801..62173fa2e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("input") != true) { writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); } - writer.WriteStringValue(Input); if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index f6240b01c..fd52d9bf1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("image") != true) { writer.WritePropertyName("image"u8); + writer.WriteObjectValue(_image, options); } - writer.WriteObjectValue(_image, options); } InternalRunStepDetailsToolCallsCodeOutputImageObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsCodeOutputImageObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 481f0d9b9..6457bb0c7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index c23224ae2..f3c1ad0d8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("ranker") != true) { writer.WritePropertyName("ranker"u8); + writer.WriteStringValue(Ranker.ToString()); } - writer.WriteStringValue(Ranker.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("score_threshold") != true) { writer.WritePropertyName("score_threshold"u8); + writer.WriteNumberValue(ScoreThreshold); } - writer.WriteNumberValue(ScoreThreshold); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 5b38b81c6..db4ac5039 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); if (_additionalBinaryDataProperties?.ContainsKey("output") != true) { if (Output != null) diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index cbcc0b83b..dabe4a913 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); + writer.WriteStartArray(); + foreach (RunStepToolCall item in InternalToolCalls) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (RunStepToolCall item in InternalToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); } InternalRunStepDetailsToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepDetailsToolCallsObject)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index 010641e0d..c746c3ad7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("file_search") != true) { writer.WritePropertyName("file_search"u8); + writer.WriteObjectValue(FileSearch, options); } - writer.WriteObjectValue(FileSearch, options); } InternalRunStepFileSearchToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepFileSearchToolCallDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index fd8cb89d8..83005c18e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -35,13 +35,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); + writer.WriteObjectValue(_internalFunction, options); } - writer.WriteObjectValue(_internalFunction, options); } InternalRunStepFunctionToolCallDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRunStepFunctionToolCallDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index 5a2c4df21..0a7dbd3b8 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); } - writer.WriteStringValue(Arguments); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index e9996485b..0ffb3a706 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("max_chunk_size_tokens") != true) { writer.WritePropertyName("max_chunk_size_tokens"u8); + writer.WriteNumberValue(MaxChunkSizeTokens); } - writer.WriteNumberValue(MaxChunkSizeTokens); if (_additionalBinaryDataProperties?.ContainsKey("chunk_overlap_tokens") != true) { writer.WritePropertyName("chunk_overlap_tokens"u8); + writer.WriteNumberValue(ChunkOverlapTokens); } - writer.WriteNumberValue(ChunkOverlapTokens); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 5e69f0f9c..a701f8310 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("static") != true) { writer.WritePropertyName("static"u8); + writer.WriteObjectValue(Static, options); } - writer.WriteObjectValue(Static, options); } InternalStaticChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalStaticChunkingStrategyRequestParam)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index 1c87ff414..5621bec75 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("tool_outputs") != true) { writer.WritePropertyName("tool_outputs"u8); + writer.WriteStartArray(); + foreach (ToolOutput item in ToolOutputs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ToolOutput item in ToolOutputs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 8dfd5bd47..60e7e9c10 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -34,38 +34,38 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) { writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); } - writer.WriteStringValue(Filename); if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { writer.WritePropertyName("bytes"u8); + writer.WriteNumberValue(Bytes); } - writer.WriteNumberValue(Bytes); if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) { writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose); } - writer.WriteStringValue(Purpose); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("expires_at") != true) { writer.WritePropertyName("expires_at"u8); + writer.WriteNumberValue(ExpiresAt, "U"); } - writer.WriteNumberValue(ExpiresAt, "U"); if (Optional.IsDefined(Object) && _additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index 1e4cfbf1e..d2d24efe8 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("upload_id") != true) { writer.WritePropertyName("upload_id"u8); + writer.WriteStringValue(UploadId); } - writer.WriteStringValue(UploadId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); } - writer.WriteStringValue(Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index 07e317bd6..9eaf338f7 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("in_progress") != true) { writer.WritePropertyName("in_progress"u8); + writer.WriteNumberValue(InProgress); } - writer.WriteNumberValue(InProgress); if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) { writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); } - writer.WriteNumberValue(Completed); if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) { writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); } - writer.WriteNumberValue(Failed); if (_additionalBinaryDataProperties?.ContainsKey("cancelled") != true) { writer.WritePropertyName("cancelled"u8); + writer.WriteNumberValue(Cancelled); } - writer.WriteNumberValue(Cancelled); if (_additionalBinaryDataProperties?.ContainsKey("total") != true) { writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); } - writer.WriteNumberValue(Total); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index b696666ea..01fd9b4f6 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); + this.SerializeTools(writer, options); } - this.SerializeTools(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index 1c24250ab..157068fe6 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -70,13 +70,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToSerialString()); } - writer.WriteStringValue(Role.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); + this.SerializeContent(writer, options); } - this.SerializeContent(writer, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index 3ada2384c..b4693f7dc 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(MessageId); } - writer.WriteStringValue(MessageId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index 442fa7fb4..6d43006e0 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) { writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); } - writer.WriteStringValue(Reason.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 8f837ea10..713ae513e 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(ModelId); } - writer.WriteStringValue(ModelId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 71ec03cad..075618a3c 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -30,15 +30,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("input") != true) { writer.WritePropertyName("input"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(Input); + writer.WriteRawValue(Input); #else - using (JsonDocument document = JsonDocument.Parse(Input)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(Input)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index 4eeed6ae6..b08d11ee5 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -22,8 +22,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("flagged") != true) { writer.WritePropertyName("flagged"u8); + writer.WriteBooleanValue(Flagged); } - writer.WriteBooleanValue(Flagged); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index ccc316c90..ee39e4741 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -22,13 +22,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 0b22ed165..61d3c596c 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -34,25 +34,25 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (_additionalBinaryDataProperties?.ContainsKey("embedding") != true) { writer.WritePropertyName("embedding"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(EmbeddingProperty); + writer.WriteRawValue(EmbeddingProperty); #else - using (JsonDocument document = JsonDocument.Parse(EmbeddingProperty)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(EmbeddingProperty)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index 0c745121b..14e84dba1 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -22,18 +22,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (_additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); } - writer.WriteObjectValue(Usage, options); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index ca142c0e9..a923168b9 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -46,8 +46,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (_additionalBinaryDataProperties?.ContainsKey("param") != true) { if (Param != null) @@ -63,8 +63,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index 089c32557..ea11b8128 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); } - writer.WriteObjectValue(Error, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index c07d42910..494f60b39 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("filename") != true) { writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); } - writer.WriteStringValue(Filename); if (_additionalBinaryDataProperties?.ContainsKey("purpose") != true) { writer.WritePropertyName("purpose"u8); + writer.WriteStringValue(Purpose.ToSerialString()); } - writer.WriteStringValue(Purpose.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("bytes") != true) { if (SizeInBytes != null) @@ -71,8 +71,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); } - writer.WriteStringValue(Status.ToSerialString()); if (Optional.IsDefined(StatusDetails) && _additionalBinaryDataProperties?.ContainsKey("status_details") != true) { writer.WritePropertyName("status_details"u8); diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 300939931..676dd7c31 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -22,8 +22,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index e4e093e7c..58a64e8f9 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("owned_by") != true) { writer.WritePropertyName("owned_by"u8); + writer.WriteStringValue(OwnedBy); } - writer.WriteStringValue(OwnedBy); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index 0254709b1..4a46f70c0 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -22,8 +22,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs index b55b412ea..b7aabd6d1 100644 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs @@ -35,15 +35,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); - } #if NET6_0_OR_GREATER - writer.WriteRawValue(Error); + writer.WriteRawValue(Error); #else - using (JsonDocument document = JsonDocument.Parse(Error)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } RealtimeResponseFailedStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (RealtimeResponseFailedStatusDetails)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 1072ff5e8..7c3ef390d 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -30,8 +30,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); } - writer.WriteStringValue(AssistantId); if (Optional.IsDefined(Stream) && _additionalBinaryDataProperties?.ContainsKey("stream") != true) { if (Stream != null) diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index bb7d26050..45c28ebe0 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); } - writer.WriteStringValue(Code.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index fb5c794b0..60ffe5d9c 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -34,38 +34,38 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); } - writer.WriteStringValue(AssistantId); if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); } - writer.WriteStringValue(ThreadId); if (_additionalBinaryDataProperties?.ContainsKey("run_id") != true) { writer.WritePropertyName("run_id"u8); + writer.WriteStringValue(RunId); } - writer.WriteStringValue(RunId); if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); } - writer.WriteStringValue(Type.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { if (LastError != null) @@ -164,13 +164,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("step_details") != true) { writer.WritePropertyName("step_details"u8); + writer.WriteObjectValue(Details, options); } - writer.WriteObjectValue(Details, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 472106b00..34a25daa5 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index aca57b8cb..603463475 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index 71bb8601b..d2cc7778f 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); } - writer.WriteStringValue(Code.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index 9ec2e38aa..d68f2c10d 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (_additionalBinaryDataProperties?.ContainsKey("file_name") != true) { writer.WritePropertyName("file_name"u8); + writer.WriteStringValue(FileName); } - writer.WriteStringValue(FileName); if (_additionalBinaryDataProperties?.ContainsKey("score") != true) { writer.WritePropertyName("score"u8); + writer.WriteNumberValue(Score); } - writer.WriteNumberValue(Score); if (Optional.IsCollectionDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index de6f767a4..e53345ee4 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) { writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(OutputTokenCount); } - writer.WriteNumberValue(OutputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) { writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); } - writer.WriteNumberValue(InputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); } - writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index ec9b88ec7..65a625e5f 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 9d83190aa..a1aabc615 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index bb05b90e1..885581911 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("completion_tokens") != true) { writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(OutputTokenCount); } - writer.WriteNumberValue(OutputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("prompt_tokens") != true) { writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(InputTokenCount); } - writer.WriteNumberValue(InputTokenCount); if (_additionalBinaryDataProperties?.ContainsKey("total_tokens") != true) { writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokenCount); } - writer.WriteNumberValue(TotalTokenCount); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index e12c7f58b..9a36a4ee0 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -46,8 +46,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_type.ToString()); } - writer.WriteStringValue(_type.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index e55323d71..9333b610c 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -35,18 +35,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.ToString()); } - writer.WriteStringValue(Model.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("input") != true) { writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); } - writer.WriteStringValue(Input); if (_additionalBinaryDataProperties?.ContainsKey("voice") != true) { writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.ToString()); } - writer.WriteStringValue(Voice.ToString()); if (Optional.IsDefined(SpeedRatio) && _additionalBinaryDataProperties?.ContainsKey("speed") != true) { writer.WritePropertyName("speed"u8); diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index f7650c716..5ca1c13b8 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("static") != true) { writer.WritePropertyName("static"u8); + writer.WriteObjectValue(_internalDetails, options); } - writer.WriteObjectValue(_internalDetails, options); } StaticFileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (StaticFileChunkingStrategy)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 8fe0a8d7b..b3572e16e 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (Optional.IsDefined(SystemFingerprint) && _additionalBinaryDataProperties?.ContainsKey("system_fingerprint") != true) { writer.WritePropertyName("system_fingerprint"u8); @@ -44,13 +44,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(CompletionId); } - writer.WriteStringValue(CompletionId); if (Optional.IsDefined(ServiceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (ServiceTier != null) @@ -66,18 +66,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("choices") != true) { writer.WritePropertyName("choices"u8); + writer.WriteStartArray(); + foreach (InternalCreateChatCompletionStreamResponseChoice item in Choices) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (InternalCreateChatCompletionStreamResponseChoice item in Choices) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("created") != true) { writer.WritePropertyName("created"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (Optional.IsDefined(Usage) && _additionalBinaryDataProperties?.ContainsKey("usage") != true) { writer.WritePropertyName("usage"u8); diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 2284537c6..0e9ae46aa 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("index") != true) { writer.WritePropertyName("index"u8); + writer.WriteNumberValue(Index); } - writer.WriteNumberValue(Index); if (Optional.IsDefined(Function) && _additionalBinaryDataProperties?.ContainsKey("function") != true) { writer.WritePropertyName("function"u8); @@ -44,8 +44,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Kind.ToSerialString()); } - writer.WriteStringValue(Kind.ToSerialString()); if (Optional.IsDefined(ToolCallId) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index ecc7f18be..4920595b1 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(ThreadId); } - writer.WriteStringValue(ThreadId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index db8c54d10..b534eddbb 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -34,23 +34,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); } - writer.WriteStringValue(ThreadId); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("incomplete_details") != true) { if (IncompleteDetails != null) @@ -90,13 +90,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (MessageContent item in Content) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (MessageContent item in Content) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { if (AssistantId != null) @@ -147,13 +147,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("role") != true) { writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToSerialString()); } - writer.WriteStringValue(Role.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("attachments") != true) { if (Attachments != null && Optional.IsCollectionDefined(Attachments)) diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 79d8719f3..09d5f62e6 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("thread_id") != true) { writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); } - writer.WriteStringValue(ThreadId); if (_additionalBinaryDataProperties?.ContainsKey("assistant_id") != true) { writer.WritePropertyName("assistant_id"u8); + writer.WriteStringValue(AssistantId); } - writer.WriteStringValue(AssistantId); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { if (LastError != null) @@ -143,23 +143,23 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("model") != true) { writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } - writer.WriteStringValue(Model); if (_additionalBinaryDataProperties?.ContainsKey("instructions") != true) { writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); } - writer.WriteStringValue(Instructions); if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (ToolDefinition item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (ToolDefinition item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) @@ -222,8 +222,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("response_format") != true) { if (ResponseFormat != null) @@ -263,8 +263,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("parallel_tool_calls") != true) { writer.WritePropertyName("parallel_tool_calls"u8); + writer.WriteBooleanValue(AllowParallelToolCalls.Value); } - writer.WriteBooleanValue(AllowParallelToolCalls.Value); if (_additionalBinaryDataProperties?.ContainsKey("max_prompt_tokens") != true) { if (MaxInputTokenCount != null) diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 139486ee9..0c5931503 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -28,8 +28,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("tool_call_id") != true) { writer.WritePropertyName("tool_call_id"u8); + writer.WriteStringValue(ToolCallId); } - writer.WriteStringValue(ToolCallId); } ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ToolChatMessage)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 88428777e..29a26bbb0 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -31,8 +31,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(_objectType); } - writer.WriteStringValue(_objectType); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 32f812238..025b03824 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -27,8 +27,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - writer.WriteStringValue(Type); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index b5294d59d..c644c41ea 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -34,58 +34,58 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id); } - writer.WriteNumberValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - writer.WriteStringValue(Text); if (_additionalBinaryDataProperties?.ContainsKey("temperature") != true) { writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature); } - writer.WriteNumberValue(Temperature); if (_additionalBinaryDataProperties?.ContainsKey("compression_ratio") != true) { writer.WritePropertyName("compression_ratio"u8); + writer.WriteNumberValue(CompressionRatio); } - writer.WriteNumberValue(CompressionRatio); if (_additionalBinaryDataProperties?.ContainsKey("start") != true) { writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); if (_additionalBinaryDataProperties?.ContainsKey("end") != true) { writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); if (_additionalBinaryDataProperties?.ContainsKey("seek") != true) { writer.WritePropertyName("seek"u8); + writer.WriteNumberValue(SeekOffset); } - writer.WriteNumberValue(SeekOffset); if (_additionalBinaryDataProperties?.ContainsKey("tokens") != true) { writer.WritePropertyName("tokens"u8); + writer.WriteStartArray(); + foreach (int item in TokenIds.Span) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); } - writer.WriteStartArray(); - foreach (int item in TokenIds.Span) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); if (_additionalBinaryDataProperties?.ContainsKey("avg_logprob") != true) { writer.WritePropertyName("avg_logprob"u8); + writer.WriteNumberValue(AverageLogProbability); } - writer.WriteNumberValue(AverageLogProbability); if (_additionalBinaryDataProperties?.ContainsKey("no_speech_prob") != true) { writer.WritePropertyName("no_speech_prob"u8); + writer.WriteNumberValue(NoSpeechProbability); } - writer.WriteNumberValue(NoSpeechProbability); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.cs b/.dotnet/src/Generated/Models/TranscribedSegment.cs index 9f55737ab..3b18d7b96 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedSegment { - private IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal TranscribedSegment(int id, string text, float temperature, float compressionRatio, TimeSpan startTime, TimeSpan endTime, int seekOffset, ReadOnlyMemory tokenIds, float averageLogProbability, float noSpeechProbability) { @@ -48,10 +48,6 @@ internal TranscribedSegment(int id, string text, float temperature, float compre public float CompressionRatio { get; } - internal IDictionary SerializedAdditionalRawData - { - get => _additionalBinaryDataProperties; - set => _additionalBinaryDataProperties = value; - } + internal IDictionary SerializedAdditionalRawData => _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index fb16160a1..5b5399ae1 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -34,18 +34,18 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions if (_additionalBinaryDataProperties?.ContainsKey("word") != true) { writer.WritePropertyName("word"u8); + writer.WriteStringValue(Word); } - writer.WriteStringValue(Word); if (_additionalBinaryDataProperties?.ContainsKey("start") != true) { writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(StartTime.ToString("s\\.FFF"))); if (_additionalBinaryDataProperties?.ContainsKey("end") != true) { writer.WritePropertyName("end"u8); + writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); } - writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/TranscribedWord.cs b/.dotnet/src/Generated/Models/TranscribedWord.cs index 577427faf..c52ca8d49 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.cs @@ -9,7 +9,7 @@ namespace OpenAI.Audio { public readonly partial struct TranscribedWord { - private IDictionary _additionalBinaryDataProperties; + private readonly IDictionary _additionalBinaryDataProperties; internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime) { @@ -28,10 +28,6 @@ internal TranscribedWord(string word, TimeSpan startTime, TimeSpan endTime, IDic public string Word { get; } - internal IDictionary SerializedAdditionalRawData - { - get => _additionalBinaryDataProperties; - set => _additionalBinaryDataProperties = value; - } + internal IDictionary SerializedAdditionalRawData => _additionalBinaryDataProperties; } } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 1256267b7..987ff33ff 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -34,33 +34,33 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - writer.WriteStringValue(Id); if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("name") != true) { writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); } - writer.WriteStringValue(Name); if (_additionalBinaryDataProperties?.ContainsKey("usage_bytes") != true) { writer.WritePropertyName("usage_bytes"u8); + writer.WriteNumberValue(UsageBytes); } - writer.WriteNumberValue(UsageBytes); if (_additionalBinaryDataProperties?.ContainsKey("file_counts") != true) { writer.WritePropertyName("file_counts"u8); + writer.WriteObjectValue(FileCounts, options); } - writer.WriteObjectValue(FileCounts, options); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); } - writer.WriteStringValue(Status.ToSerialString()); if (Optional.IsDefined(ExpiresAt) && _additionalBinaryDataProperties?.ContainsKey("expires_at") != true) { if (ExpiresAt != null) @@ -111,8 +111,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (Optional.IsDefined(ExpirationPolicy) && _additionalBinaryDataProperties?.ContainsKey("expires_after") != true) { writer.WritePropertyName("expires_after"u8); diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 682fe1928..091d2fe9c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -34,33 +34,33 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("vector_store_id") != true) { writer.WritePropertyName("vector_store_id"u8); + writer.WriteStringValue(VectorStoreId); } - writer.WriteStringValue(VectorStoreId); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); } - writer.WriteStringValue(Status.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(BatchId); } - writer.WriteStringValue(BatchId); if (_additionalBinaryDataProperties?.ContainsKey("file_counts") != true) { writer.WritePropertyName("file_counts"u8); + writer.WriteObjectValue(FileCounts, options); } - writer.WriteObjectValue(FileCounts, options); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteObjectValue(this.Object, options); } - writer.WriteObjectValue(this.Object, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 8de1cce95..337779eb4 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("deleted") != true) { writer.WritePropertyName("deleted"u8); + writer.WriteBooleanValue(Deleted); } - writer.WriteBooleanValue(Deleted); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(VectorStoreId); } - writer.WriteStringValue(VectorStoreId); if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index df77fcaeb..513ce9e9a 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -30,13 +30,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("anchor") != true) { writer.WritePropertyName("anchor"u8); + writer.WriteStringValue(_anchor.ToSerialString()); } - writer.WriteStringValue(_anchor.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("days") != true) { writer.WritePropertyName("days"u8); + writer.WriteNumberValue(_days); } - writer.WriteNumberValue(_days); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index 2e8ca06ed..b02217c85 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -34,18 +34,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("created_at") != true) { writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); } - writer.WriteNumberValue(CreatedAt, "U"); if (_additionalBinaryDataProperties?.ContainsKey("vector_store_id") != true) { writer.WritePropertyName("vector_store_id"u8); + writer.WriteStringValue(VectorStoreId); } - writer.WriteStringValue(VectorStoreId); if (_additionalBinaryDataProperties?.ContainsKey("status") != true) { writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); } - writer.WriteStringValue(Status.ToSerialString()); if (_additionalBinaryDataProperties?.ContainsKey("last_error") != true) { if (LastError != null) @@ -61,18 +61,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); + writer.WriteStringValue(this.Object.ToString()); } - writer.WriteStringValue(this.Object.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); + writer.WriteStringValue(FileId); } - writer.WriteStringValue(FileId); if (_additionalBinaryDataProperties?.ContainsKey("usage_bytes") != true) { writer.WritePropertyName("usage_bytes"u8); + writer.WriteNumberValue(Size); } - writer.WriteNumberValue(Size); if (Optional.IsDefined(ChunkingStrategy) && _additionalBinaryDataProperties?.ContainsKey("chunking_strategy") != true) { writer.WritePropertyName("chunking_strategy"u8); diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index 688c89d40..13e32b6c1 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -34,13 +34,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("code") != true) { writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); } - writer.WriteStringValue(Code.ToString()); if (_additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); } - writer.WriteStringValue(Message); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index a384d28ae..2bf0a734a 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -34,28 +34,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (_additionalBinaryDataProperties?.ContainsKey("in_progress") != true) { writer.WritePropertyName("in_progress"u8); + writer.WriteNumberValue(InProgress); } - writer.WriteNumberValue(InProgress); if (_additionalBinaryDataProperties?.ContainsKey("completed") != true) { writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); } - writer.WriteNumberValue(Completed); if (_additionalBinaryDataProperties?.ContainsKey("failed") != true) { writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); } - writer.WriteNumberValue(Failed); if (_additionalBinaryDataProperties?.ContainsKey("cancelled") != true) { writer.WritePropertyName("cancelled"u8); + writer.WriteNumberValue(Cancelled); } - writer.WriteNumberValue(Cancelled); if (_additionalBinaryDataProperties?.ContainsKey("total") != true) { writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); } - writer.WriteNumberValue(Total); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 844697301..34b445235 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -35,8 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("wandb") != true) { writer.WritePropertyName("wandb"u8); + writer.WriteObjectValue(Wandb, options); } - writer.WriteObjectValue(Wandb, options); } WeightsAndBiasesIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (WeightsAndBiasesIntegration)JsonModelCreateCore(ref reader, options); diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index 3cd338145..6675b9c54 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -4086,6 +4086,7 @@ components: description: The refusal message generated by the model. tool_calls: $ref: '#/components/schemas/ChatCompletionMessageToolCallsItem' + readOnly: true role: type: string enum: @@ -4800,12 +4801,14 @@ components: $ref: '#/components/schemas/ChatCompletionTokenLogprob' nullable: true description: A list of message content tokens with log probability information. + readOnly: true refusal: type: array items: $ref: '#/components/schemas/ChatCompletionTokenLogprob' nullable: true description: A list of message refusal tokens with log probability information. + readOnly: true required: - content - refusal @@ -9995,6 +9998,7 @@ components: type: array items: $ref: '#/components/schemas/RealtimeContentPart' + readOnly: true status: $ref: '#/components/schemas/RealtimeItemStatus' allOf: @@ -10128,6 +10132,7 @@ components: type: array items: $ref: '#/components/schemas/RealtimeTool' + readOnly: true tool_choice: $ref: '#/components/schemas/RealtimeToolChoice' temperature: @@ -10528,6 +10533,7 @@ components: items: $ref: '#/components/schemas/RunToolCallObject' description: A list of the relevant tool calls. + readOnly: true required: - tool_calls description: Details on the tool outputs needed for this run to continue. @@ -10762,6 +10768,7 @@ components: $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject' description: The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. x-oaiExpandable: true + readOnly: true description: The Code Interpreter tool call definition. allOf: - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsObjectToolCallsObject' @@ -10967,6 +10974,7 @@ components: $ref: '#/components/schemas/RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject' description: The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. x-oaiExpandable: true + readOnly: true required: - input - outputs @@ -11051,6 +11059,7 @@ components: items: $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchResultObject' description: The results of the file search. + readOnly: true description: For now, this is always going to be an empty object. x-oaiTypeLabel: map allOf: @@ -11454,6 +11463,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. x-oaiTypeLabel: map + readOnly: true description: Represents a thread that contains [messages](/docs/api-reference/messages). ToolResourcesFileSearch: type: object From d04c87e8643efb387737b90bedff892267f9cf65 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 25 Oct 2024 15:47:48 -0700 Subject: [PATCH 22/54] PR fb --- .../OpenAI.Library.Plugin.csproj} | 1 + .../OpenAILibraryPlugin.cs | 7 ++- .../OpenAILibraryVisitor.cs | 47 ++++++++++++++----- 3 files changed, 38 insertions(+), 17 deletions(-) rename .dotnet/{OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj => OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj} (77%) rename .dotnet/{OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin => OpenAI.Library.Plugin}/OpenAILibraryPlugin.cs (73%) rename .dotnet/{OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin => OpenAI.Library.Plugin}/OpenAILibraryVisitor.cs (76%) diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj b/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj similarity index 77% rename from .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj rename to .dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj index f4b14537e..3b3249404 100644 --- a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj +++ b/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj @@ -3,6 +3,7 @@ net8.0 enable + OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs similarity index 73% rename from .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs rename to .dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs index 0bc0d41ac..21d81fd68 100644 --- a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryPlugin.cs +++ b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs @@ -1,9 +1,8 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - using System.ComponentModel.Composition; +using Microsoft.Generator.CSharp; +using Microsoft.Generator.CSharp.ClientModel; -namespace Microsoft.Generator.CSharp.ClientModel.OpenAILibraryPlugin +namespace OpenAILibraryPlugin { [Export(typeof(CodeModelPlugin))] [ExportMetadata("PluginName", nameof(OpenAILibraryPlugin))] diff --git a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs similarity index 76% rename from .dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs rename to .dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs index 9550627b9..8f4946701 100644 --- a/.dotnet/OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin/OpenAILibraryVisitor.cs +++ b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs @@ -1,9 +1,7 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Generator.CSharp.ClientModel; using Microsoft.Generator.CSharp.ClientModel.Providers; using Microsoft.Generator.CSharp.Expressions; using Microsoft.Generator.CSharp.Primitives; @@ -12,7 +10,7 @@ using Microsoft.Generator.CSharp.Statements; using static Microsoft.Generator.CSharp.Snippets.Snippet; -namespace Microsoft.Generator.CSharp.ClientModel.OpenAILibraryPlugin +namespace OpenAILibraryPlugin { public class OpenAILibraryVisitor : ScmLibraryVisitor { @@ -34,7 +32,8 @@ protected override TypeProvider Visit(TypeProvider type) typeof(IDictionary), RawDataPropertyName, new ExpressionPropertyBody( additionalPropertiesField, - additionalPropertiesField.Assign(Value)), type) + type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly) ? null : additionalPropertiesField.Assign(Value)), + type) }; type.Update(properties: properties); } @@ -65,8 +64,8 @@ protected override TypeProvider Visit(TypeProvider type) [valueParameter]), new[] { - Declare("sentinelSpan", typeof(ReadOnlySpan), sentinelValueField.Invoke("ToMemory", []).Property("Span"), out var sentinelVariable), - Declare("valueSpan", typeof(ReadOnlySpan), valueParameter.Invoke("ToMemory", []).Property("Span"), out var valueVariable), + Declare("sentinelSpan", typeof(ReadOnlySpan), sentinelValueField.As().ToMemory().Property("Span"), out var sentinelVariable), + Declare("valueSpan", typeof(ReadOnlySpan), valueParameter.As().ToMemory().Property("Span"), out var valueVariable), Return(sentinelVariable.Invoke("SequenceEqual", valueVariable)) }, type) @@ -78,7 +77,7 @@ protected override TypeProvider Visit(TypeProvider type) protected override FieldProvider? Visit(FieldProvider field) { - if (field.Name == AdditionalPropertiesFieldName) + if (field.Name == AdditionalPropertiesFieldName && !field.EnclosingType.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly)) { field.Modifiers &= ~FieldModifiers.ReadOnly; } @@ -105,20 +104,24 @@ protected override MethodProvider Visit(MethodProvider method) } var updatedStatements = new List(); + var flattenedStatements = Flatten(statements).ToArray(); - foreach (var statement in Flatten(statements!)) + for (int line = 0; line < flattenedStatements.Length; line++) { + var statement = flattenedStatements[line]; + if (statement is IfStatement ifStatement) { var body = ifStatement.Body.ToDisplayString(); + + // If we already have an if statement that contains property writing, we need to add the condition to the existing if statement if (body.Contains(WritePropertyNameMethodCall)) { ifStatement.Condition = ifStatement.Condition.As().And(GetContainsKeyCondition(body)); - updatedStatements.Add(ifStatement); - continue; } - if (Flatten(ifStatement.Body).First() is ForeachStatement foreachStatement) + // Handle writing AdditionalProperties + else if (Flatten(ifStatement.Body).First() is ForeachStatement foreachStatement) { foreachStatement.Body.Insert( 0, @@ -128,12 +131,30 @@ protected override MethodProvider Visit(MethodProvider method) Continue }); } + + updatedStatements.Add(ifStatement); + continue; } var displayString = statement.ToDisplayString(); if (displayString.Contains(WritePropertyNameMethodCall)) { var ifSt = new IfStatement(GetContainsKeyCondition(displayString)) { statement }; + + // If this is a plain expression statement, we need to add the next statement as well which + // will either write the property value or start writing an array + if (statement is ExpressionStatement) + { + ifSt.Add(flattenedStatements[++line]); + // Include array writing in the if statement + if (flattenedStatements[line + 1] is ForeachStatement) + { + // Foreach + ifSt.Add(flattenedStatements[++line]); + // End array + ifSt.Add(flattenedStatements[++line]); + } + } updatedStatements.Add(ifSt); } else @@ -148,7 +169,7 @@ protected override MethodProvider Visit(MethodProvider method) private static ScopedApi GetContainsKeyCondition(string displayString) { var propertyName = displayString.Split('"')[1]; - return AdditionalBinaryDataExpression + return This.Property(AdditionalPropertiesFieldName) .NullConditional() .Invoke("ContainsKey", Literal(propertyName)).NotEqual(True); } From 703b19eecdcab6d2223378e26a17003257a1234d Mon Sep 17 00:00:00 2001 From: jolov Date: Mon, 28 Oct 2024 17:17:33 -0700 Subject: [PATCH 23/54] Add emitter --- .dotnet/.gitignore | 4 + .../OpenAI.Library.Plugin.csproj | 2 +- .../OpenAILibraryVisitor.cs | 27 +- .dotnet/OpenAI.sln | 2 +- .../Generated/AssistantClient.RestClient.cs | 3 + .../src/Generated/AudioClient.RestClient.cs | 3 + .../src/Generated/BatchClient.RestClient.cs | 3 + .../src/Generated/ChatClient.RestClient.cs | 3 + .../Generated/EmbeddingClient.RestClient.cs | 3 + .../Generated/FineTuningClient.RestClient.cs | 3 + .../src/Generated/ImageClient.RestClient.cs | 3 + ...ternalAssistantMessageClient.RestClient.cs | 3 + .../InternalAssistantRunClient.RestClient.cs | 3 + ...nternalAssistantThreadClient.RestClient.cs | 3 + .../InternalUploadsClient.RestClient.cs | 3 + .../LegacyCompletionClient.RestClient.cs | 3 + ...onversationSessionOptions.Serialization.cs | 4 +- .../Generated/ModerationClient.RestClient.cs | 3 + .../src/Generated/OpenAIClient.RestClient.cs | 3 + .../Generated/OpenAIFileClient.RestClient.cs | 3 + .../Generated/OpenAIModelClient.RestClient.cs | 3 + .../RealtimeConversationClient.RestClient.cs | 3 + .../Generated/VectorStoreClient.RestClient.cs | 3 + .plugin/.gitignore | 182 + .plugin/emitter/src/emitter.ts | 12 + .plugin/emitter/src/index.ts | 1 + .plugin/emitter/temp/tsconfig.tsbuildinfo | 1 + .plugin/generator/OpenAI.Library.Plugin.sln | 22 + .../src/OpenAI.Library.Plugin.csproj | 23 + .plugin/generator/src/OpenAILibraryPlugin.cs | 20 + .plugin/generator/src/OpenAILibraryVisitor.cs | 204 + .plugin/package-lock.json | 3588 +++++++++++++++++ .plugin/package.json | 45 + .plugin/tsconfig.build.json | 11 + .plugin/tsconfig.json | 27 + .plugin/tspconfig.yaml | 4 + .typespec/tspconfig.yaml | 7 + package-lock.json | 2746 ++++++++++++- package.json | 2 +- 39 files changed, 6925 insertions(+), 63 deletions(-) create mode 100644 .plugin/.gitignore create mode 100644 .plugin/emitter/src/emitter.ts create mode 100644 .plugin/emitter/src/index.ts create mode 100644 .plugin/emitter/temp/tsconfig.tsbuildinfo create mode 100644 .plugin/generator/OpenAI.Library.Plugin.sln create mode 100644 .plugin/generator/src/OpenAI.Library.Plugin.csproj create mode 100644 .plugin/generator/src/OpenAILibraryPlugin.cs create mode 100644 .plugin/generator/src/OpenAILibraryVisitor.cs create mode 100644 .plugin/package-lock.json create mode 100644 .plugin/package.json create mode 100644 .plugin/tsconfig.build.json create mode 100644 .plugin/tsconfig.json create mode 100644 .plugin/tspconfig.yaml diff --git a/.dotnet/.gitignore b/.dotnet/.gitignore index f71e3dc8e..427b8858f 100644 --- a/.dotnet/.gitignore +++ b/.dotnet/.gitignore @@ -177,3 +177,7 @@ artifacts # Temporary typespec folders for typespec generation TempTypeSpecFiles/ + +# Artifacts from the generator +tspCodeModel.json +Configuration.json diff --git a/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj b/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj index 3b3249404..c5e17eeb8 100644 --- a/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj +++ b/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj @@ -7,7 +7,7 @@ - + diff --git a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs index 8f4946701..75382d78b 100644 --- a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs +++ b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs @@ -3,7 +3,6 @@ using System.Linq; using Microsoft.Generator.CSharp.ClientModel; using Microsoft.Generator.CSharp.ClientModel.Providers; -using Microsoft.Generator.CSharp.Expressions; using Microsoft.Generator.CSharp.Primitives; using Microsoft.Generator.CSharp.Providers; using Microsoft.Generator.CSharp.Snippets; @@ -18,13 +17,15 @@ public class OpenAILibraryVisitor : ScmLibraryVisitor private const string AdditionalPropertiesFieldName = "_additionalBinaryDataProperties"; private const string SentinelValueFieldName = "_sentinelValue"; private const string WritePropertyNameMethodCall = "WritePropertyName(\""; - - private static readonly VariableExpression AdditionalBinaryDataExpression = - new VariableExpression(typeof(IDictionary), AdditionalPropertiesFieldName); + private const string ModelSerializationExtensionsTypeName = "ModelSerializationExtension"; + private const string IsSentinelValueMethodName = "IsSentinelValue"; + private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore"; + protected override TypeProvider Visit(TypeProvider type) { if (type is ModelProvider { BaseModelProvider: null }) { + // Add an internal AdditionalProperties property to all base models var additionalPropertiesField = type.Fields.Single(f => f.Name == AdditionalPropertiesFieldName); var properties = new List(type.Properties) { @@ -35,10 +36,12 @@ protected override TypeProvider Visit(TypeProvider type) type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly) ? null : additionalPropertiesField.Assign(Value)), type) }; + type.Update(properties: properties); } - else if (type.Name == "ModelSerializationExtensions") + else if (type.Name == ModelSerializationExtensionsTypeName) { + // Add a static BinaryData field representing the sentinel value var sentinelValueField = new FieldProvider( FieldModifiers.Private | FieldModifiers.Static | FieldModifiers.ReadOnly, typeof(BinaryData), @@ -51,12 +54,13 @@ protected override TypeProvider Visit(TypeProvider type) sentinelValueField }; + // Add the IsSentinelValue method var valueParameter = new ParameterProvider("value", $"", typeof(BinaryData)); var methods = new List(type.Methods) { new MethodProvider( new MethodSignature( - "IsSentinelValue", + IsSentinelValueMethodName, $"", MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static, typeof(bool), @@ -70,13 +74,15 @@ protected override TypeProvider Visit(TypeProvider type) }, type) }; + type.Update(fields: fields, methods: methods); } return type; } - protected override FieldProvider? Visit(FieldProvider field) + protected override FieldProvider Visit(FieldProvider field) { + // Make the backing additional properties field not be read only as long as the type is not readonly. if (field.Name == AdditionalPropertiesFieldName && !field.EnclosingType.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly)) { field.Modifiers &= ~FieldModifiers.ReadOnly; @@ -86,7 +92,7 @@ protected override TypeProvider Visit(TypeProvider type) protected override MethodProvider Visit(MethodProvider method) { - if (method.Signature.Name != "JsonModelWriteCore") + if (method.Signature.Name != JsonModelWriteCoreMethodName) { return method; } @@ -126,7 +132,9 @@ protected override MethodProvider Visit(MethodProvider method) foreachStatement.Body.Insert( 0, new IfStatement( - Static(new ModelSerializationExtensionsDefinition().Type).Invoke("IsSentinelValue", foreachStatement.ItemVariable.Property("Value"))) + Static(new ModelSerializationExtensionsDefinition().Type).Invoke( + IsSentinelValueMethodName, + foreachStatement.ItemVariable.Property("Value"))) { Continue }); @@ -162,6 +170,7 @@ protected override MethodProvider Visit(MethodProvider method) updatedStatements.Add(statement); } } + method.Update(bodyStatements: updatedStatements); return method; } diff --git a/.dotnet/OpenAI.sln b/.dotnet/OpenAI.sln index 29cb7d411..7f44a8267 100644 --- a/.dotnet/OpenAI.sln +++ b/.dotnet/OpenAI.sln @@ -8,7 +8,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Examples", "examples EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Tests", "tests\OpenAI.Tests.csproj", "{6F156401-2544-41D7-B204-3148C51C1D09}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin", "OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin\OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin.csproj", "{B7CE2055-3F68-49BA-95AE-96EA00D513F5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Library.Plugin", "OpenAI.Library.Plugin\OpenAI.Library.Plugin.csproj", "{B7CE2055-3F68-49BA-95AE-96EA00D513F5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/.dotnet/src/Generated/AssistantClient.RestClient.cs b/.dotnet/src/Generated/AssistantClient.RestClient.cs index 187e4c357..a3731f9c5 100644 --- a/.dotnet/src/Generated/AssistantClient.RestClient.cs +++ b/.dotnet/src/Generated/AssistantClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Assistants public partial class AssistantClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/AudioClient.RestClient.cs b/.dotnet/src/Generated/AudioClient.RestClient.cs index 1fa68b9ff..6f26ceddb 100644 --- a/.dotnet/src/Generated/AudioClient.RestClient.cs +++ b/.dotnet/src/Generated/AudioClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Audio public partial class AudioClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/BatchClient.RestClient.cs b/.dotnet/src/Generated/BatchClient.RestClient.cs index 4145876a0..75d82fb1e 100644 --- a/.dotnet/src/Generated/BatchClient.RestClient.cs +++ b/.dotnet/src/Generated/BatchClient.RestClient.cs @@ -11,11 +11,14 @@ namespace OpenAI.Batch public partial class BatchClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/ChatClient.RestClient.cs b/.dotnet/src/Generated/ChatClient.RestClient.cs index 8c7fd5039..97b4362c8 100644 --- a/.dotnet/src/Generated/ChatClient.RestClient.cs +++ b/.dotnet/src/Generated/ChatClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Chat public partial class ChatClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/EmbeddingClient.RestClient.cs b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs index bfa4e2cb6..725782695 100644 --- a/.dotnet/src/Generated/EmbeddingClient.RestClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Embeddings public partial class EmbeddingClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/FineTuningClient.RestClient.cs b/.dotnet/src/Generated/FineTuningClient.RestClient.cs index 43042d504..86b08d62f 100644 --- a/.dotnet/src/Generated/FineTuningClient.RestClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.RestClient.cs @@ -11,11 +11,14 @@ namespace OpenAI.FineTuning public partial class FineTuningClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/ImageClient.RestClient.cs b/.dotnet/src/Generated/ImageClient.RestClient.cs index 284ca85b0..3222a497b 100644 --- a/.dotnet/src/Generated/ImageClient.RestClient.cs +++ b/.dotnet/src/Generated/ImageClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Images public partial class ImageClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs index 06df51d73..57c1b47d9 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Assistants internal partial class InternalAssistantMessageClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs index 746ef561f..e3b0252af 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Assistants internal partial class InternalAssistantRunClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs index 03895bed3..9dbc62a7d 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Assistants internal partial class InternalAssistantThreadClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs index 72fc9ae35..1acf7369c 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Files internal partial class InternalUploadsClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs index 7f6bdc73a..54694187d 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.LegacyCompletions internal partial class LegacyCompletionClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index a2b9d575c..f82f245dd 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in _internalModalities) { - writer.WriteObjectValue(item, options); + writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } @@ -253,7 +253,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(InternalRealtimeRequestSessionUpdateCommandSessionModality.DeserializeInternalRealtimeRequestSessionUpdateCommandSessionModality(item, options)); + array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); } internalModalities = array; continue; diff --git a/.dotnet/src/Generated/ModerationClient.RestClient.cs b/.dotnet/src/Generated/ModerationClient.RestClient.cs index a4feac46b..1b6a371ea 100644 --- a/.dotnet/src/Generated/ModerationClient.RestClient.cs +++ b/.dotnet/src/Generated/ModerationClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Moderations public partial class ModerationClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/OpenAIClient.RestClient.cs b/.dotnet/src/Generated/OpenAIClient.RestClient.cs index c9bf6a757..bd0ebd8c2 100644 --- a/.dotnet/src/Generated/OpenAIClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIClient.RestClient.cs @@ -10,11 +10,14 @@ namespace OpenAI public partial class OpenAIClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs index e60ffbcf0..bcda87d0b 100644 --- a/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.RestClient.cs @@ -12,11 +12,14 @@ namespace OpenAI.Files public partial class OpenAIFileClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs index dd0683963..c7872e2d5 100644 --- a/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.RestClient.cs @@ -11,11 +11,14 @@ namespace OpenAI.Models public partial class OpenAIModelClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs index 44191525d..8e48e8cee 100644 --- a/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs +++ b/.dotnet/src/Generated/RealtimeConversationClient.RestClient.cs @@ -10,11 +10,14 @@ namespace OpenAI.RealtimeConversation public partial class RealtimeConversationClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs index 9173d2894..a084bdb50 100644 --- a/.dotnet/src/Generated/VectorStoreClient.RestClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.RestClient.cs @@ -11,11 +11,14 @@ namespace OpenAI.VectorStores public partial class VectorStoreClient { private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; private static PipelineMessageClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 = PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); diff --git a/.plugin/.gitignore b/.plugin/.gitignore new file mode 100644 index 000000000..a2ea83c50 --- /dev/null +++ b/.plugin/.gitignore @@ -0,0 +1,182 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates +.vs/ +*.lock.json +developer/ +launch.json +launchSettings.json + +# Default Assets restore directory +.assets + +# Default TypeSpec output +tsp-output/ + +# Build results +/artifacts +binaries/ +[Dd]ebug*/ +[Rr]elease/ +build/ +restoredPackages/ +PolicheckOutput/ +tools/net46/ +tools/SdkBuildTools/ +tools/Microsoft.WindowsAzure.Build.Tasks/packages/ +PublishedNugets/ +src/NuGet.Config +tools/7-zip/ +#tools/LocalNugetFeed/Microsoft.Internal.NetSdkBuild.Mgmt.Tools.*.nupkg + +[Tt]est[Rr]esult +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +*.vssscc +.builds + +*.pidb + +*.log +*.scc +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# VS Code +**/.vscode/* +!.vscode/cspell.json + +# Code analysis +*.CodeAnalysisLog.xml + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ + +*.[Rr]e[Ss]harper + +# Rider IDE +.idea + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Publish Web Output +*.Publish.xml + +# Others +[Bb]in +[Oo]bj +TestResults +[Tt]est[Rr]esult* +*.Cache +ClientBin +~$* +*.dbmdl + +*.[Pp]ublish.xml + +Generated_Code #added for RIA/Silverlight projects + +# Build tasks +tools/*.dll + +# Sensitive files +*.keys +!Azure.Extensions.AspNetCore.DataProtection.Keys +!Azure.Security.KeyVault.Keys +*.pfx +TestConfigurations.xml +*.json.env +*.bicep.env + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + +# NuGet +packages +packages/repositories.config +testPackages + +# Mac development +.DS_Store + +# Specification DLLs +*.Specification.dll + +# Generated readme.txt files # +src/*/readme.txt + +build.out +.nuget/ + +# Azure Project +csx/ +*.GhostDoc.xml +pingme.txt + +# TS/Node files +dist/ +node_modules/ + +# MSBuild binary log files +msbuild.binlog + +# BenchmarkDotNet +BenchmarkDotNet.Artifacts + +artifacts +.assets + +# Temporary typespec folders for typespec generation +TempTypeSpecFiles/ diff --git a/.plugin/emitter/src/emitter.ts b/.plugin/emitter/src/emitter.ts new file mode 100644 index 000000000..eaa2a2ffc --- /dev/null +++ b/.plugin/emitter/src/emitter.ts @@ -0,0 +1,12 @@ +import { EmitContext } from "@typespec/compiler"; + +import { + $onEmit as $OnMGCEmit, + NetEmitterOptions +} from "@typespec/http-client-csharp"; + +export async function $onEmit(context: EmitContext) { + context.options["plugin-name"] = "OpenAILibraryPlugin"; + context.options["emitter-extension-path"] = import.meta.url; + await $OnMGCEmit(context); +} \ No newline at end of file diff --git a/.plugin/emitter/src/index.ts b/.plugin/emitter/src/index.ts new file mode 100644 index 000000000..8b2630d57 --- /dev/null +++ b/.plugin/emitter/src/index.ts @@ -0,0 +1 @@ +export * from "./emitter.js"; \ No newline at end of file diff --git a/.plugin/emitter/temp/tsconfig.tsbuildinfo b/.plugin/emitter/temp/tsconfig.tsbuildinfo new file mode 100644 index 000000000..ea906727c --- /dev/null +++ b/.plugin/emitter/temp/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/type-name-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/checker.d.ts","../../node_modules/@typespec/compiler/dist/src/manifest.d.ts","../../node_modules/@typespec/compiler/dist/src/types/package-json.d.ts","../../node_modules/@typespec/compiler/dist/src/module-resolver/module-resolver.d.ts","../../node_modules/@typespec/compiler/dist/src/core/decorator-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/deprecation.d.ts","../../node_modules/@typespec/compiler/dist/src/core/diagnostics.d.ts","../../node_modules/@typespec/compiler/dist/src/core/emitter-utils.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@typespec/compiler/dist/src/core/formatter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/numeric.d.ts","../../node_modules/@typespec/compiler/dist/src/core/intrinsic-type-state.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/discriminator-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/location-context.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/operation-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/path-interpolation.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/projected-names-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/string-template-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/syntax-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/usage-resolver.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/index.d.ts","../../node_modules/@typespec/compiler/dist/src/core/param-message.d.ts","../../node_modules/@typespec/compiler/dist/src/core/library.d.ts","../../node_modules/@typespec/compiler/dist/src/core/linter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/node-host.d.ts","../../node_modules/@typespec/compiler/dist/src/core/parser-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/parser.d.ts","../../node_modules/@typespec/compiler/dist/src/core/path-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/projected-program.d.ts","../../node_modules/@typespec/compiler/dist/src/core/scanner.d.ts","../../node_modules/@typespec/compiler/dist/src/core/semantic-walker.d.ts","../../node_modules/@typespec/compiler/dist/src/core/source-file.d.ts","../../node_modules/@typespec/compiler/dist/src/core/type-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/index.d.ts","../../node_modules/@typespec/compiler/dist/src/yaml/types.d.ts","../../node_modules/@typespec/compiler/dist/src/config/types.d.ts","../../node_modules/@typespec/compiler/dist/src/core/options.d.ts","../../node_modules/@typespec/compiler/dist/src/core/state-accessors.d.ts","../../node_modules/@typespec/compiler/dist/src/core/program.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/placeholder.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/types.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/reference-cycle.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/type-emitter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/types.d.ts","../../node_modules/@typespec/compiler/dist/src/config/config-loader.d.ts","../../node_modules/@typespec/compiler/dist/src/config/config-to-options.d.ts","../../node_modules/@typespec/compiler/dist/src/config/index.d.ts","../../node_modules/@typespec/compiler/dist/generated-defs/typespec.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/encoded-names.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/examples.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/service.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/decorators.d.ts","../../node_modules/@typespec/compiler/dist/src/server/language-config.d.ts","../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../node_modules/vscode-jsonrpc/typings/thenable.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messages.d.ts","../../node_modules/vscode-jsonrpc/lib/common/linkedmap.d.ts","../../node_modules/vscode-jsonrpc/lib/common/disposable.d.ts","../../node_modules/vscode-jsonrpc/lib/common/events.d.ts","../../node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts","../../node_modules/vscode-jsonrpc/lib/common/encoding.d.ts","../../node_modules/vscode-jsonrpc/lib/common/ral.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagereader.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagewriter.d.ts","../../node_modules/vscode-jsonrpc/lib/common/connection.d.ts","../../node_modules/vscode-jsonrpc/lib/common/sharedarraycancellation.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagebuffer.d.ts","../../node_modules/vscode-jsonrpc/lib/common/api.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typedefinition.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.workspacefolder.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.colorprovider.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.callhierarchy.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.semantictokens.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.showdocument.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.linkededitingrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.fileoperations.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typehierarchy.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinevalue.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayhint.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinecompletion.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/api.d.ts","../../node_modules/vscode-languageserver/lib/common/progress.d.ts","../../node_modules/vscode-languageserver/lib/common/configuration.d.ts","../../node_modules/vscode-languageserver/lib/common/workspacefolder.d.ts","../../node_modules/vscode-languageserver/lib/common/callhierarchy.d.ts","../../node_modules/vscode-languageserver/lib/common/semantictokens.d.ts","../../node_modules/vscode-languageserver/lib/common/showdocument.d.ts","../../node_modules/vscode-languageserver/lib/common/fileoperations.d.ts","../../node_modules/vscode-languageserver/lib/common/linkededitingrange.d.ts","../../node_modules/vscode-languageserver/lib/common/typehierarchy.d.ts","../../node_modules/vscode-languageserver/lib/common/inlinevalue.d.ts","../../node_modules/vscode-languageserver/lib/common/foldingrange.d.ts","../../node_modules/vscode-languageserver/lib/common/inlayhint.d.ts","../../node_modules/vscode-languageserver/lib/common/diagnostic.d.ts","../../node_modules/vscode-languageserver/lib/common/textdocuments.d.ts","../../node_modules/vscode-languageserver/lib/common/notebook.d.ts","../../node_modules/vscode-languageserver/lib/common/moniker.d.ts","../../node_modules/vscode-languageserver/lib/common/server.d.ts","../../node_modules/vscode-languageserver/lib/common/inlinecompletion.proposed.d.ts","../../node_modules/vscode-languageserver/lib/common/api.d.ts","../../node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts","../../node_modules/@typespec/compiler/dist/src/server/types.d.ts","../../node_modules/@typespec/compiler/dist/src/server/serverlib.d.ts","../../node_modules/@typespec/compiler/dist/src/server/index.d.ts","../../node_modules/@typespec/compiler/dist/src/formatter/index.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/duplicate-tracker.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/misc.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/index.d.ts","../../node_modules/@typespec/compiler/dist/src/index.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/constants.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/generated-defs/azure.clientgenerator.core.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lib.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/linter.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.private.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-info.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-helpers.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/decorators.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/helpers/union-enums.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/prevent-rest-library.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/use-standard-operations.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.private.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/traits.d.ts","../../node_modules/@typespec/http/dist/src/lib.d.ts","../../node_modules/@typespec/http/dist/src/linter.d.ts","../../node_modules/@typespec/http/dist/generated-defs/typespec.http.private.d.ts","../../node_modules/@typespec/http/dist/generated-defs/typespec.http.d.ts","../../node_modules/@typespec/http/dist/src/metadata.d.ts","../../node_modules/@typespec/http/dist/src/http-property.d.ts","../../node_modules/@typespec/http/dist/src/types.d.ts","../../node_modules/@typespec/http/dist/src/auth.d.ts","../../node_modules/@typespec/http/dist/src/content-types.d.ts","../../node_modules/@typespec/http/dist/src/decorators.d.ts","../../node_modules/@typespec/http/dist/src/operations.d.ts","../../node_modules/@typespec/http/dist/src/parameters.d.ts","../../node_modules/@typespec/http/dist/src/private.decorators.d.ts","../../node_modules/@typespec/http/dist/src/responses.d.ts","../../node_modules/@typespec/http/dist/src/route.d.ts","../../node_modules/@typespec/http/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/utils.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/internal-utils.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/interfaces.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/decorators.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/lib.d.ts","../../node_modules/@typespec/versioning/dist/generated-defs/typespec.versioning.d.ts","../../node_modules/@typespec/versioning/dist/src/types.d.ts","../../node_modules/@typespec/versioning/dist/src/decorators.d.ts","../../node_modules/@typespec/versioning/dist/src/projection.d.ts","../../node_modules/@typespec/versioning/dist/src/validate.d.ts","../../node_modules/@typespec/versioning/dist/src/versioning-timeline.d.ts","../../node_modules/@typespec/versioning/dist/src/versioning.d.ts","../../node_modules/@typespec/versioning/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/public-utils.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/types.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/index.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/log-level.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/options.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/emitter.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/lib.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/logger.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/sdk-context-options.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/index.d.ts","../src/emitter.ts","../src/index.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/undici-types/retry-handler.d.ts","../../node_modules/undici-types/retry-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/util.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/eventsource.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/sqlite.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts5.6/index.d.ts"],"fileIdsList":[[226,282,290,332],[283,290,332],[226,290,332],[226,231,232,233,234,235,290,332],[229,230,235,236,237,238,239,242,259,290,332],[226,234,290,332],[226,235,236,290,332],[226,240,241,290,332],[226,258,290,332],[226,228,261,262,290,332],[262,263,264,273,274,290,332],[226,258,260,261,290,332],[226,258,262,290,332],[226,258,261,262,272,290,332],[226,260,262,290,332],[290,329,332],[290,331,332],[290,332,337,367],[290,332,333,338,344,345,352,364,375],[290,332,333,334,344,352],[290,332],[285,286,287,290,332],[290,332,335,376],[290,332,336,337,345,353],[290,332,337,364,372],[290,332,338,340,344,352],[290,331,332,339],[290,332,340,341],[290,332,344],[290,332,342,344],[290,331,332,344],[290,332,344,345,346,364,375],[290,332,344,345,346,359,364,367],[290,327,332,380],[290,327,332,340,344,347,352,364,375],[290,332,344,345,347,348,352,364,372,375],[290,332,347,349,364,372,375],[290,332,344,350],[290,332,351,375,380],[290,332,340,344,352,364],[290,332,353],[290,332,354],[290,331,332,355],[290,329,330,331,332,333,334,335,336,337,338,339,340,341,342,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,357],[290,332,358],[290,332,344,359,360],[290,332,359,361,376,378],[290,332,344,364,365,366,367],[290,332,364,366],[290,332,364,365],[290,332,367],[290,332,368],[290,329,332,364],[290,332,344,370,371],[290,332,370,371],[290,332,337,352,364,372],[290,332,373],[332],[288,289,290,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,352,374],[290,332,347,358,375],[290,332,337,376],[290,332,364,377],[290,332,351,378],[290,332,379],[290,332,337,344,346,355,364,375,378,380],[290,332,364,381],[141,149,290,332],[141,142,149,290,332],[141,150,151,290,332],[139,140,290,332],[104,144,149,290,332],[144,149,290,332],[144,290,332],[114,290,332],[117,144,149,290,332],[104,118,119,120,121,122,123,124,125,290,332],[149,290,332],[105,106,108,109,110,111,112,115,116,117,126,128,129,130,131,132,133,134,135,136,137,138,142,144,149,290,332],[116,139,144,290,332],[127,149,290,332],[111,144,149,290,332],[105,142,143,149,290,332],[139,290,332],[111,149,290,332],[103,108,116,144,146,148,290,332],[139,146,290,332],[144,145,146,147,149,290,332],[139,145,148,290,332],[114,149,290,332],[107,139,152,157,221,222,225,290,332],[117,144,149,153,154,155,156,290,332],[144,149,157,290,332],[144,149,153,290,332],[107,290,332],[158,219,220,290,332],[219,290,332],[139,217,218,290,332],[223,224,290,332],[106,111,149,290,332],[226,277,290,332],[227,276,277,278,279,280,281,290,332],[226,276,290,332],[226,275,276,290,332],[275,290,332],[226,249,290,332],[226,246,249,290,332],[226,247,249,290,332],[243,244,245,247,248,249,250,251,252,253,254,255,256,257,290,332],[226,245,290,332],[226,246,248,290,332],[226,265,266,290,332],[266,267,268,269,271,290,332],[226,266,290,332],[226,266,267,270,290,332],[62,63,67,94,95,97,98,99,101,102,290,332],[60,61,290,332],[60,290,332],[62,102,290,332],[62,63,99,100,102,290,332],[102,290,332],[59,102,103,290,332],[62,63,101,102,290,332],[62,63,65,66,101,102,290,332],[62,63,64,101,102,290,332],[62,63,67,94,95,96,97,98,101,102,290,332],[59,62,63,67,99,101,290,332],[67,102,290,332],[69,70,71,72,73,74,75,76,77,78,102,290,332],[92,102,290,332],[68,79,87,88,89,90,91,93,290,332],[72,102,290,332],[80,81,82,83,84,85,86,102,290,332],[113,290,332],[290,299,303,332,375],[290,299,332,364,375],[290,294,332],[290,296,299,332,372,375],[290,332,352,372],[290,332,382],[290,294,332,382],[290,296,299,332,352,375],[290,291,292,295,298,332,344,364,375],[290,299,306,332],[290,291,297,332],[290,299,320,321,332],[290,295,299,332,367,375,382],[290,320,332,382],[290,293,294,332,382],[290,299,332],[290,293,294,295,296,297,298,299,300,301,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,321,322,323,324,325,326,332],[290,299,314,332],[290,299,306,307,332],[290,297,299,307,308,332],[290,298,332],[290,291,294,299,332],[290,299,303,307,308,332],[290,303,332],[290,297,299,302,332,375],[290,291,296,299,306,332],[290,332,364],[290,294,299,320,332,380,382],[160,161,162,163,164,165,166,167,168,169,170,171,172,290,332],[163,164,290,332],[161,163,164,165,168,169,290,332],[161,167,290,332],[163,290,332],[167,290,332],[161,164,166,167,173,290,332],[161,164,166,167,290,332],[163,166,290,332],[161,165,170,290,332],[159,173,174,196,197,290,332],[173,174,290,332],[173,290,332],[159,173,174,196,290,332],[159,173,174,290,332],[159,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,290,332],[174,196,290,332],[159,174,196,290,332],[198,199,203,212,213,215,216,290,332],[198,215,290,332],[198,212,215,290,332],[198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,290,332],[198,290,332]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee660a1f2acd3d7fc7b28df06c4e2125229666c4d72e5455ae3841bfd222f684","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"20175b94bd9aa2285b3140d8eff67d15b7e67bda225d9e4eef8d98d1ad9fdff0","impliedFormat":99},{"version":"569423c43cfcc3aec4d4f32f188ba01103f0b0da840e3327bd6f301981b592f4","impliedFormat":99},{"version":"2546eb0653f8b3ff203afb5aab17de16b98501295e328e4b02fbe99d003da10f","impliedFormat":99},{"version":"2e8cf7c24be364148c3c0702b0dfb6d706a9c5e5c7813af58ead241eb784f6ec","impliedFormat":99},{"version":"14ae999652dfd8e8ba8d4bfee86be2e468379a4247e5d58abc27be78fd09745e","impliedFormat":99},{"version":"e29f58e8e09108d4d4bb45d4b57a28d9b195e381b0857e9ca235e51ea0d97f9c","impliedFormat":99},{"version":"393fbf2918871b7bf342caee721d168a8a122bddf9d1c1540561f7a1b57f2e52","impliedFormat":99},{"version":"b76a160a84bc82f95c86b3dc4b7a495d53dcbe704f83a1829f7894b457712fc4","impliedFormat":99},{"version":"132e64ba175c5d069dc3229780a99d244d17fa0ad8c123fd68b449357935c4d4","impliedFormat":99},{"version":"2f848b4e660b568651a6350565afc8ac5b0644853a2a863862807602cf244a05","impliedFormat":1},{"version":"6ac85cb2c23dcb52445b268258a7ea36d620054e7db53874d890bb64981ddc13","impliedFormat":1},{"version":"b8f924913b407f41ffa7c4fd46066fe199323d2203d106e164c63760b88ea6be","impliedFormat":99},{"version":"5a23cb53a5e8de12e99766a33421d4e069f58578f2429313a0499c00f7dfe23c","impliedFormat":99},{"version":"018970bd1cd62cb80ad410f2dab15d15775a6f63a9504b5e8d64cb13d766ea08","impliedFormat":99},{"version":"8cbca7868a6662571aa5a8745eeccbdfa59d1f4b03857f1b3d25802fd4f9a32b","impliedFormat":99},{"version":"3d99644caf064bd8ced7365698bb55c7db1b68d82e48dbde9ffd21e503b5d0b2","impliedFormat":99},{"version":"5077b3ba3766f16b30e325ad7d720330c08ef84fc2f6a449826adb006bc581ed","impliedFormat":99},{"version":"4ac79fd5d2a7f056ba1eda188700198f20d32bcab0db09f311d5d5f5d746c2ca","impliedFormat":99},{"version":"a0a61d07fbaecc0b60b5cbde76e0e87c79ac2e1819fe20612bb8f30a56383dbe","impliedFormat":99},{"version":"569edbdf1a3fc773a8289c37ff0d63c9af483a84e704063a3439255b7f377d4f","impliedFormat":99},{"version":"9fe08a940616c1119c99ab5e79308eba7e88de97dfea87e44b95ba82d738eef4","impliedFormat":99},{"version":"ad10612fdbbc90fd9238b854ee39ad38a118cee8ac8979b1194895167168ceb3","impliedFormat":99},{"version":"03c705d7cc25c32907aac3a2bb178997e529eb56bb1ba063b887d18597a2bdda","impliedFormat":99},{"version":"c4b70b3f64ad8f28ce4a5624849cf1bb4f351f5ab8ee2db5c8edc53e85211584","impliedFormat":99},{"version":"cf46f4676dbe929b5320ba322897852e1b8015a43476ce4629fab69f82c12bd1","impliedFormat":99},{"version":"9dadd99afed4a96cf39d9c6ddc6459639cdbd9baeda97721f7fbd77af7517874","impliedFormat":99},{"version":"2b0959130e13998633418b3c425b50276eff966a2ed211c2ffe1c9d8a679ce44","impliedFormat":99},{"version":"55d56ae75b4d57956cc4ddeeefd30780d364b0aa3992e1d7df3d5f8d5fe9acff","impliedFormat":99},{"version":"20002fec9cc7289f9e69c1a95372c97a40db9eea44cd19b1fd0ccc3a8a122345","impliedFormat":99},{"version":"123d94390345afefbdd612f216d40db16c3710338edcb73b5f4be0a4ad539aa4","impliedFormat":99},{"version":"1264211b19f3c465b98afccd58fabac6e5e146ee6d849fcf63ddb33fd78720f1","impliedFormat":99},{"version":"f8a298d831ed8ca73a8dc9d5780817a7720ba9894042a69356a75c5e5f8c6893","impliedFormat":99},{"version":"2c6d27c8baadb60b734b8db829df8d12f58345402180ff88642ff5c1388cdf13","impliedFormat":99},{"version":"44d4f46fdd99e11b1f9f1e634b8f2881012c3501c04b07227d83502fb09ea548","impliedFormat":99},{"version":"3f4eef14851f0eadca50c74dd917aaf86124463cfc1cf5bc92e9831714c9910b","impliedFormat":99},{"version":"bdea99de0c771ba2b6aa7d0d83ecf7d3fb26b25314d32d63af6909d107df7c00","impliedFormat":99},{"version":"a6b6ed49a87b2a5690f61463b05d364af1bb39cc8472047691b921923e6ac9c9","impliedFormat":99},{"version":"d7f8c331cc75c67d3da42891e8532a9c869f961ed5d8dfbbe7d0ba35056cfcfb","impliedFormat":99},{"version":"8151e6cb5e10df668b741859300b99e32e18abcffaf2be101c4c2a6536f3442b","impliedFormat":99},{"version":"e96945cee95fede7ee90c31b805bc159562de0d88eb609d64b8d58855bf217b1","impliedFormat":99},{"version":"2d758a247ac13ae52ddecc90888a9a5fbd5b2640443078fb29cc8c312870cb74","impliedFormat":99},{"version":"da7ef8056b01283adea3ca6de1dabfd428b439d6050a75602f1e30f48eb6efdf","impliedFormat":99},{"version":"1594151e41321f9180c1451a1650631e06b1db7ffe5639c7edb6275c512b2f51","impliedFormat":99},{"version":"da9c0be46b2da7d84a03db79ae33edcd7388bd35c388b99ec37368aa1729e778","impliedFormat":99},{"version":"fce174b4613b3b31fe82b778e0e2c3a7fa0b41f8ced9b231b1a8c5a05c8b54f9","impliedFormat":99},{"version":"53e19706bab98ca4bfa4b42c783115fa2741c0483cc345e4f7e710d558200a1c","impliedFormat":99},{"version":"2d3045c2fdabdcb0ec2ec439868e2631d68bdea368750fa58170d016c0d06572","impliedFormat":99},{"version":"0ad7175d8390859cc77b9b1560fdd10a18990c189675abca18f65992b8507742","impliedFormat":99},{"version":"ad3d8bb2ac79fbda7222abb647e260914f6e6f2ed988f7db8acc62a44d78f448","impliedFormat":99},{"version":"1f37f596f1f6c032d3786baf43edb6c9aed3935eaf457fdb58d581794a8e7c52","impliedFormat":99},{"version":"41b5774912c8d91f1b3b84ddd2aad499e926477100855180512e9954dc02103d","impliedFormat":99},{"version":"fa58422ab7be615763761b87694a2994522ec1332276ef49df5e0a3287eb2c59","impliedFormat":99},{"version":"91128a15b91060cfde42e9d30dfee6c2f7b6887a4162b0e03ebd2471c7bdaeab","impliedFormat":99},{"version":"eee4060428d6fe35733db1ec1a630901d0cb99dbd27bb17eaf836c2cab52c361","impliedFormat":99},{"version":"dbb312aedcf0ce06467366f096ec6591b4c0f0d956137dd49c35a9b20bb90be7","impliedFormat":99},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6","impliedFormat":1},{"version":"cab0ba78dc961d90d639ccaf3d56c484e584056da39dc0d9bdaf1957be965f72","impliedFormat":1},{"version":"f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1","impliedFormat":1},{"version":"886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1","impliedFormat":1},{"version":"392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2","impliedFormat":1},{"version":"e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4","impliedFormat":1},{"version":"2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a","impliedFormat":1},{"version":"3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43","impliedFormat":1},{"version":"b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5","impliedFormat":1},{"version":"2ff2789ae43f9c056917e7516a02ad07c4cc1cafff3c68ff6b7ff8df623fd259","impliedFormat":1},{"version":"13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469","impliedFormat":1},{"version":"4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177","impliedFormat":1},{"version":"d576ef1b6aa804d0f0e8dfb3f6149b576788b598054aa2e15d5a7f7f52faf371","impliedFormat":1},{"version":"5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e","impliedFormat":1},{"version":"bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999","impliedFormat":1},{"version":"eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc","impliedFormat":1},{"version":"05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d","impliedFormat":1},{"version":"00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa","impliedFormat":1},{"version":"33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a","impliedFormat":1},{"version":"45f441bf74e920f6909ca6874037fdd10f06644c341b99fd7cfd041ea565ce1f","impliedFormat":1},{"version":"f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67","impliedFormat":1},{"version":"b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f","impliedFormat":1},{"version":"96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04","impliedFormat":1},{"version":"29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348","impliedFormat":1},{"version":"9381d5bdf7197cc4f732243e22762d27508daf7fcab0fff7339fe4660c11f382","impliedFormat":1},{"version":"0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6","impliedFormat":1},{"version":"818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f","impliedFormat":1},{"version":"77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079","impliedFormat":1},{"version":"80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917","impliedFormat":1},{"version":"daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe","impliedFormat":1},{"version":"6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4","impliedFormat":1},{"version":"656106ddbe4e00bd32af2c46abb1a8c9abbb8679fbf29adc637c053620286034","impliedFormat":1},{"version":"ddf3f680de453b300dd1c47e136b8ade3857d2c357635efeb0f9977d81d1e96d","impliedFormat":1},{"version":"dfc345d92b6d08863b239b8d025ea513df322af74e221d62f4bdbe217d08f69d","impliedFormat":1},{"version":"7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5","impliedFormat":1},{"version":"2f3aa6fb84e6955886902a6a8818e4bff9c79b97356773bd6ac2ff3993c097a2","impliedFormat":1},{"version":"c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e","impliedFormat":1},{"version":"08724e39439dbc02bdba9768f84736ed132bb02a04fbce0a2cdfc91f42e90505","impliedFormat":1},{"version":"f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3","impliedFormat":1},{"version":"7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc","impliedFormat":1},{"version":"1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e","impliedFormat":1},{"version":"46a9b0122b230cb2fab65999ba92f98a16fd8f1c25efaed47141cbf5056f6928","impliedFormat":1},{"version":"5a9a4741aa510bdee406441f77186c6d2005be78e78c2e0da8201d9991950164","impliedFormat":1},{"version":"351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02","impliedFormat":1},{"version":"3990ae796cc23fb9829eae206eff1eddded9465504467a4433f2509e18ef1aed","impliedFormat":1},{"version":"b557ea3605e52406e35eeea468cb96f25b1ca906f2055f376597f0b02492d94c","impliedFormat":1},{"version":"f384bb303dbc114af6460e7cb30b766cc92eed33fccb331126b08bb63f15a034","impliedFormat":1},{"version":"8a9bd1cf8c1f75435f83595b43737c135e7f73bde39ba4c9339dc6a31e8bb069","impliedFormat":1},{"version":"aa7747ab234b18813944ecdd61683a696025cd4f6970d7749d370080d4f9b349","impliedFormat":1},{"version":"8274bfd5de49f9f072be2f39c34e390101a8b69844e55eda36c7df23ba6d03e2","impliedFormat":1},{"version":"f8b482dddda55dd6677d7895a3fef8cd9d067f8c36c63cc7fe93b82a6dd4f10c","impliedFormat":1},{"version":"71d11ad1f05b0b90e95591fa85c1c8043e590d67972dcaba9b50435a0c04d8fa","impliedFormat":1},{"version":"5c74e3eee30bb7899eebe784e3c05cb29f1bed3efb2a3b4599b66173fda4aa30","impliedFormat":1},{"version":"a980ce9470dc95ac355d7efb729f9cfb0564505eba96da4bbde504299efb833a","impliedFormat":1},{"version":"72a33e518e5b98cd9c9dc8ee294f7507bf2a8938f491b0cf49c8ae582b966b3a","impliedFormat":1},{"version":"173838811f6dcba587706efd87358f804261549bc02c455d31818328c1af97ad","impliedFormat":1},{"version":"483ff04f1796aef40323f47ca3f03bf53492a2878508c8d7be98cdb4fae151f3","impliedFormat":1},{"version":"96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8","impliedFormat":99},{"version":"8b539ac8d500541d0e3187289173cbcfbbc86db438bc85de5ad5c14c66b8b8ab","impliedFormat":99},{"version":"4b7146e52c8d053b59b7e36919277a8555e7336125d3e0694d5c3adfcb8d9677","impliedFormat":99},{"version":"ba8404bc98c12f5f7a7edfa58fefafe96407e9b093175b5a3c75c34222b47e90","impliedFormat":99},{"version":"28179ea30b38d6ff478cfa140b14d57a83dc8a06f757bc23e73a30ed47d0ca0f","impliedFormat":99},{"version":"c8f1ce646847bf83be0d7e1d8cbbbb88c23e981509b4a266abb9d587b0a54d7e","impliedFormat":99},{"version":"21d0b7b23d86f12e8f8d209a82a3cf0f3f62df1d672c96f6efd43762c0e6d2e2","impliedFormat":99},{"version":"810c4e62a3f9a42ae3de9fbe57af2491bb0e0c4bec7e1410038a9e7111e47de3","impliedFormat":99},{"version":"be2eb42d9ddb54d0d682dd87b42dbe3cda0e3c7f146d03f0353b5ad366eead99","impliedFormat":99},{"version":"747d42460a4d2499f375e0dfa8003083b4b07cb5d1dd098a2c3e0f60e40fdc83","impliedFormat":99},{"version":"2392d906004cabc1033218185197a33dcf520f702e3dc89f5191ccc7fda63288","impliedFormat":99},{"version":"727dae6886965cfb6eb6a8446a52d6fa7b9ce7ef3e77f7dc0f1c9dd61d6e9db8","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"f21c1d0fb038d3dc2095c4bf3d28cb7b29d3b8e0cf5035ffa7f14de31603519d","impliedFormat":99},{"version":"ee7df4b493f02e971e1fffcc65389fae19540b302c7910d1c2534d83b8ddd492","impliedFormat":99},{"version":"d0c2705cb94e79403b989ed6d18559066c78028df55d7405ca5d1c1e47f458be","impliedFormat":99},{"version":"5ad19cf7f3b94b481a3d964cfe024bca5fbe1e3483ecb836770f005ce80906f6","impliedFormat":99},{"version":"e7e6c7a2173ee2db09e2e04eaa0f3a259b19d31ed10630a1eb3201a6f3d1d943","impliedFormat":99},{"version":"ebf027d9b2843413e165c6702631de9e3e631110d2fc3f1f2b720f0d89f28e8d","impliedFormat":99},{"version":"1f409d73efb6298d982522631a502dcb544527b9bbf784e64aaeb6731e0c38b4","impliedFormat":99},{"version":"b7d8407bc0e426611e6145c048da4127cb200af601afb5b37ea4d406c36ac7a0","impliedFormat":99},{"version":"6edcd53e85c098dd72671dd68681d136a2abaa7db6fd78dc0f5a7cec23ced1cb","impliedFormat":99},{"version":"20d691e94845972e20af7c36bdf9e0a19cfba0c08559eb061cb5cfc65f54aec0","impliedFormat":99},{"version":"c35f4c0fe4b2bcecd2b9949e6d19807646cca497a81de58835de0d9249706890","impliedFormat":99},{"version":"04e33114a8787b2e31820b623b3b7cbeddfb2932cb9dec929f6caf5748a336fc","impliedFormat":99},{"version":"553fae9b7f99936b03e3af051eafc5e333fed73b13b7eb22886e9ff228298f7d","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"8b483f1d5c3db362aec5c4fd3ad87e7c0a5156cd548ed78943dbf6199d83cc65","impliedFormat":99},{"version":"077ef86987d5799a71885e6ef8006bcfd010c3d218f0570dfb579fc7d5b297bb","impliedFormat":99},{"version":"7f01966517764fa45526548d19e70c497f9fb2c7047e12dfc4a5e72abbaacf61","impliedFormat":99},{"version":"ac3248aed990c8a3a48a52348848a8744e381daa11faccfe458dc934f53c332a","impliedFormat":99},{"version":"ce39c5b11413ac0ad29b5e24dc58ce2ac5f7669824f8cf0c27db4d46c7201f6c","impliedFormat":99},{"version":"ac1f4bd17b76e5a1d9846a9fb44c64055a88b74328cf114cdbe0135ed0698f8a","impliedFormat":99},{"version":"afc0d0b3e8660c6d20eeafd547c6c6dbea8a427b33c78589edf7769982e06d90","impliedFormat":99},{"version":"bd91c4480739f1f9108943e98d1621c0c981dae09317546ae8883ed7238386bc","impliedFormat":99},{"version":"0eb7f661a7ee64ba1555b1bb67cd19e91feb1bb63c3e260287eb9e41e159149b","impliedFormat":99},{"version":"b2ee4cbf69c22cdca64bf5be994b9f13f03c55ac769306c9e54df0762143d871","impliedFormat":99},{"version":"22b8ebcd4b20d180bec4e6330dd3c512d7f1c9e95fd878c2803cffb4dfb30602","impliedFormat":99},{"version":"deb1cdfa833ebc90eaea0b9b5810435a71eb12cfca8c093b9d336d735090d3f3","impliedFormat":99},{"version":"bccc77ada6e255a7fe88a81d5142599162f39c6d0e4eb2db5b69479689d315e9","impliedFormat":99},{"version":"bb763fce8236a9ed6b4fed01e7fccbdb63cddadd31569b96d676312982d072de","impliedFormat":99},{"version":"561fba8ad92671d1659887128fce766222ee9142450bd9b7ca78309bdb1aa2d2","impliedFormat":99},{"version":"1e85ca8e917181d22ce326a848cdbb25084bb3862e28282acef9b526311a60f6","impliedFormat":99},{"version":"6a061c442221bee297cb40c449096a3f3e9658745dd22adb5f6b5b05c4ca2351","impliedFormat":99},{"version":"aba7f8c7184234d25ce120a318aa691ac4285beb9fc8d3469e953282c1470366","impliedFormat":99},{"version":"e8eee85aa72a5c89fa648a4f3b2ede7cbe0891fdac1b8011c64620f58fd6f597","impliedFormat":99},{"version":"2af4a88477b1976d3adbb0e3d8167b8ba65bd44cd74bdb1fa9adb6e242c8f262","impliedFormat":99},{"version":"263ee2cf227e5e413db0ee262148e5b24bb536de189f12ee46de9524dfe6963e","impliedFormat":99},{"version":"b256fe8ccd0e7fe17007ed91436d84bd5ecf64c743f3f4a62b68fa27fc232be7","impliedFormat":99},{"version":"8a5c1e06742772f71deadc308e709b975d68cf2bbc1fe56632c26550f1b85165","impliedFormat":99},{"version":"7d1bc217b21ef4ccabb50d3d1c875d384ba3ab1d0b71c6e517aeace24dc104ae","impliedFormat":99},{"version":"6b6308a789a6a589bb8e5c8e0f94306760308101348bbf46f13dc11a1fe9dd36","impliedFormat":99},{"version":"b8c6a521d556cc88b2a64f73bdbf54997a0d6568d6019e5cf53922f713869da1","impliedFormat":99},{"version":"202b1636ede916b4a0ad281a5939d631cd9b3b43468edbf072a53336eb76680a","impliedFormat":99},{"version":"ffacab3ae62bf33b92464efcd56f06be51106f9d51141102e3b6056612d61d43","impliedFormat":99},{"version":"fe7f8552472c0e0ac4a17f5e8f9e94e019f4df67e6b72fa35f6600fbe4384dcc","impliedFormat":99},{"version":"7e0a07c9f6fa7696bf39ba6c79d4b403ac73498a5eeddc5900f48538d1a2e337","impliedFormat":99},{"version":"560c8f2ff220c1fc92086da7938552728a4ee4c4ee38686fb1d3eaf4b6054104","impliedFormat":99},{"version":"b032ad87d6183fe1d849875122bb38b0450dc4adfaaa839097004b33ff891316","impliedFormat":99},{"version":"f637dd887bd0b1c7ed77968d7d60669b7fa01332e28043a43f1e92aaaa5c8cfe","impliedFormat":99},{"version":"2f08e1bb5d79277daab5cf12140d867888c22644b222085b3d50c87bf0e2f3e3","impliedFormat":99},{"version":"e18f718f896c53544a78bc798f48716c407ac2ee0b57885e20deaecaad6961d0","impliedFormat":99},{"version":"ac5fcea94fb43d7ea712642e3e35969c6d2d58b2855adc092807ffc82690f630","impliedFormat":99},{"version":"743f6fb5f1a440cd135f37d86c592feb9a168dd3cd4390853f2c1e8b8a374ded","impliedFormat":99},{"version":"2d5c87a908b98ee3eb04eaf41b4da69e5e8b9b9be0e721d7211b76821e97c20b","impliedFormat":99},{"version":"824111d95e81928bc58d70f48ab079f89974d9fb21a830eed24666b76fdb00cb","signature":"c90c5b60fb6323470867433f363c7d8cdcddfdb2090503c414ac0db456618eae","impliedFormat":99},{"version":"508db3320ff3d35adca421703ce8be7709ae2c54d44d6b631cc34a58c8de1b58","signature":"cb04f3ecd5e93359b3dc6715efbda93b05c3d23d02a457d092fce36a7dd696da","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"46e07db372dd75edc1a26e68f16d1b7ffb34b7ab3db5cdb3e391a3604ad7bb7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"20b97c3368b1a63d2156deea35d03b125bb07908906eb35e0438042a3bbb3e71","impliedFormat":1},{"version":"02e73584132025781e9ffa7beef9d58ee563954c592eb563dc724ebbfb7424eb","impliedFormat":1},{"version":"ad05f01340829d96e2d85506eaab585ca7a5b20d687448d35f97e2b0855399d8","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"8257c55ff6bff6169142a35fce6811b511d857b4ae4f522cdb6ce20fd2116b2c","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"5990bd8b9bc91f6e90269685ff5a154eeda52c18238f89f0101fb4d08cd80476","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"4de73e132bf47437c56b1e8416c60d9d517c8ba3822e7c623b54d4300834dd37","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"cdb781940d24f57752615cc37d2b975b45906f386e2e5344700156fd2fb74efc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"f59493f68eade5200559e5016b5855f7d12e6381eb6cab9ad8a379af367b3b2d","impliedFormat":1},{"version":"125e3472965f529de239d2bc85b54579fed8e0b060d1d04de6576fb910a6ec7f","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6512c499b32226c5a686ab98f5b33ae15bdebd6b9f3b60f80eeadd95e358f02c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","impliedFormat":1}],"root":[283,284],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"module":100,"newLine":1,"noEmitHelpers":false,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"../../dist/emitter","rootDir":"../src","sourceMap":true,"strict":true,"stripInternal":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[283,1],[284,2],[233,3],[231,3],[232,3],[240,3],[241,3],[236,4],[237,3],[260,5],[229,3],[230,3],[235,6],[234,7],[238,3],[239,3],[242,8],[259,9],[228,3],[263,10],[275,11],[262,12],[261,13],[264,3],[273,14],[274,15],[329,16],[330,16],[331,17],[332,18],[333,19],[334,20],[285,21],[288,22],[286,21],[287,21],[335,23],[336,24],[337,25],[338,26],[339,27],[340,28],[341,28],[343,29],[342,30],[344,31],[345,32],[346,33],[328,34],[347,35],[348,36],[349,37],[350,38],[351,39],[352,40],[353,41],[354,42],[355,43],[356,44],[357,45],[358,46],[359,47],[360,47],[361,48],[362,21],[363,21],[364,49],[366,50],[365,51],[367,52],[368,53],[369,54],[370,55],[371,56],[372,57],[373,58],[290,59],[289,21],[382,60],[374,61],[375,62],[376,63],[377,64],[378,65],[379,66],[380,67],[381,68],[153,3],[150,69],[151,70],[152,71],[141,72],[105,73],[109,74],[110,74],[111,74],[112,75],[115,76],[118,77],[126,78],[119,74],[120,79],[121,21],[122,74],[123,79],[124,21],[104,79],[125,79],[139,80],[117,81],[128,82],[129,83],[130,79],[116,21],[142,69],[127,79],[131,79],[132,79],[133,21],[144,84],[134,85],[135,86],[136,74],[137,79],[143,79],[138,74],[149,87],[145,21],[147,88],[148,89],[146,90],[222,91],[226,92],[157,93],[154,74],[155,94],[156,95],[106,21],[108,96],[221,97],[158,21],[220,98],[219,99],[107,21],[223,21],[225,100],[224,101],[140,79],[227,21],[278,102],[282,103],[279,3],[276,21],[280,104],[277,105],[281,106],[246,3],[245,3],[250,107],[251,3],[252,108],[248,109],[258,110],[243,3],[244,3],[247,107],[253,107],[254,107],[255,111],[256,107],[257,107],[249,112],[265,3],[267,113],[272,114],[268,3],[266,3],[269,3],[270,115],[271,116],[103,117],[60,21],[62,118],[61,119],[66,120],[101,121],[98,122],[100,123],[63,122],[64,124],[68,124],[67,125],[65,126],[99,127],[97,122],[102,128],[95,21],[96,21],[69,129],[74,122],[76,122],[71,122],[72,129],[78,122],[79,130],[70,122],[75,122],[77,122],[73,122],[93,131],[92,122],[94,132],[88,122],[90,122],[89,122],[85,122],[91,133],[86,122],[87,134],[80,122],[81,122],[82,122],[83,122],[84,122],[59,21],[113,21],[114,135],[57,21],[58,21],[10,21],[12,21],[11,21],[2,21],[13,21],[14,21],[15,21],[16,21],[17,21],[18,21],[19,21],[20,21],[3,21],[21,21],[4,21],[22,21],[26,21],[23,21],[24,21],[25,21],[27,21],[28,21],[29,21],[5,21],[30,21],[31,21],[32,21],[33,21],[6,21],[37,21],[34,21],[35,21],[36,21],[38,21],[7,21],[39,21],[44,21],[45,21],[40,21],[41,21],[42,21],[43,21],[8,21],[49,21],[46,21],[47,21],[48,21],[50,21],[9,21],[51,21],[52,21],[53,21],[56,21],[54,21],[55,21],[1,21],[306,136],[316,137],[305,136],[326,138],[297,139],[296,140],[325,141],[319,142],[324,143],[299,144],[313,145],[298,146],[322,147],[294,148],[293,141],[323,149],[295,150],[300,151],[301,21],[304,151],[291,21],[327,152],[317,153],[308,154],[309,155],[311,156],[307,157],[310,158],[320,141],[302,159],[303,160],[312,161],[292,162],[315,153],[314,151],[318,21],[321,163],[173,164],[165,165],[170,166],[163,21],[166,167],[164,168],[162,21],[172,169],[168,170],[161,21],[169,171],[167,172],[171,173],[160,21],[198,174],[197,175],[174,176],[184,177],[179,177],[178,178],[196,179],[181,177],[193,177],[188,178],[180,177],[175,177],[192,177],[195,177],[191,177],[187,177],[189,180],[194,181],[183,178],[182,177],[185,177],[186,178],[176,177],[190,177],[177,178],[218,21],[159,21],[217,182],[202,183],[200,183],[211,183],[205,183],[209,183],[210,183],[216,183],[208,183],[206,183],[214,183],[213,184],[199,183],[203,183],[215,185],[204,183],[212,186],[207,183],[201,183]],"latestChangedDtsFile":"../../dist/emitter/index.d.ts","version":"5.6.3"} \ No newline at end of file diff --git a/.plugin/generator/OpenAI.Library.Plugin.sln b/.plugin/generator/OpenAI.Library.Plugin.sln new file mode 100644 index 000000000..7a42a25de --- /dev/null +++ b/.plugin/generator/OpenAI.Library.Plugin.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Library.Plugin", "src\OpenAI.Library.Plugin.csproj", "{E46178E4-F3F0-4E2F-8D42-A7F021B23E63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E46178E4-F3F0-4E2F-8D42-A7F021B23E63}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj new file mode 100644 index 000000000..0f994714f --- /dev/null +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin + true + + + + + + + + + + + + + + + + diff --git a/.plugin/generator/src/OpenAILibraryPlugin.cs b/.plugin/generator/src/OpenAILibraryPlugin.cs new file mode 100644 index 000000000..21d81fd68 --- /dev/null +++ b/.plugin/generator/src/OpenAILibraryPlugin.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.Composition; +using Microsoft.Generator.CSharp; +using Microsoft.Generator.CSharp.ClientModel; + +namespace OpenAILibraryPlugin +{ + [Export(typeof(CodeModelPlugin))] + [ExportMetadata("PluginName", nameof(OpenAILibraryPlugin))] + public class OpenAILibraryPlugin : ClientModelPlugin + { + [ImportingConstructor] + public OpenAILibraryPlugin(GeneratorContext context) : base(context) { } + + public override void Configure() + { + base.Configure(); + AddVisitor(new OpenAILibraryVisitor()); + } + } +} \ No newline at end of file diff --git a/.plugin/generator/src/OpenAILibraryVisitor.cs b/.plugin/generator/src/OpenAILibraryVisitor.cs new file mode 100644 index 000000000..7908e6493 --- /dev/null +++ b/.plugin/generator/src/OpenAILibraryVisitor.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Generator.CSharp.ClientModel; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Providers; +using Microsoft.Generator.CSharp.Snippets; +using Microsoft.Generator.CSharp.Statements; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace OpenAILibraryPlugin +{ + public class OpenAILibraryVisitor : ScmLibraryVisitor + { + private const string RawDataPropertyName = "SerializedAdditionalRawData"; + private const string AdditionalPropertiesFieldName = "_additionalBinaryDataProperties"; + private const string SentinelValueFieldName = "_sentinelValue"; + private const string WritePropertyNameMethodCall = "WritePropertyName(\""; + private const string ModelSerializationExtensionsTypeName = "ModelSerializationExtensions"; + private const string IsSentinelValueMethodName = "IsSentinelValue"; + private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore"; + + protected override TypeProvider Visit(TypeProvider type) + { + if (type is ModelProvider { BaseModelProvider: null }) + { + // Add an internal AdditionalProperties property to all base models + var additionalPropertiesField = type.Fields.Single(f => f.Name == AdditionalPropertiesFieldName); + var properties = new List(type.Properties) + { + new PropertyProvider($"", MethodSignatureModifiers.Internal, + typeof(IDictionary), RawDataPropertyName, + new ExpressionPropertyBody( + additionalPropertiesField, + type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly) ? null : additionalPropertiesField.Assign(Value)), + type) + }; + + type.Update(properties: properties); + } + else if (type.Name == ModelSerializationExtensionsTypeName) + { + // Add a static BinaryData field representing the sentinel value + var sentinelValueField = new FieldProvider( + FieldModifiers.Private | FieldModifiers.Static | FieldModifiers.ReadOnly, + typeof(BinaryData), + SentinelValueFieldName, + type, + $"", + BinaryDataSnippets.FromBytes(LiteralU8("\"__EMPTY__\"").Invoke("ToArray"))); + var fields = new List(type.Fields) + { + sentinelValueField + }; + + // Add the IsSentinelValue method + var valueParameter = new ParameterProvider("value", $"", typeof(BinaryData)); + var methods = new List(type.Methods) + { + new MethodProvider( + new MethodSignature( + IsSentinelValueMethodName, + $"", + MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static, + typeof(bool), + $"", + [valueParameter]), + new[] + { + Declare("sentinelSpan", typeof(ReadOnlySpan), sentinelValueField.As().ToMemory().Property("Span"), out var sentinelVariable), + Declare("valueSpan", typeof(ReadOnlySpan), valueParameter.As().ToMemory().Property("Span"), out var valueVariable), + Return(sentinelVariable.Invoke("SequenceEqual", valueVariable)) + }, + type) + }; + + type.Update(fields: fields, methods: methods); + } + return type; + } + + protected override FieldProvider Visit(FieldProvider field) + { + // Make the backing additional properties field not be read only as long as the type is not readonly. + if (field.Name == AdditionalPropertiesFieldName && !field.EnclosingType.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly)) + { + field.Modifiers &= ~FieldModifiers.ReadOnly; + } + return field; + } + + protected override MethodProvider Visit(MethodProvider method) + { + if (method.Signature.Name != JsonModelWriteCoreMethodName) + { + return method; + } + + // If there are no body statements, return the method as is + if (method.BodyStatements == null) + { + return method; + } + + // If the body statements are not MethodBodyStatements, return the method as is + if (method.BodyStatements is not MethodBodyStatements statements) + { + return method; + } + + var updatedStatements = new List(); + var flattenedStatements = Flatten(statements).ToArray(); + + for (int line = 0; line < flattenedStatements.Length; line++) + { + var statement = flattenedStatements[line]; + + if (statement is IfStatement ifStatement) + { + var body = ifStatement.Body.ToDisplayString(); + + // If we already have an if statement that contains property writing, we need to add the condition to the existing if statement + if (body.Contains(WritePropertyNameMethodCall)) + { + ifStatement.Condition = ifStatement.Condition.As().And(GetContainsKeyCondition(body)); + } + + // Handle writing AdditionalProperties + else if (Flatten(ifStatement.Body).First() is ForeachStatement foreachStatement) + { + foreachStatement.Body.Insert( + 0, + new IfStatement( + Static(new ModelSerializationExtensionsDefinition().Type).Invoke( + IsSentinelValueMethodName, + foreachStatement.ItemVariable.Property("Value"))) + { + Continue + }); + } + + updatedStatements.Add(ifStatement); + continue; + } + + var displayString = statement.ToDisplayString(); + if (displayString.Contains(WritePropertyNameMethodCall)) + { + var ifSt = new IfStatement(GetContainsKeyCondition(displayString)) { statement }; + + // If this is a plain expression statement, we need to add the next statement as well which + // will either write the property value or start writing an array + if (statement is ExpressionStatement) + { + ifSt.Add(flattenedStatements[++line]); + // Include array writing in the if statement + if (flattenedStatements[line + 1] is ForeachStatement) + { + // Foreach + ifSt.Add(flattenedStatements[++line]); + // End array + ifSt.Add(flattenedStatements[++line]); + } + } + updatedStatements.Add(ifSt); + } + else + { + updatedStatements.Add(statement); + } + } + + method.Update(bodyStatements: updatedStatements); + return method; + } + + private static ScopedApi GetContainsKeyCondition(string displayString) + { + var propertyName = displayString.Split('"')[1]; + return This.Property(AdditionalPropertiesFieldName) + .NullConditional() + .Invoke("ContainsKey", Literal(propertyName)).NotEqual(True); + } + + private IEnumerable Flatten(MethodBodyStatement bodyStatement) + { + if (bodyStatement is MethodBodyStatements statements) + { + foreach (var statement in statements.Statements) + { + foreach (var subStatement in Flatten(statement)) + { + yield return subStatement; + } + } + } + else + { + yield return bodyStatement; + } + } + } +} diff --git a/.plugin/package-lock.json b/.plugin/package-lock.json new file mode 100644 index 000000000..5675f6f80 --- /dev/null +++ b/.plugin/package-lock.json @@ -0,0 +1,3588 @@ +{ + "name": "@open-ai/plugin", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@open-ai/plugin", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@azure-tools/cadl-ranch-expect": "latest", + "@open-ai/plugin": "file:", + "@typespec/http-client-csharp": "latest" + }, + "devDependencies": { + "@types/node": "^22.8.1", + "@vitest/coverage-v8": "^1.4.0", + "@vitest/ui": "^1.4.0", + "c8": "^9.1.0", + "copyfiles": "^2.4.1", + "rimraf": "~5.0.5", + "typescript": "^5.6.3", + "vitest": "^1.4.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@azure-tools/cadl-ranch-expect": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-expect/-/cadl-ranch-expect-0.15.5.tgz", + "integrity": "sha512-7tr/FIDeFCJnDjEQ7J/A2MKmnmYrJBlTS7y9XjsWpJLC/fpB3lyvDvVYlsFmeO5dmnRc3+B4eEoWgWx46r3auA==", + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/rest": "~0.61.0", + "@typespec/versioning": "~0.61.0" + } + }, + "node_modules/@azure-tools/typespec-azure-core": { + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.47.0.tgz", + "integrity": "sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/rest": "~0.61.0" + } + }, + "node_modules/@azure-tools/typespec-client-generator-core": { + "version": "0.47.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.3.tgz", + "integrity": "sha512-13knZRDFBlVTw61vbhAnvQzttnqPRwHK0+YI/3QbYRN77j/Kv3zXFPeCcromz31exg3Y/Q8qD24mJ1Oikab2mA==", + "peer": true, + "dependencies": { + "change-case": "~5.4.4", + "pluralize": "^8.0.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "~0.47.0", + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/openapi": "~0.61.0", + "@typespec/rest": "~0.61.0", + "@typespec/versioning": "~0.61.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "peer": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", + "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", + "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@open-ai/plugin": { + "resolved": "", + "link": true + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.2.tgz", + "integrity": "sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.2.tgz", + "integrity": "sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.2.tgz", + "integrity": "sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.2.tgz", + "integrity": "sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.2.tgz", + "integrity": "sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.2.tgz", + "integrity": "sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.2.tgz", + "integrity": "sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.2.tgz", + "integrity": "sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.2.tgz", + "integrity": "sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.2.tgz", + "integrity": "sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.2.tgz", + "integrity": "sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.2.tgz", + "integrity": "sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.2.tgz", + "integrity": "sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.2.tgz", + "integrity": "sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.2.tgz", + "integrity": "sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.2.tgz", + "integrity": "sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.2.tgz", + "integrity": "sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.2.tgz", + "integrity": "sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/node": { + "version": "22.8.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", + "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.8" + } + }, + "node_modules/@typespec/compiler": { + "version": "0.61.2", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.61.2.tgz", + "integrity": "sha512-6QxYJd09VWssd/BvY+8eBxTVv085s1UNK63FdPrgT2lgI+j8VMMcpNR9m5l1zWlgGDM7sniA/Or8VCdVA6jerg==", + "peer": true, + "dependencies": { + "@babel/code-frame": "~7.24.7", + "ajv": "~8.17.1", + "change-case": "~5.4.4", + "globby": "~14.0.2", + "mustache": "~4.2.0", + "picocolors": "~1.1.0", + "prettier": "~3.3.3", + "prompts": "~2.4.2", + "semver": "^7.6.3", + "temporal-polyfill": "^0.2.5", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.5.1", + "yargs": "~17.7.2" + }, + "bin": { + "tsp": "cmd/tsp.js", + "tsp-server": "cmd/tsp-server.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@typespec/http": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.61.0.tgz", + "integrity": "sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/streams": "~0.61.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } + } + }, + "node_modules/@typespec/http-client-csharp": { + "version": "0.1.9-alpha.20241028.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241028.1.tgz", + "integrity": "sha512-3EOunnP/pwqz6t0q6T0BApOEZ/pBdwopDqQKf1HisFSA8BDX9ttPmde7+Hb72MamX/iLejaQnUGsxHMF0j7Vnw==", + "dependencies": { + "json-serialize-refs": "0.1.0-0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0 || ~0.48.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.47.1 <1.0.0 || ~0.48.0-0", + "@typespec/compiler": ">=0.61.2 <1.0.0 || ~0.62.0-0", + "@typespec/http": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/openapi": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/rest": ">=0.61.0 <1.0.0 || ~0.62.0-0", + "@typespec/versioning": ">=0.61.0 <1.0.0 || ~0.62.0-0" + } + }, + "node_modules/@typespec/openapi": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.61.0.tgz", + "integrity": "sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" + } + }, + "node_modules/@typespec/rest": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.61.0.tgz", + "integrity": "sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" + } + }, + "node_modules/@typespec/versioning": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.61.0.tgz", + "integrity": "sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0" + } + }, + "node_modules/@vitest/coverage-v8": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz", + "integrity": "sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@bcoe/v8-coverage": "^0.2.3", + "debug": "^4.3.4", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.4", + "istanbul-reports": "^3.1.6", + "magic-string": "^0.30.5", + "magicast": "^0.3.3", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "test-exclude": "^6.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": "1.6.0" + } + }, + "node_modules/@vitest/expect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.6.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/ui": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-1.6.0.tgz", + "integrity": "sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.6.0", + "fast-glob": "^3.3.2", + "fflate": "^0.8.1", + "flatted": "^3.2.9", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "sirv": "^2.0.4" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": "1.6.0" + } + }, + "node_modules/@vitest/utils": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "peer": true + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/copyfiles/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/copyfiles/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "peer": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "peer": true, + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "peer": true + }, + "node_modules/json-serialize-refs": { + "version": "0.1.0-0", + "resolved": "https://registry.npmjs.org/json-serialize-refs/-/json-serialize-refs-0.1.0-0.tgz", + "integrity": "sha512-SnNMfW2RRPDXIMKa8zdLb59UjMSI1UFZCtIb8ae68GcZ0a6x8b77lIWqqTOdq1azzmkXupD6UWriPLd0JCrFng==" + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz", + "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==", + "dev": true, + "dependencies": { + "acorn": "^8.12.1", + "pathe": "^1.1.2", + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "peer": true, + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "dev": true, + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.2", + "pathe": "^1.1.2" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "peer": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.2.tgz", + "integrity": "sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.24.2", + "@rollup/rollup-android-arm64": "4.24.2", + "@rollup/rollup-darwin-arm64": "4.24.2", + "@rollup/rollup-darwin-x64": "4.24.2", + "@rollup/rollup-freebsd-arm64": "4.24.2", + "@rollup/rollup-freebsd-x64": "4.24.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.2", + "@rollup/rollup-linux-arm-musleabihf": "4.24.2", + "@rollup/rollup-linux-arm64-gnu": "4.24.2", + "@rollup/rollup-linux-arm64-musl": "4.24.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.2", + "@rollup/rollup-linux-riscv64-gnu": "4.24.2", + "@rollup/rollup-linux-s390x-gnu": "4.24.2", + "@rollup/rollup-linux-x64-gnu": "4.24.2", + "@rollup/rollup-linux-x64-musl": "4.24.2", + "@rollup/rollup-win32-arm64-msvc": "4.24.2", + "@rollup/rollup-win32-ia32-msvc": "4.24.2", + "@rollup/rollup-win32-x64-msvc": "4.24.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "peer": true + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "peer": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", + "dev": true, + "dependencies": { + "js-tokens": "^9.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", + "dev": true + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/temporal-polyfill": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", + "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "peer": true, + "dependencies": { + "temporal-spec": "^0.2.4" + } + }, + "node_modules/temporal-spec": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", + "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", + "peer": true + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/vite": { + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", + "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "peer": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "peer": true, + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "peer": true, + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "peer": true + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "peer": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/.plugin/package.json b/.plugin/package.json new file mode 100644 index 000000000..fd2a70a42 --- /dev/null +++ b/.plugin/package.json @@ -0,0 +1,45 @@ +{ + "name": "@open-ai/plugin", + "version": "1.0.0", + "description": "Open AI plugin", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/joseharriaga/openai-in-typespec.git" + }, + "bugs": { + "url": "https://github.com/joseharriaga/openai-in-typespec/issues" + }, + "type": "module", + "main": "dist/emitter/index.js", + "exports": { + ".": "./dist/emitter/index.js" + }, + "scripts": { + "clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator", + "build:emitter": "tsc -p ./tsconfig.build.json", + "build:generator": "dotnet build ./generator", + "build": "npm run build:emitter && npm run build:generator && copyfiles -u 5 ./node_modules/@typespec/http-client-csharp/dist/generator/Microsoft.Generator.CSharp.runtimeconfig.json ./dist/generator", + "test:emitter": "vitest run -c ./emitter/vitest.config.ts", + "test:generator": "dotnet test ./generator", + "test": "npm run test:emitter && npm run test:generator" + }, + "files": [ + "dist/**" + ], + "dependencies": { + "@azure-tools/cadl-ranch-expect": "latest", + "@open-ai/plugin": "file:", + "@typespec/http-client-csharp": "latest" + }, + "devDependencies": { + "@types/node": "^22.8.1", + "@vitest/coverage-v8": "^1.4.0", + "@vitest/ui": "^1.4.0", + "c8": "^9.1.0", + "copyfiles": "^2.4.1", + "rimraf": "~5.0.5", + "typescript": "^5.6.3", + "vitest": "^1.4.0" + } +} diff --git a/.plugin/tsconfig.build.json b/.plugin/tsconfig.build.json new file mode 100644 index 000000000..20573897d --- /dev/null +++ b/.plugin/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "rootDir": "./emitter/src", + "outDir": "./dist/emitter", + "tsBuildInfoFile": "./emitter/temp/tsconfig.tsbuildinfo" + }, + "references": [], + "include": ["emitter/src"] + } \ No newline at end of file diff --git a/.plugin/tsconfig.json b/.plugin/tsconfig.json new file mode 100644 index 000000000..10e7b7230 --- /dev/null +++ b/.plugin/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "noEmit": true, + "composite": true, + "alwaysStrict": true, + "forceConsistentCasingInFileNames": true, + "module": "Node16", + "moduleResolution": "Node16", + "esModuleInterop": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "sourceMap": true, + "declarationMap": true, + "strict": true, + "declaration": true, + "stripInternal": true, + "noEmitHelpers": false, + "target": "ES2022", + "types": ["node"], + "lib": ["es2022", "DOM"], + "experimentalDecorators": true, + "newLine": "LF" + }, + "include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts", "**/*.ts", "**/*.tsx", "**/.storybook/**/*.ts", "**/.storybook/**/*.tsx"], + "exclude": ["**/node_modules/", "**/dist/", "**/build/", "**/coverage/"] +} \ No newline at end of file diff --git a/.plugin/tspconfig.yaml b/.plugin/tspconfig.yaml new file mode 100644 index 000000000..0fb1006a1 --- /dev/null +++ b/.plugin/tspconfig.yaml @@ -0,0 +1,4 @@ +"emit": + - "@open-ai/plugin" +"options": + "@open-ai/plugin": \ No newline at end of file diff --git a/.typespec/tspconfig.yaml b/.typespec/tspconfig.yaml index 3a544fed6..1aeed5a3d 100644 --- a/.typespec/tspconfig.yaml +++ b/.typespec/tspconfig.yaml @@ -11,3 +11,10 @@ options: enable-internal-raw-data: true save-inputs: true generate-model-factory: false + "@open-ai/plugin": + emitter-output-dir: "{project-root}/../.dotnet" + unreferenced-types-handling: keepAll + disable-xml-docs: true + enable-internal-raw-data: true + save-inputs: true + generate-model-factory: false diff --git a/package-lock.json b/package-lock.json index fa19893a1..a93722591 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,16 +8,62 @@ "name": "openai-tsp", "version": "0.1.0", "dependencies": { - "@typespec/http-client-csharp": "latest", + "@open-ai/plugin": "file:.plugin", "@typespec/openapi3": "^0.61.0", "openai-tsp": "file:" } }, + ".plugin": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@azure-tools/cadl-ranch-expect": "latest", + "@open-ai/plugin": "file:", + "@typespec/http-client-csharp": "latest" + }, + "devDependencies": { + "@types/node": "^22.8.1", + "@vitest/coverage-v8": "^1.4.0", + "@vitest/ui": "^1.4.0", + "c8": "^9.1.0", + "copyfiles": "^2.4.1", + "rimraf": "~5.0.5", + "typescript": "^5.6.3", + "vitest": "^1.4.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@apidevtools/swagger-methods": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" }, + "node_modules/@azure-tools/cadl-ranch-expect": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-expect/-/cadl-ranch-expect-0.15.5.tgz", + "integrity": "sha512-7tr/FIDeFCJnDjEQ7J/A2MKmnmYrJBlTS7y9XjsWpJLC/fpB3lyvDvVYlsFmeO5dmnRc3+B4eEoWgWx46r3auA==", + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/rest": "~0.61.0", + "@typespec/versioning": "~0.61.0" + } + }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.47.0", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.47.0.tgz", @@ -33,9 +79,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.2.tgz", - "integrity": "sha512-mOsgeOuJcJa5CrQrT/BzqpbLDnb/X1TgSmfljhV3tJFB2dzZT6awzeAp5clV03Or/4xCMGbmHEABi4kCWot9Qw==", + "version": "0.47.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.3.tgz", + "integrity": "sha512-13knZRDFBlVTw61vbhAnvQzttnqPRwHK0+YI/3QbYRN77j/Kv3zXFPeCcromz31exg3Y/Q8qD24mJ1Oikab2mA==", "peer": true, "dependencies": { "change-case": "~5.4.4", @@ -65,6 +111,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", @@ -87,10 +142,25 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/parser": { + "version": "7.26.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", + "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/runtime": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.9.tgz", - "integrity": "sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -98,6 +168,393 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/types": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@humanwhocodes/momoa": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", @@ -106,6 +563,171 @@ "node": ">=10.10.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", @@ -115,7 +737,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "peer": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -128,7 +749,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "peer": true, "engines": { "node": ">= 8" } @@ -137,7 +757,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "peer": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -146,6 +765,26 @@ "node": ">= 8" } }, + "node_modules/@open-ai/plugin": { + "resolved": ".plugin", + "link": true + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true + }, "node_modules/@readme/better-ajv-errors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@readme/better-ajv-errors/-/better-ajv-errors-1.6.0.tgz", @@ -270,6 +909,246 @@ "node": ">=18" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.2.tgz", + "integrity": "sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.2.tgz", + "integrity": "sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.2.tgz", + "integrity": "sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.2.tgz", + "integrity": "sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.2.tgz", + "integrity": "sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.2.tgz", + "integrity": "sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.2.tgz", + "integrity": "sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.2.tgz", + "integrity": "sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.2.tgz", + "integrity": "sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.2.tgz", + "integrity": "sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.2.tgz", + "integrity": "sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.2.tgz", + "integrity": "sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.2.tgz", + "integrity": "sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.2.tgz", + "integrity": "sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.2.tgz", + "integrity": "sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.2.tgz", + "integrity": "sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.2.tgz", + "integrity": "sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.2.tgz", + "integrity": "sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", @@ -282,11 +1161,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, + "node_modules/@types/node": { + "version": "22.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.2.tgz", + "integrity": "sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.8" + } + }, "node_modules/@typespec/compiler": { "version": "0.61.2", "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.61.2.tgz", @@ -335,9 +1235,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241022.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241022.2.tgz", - "integrity": "sha512-Y38Iv4G+SMfdkJF14Cdmgm/nIyQNJiiZ7Q9ejSLYapKZRjkjZhPprRJStz0R4qmTqJazShcFv2Zk1v6ll8OP0w==", + "version": "0.1.9-alpha.20241028.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241028.2.tgz", + "integrity": "sha512-rz3Xpe5yW4ZOcUKO6YLP8rV1/+i7XzFPSCsxYYYKthwrPRwDst6sJr2CwrwMtdBkqoqJrWnqQIRp9l+BiPE5Lw==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -410,6 +1310,174 @@ "@typespec/compiler": "~0.61.0" } }, + "node_modules/@vitest/coverage-v8": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz", + "integrity": "sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@bcoe/v8-coverage": "^0.2.3", + "debug": "^4.3.4", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.4", + "istanbul-reports": "^3.1.6", + "magic-string": "^0.30.5", + "magicast": "^0.3.3", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "test-exclude": "^6.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": "1.6.0" + } + }, + "node_modules/@vitest/expect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.6.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/ui": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-1.6.0.tgz", + "integrity": "sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.6.0", + "fast-glob": "^3.3.2", + "fflate": "^0.8.1", + "flatted": "^3.2.9", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "sirv": "^2.0.4" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": "1.6.0" + } + }, + "node_modules/@vitest/utils": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -442,7 +1510,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "peer": true, "engines": { "node": ">=8" } @@ -463,11 +1530,35 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "peer": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -475,11 +1566,63 @@ "node": ">=8" } }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -499,11 +1642,22 @@ "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "peer": true }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "peer": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -534,17 +1688,192 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/copyfiles/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/copyfiles/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "peer": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "peer": true, "engines": { "node": ">=6" } @@ -557,6 +1886,38 @@ "node": ">=0.8.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -566,7 +1927,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "peer": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -587,16 +1947,20 @@ "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "peer": true, "dependencies": { "reusify": "^1.0.4" } }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "peer": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -604,20 +1968,118 @@ "node": ">=8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "peer": true, "engines": { "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "peer": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -658,6 +2120,21 @@ "node": ">=4" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -667,11 +2144,27 @@ "node": ">= 4" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -680,7 +2173,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "peer": true, "engines": { "node": ">=8" } @@ -689,7 +2181,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "peer": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -701,11 +2192,120 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "peer": true, "engines": { "node": ">=0.12.0" } }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -769,11 +2369,97 @@ "node": ">=6" } }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "peer": true, "engines": { "node": ">= 8" } @@ -782,7 +2468,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "peer": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -791,6 +2476,78 @@ "node": ">=8.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz", + "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==", + "dev": true, + "dependencies": { + "acorn": "^8.12.1", + "pathe": "^1.1.2", + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "node_modules/mustache": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", @@ -800,6 +2557,85 @@ "mustache": "bin/mustache" } }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/openai-tsp": { "resolved": "", "link": true @@ -810,6 +2646,85 @@ "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", "peer": true }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-type": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", @@ -822,6 +2737,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -831,7 +2761,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "peer": true, "engines": { "node": ">=8.6" }, @@ -839,6 +2768,17 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pkg-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "dev": true, + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.2", + "pathe": "^1.1.2" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -848,6 +2788,34 @@ "node": ">=4" } }, + "node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/prettier": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", @@ -863,6 +2831,38 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -893,8 +2893,25 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "peer": true + ] + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } }, "node_modules/regenerator-runtime": { "version": "0.14.1", @@ -905,7 +2922,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -922,12 +2938,107 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "peer": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.2.tgz", + "integrity": "sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.24.2", + "@rollup/rollup-android-arm64": "4.24.2", + "@rollup/rollup-darwin-arm64": "4.24.2", + "@rollup/rollup-darwin-x64": "4.24.2", + "@rollup/rollup-freebsd-arm64": "4.24.2", + "@rollup/rollup-freebsd-x64": "4.24.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.2", + "@rollup/rollup-linux-arm-musleabihf": "4.24.2", + "@rollup/rollup-linux-arm64-gnu": "4.24.2", + "@rollup/rollup-linux-arm64-musl": "4.24.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.2", + "@rollup/rollup-linux-riscv64-gnu": "4.24.2", + "@rollup/rollup-linux-s390x-gnu": "4.24.2", + "@rollup/rollup-linux-x64-gnu": "4.24.2", + "@rollup/rollup-linux-x64-musl": "4.24.2", + "@rollup/rollup-win32-arm64-msvc": "4.24.2", + "@rollup/rollup-win32-ia32-msvc": "4.24.2", + "@rollup/rollup-win32-x64-msvc": "4.24.2", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -946,21 +3057,78 @@ "url": "https://feross.org/support" } ], - "peer": true, "dependencies": { "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "peer": true, "bin": { "semver": "bin/semver.js" }, "engines": { - "node": ">=10" + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" } }, "node_modules/sisteransi": { @@ -981,11 +3149,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -999,7 +3208,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1007,6 +3215,49 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", + "dev": true, + "dependencies": { + "js-tokens": "^9.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", + "dev": true + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1033,11 +3284,88 @@ "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", "peer": true }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "peer": true, "dependencies": { "is-number": "^7.0.0" }, @@ -1045,6 +3373,49 @@ "node": ">=8.0" } }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "node_modules/unicorn-magic": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", @@ -1057,6 +3428,181 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/vite": { + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", + "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -1100,11 +3646,41 @@ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "peer": true }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -1117,11 +3693,61 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1136,7 +3762,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1147,14 +3772,27 @@ "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "peer": true, "engines": { "node": ">=10" } @@ -1174,7 +3812,6 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "peer": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -1192,10 +3829,21 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "peer": true, "engines": { "node": ">=12" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index a0329297e..16c716033 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "type": "module", "dependencies": { - "@typespec/http-client-csharp": "latest", + "@open-ai/plugin": "file:.plugin", "@typespec/openapi3": "^0.61.0", "openai-tsp": "file:" }, From 7f1aa278feb2901de1ef5cdf33ab4ddc99813103 Mon Sep 17 00:00:00 2001 From: jolov Date: Mon, 28 Oct 2024 17:24:46 -0700 Subject: [PATCH 24/54] Use floating version --- .plugin/generator/src/OpenAI.Library.Plugin.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 0f994714f..69013096b 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From d43a61bad93b39eb6cd88ce2f378dbcdc47178e2 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 30 Oct 2024 17:15:24 -0700 Subject: [PATCH 25/54] Builds successfully --- .../OpenAI.Library.Plugin.csproj | 13 - .../OpenAILibraryPlugin.cs | 20 -- .../OpenAILibraryVisitor.cs | 204 ------------ .dotnet/OpenAI.sln | 6 - .../src/Custom/Assistants/AssistantClient.cs | 3 +- ...StreamingChatCompletionUpdateCollection.cs | 2 +- .dotnet/src/Custom/Files/OpenAIFileClient.cs | 2 - .../MultiPartFormDataBinaryContent.cs | 195 ----------- .../Models/Assistant.Serialization.cs | 8 +- .../AssistantChatMessage.Serialization.cs | 6 +- .../AssistantCreationOptions.Serialization.cs | 8 +- .../AssistantDeletionResult.Serialization.cs | 8 +- ...istantModificationOptions.Serialization.cs | 8 +- .../AssistantResponseFormat.Serialization.cs | 6 +- .../Models/AssistantThread.Serialization.cs | 10 +- .../AudioTranscription.Serialization.cs | 16 +- .../Generated/Models/AudioTranscription.cs | 6 +- ...AudioTranscriptionOptions.Serialization.cs | 8 +- .../Models/AudioTranslation.Serialization.cs | 8 +- .../AudioTranslationOptions.Serialization.cs | 8 +- .../Models/ChatCompletion.Serialization.cs | 8 +- .../ChatCompletionOptions.Serialization.cs | 8 +- .../Models/ChatFunction.Serialization.cs | 8 +- .../Models/ChatFunctionCall.Serialization.cs | 8 +- .../ChatFunctionChoice.Serialization.cs | 6 +- .../Models/ChatMessage.Serialization.cs | 10 +- .dotnet/src/Generated/Models/ChatMessage.cs | 2 +- .../ChatMessageContent.Serialization.cs | 126 ------- .../ChatMessageContentPart.Serialization.cs | 6 +- ...atOutputTokenUsageDetails.Serialization.cs | 8 +- .../ChatResponseFormat.Serialization.cs | 8 +- .../Generated/Models/ChatResponseFormat.cs | 2 +- ...okenLogProbabilityDetails.Serialization.cs | 8 +- ...nTopLogProbabilityDetails.Serialization.cs | 8 +- .../Models/ChatTokenUsage.Serialization.cs | 8 +- .../Models/ChatTool.Serialization.cs | 8 +- .../Models/ChatToolCall.Serialization.cs | 8 +- .../Models/ChatToolChoice.Serialization.cs | 6 +- ...InterpreterToolDefinition.Serialization.cs | 6 +- ...eInterpreterToolResources.Serialization.cs | 8 +- ...versationAudioDeltaUpdate.Serialization.cs | 6 +- ...nversationAudioDoneUpdate.Serialization.cs | 6 +- .../ConversationContentPart.Serialization.cs | 6 +- ...ContentPartFinishedUpdate.Serialization.cs | 6 +- ...nContentPartStartedUpdate.Serialization.cs | 6 +- .../ConversationErrorUpdate.Serialization.cs | 6 +- ...nCallArgumentsDeltaUpdate.Serialization.cs | 6 +- ...onCallArgumentsDoneUpdate.Serialization.cs | 6 +- .../ConversationFunctionTool.Serialization.cs | 6 +- ...tAudioBufferClearedUpdate.Serialization.cs | 6 +- ...udioBufferCommittedUpdate.Serialization.cs | 6 +- ...InputSpeechFinishedUpdate.Serialization.cs | 6 +- ...nInputSpeechStartedUpdate.Serialization.cs | 6 +- ...ionInputTokenUsageDetails.Serialization.cs | 8 +- ...TranscriptionFailedUpdate.Serialization.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 6 +- ...InputTranscriptionOptions.Serialization.cs | 8 +- .../Models/ConversationItem.Serialization.cs | 6 +- ...ionItemAcknowledgedUpdate.Serialization.cs | 6 +- ...ersationItemDeletedUpdate.Serialization.cs | 6 +- ...rsationItemFinishedUpdate.Serialization.cs | 6 +- ...ersationItemStartedUpdate.Serialization.cs | 6 +- ...sationItemTruncatedUpdate.Serialization.cs | 6 +- ...onOutputTokenUsageDetails.Serialization.cs | 8 +- ...tTranscriptionDeltaUpdate.Serialization.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 6 +- ...ationRateLimitDetailsItem.Serialization.cs | 8 +- ...onRateLimitsUpdatedUpdate.Serialization.cs | 6 +- ...ionResponseFinishedUpdate.Serialization.cs | 6 +- ...tionResponseStartedUpdate.Serialization.cs | 6 +- ...onSessionConfiguredUpdate.Serialization.cs | 6 +- ...onversationSessionOptions.Serialization.cs | 8 +- ...ationSessionStartedUpdate.Serialization.cs | 6 +- ...nversationTextDeltaUpdate.Serialization.cs | 6 +- ...onversationTextDoneUpdate.Serialization.cs | 6 +- .../ConversationTokenUsage.Serialization.cs | 8 +- .../Models/ConversationTool.Serialization.cs | 6 +- ...ationTurnDetectionOptions.Serialization.cs | 6 +- .../ConversationUpdate.Serialization.cs | 6 +- ...mbeddingGenerationOptions.Serialization.cs | 8 +- .../EmbeddingTokenUsage.Serialization.cs | 8 +- .../FileChunkingStrategy.Serialization.cs | 6 +- .../FileDeletionResult.Serialization.cs | 8 +- ...ileFromStoreRemovalResult.Serialization.cs | 8 +- .../FileSearchRankingOptions.Serialization.cs | 8 +- .../FileSearchToolDefinition.Serialization.cs | 6 +- .../FileSearchToolResources.Serialization.cs | 8 +- .../FineTuningIntegration.Serialization.cs | 6 +- ...ningIntegrationWandbWandb.Serialization.cs | 8 +- .../Models/FineTuningJob.Serialization.cs | 8 +- .../FineTuningJobError.Serialization.cs | 8 +- .../FineTuningJobEvent.Serialization.cs | 8 +- ...eTuningJobHyperparameters.Serialization.cs | 4 +- .../Models/FineTuningOptions.Serialization.cs | 8 +- .../FunctionChatMessage.Serialization.cs | 6 +- .../FunctionToolDefinition.Serialization.cs | 6 +- .../Models/GeneratedImage.Serialization.cs | 8 +- .../GeneratedImageCollection.Serialization.cs | 6 +- .../HyperparameterOptions.Serialization.cs | 8 +- .../Models/ImageEditOptions.Serialization.cs | 8 +- .../ImageGenerationOptions.Serialization.cs | 8 +- .../ImageVariationOptions.Serialization.cs | 8 +- ...ernalAddUploadPartRequest.Serialization.cs | 8 +- ...tResponseFormatJsonObject.Serialization.cs | 6 +- ...tResponseFormatJsonSchema.Serialization.cs | 6 +- ...sistantResponseFormatText.Serialization.cs | 6 +- ...ToolsFileSearchFileSearch.Serialization.cs | 8 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 8 +- ...tsNamedToolChoiceFunction.Serialization.cs | 8 +- ...ernalAutoChunkingStrategy.Serialization.cs | 6 +- ...nkingStrategyRequestParam.Serialization.cs | 6 +- .../InternalBatchError.Serialization.cs | 8 +- .../InternalBatchErrors.Serialization.cs | 8 +- .../Models/InternalBatchJob.Serialization.cs | 8 +- ...nternalBatchRequestCounts.Serialization.cs | 8 +- ...InternalBatchRequestInput.Serialization.cs | 8 +- ...nternalBatchRequestOutput.Serialization.cs | 8 +- ...alBatchRequestOutputError.Serialization.cs | 8 +- ...atchRequestOutputResponse.Serialization.cs | 8 +- ...pletionFunctionCallOption.Serialization.cs | 8 +- ...sageToolCallChunkFunction.Serialization.cs | 8 +- ...onMessageToolCallFunction.Serialization.cs | 8 +- ...CompletionNamedToolChoice.Serialization.cs | 8 +- ...onNamedToolChoiceFunction.Serialization.cs | 8 +- ...stMessageContentPartImage.Serialization.cs | 8 +- ...eContentPartImageImageUrl.Serialization.cs | 8 +- ...MessageContentPartRefusal.Serialization.cs | 8 +- ...estMessageContentPartText.Serialization.cs | 8 +- ...CompletionResponseMessage.Serialization.cs | 10 +- ...sponseMessageFunctionCall.Serialization.cs | 8 +- ...atCompletionStreamOptions.Serialization.cs | 8 +- ...letionStreamResponseDelta.Serialization.cs | 8 +- ...tResponseFormatJsonObject.Serialization.cs | 6 +- ...tResponseFormatJsonSchema.Serialization.cs | 6 +- ...nalChatResponseFormatText.Serialization.cs | 6 +- ...rnalCompleteUploadRequest.Serialization.cs | 8 +- ...stantRequestToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...nternalCreateBatchRequest.Serialization.cs | 8 +- ...ompletionFunctionResponse.Serialization.cs | 8 +- ...ionFunctionResponseChoice.Serialization.cs | 8 +- ...tCompletionResponseChoice.Serialization.cs | 8 +- ...ionResponseChoiceLogprobs.Serialization.cs | 12 +- ...etionStreamResponseChoice.Serialization.cs | 6 +- ...eamResponseChoiceLogprobs.Serialization.cs | 8 +- ...letionStreamResponseUsage.Serialization.cs | 8 +- ...alCreateCompletionRequest.Serialization.cs | 8 +- ...lCreateCompletionResponse.Serialization.cs | 8 +- ...eCompletionResponseChoice.Serialization.cs | 8 +- ...ionResponseChoiceLogprobs.Serialization.cs | 8 +- ...uestWandbIntegrationWandb.Serialization.cs | 8 +- ...CreateThreadAndRunRequest.Serialization.cs | 8 +- ...ndRunRequestToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...olResourcesFileSearchBase.Serialization.cs | 8 +- ...TranscriptionResponseJson.Serialization.cs | 8 +- ...teTranslationResponseJson.Serialization.cs | 8 +- ...ternalCreateUploadRequest.Serialization.cs | 8 +- ...ctorStoreFileBatchRequest.Serialization.cs | 8 +- ...ateVectorStoreFileRequest.Serialization.cs | 8 +- ...nkingStrategyRequestParam.Serialization.cs | 6 +- ...InternalFileUploadOptions.Serialization.cs | 8 +- ...onRequestAssistantMessage.Serialization.cs | 6 +- ...rnalFineTuningIntegration.Serialization.cs | 6 +- ...ineTuningIntegrationWandb.Serialization.cs | 6 +- ...alFineTuningJobCheckpoint.Serialization.cs | 8 +- ...uningJobCheckpointMetrics.Serialization.cs | 8 +- ...lFinetuneChatRequestInput.Serialization.cs | 8 +- ...uneCompletionRequestInput.Serialization.cs | 8 +- ...nternalFunctionDefinition.Serialization.cs | 8 +- ...nternalFunctionParameters.Serialization.cs | 4 + ...nalListAssistantsResponse.Serialization.cs | 10 +- ...ternalListBatchesResponse.Serialization.cs | 8 +- ...ingJobCheckpointsResponse.Serialization.cs | 8 +- ...neTuningJobEventsResponse.Serialization.cs | 8 +- ...ernalListMessagesResponse.Serialization.cs | 10 +- ...tedFineTuningJobsResponse.Serialization.cs | 8 +- ...ernalListRunStepsResponse.Serialization.cs | 10 +- .../InternalListRunsResponse.Serialization.cs | 10 +- ...ternalListThreadsResponse.Serialization.cs | 10 +- ...tVectorStoreFilesResponse.Serialization.cs | 10 +- ...lListVectorStoresResponse.Serialization.cs | 10 +- ...entImageUrlObjectImageUrl.Serialization.cs | 8 +- ...ntItemFileObjectImageFile.Serialization.cs | 8 +- ...tationsFileCitationObject.Serialization.cs | 6 +- ...itationObjectFileCitation.Serialization.cs | 8 +- ...AnnotationsFilePathObject.Serialization.cs | 6 +- ...onsFilePathObjectFilePath.Serialization.cs | 8 +- ...ntentTextObjectAnnotation.Serialization.cs | 6 +- ...sageContentTextObjectText.Serialization.cs | 8 +- ...ternalMessageDeltaContent.Serialization.cs | 6 +- ...ltaContentImageFileObject.Serialization.cs | 6 +- ...tImageFileObjectImageFile.Serialization.cs | 8 +- ...eltaContentImageUrlObject.Serialization.cs | 6 +- ...entImageUrlObjectImageUrl.Serialization.cs | 8 +- ...DeltaContentRefusalObject.Serialization.cs | 6 +- ...tationsFileCitationObject.Serialization.cs | 6 +- ...itationObjectFileCitation.Serialization.cs | 8 +- ...AnnotationsFilePathObject.Serialization.cs | 6 +- ...onsFilePathObjectFilePath.Serialization.cs | 8 +- ...ageDeltaContentTextObject.Serialization.cs | 6 +- ...eltaContentTextObjectText.Serialization.cs | 8 +- ...nternalMessageDeltaObject.Serialization.cs | 8 +- ...alMessageDeltaObjectDelta.Serialization.cs | 8 +- ...eltaTextContentAnnotation.Serialization.cs | 6 +- ...alMessageImageFileContent.Serialization.cs | 6 +- ...nalMessageImageUrlContent.Serialization.cs | 6 +- ...alMessageObjectAttachment.Serialization.cs | 8 +- ...rnalMessageRefusalContent.Serialization.cs | 6 +- ...ernalModerationCategories.Serialization.cs | 8 +- ...lModerationCategoryScores.Serialization.cs | 8 +- ...stantRequestToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...hreadRequestToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...alOmniTypedResponseFormat.Serialization.cs | 6 +- ...questAssistantMessageItem.Serialization.cs | 6 +- ...meRequestAudioContentPart.Serialization.cs | 6 +- ...nalRealtimeRequestCommand.Serialization.cs | 6 +- ...meRequestFunctionCallItem.Serialization.cs | 6 +- ...estFunctionCallOutputItem.Serialization.cs | 6 +- ...tAudioBufferAppendCommand.Serialization.cs | 6 +- ...utAudioBufferClearCommand.Serialization.cs | 6 +- ...tAudioBufferCommitCommand.Serialization.cs | 6 +- ...eRequestItemCreateCommand.Serialization.cs | 6 +- ...eRequestItemDeleteCommand.Serialization.cs | 6 +- ...equestItemTruncateCommand.Serialization.cs | 6 +- ...ealtimeRequestMessageItem.Serialization.cs | 6 +- ...uestResponseCancelCommand.Serialization.cs | 6 +- ...uestResponseCreateCommand.Serialization.cs | 6 +- ...onseCreateCommandResponse.Serialization.cs | 8 +- ...questSessionUpdateCommand.Serialization.cs | 6 +- ...eRequestSystemMessageItem.Serialization.cs | 6 +- ...imeRequestTextContentPart.Serialization.cs | 6 +- ...imeRequestUserMessageItem.Serialization.cs | 6 +- .../InternalRealtimeResponse.Serialization.cs | 8 +- ...lRealtimeResponseApiError.Serialization.cs | 8 +- ...eResponseAudioContentPart.Serialization.cs | 6 +- ...nseCancelledStatusDetails.Serialization.cs | 6 +- ...rnalRealtimeResponseError.Serialization.cs | 8 +- ...eResponseFunctionCallItem.Serialization.cs | 6 +- ...nseFunctionCallOutputItem.Serialization.cs | 6 +- ...seIncompleteStatusDetails.Serialization.cs | 6 +- ...ernalRealtimeResponseItem.Serialization.cs | 6 +- ...altimeResponseMessageItem.Serialization.cs | 8 +- ...alRealtimeResponseSession.Serialization.cs | 10 +- ...timeResponseStatusDetails.Serialization.cs | 6 +- ...meResponseTextContentPart.Serialization.cs | 6 +- ...imeServerVadTurnDetection.Serialization.cs | 6 +- ...eToolChoiceFunctionObject.Serialization.cs | 6 +- ...iceFunctionObjectFunction.Serialization.cs | 8 +- ...lRealtimeToolChoiceObject.Serialization.cs | 6 +- ...RequestMessageTextContent.Serialization.cs | 6 +- ...lRequiredFunctionToolCall.Serialization.cs | 8 +- ...lResponseFormatJsonObject.Serialization.cs | 6 +- ...lResponseFormatJsonSchema.Serialization.cs | 6 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 8 +- ...nseFormatJsonSchemaSchema.Serialization.cs | 4 + ...nternalResponseFormatText.Serialization.cs | 6 +- ...esponseMessageTextContent.Serialization.cs | 6 +- ...edActionSubmitToolOutputs.Serialization.cs | 10 +- ...InternalRunRequiredAction.Serialization.cs | 8 +- ...pCodeInterpreterLogOutput.Serialization.cs | 6 +- ...nterpreterToolCallDetails.Serialization.cs | 6 +- .../InternalRunStepDelta.Serialization.cs | 8 +- ...alRunStepDeltaObjectDelta.Serialization.cs | 8 +- ...alRunStepDeltaStepDetails.Serialization.cs | 6 +- ...ailsMessageCreationObject.Serialization.cs | 6 +- ...tionObjectMessageCreation.Serialization.cs | 8 +- ...etailsToolCallsCodeObject.Serialization.cs | 6 +- ...CodeObjectCodeInterpreter.Serialization.cs | 10 +- ...allsCodeOutputImageObject.Serialization.cs | 6 +- ...odeOutputImageObjectImage.Serialization.cs | 8 +- ...CallsCodeOutputLogsObject.Serialization.cs | 6 +- ...ToolCallsFileSearchObject.Serialization.cs | 6 +- ...lsToolCallsFunctionObject.Serialization.cs | 6 +- ...llsFunctionObjectFunction.Serialization.cs | 8 +- ...tepDetailsToolCallsObject.Serialization.cs | 6 +- ...allsObjectToolCallsObject.Serialization.cs | 6 +- ...ailsMessageCreationObject.Serialization.cs | 6 +- ...tionObjectMessageCreation.Serialization.cs | 8 +- ...CodeObjectCodeInterpreter.Serialization.cs | 10 +- ...allsCodeOutputImageObject.Serialization.cs | 6 +- ...odeOutputImageObjectImage.Serialization.cs | 8 +- ...ileSearchObjectFileSearch.Serialization.cs | 10 +- ...earchRankingOptionsObject.Serialization.cs | 8 +- ...SearchResultObjectContent.Serialization.cs | 8 +- ...llsFunctionObjectFunction.Serialization.cs | 8 +- ...tepDetailsToolCallsObject.Serialization.cs | 6 +- ...FileSearchToolCallDetails.Serialization.cs | 6 +- ...epFunctionToolCallDetails.Serialization.cs | 6 +- ...RunToolCallObjectFunction.Serialization.cs | 8 +- ...icChunkingStrategyDetails.Serialization.cs | 8 +- ...nkingStrategyRequestParam.Serialization.cs | 6 +- ...bmitToolOutputsRunRequest.Serialization.cs | 8 +- ...ThreadObjectToolResources.Serialization.cs | 8 +- ...lResourcesCodeInterpreter.Serialization.cs | 8 +- ...ctToolResourcesFileSearch.Serialization.cs | 8 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 8 +- ...wnAssistantResponseFormat.Serialization.cs | 2 +- ...nternalUnknownChatMessage.Serialization.cs | 2 +- ...UnknownChatResponseFormat.Serialization.cs | 2 +- ...alUnknownChunkingStrategy.Serialization.cs | 6 +- ...StrategyRequestParamProxy.Serialization.cs | 2 +- ...trategyResponseParamProxy.Serialization.cs | 2 +- ...wnOmniTypedResponseFormat.Serialization.cs | 2 +- .../Models/InternalUpload.Serialization.cs | 8 +- .../InternalUploadPart.Serialization.cs | 8 +- ...FileBatchObjectFileCounts.Serialization.cs | 8 +- .../Models/MessageContent.Serialization.cs | 6 +- ...MessageCreationAttachment.Serialization.cs | 8 +- .../MessageCreationOptions.Serialization.cs | 8 +- .../MessageDeletionResult.Serialization.cs | 8 +- .../MessageFailureDetails.Serialization.cs | 8 +- ...essageModificationOptions.Serialization.cs | 8 +- .../ModelDeletionResult.Serialization.cs | 8 +- .../Models/ModerationOptions.Serialization.cs | 8 +- .../Models/ModerationResult.Serialization.cs | 6 +- ...oderationResultCollection.Serialization.cs | 6 +- .../Models/OpenAIEmbedding.Serialization.cs | 8 +- ...OpenAIEmbeddingCollection.Serialization.cs | 6 +- .../Models/OpenAIError.Serialization.cs | 8 +- .../OpenAIErrorResponse.Serialization.cs | 8 +- .../Models/OpenAIFile.Serialization.cs | 8 +- .../OpenAIFileCollection.Serialization.cs | 6 +- .../Models/OpenAIModel.Serialization.cs | 8 +- .../OpenAIModelCollection.Serialization.cs | 6 +- ...sponseFailedStatusDetails.Serialization.cs | 6 +- .../RunCreationOptions.Serialization.cs | 26 +- .../Generated/Models/RunCreationOptions.cs | 4 +- .../Models/RunError.Serialization.cs | 8 +- .../RunIncompleteDetails.Serialization.cs | 8 +- .../RunModificationOptions.Serialization.cs | 8 +- .../Generated/Models/RunStep.Serialization.cs | 8 +- ...StepCodeInterpreterOutput.Serialization.cs | 6 +- .../Models/RunStepDetails.Serialization.cs | 6 +- .../Models/RunStepError.Serialization.cs | 8 +- .../RunStepFileSearchResult.Serialization.cs | 8 +- .../Models/RunStepTokenUsage.Serialization.cs | 8 +- .../Models/RunStepToolCall.Serialization.cs | 6 +- ...dateCodeInterpreterOutput.Serialization.cs | 6 +- .../Models/RunTokenUsage.Serialization.cs | 8 +- .../RunTruncationStrategy.Serialization.cs | 8 +- .../SpeechGenerationOptions.Serialization.cs | 8 +- ...taticFileChunkingStrategy.Serialization.cs | 6 +- ...amingChatCompletionUpdate.Serialization.cs | 8 +- ...ingChatFunctionCallUpdate.Serialization.cs | 8 +- ...reamingChatToolCallUpdate.Serialization.cs | 8 +- .../Models/SystemChatMessage.Serialization.cs | 6 +- .../ThreadCreationOptions.Serialization.cs | 8 +- .../ThreadDeletionResult.Serialization.cs | 8 +- .../Models/ThreadMessage.Serialization.cs | 8 +- ...ThreadModificationOptions.Serialization.cs | 8 +- .../Models/ThreadRun.Serialization.cs | 8 +- .../Models/ToolChatMessage.Serialization.cs | 6 +- .../Models/ToolConstraint.Serialization.cs | 6 +- .../Models/ToolDefinition.Serialization.cs | 6 +- .../Models/ToolOutput.Serialization.cs | 8 +- .../Models/ToolResources.Serialization.cs | 8 +- .../TranscribedSegment.Serialization.cs | 4 +- .../Models/TranscribedWord.Serialization.cs | 4 +- ...wnAssistantToolDefinition.Serialization.cs | 2 +- ...ningJobRequestIntegration.Serialization.cs | 2 +- ...nownFineTuningIntegration.Serialization.cs | 2 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...nknownMessageDeltaContent.Serialization.cs | 2 +- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...nknownRealtimeContentPart.Serialization.cs | 2 +- ...ownRealtimeRequestCommand.Serialization.cs | 2 +- ...nknownRealtimeRequestItem.Serialization.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...wnRealtimeResponseCommand.Serialization.cs | 2 +- ...knownRealtimeResponseItem.Serialization.cs | 2 +- ...timeResponseStatusDetails.Serialization.cs | 2 +- .../UnknownRealtimeTool.Serialization.cs | 2 +- ...nRealtimeToolChoiceObject.Serialization.cs | 2 +- ...nownRealtimeTurnDetection.Serialization.cs | 2 +- ...wnRunStepDeltaStepDetails.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...nRunStepObjectStepDetails.Serialization.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 6 +- .../Models/VectorStore.Serialization.cs | 8 +- .../VectorStoreBatchFileJob.Serialization.cs | 8 +- ...VectorStoreCreationHelper.Serialization.cs | 8 +- ...ectorStoreCreationOptions.Serialization.cs | 8 +- ...VectorStoreDeletionResult.Serialization.cs | 8 +- ...ctorStoreExpirationPolicy.Serialization.cs | 8 +- ...ectorStoreFileAssociation.Serialization.cs | 8 +- ...StoreFileAssociationError.Serialization.cs | 8 +- .../VectorStoreFileCounts.Serialization.cs | 8 +- ...rStoreModificationOptions.Serialization.cs | 8 +- ...ightsAndBiasesIntegration.Serialization.cs | 6 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 312 +++++++++--------- .plugin/emitter/temp/tsconfig.tsbuildinfo | 2 +- .../src/OpenAI.Library.Plugin.csproj | 2 +- .plugin/package-lock.json | 168 +++++----- .scripts/Run-Checks.ps1 | 8 +- .typespec/audio/client.tsp | 8 + .typespec/audio/main.tsp | 1 + package-lock.json | 168 +++++----- 405 files changed, 2388 insertions(+), 1524 deletions(-) delete mode 100644 .dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj delete mode 100644 .dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs delete mode 100644 .dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs delete mode 100644 .dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs delete mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs create mode 100644 .typespec/audio/client.tsp diff --git a/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj b/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj deleted file mode 100644 index c5e17eeb8..000000000 --- a/.dotnet/OpenAI.Library.Plugin/OpenAI.Library.Plugin.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - OpenAI.Microsoft.Generator.CSharp.ClientModel.Plugin - - - - - - - diff --git a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs deleted file mode 100644 index 21d81fd68..000000000 --- a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryPlugin.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.ComponentModel.Composition; -using Microsoft.Generator.CSharp; -using Microsoft.Generator.CSharp.ClientModel; - -namespace OpenAILibraryPlugin -{ - [Export(typeof(CodeModelPlugin))] - [ExportMetadata("PluginName", nameof(OpenAILibraryPlugin))] - public class OpenAILibraryPlugin : ClientModelPlugin - { - [ImportingConstructor] - public OpenAILibraryPlugin(GeneratorContext context) : base(context) { } - - public override void Configure() - { - base.Configure(); - AddVisitor(new OpenAILibraryVisitor()); - } - } -} \ No newline at end of file diff --git a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs b/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs deleted file mode 100644 index 75382d78b..000000000 --- a/.dotnet/OpenAI.Library.Plugin/OpenAILibraryVisitor.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Generator.CSharp.ClientModel; -using Microsoft.Generator.CSharp.ClientModel.Providers; -using Microsoft.Generator.CSharp.Primitives; -using Microsoft.Generator.CSharp.Providers; -using Microsoft.Generator.CSharp.Snippets; -using Microsoft.Generator.CSharp.Statements; -using static Microsoft.Generator.CSharp.Snippets.Snippet; - -namespace OpenAILibraryPlugin -{ - public class OpenAILibraryVisitor : ScmLibraryVisitor - { - private const string RawDataPropertyName = "SerializedAdditionalRawData"; - private const string AdditionalPropertiesFieldName = "_additionalBinaryDataProperties"; - private const string SentinelValueFieldName = "_sentinelValue"; - private const string WritePropertyNameMethodCall = "WritePropertyName(\""; - private const string ModelSerializationExtensionsTypeName = "ModelSerializationExtension"; - private const string IsSentinelValueMethodName = "IsSentinelValue"; - private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore"; - - protected override TypeProvider Visit(TypeProvider type) - { - if (type is ModelProvider { BaseModelProvider: null }) - { - // Add an internal AdditionalProperties property to all base models - var additionalPropertiesField = type.Fields.Single(f => f.Name == AdditionalPropertiesFieldName); - var properties = new List(type.Properties) - { - new PropertyProvider($"", MethodSignatureModifiers.Internal, - typeof(IDictionary), RawDataPropertyName, - new ExpressionPropertyBody( - additionalPropertiesField, - type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly) ? null : additionalPropertiesField.Assign(Value)), - type) - }; - - type.Update(properties: properties); - } - else if (type.Name == ModelSerializationExtensionsTypeName) - { - // Add a static BinaryData field representing the sentinel value - var sentinelValueField = new FieldProvider( - FieldModifiers.Private | FieldModifiers.Static | FieldModifiers.ReadOnly, - typeof(BinaryData), - SentinelValueFieldName, - type, - null, - BinaryDataSnippets.FromBytes(LiteralU8("\"__EMPTY__\"").Invoke("ToArray"))); - var fields = new List(type.Fields) - { - sentinelValueField - }; - - // Add the IsSentinelValue method - var valueParameter = new ParameterProvider("value", $"", typeof(BinaryData)); - var methods = new List(type.Methods) - { - new MethodProvider( - new MethodSignature( - IsSentinelValueMethodName, - $"", - MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static, - typeof(bool), - $"", - [valueParameter]), - new[] - { - Declare("sentinelSpan", typeof(ReadOnlySpan), sentinelValueField.As().ToMemory().Property("Span"), out var sentinelVariable), - Declare("valueSpan", typeof(ReadOnlySpan), valueParameter.As().ToMemory().Property("Span"), out var valueVariable), - Return(sentinelVariable.Invoke("SequenceEqual", valueVariable)) - }, - type) - }; - - type.Update(fields: fields, methods: methods); - } - return type; - } - - protected override FieldProvider Visit(FieldProvider field) - { - // Make the backing additional properties field not be read only as long as the type is not readonly. - if (field.Name == AdditionalPropertiesFieldName && !field.EnclosingType.DeclarationModifiers.HasFlag(TypeSignatureModifiers.ReadOnly)) - { - field.Modifiers &= ~FieldModifiers.ReadOnly; - } - return field; - } - - protected override MethodProvider Visit(MethodProvider method) - { - if (method.Signature.Name != JsonModelWriteCoreMethodName) - { - return method; - } - - // If there are no body statements, return the method as is - if (method.BodyStatements == null) - { - return method; - } - - // If the body statements are not MethodBodyStatements, return the method as is - if (method.BodyStatements is not MethodBodyStatements statements) - { - return method; - } - - var updatedStatements = new List(); - var flattenedStatements = Flatten(statements).ToArray(); - - for (int line = 0; line < flattenedStatements.Length; line++) - { - var statement = flattenedStatements[line]; - - if (statement is IfStatement ifStatement) - { - var body = ifStatement.Body.ToDisplayString(); - - // If we already have an if statement that contains property writing, we need to add the condition to the existing if statement - if (body.Contains(WritePropertyNameMethodCall)) - { - ifStatement.Condition = ifStatement.Condition.As().And(GetContainsKeyCondition(body)); - } - - // Handle writing AdditionalProperties - else if (Flatten(ifStatement.Body).First() is ForeachStatement foreachStatement) - { - foreachStatement.Body.Insert( - 0, - new IfStatement( - Static(new ModelSerializationExtensionsDefinition().Type).Invoke( - IsSentinelValueMethodName, - foreachStatement.ItemVariable.Property("Value"))) - { - Continue - }); - } - - updatedStatements.Add(ifStatement); - continue; - } - - var displayString = statement.ToDisplayString(); - if (displayString.Contains(WritePropertyNameMethodCall)) - { - var ifSt = new IfStatement(GetContainsKeyCondition(displayString)) { statement }; - - // If this is a plain expression statement, we need to add the next statement as well which - // will either write the property value or start writing an array - if (statement is ExpressionStatement) - { - ifSt.Add(flattenedStatements[++line]); - // Include array writing in the if statement - if (flattenedStatements[line + 1] is ForeachStatement) - { - // Foreach - ifSt.Add(flattenedStatements[++line]); - // End array - ifSt.Add(flattenedStatements[++line]); - } - } - updatedStatements.Add(ifSt); - } - else - { - updatedStatements.Add(statement); - } - } - - method.Update(bodyStatements: updatedStatements); - return method; - } - - private static ScopedApi GetContainsKeyCondition(string displayString) - { - var propertyName = displayString.Split('"')[1]; - return This.Property(AdditionalPropertiesFieldName) - .NullConditional() - .Invoke("ContainsKey", Literal(propertyName)).NotEqual(True); - } - - private IEnumerable Flatten(MethodBodyStatement bodyStatement) - { - if (bodyStatement is MethodBodyStatements statements) - { - foreach (var statement in statements.Statements) - { - foreach (var subStatement in Flatten(statement)) - { - yield return subStatement; - } - } - } - else - { - yield return bodyStatement; - } - } - } -} diff --git a/.dotnet/OpenAI.sln b/.dotnet/OpenAI.sln index 7f44a8267..79cc37611 100644 --- a/.dotnet/OpenAI.sln +++ b/.dotnet/OpenAI.sln @@ -8,8 +8,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Examples", "examples EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAI.Tests", "tests\OpenAI.Tests.csproj", "{6F156401-2544-41D7-B204-3148C51C1D09}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.Library.Plugin", "OpenAI.Library.Plugin\OpenAI.Library.Plugin.csproj", "{B7CE2055-3F68-49BA-95AE-96EA00D513F5}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -28,10 +26,6 @@ Global {6F156401-2544-41D7-B204-3148C51C1D09}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F156401-2544-41D7-B204-3148C51C1D09}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F156401-2544-41D7-B204-3148C51C1D09}.Release|Any CPU.Build.0 = Release|Any CPU - {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B7CE2055-3F68-49BA-95AE-96EA00D513F5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index cc9531ace..fb6471aca 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -313,7 +313,8 @@ public virtual ClientResult DeleteAssistant(string assi /// A new thread. public virtual async Task> CreateThreadAsync(ThreadCreationOptions options = null, CancellationToken cancellationToken = default) { - ClientResult protocolResult = await CreateThreadAsync(options, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + var opt = options == null ? null : options; + ClientResult protocolResult = await CreateThreadAsync(opt, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((AssistantThread)protocolResult, protocolResult.GetRawResponse()); } diff --git a/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs b/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs index 9cb38f2b4..85b14cd22 100644 --- a/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs +++ b/.dotnet/src/Custom/Chat/Streaming/InternalStreamingChatCompletionUpdateCollection.cs @@ -108,7 +108,7 @@ public bool MoveNext() } using JsonDocument doc = JsonDocument.Parse(_events.Current.Data); - List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, null)]; + List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, ModelSerializationExtensions.WireOptions)]; _updates = updates.GetEnumerator(); if (_updates.MoveNext()) diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.cs index 0d7a98e90..593219adc 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.cs @@ -30,8 +30,6 @@ public partial class OpenAIFileClient // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The API key to authenticate with the service. - /// or is null. - /// is an empty string, and was expected to be non-empty. public OpenAIFileClient(string apiKey) : this(new ApiKeyCredential(apiKey), new OpenAIClientOptions()) { } diff --git a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs deleted file mode 100644 index 945fc05aa..000000000 --- a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.Globalization; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; - -namespace OpenAI -{ - internal partial class MultiPartFormDataBinaryContent : BinaryContent - { - private readonly MultipartFormDataContent _multipartContent; - private static readonly Random _random = new Random(); - private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); - - public MultiPartFormDataBinaryContent() - { - _multipartContent = new MultipartFormDataContent(CreateBoundary()); - } - - public string ContentType - { - get - { - return _multipartContent.Headers.ContentType.ToString(); - } - } - - internal HttpContent HttpContent => _multipartContent; - - private static string CreateBoundary() - { - Span chars = new char[70]; - byte[] random = new byte[70]; - _random.NextBytes(random); - int mask = 255 >> 2; - int i = 0; - for (; i < 70; i++) - { - chars[i] = _boundaryValues[random[i] & mask]; - } - return chars.ToString(); - } - - public void Add(string content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StringContent(content), name, filename, contentType); - } - - public void Add(int content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(long content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(float content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(double content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(decimal content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(bool content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content ? "true" : "false"; - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(Stream content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StreamContent(content), name, filename, contentType); - } - - public void Add(byte[] content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content), name, filename, contentType); - } - - public void Add(BinaryData content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); - } - - private void Add(HttpContent content, string name, string filename, string contentType) - { - if (contentType != null) - { - Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); - AddContentTypeHeader(content, contentType); - } - if (filename != null) - { - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - _multipartContent.Add(content, name, filename); - } - else - { - _multipartContent.Add(content, name); - } - } - - public static void AddContentTypeHeader(HttpContent content, string contentType) - { - MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); - content.Headers.ContentType = header; - } - - public override bool TryComputeLength(out long length) - { - if (_multipartContent.Headers.ContentLength is long contentLength) - { - length = contentLength; - return true; - } - length = 0; - return false; - } - - public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - _multipartContent.CopyTo(stream, default, cancellationToken); -#else - _multipartContent.CopyToAsync(stream).GetAwaiter().GetResult(); -#endif - } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#else - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#endif - } - - public override void Dispose() - { - _multipartContent.Dispose(); - } - } -} diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index bb5b0621b..cf709ad43 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -168,7 +168,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -346,7 +346,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -403,6 +403,10 @@ protected virtual Assistant PersistableModelCreateCore(BinaryData data, ModelRea public static implicit operator BinaryContent(Assistant assistant) { + if (assistant == null) + { + return null; + } return BinaryContent.Create(assistant, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 780d6c11f..cb20a20e8 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -139,7 +139,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -189,6 +189,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(AssistantChatMessage assistantChatMessage) { + if (assistantChatMessage == null) + { + return null; + } return BinaryContent.Create(assistantChatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index 54e5ccb94..b74e1cf0e 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -366,6 +366,10 @@ protected virtual AssistantCreationOptions PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(AssistantCreationOptions assistantCreationOptions) { + if (assistantCreationOptions == null) + { + return null; + } return BinaryContent.Create(assistantCreationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index 8c296d266..d6203fb79 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual AssistantDeletionResult PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(AssistantDeletionResult assistantDeletionResult) { + if (assistantDeletionResult == null) + { + return null; + } return BinaryContent.Create(assistantDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index f38600fa6..d60696f6a 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -366,6 +366,10 @@ protected virtual AssistantModificationOptions PersistableModelCreateCore(Binary public static implicit operator BinaryContent(AssistantModificationOptions assistantModificationOptions) { + if (assistantModificationOptions == null) + { + return null; + } return BinaryContent.Create(assistantModificationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index dcf2afef8..8b20f6949 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -90,6 +90,10 @@ protected virtual AssistantResponseFormat PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(AssistantResponseFormat assistantResponseFormat) { + if (assistantResponseFormat == null) + { + return null; + } return BinaryContent.Create(assistantResponseFormat, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index a86dfcfb5..d2c44e115 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -81,7 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -176,7 +176,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -225,6 +225,10 @@ protected virtual AssistantThread PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(AssistantThread assistantThread) { + if (assistantThread == null) + { + return null; + } return BinaryContent.Create(assistantThread, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index ead1bdd89..8ed9f26bb 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) + if (true && Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) + if (true && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -113,8 +113,8 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele } string language = default; string text = default; - IList words = default; - IList segments = default; + IReadOnlyList words = default; + IReadOnlyList segments = default; InternalCreateTranscriptionResponseVerboseJsonTask task = default; TimeSpan? duration = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -168,7 +168,7 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -218,6 +218,10 @@ protected virtual AudioTranscription PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(AudioTranscription audioTranscription) { + if (audioTranscription == null) + { + return null; + } return BinaryContent.Create(audioTranscription, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.cs b/.dotnet/src/Generated/Models/AudioTranscription.cs index fdfaffee5..687b2f3cb 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.cs @@ -21,7 +21,7 @@ internal AudioTranscription(string language, string text, TimeSpan? duration) Duration = duration; } - internal AudioTranscription(string language, string text, IList words, IList segments, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) + internal AudioTranscription(string language, string text, IReadOnlyList words, IReadOnlyList segments, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) { Language = language; Text = text; @@ -36,9 +36,9 @@ internal AudioTranscription(string language, string text, IList public string Text { get; } - public IList Words { get; } + public IReadOnlyList Words { get; } - public IList Segments { get; } + public IReadOnlyList Segments { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 0ba5e4eb1..e1b79d7df 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -79,7 +79,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J internalTimestampGranularities = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -239,6 +239,10 @@ protected virtual AudioTranscriptionOptions PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(AudioTranscriptionOptions audioTranscriptionOptions) { + if (audioTranscriptionOptions == null) + { + return null; + } return BinaryContent.Create(audioTranscriptionOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index ca3671665..cc0d8e20a 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -143,7 +143,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -192,6 +192,10 @@ protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(AudioTranslation audioTranslation) { + if (audioTranslation == null) + { + return null; + } return BinaryContent.Create(audioTranslation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index fae64d899..d127fe2aa 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -182,6 +182,10 @@ protected virtual AudioTranslationOptions PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(AudioTranslationOptions audioTranslationOptions) { + if (audioTranslationOptions == null) + { + return null; + } return BinaryContent.Create(audioTranslationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 4fa749004..4d1bde5ac 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -240,6 +240,10 @@ protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(ChatCompletion chatCompletion) { + if (chatCompletion == null) + { + return null; + } return BinaryContent.Create(chatCompletion, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index f6c132ec5..3e796697f 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -262,7 +262,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("serviceTier"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -553,7 +553,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -621,6 +621,10 @@ protected virtual ChatCompletionOptions PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(ChatCompletionOptions chatCompletionOptions) { + if (chatCompletionOptions == null) + { + return null; + } return BinaryContent.Create(chatCompletionOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index dac9e20ab..e3b1e78f5 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR functionParameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual ChatFunction PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(ChatFunction chatFunction) { + if (chatFunction == null) + { + return null; + } return BinaryContent.Create(chatFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index 1c2f0aef2..e5f6142b7 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element DeserializeFunctionArgumentsValue(prop, ref functionArguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual ChatFunctionCall PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(ChatFunctionCall chatFunctionCall) { + if (chatFunctionCall == null) + { + return null; + } return BinaryContent.Create(chatFunctionCall, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index af69f8627..4ec64d73c 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -88,6 +88,10 @@ protected virtual ChatFunctionChoice PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(ChatFunctionChoice chatFunctionChoice) { + if (chatFunctionChoice == null) + { + return null; + } return BinaryContent.Create(chatFunctionChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index e5a0b1661..85592d6ce 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatMessage))] - public abstract partial class ChatMessage : IJsonModel + public partial class ChatMessage : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,12 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.ToSerialString()); } - if (options.Format != "W" && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); this.SerializeContentValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual ChatMessage PersistableModelCreateCore(BinaryData data, ModelR public static implicit operator BinaryContent(ChatMessage chatMessage) { + if (chatMessage == null) + { + return null; + } return BinaryContent.Create(chatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index f332e4ff5..368ee1c8d 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public abstract partial class ChatMessage + public partial class ChatMessage { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs deleted file mode 100644 index d6e9189a0..000000000 --- a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using OpenAI; - -namespace OpenAI.Chat -{ - public partial class ChatMessageContent : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{format}' format."); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ChatMessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - protected virtual ChatMessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatMessageContent(document.RootElement, options); - } - - internal static ChatMessageContent DeserializeChatMessageContent(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ChatMessageContent(additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{options.Format}' format."); - } - } - - ChatMessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - protected virtual ChatMessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeChatMessageContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - public static implicit operator BinaryContent(ChatMessageContent chatMessageContent) - { - return BinaryContent.Create(chatMessageContent, ModelSerializationExtensions.WireOptions); - } - - public static explicit operator ChatMessageContent(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeChatMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index c7910819c..2cfaddfd1 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -88,6 +88,10 @@ protected virtual ChatMessageContentPart PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(ChatMessageContentPart chatMessageContentPart) { + if (chatMessageContentPart == null) + { + return null; + } return BinaryContent.Create(chatMessageContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index cef4e9254..c1d06e031 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reasoning_tokens"u8); writer.WriteNumberValue(ReasoningTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai reasoningTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual ChatOutputTokenUsageDetails PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(ChatOutputTokenUsageDetails chatOutputTokenUsageDetails) { + if (chatOutputTokenUsageDetails == null) + { + return null; + } return BinaryContent.Create(chatOutputTokenUsageDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index acdfee0d1..e2f4a00c5 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatResponseFormat))] - public abstract partial class ChatResponseFormat : IJsonModel + public partial class ChatResponseFormat : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,7 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,6 +115,10 @@ protected virtual ChatResponseFormat PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(ChatResponseFormat chatResponseFormat) { + if (chatResponseFormat == null) + { + return null; + } return BinaryContent.Create(chatResponseFormat, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index e808477d9..a904c8862 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public abstract partial class ChatResponseFormat + public partial class ChatResponseFormat { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 6c35ca29b..be762ab42 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit topLogProbabilities = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -194,6 +194,10 @@ protected virtual ChatTokenLogProbabilityDetails PersistableModelCreateCore(Bina public static implicit operator BinaryContent(ChatTokenLogProbabilityDetails chatTokenLogProbabilityDetails) { + if (chatTokenLogProbabilityDetails == null) + { + return null; + } return BinaryContent.Create(chatTokenLogProbabilityDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index f32d68b1b..3e4872d39 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("bytes"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb utf8Bytes = new ReadOnlyMemory(array); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -173,6 +173,10 @@ protected virtual ChatTokenTopLogProbabilityDetails PersistableModelCreateCore(B public static implicit operator BinaryContent(ChatTokenTopLogProbabilityDetails chatTokenTopLogProbabilityDetails) { + if (chatTokenTopLogProbabilityDetails == null) + { + return null; + } return BinaryContent.Create(chatTokenTopLogProbabilityDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index 0fb56b0af..a1a808207 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("completion_tokens_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -122,7 +122,7 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo outputTokenDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -165,6 +165,10 @@ protected virtual ChatTokenUsage PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(ChatTokenUsage chatTokenUsage) { + if (chatTokenUsage == null) + { + return null; + } return BinaryContent.Create(chatTokenUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index b4c70475e..42c658144 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri kind = prop.Value.GetString().ToChatToolKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual ChatTool PersistableModelCreateCore(BinaryData data, ModelRead public static implicit operator BinaryContent(ChatTool chatTool) { + if (chatTool == null) + { + return null; + } return BinaryContent.Create(chatTool, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index 844b3dbe9..c7cc7b0e2 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR kind = prop.Value.GetString().ToChatToolCallKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual ChatToolCall PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(ChatToolCall chatToolCall) { + if (chatToolCall == null) + { + return null; + } return BinaryContent.Create(chatToolCall, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index f08f2cdb9..f775a36af 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatToolChoice)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -88,6 +88,10 @@ protected virtual ChatToolChoice PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(ChatToolChoice chatToolChoice) { + if (chatToolChoice == null) + { + return null; + } return BinaryContent.Create(chatToolChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs index 08eddb8f6..92cb9c4ec 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs @@ -51,7 +51,7 @@ internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefi @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -94,6 +94,10 @@ protected override ToolDefinition PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(CodeInterpreterToolDefinition codeInterpreterToolDefinition) { + if (codeInterpreterToolDefinition == null) + { + return null; + } return BinaryContent.Create(codeInterpreterToolDefinition, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 3855fbb14..6798b11b8 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResou fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual CodeInterpreterToolResources PersistableModelCreateCore(Binary public static implicit operator BinaryContent(CodeInterpreterToolResources codeInterpreterToolResources) { + if (codeInterpreterToolResources == null) + { + return null; + } return BinaryContent.Create(codeInterpreterToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs index 382554fba..bcf609bd9 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDeltaUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationAudioDeltaUpdate conversationAudioDeltaUpdate) { + if (conversationAudioDeltaUpdate == null) + { + return null; + } return BinaryContent.Create(conversationAudioDeltaUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs index 2d014f839..40467daac 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioDoneUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationAudioDoneUpdate DeserializeConversationAudioDoneUpda kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationAudioDoneUpdate conversationAudioDoneUpdate) { + if (conversationAudioDoneUpdate == null) + { + return null; + } return BinaryContent.Create(conversationAudioDoneUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index 90fe4bdba..68839de3e 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -128,6 +128,10 @@ protected virtual ConversationContentPart PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(ConversationContentPart conversationContentPart) { + if (conversationContentPart == null) + { + return null; + } return BinaryContent.Create(conversationContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs index 3d635148f..bdba89023 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartFinishedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationContentPartFinishedUpdate conversationContentPartFinishedUpdate) { + if (conversationContentPartFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationContentPartFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs index b4379ee96..1d41425af 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartStartedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationContentPartStartedUpdate conversationContentPartStartedUpdate) { + if (conversationContentPartStartedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationContentPartStartedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 4be2921d1..e23ce6dba 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationErrorUpdate conversationErrorUpdate) { + if (conversationErrorUpdate == null) + { + return null; + } return BinaryContent.Create(conversationErrorUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs index 660e865db..6308e1553 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDeltaUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDeltaUpdate conversationFunctionCallArgumentsDeltaUpdate) { + if (conversationFunctionCallArgumentsDeltaUpdate == null) + { + return null; + } return BinaryContent.Create(conversationFunctionCallArgumentsDeltaUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs index f2ea9a61b..1fdabd14f 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionCallArgumentsDoneUpdate.Serialization.cs @@ -139,7 +139,7 @@ internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversat kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -191,6 +191,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDoneUpdate conversationFunctionCallArgumentsDoneUpdate) { + if (conversationFunctionCallArgumentsDoneUpdate == null) + { + return null; + } return BinaryContent.Create(conversationFunctionCallArgumentsDoneUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index 63d9b0cf4..aeb95f8c1 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -102,7 +102,7 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -145,6 +145,10 @@ protected override ConversationTool PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(ConversationFunctionTool conversationFunctionTool) { + if (conversationFunctionTool == null) + { + return null; + } return BinaryContent.Create(conversationFunctionTool, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs index c4ee9fe5b..7fca7640f 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferClearedUpdate.Serialization.cs @@ -73,7 +73,7 @@ internal static ConversationInputAudioBufferClearedUpdate DeserializeConversatio kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputAudioBufferClearedUpdate conversationInputAudioBufferClearedUpdate) { + if (conversationInputAudioBufferClearedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputAudioBufferClearedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs index f2cdb02fc..1e71b56aa 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioBufferCommittedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversat kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -138,6 +138,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputAudioBufferCommittedUpdate conversationInputAudioBufferCommittedUpdate) { + if (conversationInputAudioBufferCommittedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputAudioBufferCommittedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 04694a3bf..6bb512ba3 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -138,6 +138,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputSpeechFinishedUpdate conversationInputSpeechFinishedUpdate) { + if (conversationInputSpeechFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputSpeechFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 3c4780c25..e39370201 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -138,6 +138,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputSpeechStartedUpdate conversationInputSpeechStartedUpdate) { + if (conversationInputSpeechStartedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputSpeechStartedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs index b78b9836e..ca18ed51e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ConversationInputTokenUsageDetails DeserializeConversationInputT audioTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual ConversationInputTokenUsageDetails PersistableModelCreateCore( public static implicit operator BinaryContent(ConversationInputTokenUsageDetails conversationInputTokenUsageDetails) { + if (conversationInputTokenUsageDetails == null) + { + return null; + } return BinaryContent.Create(conversationInputTokenUsageDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index b5b16db35..a9809b413 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputTranscriptionFailedUpdate conversationInputTranscriptionFailedUpdate) { + if (conversationInputTranscriptionFailedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputTranscriptionFailedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index dd632ea4d..e8ce56cca 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationInputTranscriptionFinishedUpdate conversationInputTranscriptionFinishedUpdate) { + if (conversationInputTranscriptionFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationInputTranscriptionFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs index b23f54b78..a6183f7b6 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static ConversationInputTranscriptionOptions DeserializeConversationInp model = new ConversationTranscriptionModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual ConversationInputTranscriptionOptions PersistableModelCreateCo public static implicit operator BinaryContent(ConversationInputTranscriptionOptions conversationInputTranscriptionOptions) { + if (conversationInputTranscriptionOptions == null) + { + return null; + } return BinaryContent.Create(conversationInputTranscriptionOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index ffb3ff974..ffb2e528e 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -131,6 +131,10 @@ protected virtual ConversationItem PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(ConversationItem conversationItem) { + if (conversationItem == null) + { + return null; + } return BinaryContent.Create(conversationItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs index e546160f2..d9b37a0de 100644 --- a/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemAcknowledgedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationItemAcknowledgedUpdate DeserializeConversationItemAc kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationItemAcknowledgedUpdate conversationItemAcknowledgedUpdate) { + if (conversationItemAcknowledgedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationItemAcknowledgedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index fc3cb3f44..2f6964527 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationItemDeletedUpdate conversationItemDeletedUpdate) { + if (conversationItemDeletedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationItemDeletedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs index 3a5ebba54..d9a753cd3 100644 --- a/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemFinishedUpdate DeserializeConversationItemFinish kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationItemFinishedUpdate conversationItemFinishedUpdate) { + if (conversationItemFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationItemFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs index 8479efc9e..906263506 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStartedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemStartedUpdate DeserializeConversationItemStarted kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationItemStartedUpdate conversationItemStartedUpdate) { + if (conversationItemStartedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationItemStartedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 9b943a9e8..52d2d7fe3 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationItemTruncatedUpdate conversationItemTruncatedUpdate) { + if (conversationItemTruncatedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationItemTruncatedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs index d21be628c..35403bdb8 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ConversationOutputTokenUsageDetails DeserializeConversationOutpu audioTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual ConversationOutputTokenUsageDetails PersistableModelCreateCore public static implicit operator BinaryContent(ConversationOutputTokenUsageDetails conversationOutputTokenUsageDetails) { + if (conversationOutputTokenUsageDetails == null) + { + return null; + } return BinaryContent.Create(conversationOutputTokenUsageDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs index ff90f03ae..aea09d3b1 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionDeltaUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversati kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationOutputTranscriptionDeltaUpdate conversationOutputTranscriptionDeltaUpdate) { + if (conversationOutputTranscriptionDeltaUpdate == null) + { + return null; + } return BinaryContent.Create(conversationOutputTranscriptionDeltaUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs index 1a746ba1c..aa7a081ae 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTranscriptionFinishedUpdate.Serialization.cs @@ -117,7 +117,7 @@ internal static ConversationOutputTranscriptionFinishedUpdate DeserializeConvers kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -167,6 +167,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationOutputTranscriptionFinishedUpdate conversationOutputTranscriptionFinishedUpdate) { + if (conversationOutputTranscriptionFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationOutputTranscriptionFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index 3bd0d2110..acefb7b67 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reset_seconds"u8); writer.WriteNumberValue(ResetSeconds); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi resetSeconds = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual ConversationRateLimitDetailsItem PersistableModelCreateCore(Bi public static implicit operator BinaryContent(ConversationRateLimitDetailsItem conversationRateLimitDetailsItem) { + if (conversationRateLimitDetailsItem == null) + { + return null; + } return BinaryContent.Create(conversationRateLimitDetailsItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs index 59e0fec4e..77a2ab6fb 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdatedUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationRateLimitsUpdatedUpdate DeserializeConversationRateL kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -137,6 +137,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationRateLimitsUpdatedUpdate conversationRateLimitsUpdatedUpdate) { + if (conversationRateLimitsUpdatedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationRateLimitsUpdatedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 6a3f41cab..48ea87917 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationResponseFinishedUpdate conversationResponseFinishedUpdate) { + if (conversationResponseFinishedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationResponseFinishedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index fdc4f9820..810df12a0 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationResponseStartedUpdate conversationResponseStartedUpdate) { + if (conversationResponseStartedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationResponseStartedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index c7540d9fd..1378c2268 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationSessionConfiguredUpdate conversationSessionConfiguredUpdate) { + if (conversationSessionConfiguredUpdate == null) + { + return null; + } return BinaryContent.Create(conversationSessionConfiguredUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index f82f245dd..b269c8537 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -111,7 +111,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -276,7 +276,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -332,6 +332,10 @@ protected virtual ConversationSessionOptions PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(ConversationSessionOptions conversationSessionOptions) { + if (conversationSessionOptions == null) + { + return null; + } return BinaryContent.Create(conversationSessionOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index d8ff43151..fab09fd79 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationSessionStartedUpdate conversationSessionStartedUpdate) { + if (conversationSessionStartedUpdate == null) + { + return null; + } return BinaryContent.Create(conversationSessionStartedUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs index b84610739..598073aee 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDeltaUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpda kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationTextDeltaUpdate conversationTextDeltaUpdate) { + if (conversationTextDeltaUpdate == null) + { + return null; + } return BinaryContent.Create(conversationTextDeltaUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs index f96d80c6f..b69140c28 100644 --- a/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTextDoneUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationTextDoneUpdate DeserializeConversationTextDoneUpdate kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ConversationTextDoneUpdate conversationTextDoneUpdate) { + if (conversationTextDoneUpdate == null) + { + return null; + } return BinaryContent.Create(conversationTextDoneUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs index 3236445db..04a8e335f 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output_token_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static ConversationTokenUsage DeserializeConversationTokenUsage(JsonEle outputTokenDetails = ConversationOutputTokenUsageDetails.DeserializeConversationOutputTokenUsageDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -178,6 +178,10 @@ protected virtual ConversationTokenUsage PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(ConversationTokenUsage conversationTokenUsage) { + if (conversationTokenUsage == null) + { + return null; + } return BinaryContent.Create(conversationTokenUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index cb20f4c74..dc5a71643 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -122,6 +122,10 @@ protected virtual ConversationTool PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(ConversationTool conversationTool) { + if (conversationTool == null) + { + return null; + } return BinaryContent.Create(conversationTool, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index 6ed5abccb..d308a20ee 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -105,6 +105,10 @@ protected virtual ConversationTurnDetectionOptions PersistableModelCreateCore(Bi public static implicit operator BinaryContent(ConversationTurnDetectionOptions conversationTurnDetectionOptions) { + if (conversationTurnDetectionOptions == null) + { + return null; + } return BinaryContent.Create(conversationTurnDetectionOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index 416f0710f..3f4d7eab9 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -186,6 +186,10 @@ protected virtual ConversationUpdate PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(ConversationUpdate conversationUpdate) { + if (conversationUpdate == null) + { + return null; + } return BinaryContent.Create(conversationUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 2832ad322..c71be3f7c 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -59,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -189,6 +189,10 @@ protected virtual EmbeddingGenerationOptions PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(EmbeddingGenerationOptions embeddingGenerationOptions) { + if (embeddingGenerationOptions == null) + { + return null; + } return BinaryContent.Create(embeddingGenerationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index f2c7a63f5..49f4c9685 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement e totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual EmbeddingTokenUsage PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(EmbeddingTokenUsage embeddingTokenUsage) { + if (embeddingTokenUsage == null) + { + return null; + } return BinaryContent.Create(embeddingTokenUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index 583e067fb..43dcabbbf 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual FileChunkingStrategy PersistableModelCreateCore(BinaryData dat public static implicit operator BinaryContent(FileChunkingStrategy fileChunkingStrategy) { + if (fileChunkingStrategy == null) + { + return null; + } return BinaryContent.Create(fileChunkingStrategy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index e901c0d84..455776386 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual FileDeletionResult PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(FileDeletionResult fileDeletionResult) { + if (fileDeletionResult == null) + { + return null; + } return BinaryContent.Create(fileDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index df928d774..fb331ff03 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual FileFromStoreRemovalResult PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(FileFromStoreRemovalResult fileFromStoreRemovalResult) { + if (fileFromStoreRemovalResult == null) + { + return null; + } return BinaryContent.Create(fileFromStoreRemovalResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 57fc9d33d..04fe002e3 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(_scoreThreshold); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso scoreThreshold = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual FileSearchRankingOptions PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(FileSearchRankingOptions fileSearchRankingOptions) { + if (fileSearchRankingOptions == null) + { + return null; + } return BinaryContent.Create(fileSearchRankingOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 07e788450..393477d65 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -66,7 +66,7 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -109,6 +109,10 @@ protected override ToolDefinition PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(FileSearchToolDefinition fileSearchToolDefinition) { + if (fileSearchToolDefinition == null) + { + return null; + } return BinaryContent.Create(fileSearchToolDefinition, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index c08d45d44..df2ec91f8 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("vector_stores"u8); this.SerializeNewVectorStores(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -127,7 +127,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE newVectorStores = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -170,6 +170,10 @@ protected virtual FileSearchToolResources PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(FileSearchToolResources fileSearchToolResources) { + if (fileSearchToolResources == null) + { + return null; + } return BinaryContent.Create(fileSearchToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index 81e1b574b..eb495d8a2 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -122,6 +122,10 @@ protected virtual FineTuningIntegration PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(FineTuningIntegration fineTuningIntegration) { + if (fineTuningIntegration == null) + { + return null; + } return BinaryContent.Create(fineTuningIntegration, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index 60c8dff54..1001f4ab3 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegration tags = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -211,6 +211,10 @@ protected virtual FineTuningIntegrationWandbWandb PersistableModelCreateCore(Bin public static implicit operator BinaryContent(FineTuningIntegrationWandbWandb fineTuningIntegrationWandbWandb) { + if (fineTuningIntegrationWandbWandb == null) + { + return null; + } return BinaryContent.Create(fineTuningIntegrationWandbWandb, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index 305c274d4..68aff9421 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -192,7 +192,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("estimatedFinish"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -399,7 +399,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode estimatedFinish = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -461,6 +461,10 @@ protected virtual FineTuningJob PersistableModelCreateCore(BinaryData data, Mode public static implicit operator BinaryContent(FineTuningJob fineTuningJob) { + if (fineTuningJob == null) + { + return null; + } return BinaryContent.Create(fineTuningJob, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index 96e00c7c4..20bbc87e6 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("param"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static FineTuningJobError DeserializeFineTuningJobError(JsonElement ele @param = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -162,6 +162,10 @@ protected virtual FineTuningJobError PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(FineTuningJobError fineTuningJobError) { + if (fineTuningJobError == null) + { + return null; + } return BinaryContent.Create(fineTuningJobError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index 28247da6b..2c3beecb5 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement ele @object = new InternalFineTuningJobEventObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -178,6 +178,10 @@ protected virtual FineTuningJobEvent PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(FineTuningJobEvent fineTuningJobEvent) { + if (fineTuningJobEvent == null) + { + return null; + } return BinaryContent.Create(fineTuningJobEvent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index 19a1ce083..abe7ba36f 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -67,7 +67,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -128,7 +128,7 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index 0d3cd7581..eeaf45f5e 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("seed"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -212,7 +212,7 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme seed = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -263,6 +263,10 @@ protected virtual FineTuningOptions PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(FineTuningOptions fineTuningOptions) { + if (fineTuningOptions == null) + { + return null; + } return BinaryContent.Create(fineTuningOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 9e1b979b9..8e59d1d05 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -72,7 +72,7 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -115,6 +115,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(FunctionChatMessage functionChatMessage) { + if (functionChatMessage == null) + { + return null; + } return BinaryContent.Create(functionChatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index 837a00f66..ecd5a7ffd 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -62,7 +62,7 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -105,6 +105,10 @@ protected override ToolDefinition PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(FunctionToolDefinition functionToolDefinition) { + if (functionToolDefinition == null) + { + return null; + } return BinaryContent.Create(functionToolDefinition, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index 6e4b21bf1..a89305aef 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(ImageUri.AbsoluteUri); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo imageUri = new Uri(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -154,6 +154,10 @@ protected virtual GeneratedImage PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(GeneratedImage generatedImage) { + if (generatedImage == null) + { + return null; + } return BinaryContent.Create(generatedImage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index e9554a998..b58c56430 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -93,6 +93,10 @@ protected virtual GeneratedImageCollection PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(GeneratedImageCollection generatedImageCollection) { + if (generatedImageCollection == null) + { + return null; + } return BinaryContent.Create(generatedImageCollection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs index 4872cf645..1e3d8a420 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs @@ -63,7 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected virtual HyperparameterOptions PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(HyperparameterOptions hyperparameterOptions) { + if (hyperparameterOptions == null) + { + return null; + } return BinaryContent.Create(hyperparameterOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index fb1d0f810..4b56a9f0a 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -95,7 +95,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -210,7 +210,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -262,6 +262,10 @@ protected virtual ImageEditOptions PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(ImageEditOptions imageEditOptions) { + if (imageEditOptions == null) + { + return null; + } return BinaryContent.Create(imageEditOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index f310b55e0..cb8f165d3 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -102,7 +102,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -222,7 +222,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -274,6 +274,10 @@ protected virtual ImageGenerationOptions PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(ImageGenerationOptions imageGenerationOptions) { + if (imageGenerationOptions == null) + { + return null; + } return BinaryContent.Create(imageGenerationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index d33bb82fb..860fa87f2 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -85,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -184,7 +184,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -234,6 +234,10 @@ protected virtual ImageVariationOptions PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(ImageVariationOptions imageVariationOptions) { + if (imageVariationOptions == null) + { + return null; + } return BinaryContent.Create(imageVariationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index 0a1b5246b..a8cfb5281 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("data"u8); writer.WriteBase64StringValue(Data.ToArray(), "D"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAddUploadPartRequest DeserializeInternalAddUploadPartReq data = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalAddUploadPartRequest PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalAddUploadPartRequest internalAddUploadPartRequest) { + if (internalAddUploadPartRequest == null) + { + return null; + } return BinaryContent.Create(internalAddUploadPartRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs index 73e5f782f..cc5ef9d4a 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatJsonObject DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalAssistantResponseFormatJsonObject internalAssistantResponseFormatJsonObject) { + if (internalAssistantResponseFormatJsonObject == null) + { + return null; + } return BinaryContent.Create(internalAssistantResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index ca30aa11b..a7a402637 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -74,7 +74,7 @@ internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -117,6 +117,10 @@ protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalAssistantResponseFormatJsonSchema internalAssistantResponseFormatJsonSchema) { + if (internalAssistantResponseFormatJsonSchema == null) + { + return null; + } return BinaryContent.Create(internalAssistantResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs index ac0400fcc..a7e939ffa 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatText DeserializeInternalAssistant @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalAssistantResponseFormatText internalAssistantResponseFormatText) { + if (internalAssistantResponseFormatText == null) + { + return null; + } return BinaryContent.Create(internalAssistantResponseFormatText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index efc25ab13..efe91100e 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("max_num_results"u8); writer.WriteNumberValue(InternalMaxNumResults.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs internalMaxNumResults = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalAssistantToolsFileSearchFileSearch PersistableModelCre public static implicit operator BinaryContent(InternalAssistantToolsFileSearchFileSearch internalAssistantToolsFileSearchFileSearch) { + if (internalAssistantToolsFileSearchFileSearch == null) + { + return null; + } return BinaryContent.Create(internalAssistantToolsFileSearchFileSearch, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index 31d837982..c73097323 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalAssistantToolsFileSearchTypeOnly DeserializeInternalAssi @type = new InternalAssistantToolsFileSearchTypeOnlyType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -124,6 +124,10 @@ protected virtual InternalAssistantToolsFileSearchTypeOnly PersistableModelCreat public static implicit operator BinaryContent(InternalAssistantToolsFileSearchTypeOnly internalAssistantToolsFileSearchTypeOnly) { + if (internalAssistantToolsFileSearchTypeOnly == null) + { + return null; + } return BinaryContent.Create(internalAssistantToolsFileSearchTypeOnly, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index 7f3bf91d3..bd02f8444 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAssistantsNamedToolChoiceFunction DeserializeInternalAss name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalAssistantsNamedToolChoiceFunction PersistableModelCrea public static implicit operator BinaryContent(InternalAssistantsNamedToolChoiceFunction internalAssistantsNamedToolChoiceFunction) { + if (internalAssistantsNamedToolChoiceFunction == null) + { + return null; + } return BinaryContent.Create(internalAssistantsNamedToolChoiceFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs index 51478a649..2c92732ee 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategy DeserializeInternalAutoChunkingStra @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(InternalAutoChunkingStrategy internalAutoChunkingStrategy) { + if (internalAutoChunkingStrategy == null) + { + return null; + } return BinaryContent.Create(internalAutoChunkingStrategy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs index a0402b53d..c258abd77 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategyRequestParam DeserializeInternalAuto @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override InternalFileChunkingStrategyRequestParam PersistableModelCrea public static implicit operator BinaryContent(InternalAutoChunkingStrategyRequestParam internalAutoChunkingStrategyRequestParam) { + if (internalAutoChunkingStrategyRequestParam == null) + { + return null; + } return BinaryContent.Create(internalAutoChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs index 4f3b7aa56..c3d3f4c0d 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("line"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchError DeserializeInternalBatchError(JsonElement ele line = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -181,6 +181,10 @@ protected virtual InternalBatchError PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalBatchError internalBatchError) { + if (internalBatchError == null) + { + return null; + } return BinaryContent.Create(internalBatchError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index 68734fba1..7d09b6dca 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement e data = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -153,6 +153,10 @@ protected virtual InternalBatchErrors PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(InternalBatchErrors internalBatchErrors) { + if (internalBatchErrors == null) + { + return null; + } return BinaryContent.Create(internalBatchErrors, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index 7d9e008d4..ee8c9a1b2 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -368,7 +368,7 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -432,6 +432,10 @@ protected virtual InternalBatchJob PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(InternalBatchJob internalBatchJob) { + if (internalBatchJob == null) + { + return null; + } return BinaryContent.Create(internalBatchJob, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index bfd3ab516..e1af9a276 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("failed"u8); writer.WriteNumberValue(Failed); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts failed = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalBatchRequestCounts PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalBatchRequestCounts internalBatchRequestCounts) { + if (internalBatchRequestCounts == null) + { + return null; + } return BinaryContent.Create(internalBatchRequestCounts, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs index be87376df..103045cb5 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J url = new Uri(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -154,6 +154,10 @@ protected virtual InternalBatchRequestInput PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(InternalBatchRequestInput internalBatchRequestInput) { + if (internalBatchRequestInput == null) + { + return null; + } return BinaryContent.Create(internalBatchRequestInput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index 12e238087..e2f37f4af 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("error"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput error = InternalBatchRequestOutputError.DeserializeInternalBatchRequestOutputError(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -181,6 +181,10 @@ protected virtual InternalBatchRequestOutput PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalBatchRequestOutput internalBatchRequestOutput) { + if (internalBatchRequestOutput == null) + { + return null; + } return BinaryContent.Create(internalBatchRequestOutput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs index b88d5683b..a8c726285 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestO message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual InternalBatchRequestOutputError PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalBatchRequestOutputError internalBatchRequestOutputError) { + if (internalBatchRequestOutputError == null) + { + return null; + } return BinaryContent.Create(internalBatchRequestOutputError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs index d908f1cc3..435633b71 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs @@ -60,7 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalBatchRequestOutputResponse DeserializeInternalBatchReque body = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -184,6 +184,10 @@ protected virtual InternalBatchRequestOutputResponse PersistableModelCreateCore( public static implicit operator BinaryContent(InternalBatchRequestOutputResponse internalBatchRequestOutputResponse) { + if (internalBatchRequestOutputResponse == null) + { + return null; + } return BinaryContent.Create(internalBatchRequestOutputResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index 1b616862a..c43769045 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionFunctionCallOption DeserializeInternalChat name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalChatCompletionFunctionCallOption PersistableModelCreat public static implicit operator BinaryContent(InternalChatCompletionFunctionCallOption internalChatCompletionFunctionCallOption) { + if (internalChatCompletionFunctionCallOption == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionFunctionCallOption, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index e6a5907f3..1f5d4d3ad 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn DeserializeArgumentsValue(prop, ref arguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual InternalChatCompletionMessageToolCallChunkFunction Persistable public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallChunkFunction internalChatCompletionMessageToolCallChunkFunction) { + if (internalChatCompletionMessageToolCallChunkFunction == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionMessageToolCallChunkFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index 418509beb..48fde14d1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionMessageToolCallFunction DeserializeInterna DeserializeArgumentsValue(prop, ref arguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionMessageToolCallFunction PersistableModel public static implicit operator BinaryContent(InternalChatCompletionMessageToolCallFunction internalChatCompletionMessageToolCallFunction) { + if (internalChatCompletionMessageToolCallFunction == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionMessageToolCallFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index c449bd57e..c2d62dcba 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionNamedToolChoice DeserializeInternalChatCom function = InternalChatCompletionNamedToolChoiceFunction.DeserializeInternalChatCompletionNamedToolChoiceFunction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionNamedToolChoice PersistableModelCreateCo public static implicit operator BinaryContent(InternalChatCompletionNamedToolChoice internalChatCompletionNamedToolChoice) { + if (internalChatCompletionNamedToolChoice == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionNamedToolChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index 3f9d7d0be..4c3b8a036 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionNamedToolChoiceFunction DeserializeInterna name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalChatCompletionNamedToolChoiceFunction PersistableModel public static implicit operator BinaryContent(InternalChatCompletionNamedToolChoiceFunction internalChatCompletionNamedToolChoiceFunction) { + if (internalChatCompletionNamedToolChoiceFunction == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionNamedToolChoiceFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index 3c1977083..5c1248e27 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartImage Deserialize imageUrl = InternalChatCompletionRequestMessageContentPartImageImageUrl.DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionRequestMessageContentPartImage Persistab public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartImage internalChatCompletionRequestMessageContentPartImage) { + if (internalChatCompletionRequestMessageContentPartImage == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionRequestMessageContentPartImage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index 19f395d7c..514e40e67 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des url = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalChatCompletionRequestMessageContentPartImageImageUrl P public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartImageImageUrl internalChatCompletionRequestMessageContentPartImageImageUrl) { + if (internalChatCompletionRequestMessageContentPartImageImageUrl == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionRequestMessageContentPartImageImageUrl, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 4cce8f17f..0bd526080 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("refusal"u8); writer.WriteStringValue(Refusal); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartRefusal Deseriali refusal = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionRequestMessageContentPartRefusal Persist public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartRefusal internalChatCompletionRequestMessageContentPartRefusal) { + if (internalChatCompletionRequestMessageContentPartRefusal == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionRequestMessageContentPartRefusal, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index 4a296da66..d318473d8 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartText DeserializeI text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionRequestMessageContentPartText Persistabl public static implicit operator BinaryContent(InternalChatCompletionRequestMessageContentPartText internalChatCompletionRequestMessageContentPartText) { + if (internalChatCompletionRequestMessageContentPartText == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionRequestMessageContentPartText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index b61ea60bb..5e35443ff 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (true && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -215,6 +215,10 @@ protected virtual InternalChatCompletionResponseMessage PersistableModelCreateCo public static implicit operator BinaryContent(InternalChatCompletionResponseMessage internalChatCompletionResponseMessage) { + if (internalChatCompletionResponseMessage == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionResponseMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index 9460c15f2..4bea570ba 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInt arguments = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalChatCompletionResponseMessageFunctionCall PersistableM public static implicit operator BinaryContent(InternalChatCompletionResponseMessageFunctionCall internalChatCompletionResponseMessageFunctionCall) { + if (internalChatCompletionResponseMessageFunctionCall == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionResponseMessageFunctionCall, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs index 3f7b9a9da..cf88a53b3 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("include_usage"u8); writer.WriteBooleanValue(IncludeUsage.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompl includeUsage = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalChatCompletionStreamOptions PersistableModelCreateCore public static implicit operator BinaryContent(InternalChatCompletionStreamOptions internalChatCompletionStreamOptions) { + if (internalChatCompletionStreamOptions == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionStreamOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index f013f30f0..15f0f3e84 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -215,6 +215,10 @@ protected virtual InternalChatCompletionStreamResponseDelta PersistableModelCrea public static implicit operator BinaryContent(InternalChatCompletionStreamResponseDelta internalChatCompletionStreamResponseDelta) { + if (internalChatCompletionStreamResponseDelta == null) + { + return null; + } return BinaryContent.Create(internalChatCompletionStreamResponseDelta, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs index 0275cf204..22c9f1605 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatJsonObject DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -94,6 +94,10 @@ protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(InternalChatResponseFormatJsonObject internalChatResponseFormatJsonObject) { + if (internalChatResponseFormatJsonObject == null) + { + return null; + } return BinaryContent.Create(internalChatResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index 7f43ba6f5..2a25b0327 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -67,7 +67,7 @@ internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -110,6 +110,10 @@ protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(InternalChatResponseFormatJsonSchema internalChatResponseFormatJsonSchema) { + if (internalChatResponseFormatJsonSchema == null) + { + return null; + } return BinaryContent.Create(internalChatResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs index a4983c162..2100a5dfd 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatText DeserializeInternalChatResponseFo @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -94,6 +94,10 @@ protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(InternalChatResponseFormatText internalChatResponseFormatText) { + if (internalChatResponseFormatText == null) + { + return null; + } return BinaryContent.Create(internalChatResponseFormatText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 1fd85a174..20bd2f55e 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("md5"u8); writer.WriteStringValue(Md5); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadR md5 = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual InternalCompleteUploadRequest PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalCompleteUploadRequest internalCompleteUploadRequest) { + if (internalCompleteUploadRequest == null) + { + return null; + } return BinaryContent.Create(internalCompleteUploadRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs index b51681747..685addea4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateAssistantRequestToolResources DeserializeInternalC fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalCreateAssistantRequestToolResources PersistableModelCr public static implicit operator BinaryContent(InternalCreateAssistantRequestToolResources internalCreateAssistantRequestToolResources) { + if (internalCreateAssistantRequestToolResources == null) + { + return null; + } return BinaryContent.Create(internalCreateAssistantRequestToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index eec3ca50a..36c62aac1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalCreateAssistantRequestToolResourcesCodeInterpreter Per public static implicit operator BinaryContent(InternalCreateAssistantRequestToolResourcesCodeInterpreter internalCreateAssistantRequestToolResourcesCodeInterpreter) { + if (internalCreateAssistantRequestToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalCreateAssistantRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index 48e794ffb..a9487ca5d 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -69,7 +69,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -152,7 +152,7 @@ internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -195,6 +195,10 @@ protected virtual InternalCreateBatchRequest PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalCreateBatchRequest internalCreateBatchRequest) { + if (internalCreateBatchRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateBatchRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index 14fa3ee4e..327b4890c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -165,7 +165,7 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -216,6 +216,10 @@ protected virtual InternalCreateChatCompletionFunctionResponse PersistableModelC public static implicit operator BinaryContent(InternalCreateChatCompletionFunctionResponse internalCreateChatCompletionFunctionResponse) { + if (internalCreateChatCompletionFunctionResponse == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionFunctionResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index 1ed580715..b4f1f585e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteObjectValue(Message, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeIn message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalCreateChatCompletionFunctionResponseChoice Persistable public static implicit operator BinaryContent(InternalCreateChatCompletionFunctionResponseChoice internalCreateChatCompletionFunctionResponseChoice) { + if (internalCreateChatCompletionFunctionResponseChoice == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionFunctionResponseChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index 760376208..69403c77f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateChatCompletionResponseChoice DeserializeInternalCr logprobs = InternalCreateChatCompletionResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -173,6 +173,10 @@ protected virtual InternalCreateChatCompletionResponseChoice PersistableModelCre public static implicit operator BinaryContent(InternalCreateChatCompletionResponseChoice internalCreateChatCompletionResponseChoice) { + if (internalCreateChatCompletionResponseChoice == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionResponseChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 015fd2424..f7bb85157 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeIn refusal = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected virtual InternalCreateChatCompletionResponseChoiceLogprobs Persistable public static implicit operator BinaryContent(InternalCreateChatCompletionResponseChoiceLogprobs internalCreateChatCompletionResponseChoiceLogprobs) { + if (internalCreateChatCompletionResponseChoiceLogprobs == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 63b9f8d10..62624c359 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -57,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("finishReason"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual InternalCreateChatCompletionStreamResponseChoice PersistableMo public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseChoice internalCreateChatCompletionStreamResponseChoice) { + if (internalCreateChatCompletionStreamResponseChoice == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionStreamResponseChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index a4543ecb6..a9c6d1509 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs Deseria refusal = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -183,6 +183,10 @@ protected virtual InternalCreateChatCompletionStreamResponseChoiceLogprobs Persi public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseChoiceLogprobs internalCreateChatCompletionStreamResponseChoiceLogprobs) { + if (internalCreateChatCompletionStreamResponseChoiceLogprobs == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionStreamResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index 1e823185c..2729b9e7c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInter totalTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalCreateChatCompletionStreamResponseUsage PersistableMod public static implicit operator BinaryContent(InternalCreateChatCompletionStreamResponseUsage internalCreateChatCompletionStreamResponseUsage) { + if (internalCreateChatCompletionStreamResponseUsage == null) + { + return null; + } return BinaryContent.Create(internalCreateChatCompletionStreamResponseUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index 9e89c3b81..ea5ce997e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -254,7 +254,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(User); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -489,7 +489,7 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet user = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -551,6 +551,10 @@ protected virtual InternalCreateCompletionRequest PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalCreateCompletionRequest internalCreateCompletionRequest) { + if (internalCreateCompletionRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateCompletionRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index 2de0c6d19..8ff5921f9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -217,6 +217,10 @@ protected virtual InternalCreateCompletionResponse PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalCreateCompletionResponse internalCreateCompletionResponse) { + if (internalCreateCompletionResponse == null) + { + return null; + } return BinaryContent.Create(internalCreateCompletionResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index 7dee78c39..1979a5fe2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateCompletionResponseChoice DeserializeInternalCreate text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -173,6 +173,10 @@ protected virtual InternalCreateCompletionResponseChoice PersistableModelCreateC public static implicit operator BinaryContent(InternalCreateCompletionResponseChoice internalCreateCompletionResponseChoice) { + if (internalCreateCompletionResponseChoice == null) + { + return null; + } return BinaryContent.Create(internalCreateCompletionResponseChoice, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index b75da8e4f..c47f11632 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -205,7 +205,7 @@ internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeIntern topLogprobs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -248,6 +248,10 @@ protected virtual InternalCreateCompletionResponseChoiceLogprobs PersistableMode public static implicit operator BinaryContent(InternalCreateCompletionResponseChoiceLogprobs internalCreateCompletionResponseChoiceLogprobs) { + if (internalCreateCompletionResponseChoiceLogprobs == null) + { + return null; + } return BinaryContent.Create(internalCreateCompletionResponseChoiceLogprobs, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index e6b7606d4..ebea86565 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("project"u8); writer.WriteStringValue(Project); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial project = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -211,6 +211,10 @@ protected virtual InternalCreateFineTuningJobRequestWandbIntegrationWandb Persis public static implicit operator BinaryContent(InternalCreateFineTuningJobRequestWandbIntegrationWandb internalCreateFineTuningJobRequestWandbIntegrationWandb) { + if (internalCreateFineTuningJobRequestWandbIntegrationWandb == null) + { + return null; + } return BinaryContent.Create(internalCreateFineTuningJobRequestWandbIntegrationWandb, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 575a15b38..471899a6b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -218,7 +218,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -445,7 +445,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea toolChoice = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -505,6 +505,10 @@ protected virtual InternalCreateThreadAndRunRequest PersistableModelCreateCore(B public static implicit operator BinaryContent(InternalCreateThreadAndRunRequest internalCreateThreadAndRunRequest) { + if (internalCreateThreadAndRunRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadAndRunRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs index 8d0026979..ded12e75f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadAndRunRequestToolResources DeserializeIntern fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalCreateThreadAndRunRequestToolResources PersistableMode public static implicit operator BinaryContent(InternalCreateThreadAndRunRequestToolResources internalCreateThreadAndRunRequestToolResources) { + if (internalCreateThreadAndRunRequestToolResources == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadAndRunRequestToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index a559455b5..141e218cd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter De fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter public static implicit operator BinaryContent(InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter internalCreateThreadAndRunRequestToolResourcesCodeInterpreter) { + if (internalCreateThreadAndRunRequestToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadAndRunRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs index d2fa599ab..b9e1a4ee7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadRequestToolResources DeserializeInternalCrea fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalCreateThreadRequestToolResources PersistableModelCreat public static implicit operator BinaryContent(InternalCreateThreadRequestToolResources internalCreateThreadRequestToolResources) { + if (internalCreateThreadRequestToolResources == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadRequestToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 9554b94f5..1e6146b9e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalCreateThreadRequestToolResourcesCodeInterpreter Persis public static implicit operator BinaryContent(InternalCreateThreadRequestToolResourcesCodeInterpreter internalCreateThreadRequestToolResourcesCodeInterpreter) { + if (internalCreateThreadRequestToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs index 44e8d5b1e..e432b91e0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesFileSearchBase)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -70,7 +70,7 @@ internal static InternalCreateThreadRequestToolResourcesFileSearchBase Deseriali IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -113,6 +113,10 @@ protected virtual InternalCreateThreadRequestToolResourcesFileSearchBase Persist public static implicit operator BinaryContent(InternalCreateThreadRequestToolResourcesFileSearchBase internalCreateThreadRequestToolResourcesFileSearchBase) { + if (internalCreateThreadRequestToolResourcesFileSearchBase == null) + { + return null; + } return BinaryContent.Create(internalCreateThreadRequestToolResourcesFileSearchBase, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index 5bf83e21b..14ed7a98e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranscriptionResponseJson DeserializeInternalCreat text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalCreateTranscriptionResponseJson PersistableModelCreate public static implicit operator BinaryContent(InternalCreateTranscriptionResponseJson internalCreateTranscriptionResponseJson) { + if (internalCreateTranscriptionResponseJson == null) + { + return null; + } return BinaryContent.Create(internalCreateTranscriptionResponseJson, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index 70a704fab..ddaff2f1a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranslationResponseJson DeserializeInternalCreateT text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalCreateTranslationResponseJson PersistableModelCreateCo public static implicit operator BinaryContent(InternalCreateTranslationResponseJson internalCreateTranslationResponseJson) { + if (internalCreateTranslationResponseJson == null) + { + return null; + } return BinaryContent.Create(internalCreateTranslationResponseJson, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index f9b583329..121cd3ce8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("mime_type"u8); writer.WriteStringValue(MimeType); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCreateUploadRequest DeserializeInternalCreateUploadReque mimeType = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual InternalCreateUploadRequest PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(InternalCreateUploadRequest internalCreateUploadRequest) { + if (internalCreateUploadRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateUploadRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index c7611a609..792fe9f39 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCre chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -172,6 +172,10 @@ protected virtual InternalCreateVectorStoreFileBatchRequest PersistableModelCrea public static implicit operator BinaryContent(InternalCreateVectorStoreFileBatchRequest internalCreateVectorStoreFileBatchRequest) { + if (internalCreateVectorStoreFileBatchRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateVectorStoreFileBatchRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index a02b10b9f..ea7862847 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalCreateVectorStoreFileRequest PersistableModelCreateCor public static implicit operator BinaryContent(InternalCreateVectorStoreFileRequest internalCreateVectorStoreFileRequest) { + if (internalCreateVectorStoreFileRequest == null) + { + return null; + } return BinaryContent.Create(internalCreateVectorStoreFileRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index c5bdd10d1..60f4ec948 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual InternalFileChunkingStrategyRequestParam PersistableModelCreat public static implicit operator BinaryContent(InternalFileChunkingStrategyRequestParam internalFileChunkingStrategyRequestParam) { + if (internalFileChunkingStrategyRequestParam == null) + { + return null; + } return BinaryContent.Create(internalFileChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index fd7cdda5e..b990c6541 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -45,7 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J purpose = new FileUploadPurpose(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalFileUploadOptions PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(InternalFileUploadOptions internalFileUploadOptions) { + if (internalFileUploadOptions == null) + { + return null; + } return BinaryContent.Create(internalFileUploadOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index ba0f31eb7..e54d56517 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -108,7 +108,7 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -158,6 +158,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(InternalFineTuneChatCompletionRequestAssistantMessage internalFineTuneChatCompletionRequestAssistantMessage) { + if (internalFineTuneChatCompletionRequestAssistantMessage == null) + { + return null; + } return BinaryContent.Create(internalFineTuneChatCompletionRequestAssistantMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index ef36fb3c9..4c6448cec 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -122,6 +122,10 @@ protected virtual InternalFineTuningIntegration PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalFineTuningIntegration internalFineTuningIntegration) { + if (internalFineTuningIntegration == null) + { + return null; + } return BinaryContent.Create(internalFineTuningIntegration, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index f571a14a7..5658f3ef8 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalFineTuningIntegration PersistableModelCreateCore(Bina public static implicit operator BinaryContent(InternalFineTuningIntegrationWandb internalFineTuningIntegrationWandb) { + if (internalFineTuningIntegrationWandb == null) + { + return null; + } return BinaryContent.Create(internalFineTuningIntegrationWandb, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index 7a8f75bd2..ef1ab9143 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJob @object = new InternalFineTuningJobCheckpointObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -202,6 +202,10 @@ protected virtual InternalFineTuningJobCheckpoint PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalFineTuningJobCheckpoint internalFineTuningJobCheckpoint) { + if (internalFineTuningJobCheckpoint == null) + { + return null; + } return BinaryContent.Create(internalFineTuningJobCheckpoint, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs index 5cf4f4076..52ee0448d 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("full_valid_mean_token_accuracy"u8); writer.WriteNumberValue(FullValidMeanTokenAccuracy.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -175,7 +175,7 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu fullValidMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -226,6 +226,10 @@ protected virtual InternalFineTuningJobCheckpointMetrics PersistableModelCreateC public static implicit operator BinaryContent(InternalFineTuningJobCheckpointMetrics internalFineTuningJobCheckpointMetrics) { + if (internalFineTuningJobCheckpointMetrics == null) + { + return null; + } return BinaryContent.Create(internalFineTuningJobCheckpointMetrics, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index 826fdf7c4..2f5a99d7b 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -180,7 +180,7 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat functions = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -223,6 +223,10 @@ protected virtual InternalFinetuneChatRequestInput PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalFinetuneChatRequestInput internalFinetuneChatRequestInput) { + if (internalFinetuneChatRequestInput == null) + { + return null; + } return BinaryContent.Create(internalFinetuneChatRequestInput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs index 228c2abaa..30c684544 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("completion"u8); writer.WriteStringValue(Completion); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetu completion = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual InternalFinetuneCompletionRequestInput PersistableModelCreateC public static implicit operator BinaryContent(InternalFinetuneCompletionRequestInput internalFinetuneCompletionRequestInput) { + if (internalFinetuneCompletionRequestInput == null) + { + return null; + } return BinaryContent.Create(internalFinetuneCompletionRequestInput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index e1a1a5689..1a1fb60f9 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition parameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -183,6 +183,10 @@ protected virtual InternalFunctionDefinition PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalFunctionDefinition internalFunctionDefinition) { + if (internalFunctionDefinition == null) + { + return null; + } return BinaryContent.Create(internalFunctionDefinition, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs index 4a5de31ea..cf2589d53 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionParameters.Serialization.cs @@ -103,6 +103,10 @@ protected virtual InternalFunctionParameters PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalFunctionParameters internalFunctionParameters) { + if (internalFunctionParameters == null) + { + return null; + } return BinaryContent.Create(internalFunctionParameters, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 66377eadf..4de8caa0c 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListAssistantsResponse DeserializeInternalListAssistants hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListAssistantsResponse PersistableModelCreateCore(Bina public static implicit operator BinaryContent(InternalListAssistantsResponse internalListAssistantsResponse) { + if (internalListAssistantsResponse == null) + { + return null; + } return BinaryContent.Create(internalListAssistantsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index 8fa3c921d..b2a0325c6 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListBatchesResponse DeserializeInternalListBatchesRespon @object = new InternalListBatchesResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListBatchesResponse PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(InternalListBatchesResponse internalListBatchesResponse) { + if (internalListBatchesResponse == null) + { + return null; + } return BinaryContent.Create(internalListBatchesResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index 56ca2e33b..ecc8440c6 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static InternalListFineTuningJobCheckpointsResponse DeserializeInternal hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -212,6 +212,10 @@ protected virtual InternalListFineTuningJobCheckpointsResponse PersistableModelC public static implicit operator BinaryContent(InternalListFineTuningJobCheckpointsResponse internalListFineTuningJobCheckpointsResponse) { + if (internalListFineTuningJobCheckpointsResponse == null) + { + return null; + } return BinaryContent.Create(internalListFineTuningJobCheckpointsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index 6489a37cf..e700b47fd 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListFineTuningJobEventsResponse DeserializeInternalListF @object = new InternalListFineTuningJobEventsResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -160,6 +160,10 @@ protected virtual InternalListFineTuningJobEventsResponse PersistableModelCreate public static implicit operator BinaryContent(InternalListFineTuningJobEventsResponse internalListFineTuningJobEventsResponse) { + if (internalListFineTuningJobEventsResponse == null) + { + return null; + } return BinaryContent.Create(internalListFineTuningJobEventsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index 6f8793420..691a66723 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListMessagesResponse DeserializeInternalListMessagesResp hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListMessagesResponse PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalListMessagesResponse internalListMessagesResponse) { + if (internalListMessagesResponse == null) + { + return null; + } return BinaryContent.Create(internalListMessagesResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index 438084018..cfa70a193 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListPaginatedFineTuningJobsResponse DeserializeInternalL @object = new InternalListPaginatedFineTuningJobsResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -160,6 +160,10 @@ protected virtual InternalListPaginatedFineTuningJobsResponse PersistableModelCr public static implicit operator BinaryContent(InternalListPaginatedFineTuningJobsResponse internalListPaginatedFineTuningJobsResponse) { + if (internalListPaginatedFineTuningJobsResponse == null) + { + return null; + } return BinaryContent.Create(internalListPaginatedFineTuningJobsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 426a97cd1..568099227 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResp hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListRunStepsResponse PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalListRunStepsResponse internalListRunStepsResponse) { + if (internalListRunStepsResponse == null) + { + return null; + } return BinaryContent.Create(internalListRunStepsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index ae1d3ed41..a18bb7c40 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunsResponse DeserializeInternalListRunsResponse(Jso hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListRunsResponse PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalListRunsResponse internalListRunsResponse) { + if (internalListRunsResponse == null) + { + return null; + } return BinaryContent.Create(internalListRunsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index e41d11358..deba50bb2 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListThreadsResponse DeserializeInternalListThreadsRespon hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListThreadsResponse PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(InternalListThreadsResponse internalListThreadsResponse) { + if (internalListThreadsResponse == null) + { + return null; + } return BinaryContent.Create(internalListThreadsResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index 7edeacad9..8d2b5fdf2 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoreFilesResponse DeserializeInternalListVect hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListVectorStoreFilesResponse PersistableModelCreateCor public static implicit operator BinaryContent(InternalListVectorStoreFilesResponse internalListVectorStoreFilesResponse) { + if (internalListVectorStoreFilesResponse == null) + { + return null; + } return BinaryContent.Create(internalListVectorStoreFilesResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 4274849e9..15a375b63 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoresResponse DeserializeInternalListVectorSt hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -188,6 +188,10 @@ protected virtual InternalListVectorStoresResponse PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalListVectorStoresResponse internalListVectorStoresResponse) { + if (internalListVectorStoresResponse == null) + { + return null; + } return BinaryContent.Create(internalListVectorStoresResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 5d281c94b..f163923b5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalMessageContentImageUrlObjectImageUrl PersistableModelC public static implicit operator BinaryContent(InternalMessageContentImageUrlObjectImageUrl internalMessageContentImageUrlObjectImageUrl) { + if (internalMessageContentImageUrlObjectImageUrl == null) + { + return null; + } return BinaryContent.Create(internalMessageContentImageUrlObjectImageUrl, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index b8dcd4367..e1675137f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalMessageContentItemFileObjectImageFile PersistableModel public static implicit operator BinaryContent(InternalMessageContentItemFileObjectImageFile internalMessageContentItemFileObjectImageFile) { + if (internalMessageContentItemFileObjectImageFile == null) + { + return null; + } return BinaryContent.Create(internalMessageContentItemFileObjectImageFile, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index 9dddbd194..ab29b1156 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override InternalMessageContentTextObjectAnnotation PersistableModelCr public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFileCitationObject internalMessageContentTextAnnotationsFileCitationObject) { + if (internalMessageContentTextAnnotationsFileCitationObject == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextAnnotationsFileCitationObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 347c23486..4e5168aad 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitat fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalMessageContentTextAnnotationsFileCitationObjectFileCit public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFileCitationObjectFileCitation internalMessageContentTextAnnotationsFileCitationObjectFileCitation) { + if (internalMessageContentTextAnnotationsFileCitationObjectFileCitation == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextAnnotationsFileCitationObjectFileCitation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index 3c7f6b77d..582b2a166 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -155,6 +155,10 @@ protected override InternalMessageContentTextObjectAnnotation PersistableModelCr public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFilePathObject internalMessageContentTextAnnotationsFilePathObject) { + if (internalMessageContentTextAnnotationsFilePathObject == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextAnnotationsFilePathObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 9fee404cf..9c2063bd9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath Dese fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalMessageContentTextAnnotationsFilePathObjectFilePath Pe public static implicit operator BinaryContent(InternalMessageContentTextAnnotationsFilePathObjectFilePath internalMessageContentTextAnnotationsFilePathObjectFilePath) { + if (internalMessageContentTextAnnotationsFilePathObjectFilePath == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextAnnotationsFilePathObjectFilePath, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index d9cb9a142..a798a10c4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual InternalMessageContentTextObjectAnnotation PersistableModelCre public static implicit operator BinaryContent(InternalMessageContentTextObjectAnnotation internalMessageContentTextObjectAnnotation) { + if (internalMessageContentTextObjectAnnotation == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextObjectAnnotation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index e7f709c05..e023a7c53 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageContentTextObjectText DeserializeInternalMessageC annotations = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -149,6 +149,10 @@ protected virtual InternalMessageContentTextObjectText PersistableModelCreateCor public static implicit operator BinaryContent(InternalMessageContentTextObjectText internalMessageContentTextObjectText) { + if (internalMessageContentTextObjectText == null) + { + return null; + } return BinaryContent.Create(internalMessageContentTextObjectText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index 87b0d2030..12ffb7f87 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -128,6 +128,10 @@ protected virtual InternalMessageDeltaContent PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(InternalMessageDeltaContent internalMessageDeltaContent) { + if (internalMessageDeltaContent == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index ded3bee32..0e5ec5226 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -131,6 +131,10 @@ protected override InternalMessageDeltaContent PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalMessageDeltaContentImageFileObject internalMessageDeltaContentImageFileObject) { + if (internalMessageDeltaContentImageFileObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentImageFileObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index 7b8e0605c..38f2a8da1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual InternalMessageDeltaContentImageFileObjectImageFile Persistabl public static implicit operator BinaryContent(InternalMessageDeltaContentImageFileObjectImageFile internalMessageDeltaContentImageFileObjectImageFile) { + if (internalMessageDeltaContentImageFileObjectImageFile == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentImageFileObjectImageFile, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index 8bd03a228..c5ceddcd9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -131,6 +131,10 @@ protected override InternalMessageDeltaContent PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalMessageDeltaContentImageUrlObject internalMessageDeltaContentImageUrlObject) { + if (internalMessageDeltaContentImageUrlObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentImageUrlObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index bf51c0f69..84fe846be 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalMessageDeltaContentImageUrlObjectImageUrl PersistableM public static implicit operator BinaryContent(InternalMessageDeltaContentImageUrlObjectImageUrl internalMessageDeltaContentImageUrlObjectImageUrl) { + if (internalMessageDeltaContentImageUrlObjectImageUrl == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentImageUrlObjectImageUrl, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index 82bbd747a..a2252f2fa 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override InternalMessageDeltaContent PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalMessageDeltaContentRefusalObject internalMessageDeltaContentRefusalObject) { + if (internalMessageDeltaContentRefusalObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentRefusalObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index 625f68663..bed2a33a6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override InternalMessageDeltaTextContentAnnotation PersistableModelCre public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFileCitationObject internalMessageDeltaContentTextAnnotationsFileCitationObject) { + if (internalMessageDeltaContentTextAnnotationsFileCitationObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFileCitationObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 0f10aaab6..51525935e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("quote"u8); writer.WriteStringValue(Quote); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFile quote = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual InternalMessageDeltaContentTextAnnotationsFileCitationObjectFi public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation internalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation) { + if (internalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 6553afae4..93edc71d5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -179,6 +179,10 @@ protected override InternalMessageDeltaTextContentAnnotation PersistableModelCre public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFilePathObject internalMessageDeltaContentTextAnnotationsFilePathObject) { + if (internalMessageDeltaContentTextAnnotationsFilePathObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFilePathObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 5b369d90f..64af2f141 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -124,6 +124,10 @@ protected virtual InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePa public static implicit operator BinaryContent(InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath internalMessageDeltaContentTextAnnotationsFilePathObjectFilePath) { + if (internalMessageDeltaContentTextAnnotationsFilePathObjectFilePath == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextAnnotationsFilePathObjectFilePath, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 6b879d583..3dbc5f8bc 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -131,6 +131,10 @@ protected override InternalMessageDeltaContent PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalMessageDeltaContentTextObject internalMessageDeltaContentTextObject) { + if (internalMessageDeltaContentTextObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index 0f16ba9f6..3a75de3db 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMes annotations = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -149,6 +149,10 @@ protected virtual InternalMessageDeltaContentTextObjectText PersistableModelCrea public static implicit operator BinaryContent(InternalMessageDeltaContentTextObjectText internalMessageDeltaContentTextObjectText) { + if (internalMessageDeltaContentTextObjectText == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaContentTextObjectText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index 4f2ced20d..af9621cc5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("delta"u8); writer.WriteObjectValue(Delta, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject delta = InternalMessageDeltaObjectDelta.DeserializeInternalMessageDeltaObjectDelta(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalMessageDeltaObject PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(InternalMessageDeltaObject internalMessageDeltaObject) { + if (internalMessageDeltaObject == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 339afb4bf..6d2f67e65 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO role = prop.Value.GetString().ToMessageRole(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -153,6 +153,10 @@ protected virtual InternalMessageDeltaObjectDelta PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalMessageDeltaObjectDelta internalMessageDeltaObjectDelta) { + if (internalMessageDeltaObjectDelta == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaObjectDelta, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 662b00290..73118f8d8 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual InternalMessageDeltaTextContentAnnotation PersistableModelCrea public static implicit operator BinaryContent(InternalMessageDeltaTextContentAnnotation internalMessageDeltaTextContentAnnotation) { + if (internalMessageDeltaTextContentAnnotation == null) + { + return null; + } return BinaryContent.Create(internalMessageDeltaTextContentAnnotation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index e5fb83cde..725875fd5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF imageFile = InternalMessageContentItemFileObjectImageFile.DeserializeInternalMessageContentItemFileObjectImageFile(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -114,6 +114,10 @@ protected override MessageContent PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalMessageImageFileContent internalMessageImageFileContent) { + if (internalMessageImageFileContent == null) + { + return null; + } return BinaryContent.Create(internalMessageImageFileContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index d46fcacc3..64a82a871 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr imageUrl = InternalMessageContentImageUrlObjectImageUrl.DeserializeInternalMessageContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -114,6 +114,10 @@ protected override MessageContent PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalMessageImageUrlContent internalMessageImageUrlContent) { + if (internalMessageImageUrlContent == null) + { + return null; + } return BinaryContent.Create(internalMessageImageUrlContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index 3e3d6e84a..cb5cc7e63 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -54,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -125,7 +125,7 @@ internal static InternalMessageObjectAttachment DeserializeInternalMessageObject tools = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -168,6 +168,10 @@ protected virtual InternalMessageObjectAttachment PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalMessageObjectAttachment internalMessageObjectAttachment) { + if (internalMessageObjectAttachment == null) + { + return null; + } return BinaryContent.Create(internalMessageObjectAttachment, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index a889b4fd3..3d0658b46 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -114,6 +114,10 @@ protected override MessageContent PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalMessageRefusalContent internalMessageRefusalContent) { + if (internalMessageRefusalContent == null) + { + return null; + } return BinaryContent.Create(internalMessageRefusalContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 31402b685..4abb61544 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -86,7 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteBooleanValue(ViolenceGraphic); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -195,7 +195,7 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego violenceGraphic = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -250,6 +250,10 @@ protected virtual InternalModerationCategories PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalModerationCategories internalModerationCategories) { + if (internalModerationCategories == null) + { + return null; + } return BinaryContent.Create(internalModerationCategories, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index 774d0096b..dcd2133cd 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -86,7 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteNumberValue(ViolenceGraphic); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -195,7 +195,7 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa violenceGraphic = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -250,6 +250,10 @@ protected virtual InternalModerationCategoryScores PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalModerationCategoryScores internalModerationCategoryScores) { + if (internalModerationCategoryScores == null) + { + return null; + } return BinaryContent.Create(internalModerationCategoryScores, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs index fd249c975..b720134bc 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyAssistantRequestToolResources DeserializeInternalM fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalModifyAssistantRequestToolResources PersistableModelCr public static implicit operator BinaryContent(InternalModifyAssistantRequestToolResources internalModifyAssistantRequestToolResources) { + if (internalModifyAssistantRequestToolResources == null) + { + return null; + } return BinaryContent.Create(internalModifyAssistantRequestToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 96d600977..88bfe2b56 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalModifyAssistantRequestToolResourcesCodeInterpreter Per public static implicit operator BinaryContent(InternalModifyAssistantRequestToolResourcesCodeInterpreter internalModifyAssistantRequestToolResourcesCodeInterpreter) { + if (internalModifyAssistantRequestToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalModifyAssistantRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs index f2d7f9163..736a11320 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyThreadRequestToolResources DeserializeInternalModi fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalModifyThreadRequestToolResources PersistableModelCreat public static implicit operator BinaryContent(InternalModifyThreadRequestToolResources internalModifyThreadRequestToolResources) { + if (internalModifyThreadRequestToolResources == null) + { + return null; + } return BinaryContent.Create(internalModifyThreadRequestToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index c5fc53878..43462682f 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalModifyThreadRequestToolResourcesCodeInterpreter Persis public static implicit operator BinaryContent(InternalModifyThreadRequestToolResourcesCodeInterpreter internalModifyThreadRequestToolResourcesCodeInterpreter) { + if (internalModifyThreadRequestToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalModifyThreadRequestToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index 5c2e75ed2..ce3d3c9e9 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual InternalOmniTypedResponseFormat PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalOmniTypedResponseFormat internalOmniTypedResponseFormat) { + if (internalOmniTypedResponseFormat == null) + { + return null; + } return BinaryContent.Create(internalOmniTypedResponseFormat, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index d8d416e5c..0143c3f8e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -154,6 +154,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestAssistantMessageItem internalRealtimeRequestAssistantMessageItem) { + if (internalRealtimeRequestAssistantMessageItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestAssistantMessageItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index b9ffad2ea..6d28c1693 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt @type = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override ConversationContentPart PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalRealtimeRequestAudioContentPart internalRealtimeRequestAudioContentPart) { + if (internalRealtimeRequestAudioContentPart == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestAudioContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs index 1b7368fb6..f1994adae 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestCommand.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -143,6 +143,10 @@ protected virtual InternalRealtimeRequestCommand PersistableModelCreateCore(Bina public static implicit operator BinaryContent(InternalRealtimeRequestCommand internalRealtimeRequestCommand) { + if (internalRealtimeRequestCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index cb909e5ba..dbe82338e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -116,7 +116,7 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -166,6 +166,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestFunctionCallItem internalRealtimeRequestFunctionCallItem) { + if (internalRealtimeRequestFunctionCallItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestFunctionCallItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index c4c6a9315..0ee3c0c8b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -90,7 +90,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -133,6 +133,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestFunctionCallOutputItem internalRealtimeRequestFunctionCallOutputItem) { + if (internalRealtimeRequestFunctionCallOutputItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestFunctionCallOutputItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs index ecf713a20..183c67518 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferAppendCommand.Serialization.cs @@ -79,7 +79,7 @@ internal static InternalRealtimeRequestInputAudioBufferAppendCommand Deserialize eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -122,6 +122,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferAppendCommand internalRealtimeRequestInputAudioBufferAppendCommand) { + if (internalRealtimeRequestInputAudioBufferAppendCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestInputAudioBufferAppendCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs index d083a622a..35eb09571 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferClearCommand.Serialization.cs @@ -64,7 +64,7 @@ internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeI eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -107,6 +107,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferClearCommand internalRealtimeRequestInputAudioBufferClearCommand) { + if (internalRealtimeRequestInputAudioBufferClearCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestInputAudioBufferClearCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs index 24912175e..ca07eb51e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestInputAudioBufferCommitCommand.Serialization.cs @@ -64,7 +64,7 @@ internal static InternalRealtimeRequestInputAudioBufferCommitCommand Deserialize eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -107,6 +107,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferCommitCommand internalRealtimeRequestInputAudioBufferCommitCommand) { + if (internalRealtimeRequestInputAudioBufferCommitCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestInputAudioBufferCommitCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs index 414af9edd..d7274739e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemCreateCommand.Serialization.cs @@ -90,7 +90,7 @@ internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalReal eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -133,6 +133,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestItemCreateCommand internalRealtimeRequestItemCreateCommand) { + if (internalRealtimeRequestItemCreateCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestItemCreateCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs index 25eaaa159..996478b20 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemDeleteCommand.Serialization.cs @@ -79,7 +79,7 @@ internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalReal eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -122,6 +122,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestItemDeleteCommand internalRealtimeRequestItemDeleteCommand) { + if (internalRealtimeRequestItemDeleteCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestItemDeleteCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs index 3c58c7d9e..357cfd3a3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestItemTruncateCommand.Serialization.cs @@ -101,7 +101,7 @@ internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRe eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestItemTruncateCommand internalRealtimeRequestItemTruncateCommand) { + if (internalRealtimeRequestItemTruncateCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestItemTruncateCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index c0b10772f..06a411a74 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -94,7 +94,7 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -137,6 +137,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestMessageItem internalRealtimeRequestMessageItem) { + if (internalRealtimeRequestMessageItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestMessageItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs index 454e5a9f0..e08320507 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCancelCommand.Serialization.cs @@ -64,7 +64,7 @@ internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternal eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -107,6 +107,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestResponseCancelCommand internalRealtimeRequestResponseCancelCommand) { + if (internalRealtimeRequestResponseCancelCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestResponseCancelCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs index b42cbeb5b..24cabc021 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommand.Serialization.cs @@ -79,7 +79,7 @@ internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternal eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -122,6 +122,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommand internalRealtimeRequestResponseCreateCommand) { + if (internalRealtimeRequestResponseCreateCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestResponseCreateCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs index ea4d79fd1..a4a41056c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestResponseCreateCommandResponse.Serialization.cs @@ -132,7 +132,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output_audio_format"u8); writer.WriteStringValue(OutputAudioFormat.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -304,7 +304,7 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -360,6 +360,10 @@ protected virtual InternalRealtimeRequestResponseCreateCommandResponse Persistab public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommandResponse internalRealtimeRequestResponseCreateCommandResponse) { + if (internalRealtimeRequestResponseCreateCommandResponse == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestResponseCreateCommandResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs index 357dedee2..cd802baf2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionUpdateCommand.Serialization.cs @@ -79,7 +79,7 @@ internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalR eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -122,6 +122,10 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeRequestSessionUpdateCommand internalRealtimeRequestSessionUpdateCommand) { + if (internalRealtimeRequestSessionUpdateCommand == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestSessionUpdateCommand, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index 75b0988d8..d4a9936fd 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -154,6 +154,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestSystemMessageItem internalRealtimeRequestSystemMessageItem) { + if (internalRealtimeRequestSystemMessageItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestSystemMessageItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index b07ae70e1..1997626a5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti @type = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override ConversationContentPart PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalRealtimeRequestTextContentPart internalRealtimeRequestTextContentPart) { + if (internalRealtimeRequestTextContentPart == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestTextContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 1a5e2741c..356daa984 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -154,6 +154,10 @@ protected override ConversationItem PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalRealtimeRequestUserMessageItem internalRealtimeRequestUserMessageItem) { + if (internalRealtimeRequestUserMessageItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeRequestUserMessageItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 7a5002d50..5d2bbd439 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -162,7 +162,7 @@ internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(Jso output = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -212,6 +212,10 @@ protected virtual InternalRealtimeResponse PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalRealtimeResponse internalRealtimeResponse) { + if (internalRealtimeResponse == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs index b349e3955..87649dc54 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseApiError.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("param"u8); writer.WriteStringValue(Param); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResp @param = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual InternalRealtimeResponseApiError PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalRealtimeResponseApiError internalRealtimeResponseApiError) { + if (internalRealtimeResponseApiError == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseApiError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 4208780d0..d94d349d2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -85,7 +85,7 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal @type = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected override ConversationContentPart PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalRealtimeResponseAudioContentPart internalRealtimeResponseAudioContentPart) { + if (internalRealtimeResponseAudioContentPart == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseAudioContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs index 020f9c5af..ed494528e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseCancelledStatusDetails.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeResponseCancelledStatusDetails DeserializeIntern @type = new ConversationStatus(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalRealtimeResponseStatusDetails PersistableModelCreateC public static implicit operator BinaryContent(InternalRealtimeResponseCancelledStatusDetails internalRealtimeResponseCancelledStatusDetails) { + if (internalRealtimeResponseCancelledStatusDetails == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseCancelledStatusDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs index bff4ec437..f06221015 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseError.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalRealtimeResponseError DeserializeInternalRealtimeRespons eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -178,6 +178,10 @@ protected virtual InternalRealtimeResponseError PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRealtimeResponseError internalRealtimeResponseError) { + if (internalRealtimeResponseError == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index 1a9df21fc..5972eb021 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -123,7 +123,7 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -174,6 +174,10 @@ protected override InternalRealtimeResponseItem PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRealtimeResponseFunctionCallItem internalRealtimeResponseFunctionCallItem) { + if (internalRealtimeResponseFunctionCallItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseFunctionCallItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index db5d42e0b..1cac64d9d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -101,7 +101,7 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected override InternalRealtimeResponseItem PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRealtimeResponseFunctionCallOutputItem internalRealtimeResponseFunctionCallOutputItem) { + if (internalRealtimeResponseFunctionCallOutputItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseFunctionCallOutputItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs index 49ea41160..96eda5474 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseIncompleteStatusDetails.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeResponseIncompleteStatusDetails DeserializeInter @type = new ConversationStatus(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalRealtimeResponseStatusDetails PersistableModelCreateC public static implicit operator BinaryContent(InternalRealtimeResponseIncompleteStatusDetails internalRealtimeResponseIncompleteStatusDetails) { + if (internalRealtimeResponseIncompleteStatusDetails == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseIncompleteStatusDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index c92b161eb..d7a2f8a40 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("id"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -143,6 +143,10 @@ protected virtual InternalRealtimeResponseItem PersistableModelCreateCore(Binary public static implicit operator BinaryContent(InternalRealtimeResponseItem internalRealtimeResponseItem) { + if (internalRealtimeResponseItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index b6af37bdc..291b170a9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -122,7 +122,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -172,6 +172,10 @@ protected override InternalRealtimeResponseItem PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRealtimeResponseMessageItem internalRealtimeResponseMessageItem) { + if (internalRealtimeResponseMessageItem == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseMessageItem, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 88cdbc574..b13b1726d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -93,7 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetection, options); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tools") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -139,7 +139,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxResponseOutputTokens"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -286,7 +286,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -344,6 +344,10 @@ protected virtual InternalRealtimeResponseSession PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRealtimeResponseSession internalRealtimeResponseSession) { + if (internalRealtimeResponseSession == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseSession, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs index 361e84e81..7bfa48f00 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseStatusDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual InternalRealtimeResponseStatusDetails PersistableModelCreateCo public static implicit operator BinaryContent(InternalRealtimeResponseStatusDetails internalRealtimeResponseStatusDetails) { + if (internalRealtimeResponseStatusDetails == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseStatusDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index da3d051c2..98cb1b3b2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt @type = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override ConversationContentPart PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(InternalRealtimeResponseTextContentPart internalRealtimeResponseTextContentPart) { + if (internalRealtimeResponseTextContentPart == null) + { + return null; + } return BinaryContent.Create(internalRealtimeResponseTextContentPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index 6154c5456..f77a98620 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -95,7 +95,7 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -138,6 +138,10 @@ protected override ConversationTurnDetectionOptions PersistableModelCreateCore(B public static implicit operator BinaryContent(InternalRealtimeServerVadTurnDetection internalRealtimeServerVadTurnDetection) { + if (internalRealtimeServerVadTurnDetection == null) + { + return null; + } return BinaryContent.Create(internalRealtimeServerVadTurnDetection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index b0818e24f..e9f929916 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalReal @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalRealtimeToolChoiceObject PersistableModelCreateCore(B public static implicit operator BinaryContent(InternalRealtimeToolChoiceFunctionObject internalRealtimeToolChoiceFunctionObject) { + if (internalRealtimeToolChoiceFunctionObject == null) + { + return null; + } return BinaryContent.Create(internalRealtimeToolChoiceFunctionObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs index 5327b7047..14cea7729 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRealtimeToolChoiceFunctionObjectFunction DeserializeInte name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalRealtimeToolChoiceFunctionObjectFunction PersistableMo public static implicit operator BinaryContent(InternalRealtimeToolChoiceFunctionObjectFunction internalRealtimeToolChoiceFunctionObjectFunction) { + if (internalRealtimeToolChoiceFunctionObjectFunction == null) + { + return null; + } return BinaryContent.Create(internalRealtimeToolChoiceFunctionObjectFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index 01af7ecbd..cff2c8c23 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -122,6 +122,10 @@ protected virtual InternalRealtimeToolChoiceObject PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalRealtimeToolChoiceObject internalRealtimeToolChoiceObject) { + if (internalRealtimeToolChoiceObject == null) + { + return null; + } return BinaryContent.Create(internalRealtimeToolChoiceObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index a693e79e8..6a3c70562 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess internalText = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -114,6 +114,10 @@ protected override MessageContent PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalRequestMessageTextContent internalRequestMessageTextContent) { + if (internalRequestMessageTextContent == null) + { + return null; + } return BinaryContent.Create(internalRequestMessageTextContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index f8acc4930..b0d1cbb0b 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(_internalFunction, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc internalFunction = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalRequiredFunctionToolCall PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalRequiredFunctionToolCall internalRequiredFunctionToolCall) { + if (internalRequiredFunctionToolCall == null) + { + return null; + } return BinaryContent.Create(internalRequiredFunctionToolCall, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs index 77792f78b..42443b789 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatJsonObject DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalResponseFormatJsonObject internalResponseFormatJsonObject) { + if (internalResponseFormatJsonObject == null) + { + return null; + } return BinaryContent.Create(internalResponseFormatJsonObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index ffa694268..6335b9056 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalResponseFormatJsonSchema DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalResponseFormatJsonSchema internalResponseFormatJsonSchema) { + if (internalResponseFormatJsonSchema == null) + { + return null; + } return BinaryContent.Create(internalResponseFormatJsonSchema, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 91aab90a2..39166704f 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe schema = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -184,6 +184,10 @@ protected virtual InternalResponseFormatJsonSchemaJsonSchema PersistableModelCre public static implicit operator BinaryContent(InternalResponseFormatJsonSchemaJsonSchema internalResponseFormatJsonSchemaJsonSchema) { + if (internalResponseFormatJsonSchemaJsonSchema == null) + { + return null; + } return BinaryContent.Create(internalResponseFormatJsonSchemaJsonSchema, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs index 7be6b78b6..7954fe60a 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaSchema.Serialization.cs @@ -103,6 +103,10 @@ protected virtual InternalResponseFormatJsonSchemaSchema PersistableModelCreateC public static implicit operator BinaryContent(InternalResponseFormatJsonSchemaSchema internalResponseFormatJsonSchemaSchema) { + if (internalResponseFormatJsonSchemaSchema == null) + { + return null; + } return BinaryContent.Create(internalResponseFormatJsonSchemaSchema, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs index c8b013d9d..054bff834 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatText DeserializeInternalResponseFormatText @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalResponseFormatText internalResponseFormatText) { + if (internalResponseFormatText == null) + { + return null; + } return BinaryContent.Create(internalResponseFormatText, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 6b1d77cbc..922e43ca3 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe text = InternalMessageContentTextObjectText.DeserializeInternalMessageContentTextObjectText(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -114,6 +114,10 @@ protected override MessageContent PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalResponseMessageTextContent internalResponseMessageTextContent) { + if (internalResponseMessageTextContent == null) + { + return null; + } return BinaryContent.Create(internalResponseMessageTextContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 43ac40dad..27de37212 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -91,7 +91,7 @@ internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInte toolCalls = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -134,6 +134,10 @@ protected virtual InternalRunObjectRequiredActionSubmitToolOutputs PersistableMo public static implicit operator BinaryContent(InternalRunObjectRequiredActionSubmitToolOutputs internalRunObjectRequiredActionSubmitToolOutputs) { + if (internalRunObjectRequiredActionSubmitToolOutputs == null) + { + return null; + } return BinaryContent.Create(internalRunObjectRequiredActionSubmitToolOutputs, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index 44fc1a799..34c1dad54 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteObjectValue(Type, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J @type = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalRunRequiredAction PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(InternalRunRequiredAction internalRunRequiredAction) { + if (internalRunRequiredAction == null) + { + return null; + } return BinaryContent.Create(internalRunRequiredAction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 9758ae1a4..b4fc4f1d4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRunStepCodeInterpreterLogOutput internalRunStepCodeInterpreterLogOutput) { + if (internalRunStepCodeInterpreterLogOutput == null) + { + return null; + } return BinaryContent.Create(internalRunStepCodeInterpreterLogOutput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index ddf78daa2..c830a490c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInterna @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(InternalRunStepCodeInterpreterToolCallDetails internalRunStepCodeInterpreterToolCallDetails) { + if (internalRunStepCodeInterpreterToolCallDetails == null) + { + return null; + } return BinaryContent.Create(internalRunStepCodeInterpreterToolCallDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index ff5342edf..62f763820 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement @object = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalRunStepDelta PersistableModelCreateCore(BinaryData dat public static implicit operator BinaryContent(InternalRunStepDelta internalRunStepDelta) { + if (internalRunStepDelta == null) + { + return null; + } return BinaryContent.Create(internalRunStepDelta, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs index f5d10194d..a0765a8d4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(StepDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaO stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalRunStepDeltaObjectDelta PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRunStepDeltaObjectDelta internalRunStepDeltaObjectDelta) { + if (internalRunStepDeltaObjectDelta == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaObjectDelta, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index 26945f3b4..f1cb89b74 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual InternalRunStepDeltaStepDetails PersistableModelCreateCore(Bin public static implicit operator BinaryContent(InternalRunStepDeltaStepDetails internalRunStepDeltaStepDetails) { + if (internalRunStepDeltaStepDetails == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 44b0f7825..1c6de59b8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsMessageCreationObject internalRunStepDeltaStepDetailsMessageCreationObject) { + if (internalRunStepDeltaStepDetailsMessageCreationObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsMessageCreationObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index d235cfc6c..5655786b7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreat messageId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -124,6 +124,10 @@ protected virtual InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCre public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation internalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation) { + if (internalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 7021fd369..75ab9c584 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -142,6 +142,10 @@ protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeObject internalRunStepDeltaStepDetailsToolCallsCodeObject) { + if (internalRunStepDeltaStepDetailsToolCallsCodeObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 2e7e04adc..241f9bf57 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (options.Format != "W" && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (true && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterprete outputs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -149,6 +149,10 @@ protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpre public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter internalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter) { + if (internalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 861fe1b80..01c3af1f1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -131,6 +131,10 @@ protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject) { + if (internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 63f9968cf..55c28ee7b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectIma fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -124,6 +124,10 @@ protected virtual InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectI public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage) { + if (internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 8579e44d1..eba3a9c40 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject internalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) { + if (internalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index 73bee14ba..d1106096b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -125,7 +125,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -168,6 +168,10 @@ protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFileSearchObject internalRunStepDeltaStepDetailsToolCallsFileSearchObject) { + if (internalRunStepDeltaStepDetailsToolCallsFileSearchObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFileSearchObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 47d7df79a..8153e4aed 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -142,6 +142,10 @@ protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFunctionObject internalRunStepDeltaStepDetailsToolCallsFunctionObject) { + if (internalRunStepDeltaStepDetailsToolCallsFunctionObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFunctionObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 1ff71db96..082734f3b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction D output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -158,6 +158,10 @@ protected virtual InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction internalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction) { + if (internalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index 64133f565..b900a33b2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeIntern @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -126,6 +126,10 @@ protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(Bi public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsObject internalRunStepDeltaStepDetailsToolCallsObject) { + if (internalRunStepDeltaStepDetailsToolCallsObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index 2e18644ff..beca986a7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject public static implicit operator BinaryContent(InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject internalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject) { + if (internalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 2fe45b00a..7bbf59a47 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalR @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override RunStepDetails PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalRunStepDetailsMessageCreationObject internalRunStepDetailsMessageCreationObject) { + if (internalRunStepDetailsMessageCreationObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsMessageCreationObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index b2bd9b539..863ffedb1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsMessageCreationObjectMessageCreation Deser messageId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalRunStepDetailsMessageCreationObjectMessageCreation Per public static implicit operator BinaryContent(InternalRunStepDetailsMessageCreationObjectMessageCreation internalRunStepDetailsMessageCreationObjectMessageCreation) { + if (internalRunStepDetailsMessageCreationObjectMessageCreation == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsMessageCreationObjectMessageCreation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 62173fa2e..cb8f8026b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter Deseria outputs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -149,6 +149,10 @@ protected virtual InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter Persi public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter internalRunStepDetailsToolCallsCodeObjectCodeInterpreter) { + if (internalRunStepDetailsToolCallsCodeObjectCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsCodeObjectCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index fd52d9bf1..667be4b5c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObject Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(Binar public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeOutputImageObject internalRunStepDetailsToolCallsCodeOutputImageObject) { + if (internalRunStepDetailsToolCallsCodeOutputImageObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsCodeOutputImageObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 6457bb0c7..1f2497850 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Deseri fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Pers public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage internalRunStepDetailsToolCallsCodeOutputImageObjectImage) { + if (internalRunStepDetailsToolCallsCodeOutputImageObjectImage == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsCodeOutputImageObjectImage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index a593d5fb2..a19bd3e96 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) + if (true && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -153,6 +153,10 @@ protected virtual InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Pers public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch internalRunStepDetailsToolCallsFileSearchObjectFileSearch) { + if (internalRunStepDetailsToolCallsFileSearchObjectFileSearch == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchObjectFileSearch, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index f3c1ad0d8..abb3aecef 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(ScoreThreshold); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject De scoreThreshold = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject internalRunStepDetailsToolCallsFileSearchRankingOptionsObject) { + if (internalRunStepDetailsToolCallsFileSearchRankingOptionsObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchRankingOptionsObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs index e6b9d5cc6..813be8267 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent Des text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalRunStepDetailsToolCallsFileSearchResultObjectContent P public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFileSearchResultObjectContent internalRunStepDetailsToolCallsFileSearchResultObjectContent) { + if (internalRunStepDetailsToolCallsFileSearchResultObjectContent == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsFileSearchResultObjectContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index db4ac5039..ae3bbe299 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static InternalRunStepDetailsToolCallsFunctionObjectFunction Deserializ output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -162,6 +162,10 @@ protected virtual InternalRunStepDetailsToolCallsFunctionObjectFunction Persista public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsFunctionObjectFunction internalRunStepDetailsToolCallsFunctionObjectFunction) { + if (internalRunStepDetailsToolCallsFunctionObjectFunction == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsFunctionObjectFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index dabe4a913..81debe326 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -126,6 +126,10 @@ protected override RunStepDetails PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(InternalRunStepDetailsToolCallsObject internalRunStepDetailsToolCallsObject) { + if (internalRunStepDetailsToolCallsObject == null) + { + return null; + } return BinaryContent.Create(internalRunStepDetailsToolCallsObject, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index c746c3ad7..fb316402f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunS @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(InternalRunStepFileSearchToolCallDetails internalRunStepFileSearchToolCallDetails) { + if (internalRunStepFileSearchToolCallDetails == null) + { + return null; + } return BinaryContent.Create(internalRunStepFileSearchToolCallDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 83005c18e..5f8f50fa6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -127,6 +127,10 @@ protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(InternalRunStepFunctionToolCallDetails internalRunStepFunctionToolCallDetails) { + if (internalRunStepFunctionToolCallDetails == null) + { + return null; + } return BinaryContent.Create(internalRunStepFunctionToolCallDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index 0a7dbd3b8..1b944e191 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunToolCallObjectFunction DeserializeInternalRunToolCall arguments = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalRunToolCallObjectFunction PersistableModelCreateCore(B public static implicit operator BinaryContent(InternalRunToolCallObjectFunction internalRunToolCallObjectFunction) { + if (internalRunToolCallObjectFunction == null) + { + return null; + } return BinaryContent.Create(internalRunToolCallObjectFunction, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index 0ffb3a706..7042f12d0 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunk_overlap_tokens"u8); writer.WriteNumberValue(ChunkOverlapTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalStaticChunkingStrategyDetails DeserializeInternalStaticC chunkOverlapTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual InternalStaticChunkingStrategyDetails PersistableModelCreateCo public static implicit operator BinaryContent(InternalStaticChunkingStrategyDetails internalStaticChunkingStrategyDetails) { + if (internalStaticChunkingStrategyDetails == null) + { + return null; + } return BinaryContent.Create(internalStaticChunkingStrategyDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index a701f8310..74cfb54f2 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalSt @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override InternalFileChunkingStrategyRequestParam PersistableModelCrea public static implicit operator BinaryContent(InternalStaticChunkingStrategyRequestParam internalStaticChunkingStrategyRequestParam) { + if (internalStaticChunkingStrategyRequestParam == null) + { + return null; + } return BinaryContent.Create(internalStaticChunkingStrategyRequestParam, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index 5621bec75..d2ffcbe89 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalSubmitToolOutputsRunRequest DeserializeInternalSubmitToo stream = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual InternalSubmitToolOutputsRunRequest PersistableModelCreateCore public static implicit operator BinaryContent(InternalSubmitToolOutputsRunRequest internalSubmitToolOutputsRunRequest) { + if (internalSubmitToolOutputsRunRequest == null) + { + return null; + } return BinaryContent.Create(internalSubmitToolOutputsRunRequest, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs index 526df83ef..131a2dc59 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalThreadObjectToolResources DeserializeInternalThreadObjec fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual InternalThreadObjectToolResources PersistableModelCreateCore(B public static implicit operator BinaryContent(InternalThreadObjectToolResources internalThreadObjectToolResources) { + if (internalThreadObjectToolResources == null) + { + return null; + } return BinaryContent.Create(internalThreadObjectToolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index fbb8a6839..0b41a7f14 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesCodeInterpreter DeserializeInte fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalThreadObjectToolResourcesCodeInterpreter PersistableMo public static implicit operator BinaryContent(InternalThreadObjectToolResourcesCodeInterpreter internalThreadObjectToolResourcesCodeInterpreter) { + if (internalThreadObjectToolResourcesCodeInterpreter == null) + { + return null; + } return BinaryContent.Create(internalThreadObjectToolResourcesCodeInterpreter, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index 726486ce5..582798a12 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesFileSearch DeserializeInternalT vectorStoreIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalThreadObjectToolResourcesFileSearch PersistableModelCr public static implicit operator BinaryContent(InternalThreadObjectToolResourcesFileSearch internalThreadObjectToolResourcesFileSearch) { + if (internalThreadObjectToolResourcesFileSearch == null) + { + return null; + } return BinaryContent.Create(internalThreadObjectToolResourcesFileSearch, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index fec86d1ef..a01186ecb 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalToolResourcesFileSearchIdsOnly DeserializeInternalToolRe vectorStoreIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual InternalToolResourcesFileSearchIdsOnly PersistableModelCreateC public static implicit operator BinaryContent(InternalToolResourcesFileSearchIdsOnly internalToolResourcesFileSearchIdsOnly) { + if (internalToolResourcesFileSearchIdsOnly == null) + { + return null; + } return BinaryContent.Create(internalToolResourcesFileSearchIdsOnly, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index 934a19410..96b734dbe 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 460fafe17..562a39a64 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -60,7 +60,7 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index f1fc0e16e..301c8fd1d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -54,7 +54,7 @@ internal static InternalUnknownChatResponseFormat DeserializeInternalUnknownChat @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs index 20e5400fb..f1c5ccde0 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalUnknownChunkingStrategy DeserializeInternalUnknownChunki @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -101,6 +101,10 @@ protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(InternalUnknownChunkingStrategy internalUnknownChunkingStrategy) { + if (internalUnknownChunkingStrategy == null) + { + return null; + } return BinaryContent.Create(internalUnknownChunkingStrategy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs index 40aadd8c3..c68efa74d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyRequestParamProxy Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs index ff02ebd47..c4e7d5fa6 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyResponseParamProxy Deserializ @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs index 211ebe410..4e9e008d1 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownOmniTypedResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 60e7e9c10..6ed8b43a3 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("file"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -189,7 +189,7 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo @file = OpenAIFile.DeserializeOpenAIFile(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -242,6 +242,10 @@ protected virtual InternalUpload PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(InternalUpload internalUpload) { + if (internalUpload == null) + { + return null; + } return BinaryContent.Create(internalUpload, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index d2d24efe8..d50ead99d 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement ele @object = new InternalUploadPartObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual InternalUploadPart PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(InternalUploadPart internalUploadPart) { + if (internalUploadPart == null) + { + return null; + } return BinaryContent.Create(internalUploadPart, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index 9eaf338f7..36183986f 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternal total = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -178,6 +178,10 @@ protected virtual InternalVectorStoreFileBatchObjectFileCounts PersistableModelC public static implicit operator BinaryContent(InternalVectorStoreFileBatchObjectFileCounts internalVectorStoreFileBatchObjectFileCounts) { + if (internalVectorStoreFileBatchObjectFileCounts == null) + { + return null; + } return BinaryContent.Create(internalVectorStoreFileBatchObjectFileCounts, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index a71c86182..f92ee5e27 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -88,6 +88,10 @@ protected virtual MessageContent PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(MessageContent messageContent) { + if (messageContent == null) + { + return null; + } return BinaryContent.Create(messageContent, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index 01fd9b4f6..cce95c834 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("tools"u8); this.SerializeTools(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J DeserializeTools(prop, ref tools); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual MessageCreationAttachment PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(MessageCreationAttachment messageCreationAttachment) { + if (messageCreationAttachment == null) + { + return null; + } return BinaryContent.Create(messageCreationAttachment, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index 157068fe6..171c2df2a 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("content"u8); this.SerializeContent(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle content = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -217,6 +217,10 @@ protected virtual MessageCreationOptions PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(MessageCreationOptions messageCreationOptions) { + if (messageCreationOptions == null) + { + return null; + } return BinaryContent.Create(messageCreationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index b4693f7dc..89878ba0a 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual MessageDeletionResult PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(MessageDeletionResult messageDeletionResult) { + if (messageDeletionResult == null) + { + return null; + } return BinaryContent.Create(messageDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index 6d43006e0..c76295571 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static MessageFailureDetails DeserializeMessageFailureDetails(JsonEleme reason = new MessageFailureReason(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual MessageFailureDetails PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(MessageFailureDetails messageFailureDetails) { + if (messageFailureDetails == null) + { + return null; + } return BinaryContent.Create(messageFailureDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs index 52d40f1e3..a80017c74 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static MessageModificationOptions DeserializeMessageModificationOptions metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -158,6 +158,10 @@ protected virtual MessageModificationOptions PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(MessageModificationOptions messageModificationOptions) { + if (messageModificationOptions == null) + { + return null; + } return BinaryContent.Create(messageModificationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 713ae513e..71fe7aeca 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual ModelDeletionResult PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(ModelDeletionResult modelDeletionResult) { + if (modelDeletionResult == null) + { + return null; + } return BinaryContent.Create(modelDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 075618a3c..5c837bec3 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -103,7 +103,7 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme model = new InternalCreateModerationRequestModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -146,6 +146,10 @@ protected virtual ModerationOptions PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(ModerationOptions moderationOptions) { + if (moderationOptions == null) + { + return null; + } return BinaryContent.Create(moderationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index b08d11ee5..f889b6dd1 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("flagged"u8); writer.WriteBooleanValue(Flagged); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -93,6 +93,10 @@ protected virtual ModerationResult PersistableModelCreateCore(BinaryData data, M public static implicit operator BinaryContent(ModerationResult moderationResult) { + if (moderationResult == null) + { + return null; + } return BinaryContent.Create(moderationResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index ee39e4741..979673c2b 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -98,6 +98,10 @@ protected virtual ModerationResultCollection PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(ModerationResultCollection moderationResultCollection) { + if (moderationResultCollection == null) + { + return null; + } return BinaryContent.Create(moderationResultCollection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 61d3c596c..a826e0c51 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -114,7 +114,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, @object = new InternalEmbeddingObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -157,6 +157,10 @@ protected virtual OpenAIEmbedding PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(OpenAIEmbedding openAIEmbedding) { + if (openAIEmbedding == null) + { + return null; + } return BinaryContent.Create(openAIEmbedding, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index 14e84dba1..990343e1b 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -103,6 +103,10 @@ protected virtual OpenAIEmbeddingCollection PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(OpenAIEmbeddingCollection openAIEmbeddingCollection) { + if (openAIEmbeddingCollection == null) + { + return null; + } return BinaryContent.Create(openAIEmbeddingCollection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index a923168b9..5cafbaa12 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -142,7 +142,7 @@ internal static OpenAIError DeserializeOpenAIError(JsonElement element, ModelRea @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -185,6 +185,10 @@ protected virtual OpenAIError PersistableModelCreateCore(BinaryData data, ModelR public static implicit operator BinaryContent(OpenAIError openAIError) { + if (openAIError == null) + { + return null; + } return BinaryContent.Create(openAIError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index ea11b8128..a433d4027 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("error"u8); writer.WriteObjectValue(Error, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static OpenAIErrorResponse DeserializeOpenAIErrorResponse(JsonElement e error = OpenAIError.DeserializeOpenAIError(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual OpenAIErrorResponse PersistableModelCreateCore(BinaryData data public static implicit operator BinaryContent(OpenAIErrorResponse openAIErrorResponse) { + if (openAIErrorResponse == null) + { + return null; + } return BinaryContent.Create(openAIErrorResponse, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 494f60b39..38a759cfb 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("status_details"u8); writer.WriteStringValue(StatusDetails); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade statusDetails = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -226,6 +226,10 @@ protected virtual OpenAIFile PersistableModelCreateCore(BinaryData data, ModelRe public static implicit operator BinaryContent(OpenAIFile openAIFile) { + if (openAIFile == null) + { + return null; + } return BinaryContent.Create(openAIFile, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 676dd7c31..4c04572bb 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -93,6 +93,10 @@ protected virtual OpenAIFileCollection PersistableModelCreateCore(BinaryData dat public static implicit operator BinaryContent(OpenAIFileCollection openAIFileCollection) { + if (openAIFileCollection == null) + { + return null; + } return BinaryContent.Create(openAIFileCollection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index 58a64e8f9..01de3b396 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -161,6 +161,10 @@ protected virtual OpenAIModel PersistableModelCreateCore(BinaryData data, ModelR public static implicit operator BinaryContent(OpenAIModel openAIModel) { + if (openAIModel == null) + { + return null; + } return BinaryContent.Create(openAIModel, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index 4a46f70c0..d072b37c6 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -93,6 +93,10 @@ protected virtual OpenAIModelCollection PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(OpenAIModelCollection openAIModelCollection) { + if (openAIModelCollection == null) + { + return null; + } return BinaryContent.Create(openAIModelCollection, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs index b7aabd6d1..6ca5b0682 100644 --- a/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RealtimeResponseFailedStatusDetails.Serialization.cs @@ -80,7 +80,7 @@ internal static RealtimeResponseFailedStatusDetails DeserializeRealtimeResponseF @type = new ConversationStatus(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -123,6 +123,10 @@ protected override InternalRealtimeResponseStatusDetails PersistableModelCreateC public static implicit operator BinaryContent(RealtimeResponseFailedStatusDetails realtimeResponseFailedStatusDetails) { + if (realtimeResponseFailedStatusDetails == null) + { + return null; + } return BinaryContent.Create(realtimeResponseFailedStatusDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index 7c3ef390d..ee5dc6c45 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -92,15 +92,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("additionalInstructions"u8); } } - if (Optional.IsCollectionDefined(AdditionalMessages) && _additionalBinaryDataProperties?.ContainsKey("additional_messages") != true) + if (Optional.IsCollectionDefined(InternalMessages) && _additionalBinaryDataProperties?.ContainsKey("additional_messages") != true) { - if (AdditionalMessages != null) + if (InternalMessages != null) { writer.WritePropertyName("additional_messages"u8); writer.WriteStartArray(); - foreach (Assistants.ThreadInitializationMessage item in AdditionalMessages) + foreach (MessageCreationOptions item in InternalMessages) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -226,7 +226,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -272,7 +272,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele string modelOverride = default; string instructionsOverride = default; string additionalInstructions = default; - IList additionalMessages = default; + IList internalMessages = default; bool? allowParallelToolCalls = default; IList toolsOverride = default; IDictionary metadata = default; @@ -346,12 +346,12 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(Assistants.ThreadInitializationMessage.DeserializeThreadInitializationMessage(item, options)); + array.Add(MessageCreationOptions.DeserializeMessageCreationOptions(item, options)); } - additionalMessages = array; + internalMessages = array; continue; } if (prop.NameEquals("parallel_tool_calls"u8)) @@ -458,7 +458,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -470,7 +470,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele modelOverride, instructionsOverride, additionalInstructions, - additionalMessages ?? new ChangeTrackingList(), + internalMessages ?? new ChangeTrackingList(), allowParallelToolCalls, toolsOverride ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), @@ -518,6 +518,10 @@ protected virtual RunCreationOptions PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(RunCreationOptions runCreationOptions) { + if (runCreationOptions == null) + { + return null; + } return BinaryContent.Create(runCreationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.cs b/.dotnet/src/Generated/Models/RunCreationOptions.cs index e1a0bc5d2..a25c920fc 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.cs @@ -11,7 +11,7 @@ public partial class RunCreationOptions { private protected IDictionary _additionalBinaryDataProperties; - internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList additionalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) + internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseFormat responseFormat, string modelOverride, string instructionsOverride, string additionalInstructions, IList internalMessages, bool? allowParallelToolCalls, IList toolsOverride, IDictionary metadata, float? temperature, float? nucleusSamplingFactor, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, IDictionary additionalBinaryDataProperties) { AssistantId = assistantId; Stream = stream; @@ -19,7 +19,7 @@ internal RunCreationOptions(string assistantId, bool? stream, AssistantResponseF ModelOverride = modelOverride; InstructionsOverride = instructionsOverride; AdditionalInstructions = additionalInstructions; - AdditionalMessages = additionalMessages; + InternalMessages = internalMessages; AllowParallelToolCalls = allowParallelToolCalls; ToolsOverride = toolsOverride; Metadata = metadata; diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index 45c28ebe0..2075c5e8d 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunError DeserializeRunError(JsonElement element, ModelReaderWri message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual RunError PersistableModelCreateCore(BinaryData data, ModelRead public static implicit operator BinaryContent(RunError runError) { + if (runError == null) + { + return null; + } return BinaryContent.Create(runError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs index 82cfb30ce..a051dfbe6 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement reason = new RunIncompleteReason(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -128,6 +128,10 @@ protected virtual RunIncompleteDetails PersistableModelCreateCore(BinaryData dat public static implicit operator BinaryContent(RunIncompleteDetails runIncompleteDetails) { + if (runIncompleteDetails == null) + { + return null; + } return BinaryContent.Create(runIncompleteDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs index eac829122..a5fbcc544 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static RunModificationOptions DeserializeRunModificationOptions(JsonEle metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -158,6 +158,10 @@ protected virtual RunModificationOptions PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(RunModificationOptions runModificationOptions) { + if (runModificationOptions == null) + { + return null; + } return BinaryContent.Create(runModificationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index 60ffe5d9c..ac75c11f6 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(Details, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -357,7 +357,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite details = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -417,6 +417,10 @@ protected virtual RunStep PersistableModelCreateCore(BinaryData data, ModelReade public static implicit operator BinaryContent(RunStep runStep) { + if (runStep == null) + { + return null; + } return BinaryContent.Create(runStep, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 34a25daa5..9b164c1c3 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual RunStepCodeInterpreterOutput PersistableModelCreateCore(Binary public static implicit operator BinaryContent(RunStepCodeInterpreterOutput runStepCodeInterpreterOutput) { + if (runStepCodeInterpreterOutput == null) + { + return null; + } return BinaryContent.Create(runStepCodeInterpreterOutput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index 603463475..71ff7dd0d 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual RunStepDetails PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(RunStepDetails runStepDetails) { + if (runStepDetails == null) + { + return null; + } return BinaryContent.Create(runStepDetails, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index d2cc7778f..dedc4b148 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunStepError DeserializeRunStepError(JsonElement element, ModelR message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual RunStepError PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(RunStepError runStepError) { + if (runStepError == null) + { + return null; + } return BinaryContent.Create(runStepError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index d68f2c10d..26d8a4cd5 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -132,7 +132,7 @@ internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonE content = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -175,6 +175,10 @@ protected virtual RunStepFileSearchResult PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(RunStepFileSearchResult runStepFileSearchResult) { + if (runStepFileSearchResult == null) + { + return null; + } return BinaryContent.Create(runStepFileSearchResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index e53345ee4..d6932bd3f 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement eleme totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual RunStepTokenUsage PersistableModelCreateCore(BinaryData data, public static implicit operator BinaryContent(RunStepTokenUsage runStepTokenUsage) { + if (runStepTokenUsage == null) + { + return null; + } return BinaryContent.Create(runStepTokenUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index 65a625e5f..053c8a1b0 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,6 +126,10 @@ protected virtual RunStepToolCall PersistableModelCreateCore(BinaryData data, Mo public static implicit operator BinaryContent(RunStepToolCall runStepToolCall) { + if (runStepToolCall == null) + { + return null; + } return BinaryContent.Create(runStepToolCall, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index a1aabc615..6c33dff24 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -124,6 +124,10 @@ protected virtual RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore( public static implicit operator BinaryContent(RunStepUpdateCodeInterpreterOutput runStepUpdateCodeInterpreterOutput) { + if (runStepUpdateCodeInterpreterOutput == null) + { + return null; + } return BinaryContent.Create(runStepUpdateCodeInterpreterOutput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index 885581911..c0d0347cd 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, Mode totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual RunTokenUsage PersistableModelCreateCore(BinaryData data, Mode public static implicit operator BinaryContent(RunTokenUsage runTokenUsage) { + if (runTokenUsage == null) + { + return null; + } return BinaryContent.Create(runTokenUsage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 9a36a4ee0..7a07b063d 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -108,7 +108,7 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme @type = new InternalTruncationObjectType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -151,6 +151,10 @@ protected virtual RunTruncationStrategy PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(RunTruncationStrategy runTruncationStrategy) { + if (runTruncationStrategy == null) + { + return null; + } return BinaryContent.Create(runTruncationStrategy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index 9333b610c..bf52744ba 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("speed"u8); writer.WriteNumberValue(SpeedRatio.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE speedRatio = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -182,6 +182,10 @@ protected virtual SpeechGenerationOptions PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(SpeechGenerationOptions speechGenerationOptions) { + if (speechGenerationOptions == null) + { + return null; + } return BinaryContent.Create(speechGenerationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index 5ca1c13b8..decd57136 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -73,7 +73,7 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(StaticFileChunkingStrategy staticFileChunkingStrategy) { + if (staticFileChunkingStrategy == null) + { + return null; + } return BinaryContent.Create(staticFileChunkingStrategy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index b3572e16e..ccb709a79 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -240,6 +240,10 @@ protected virtual StreamingChatCompletionUpdate PersistableModelCreateCore(Binar public static implicit operator BinaryContent(StreamingChatCompletionUpdate streamingChatCompletionUpdate) { + if (streamingChatCompletionUpdate == null) + { + return null; + } return BinaryContent.Create(streamingChatCompletionUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 9e08755ad..465dc3953 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsUpdateValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction DeserializeFunctionArgumentsUpdateValue(prop, ref functionArgumentsUpdate); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual StreamingChatFunctionCallUpdate PersistableModelCreateCore(Bin public static implicit operator BinaryContent(StreamingChatFunctionCallUpdate streamingChatFunctionCallUpdate) { + if (streamingChatFunctionCallUpdate == null) + { + return null; + } return BinaryContent.Create(streamingChatFunctionCallUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 0e9ae46aa..57c15eb9f 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(ToolCallId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,7 +126,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda toolCallId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -169,6 +169,10 @@ protected virtual StreamingChatToolCallUpdate PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(StreamingChatToolCallUpdate streamingChatToolCallUpdate) { + if (streamingChatToolCallUpdate == null) + { + return null; + } return BinaryContent.Create(streamingChatToolCallUpdate, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index c46f20ddc..f6f7fcf67 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -68,7 +68,7 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -111,6 +111,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(SystemChatMessage systemChatMessage) { + if (systemChatMessage == null) + { + return null; + } return BinaryContent.Create(systemChatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index 7e53b83ee..8fd981fe1 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme internalMessages = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -206,6 +206,10 @@ protected virtual ThreadCreationOptions PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(ThreadCreationOptions threadCreationOptions) { + if (threadCreationOptions == null) + { + return null; + } return BinaryContent.Create(threadCreationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index 4920595b1..273d1f6e6 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual ThreadDeletionResult PersistableModelCreateCore(BinaryData dat public static implicit operator BinaryContent(ThreadDeletionResult threadDeletionResult) { + if (threadDeletionResult == null) + { + return null; + } return BinaryContent.Create(threadDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index b534eddbb..43c4c9931 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("attachments"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -355,7 +355,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode attachments = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -413,6 +413,10 @@ protected virtual ThreadMessage PersistableModelCreateCore(BinaryData data, Mode public static implicit operator BinaryContent(ThreadMessage threadMessage) { + if (threadMessage == null) + { + return null; + } return BinaryContent.Create(threadMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index 7e3ca0999..b1bad14a1 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -181,6 +181,10 @@ protected virtual ThreadModificationOptions PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(ThreadModificationOptions threadModificationOptions) { + if (threadModificationOptions == null) + { + return null; + } return BinaryContent.Create(threadModificationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 09d5f62e6..262aa17e6 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -301,7 +301,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("requiredAction"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -608,7 +608,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW internalRequiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -679,6 +679,10 @@ protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelRea public static implicit operator BinaryContent(ThreadRun threadRun) { + if (threadRun == null) + { + return null; + } return BinaryContent.Create(threadRun, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 0c5931503..cb9a9aca7 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -72,7 +72,7 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -115,6 +115,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(ToolChatMessage toolChatMessage) { + if (toolChatMessage == null) + { + return null; + } return BinaryContent.Create(toolChatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index 29a26bbb0..c816ad7cc 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_objectType); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,6 +96,10 @@ protected virtual ToolConstraint PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(ToolConstraint toolConstraint) { + if (toolConstraint == null) + { + return null; + } return BinaryContent.Create(toolConstraint, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 025b03824..eb0c7a503 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,6 +119,10 @@ protected virtual ToolDefinition PersistableModelCreateCore(BinaryData data, Mod public static implicit operator BinaryContent(ToolDefinition toolDefinition) { + if (toolDefinition == null) + { + return null; + } return BinaryContent.Create(toolDefinition, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs index e9bc1ee68..552ade35f 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output"u8); writer.WriteStringValue(Output); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReade output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual ToolOutput PersistableModelCreateCore(BinaryData data, ModelRe public static implicit operator BinaryContent(ToolOutput toolOutput) { + if (toolOutput == null) + { + return null; + } return BinaryContent.Create(toolOutput, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 225754a84..1bf9b3d4e 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); this.SerializeFileSearch(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -143,6 +143,10 @@ protected virtual ToolResources PersistableModelCreateCore(BinaryData data, Mode public static implicit operator BinaryContent(ToolResources toolResources) { + if (toolResources == null) + { + return null; + } return BinaryContent.Create(toolResources, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index c644c41ea..383ba7fd9 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -86,7 +86,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("no_speech_prob"u8); writer.WriteNumberValue(NoSpeechProbability); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -200,7 +200,7 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele noSpeechProbability = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index 5b5399ae1..28a1bc287 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -46,7 +46,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("end"u8); writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index 2ef5f7920..d0219219f 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -54,7 +54,7 @@ internal static UnknownAssistantToolDefinition DeserializeUnknownAssistantToolDe @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index ee1d5074d..8e5f1e8e3 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownC @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index c6e94fa49..263182a78 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegra @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs index 3e687a893..6a994f475 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageContentTextObjectAnnotation DeserializeUnknownMess @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs index 0492c3fe3..5b6814e3c 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs index 2c25dd275..0d3229fd8 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaTextContentAnnotation DeserializeUnknownMessa @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs index cb3e19b71..482fea606 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart @type = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs index 9bd1ad5ae..8e966596a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestCommand.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestC eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index 4684df45e..cd552f19a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index fb6976c6a..e9bebf3e2 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -84,7 +84,7 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs index 045d1fafe..1552505b9 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseCommand.Serialization.cs @@ -72,7 +72,7 @@ internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeRespons kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs index 05f758941..29325daaa 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -78,7 +78,7 @@ internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseIt id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs index daa5c4a99..abaab91aa 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeResponseStatusDetails DeserializeUnknownRealtimeR @type = new ConversationStatus(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs index 237a5e218..135527aa9 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement e kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs index 04c6f8b5f..1c78da3b6 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeToolChoiceObject DeserializeUnknownRealtimeToolCh @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs index 364693674..ab00b3c93 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetec kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs index 8776ce9f5..1adf0306c 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetails DeserializeUnknownRunStepDeltaSte @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 3c71ac3e3..5848b03e6 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index a67ce37c0..e0919c8be 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 688add701..ba61e3324 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsOb @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index 9dbbc39ee..c7ca094c6 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsObjectToolCallsObject DeserializeU @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs index f3086084f..5a631ddba 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepObjectStepDetails DeserializeUnknownRunStepObjectS @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 265f92c1d..e0fbdec0a 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -68,7 +68,7 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -111,6 +111,10 @@ protected override ChatMessage PersistableModelCreateCore(BinaryData data, Model public static implicit operator BinaryContent(UserChatMessage userChatMessage) { + if (userChatMessage == null) + { + return null; + } return BinaryContent.Create(userChatMessage, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 987ff33ff..24995fbe7 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -118,7 +118,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("expires_after"u8); writer.WriteObjectValue(ExpirationPolicy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -258,7 +258,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -313,6 +313,10 @@ protected virtual VectorStore PersistableModelCreateCore(BinaryData data, ModelR public static implicit operator BinaryContent(VectorStore vectorStore) { + if (vectorStore == null) + { + return null; + } return BinaryContent.Create(vectorStore, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 091d2fe9c..643b8ac93 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE @object = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -190,6 +190,10 @@ protected virtual VectorStoreBatchFileJob PersistableModelCreateCore(BinaryData public static implicit operator BinaryContent(VectorStoreBatchFileJob vectorStoreBatchFileJob) { + if (vectorStoreBatchFileJob == null) + { + return null; + } return BinaryContent.Create(vectorStoreBatchFileJob, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index 8cf232033..68824cf3c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -204,6 +204,10 @@ protected virtual VectorStoreCreationHelper PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(VectorStoreCreationHelper vectorStoreCreationHelper) { + if (vectorStoreCreationHelper == null) + { + return null; + } return BinaryContent.Create(vectorStoreCreationHelper, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index e3146f06e..91403959b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -80,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -193,7 +193,7 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -242,6 +242,10 @@ protected virtual VectorStoreCreationOptions PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(VectorStoreCreationOptions vectorStoreCreationOptions) { + if (vectorStoreCreationOptions == null) + { + return null; + } return BinaryContent.Create(vectorStoreCreationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index 337779eb4..ffbcc14f0 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -150,6 +150,10 @@ protected virtual VectorStoreDeletionResult PersistableModelCreateCore(BinaryDat public static implicit operator BinaryContent(VectorStoreDeletionResult vectorStoreDeletionResult) { + if (vectorStoreDeletionResult == null) + { + return null; + } return BinaryContent.Create(vectorStoreDeletionResult, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index 513ce9e9a..a6e7d9c89 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("days"u8); writer.WriteNumberValue(_days); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli days = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -135,6 +135,10 @@ protected virtual VectorStoreExpirationPolicy PersistableModelCreateCore(BinaryD public static implicit operator BinaryContent(VectorStoreExpirationPolicy vectorStoreExpirationPolicy) { + if (vectorStoreExpirationPolicy == null) + { + return null; + } return BinaryContent.Create(vectorStoreExpirationPolicy, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index b02217c85..38cb0416e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -178,7 +178,7 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -230,6 +230,10 @@ protected virtual VectorStoreFileAssociation PersistableModelCreateCore(BinaryDa public static implicit operator BinaryContent(VectorStoreFileAssociation vectorStoreFileAssociation) { + if (vectorStoreFileAssociation == null) + { + return null; + } return BinaryContent.Create(vectorStoreFileAssociation, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index 13e32b6c1..d6e4ca8d5 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static VectorStoreFileAssociationError DeserializeVectorStoreFileAssoci message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -139,6 +139,10 @@ protected virtual VectorStoreFileAssociationError PersistableModelCreateCore(Bin public static implicit operator BinaryContent(VectorStoreFileAssociationError vectorStoreFileAssociationError) { + if (vectorStoreFileAssociationError == null) + { + return null; + } return BinaryContent.Create(vectorStoreFileAssociationError, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index 2bf0a734a..05a8d299b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonEleme total = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -178,6 +178,10 @@ protected virtual VectorStoreFileCounts PersistableModelCreateCore(BinaryData da public static implicit operator BinaryContent(VectorStoreFileCounts vectorStoreFileCounts) { + if (vectorStoreFileCounts == null) + { + return null; + } return BinaryContent.Create(vectorStoreFileCounts, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index 801de2c19..ad9c7f889 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -74,7 +74,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("expiresAfter"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -204,6 +204,10 @@ protected virtual VectorStoreModificationOptions PersistableModelCreateCore(Bina public static implicit operator BinaryContent(VectorStoreModificationOptions vectorStoreModificationOptions) { + if (vectorStoreModificationOptions == null) + { + return null; + } return BinaryContent.Create(vectorStoreModificationOptions, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 34b445235..2ca3d5c89 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -73,7 +73,7 @@ internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegrati @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } @@ -116,6 +116,10 @@ protected override FineTuningIntegration PersistableModelCreateCore(BinaryData d public static implicit operator BinaryContent(WeightsAndBiasesIntegration weightsAndBiasesIntegration) { + if (weightsAndBiasesIntegration == null) + { + return null; + } return BinaryContent.Create(weightsAndBiasesIntegration, ModelSerializationExtensions.WireOptions); } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index bf4f1f7da..f8fbb7e6c 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -32,7 +32,7 @@ public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdA sizeInBytes, status, statusDetails, - null); + additionalBinaryDataProperties: null); } public static VectorStore VectorStore(string id = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default, InternalVectorStoreObjectObject @object = default, VectorStoreExpirationPolicy expirationPolicy = default) @@ -51,7 +51,7 @@ public static VectorStore VectorStore(string id = default, DateTimeOffset create metadata, @object, expirationPolicy, - null); + additionalBinaryDataProperties: null); } public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) @@ -63,13 +63,13 @@ public static VectorStoreFileCounts VectorStoreFileCounts(int inProgress = defau failed, cancelled, total, - null); + additionalBinaryDataProperties: null); } public static VectorStoreExpirationPolicy VectorStoreExpirationPolicy(VectorStores.VectorStoreExpirationAnchor anchor = default, int days = default) { - return new VectorStoreExpirationPolicy(anchor, days, null); + return new VectorStoreExpirationPolicy(anchor, days, serializedAdditionalRawData: null); } public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable fileIds = default, string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default, FileChunkingStrategy chunkingStrategy = default) @@ -83,20 +83,20 @@ public static VectorStoreCreationOptions VectorStoreCreationOptions(IEnumerable< metadata, expirationPolicy, chunkingStrategy, - null); + additionalBinaryDataProperties: null); } public static VectorStoreModificationOptions VectorStoreModificationOptions(string name = default, IDictionary metadata = default, VectorStoreExpirationPolicy expirationPolicy = default) { metadata ??= new ChangeTrackingDictionary(); - return new VectorStoreModificationOptions(name, metadata, expirationPolicy, null); + return new VectorStoreModificationOptions(name, metadata, expirationPolicy, additionalBinaryDataProperties: null); } public static VectorStoreDeletionResult VectorStoreDeletionResult(bool deleted = default, string vectorStoreId = default, InternalDeleteVectorStoreResponseObject @object = default) { - return new VectorStoreDeletionResult(deleted, vectorStoreId, @object, null); + return new VectorStoreDeletionResult(deleted, vectorStoreId, @object, additionalBinaryDataProperties: null); } public static VectorStoreFileAssociation VectorStoreFileAssociation(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStores.VectorStoreFileAssociationStatus status = default, VectorStoreFileAssociationError lastError = default, InternalVectorStoreFileObjectObject @object = default, string fileId = default, int size = default, FileChunkingStrategy chunkingStrategy = default) @@ -111,31 +111,31 @@ public static VectorStoreFileAssociation VectorStoreFileAssociation(DateTimeOffs fileId, size, chunkingStrategy, - null); + additionalBinaryDataProperties: null); } public static VectorStoreFileAssociationError VectorStoreFileAssociationError(VectorStoreFileAssociationErrorCode code = default, string message = default) { - return new VectorStoreFileAssociationError(code, message, null); + return new VectorStoreFileAssociationError(code, message, additionalBinaryDataProperties: null); } public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails = default) { - return new StaticFileChunkingStrategy(internalDetails, "static", null); + return new StaticFileChunkingStrategy(internalDetails, "static", additionalBinaryDataProperties: null); } public static FileChunkingStrategy FileChunkingStrategy(string @type = default) { - return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, null); + return new InternalUnknownFileChunkingStrategyResponseParamProxy(@type, additionalBinaryDataProperties: null); } public static FileFromStoreRemovalResult FileFromStoreRemovalResult(string fileId = default, bool removed = default, InternalDeleteVectorStoreFileResponseObject @object = default) { - return new FileFromStoreRemovalResult(fileId, removed, @object, null); + return new FileFromStoreRemovalResult(fileId, removed, @object, additionalBinaryDataProperties: null); } public static VectorStoreBatchFileJob VectorStoreBatchFileJob(DateTimeOffset createdAt = default, string vectorStoreId = default, VectorStoreBatchFileJobStatus status = default, string batchId = default, VectorStoreFileCounts fileCounts = default, object @object = default) @@ -148,7 +148,7 @@ public static VectorStoreBatchFileJob VectorStoreBatchFileJob(DateTimeOffset cre batchId, fileCounts, @object, - null); + additionalBinaryDataProperties: null); } public static ThreadCreationOptions ThreadCreationOptions(IDictionary metadata = default, ToolResources toolResources = default, IEnumerable internalMessages = default) @@ -156,7 +156,7 @@ public static ThreadCreationOptions ThreadCreationOptions(IDictionary(); internalMessages ??= new ChangeTrackingList(); - return new ThreadCreationOptions(metadata, toolResources, internalMessages?.ToList(), null); + return new ThreadCreationOptions(metadata, toolResources, internalMessages?.ToList(), additionalBinaryDataProperties: null); } public static MessageCreationOptions MessageCreationOptions(IEnumerable attachments = default, IDictionary metadata = default, Assistants.MessageRole role = default, IEnumerable content = default) @@ -165,44 +165,44 @@ public static MessageCreationOptions MessageCreationOptions(IEnumerable(); content ??= new ChangeTrackingList(); - return new MessageCreationOptions(attachments?.ToList(), metadata, role, content?.ToList(), null); + return new MessageCreationOptions(attachments?.ToList(), metadata, role, content?.ToList(), additionalBinaryDataProperties: null); } public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) { tools ??= new ChangeTrackingList(); - return new MessageCreationAttachment(fileId, tools?.ToList(), null); + return new MessageCreationAttachment(fileId, tools?.ToList(), additionalBinaryDataProperties: null); } public static CodeInterpreterToolDefinition CodeInterpreterToolDefinition() { - return new CodeInterpreterToolDefinition("code_interpreter", null); + return new CodeInterpreterToolDefinition("code_interpreter", additionalBinaryDataProperties: null); } public static ToolDefinition ToolDefinition(string @type = default) { - return new UnknownAssistantToolDefinition(@type, null); + return new UnknownAssistantToolDefinition(@type, additionalBinaryDataProperties: null); } public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch = default) { - return new FileSearchToolDefinition(fileSearch, "file_search", null); + return new FileSearchToolDefinition(fileSearch, "file_search", additionalBinaryDataProperties: null); } public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default, float scoreThreshold = default) { - return new FileSearchRankingOptions(ranker, scoreThreshold, null); + return new FileSearchRankingOptions(ranker, scoreThreshold, serializedAdditionalRawData: null); } public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition internalFunction = default) { - return new FunctionToolDefinition(internalFunction, "function", null); + return new FunctionToolDefinition(internalFunction, "function", serializedAdditionalRawData: null); } public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable newVectorStores = default) @@ -210,7 +210,7 @@ public static FileSearchToolResources FileSearchToolResources(IEnumerable(); newVectorStores ??= new ChangeTrackingList(); - return new FileSearchToolResources(vectorStoreIds?.ToList(), newVectorStores?.ToList(), null); + return new FileSearchToolResources(vectorStoreIds?.ToList(), newVectorStores?.ToList(), additionalBinaryDataProperties: null); } public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable fileIds = default, IDictionary metadata = default, FileChunkingStrategy chunkingStrategy = default) @@ -218,19 +218,19 @@ public static VectorStoreCreationHelper VectorStoreCreationHelper(IEnumerable(); metadata ??= new ChangeTrackingDictionary(); - return new VectorStoreCreationHelper(fileIds?.ToList(), metadata, chunkingStrategy, null); + return new VectorStoreCreationHelper(fileIds?.ToList(), metadata, chunkingStrategy, additionalBinaryDataProperties: null); } public static RunTruncationStrategy RunTruncationStrategy(int? lastMessages = default, InternalTruncationObjectType @type = default) { - return new RunTruncationStrategy(lastMessages, @type, null); + return new RunTruncationStrategy(lastMessages, @type, additionalBinaryDataProperties: null); } public static ToolConstraint ToolConstraint(InternalAssistantsNamedToolChoiceFunction function = default, string objectType = default) { - return new ToolConstraint(function, objectType, null); + return new ToolConstraint(function, objectType, additionalBinaryDataProperties: null); } public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, InternalRunRequiredAction internalRequiredAction = default) @@ -266,30 +266,30 @@ public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt maxInputTokenCount, maxOutputTokenCount, internalRequiredAction, - null); + additionalBinaryDataProperties: null); } public static RunError RunError(RunErrorCode code = default, string message = default) { - return new RunError(code, message, null); + return new RunError(code, message, additionalBinaryDataProperties: null); } public static RunIncompleteDetails RunIncompleteDetails(RunIncompleteReason? reason = default) { - return new RunIncompleteDetails(reason, null); + return new RunIncompleteDetails(reason, additionalBinaryDataProperties: null); } public static RunTokenUsage RunTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) { - return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); + return new RunTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, additionalBinaryDataProperties: null); } - public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable additionalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, IDictionary metadata = default, float? temperature = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, RunTruncationStrategy truncationStrategy = default, ToolConstraint toolConstraint = default) + public static RunCreationOptions RunCreationOptions(string assistantId = default, bool? stream = default, AssistantResponseFormat responseFormat = default, string modelOverride = default, string instructionsOverride = default, string additionalInstructions = default, IEnumerable internalMessages = default, bool? allowParallelToolCalls = default, IEnumerable toolsOverride = default, IDictionary metadata = default, float? temperature = default, float? nucleusSamplingFactor = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, RunTruncationStrategy truncationStrategy = default, ToolConstraint toolConstraint = default) { - additionalMessages ??= new ChangeTrackingList(); + internalMessages ??= new ChangeTrackingList(); toolsOverride ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -300,7 +300,7 @@ public static RunCreationOptions RunCreationOptions(string assistantId = default modelOverride, instructionsOverride, additionalInstructions, - additionalMessages?.ToList(), + internalMessages?.ToList(), allowParallelToolCalls, toolsOverride?.ToList(), metadata, @@ -310,20 +310,20 @@ public static RunCreationOptions RunCreationOptions(string assistantId = default maxOutputTokenCount, truncationStrategy, toolConstraint, - null); + additionalBinaryDataProperties: null); } public static RunModificationOptions RunModificationOptions(IDictionary metadata = default) { metadata ??= new ChangeTrackingDictionary(); - return new RunModificationOptions(metadata, null); + return new RunModificationOptions(metadata, additionalBinaryDataProperties: null); } public static ToolOutput ToolOutput(string toolCallId = default, string output = default) { - return new ToolOutput(toolCallId, output, null); + return new ToolOutput(toolCallId, output, additionalBinaryDataProperties: null); } public static RunStep RunStep(string id = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default, InternalRunStepObjectObject @object = default, RunStepDetails details = default) @@ -347,44 +347,44 @@ public static RunStep RunStep(string id = default, DateTimeOffset createdAt = de usage, @object, details, - null); + additionalBinaryDataProperties: null); } public static RunStepDetails RunStepDetails(string @type = default) { - return new UnknownRunStepObjectStepDetails(@type, null); + return new UnknownRunStepObjectStepDetails(@type, additionalBinaryDataProperties: null); } public static RunStepToolCall RunStepToolCall(string @type = default) { - return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(@type, null); + return new UnknownRunStepDetailsToolCallsObjectToolCallsObject(@type, additionalBinaryDataProperties: null); } public static RunStepCodeInterpreterOutput RunStepCodeInterpreterOutput(string @type = default) { - return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); + return new UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, additionalBinaryDataProperties: null); } public static RunStepFileSearchResult RunStepFileSearchResult(string fileId = default, string fileName = default, float score = default, IEnumerable content = default) { content ??= new ChangeTrackingList(); - return new RunStepFileSearchResult(fileId, fileName, score, content?.ToList(), null); + return new RunStepFileSearchResult(fileId, fileName, score, content?.ToList(), additionalBinaryDataProperties: null); } public static RunStepError RunStepError(RunStepErrorCode code = default, string message = default) { - return new RunStepError(code, message, null); + return new RunStepError(code, message, additionalBinaryDataProperties: null); } public static RunStepTokenUsage RunStepTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default) { - return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, null); + return new RunStepTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, additionalBinaryDataProperties: null); } public static AssistantThread AssistantThread(string id = default, DateTimeOffset createdAt = default, IReadOnlyDictionary metadata = default, InternalThreadObjectObject @object = default, ToolResources toolResources = default) @@ -397,20 +397,20 @@ public static AssistantThread AssistantThread(string id = default, DateTimeOffse metadata, @object, toolResources, - null); + additionalBinaryDataProperties: null); } public static ThreadModificationOptions ThreadModificationOptions(IDictionary metadata = default, ToolResources toolResources = default) { metadata ??= new ChangeTrackingDictionary(); - return new ThreadModificationOptions(metadata, toolResources, null); + return new ThreadModificationOptions(metadata, toolResources, additionalBinaryDataProperties: null); } public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, string threadId = default, InternalDeleteThreadResponseObject @object = default) { - return new ThreadDeletionResult(deleted, threadId, @object, null); + return new ThreadDeletionResult(deleted, threadId, @object, additionalBinaryDataProperties: null); } public static ConversationSessionOptions ConversationSessionOptions(ConversationVoice? voice = default, string instructions = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, string model = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default, IEnumerable internalModalities = default, BinaryData internalToolChoice = default, BinaryData maxResponseOutputTokens = default) @@ -431,73 +431,73 @@ public static ConversationSessionOptions ConversationSessionOptions(Conversation internalModalities?.ToList(), internalToolChoice, maxResponseOutputTokens, - null); + additionalBinaryDataProperties: null); } public static ConversationInputTranscriptionOptions ConversationInputTranscriptionOptions(ConversationTranscriptionModel? model = default) { - return new ConversationInputTranscriptionOptions(model, null); + return new ConversationInputTranscriptionOptions(model, additionalBinaryDataProperties: null); } public static ConversationTurnDetectionOptions ConversationTurnDetectionOptions(string kind = default) { - return new UnknownRealtimeTurnDetection(kind.ToConversationTurnDetectionKind(), null); + return new UnknownRealtimeTurnDetection(kind.ToConversationTurnDetectionKind(), additionalBinaryDataProperties: null); } public static ConversationTool ConversationTool(string kind = default) { - return new UnknownRealtimeTool(new ConversationToolKind(kind), null); + return new UnknownRealtimeTool(new ConversationToolKind(kind), additionalBinaryDataProperties: null); } public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default) { - return new ConversationFunctionTool(name, description, parameters, ConversationToolKind.Function, null); + return new ConversationFunctionTool(name, description, parameters, ConversationToolKind.Function, serializedAdditionalRawData: null); } public static ConversationItem ConversationItem(string @type = default, string id = default) { - return new UnknownRealtimeRequestItem(new InternalRealtimeRequestItemType(@type), id, null); + return new UnknownRealtimeRequestItem(new InternalRealtimeRequestItemType(@type), id, additionalBinaryDataProperties: null); } public static ConversationContentPart ConversationContentPart(ConversationContentPartKind @type = default) { - return new UnknownRealtimeContentPart(@type, null); + return new UnknownRealtimeContentPart(@type, additionalBinaryDataProperties: null); } public static ConversationUpdate ConversationUpdate(string eventId = default, string kind = default) { - return new UnknownRealtimeResponseCommand(eventId, kind.ToConversationUpdateKind(), null); + return new UnknownRealtimeResponseCommand(eventId, kind.ToConversationUpdateKind(), additionalBinaryDataProperties: null); } public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, null); + return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); } public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, null); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); } public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default) { - return new ConversationItemAcknowledgedUpdate(item, eventId, RealtimeConversation.ConversationUpdateKind.ItemAcknowledged, null); + return new ConversationItemAcknowledgedUpdate(item, eventId, RealtimeConversation.ConversationUpdateKind.ItemAcknowledged, additionalBinaryDataProperties: null); } public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default) { - return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, null); + return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); } public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int audioEndMs = default, int index = default, string eventId = default) @@ -509,13 +509,13 @@ public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(st index, eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated, - null); + additionalBinaryDataProperties: null); } public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, null); + return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); } public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) @@ -527,38 +527,38 @@ public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = de outputTokens, inputTokenDetails, outputTokenDetails, - null); + additionalBinaryDataProperties: null); } public static ConversationInputTokenUsageDetails ConversationInputTokenUsageDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) { - return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, null); + return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties: null); } public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDetails(int textTokens = default, int audioTokens = default) { - return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, null); + return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); } public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, null); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); } public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default) { rateLimits ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, null); + return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); } public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int limit = default, int remaining = default, float resetSeconds = default) { - return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, null); + return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, additionalBinaryDataProperties: null); } public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) @@ -570,7 +570,7 @@ public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemStarted, - null); + additionalBinaryDataProperties: null); } public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) @@ -582,7 +582,7 @@ public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(stri internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemFinished, - null); + additionalBinaryDataProperties: null); } public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) @@ -596,7 +596,7 @@ public static ConversationContentPartStartedUpdate ConversationContentPartStarte internalContentPart, eventId, RealtimeConversation.ConversationUpdateKind.ContentPartStarted, - null); + additionalBinaryDataProperties: null); } public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) @@ -610,7 +610,7 @@ public static ConversationContentPartFinishedUpdate ConversationContentPartFinis internalContentPart, eventId, RealtimeConversation.ConversationUpdateKind.ContentPartFinished, - null); + additionalBinaryDataProperties: null); } public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default) @@ -624,21 +624,21 @@ public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string r delta, eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta, - null); + additionalBinaryDataProperties: null); } public static ConversationAudioDoneUpdate ConversationAudioDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) { return new ConversationAudioDoneUpdate( - RealtimeConversation.ConversationUpdateKind.ResponseAudioDone, + "response.audio.done", responseId, itemId, outputIndex, contentIndex, eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioDone, - null); + additionalBinaryDataProperties: null); } public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) @@ -652,7 +652,7 @@ public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTrans delta, eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta, - null); + additionalBinaryDataProperties: null); } public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) @@ -665,7 +665,7 @@ public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTr contentIndex, eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone, - null); + additionalBinaryDataProperties: null); } public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) @@ -679,7 +679,7 @@ public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string res delta, eventId, RealtimeConversation.ConversationUpdateKind.ResponseTextDelta, - null); + additionalBinaryDataProperties: null); } public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string value = default, string eventId = default) @@ -693,7 +693,7 @@ public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string respo value, eventId, RealtimeConversation.ConversationUpdateKind.ResponseTextDone, - null); + additionalBinaryDataProperties: null); } public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string delta = default, string eventId = default) @@ -707,7 +707,7 @@ public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionC delta, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta, - null); + additionalBinaryDataProperties: null); } public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string name = default, string arguments = default, string eventId = default) @@ -722,19 +722,19 @@ public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCa arguments, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone, - null); + additionalBinaryDataProperties: null); } public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(int audioStartMs = default, string itemId = default, string eventId = default) { - return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted, null); + return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted, additionalBinaryDataProperties: null); } public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(int audioEndMs = default, string itemId = default, string eventId = default) { - return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped, null); + return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped, additionalBinaryDataProperties: null); } public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default) @@ -746,7 +746,7 @@ public static ConversationInputTranscriptionFinishedUpdate ConversationInputTran transcript, eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted, - null); + additionalBinaryDataProperties: null); } public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeResponseApiError error = default, string eventId = default) @@ -758,55 +758,57 @@ public static ConversationInputTranscriptionFailedUpdate ConversationInputTransc error, eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed, - null); + additionalBinaryDataProperties: null); } public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string itemId = default, string previousItemId = default, string eventId = default) { - return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted, null); + return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted, additionalBinaryDataProperties: null); } public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = default) { - return new ConversationInputAudioBufferClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared, null); + return new ConversationInputAudioBufferClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared, additionalBinaryDataProperties: null); } public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeResponseError error = default, string eventId = default) { - return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, null); + return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); } - public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default) + public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default, IEnumerable results = default) { + results ??= new ChangeTrackingList(); - return new ModerationResultCollection(id, model, null); + return new ModerationResultCollection(id, model, results?.ToList(), serializedAdditionalRawData: null); } public static ModerationResult ModerationResult(bool flagged = default) { - return new ModerationResult(flagged, null); + return new ModerationResult(flagged, additionalBinaryDataProperties: null); } - public static OpenAIModelCollection OpenAIModelCollection(InternalListModelsResponseObject @object = default) + public static OpenAIModelCollection OpenAIModelCollection(InternalListModelsResponseObject @object = default, IEnumerable data = default) { + data ??= new ChangeTrackingList(); - return new OpenAIModelCollection(@object, null); + return new OpenAIModelCollection(@object, data?.ToList(), serializedAdditionalRawData: null); } public static OpenAIModel OpenAIModel(string id = default, string ownedBy = default, InternalModelObject @object = default, DateTimeOffset createdAt = default) { - return new OpenAIModel(id, ownedBy, @object, createdAt, null); + return new OpenAIModel(id, ownedBy, @object, createdAt, additionalBinaryDataProperties: null); } public static ModelDeletionResult ModelDeletionResult(bool deleted = default, string modelId = default, InternalDeleteModelResponseObject @object = default) { - return new ModelDeletionResult(deleted, modelId, @object, null); + return new ModelDeletionResult(deleted, modelId, @object, additionalBinaryDataProperties: null); } public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default, IEnumerable attachments = default) @@ -830,26 +832,26 @@ public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset cr @object, role, attachments?.ToList(), - null); + additionalBinaryDataProperties: null); } public static MessageFailureDetails MessageFailureDetails(MessageFailureReason reason = default) { - return new MessageFailureDetails(reason, null); + return new MessageFailureDetails(reason, additionalBinaryDataProperties: null); } public static MessageModificationOptions MessageModificationOptions(IDictionary metadata = default) { metadata ??= new ChangeTrackingDictionary(); - return new MessageModificationOptions(metadata, null); + return new MessageModificationOptions(metadata, additionalBinaryDataProperties: null); } public static MessageDeletionResult MessageDeletionResult(bool deleted = default, string messageId = default, InternalDeleteMessageResponseObject @object = default) { - return new MessageDeletionResult(deleted, messageId, @object, null); + return new MessageDeletionResult(deleted, messageId, @object, additionalBinaryDataProperties: null); } public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQuality? quality = default, GeneratedImageFormat? responseFormat = default, GeneratedImageSize? size = default, GeneratedImageStyle? style = default, InternalCreateImageRequestModel? model = default, string prompt = default, long? n = default, string endUserId = default) @@ -864,19 +866,20 @@ public static ImageGenerationOptions ImageGenerationOptions(GeneratedImageQualit prompt, n, endUserId, - null); + additionalBinaryDataProperties: null); } - public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset createdAt = default) + public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset created = default, IEnumerable data = default) { + data ??= new ChangeTrackingList(); - return new GeneratedImageCollection(createdAt, null); + return new GeneratedImageCollection(created, data?.ToList(), serializedAdditionalRawData: null); } public static GeneratedImage GeneratedImage(string revisedPrompt = default, BinaryData imageBytes = default, Uri imageUri = default) { - return new GeneratedImage(revisedPrompt, imageBytes, imageUri, null); + return new GeneratedImage(revisedPrompt, imageBytes, imageUri, additionalBinaryDataProperties: null); } public static ImageEditOptions ImageEditOptions(InternalCreateImageEditRequestModel? model = default, BinaryData image = default, string prompt = default, BinaryData mask = default, long? n = default, GeneratedImageSize? size = default, GeneratedImageFormat? responseFormat = default, string endUserId = default) @@ -891,7 +894,7 @@ public static ImageEditOptions ImageEditOptions(InternalCreateImageEditRequestMo size, responseFormat, endUserId, - null); + additionalBinaryDataProperties: null); } public static ImageVariationOptions ImageVariationOptions(InternalCreateImageVariationRequestModel? model = default, BinaryData image = default, long? n = default, GeneratedImageSize? size = default, GeneratedImageFormat? responseFormat = default, string endUserId = default) @@ -904,19 +907,20 @@ public static ImageVariationOptions ImageVariationOptions(InternalCreateImageVar size, responseFormat, endUserId, - null); + additionalBinaryDataProperties: null); } - public static OpenAIFileCollection OpenAIFileCollection(InternalListFilesResponseObject @object = default) + public static OpenAIFileCollection OpenAIFileCollection(IEnumerable data = default, InternalListFilesResponseObject @object = default) { + data ??= new ChangeTrackingList(); - return new OpenAIFileCollection(@object, null); + return new OpenAIFileCollection(data?.ToList(), @object, serializedAdditionalRawData: null); } public static FileDeletionResult FileDeletionResult(bool deleted = default, string fileId = default, InternalDeleteFileResponseObject @object = default) { - return new FileDeletionResult(deleted, fileId, @object, null); + return new FileDeletionResult(deleted, fileId, @object, additionalBinaryDataProperties: null); } public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensions = default, BinaryData input = default, InternalCreateEmbeddingRequestModel model = default, InternalCreateEmbeddingRequestEncodingFormat? encodingFormat = default, string endUserId = default) @@ -928,37 +932,38 @@ public static EmbeddingGenerationOptions EmbeddingGenerationOptions(int? dimensi model, encodingFormat, endUserId, - null); + additionalBinaryDataProperties: null); } - public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(string model = default, EmbeddingTokenUsage usage = default, InternalCreateEmbeddingResponseObject @object = default) + public static OpenAIEmbeddingCollection OpenAIEmbeddingCollection(IEnumerable data = default, string model = default, InternalCreateEmbeddingResponseObject @object = default, EmbeddingTokenUsage usage = default) { + data ??= new ChangeTrackingList(); - return new OpenAIEmbeddingCollection(model, usage, @object, null); + return new OpenAIEmbeddingCollection(data?.ToList(), model, @object, usage, serializedAdditionalRawData: null); } public static OpenAIEmbedding OpenAIEmbedding(int index = default, BinaryData embeddingProperty = default, InternalEmbeddingObject @object = default) { - return new OpenAIEmbedding(index, embeddingProperty, @object, null); + return new OpenAIEmbedding(index, embeddingProperty, @object, serializedAdditionalRawData: null); } public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = default, int totalTokenCount = default) { - return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, null); + return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, additionalBinaryDataProperties: null); } public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = default) { - return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, null); + return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, additionalBinaryDataProperties: null); } public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, null); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties: null); } public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default) @@ -994,25 +999,25 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt maxOutputTokenCount, functions?.ToList(), serviceTier, - null); + additionalBinaryDataProperties: null); } public static ChatMessage ChatMessage(string role = default, ChatMessageContent content = default) { - return new InternalUnknownChatMessage(role.ToChatMessageRole(), content, null); + return new InternalUnknownChatMessage(role.ToChatMessageRole(), content, additionalBinaryDataProperties: null); } public static SystemChatMessage SystemChatMessage(string participantName = default, ChatMessageContent content = default) { - return new SystemChatMessage(participantName, Chat.ChatMessageRole.System, content, null); + return new SystemChatMessage(participantName, Chat.ChatMessageRole.System, content, additionalBinaryDataProperties: null); } public static UserChatMessage UserChatMessage(string participantName = default, ChatMessageContent content = default) { - return new UserChatMessage(participantName, Chat.ChatMessageRole.User, content, null); + return new UserChatMessage(participantName, Chat.ChatMessageRole.User, content, additionalBinaryDataProperties: null); } public static AssistantChatMessage AssistantChatMessage(string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, ChatMessageContent content = default) @@ -1026,49 +1031,49 @@ public static AssistantChatMessage AssistantChatMessage(string refusal = default functionCall, Chat.ChatMessageRole.Assistant, content, - null); + additionalBinaryDataProperties: null); } public static ChatToolCall ChatToolCall(string id = default, InternalChatCompletionMessageToolCallFunction function = default, Chat.ChatToolCallKind kind = default) { - return new ChatToolCall(id, function, kind, null); + return new ChatToolCall(id, function, kind, additionalBinaryDataProperties: null); } public static ChatFunctionCall ChatFunctionCall(string functionName = default, BinaryData functionArguments = default) { - return new ChatFunctionCall(functionName, functionArguments, null); + return new ChatFunctionCall(functionName, functionArguments, additionalBinaryDataProperties: null); } public static ToolChatMessage ToolChatMessage(string toolCallId = default, ChatMessageContent content = default) { - return new ToolChatMessage(toolCallId, Chat.ChatMessageRole.Tool, content, null); + return new ToolChatMessage(toolCallId, Chat.ChatMessageRole.Tool, content, additionalBinaryDataProperties: null); } public static FunctionChatMessage FunctionChatMessage(string functionName = default, ChatMessageContent content = default) { - return new FunctionChatMessage(functionName, Chat.ChatMessageRole.Function, content, null); + return new FunctionChatMessage(functionName, Chat.ChatMessageRole.Function, content, additionalBinaryDataProperties: null); } public static ChatResponseFormat ChatResponseFormat(string @type = default) { - return new InternalUnknownChatResponseFormat(@type, null); + return new InternalUnknownChatResponseFormat(@type, additionalBinaryDataProperties: null); } public static ChatTool ChatTool(InternalFunctionDefinition function = default, Chat.ChatToolKind kind = default) { - return new ChatTool(function, kind, null); + return new ChatTool(function, kind, additionalBinaryDataProperties: null); } public static ChatFunction ChatFunction(string functionName = default, string functionDescription = default, BinaryData functionParameters = default) { - return new ChatFunction(functionName, functionDescription, functionParameters, null); + return new ChatFunction(functionName, functionDescription, functionParameters, additionalBinaryDataProperties: null); } public static ChatCompletion ChatCompletion(string id = default, string model = default, string systemFingerprint = default, ChatTokenUsage usage = default, InternalCreateChatCompletionResponseObject @object = default, InternalCreateChatCompletionResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default) @@ -1084,22 +1089,20 @@ public static ChatCompletion ChatCompletion(string id = default, string model = serviceTier, choices?.ToList(), createdAt, - null); + additionalBinaryDataProperties: null); } public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default, IEnumerable topLogProbabilities = default) { - utf8Bytes ??= new ReadOnlyMemory(); topLogProbabilities ??= new ChangeTrackingList(); - return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), topLogProbabilities?.ToList(), null); + return new ChatTokenLogProbabilityDetails(token, logProbability, utf8Bytes, topLogProbabilities?.ToList(), additionalBinaryDataProperties: null); } public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = default, float logProbability = default, ReadOnlyMemory? utf8Bytes = default) { - utf8Bytes ??= new ReadOnlyMemory(); - return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes?.ToList(), null); + return new ChatTokenTopLogProbabilityDetails(token, logProbability, utf8Bytes, additionalBinaryDataProperties: null); } public static AssistantCreationOptions AssistantCreationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, string model = default, IEnumerable tools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) @@ -1118,7 +1121,7 @@ public static AssistantCreationOptions AssistantCreationOptions(string name = de toolResources, responseFormat, nucleusSamplingFactor, - null); + additionalBinaryDataProperties: null); } public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) @@ -1140,20 +1143,20 @@ public static Assistant Assistant(string id = default, DateTimeOffset createdAt @object, responseFormat, nucleusSamplingFactor, - null); + additionalBinaryDataProperties: null); } public static ToolResources ToolResources(CodeInterpreterToolResources codeInterpreter = default, FileSearchToolResources fileSearch = default) { - return new ToolResources(codeInterpreter, fileSearch, null); + return new ToolResources(codeInterpreter, fileSearch, additionalBinaryDataProperties: null); } public static CodeInterpreterToolResources CodeInterpreterToolResources(IEnumerable fileIds = default) { fileIds ??= new ChangeTrackingList(); - return new CodeInterpreterToolResources(fileIds?.ToList(), null); + return new CodeInterpreterToolResources(fileIds?.ToList(), additionalBinaryDataProperties: null); } public static AssistantModificationOptions AssistantModificationOptions(string name = default, string description = default, string instructions = default, IDictionary metadata = default, float? temperature = default, string model = default, IEnumerable defaultTools = default, ToolResources toolResources = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) @@ -1172,13 +1175,13 @@ public static AssistantModificationOptions AssistantModificationOptions(string n toolResources, responseFormat, nucleusSamplingFactor, - null); + additionalBinaryDataProperties: null); } public static AssistantDeletionResult AssistantDeletionResult(bool deleted = default, string assistantId = default, InternalDeleteAssistantResponseObject @object = default) { - return new AssistantDeletionResult(deleted, assistantId, @object, null); + return new AssistantDeletionResult(deleted, assistantId, @object, additionalBinaryDataProperties: null); } public static SpeechGenerationOptions SpeechGenerationOptions(GeneratedSpeechFormat? responseFormat = default, InternalCreateSpeechRequestModel model = default, string input = default, GeneratedSpeechVoice voice = default, float? speedRatio = default) @@ -1190,7 +1193,7 @@ public static SpeechGenerationOptions SpeechGenerationOptions(GeneratedSpeechFor input, voice, speedRatio, - null); + additionalBinaryDataProperties: null); } public static AudioTranscriptionOptions AudioTranscriptionOptions(string language = default, string prompt = default, AudioTranscriptionFormat? responseFormat = default, float? temperature = default, BinaryData @file = default, InternalCreateTranscriptionRequestModel model = default, IEnumerable internalTimestampGranularities = default) @@ -1205,7 +1208,7 @@ public static AudioTranscriptionOptions AudioTranscriptionOptions(string languag @file, model, internalTimestampGranularities?.ToList(), - null); + additionalBinaryDataProperties: null); } public static AudioTranscription AudioTranscription(string language = default, string text = default, IEnumerable words = default, IEnumerable segments = default, InternalCreateTranscriptionResponseVerboseJsonTask task = default, TimeSpan? duration = default) @@ -1220,18 +1223,17 @@ public static AudioTranscription AudioTranscription(string language = default, s segments?.ToList(), task, duration, - null); + additionalBinaryDataProperties: null); } public static TranscribedWord TranscribedWord(string word = default, TimeSpan startTime = default, TimeSpan endTime = default) { - return new TranscribedWord(word, startTime, endTime, null); + return new TranscribedWord(word, startTime, endTime, additionalBinaryDataProperties: null); } public static TranscribedSegment TranscribedSegment(int id = default, string text = default, float temperature = default, float compressionRatio = default, TimeSpan startTime = default, TimeSpan endTime = default, int seekOffset = default, ReadOnlyMemory tokenIds = default, float averageLogProbability = default, float noSpeechProbability = default) { - tokenIds ??= new ReadOnlyMemory(); return new TranscribedSegment( id, @@ -1241,10 +1243,10 @@ public static TranscribedSegment TranscribedSegment(int id = default, string tex startTime, endTime, seekOffset, - tokenIds?.ToList(), + tokenIds, averageLogProbability, noSpeechProbability, - null); + additionalBinaryDataProperties: null); } public static AudioTranslationOptions AudioTranslationOptions(string prompt = default, AudioTranslationFormat? responseFormat = default, float? temperature = default, BinaryData @file = default, InternalCreateTranslationRequestModel model = default) @@ -1256,7 +1258,7 @@ public static AudioTranslationOptions AudioTranslationOptions(string prompt = de temperature, @file, model, - null); + additionalBinaryDataProperties: null); } public static AudioTranslation AudioTranslation(string language = default, string text = default, IEnumerable segments = default, InternalCreateTranslationResponseVerboseJsonTask task = default, TimeSpan? duration = default) @@ -1269,49 +1271,49 @@ public static AudioTranslation AudioTranslation(string language = default, strin segments?.ToList(), task, duration, - null); + additionalBinaryDataProperties: null); } public static AssistantResponseFormat AssistantResponseFormat(string @type = default) { - return new InternalUnknownAssistantResponseFormat(@type, null); + return new InternalUnknownAssistantResponseFormat(@type, additionalBinaryDataProperties: null); } - public static ChatFunctionChoice ChatFunctionChoice() + public static ChatFunctionChoice ChatFunctionChoice(string functionName = default) { - return new ChatFunctionChoice(null); + return new ChatFunctionChoice(functionName, serializedAdditionalRawData: null); } public static ChatToolChoice ChatToolChoice() { - return new ChatToolChoice(null); + return new ChatToolChoice(additionalBinaryDataProperties: null); } public static ChatMessageContent ChatMessageContent() { - return new ChatMessageContent(null); + return new ChatMessageContent(additionalBinaryDataProperties: null); } - public static ChatMessageContentPart ChatMessageContentPart() + public static ChatMessageContentPart ChatMessageContentPart(Chat.ChatMessageContentPartKind kind = default, string text = default, InternalChatCompletionRequestMessageContentPartImageImageUrl imageUri = default, string refusal = default) { - return new ChatMessageContentPart(null); + return new ChatMessageContentPart(kind, text, imageUri, refusal, serializedAdditionalRawData: null); } public static StreamingChatFunctionCallUpdate StreamingChatFunctionCallUpdate(string functionName = default, BinaryData functionArgumentsUpdate = default) { - return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, null); + return new StreamingChatFunctionCallUpdate(functionName, functionArgumentsUpdate, additionalBinaryDataProperties: null); } public static StreamingChatToolCallUpdate StreamingChatToolCallUpdate(int index = default, InternalChatCompletionMessageToolCallChunkFunction function = default, Chat.ChatToolCallKind kind = default, string toolCallId = default) { - return new StreamingChatToolCallUpdate(index, function, kind, toolCallId, null); + return new StreamingChatToolCallUpdate(index, function, kind, toolCallId, additionalBinaryDataProperties: null); } public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string model = default, string systemFingerprint = default, InternalCreateChatCompletionStreamResponseObject @object = default, string completionId = default, InternalCreateChatCompletionStreamResponseServiceTier? serviceTier = default, IEnumerable choices = default, DateTimeOffset createdAt = default, ChatTokenUsage usage = default) @@ -1327,13 +1329,13 @@ public static StreamingChatCompletionUpdate StreamingChatCompletionUpdate(string choices?.ToList(), createdAt, usage, - null); + additionalBinaryDataProperties: null); } public static RunStepUpdateCodeInterpreterOutput RunStepUpdateCodeInterpreterOutput(string @type = default) { - return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, null); + return new UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject(@type, additionalBinaryDataProperties: null); } } } diff --git a/.plugin/emitter/temp/tsconfig.tsbuildinfo b/.plugin/emitter/temp/tsconfig.tsbuildinfo index ea906727c..0b86cfc08 100644 --- a/.plugin/emitter/temp/tsconfig.tsbuildinfo +++ b/.plugin/emitter/temp/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/type-name-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/checker.d.ts","../../node_modules/@typespec/compiler/dist/src/manifest.d.ts","../../node_modules/@typespec/compiler/dist/src/types/package-json.d.ts","../../node_modules/@typespec/compiler/dist/src/module-resolver/module-resolver.d.ts","../../node_modules/@typespec/compiler/dist/src/core/decorator-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/deprecation.d.ts","../../node_modules/@typespec/compiler/dist/src/core/diagnostics.d.ts","../../node_modules/@typespec/compiler/dist/src/core/emitter-utils.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@typespec/compiler/dist/src/core/formatter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/numeric.d.ts","../../node_modules/@typespec/compiler/dist/src/core/intrinsic-type-state.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/discriminator-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/location-context.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/operation-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/path-interpolation.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/projected-names-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/string-template-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/syntax-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/usage-resolver.d.ts","../../node_modules/@typespec/compiler/dist/src/core/helpers/index.d.ts","../../node_modules/@typespec/compiler/dist/src/core/param-message.d.ts","../../node_modules/@typespec/compiler/dist/src/core/library.d.ts","../../node_modules/@typespec/compiler/dist/src/core/linter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/node-host.d.ts","../../node_modules/@typespec/compiler/dist/src/core/parser-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/parser.d.ts","../../node_modules/@typespec/compiler/dist/src/core/path-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/projected-program.d.ts","../../node_modules/@typespec/compiler/dist/src/core/scanner.d.ts","../../node_modules/@typespec/compiler/dist/src/core/semantic-walker.d.ts","../../node_modules/@typespec/compiler/dist/src/core/source-file.d.ts","../../node_modules/@typespec/compiler/dist/src/core/type-utils.d.ts","../../node_modules/@typespec/compiler/dist/src/core/index.d.ts","../../node_modules/@typespec/compiler/dist/src/yaml/types.d.ts","../../node_modules/@typespec/compiler/dist/src/config/types.d.ts","../../node_modules/@typespec/compiler/dist/src/core/options.d.ts","../../node_modules/@typespec/compiler/dist/src/core/state-accessors.d.ts","../../node_modules/@typespec/compiler/dist/src/core/program.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/placeholder.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/types.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/reference-cycle.d.ts","../../node_modules/@typespec/compiler/dist/src/emitter-framework/type-emitter.d.ts","../../node_modules/@typespec/compiler/dist/src/core/types.d.ts","../../node_modules/@typespec/compiler/dist/src/config/config-loader.d.ts","../../node_modules/@typespec/compiler/dist/src/config/config-to-options.d.ts","../../node_modules/@typespec/compiler/dist/src/config/index.d.ts","../../node_modules/@typespec/compiler/dist/generated-defs/typespec.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/encoded-names.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/examples.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/service.d.ts","../../node_modules/@typespec/compiler/dist/src/lib/decorators.d.ts","../../node_modules/@typespec/compiler/dist/src/server/language-config.d.ts","../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../node_modules/vscode-jsonrpc/typings/thenable.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messages.d.ts","../../node_modules/vscode-jsonrpc/lib/common/linkedmap.d.ts","../../node_modules/vscode-jsonrpc/lib/common/disposable.d.ts","../../node_modules/vscode-jsonrpc/lib/common/events.d.ts","../../node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts","../../node_modules/vscode-jsonrpc/lib/common/encoding.d.ts","../../node_modules/vscode-jsonrpc/lib/common/ral.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagereader.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagewriter.d.ts","../../node_modules/vscode-jsonrpc/lib/common/connection.d.ts","../../node_modules/vscode-jsonrpc/lib/common/sharedarraycancellation.d.ts","../../node_modules/vscode-jsonrpc/lib/common/messagebuffer.d.ts","../../node_modules/vscode-jsonrpc/lib/common/api.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typedefinition.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.workspacefolder.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.colorprovider.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.callhierarchy.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.semantictokens.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.showdocument.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.linkededitingrange.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.fileoperations.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typehierarchy.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinevalue.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayhint.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinecompletion.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts","../../node_modules/vscode-languageserver-protocol/lib/common/api.d.ts","../../node_modules/vscode-languageserver/lib/common/progress.d.ts","../../node_modules/vscode-languageserver/lib/common/configuration.d.ts","../../node_modules/vscode-languageserver/lib/common/workspacefolder.d.ts","../../node_modules/vscode-languageserver/lib/common/callhierarchy.d.ts","../../node_modules/vscode-languageserver/lib/common/semantictokens.d.ts","../../node_modules/vscode-languageserver/lib/common/showdocument.d.ts","../../node_modules/vscode-languageserver/lib/common/fileoperations.d.ts","../../node_modules/vscode-languageserver/lib/common/linkededitingrange.d.ts","../../node_modules/vscode-languageserver/lib/common/typehierarchy.d.ts","../../node_modules/vscode-languageserver/lib/common/inlinevalue.d.ts","../../node_modules/vscode-languageserver/lib/common/foldingrange.d.ts","../../node_modules/vscode-languageserver/lib/common/inlayhint.d.ts","../../node_modules/vscode-languageserver/lib/common/diagnostic.d.ts","../../node_modules/vscode-languageserver/lib/common/textdocuments.d.ts","../../node_modules/vscode-languageserver/lib/common/notebook.d.ts","../../node_modules/vscode-languageserver/lib/common/moniker.d.ts","../../node_modules/vscode-languageserver/lib/common/server.d.ts","../../node_modules/vscode-languageserver/lib/common/inlinecompletion.proposed.d.ts","../../node_modules/vscode-languageserver/lib/common/api.d.ts","../../node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts","../../node_modules/@typespec/compiler/dist/src/server/types.d.ts","../../node_modules/@typespec/compiler/dist/src/server/serverlib.d.ts","../../node_modules/@typespec/compiler/dist/src/server/index.d.ts","../../node_modules/@typespec/compiler/dist/src/formatter/index.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/duplicate-tracker.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/misc.d.ts","../../node_modules/@typespec/compiler/dist/src/utils/index.d.ts","../../node_modules/@typespec/compiler/dist/src/index.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/constants.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/generated-defs/azure.clientgenerator.core.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lib.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/linter.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.private.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-info.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-helpers.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/decorators.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/helpers/union-enums.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/prevent-rest-library.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/use-standard-operations.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.private.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/traits.d.ts","../../node_modules/@typespec/http/dist/src/lib.d.ts","../../node_modules/@typespec/http/dist/src/linter.d.ts","../../node_modules/@typespec/http/dist/generated-defs/typespec.http.private.d.ts","../../node_modules/@typespec/http/dist/generated-defs/typespec.http.d.ts","../../node_modules/@typespec/http/dist/src/metadata.d.ts","../../node_modules/@typespec/http/dist/src/http-property.d.ts","../../node_modules/@typespec/http/dist/src/types.d.ts","../../node_modules/@typespec/http/dist/src/auth.d.ts","../../node_modules/@typespec/http/dist/src/content-types.d.ts","../../node_modules/@typespec/http/dist/src/decorators.d.ts","../../node_modules/@typespec/http/dist/src/operations.d.ts","../../node_modules/@typespec/http/dist/src/parameters.d.ts","../../node_modules/@typespec/http/dist/src/private.decorators.d.ts","../../node_modules/@typespec/http/dist/src/responses.d.ts","../../node_modules/@typespec/http/dist/src/route.d.ts","../../node_modules/@typespec/http/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/utils.d.ts","../../node_modules/@azure-tools/typespec-azure-core/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/internal-utils.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/interfaces.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/decorators.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/lib.d.ts","../../node_modules/@typespec/versioning/dist/generated-defs/typespec.versioning.d.ts","../../node_modules/@typespec/versioning/dist/src/types.d.ts","../../node_modules/@typespec/versioning/dist/src/decorators.d.ts","../../node_modules/@typespec/versioning/dist/src/projection.d.ts","../../node_modules/@typespec/versioning/dist/src/validate.d.ts","../../node_modules/@typespec/versioning/dist/src/versioning-timeline.d.ts","../../node_modules/@typespec/versioning/dist/src/versioning.d.ts","../../node_modules/@typespec/versioning/dist/src/index.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/public-utils.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/types.d.ts","../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/index.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/log-level.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/options.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/emitter.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/lib.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/logger.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/sdk-context-options.d.ts","../../node_modules/@typespec/http-client-csharp/dist/emitter/index.d.ts","../src/emitter.ts","../src/index.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/undici-types/retry-handler.d.ts","../../node_modules/undici-types/retry-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/util.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/eventsource.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/sqlite.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts5.6/index.d.ts"],"fileIdsList":[[226,282,290,332],[283,290,332],[226,290,332],[226,231,232,233,234,235,290,332],[229,230,235,236,237,238,239,242,259,290,332],[226,234,290,332],[226,235,236,290,332],[226,240,241,290,332],[226,258,290,332],[226,228,261,262,290,332],[262,263,264,273,274,290,332],[226,258,260,261,290,332],[226,258,262,290,332],[226,258,261,262,272,290,332],[226,260,262,290,332],[290,329,332],[290,331,332],[290,332,337,367],[290,332,333,338,344,345,352,364,375],[290,332,333,334,344,352],[290,332],[285,286,287,290,332],[290,332,335,376],[290,332,336,337,345,353],[290,332,337,364,372],[290,332,338,340,344,352],[290,331,332,339],[290,332,340,341],[290,332,344],[290,332,342,344],[290,331,332,344],[290,332,344,345,346,364,375],[290,332,344,345,346,359,364,367],[290,327,332,380],[290,327,332,340,344,347,352,364,375],[290,332,344,345,347,348,352,364,372,375],[290,332,347,349,364,372,375],[290,332,344,350],[290,332,351,375,380],[290,332,340,344,352,364],[290,332,353],[290,332,354],[290,331,332,355],[290,329,330,331,332,333,334,335,336,337,338,339,340,341,342,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,357],[290,332,358],[290,332,344,359,360],[290,332,359,361,376,378],[290,332,344,364,365,366,367],[290,332,364,366],[290,332,364,365],[290,332,367],[290,332,368],[290,329,332,364],[290,332,344,370,371],[290,332,370,371],[290,332,337,352,364,372],[290,332,373],[332],[288,289,290,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,352,374],[290,332,347,358,375],[290,332,337,376],[290,332,364,377],[290,332,351,378],[290,332,379],[290,332,337,344,346,355,364,375,378,380],[290,332,364,381],[141,149,290,332],[141,142,149,290,332],[141,150,151,290,332],[139,140,290,332],[104,144,149,290,332],[144,149,290,332],[144,290,332],[114,290,332],[117,144,149,290,332],[104,118,119,120,121,122,123,124,125,290,332],[149,290,332],[105,106,108,109,110,111,112,115,116,117,126,128,129,130,131,132,133,134,135,136,137,138,142,144,149,290,332],[116,139,144,290,332],[127,149,290,332],[111,144,149,290,332],[105,142,143,149,290,332],[139,290,332],[111,149,290,332],[103,108,116,144,146,148,290,332],[139,146,290,332],[144,145,146,147,149,290,332],[139,145,148,290,332],[114,149,290,332],[107,139,152,157,221,222,225,290,332],[117,144,149,153,154,155,156,290,332],[144,149,157,290,332],[144,149,153,290,332],[107,290,332],[158,219,220,290,332],[219,290,332],[139,217,218,290,332],[223,224,290,332],[106,111,149,290,332],[226,277,290,332],[227,276,277,278,279,280,281,290,332],[226,276,290,332],[226,275,276,290,332],[275,290,332],[226,249,290,332],[226,246,249,290,332],[226,247,249,290,332],[243,244,245,247,248,249,250,251,252,253,254,255,256,257,290,332],[226,245,290,332],[226,246,248,290,332],[226,265,266,290,332],[266,267,268,269,271,290,332],[226,266,290,332],[226,266,267,270,290,332],[62,63,67,94,95,97,98,99,101,102,290,332],[60,61,290,332],[60,290,332],[62,102,290,332],[62,63,99,100,102,290,332],[102,290,332],[59,102,103,290,332],[62,63,101,102,290,332],[62,63,65,66,101,102,290,332],[62,63,64,101,102,290,332],[62,63,67,94,95,96,97,98,101,102,290,332],[59,62,63,67,99,101,290,332],[67,102,290,332],[69,70,71,72,73,74,75,76,77,78,102,290,332],[92,102,290,332],[68,79,87,88,89,90,91,93,290,332],[72,102,290,332],[80,81,82,83,84,85,86,102,290,332],[113,290,332],[290,299,303,332,375],[290,299,332,364,375],[290,294,332],[290,296,299,332,372,375],[290,332,352,372],[290,332,382],[290,294,332,382],[290,296,299,332,352,375],[290,291,292,295,298,332,344,364,375],[290,299,306,332],[290,291,297,332],[290,299,320,321,332],[290,295,299,332,367,375,382],[290,320,332,382],[290,293,294,332,382],[290,299,332],[290,293,294,295,296,297,298,299,300,301,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,321,322,323,324,325,326,332],[290,299,314,332],[290,299,306,307,332],[290,297,299,307,308,332],[290,298,332],[290,291,294,299,332],[290,299,303,307,308,332],[290,303,332],[290,297,299,302,332,375],[290,291,296,299,306,332],[290,332,364],[290,294,299,320,332,380,382],[160,161,162,163,164,165,166,167,168,169,170,171,172,290,332],[163,164,290,332],[161,163,164,165,168,169,290,332],[161,167,290,332],[163,290,332],[167,290,332],[161,164,166,167,173,290,332],[161,164,166,167,290,332],[163,166,290,332],[161,165,170,290,332],[159,173,174,196,197,290,332],[173,174,290,332],[173,290,332],[159,173,174,196,290,332],[159,173,174,290,332],[159,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,290,332],[174,196,290,332],[159,174,196,290,332],[198,199,203,212,213,215,216,290,332],[198,215,290,332],[198,212,215,290,332],[198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,290,332],[198,290,332]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee660a1f2acd3d7fc7b28df06c4e2125229666c4d72e5455ae3841bfd222f684","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"20175b94bd9aa2285b3140d8eff67d15b7e67bda225d9e4eef8d98d1ad9fdff0","impliedFormat":99},{"version":"569423c43cfcc3aec4d4f32f188ba01103f0b0da840e3327bd6f301981b592f4","impliedFormat":99},{"version":"2546eb0653f8b3ff203afb5aab17de16b98501295e328e4b02fbe99d003da10f","impliedFormat":99},{"version":"2e8cf7c24be364148c3c0702b0dfb6d706a9c5e5c7813af58ead241eb784f6ec","impliedFormat":99},{"version":"14ae999652dfd8e8ba8d4bfee86be2e468379a4247e5d58abc27be78fd09745e","impliedFormat":99},{"version":"e29f58e8e09108d4d4bb45d4b57a28d9b195e381b0857e9ca235e51ea0d97f9c","impliedFormat":99},{"version":"393fbf2918871b7bf342caee721d168a8a122bddf9d1c1540561f7a1b57f2e52","impliedFormat":99},{"version":"b76a160a84bc82f95c86b3dc4b7a495d53dcbe704f83a1829f7894b457712fc4","impliedFormat":99},{"version":"132e64ba175c5d069dc3229780a99d244d17fa0ad8c123fd68b449357935c4d4","impliedFormat":99},{"version":"2f848b4e660b568651a6350565afc8ac5b0644853a2a863862807602cf244a05","impliedFormat":1},{"version":"6ac85cb2c23dcb52445b268258a7ea36d620054e7db53874d890bb64981ddc13","impliedFormat":1},{"version":"b8f924913b407f41ffa7c4fd46066fe199323d2203d106e164c63760b88ea6be","impliedFormat":99},{"version":"5a23cb53a5e8de12e99766a33421d4e069f58578f2429313a0499c00f7dfe23c","impliedFormat":99},{"version":"018970bd1cd62cb80ad410f2dab15d15775a6f63a9504b5e8d64cb13d766ea08","impliedFormat":99},{"version":"8cbca7868a6662571aa5a8745eeccbdfa59d1f4b03857f1b3d25802fd4f9a32b","impliedFormat":99},{"version":"3d99644caf064bd8ced7365698bb55c7db1b68d82e48dbde9ffd21e503b5d0b2","impliedFormat":99},{"version":"5077b3ba3766f16b30e325ad7d720330c08ef84fc2f6a449826adb006bc581ed","impliedFormat":99},{"version":"4ac79fd5d2a7f056ba1eda188700198f20d32bcab0db09f311d5d5f5d746c2ca","impliedFormat":99},{"version":"a0a61d07fbaecc0b60b5cbde76e0e87c79ac2e1819fe20612bb8f30a56383dbe","impliedFormat":99},{"version":"569edbdf1a3fc773a8289c37ff0d63c9af483a84e704063a3439255b7f377d4f","impliedFormat":99},{"version":"9fe08a940616c1119c99ab5e79308eba7e88de97dfea87e44b95ba82d738eef4","impliedFormat":99},{"version":"ad10612fdbbc90fd9238b854ee39ad38a118cee8ac8979b1194895167168ceb3","impliedFormat":99},{"version":"03c705d7cc25c32907aac3a2bb178997e529eb56bb1ba063b887d18597a2bdda","impliedFormat":99},{"version":"c4b70b3f64ad8f28ce4a5624849cf1bb4f351f5ab8ee2db5c8edc53e85211584","impliedFormat":99},{"version":"cf46f4676dbe929b5320ba322897852e1b8015a43476ce4629fab69f82c12bd1","impliedFormat":99},{"version":"9dadd99afed4a96cf39d9c6ddc6459639cdbd9baeda97721f7fbd77af7517874","impliedFormat":99},{"version":"2b0959130e13998633418b3c425b50276eff966a2ed211c2ffe1c9d8a679ce44","impliedFormat":99},{"version":"55d56ae75b4d57956cc4ddeeefd30780d364b0aa3992e1d7df3d5f8d5fe9acff","impliedFormat":99},{"version":"20002fec9cc7289f9e69c1a95372c97a40db9eea44cd19b1fd0ccc3a8a122345","impliedFormat":99},{"version":"123d94390345afefbdd612f216d40db16c3710338edcb73b5f4be0a4ad539aa4","impliedFormat":99},{"version":"1264211b19f3c465b98afccd58fabac6e5e146ee6d849fcf63ddb33fd78720f1","impliedFormat":99},{"version":"f8a298d831ed8ca73a8dc9d5780817a7720ba9894042a69356a75c5e5f8c6893","impliedFormat":99},{"version":"2c6d27c8baadb60b734b8db829df8d12f58345402180ff88642ff5c1388cdf13","impliedFormat":99},{"version":"44d4f46fdd99e11b1f9f1e634b8f2881012c3501c04b07227d83502fb09ea548","impliedFormat":99},{"version":"3f4eef14851f0eadca50c74dd917aaf86124463cfc1cf5bc92e9831714c9910b","impliedFormat":99},{"version":"bdea99de0c771ba2b6aa7d0d83ecf7d3fb26b25314d32d63af6909d107df7c00","impliedFormat":99},{"version":"a6b6ed49a87b2a5690f61463b05d364af1bb39cc8472047691b921923e6ac9c9","impliedFormat":99},{"version":"d7f8c331cc75c67d3da42891e8532a9c869f961ed5d8dfbbe7d0ba35056cfcfb","impliedFormat":99},{"version":"8151e6cb5e10df668b741859300b99e32e18abcffaf2be101c4c2a6536f3442b","impliedFormat":99},{"version":"e96945cee95fede7ee90c31b805bc159562de0d88eb609d64b8d58855bf217b1","impliedFormat":99},{"version":"2d758a247ac13ae52ddecc90888a9a5fbd5b2640443078fb29cc8c312870cb74","impliedFormat":99},{"version":"da7ef8056b01283adea3ca6de1dabfd428b439d6050a75602f1e30f48eb6efdf","impliedFormat":99},{"version":"1594151e41321f9180c1451a1650631e06b1db7ffe5639c7edb6275c512b2f51","impliedFormat":99},{"version":"da9c0be46b2da7d84a03db79ae33edcd7388bd35c388b99ec37368aa1729e778","impliedFormat":99},{"version":"fce174b4613b3b31fe82b778e0e2c3a7fa0b41f8ced9b231b1a8c5a05c8b54f9","impliedFormat":99},{"version":"53e19706bab98ca4bfa4b42c783115fa2741c0483cc345e4f7e710d558200a1c","impliedFormat":99},{"version":"2d3045c2fdabdcb0ec2ec439868e2631d68bdea368750fa58170d016c0d06572","impliedFormat":99},{"version":"0ad7175d8390859cc77b9b1560fdd10a18990c189675abca18f65992b8507742","impliedFormat":99},{"version":"ad3d8bb2ac79fbda7222abb647e260914f6e6f2ed988f7db8acc62a44d78f448","impliedFormat":99},{"version":"1f37f596f1f6c032d3786baf43edb6c9aed3935eaf457fdb58d581794a8e7c52","impliedFormat":99},{"version":"41b5774912c8d91f1b3b84ddd2aad499e926477100855180512e9954dc02103d","impliedFormat":99},{"version":"fa58422ab7be615763761b87694a2994522ec1332276ef49df5e0a3287eb2c59","impliedFormat":99},{"version":"91128a15b91060cfde42e9d30dfee6c2f7b6887a4162b0e03ebd2471c7bdaeab","impliedFormat":99},{"version":"eee4060428d6fe35733db1ec1a630901d0cb99dbd27bb17eaf836c2cab52c361","impliedFormat":99},{"version":"dbb312aedcf0ce06467366f096ec6591b4c0f0d956137dd49c35a9b20bb90be7","impliedFormat":99},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6","impliedFormat":1},{"version":"cab0ba78dc961d90d639ccaf3d56c484e584056da39dc0d9bdaf1957be965f72","impliedFormat":1},{"version":"f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1","impliedFormat":1},{"version":"886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1","impliedFormat":1},{"version":"392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2","impliedFormat":1},{"version":"e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4","impliedFormat":1},{"version":"2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a","impliedFormat":1},{"version":"3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43","impliedFormat":1},{"version":"b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5","impliedFormat":1},{"version":"2ff2789ae43f9c056917e7516a02ad07c4cc1cafff3c68ff6b7ff8df623fd259","impliedFormat":1},{"version":"13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469","impliedFormat":1},{"version":"4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177","impliedFormat":1},{"version":"d576ef1b6aa804d0f0e8dfb3f6149b576788b598054aa2e15d5a7f7f52faf371","impliedFormat":1},{"version":"5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e","impliedFormat":1},{"version":"bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999","impliedFormat":1},{"version":"eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc","impliedFormat":1},{"version":"05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d","impliedFormat":1},{"version":"00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa","impliedFormat":1},{"version":"33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a","impliedFormat":1},{"version":"45f441bf74e920f6909ca6874037fdd10f06644c341b99fd7cfd041ea565ce1f","impliedFormat":1},{"version":"f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67","impliedFormat":1},{"version":"b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f","impliedFormat":1},{"version":"96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04","impliedFormat":1},{"version":"29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348","impliedFormat":1},{"version":"9381d5bdf7197cc4f732243e22762d27508daf7fcab0fff7339fe4660c11f382","impliedFormat":1},{"version":"0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6","impliedFormat":1},{"version":"818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f","impliedFormat":1},{"version":"77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079","impliedFormat":1},{"version":"80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917","impliedFormat":1},{"version":"daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe","impliedFormat":1},{"version":"6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4","impliedFormat":1},{"version":"656106ddbe4e00bd32af2c46abb1a8c9abbb8679fbf29adc637c053620286034","impliedFormat":1},{"version":"ddf3f680de453b300dd1c47e136b8ade3857d2c357635efeb0f9977d81d1e96d","impliedFormat":1},{"version":"dfc345d92b6d08863b239b8d025ea513df322af74e221d62f4bdbe217d08f69d","impliedFormat":1},{"version":"7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5","impliedFormat":1},{"version":"2f3aa6fb84e6955886902a6a8818e4bff9c79b97356773bd6ac2ff3993c097a2","impliedFormat":1},{"version":"c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e","impliedFormat":1},{"version":"08724e39439dbc02bdba9768f84736ed132bb02a04fbce0a2cdfc91f42e90505","impliedFormat":1},{"version":"f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3","impliedFormat":1},{"version":"7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc","impliedFormat":1},{"version":"1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e","impliedFormat":1},{"version":"46a9b0122b230cb2fab65999ba92f98a16fd8f1c25efaed47141cbf5056f6928","impliedFormat":1},{"version":"5a9a4741aa510bdee406441f77186c6d2005be78e78c2e0da8201d9991950164","impliedFormat":1},{"version":"351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02","impliedFormat":1},{"version":"3990ae796cc23fb9829eae206eff1eddded9465504467a4433f2509e18ef1aed","impliedFormat":1},{"version":"b557ea3605e52406e35eeea468cb96f25b1ca906f2055f376597f0b02492d94c","impliedFormat":1},{"version":"f384bb303dbc114af6460e7cb30b766cc92eed33fccb331126b08bb63f15a034","impliedFormat":1},{"version":"8a9bd1cf8c1f75435f83595b43737c135e7f73bde39ba4c9339dc6a31e8bb069","impliedFormat":1},{"version":"aa7747ab234b18813944ecdd61683a696025cd4f6970d7749d370080d4f9b349","impliedFormat":1},{"version":"8274bfd5de49f9f072be2f39c34e390101a8b69844e55eda36c7df23ba6d03e2","impliedFormat":1},{"version":"f8b482dddda55dd6677d7895a3fef8cd9d067f8c36c63cc7fe93b82a6dd4f10c","impliedFormat":1},{"version":"71d11ad1f05b0b90e95591fa85c1c8043e590d67972dcaba9b50435a0c04d8fa","impliedFormat":1},{"version":"5c74e3eee30bb7899eebe784e3c05cb29f1bed3efb2a3b4599b66173fda4aa30","impliedFormat":1},{"version":"a980ce9470dc95ac355d7efb729f9cfb0564505eba96da4bbde504299efb833a","impliedFormat":1},{"version":"72a33e518e5b98cd9c9dc8ee294f7507bf2a8938f491b0cf49c8ae582b966b3a","impliedFormat":1},{"version":"173838811f6dcba587706efd87358f804261549bc02c455d31818328c1af97ad","impliedFormat":1},{"version":"483ff04f1796aef40323f47ca3f03bf53492a2878508c8d7be98cdb4fae151f3","impliedFormat":1},{"version":"96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8","impliedFormat":99},{"version":"8b539ac8d500541d0e3187289173cbcfbbc86db438bc85de5ad5c14c66b8b8ab","impliedFormat":99},{"version":"4b7146e52c8d053b59b7e36919277a8555e7336125d3e0694d5c3adfcb8d9677","impliedFormat":99},{"version":"ba8404bc98c12f5f7a7edfa58fefafe96407e9b093175b5a3c75c34222b47e90","impliedFormat":99},{"version":"28179ea30b38d6ff478cfa140b14d57a83dc8a06f757bc23e73a30ed47d0ca0f","impliedFormat":99},{"version":"c8f1ce646847bf83be0d7e1d8cbbbb88c23e981509b4a266abb9d587b0a54d7e","impliedFormat":99},{"version":"21d0b7b23d86f12e8f8d209a82a3cf0f3f62df1d672c96f6efd43762c0e6d2e2","impliedFormat":99},{"version":"810c4e62a3f9a42ae3de9fbe57af2491bb0e0c4bec7e1410038a9e7111e47de3","impliedFormat":99},{"version":"be2eb42d9ddb54d0d682dd87b42dbe3cda0e3c7f146d03f0353b5ad366eead99","impliedFormat":99},{"version":"747d42460a4d2499f375e0dfa8003083b4b07cb5d1dd098a2c3e0f60e40fdc83","impliedFormat":99},{"version":"2392d906004cabc1033218185197a33dcf520f702e3dc89f5191ccc7fda63288","impliedFormat":99},{"version":"727dae6886965cfb6eb6a8446a52d6fa7b9ce7ef3e77f7dc0f1c9dd61d6e9db8","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"f21c1d0fb038d3dc2095c4bf3d28cb7b29d3b8e0cf5035ffa7f14de31603519d","impliedFormat":99},{"version":"ee7df4b493f02e971e1fffcc65389fae19540b302c7910d1c2534d83b8ddd492","impliedFormat":99},{"version":"d0c2705cb94e79403b989ed6d18559066c78028df55d7405ca5d1c1e47f458be","impliedFormat":99},{"version":"5ad19cf7f3b94b481a3d964cfe024bca5fbe1e3483ecb836770f005ce80906f6","impliedFormat":99},{"version":"e7e6c7a2173ee2db09e2e04eaa0f3a259b19d31ed10630a1eb3201a6f3d1d943","impliedFormat":99},{"version":"ebf027d9b2843413e165c6702631de9e3e631110d2fc3f1f2b720f0d89f28e8d","impliedFormat":99},{"version":"1f409d73efb6298d982522631a502dcb544527b9bbf784e64aaeb6731e0c38b4","impliedFormat":99},{"version":"b7d8407bc0e426611e6145c048da4127cb200af601afb5b37ea4d406c36ac7a0","impliedFormat":99},{"version":"6edcd53e85c098dd72671dd68681d136a2abaa7db6fd78dc0f5a7cec23ced1cb","impliedFormat":99},{"version":"20d691e94845972e20af7c36bdf9e0a19cfba0c08559eb061cb5cfc65f54aec0","impliedFormat":99},{"version":"c35f4c0fe4b2bcecd2b9949e6d19807646cca497a81de58835de0d9249706890","impliedFormat":99},{"version":"04e33114a8787b2e31820b623b3b7cbeddfb2932cb9dec929f6caf5748a336fc","impliedFormat":99},{"version":"553fae9b7f99936b03e3af051eafc5e333fed73b13b7eb22886e9ff228298f7d","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"8b483f1d5c3db362aec5c4fd3ad87e7c0a5156cd548ed78943dbf6199d83cc65","impliedFormat":99},{"version":"077ef86987d5799a71885e6ef8006bcfd010c3d218f0570dfb579fc7d5b297bb","impliedFormat":99},{"version":"7f01966517764fa45526548d19e70c497f9fb2c7047e12dfc4a5e72abbaacf61","impliedFormat":99},{"version":"ac3248aed990c8a3a48a52348848a8744e381daa11faccfe458dc934f53c332a","impliedFormat":99},{"version":"ce39c5b11413ac0ad29b5e24dc58ce2ac5f7669824f8cf0c27db4d46c7201f6c","impliedFormat":99},{"version":"ac1f4bd17b76e5a1d9846a9fb44c64055a88b74328cf114cdbe0135ed0698f8a","impliedFormat":99},{"version":"afc0d0b3e8660c6d20eeafd547c6c6dbea8a427b33c78589edf7769982e06d90","impliedFormat":99},{"version":"bd91c4480739f1f9108943e98d1621c0c981dae09317546ae8883ed7238386bc","impliedFormat":99},{"version":"0eb7f661a7ee64ba1555b1bb67cd19e91feb1bb63c3e260287eb9e41e159149b","impliedFormat":99},{"version":"b2ee4cbf69c22cdca64bf5be994b9f13f03c55ac769306c9e54df0762143d871","impliedFormat":99},{"version":"22b8ebcd4b20d180bec4e6330dd3c512d7f1c9e95fd878c2803cffb4dfb30602","impliedFormat":99},{"version":"deb1cdfa833ebc90eaea0b9b5810435a71eb12cfca8c093b9d336d735090d3f3","impliedFormat":99},{"version":"bccc77ada6e255a7fe88a81d5142599162f39c6d0e4eb2db5b69479689d315e9","impliedFormat":99},{"version":"bb763fce8236a9ed6b4fed01e7fccbdb63cddadd31569b96d676312982d072de","impliedFormat":99},{"version":"561fba8ad92671d1659887128fce766222ee9142450bd9b7ca78309bdb1aa2d2","impliedFormat":99},{"version":"1e85ca8e917181d22ce326a848cdbb25084bb3862e28282acef9b526311a60f6","impliedFormat":99},{"version":"6a061c442221bee297cb40c449096a3f3e9658745dd22adb5f6b5b05c4ca2351","impliedFormat":99},{"version":"aba7f8c7184234d25ce120a318aa691ac4285beb9fc8d3469e953282c1470366","impliedFormat":99},{"version":"e8eee85aa72a5c89fa648a4f3b2ede7cbe0891fdac1b8011c64620f58fd6f597","impliedFormat":99},{"version":"2af4a88477b1976d3adbb0e3d8167b8ba65bd44cd74bdb1fa9adb6e242c8f262","impliedFormat":99},{"version":"263ee2cf227e5e413db0ee262148e5b24bb536de189f12ee46de9524dfe6963e","impliedFormat":99},{"version":"b256fe8ccd0e7fe17007ed91436d84bd5ecf64c743f3f4a62b68fa27fc232be7","impliedFormat":99},{"version":"8a5c1e06742772f71deadc308e709b975d68cf2bbc1fe56632c26550f1b85165","impliedFormat":99},{"version":"7d1bc217b21ef4ccabb50d3d1c875d384ba3ab1d0b71c6e517aeace24dc104ae","impliedFormat":99},{"version":"6b6308a789a6a589bb8e5c8e0f94306760308101348bbf46f13dc11a1fe9dd36","impliedFormat":99},{"version":"b8c6a521d556cc88b2a64f73bdbf54997a0d6568d6019e5cf53922f713869da1","impliedFormat":99},{"version":"202b1636ede916b4a0ad281a5939d631cd9b3b43468edbf072a53336eb76680a","impliedFormat":99},{"version":"ffacab3ae62bf33b92464efcd56f06be51106f9d51141102e3b6056612d61d43","impliedFormat":99},{"version":"fe7f8552472c0e0ac4a17f5e8f9e94e019f4df67e6b72fa35f6600fbe4384dcc","impliedFormat":99},{"version":"7e0a07c9f6fa7696bf39ba6c79d4b403ac73498a5eeddc5900f48538d1a2e337","impliedFormat":99},{"version":"560c8f2ff220c1fc92086da7938552728a4ee4c4ee38686fb1d3eaf4b6054104","impliedFormat":99},{"version":"b032ad87d6183fe1d849875122bb38b0450dc4adfaaa839097004b33ff891316","impliedFormat":99},{"version":"f637dd887bd0b1c7ed77968d7d60669b7fa01332e28043a43f1e92aaaa5c8cfe","impliedFormat":99},{"version":"2f08e1bb5d79277daab5cf12140d867888c22644b222085b3d50c87bf0e2f3e3","impliedFormat":99},{"version":"e18f718f896c53544a78bc798f48716c407ac2ee0b57885e20deaecaad6961d0","impliedFormat":99},{"version":"ac5fcea94fb43d7ea712642e3e35969c6d2d58b2855adc092807ffc82690f630","impliedFormat":99},{"version":"743f6fb5f1a440cd135f37d86c592feb9a168dd3cd4390853f2c1e8b8a374ded","impliedFormat":99},{"version":"2d5c87a908b98ee3eb04eaf41b4da69e5e8b9b9be0e721d7211b76821e97c20b","impliedFormat":99},{"version":"824111d95e81928bc58d70f48ab079f89974d9fb21a830eed24666b76fdb00cb","signature":"c90c5b60fb6323470867433f363c7d8cdcddfdb2090503c414ac0db456618eae","impliedFormat":99},{"version":"508db3320ff3d35adca421703ce8be7709ae2c54d44d6b631cc34a58c8de1b58","signature":"cb04f3ecd5e93359b3dc6715efbda93b05c3d23d02a457d092fce36a7dd696da","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"46e07db372dd75edc1a26e68f16d1b7ffb34b7ab3db5cdb3e391a3604ad7bb7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"20b97c3368b1a63d2156deea35d03b125bb07908906eb35e0438042a3bbb3e71","impliedFormat":1},{"version":"02e73584132025781e9ffa7beef9d58ee563954c592eb563dc724ebbfb7424eb","impliedFormat":1},{"version":"ad05f01340829d96e2d85506eaab585ca7a5b20d687448d35f97e2b0855399d8","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"8257c55ff6bff6169142a35fce6811b511d857b4ae4f522cdb6ce20fd2116b2c","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"5990bd8b9bc91f6e90269685ff5a154eeda52c18238f89f0101fb4d08cd80476","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"4de73e132bf47437c56b1e8416c60d9d517c8ba3822e7c623b54d4300834dd37","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"cdb781940d24f57752615cc37d2b975b45906f386e2e5344700156fd2fb74efc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"f59493f68eade5200559e5016b5855f7d12e6381eb6cab9ad8a379af367b3b2d","impliedFormat":1},{"version":"125e3472965f529de239d2bc85b54579fed8e0b060d1d04de6576fb910a6ec7f","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6512c499b32226c5a686ab98f5b33ae15bdebd6b9f3b60f80eeadd95e358f02c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","impliedFormat":1}],"root":[283,284],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"module":100,"newLine":1,"noEmitHelpers":false,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"../../dist/emitter","rootDir":"../src","sourceMap":true,"strict":true,"stripInternal":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[283,1],[284,2],[233,3],[231,3],[232,3],[240,3],[241,3],[236,4],[237,3],[260,5],[229,3],[230,3],[235,6],[234,7],[238,3],[239,3],[242,8],[259,9],[228,3],[263,10],[275,11],[262,12],[261,13],[264,3],[273,14],[274,15],[329,16],[330,16],[331,17],[332,18],[333,19],[334,20],[285,21],[288,22],[286,21],[287,21],[335,23],[336,24],[337,25],[338,26],[339,27],[340,28],[341,28],[343,29],[342,30],[344,31],[345,32],[346,33],[328,34],[347,35],[348,36],[349,37],[350,38],[351,39],[352,40],[353,41],[354,42],[355,43],[356,44],[357,45],[358,46],[359,47],[360,47],[361,48],[362,21],[363,21],[364,49],[366,50],[365,51],[367,52],[368,53],[369,54],[370,55],[371,56],[372,57],[373,58],[290,59],[289,21],[382,60],[374,61],[375,62],[376,63],[377,64],[378,65],[379,66],[380,67],[381,68],[153,3],[150,69],[151,70],[152,71],[141,72],[105,73],[109,74],[110,74],[111,74],[112,75],[115,76],[118,77],[126,78],[119,74],[120,79],[121,21],[122,74],[123,79],[124,21],[104,79],[125,79],[139,80],[117,81],[128,82],[129,83],[130,79],[116,21],[142,69],[127,79],[131,79],[132,79],[133,21],[144,84],[134,85],[135,86],[136,74],[137,79],[143,79],[138,74],[149,87],[145,21],[147,88],[148,89],[146,90],[222,91],[226,92],[157,93],[154,74],[155,94],[156,95],[106,21],[108,96],[221,97],[158,21],[220,98],[219,99],[107,21],[223,21],[225,100],[224,101],[140,79],[227,21],[278,102],[282,103],[279,3],[276,21],[280,104],[277,105],[281,106],[246,3],[245,3],[250,107],[251,3],[252,108],[248,109],[258,110],[243,3],[244,3],[247,107],[253,107],[254,107],[255,111],[256,107],[257,107],[249,112],[265,3],[267,113],[272,114],[268,3],[266,3],[269,3],[270,115],[271,116],[103,117],[60,21],[62,118],[61,119],[66,120],[101,121],[98,122],[100,123],[63,122],[64,124],[68,124],[67,125],[65,126],[99,127],[97,122],[102,128],[95,21],[96,21],[69,129],[74,122],[76,122],[71,122],[72,129],[78,122],[79,130],[70,122],[75,122],[77,122],[73,122],[93,131],[92,122],[94,132],[88,122],[90,122],[89,122],[85,122],[91,133],[86,122],[87,134],[80,122],[81,122],[82,122],[83,122],[84,122],[59,21],[113,21],[114,135],[57,21],[58,21],[10,21],[12,21],[11,21],[2,21],[13,21],[14,21],[15,21],[16,21],[17,21],[18,21],[19,21],[20,21],[3,21],[21,21],[4,21],[22,21],[26,21],[23,21],[24,21],[25,21],[27,21],[28,21],[29,21],[5,21],[30,21],[31,21],[32,21],[33,21],[6,21],[37,21],[34,21],[35,21],[36,21],[38,21],[7,21],[39,21],[44,21],[45,21],[40,21],[41,21],[42,21],[43,21],[8,21],[49,21],[46,21],[47,21],[48,21],[50,21],[9,21],[51,21],[52,21],[53,21],[56,21],[54,21],[55,21],[1,21],[306,136],[316,137],[305,136],[326,138],[297,139],[296,140],[325,141],[319,142],[324,143],[299,144],[313,145],[298,146],[322,147],[294,148],[293,141],[323,149],[295,150],[300,151],[301,21],[304,151],[291,21],[327,152],[317,153],[308,154],[309,155],[311,156],[307,157],[310,158],[320,141],[302,159],[303,160],[312,161],[292,162],[315,153],[314,151],[318,21],[321,163],[173,164],[165,165],[170,166],[163,21],[166,167],[164,168],[162,21],[172,169],[168,170],[161,21],[169,171],[167,172],[171,173],[160,21],[198,174],[197,175],[174,176],[184,177],[179,177],[178,178],[196,179],[181,177],[193,177],[188,178],[180,177],[175,177],[192,177],[195,177],[191,177],[187,177],[189,180],[194,181],[183,178],[182,177],[185,177],[186,178],[176,177],[190,177],[177,178],[218,21],[159,21],[217,182],[202,183],[200,183],[211,183],[205,183],[209,183],[210,183],[216,183],[208,183],[206,183],[214,183],[213,184],[199,183],[203,183],[215,185],[204,183],[212,186],[207,183],[201,183]],"latestChangedDtsFile":"../../dist/emitter/index.d.ts","version":"5.6.3"} \ No newline at end of file +{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/fast-uri/types/index.d.ts","../../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../../node_modules/ajv/dist/compile/rules.d.ts","../../../node_modules/ajv/dist/compile/util.d.ts","../../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../../node_modules/ajv/dist/compile/errors.d.ts","../../../node_modules/ajv/dist/compile/validate/index.d.ts","../../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../../node_modules/ajv/dist/types/json-schema.d.ts","../../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../../node_modules/ajv/dist/compile/ref_error.d.ts","../../../node_modules/ajv/dist/core.d.ts","../../../node_modules/ajv/dist/compile/resolve.d.ts","../../../node_modules/ajv/dist/compile/index.d.ts","../../../node_modules/ajv/dist/types/index.d.ts","../../../node_modules/ajv/dist/ajv.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/type-name-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/checker.d.ts","../../../node_modules/@typespec/compiler/dist/src/manifest.d.ts","../../../node_modules/@typespec/compiler/dist/src/types/package-json.d.ts","../../../node_modules/@typespec/compiler/dist/src/module-resolver/module-resolver.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/decorator-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/deprecation.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/diagnostics.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/emitter-utils.d.ts","../../../node_modules/prettier/doc.d.ts","../../../node_modules/prettier/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/formatter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/numeric.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/intrinsic-type-state.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/discriminator-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/location-context.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/operation-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/path-interpolation.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/projected-names-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/string-template-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/syntax-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/usage-resolver.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/param-message.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/library.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/linter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/node-host.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/parser-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/parser.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/path-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/projected-program.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/scanner.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/semantic-walker.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/source-file.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/type-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/yaml/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/options.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/state-accessors.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/program.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/placeholder.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/reference-cycle.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/type-emitter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/config-loader.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/config-to-options.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/index.d.ts","../../../node_modules/@typespec/compiler/dist/generated-defs/typespec.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/encoded-names.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/examples.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/service.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/decorators.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/language-config.d.ts","../../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../../node_modules/vscode-jsonrpc/typings/thenable.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messages.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/linkedmap.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/disposable.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/events.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/encoding.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/ral.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagereader.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagewriter.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/connection.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/sharedarraycancellation.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagebuffer.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/api.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typedefinition.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.workspacefolder.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.colorprovider.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.callhierarchy.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.semantictokens.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.showdocument.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.linkededitingrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.fileoperations.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typehierarchy.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinevalue.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayhint.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinecompletion.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/api.d.ts","../../../node_modules/vscode-languageserver/lib/common/progress.d.ts","../../../node_modules/vscode-languageserver/lib/common/configuration.d.ts","../../../node_modules/vscode-languageserver/lib/common/workspacefolder.d.ts","../../../node_modules/vscode-languageserver/lib/common/callhierarchy.d.ts","../../../node_modules/vscode-languageserver/lib/common/semantictokens.d.ts","../../../node_modules/vscode-languageserver/lib/common/showdocument.d.ts","../../../node_modules/vscode-languageserver/lib/common/fileoperations.d.ts","../../../node_modules/vscode-languageserver/lib/common/linkededitingrange.d.ts","../../../node_modules/vscode-languageserver/lib/common/typehierarchy.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlinevalue.d.ts","../../../node_modules/vscode-languageserver/lib/common/foldingrange.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlayhint.d.ts","../../../node_modules/vscode-languageserver/lib/common/diagnostic.d.ts","../../../node_modules/vscode-languageserver/lib/common/textdocuments.d.ts","../../../node_modules/vscode-languageserver/lib/common/notebook.d.ts","../../../node_modules/vscode-languageserver/lib/common/moniker.d.ts","../../../node_modules/vscode-languageserver/lib/common/server.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlinecompletion.proposed.d.ts","../../../node_modules/vscode-languageserver/lib/common/api.d.ts","../../../node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/serverlib.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/formatter/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/duplicate-tracker.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/misc.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/index.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/constants.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/generated-defs/azure.clientgenerator.core.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lib.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/linter.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.private.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-info.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-helpers.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/decorators.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/helpers/union-enums.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/prevent-rest-library.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/use-standard-operations.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.private.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/traits.d.ts","../../../node_modules/@typespec/http/dist/src/lib.d.ts","../../../node_modules/@typespec/http/dist/src/linter.d.ts","../../../node_modules/@typespec/http/dist/generated-defs/typespec.http.private.d.ts","../../../node_modules/@typespec/http/dist/generated-defs/typespec.http.d.ts","../../../node_modules/@typespec/http/dist/src/metadata.d.ts","../../../node_modules/@typespec/http/dist/src/http-property.d.ts","../../../node_modules/@typespec/http/dist/src/types.d.ts","../../../node_modules/@typespec/http/dist/src/auth.d.ts","../../../node_modules/@typespec/http/dist/src/content-types.d.ts","../../../node_modules/@typespec/http/dist/src/decorators.d.ts","../../../node_modules/@typespec/http/dist/src/operations.d.ts","../../../node_modules/@typespec/http/dist/src/parameters.d.ts","../../../node_modules/@typespec/http/dist/src/private.decorators.d.ts","../../../node_modules/@typespec/http/dist/src/responses.d.ts","../../../node_modules/@typespec/http/dist/src/route.d.ts","../../../node_modules/@typespec/http/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/utils.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/internal-utils.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/interfaces.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/decorators.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/lib.d.ts","../../../node_modules/@typespec/versioning/dist/generated-defs/typespec.versioning.d.ts","../../../node_modules/@typespec/versioning/dist/src/types.d.ts","../../../node_modules/@typespec/versioning/dist/src/decorators.d.ts","../../../node_modules/@typespec/versioning/dist/src/projection.d.ts","../../../node_modules/@typespec/versioning/dist/src/validate.d.ts","../../../node_modules/@typespec/versioning/dist/src/versioning-timeline.d.ts","../../../node_modules/@typespec/versioning/dist/src/versioning.d.ts","../../../node_modules/@typespec/versioning/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/public-utils.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/types.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/index.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/log-level.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/options.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/emitter.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/lib.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/logger.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/sdk-context-options.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/index.d.ts","../src/emitter.ts","../src/index.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts5.6/index.d.ts"],"fileIdsList":[[226,282,290,332],[283,290,332],[226,290,332],[226,231,232,233,234,235,290,332],[229,230,235,236,237,238,239,242,259,290,332],[226,234,290,332],[226,235,236,290,332],[226,240,241,290,332],[226,258,290,332],[226,228,261,262,290,332],[262,263,264,273,274,290,332],[226,258,260,261,290,332],[226,258,262,290,332],[226,258,261,262,272,290,332],[226,260,262,290,332],[290,329,332],[290,331,332],[290,332,337,367],[290,332,333,338,344,345,352,364,375],[290,332,333,334,344,352],[290,332],[285,286,287,290,332],[290,332,335,376],[290,332,336,337,345,353],[290,332,337,364,372],[290,332,338,340,344,352],[290,331,332,339],[290,332,340,341],[290,332,344],[290,332,342,344],[290,331,332,344],[290,332,344,345,346,364,375],[290,332,344,345,346,359,364,367],[290,327,332,380],[290,327,332,340,344,347,352,364,375],[290,332,344,345,347,348,352,364,372,375],[290,332,347,349,364,372,375],[290,332,344,350],[290,332,351,375,380],[290,332,340,344,352,364],[290,332,353],[290,332,354],[290,331,332,355],[290,329,330,331,332,333,334,335,336,337,338,339,340,341,342,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,357],[290,332,358],[290,332,344,359,360],[290,332,359,361,376,378],[290,332,344,364,365,366,367],[290,332,364,366],[290,332,364,365],[290,332,367],[290,332,368],[290,329,332,364],[290,332,344,370,371],[290,332,370,371],[290,332,337,352,364,372],[290,332,373],[332],[288,289,290,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,352,374],[290,332,347,358,375],[290,332,337,376],[290,332,364,377],[290,332,351,378],[290,332,379],[290,332,337,344,346,355,364,375,378,380],[290,332,364,381],[141,149,290,332],[141,142,149,290,332],[141,150,151,290,332],[139,140,290,332],[104,144,149,290,332],[144,149,290,332],[144,290,332],[114,290,332],[117,144,149,290,332],[104,118,119,120,121,122,123,124,125,290,332],[149,290,332],[105,106,108,109,110,111,112,115,116,117,126,128,129,130,131,132,133,134,135,136,137,138,142,144,149,290,332],[116,139,144,290,332],[127,149,290,332],[111,144,149,290,332],[105,142,143,149,290,332],[139,290,332],[111,149,290,332],[103,108,116,144,146,148,290,332],[139,146,290,332],[144,145,146,147,149,290,332],[139,145,148,290,332],[114,149,290,332],[107,139,152,157,221,222,225,290,332],[117,144,149,153,154,155,156,290,332],[144,149,157,290,332],[144,149,153,290,332],[107,290,332],[158,219,220,290,332],[219,290,332],[139,217,218,290,332],[223,224,290,332],[106,111,149,290,332],[226,277,290,332],[227,276,277,278,279,280,281,290,332],[226,276,290,332],[226,275,276,290,332],[275,290,332],[226,249,290,332],[226,246,249,290,332],[226,247,249,290,332],[243,244,245,247,248,249,250,251,252,253,254,255,256,257,290,332],[226,245,290,332],[226,246,248,290,332],[226,265,266,290,332],[266,267,268,269,271,290,332],[226,266,290,332],[226,266,267,270,290,332],[62,63,67,94,95,97,98,99,101,102,290,332],[60,61,290,332],[60,290,332],[62,102,290,332],[62,63,99,100,102,290,332],[102,290,332],[59,102,103,290,332],[62,63,101,102,290,332],[62,63,65,66,101,102,290,332],[62,63,64,101,102,290,332],[62,63,67,94,95,96,97,98,101,102,290,332],[59,62,63,67,99,101,290,332],[67,102,290,332],[69,70,71,72,73,74,75,76,77,78,102,290,332],[92,102,290,332],[68,79,87,88,89,90,91,93,290,332],[72,102,290,332],[80,81,82,83,84,85,86,102,290,332],[113,290,332],[290,299,303,332,375],[290,299,332,364,375],[290,294,332],[290,296,299,332,372,375],[290,332,352,372],[290,332,382],[290,294,332,382],[290,296,299,332,352,375],[290,291,292,295,298,332,344,364,375],[290,299,306,332],[290,291,297,332],[290,299,320,321,332],[290,295,299,332,367,375,382],[290,320,332,382],[290,293,294,332,382],[290,299,332],[290,293,294,295,296,297,298,299,300,301,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,321,322,323,324,325,326,332],[290,299,314,332],[290,299,306,307,332],[290,297,299,307,308,332],[290,298,332],[290,291,294,299,332],[290,299,303,307,308,332],[290,303,332],[290,297,299,302,332,375],[290,291,296,299,306,332],[290,332,364],[290,294,299,320,332,380,382],[160,161,162,163,164,165,166,167,168,169,170,171,172,290,332],[163,164,290,332],[161,163,164,165,168,169,290,332],[161,167,290,332],[163,290,332],[167,290,332],[161,164,166,167,173,290,332],[161,164,166,167,290,332],[163,166,290,332],[161,165,170,290,332],[159,173,174,196,197,290,332],[173,174,290,332],[173,290,332],[159,173,174,196,290,332],[159,173,174,290,332],[159,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,290,332],[174,196,290,332],[159,174,196,290,332],[198,199,203,212,213,215,216,290,332],[198,215,290,332],[198,212,215,290,332],[198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,290,332],[198,290,332]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee660a1f2acd3d7fc7b28df06c4e2125229666c4d72e5455ae3841bfd222f684","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"20175b94bd9aa2285b3140d8eff67d15b7e67bda225d9e4eef8d98d1ad9fdff0","impliedFormat":99},{"version":"569423c43cfcc3aec4d4f32f188ba01103f0b0da840e3327bd6f301981b592f4","impliedFormat":99},{"version":"2546eb0653f8b3ff203afb5aab17de16b98501295e328e4b02fbe99d003da10f","impliedFormat":99},{"version":"2e8cf7c24be364148c3c0702b0dfb6d706a9c5e5c7813af58ead241eb784f6ec","impliedFormat":99},{"version":"14ae999652dfd8e8ba8d4bfee86be2e468379a4247e5d58abc27be78fd09745e","impliedFormat":99},{"version":"e29f58e8e09108d4d4bb45d4b57a28d9b195e381b0857e9ca235e51ea0d97f9c","impliedFormat":99},{"version":"393fbf2918871b7bf342caee721d168a8a122bddf9d1c1540561f7a1b57f2e52","impliedFormat":99},{"version":"b76a160a84bc82f95c86b3dc4b7a495d53dcbe704f83a1829f7894b457712fc4","impliedFormat":99},{"version":"132e64ba175c5d069dc3229780a99d244d17fa0ad8c123fd68b449357935c4d4","impliedFormat":99},{"version":"2f848b4e660b568651a6350565afc8ac5b0644853a2a863862807602cf244a05","impliedFormat":1},{"version":"6ac85cb2c23dcb52445b268258a7ea36d620054e7db53874d890bb64981ddc13","impliedFormat":1},{"version":"b8f924913b407f41ffa7c4fd46066fe199323d2203d106e164c63760b88ea6be","impliedFormat":99},{"version":"5a23cb53a5e8de12e99766a33421d4e069f58578f2429313a0499c00f7dfe23c","impliedFormat":99},{"version":"018970bd1cd62cb80ad410f2dab15d15775a6f63a9504b5e8d64cb13d766ea08","impliedFormat":99},{"version":"8cbca7868a6662571aa5a8745eeccbdfa59d1f4b03857f1b3d25802fd4f9a32b","impliedFormat":99},{"version":"3d99644caf064bd8ced7365698bb55c7db1b68d82e48dbde9ffd21e503b5d0b2","impliedFormat":99},{"version":"5077b3ba3766f16b30e325ad7d720330c08ef84fc2f6a449826adb006bc581ed","impliedFormat":99},{"version":"4ac79fd5d2a7f056ba1eda188700198f20d32bcab0db09f311d5d5f5d746c2ca","impliedFormat":99},{"version":"a0a61d07fbaecc0b60b5cbde76e0e87c79ac2e1819fe20612bb8f30a56383dbe","impliedFormat":99},{"version":"569edbdf1a3fc773a8289c37ff0d63c9af483a84e704063a3439255b7f377d4f","impliedFormat":99},{"version":"9fe08a940616c1119c99ab5e79308eba7e88de97dfea87e44b95ba82d738eef4","impliedFormat":99},{"version":"ad10612fdbbc90fd9238b854ee39ad38a118cee8ac8979b1194895167168ceb3","impliedFormat":99},{"version":"03c705d7cc25c32907aac3a2bb178997e529eb56bb1ba063b887d18597a2bdda","impliedFormat":99},{"version":"c4b70b3f64ad8f28ce4a5624849cf1bb4f351f5ab8ee2db5c8edc53e85211584","impliedFormat":99},{"version":"cf46f4676dbe929b5320ba322897852e1b8015a43476ce4629fab69f82c12bd1","impliedFormat":99},{"version":"9dadd99afed4a96cf39d9c6ddc6459639cdbd9baeda97721f7fbd77af7517874","impliedFormat":99},{"version":"2b0959130e13998633418b3c425b50276eff966a2ed211c2ffe1c9d8a679ce44","impliedFormat":99},{"version":"55d56ae75b4d57956cc4ddeeefd30780d364b0aa3992e1d7df3d5f8d5fe9acff","impliedFormat":99},{"version":"20002fec9cc7289f9e69c1a95372c97a40db9eea44cd19b1fd0ccc3a8a122345","impliedFormat":99},{"version":"123d94390345afefbdd612f216d40db16c3710338edcb73b5f4be0a4ad539aa4","impliedFormat":99},{"version":"1264211b19f3c465b98afccd58fabac6e5e146ee6d849fcf63ddb33fd78720f1","impliedFormat":99},{"version":"f8a298d831ed8ca73a8dc9d5780817a7720ba9894042a69356a75c5e5f8c6893","impliedFormat":99},{"version":"2c6d27c8baadb60b734b8db829df8d12f58345402180ff88642ff5c1388cdf13","impliedFormat":99},{"version":"44d4f46fdd99e11b1f9f1e634b8f2881012c3501c04b07227d83502fb09ea548","impliedFormat":99},{"version":"3f4eef14851f0eadca50c74dd917aaf86124463cfc1cf5bc92e9831714c9910b","impliedFormat":99},{"version":"bdea99de0c771ba2b6aa7d0d83ecf7d3fb26b25314d32d63af6909d107df7c00","impliedFormat":99},{"version":"a6b6ed49a87b2a5690f61463b05d364af1bb39cc8472047691b921923e6ac9c9","impliedFormat":99},{"version":"d7f8c331cc75c67d3da42891e8532a9c869f961ed5d8dfbbe7d0ba35056cfcfb","impliedFormat":99},{"version":"8151e6cb5e10df668b741859300b99e32e18abcffaf2be101c4c2a6536f3442b","impliedFormat":99},{"version":"e96945cee95fede7ee90c31b805bc159562de0d88eb609d64b8d58855bf217b1","impliedFormat":99},{"version":"2d758a247ac13ae52ddecc90888a9a5fbd5b2640443078fb29cc8c312870cb74","impliedFormat":99},{"version":"da7ef8056b01283adea3ca6de1dabfd428b439d6050a75602f1e30f48eb6efdf","impliedFormat":99},{"version":"1594151e41321f9180c1451a1650631e06b1db7ffe5639c7edb6275c512b2f51","impliedFormat":99},{"version":"da9c0be46b2da7d84a03db79ae33edcd7388bd35c388b99ec37368aa1729e778","impliedFormat":99},{"version":"fce174b4613b3b31fe82b778e0e2c3a7fa0b41f8ced9b231b1a8c5a05c8b54f9","impliedFormat":99},{"version":"53e19706bab98ca4bfa4b42c783115fa2741c0483cc345e4f7e710d558200a1c","impliedFormat":99},{"version":"2d3045c2fdabdcb0ec2ec439868e2631d68bdea368750fa58170d016c0d06572","impliedFormat":99},{"version":"0ad7175d8390859cc77b9b1560fdd10a18990c189675abca18f65992b8507742","impliedFormat":99},{"version":"ad3d8bb2ac79fbda7222abb647e260914f6e6f2ed988f7db8acc62a44d78f448","impliedFormat":99},{"version":"1f37f596f1f6c032d3786baf43edb6c9aed3935eaf457fdb58d581794a8e7c52","impliedFormat":99},{"version":"41b5774912c8d91f1b3b84ddd2aad499e926477100855180512e9954dc02103d","impliedFormat":99},{"version":"fa58422ab7be615763761b87694a2994522ec1332276ef49df5e0a3287eb2c59","impliedFormat":99},{"version":"91128a15b91060cfde42e9d30dfee6c2f7b6887a4162b0e03ebd2471c7bdaeab","impliedFormat":99},{"version":"eee4060428d6fe35733db1ec1a630901d0cb99dbd27bb17eaf836c2cab52c361","impliedFormat":99},{"version":"dbb312aedcf0ce06467366f096ec6591b4c0f0d956137dd49c35a9b20bb90be7","impliedFormat":99},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6","impliedFormat":1},{"version":"cab0ba78dc961d90d639ccaf3d56c484e584056da39dc0d9bdaf1957be965f72","impliedFormat":1},{"version":"f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1","impliedFormat":1},{"version":"886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1","impliedFormat":1},{"version":"392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2","impliedFormat":1},{"version":"e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4","impliedFormat":1},{"version":"2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a","impliedFormat":1},{"version":"3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43","impliedFormat":1},{"version":"b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5","impliedFormat":1},{"version":"2ff2789ae43f9c056917e7516a02ad07c4cc1cafff3c68ff6b7ff8df623fd259","impliedFormat":1},{"version":"13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469","impliedFormat":1},{"version":"4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177","impliedFormat":1},{"version":"d576ef1b6aa804d0f0e8dfb3f6149b576788b598054aa2e15d5a7f7f52faf371","impliedFormat":1},{"version":"5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e","impliedFormat":1},{"version":"bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999","impliedFormat":1},{"version":"eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc","impliedFormat":1},{"version":"05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d","impliedFormat":1},{"version":"00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa","impliedFormat":1},{"version":"33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a","impliedFormat":1},{"version":"45f441bf74e920f6909ca6874037fdd10f06644c341b99fd7cfd041ea565ce1f","impliedFormat":1},{"version":"f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67","impliedFormat":1},{"version":"b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f","impliedFormat":1},{"version":"96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04","impliedFormat":1},{"version":"29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348","impliedFormat":1},{"version":"9381d5bdf7197cc4f732243e22762d27508daf7fcab0fff7339fe4660c11f382","impliedFormat":1},{"version":"0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6","impliedFormat":1},{"version":"818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f","impliedFormat":1},{"version":"77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079","impliedFormat":1},{"version":"80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917","impliedFormat":1},{"version":"daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe","impliedFormat":1},{"version":"6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4","impliedFormat":1},{"version":"656106ddbe4e00bd32af2c46abb1a8c9abbb8679fbf29adc637c053620286034","impliedFormat":1},{"version":"ddf3f680de453b300dd1c47e136b8ade3857d2c357635efeb0f9977d81d1e96d","impliedFormat":1},{"version":"dfc345d92b6d08863b239b8d025ea513df322af74e221d62f4bdbe217d08f69d","impliedFormat":1},{"version":"7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5","impliedFormat":1},{"version":"2f3aa6fb84e6955886902a6a8818e4bff9c79b97356773bd6ac2ff3993c097a2","impliedFormat":1},{"version":"c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e","impliedFormat":1},{"version":"08724e39439dbc02bdba9768f84736ed132bb02a04fbce0a2cdfc91f42e90505","impliedFormat":1},{"version":"f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3","impliedFormat":1},{"version":"7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc","impliedFormat":1},{"version":"1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e","impliedFormat":1},{"version":"46a9b0122b230cb2fab65999ba92f98a16fd8f1c25efaed47141cbf5056f6928","impliedFormat":1},{"version":"5a9a4741aa510bdee406441f77186c6d2005be78e78c2e0da8201d9991950164","impliedFormat":1},{"version":"351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02","impliedFormat":1},{"version":"3990ae796cc23fb9829eae206eff1eddded9465504467a4433f2509e18ef1aed","impliedFormat":1},{"version":"b557ea3605e52406e35eeea468cb96f25b1ca906f2055f376597f0b02492d94c","impliedFormat":1},{"version":"f384bb303dbc114af6460e7cb30b766cc92eed33fccb331126b08bb63f15a034","impliedFormat":1},{"version":"8a9bd1cf8c1f75435f83595b43737c135e7f73bde39ba4c9339dc6a31e8bb069","impliedFormat":1},{"version":"aa7747ab234b18813944ecdd61683a696025cd4f6970d7749d370080d4f9b349","impliedFormat":1},{"version":"8274bfd5de49f9f072be2f39c34e390101a8b69844e55eda36c7df23ba6d03e2","impliedFormat":1},{"version":"f8b482dddda55dd6677d7895a3fef8cd9d067f8c36c63cc7fe93b82a6dd4f10c","impliedFormat":1},{"version":"71d11ad1f05b0b90e95591fa85c1c8043e590d67972dcaba9b50435a0c04d8fa","impliedFormat":1},{"version":"5c74e3eee30bb7899eebe784e3c05cb29f1bed3efb2a3b4599b66173fda4aa30","impliedFormat":1},{"version":"a980ce9470dc95ac355d7efb729f9cfb0564505eba96da4bbde504299efb833a","impliedFormat":1},{"version":"72a33e518e5b98cd9c9dc8ee294f7507bf2a8938f491b0cf49c8ae582b966b3a","impliedFormat":1},{"version":"173838811f6dcba587706efd87358f804261549bc02c455d31818328c1af97ad","impliedFormat":1},{"version":"483ff04f1796aef40323f47ca3f03bf53492a2878508c8d7be98cdb4fae151f3","impliedFormat":1},{"version":"96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8","impliedFormat":99},{"version":"8b539ac8d500541d0e3187289173cbcfbbc86db438bc85de5ad5c14c66b8b8ab","impliedFormat":99},{"version":"4b7146e52c8d053b59b7e36919277a8555e7336125d3e0694d5c3adfcb8d9677","impliedFormat":99},{"version":"ba8404bc98c12f5f7a7edfa58fefafe96407e9b093175b5a3c75c34222b47e90","impliedFormat":99},{"version":"28179ea30b38d6ff478cfa140b14d57a83dc8a06f757bc23e73a30ed47d0ca0f","impliedFormat":99},{"version":"c8f1ce646847bf83be0d7e1d8cbbbb88c23e981509b4a266abb9d587b0a54d7e","impliedFormat":99},{"version":"21d0b7b23d86f12e8f8d209a82a3cf0f3f62df1d672c96f6efd43762c0e6d2e2","impliedFormat":99},{"version":"810c4e62a3f9a42ae3de9fbe57af2491bb0e0c4bec7e1410038a9e7111e47de3","impliedFormat":99},{"version":"be2eb42d9ddb54d0d682dd87b42dbe3cda0e3c7f146d03f0353b5ad366eead99","impliedFormat":99},{"version":"747d42460a4d2499f375e0dfa8003083b4b07cb5d1dd098a2c3e0f60e40fdc83","impliedFormat":99},{"version":"2392d906004cabc1033218185197a33dcf520f702e3dc89f5191ccc7fda63288","impliedFormat":99},{"version":"727dae6886965cfb6eb6a8446a52d6fa7b9ce7ef3e77f7dc0f1c9dd61d6e9db8","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"f21c1d0fb038d3dc2095c4bf3d28cb7b29d3b8e0cf5035ffa7f14de31603519d","impliedFormat":99},{"version":"ee7df4b493f02e971e1fffcc65389fae19540b302c7910d1c2534d83b8ddd492","impliedFormat":99},{"version":"d0c2705cb94e79403b989ed6d18559066c78028df55d7405ca5d1c1e47f458be","impliedFormat":99},{"version":"5ad19cf7f3b94b481a3d964cfe024bca5fbe1e3483ecb836770f005ce80906f6","impliedFormat":99},{"version":"e7e6c7a2173ee2db09e2e04eaa0f3a259b19d31ed10630a1eb3201a6f3d1d943","impliedFormat":99},{"version":"ebf027d9b2843413e165c6702631de9e3e631110d2fc3f1f2b720f0d89f28e8d","impliedFormat":99},{"version":"1f409d73efb6298d982522631a502dcb544527b9bbf784e64aaeb6731e0c38b4","impliedFormat":99},{"version":"b7d8407bc0e426611e6145c048da4127cb200af601afb5b37ea4d406c36ac7a0","impliedFormat":99},{"version":"6edcd53e85c098dd72671dd68681d136a2abaa7db6fd78dc0f5a7cec23ced1cb","impliedFormat":99},{"version":"20d691e94845972e20af7c36bdf9e0a19cfba0c08559eb061cb5cfc65f54aec0","impliedFormat":99},{"version":"c35f4c0fe4b2bcecd2b9949e6d19807646cca497a81de58835de0d9249706890","impliedFormat":99},{"version":"04e33114a8787b2e31820b623b3b7cbeddfb2932cb9dec929f6caf5748a336fc","impliedFormat":99},{"version":"553fae9b7f99936b03e3af051eafc5e333fed73b13b7eb22886e9ff228298f7d","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"8b483f1d5c3db362aec5c4fd3ad87e7c0a5156cd548ed78943dbf6199d83cc65","impliedFormat":99},{"version":"077ef86987d5799a71885e6ef8006bcfd010c3d218f0570dfb579fc7d5b297bb","impliedFormat":99},{"version":"7f01966517764fa45526548d19e70c497f9fb2c7047e12dfc4a5e72abbaacf61","impliedFormat":99},{"version":"ac3248aed990c8a3a48a52348848a8744e381daa11faccfe458dc934f53c332a","impliedFormat":99},{"version":"ce39c5b11413ac0ad29b5e24dc58ce2ac5f7669824f8cf0c27db4d46c7201f6c","impliedFormat":99},{"version":"ac1f4bd17b76e5a1d9846a9fb44c64055a88b74328cf114cdbe0135ed0698f8a","impliedFormat":99},{"version":"afc0d0b3e8660c6d20eeafd547c6c6dbea8a427b33c78589edf7769982e06d90","impliedFormat":99},{"version":"bd91c4480739f1f9108943e98d1621c0c981dae09317546ae8883ed7238386bc","impliedFormat":99},{"version":"0eb7f661a7ee64ba1555b1bb67cd19e91feb1bb63c3e260287eb9e41e159149b","impliedFormat":99},{"version":"b2ee4cbf69c22cdca64bf5be994b9f13f03c55ac769306c9e54df0762143d871","impliedFormat":99},{"version":"22b8ebcd4b20d180bec4e6330dd3c512d7f1c9e95fd878c2803cffb4dfb30602","impliedFormat":99},{"version":"deb1cdfa833ebc90eaea0b9b5810435a71eb12cfca8c093b9d336d735090d3f3","impliedFormat":99},{"version":"bccc77ada6e255a7fe88a81d5142599162f39c6d0e4eb2db5b69479689d315e9","impliedFormat":99},{"version":"bb763fce8236a9ed6b4fed01e7fccbdb63cddadd31569b96d676312982d072de","impliedFormat":99},{"version":"561fba8ad92671d1659887128fce766222ee9142450bd9b7ca78309bdb1aa2d2","impliedFormat":99},{"version":"1e85ca8e917181d22ce326a848cdbb25084bb3862e28282acef9b526311a60f6","impliedFormat":99},{"version":"6a061c442221bee297cb40c449096a3f3e9658745dd22adb5f6b5b05c4ca2351","impliedFormat":99},{"version":"aba7f8c7184234d25ce120a318aa691ac4285beb9fc8d3469e953282c1470366","impliedFormat":99},{"version":"e8eee85aa72a5c89fa648a4f3b2ede7cbe0891fdac1b8011c64620f58fd6f597","impliedFormat":99},{"version":"2af4a88477b1976d3adbb0e3d8167b8ba65bd44cd74bdb1fa9adb6e242c8f262","impliedFormat":99},{"version":"263ee2cf227e5e413db0ee262148e5b24bb536de189f12ee46de9524dfe6963e","impliedFormat":99},{"version":"b256fe8ccd0e7fe17007ed91436d84bd5ecf64c743f3f4a62b68fa27fc232be7","impliedFormat":99},{"version":"8a5c1e06742772f71deadc308e709b975d68cf2bbc1fe56632c26550f1b85165","impliedFormat":99},{"version":"7d1bc217b21ef4ccabb50d3d1c875d384ba3ab1d0b71c6e517aeace24dc104ae","impliedFormat":99},{"version":"6b6308a789a6a589bb8e5c8e0f94306760308101348bbf46f13dc11a1fe9dd36","impliedFormat":99},{"version":"b8c6a521d556cc88b2a64f73bdbf54997a0d6568d6019e5cf53922f713869da1","impliedFormat":99},{"version":"202b1636ede916b4a0ad281a5939d631cd9b3b43468edbf072a53336eb76680a","impliedFormat":99},{"version":"ffacab3ae62bf33b92464efcd56f06be51106f9d51141102e3b6056612d61d43","impliedFormat":99},{"version":"fe7f8552472c0e0ac4a17f5e8f9e94e019f4df67e6b72fa35f6600fbe4384dcc","impliedFormat":99},{"version":"7e0a07c9f6fa7696bf39ba6c79d4b403ac73498a5eeddc5900f48538d1a2e337","impliedFormat":99},{"version":"560c8f2ff220c1fc92086da7938552728a4ee4c4ee38686fb1d3eaf4b6054104","impliedFormat":99},{"version":"b032ad87d6183fe1d849875122bb38b0450dc4adfaaa839097004b33ff891316","impliedFormat":99},{"version":"f637dd887bd0b1c7ed77968d7d60669b7fa01332e28043a43f1e92aaaa5c8cfe","impliedFormat":99},{"version":"2f08e1bb5d79277daab5cf12140d867888c22644b222085b3d50c87bf0e2f3e3","impliedFormat":99},{"version":"e18f718f896c53544a78bc798f48716c407ac2ee0b57885e20deaecaad6961d0","impliedFormat":99},{"version":"ac5fcea94fb43d7ea712642e3e35969c6d2d58b2855adc092807ffc82690f630","impliedFormat":99},{"version":"743f6fb5f1a440cd135f37d86c592feb9a168dd3cd4390853f2c1e8b8a374ded","impliedFormat":99},{"version":"2d5c87a908b98ee3eb04eaf41b4da69e5e8b9b9be0e721d7211b76821e97c20b","impliedFormat":99},{"version":"824111d95e81928bc58d70f48ab079f89974d9fb21a830eed24666b76fdb00cb","signature":"c90c5b60fb6323470867433f363c7d8cdcddfdb2090503c414ac0db456618eae","impliedFormat":99},{"version":"508db3320ff3d35adca421703ce8be7709ae2c54d44d6b631cc34a58c8de1b58","signature":"cb04f3ecd5e93359b3dc6715efbda93b05c3d23d02a457d092fce36a7dd696da","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"20b97c3368b1a63d2156deea35d03b125bb07908906eb35e0438042a3bbb3e71","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"8257c55ff6bff6169142a35fce6811b511d857b4ae4f522cdb6ce20fd2116b2c","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"5990bd8b9bc91f6e90269685ff5a154eeda52c18238f89f0101fb4d08cd80476","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"4de73e132bf47437c56b1e8416c60d9d517c8ba3822e7c623b54d4300834dd37","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"cdb781940d24f57752615cc37d2b975b45906f386e2e5344700156fd2fb74efc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"f59493f68eade5200559e5016b5855f7d12e6381eb6cab9ad8a379af367b3b2d","impliedFormat":1},{"version":"125e3472965f529de239d2bc85b54579fed8e0b060d1d04de6576fb910a6ec7f","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6306bf4c2b609f4c5b8bd7d26a85d40ccac8fb4276a84597fa8240f83c82f2b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","impliedFormat":1}],"root":[283,284],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"module":100,"newLine":1,"noEmitHelpers":false,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"../../dist/emitter","rootDir":"../src","sourceMap":true,"strict":true,"stripInternal":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[283,1],[284,2],[233,3],[231,3],[232,3],[240,3],[241,3],[236,4],[237,3],[260,5],[229,3],[230,3],[235,6],[234,7],[238,3],[239,3],[242,8],[259,9],[228,3],[263,10],[275,11],[262,12],[261,13],[264,3],[273,14],[274,15],[329,16],[330,16],[331,17],[332,18],[333,19],[334,20],[285,21],[288,22],[286,21],[287,21],[335,23],[336,24],[337,25],[338,26],[339,27],[340,28],[341,28],[343,29],[342,30],[344,31],[345,32],[346,33],[328,34],[347,35],[348,36],[349,37],[350,38],[351,39],[352,40],[353,41],[354,42],[355,43],[356,44],[357,45],[358,46],[359,47],[360,47],[361,48],[362,21],[363,21],[364,49],[366,50],[365,51],[367,52],[368,53],[369,54],[370,55],[371,56],[372,57],[373,58],[290,59],[289,21],[382,60],[374,61],[375,62],[376,63],[377,64],[378,65],[379,66],[380,67],[381,68],[153,3],[150,69],[151,70],[152,71],[141,72],[105,73],[109,74],[110,74],[111,74],[112,75],[115,76],[118,77],[126,78],[119,74],[120,79],[121,21],[122,74],[123,79],[124,21],[104,79],[125,79],[139,80],[117,81],[128,82],[129,83],[130,79],[116,21],[142,69],[127,79],[131,79],[132,79],[133,21],[144,84],[134,85],[135,86],[136,74],[137,79],[143,79],[138,74],[149,87],[145,21],[147,88],[148,89],[146,90],[222,91],[226,92],[157,93],[154,74],[155,94],[156,95],[106,21],[108,96],[221,97],[158,21],[220,98],[219,99],[107,21],[223,21],[225,100],[224,101],[140,79],[227,21],[278,102],[282,103],[279,3],[276,21],[280,104],[277,105],[281,106],[246,3],[245,3],[250,107],[251,3],[252,108],[248,109],[258,110],[243,3],[244,3],[247,107],[253,107],[254,107],[255,111],[256,107],[257,107],[249,112],[265,3],[267,113],[272,114],[268,3],[266,3],[269,3],[270,115],[271,116],[103,117],[60,21],[62,118],[61,119],[66,120],[101,121],[98,122],[100,123],[63,122],[64,124],[68,124],[67,125],[65,126],[99,127],[97,122],[102,128],[95,21],[96,21],[69,129],[74,122],[76,122],[71,122],[72,129],[78,122],[79,130],[70,122],[75,122],[77,122],[73,122],[93,131],[92,122],[94,132],[88,122],[90,122],[89,122],[85,122],[91,133],[86,122],[87,134],[80,122],[81,122],[82,122],[83,122],[84,122],[59,21],[113,21],[114,135],[57,21],[58,21],[10,21],[12,21],[11,21],[2,21],[13,21],[14,21],[15,21],[16,21],[17,21],[18,21],[19,21],[20,21],[3,21],[21,21],[4,21],[22,21],[26,21],[23,21],[24,21],[25,21],[27,21],[28,21],[29,21],[5,21],[30,21],[31,21],[32,21],[33,21],[6,21],[37,21],[34,21],[35,21],[36,21],[38,21],[7,21],[39,21],[44,21],[45,21],[40,21],[41,21],[42,21],[43,21],[8,21],[49,21],[46,21],[47,21],[48,21],[50,21],[9,21],[51,21],[52,21],[53,21],[56,21],[54,21],[55,21],[1,21],[306,136],[316,137],[305,136],[326,138],[297,139],[296,140],[325,141],[319,142],[324,143],[299,144],[313,145],[298,146],[322,147],[294,148],[293,141],[323,149],[295,150],[300,151],[301,21],[304,151],[291,21],[327,152],[317,153],[308,154],[309,155],[311,156],[307,157],[310,158],[320,141],[302,159],[303,160],[312,161],[292,162],[315,153],[314,151],[318,21],[321,163],[173,164],[165,165],[170,166],[163,21],[166,167],[164,168],[162,21],[172,169],[168,170],[161,21],[169,171],[167,172],[171,173],[160,21],[198,174],[197,175],[174,176],[184,177],[179,177],[178,178],[196,179],[181,177],[193,177],[188,178],[180,177],[175,177],[192,177],[195,177],[191,177],[187,177],[189,180],[194,181],[183,178],[182,177],[185,177],[186,178],[176,177],[190,177],[177,178],[218,21],[159,21],[217,182],[202,183],[200,183],[211,183],[205,183],[209,183],[210,183],[216,183],[208,183],[206,183],[214,183],[213,184],[199,183],[203,183],[215,185],[204,183],[212,186],[207,183],[201,183]],"latestChangedDtsFile":"../../dist/emitter/index.d.ts","version":"5.6.3"} \ No newline at end of file diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 69013096b..602083eaf 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + diff --git a/.plugin/package-lock.json b/.plugin/package-lock.json index 5675f6f80..a2e2304a0 100644 --- a/.plugin/package-lock.json +++ b/.plugin/package-lock.json @@ -132,9 +132,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", - "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "dependencies": { "@babel/types": "^7.26.0" @@ -751,9 +751,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.2.tgz", - "integrity": "sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.3.tgz", + "integrity": "sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==", "cpu": [ "arm" ], @@ -764,9 +764,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.2.tgz", - "integrity": "sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.3.tgz", + "integrity": "sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==", "cpu": [ "arm64" ], @@ -777,9 +777,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.2.tgz", - "integrity": "sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.3.tgz", + "integrity": "sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==", "cpu": [ "arm64" ], @@ -790,9 +790,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.2.tgz", - "integrity": "sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.3.tgz", + "integrity": "sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==", "cpu": [ "x64" ], @@ -803,9 +803,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.2.tgz", - "integrity": "sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.3.tgz", + "integrity": "sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==", "cpu": [ "arm64" ], @@ -816,9 +816,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.2.tgz", - "integrity": "sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.3.tgz", + "integrity": "sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==", "cpu": [ "x64" ], @@ -829,9 +829,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.2.tgz", - "integrity": "sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz", + "integrity": "sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==", "cpu": [ "arm" ], @@ -842,9 +842,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.2.tgz", - "integrity": "sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.3.tgz", + "integrity": "sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==", "cpu": [ "arm" ], @@ -855,9 +855,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.2.tgz", - "integrity": "sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.3.tgz", + "integrity": "sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==", "cpu": [ "arm64" ], @@ -868,9 +868,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.2.tgz", - "integrity": "sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.3.tgz", + "integrity": "sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==", "cpu": [ "arm64" ], @@ -881,9 +881,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.2.tgz", - "integrity": "sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.3.tgz", + "integrity": "sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==", "cpu": [ "ppc64" ], @@ -894,9 +894,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.2.tgz", - "integrity": "sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.3.tgz", + "integrity": "sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==", "cpu": [ "riscv64" ], @@ -907,9 +907,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.2.tgz", - "integrity": "sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.3.tgz", + "integrity": "sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==", "cpu": [ "s390x" ], @@ -920,9 +920,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.2.tgz", - "integrity": "sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.3.tgz", + "integrity": "sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==", "cpu": [ "x64" ], @@ -933,9 +933,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.2.tgz", - "integrity": "sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.3.tgz", + "integrity": "sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==", "cpu": [ "x64" ], @@ -946,9 +946,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.2.tgz", - "integrity": "sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.3.tgz", + "integrity": "sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==", "cpu": [ "arm64" ], @@ -959,9 +959,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.2.tgz", - "integrity": "sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.3.tgz", + "integrity": "sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==", "cpu": [ "ia32" ], @@ -972,9 +972,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.2.tgz", - "integrity": "sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.3.tgz", + "integrity": "sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==", "cpu": [ "x64" ], @@ -1015,9 +1015,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.8.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", - "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "version": "22.8.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", + "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", "dev": true, "dependencies": { "undici-types": "~6.19.8" @@ -1071,9 +1071,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241028.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241028.1.tgz", - "integrity": "sha512-3EOunnP/pwqz6t0q6T0BApOEZ/pBdwopDqQKf1HisFSA8BDX9ttPmde7+Hb72MamX/iLejaQnUGsxHMF0j7Vnw==", + "version": "0.1.9-alpha.20241030.3", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241030.3.tgz", + "integrity": "sha512-oQRq76nylz33Q9SSitLT9EnoQki6uNBJ4QAC1djt3Ns+020gXPRsNt9wHlSUsNGa/I1ilkNZsWxuyOSHoPA3vQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -2740,9 +2740,9 @@ } }, "node_modules/rollup": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.2.tgz", - "integrity": "sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", + "integrity": "sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==", "dev": true, "dependencies": { "@types/estree": "1.0.6" @@ -2755,24 +2755,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.2", - "@rollup/rollup-android-arm64": "4.24.2", - "@rollup/rollup-darwin-arm64": "4.24.2", - "@rollup/rollup-darwin-x64": "4.24.2", - "@rollup/rollup-freebsd-arm64": "4.24.2", - "@rollup/rollup-freebsd-x64": "4.24.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.2", - "@rollup/rollup-linux-arm-musleabihf": "4.24.2", - "@rollup/rollup-linux-arm64-gnu": "4.24.2", - "@rollup/rollup-linux-arm64-musl": "4.24.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.2", - "@rollup/rollup-linux-riscv64-gnu": "4.24.2", - "@rollup/rollup-linux-s390x-gnu": "4.24.2", - "@rollup/rollup-linux-x64-gnu": "4.24.2", - "@rollup/rollup-linux-x64-musl": "4.24.2", - "@rollup/rollup-win32-arm64-msvc": "4.24.2", - "@rollup/rollup-win32-ia32-msvc": "4.24.2", - "@rollup/rollup-win32-x64-msvc": "4.24.2", + "@rollup/rollup-android-arm-eabi": "4.24.3", + "@rollup/rollup-android-arm64": "4.24.3", + "@rollup/rollup-darwin-arm64": "4.24.3", + "@rollup/rollup-darwin-x64": "4.24.3", + "@rollup/rollup-freebsd-arm64": "4.24.3", + "@rollup/rollup-freebsd-x64": "4.24.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.3", + "@rollup/rollup-linux-arm-musleabihf": "4.24.3", + "@rollup/rollup-linux-arm64-gnu": "4.24.3", + "@rollup/rollup-linux-arm64-musl": "4.24.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.3", + "@rollup/rollup-linux-riscv64-gnu": "4.24.3", + "@rollup/rollup-linux-s390x-gnu": "4.24.3", + "@rollup/rollup-linux-x64-gnu": "4.24.3", + "@rollup/rollup-linux-x64-musl": "4.24.3", + "@rollup/rollup-win32-arm64-msvc": "4.24.3", + "@rollup/rollup-win32-ia32-msvc": "4.24.3", + "@rollup/rollup-win32-x64-msvc": "4.24.3", "fsevents": "~2.3.2" } }, diff --git a/.scripts/Run-Checks.ps1 b/.scripts/Run-Checks.ps1 index 054ef0e4d..fd134a405 100644 --- a/.scripts/Run-Checks.ps1 +++ b/.scripts/Run-Checks.ps1 @@ -19,7 +19,10 @@ function Run-ModelsSubnamespaceCheck { "OpenAIModelClient.Protocol.cs", "OpenAIModelCollection.cs", "OpenAIModelCollection.Serialization.cs", - "OpenAIModelsModelFactory.cs" + "OpenAIModelsModelFactory.cs", + "UnknownRealtimeRequestMessageItem.cs", + "UnknownRealtimeRequestMessageItem.Serialization.cs", + "OpenAIModelClient.RestClient.cs" ) $failures = @() @@ -85,8 +88,11 @@ function Run-TopLevelNamespaceCheck { "InternalFunctionDefinition.cs", "InternalFunctionDefinition.Serialization.cs", "ModelSerializationExtensions.cs", + "OpenAIClient.RestClient.cs", "Optional.cs", + "PipelineRequestHeadersExtensions.cs", "TelemetryDetails.cs", + "TypeFormatters.cs", "Utf8JsonBinaryContent.cs", # Utilities diff --git a/.typespec/audio/client.tsp b/.typespec/audio/client.tsp new file mode 100644 index 000000000..fad4afdc7 --- /dev/null +++ b/.typespec/audio/client.tsp @@ -0,0 +1,8 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./models.tsp"; + +using Azure.ClientGenerator.Core; +using OpenAI; + +@@visibility(CreateTranscriptionResponseVerboseJson.words, "read"); +@@visibility(CreateTranscriptionResponseVerboseJson.segments, "read"); diff --git a/.typespec/audio/main.tsp b/.typespec/audio/main.tsp index 144c4aeaf..e7af5325f 100644 --- a/.typespec/audio/main.tsp +++ b/.typespec/audio/main.tsp @@ -1 +1,2 @@ +import "./client.tsp"; import "./operations.tsp"; diff --git a/package-lock.json b/package-lock.json index a93722591..676510297 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,9 +143,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", - "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "dependencies": { "@babel/types": "^7.26.0" @@ -910,9 +910,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.2.tgz", - "integrity": "sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.3.tgz", + "integrity": "sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==", "cpu": [ "arm" ], @@ -923,9 +923,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.2.tgz", - "integrity": "sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.3.tgz", + "integrity": "sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==", "cpu": [ "arm64" ], @@ -936,9 +936,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.2.tgz", - "integrity": "sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.3.tgz", + "integrity": "sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==", "cpu": [ "arm64" ], @@ -949,9 +949,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.2.tgz", - "integrity": "sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.3.tgz", + "integrity": "sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==", "cpu": [ "x64" ], @@ -962,9 +962,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.2.tgz", - "integrity": "sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.3.tgz", + "integrity": "sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==", "cpu": [ "arm64" ], @@ -975,9 +975,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.2.tgz", - "integrity": "sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.3.tgz", + "integrity": "sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==", "cpu": [ "x64" ], @@ -988,9 +988,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.2.tgz", - "integrity": "sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz", + "integrity": "sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==", "cpu": [ "arm" ], @@ -1001,9 +1001,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.2.tgz", - "integrity": "sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.3.tgz", + "integrity": "sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==", "cpu": [ "arm" ], @@ -1014,9 +1014,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.2.tgz", - "integrity": "sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.3.tgz", + "integrity": "sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==", "cpu": [ "arm64" ], @@ -1027,9 +1027,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.2.tgz", - "integrity": "sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.3.tgz", + "integrity": "sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==", "cpu": [ "arm64" ], @@ -1040,9 +1040,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.2.tgz", - "integrity": "sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.3.tgz", + "integrity": "sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==", "cpu": [ "ppc64" ], @@ -1053,9 +1053,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.2.tgz", - "integrity": "sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.3.tgz", + "integrity": "sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==", "cpu": [ "riscv64" ], @@ -1066,9 +1066,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.2.tgz", - "integrity": "sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.3.tgz", + "integrity": "sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==", "cpu": [ "s390x" ], @@ -1079,9 +1079,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.2.tgz", - "integrity": "sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.3.tgz", + "integrity": "sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==", "cpu": [ "x64" ], @@ -1092,9 +1092,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.2.tgz", - "integrity": "sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.3.tgz", + "integrity": "sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==", "cpu": [ "x64" ], @@ -1105,9 +1105,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.2.tgz", - "integrity": "sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.3.tgz", + "integrity": "sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==", "cpu": [ "arm64" ], @@ -1118,9 +1118,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.2.tgz", - "integrity": "sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.3.tgz", + "integrity": "sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==", "cpu": [ "ia32" ], @@ -1131,9 +1131,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.2.tgz", - "integrity": "sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.3.tgz", + "integrity": "sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==", "cpu": [ "x64" ], @@ -1179,9 +1179,9 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/node": { - "version": "22.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.2.tgz", - "integrity": "sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw==", + "version": "22.8.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", + "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", "dev": true, "dependencies": { "undici-types": "~6.19.8" @@ -1235,9 +1235,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241028.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241028.2.tgz", - "integrity": "sha512-rz3Xpe5yW4ZOcUKO6YLP8rV1/+i7XzFPSCsxYYYKthwrPRwDst6sJr2CwrwMtdBkqoqJrWnqQIRp9l+BiPE5Lw==", + "version": "0.1.9-alpha.20241030.3", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241030.3.tgz", + "integrity": "sha512-oQRq76nylz33Q9SSitLT9EnoQki6uNBJ4QAC1djt3Ns+020gXPRsNt9wHlSUsNGa/I1ilkNZsWxuyOSHoPA3vQ==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -3003,9 +3003,9 @@ } }, "node_modules/rollup": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.2.tgz", - "integrity": "sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", + "integrity": "sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==", "dev": true, "dependencies": { "@types/estree": "1.0.6" @@ -3018,24 +3018,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.2", - "@rollup/rollup-android-arm64": "4.24.2", - "@rollup/rollup-darwin-arm64": "4.24.2", - "@rollup/rollup-darwin-x64": "4.24.2", - "@rollup/rollup-freebsd-arm64": "4.24.2", - "@rollup/rollup-freebsd-x64": "4.24.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.2", - "@rollup/rollup-linux-arm-musleabihf": "4.24.2", - "@rollup/rollup-linux-arm64-gnu": "4.24.2", - "@rollup/rollup-linux-arm64-musl": "4.24.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.2", - "@rollup/rollup-linux-riscv64-gnu": "4.24.2", - "@rollup/rollup-linux-s390x-gnu": "4.24.2", - "@rollup/rollup-linux-x64-gnu": "4.24.2", - "@rollup/rollup-linux-x64-musl": "4.24.2", - "@rollup/rollup-win32-arm64-msvc": "4.24.2", - "@rollup/rollup-win32-ia32-msvc": "4.24.2", - "@rollup/rollup-win32-x64-msvc": "4.24.2", + "@rollup/rollup-android-arm-eabi": "4.24.3", + "@rollup/rollup-android-arm64": "4.24.3", + "@rollup/rollup-darwin-arm64": "4.24.3", + "@rollup/rollup-darwin-x64": "4.24.3", + "@rollup/rollup-freebsd-arm64": "4.24.3", + "@rollup/rollup-freebsd-x64": "4.24.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.3", + "@rollup/rollup-linux-arm-musleabihf": "4.24.3", + "@rollup/rollup-linux-arm64-gnu": "4.24.3", + "@rollup/rollup-linux-arm64-musl": "4.24.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.3", + "@rollup/rollup-linux-riscv64-gnu": "4.24.3", + "@rollup/rollup-linux-s390x-gnu": "4.24.3", + "@rollup/rollup-linux-x64-gnu": "4.24.3", + "@rollup/rollup-linux-x64-musl": "4.24.3", + "@rollup/rollup-win32-arm64-msvc": "4.24.3", + "@rollup/rollup-win32-ia32-msvc": "4.24.3", + "@rollup/rollup-win32-x64-msvc": "4.24.3", "fsevents": "~2.3.2" } }, From 12aa3e839136aef5dcdf611fe6a98f08499e1ed4 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 30 Oct 2024 17:57:12 -0700 Subject: [PATCH 26/54] missed --- ...temStreamingStartedUpdate.Serialization.cs | 195 ------------------ 1 file changed, 195 deletions(-) diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index 3000ba990..e69de29bb 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace OpenAI.RealtimeConversation -{ - public partial class ConversationItemFinishedUpdate : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) - { - writer.WritePropertyName("response_id"u8); - writer.WriteStringValue(ResponseId); - } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) - { - writer.WritePropertyName("output_index"u8); - writer.WriteNumberValue(OutputIndex); - } - if (SerializedAdditionalRawData?.ContainsKey("item") != true) - { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(_internalItem, options); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ConversationItemFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemFinishedUpdate(document.RootElement, options); - } - - internal static ConversationItemFinishedUpdate DeserializeConversationItemFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string responseId = default; - int outputIndex = default; - InternalRealtimeResponseItem item = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("response_id"u8)) - { - responseId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output_index"u8)) - { - outputIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("item"u8)) - { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); - continue; - } - if (true) - { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemFinishedUpdate( - type, - eventId, - serializedAdditionalRawData, - responseId, - outputIndex, - item); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support writing '{options.Format}' format."); - } - } - - ConversationItemFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemFinishedUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationItemFinishedUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - internal static new ConversationItemFinishedUpdate FromResponse(PipelineResponse response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemFinishedUpdate(document.RootElement); - } - - internal override BinaryContent ToBinaryContent() - { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); - } - } -} From 16b5701a427a6b70a5750571d9086093c6f71159 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 31 Oct 2024 11:09:29 -0700 Subject: [PATCH 27/54] regen --- .../ChatCompletionOptions.Serialization.cs | 90 ++++- .../Generated/Models/ChatCompletionOptions.cs | 4 +- ...hatInputTokenUsageDetails.Serialization.cs | 92 +++-- .../Models/ChatInputTokenUsageDetails.cs | 13 +- ...atOutputTokenUsageDetails.Serialization.cs | 21 +- .../Models/ChatOutputTokenUsageDetails.cs | 4 +- .../Models/ChatTokenUsage.Serialization.cs | 37 +- .../src/Generated/Models/ChatTokenUsage.cs | 3 +- .../Models/ConversationContentPart.cs | 12 +- .../Models/ConversationContentPartKind.cs | 10 - .../ConversationErrorUpdate.Serialization.cs | 22 +- .../Models/ConversationErrorUpdate.cs | 6 +- ...onInputAudioClearedUpdate.Serialization.cs | 136 +++---- .../ConversationInputAudioClearedUpdate.cs | 11 +- ...InputAudioCommittedUpdate.Serialization.cs | 161 ++++---- .../ConversationInputAudioCommittedUpdate.cs | 14 +- ...InputSpeechFinishedUpdate.Serialization.cs | 30 +- .../ConversationInputSpeechFinishedUpdate.cs | 17 +- ...nInputSpeechStartedUpdate.Serialization.cs | 30 +- .../ConversationInputSpeechStartedUpdate.cs | 13 +- ...TranscriptionFailedUpdate.Serialization.cs | 30 +- ...versationInputTranscriptionFailedUpdate.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 24 +- ...rsationInputTranscriptionFinishedUpdate.cs | 6 +- .../src/Generated/Models/ConversationItem.cs | 6 +- ...ersationItemCreatedUpdate.Serialization.cs | 158 ++++---- .../Models/ConversationItemCreatedUpdate.cs | 13 +- ...ersationItemDeletedUpdate.Serialization.cs | 22 +- .../Models/ConversationItemDeletedUpdate.cs | 6 +- ...eamingAudioFinishedUpdate.Serialization.cs | 177 ++++----- ...rsationItemStreamingAudioFinishedUpdate.cs | 20 +- ...anscriptionFinishedUpdate.Serialization.cs | 151 ++++---- ...reamingAudioTranscriptionFinishedUpdate.cs | 18 +- ...emStreamingFinishedUpdate.Serialization.cs | 173 ++++----- ...ConversationItemStreamingFinishedUpdate.cs | 14 +- ...temStreamingStartedUpdate.Serialization.cs | 172 +++++++++ .../ConversationItemStreamingStartedUpdate.cs | 13 +- ...reamingTextFinishedUpdate.Serialization.cs | 189 ++++----- ...ersationItemStreamingTextFinishedUpdate.cs | 18 +- ...sationItemTruncatedUpdate.Serialization.cs | 43 +-- .../Models/ConversationItemTruncatedUpdate.cs | 11 +- ...ationRateLimitDetailsItem.Serialization.cs | 14 +- .../ConversationRateLimitDetailsItem.cs | 16 +- ...versationRateLimitsUpdate.Serialization.cs | 163 ++++---- .../Models/ConversationRateLimitsUpdate.cs | 12 +- ...ionResponseFinishedUpdate.Serialization.cs | 22 +- .../ConversationResponseFinishedUpdate.cs | 6 +- ...tionResponseStartedUpdate.Serialization.cs | 22 +- .../ConversationResponseStartedUpdate.cs | 6 +- ...onSessionConfiguredUpdate.Serialization.cs | 22 +- .../ConversationSessionConfiguredUpdate.cs | 6 +- ...onversationSessionOptions.Serialization.cs | 67 ++-- .../Models/ConversationSessionOptions.cs | 10 +- ...ationSessionStartedUpdate.Serialization.cs | 22 +- .../ConversationSessionStartedUpdate.cs | 6 +- ...ConversationStatusDetails.Serialization.cs | 87 +++-- .../Models/ConversationStatusDetails.cs | 16 +- .../ConversationUpdate.Serialization.cs | 88 +---- .../Generated/Models/ConversationUpdate.cs | 3 +- .../ConversationUpdateKind.Serialization.cs | 146 ------- ...nternalCreateChatCompletionRequestModel.cs | 5 + ...teModerationRequestInput2.Serialization.cs | 85 ++-- .../InternalCreateModerationRequestInput2.cs | 22 +- ...ternalCreateModerationRequestInput2Type.cs | 14 +- ...teModerationRequestInput3.Serialization.cs | 90 +++-- .../InternalCreateModerationRequestInput3.cs | 22 +- ...ternalCreateModerationRequestInput3Type.cs | 14 +- ...ationRequestInputImageUrl.Serialization.cs | 90 +++-- ...nalCreateModerationRequestInputImageUrl.cs | 16 +- .../InternalCreateModerationRequestModel.cs | 6 + ...CategoryAppliedInputTypes.Serialization.cs | 362 +++++++++++++----- ...ResponseResultCategoryAppliedInputTypes.cs | 25 +- ...ernalModerationCategories.Serialization.cs | 20 + .../Models/InternalModerationCategories.cs | 9 +- ...lModerationCategoryScores.Serialization.cs | 20 + .../InternalModerationCategoryScores.cs | 9 +- ...ternalRealtimeClientEvent.Serialization.cs | 60 +-- .../Models/InternalRealtimeClientEvent.cs | 7 +- ...entConversationItemCreate.Serialization.cs | 59 +-- ...altimeClientEventConversationItemCreate.cs | 13 +- ...entConversationItemDelete.Serialization.cs | 61 +-- ...altimeClientEventConversationItemDelete.cs | 12 +- ...tConversationItemTruncate.Serialization.cs | 61 +-- ...timeClientEventConversationItemTruncate.cs | 18 +- ...entInputAudioBufferAppend.Serialization.cs | 59 +-- ...altimeClientEventInputAudioBufferAppend.cs | 12 +- ...ventInputAudioBufferClear.Serialization.cs | 49 +-- ...ealtimeClientEventInputAudioBufferClear.cs | 11 +- ...entInputAudioBufferCommit.Serialization.cs | 49 +-- ...altimeClientEventInputAudioBufferCommit.cs | 11 +- ...ClientEventResponseCancel.Serialization.cs | 49 +-- ...ternalRealtimeClientEventResponseCancel.cs | 11 +- ...ClientEventResponseCreate.Serialization.cs | 63 +-- ...ternalRealtimeClientEventResponseCreate.cs | 12 +- ...entResponseCreateResponse.Serialization.cs | 233 ++++------- ...altimeClientEventResponseCreateResponse.cs | 22 +- ...eClientEventSessionUpdate.Serialization.cs | 61 +-- ...nternalRealtimeClientEventSessionUpdate.cs | 12 +- .../Models/InternalRealtimeClientEventType.cs | 28 +- .../Models/InternalRealtimeItemType.cs | 20 +- ...questAssistantMessageItem.Serialization.cs | 4 +- ...rnalRealtimeRequestAssistantMessageItem.cs | 2 +- ...meRequestAudioContentPart.Serialization.cs | 28 +- ...InternalRealtimeRequestAudioContentPart.cs | 9 +- ...meRequestFunctionCallItem.Serialization.cs | 4 +- ...InternalRealtimeRequestFunctionCallItem.cs | 4 +- ...estFunctionCallOutputItem.Serialization.cs | 4 +- ...alRealtimeRequestFunctionCallOutputItem.cs | 4 +- ...ealtimeRequestMessageItem.Serialization.cs | 4 +- .../InternalRealtimeRequestMessageItem.cs | 4 +- .../InternalRealtimeRequestSessionModality.cs | 17 +- ...eRequestSystemMessageItem.Serialization.cs | 4 +- ...nternalRealtimeRequestSystemMessageItem.cs | 2 +- ...imeRequestTextContentPart.Serialization.cs | 22 +- .../InternalRealtimeRequestTextContentPart.cs | 13 +- ...imeRequestUserMessageItem.Serialization.cs | 4 +- .../InternalRealtimeRequestUserMessageItem.cs | 2 +- .../InternalRealtimeResponse.Serialization.cs | 4 +- .../Models/InternalRealtimeResponse.cs | 6 +- ...eResponseAudioContentPart.Serialization.cs | 24 +- ...nternalRealtimeResponseAudioContentPart.cs | 8 +- ...eResponseFunctionCallItem.Serialization.cs | 4 +- ...nternalRealtimeResponseFunctionCallItem.cs | 4 +- ...nseFunctionCallOutputItem.Serialization.cs | 4 +- ...lRealtimeResponseFunctionCallOutputItem.cs | 4 +- .../Models/InternalRealtimeResponseItem.cs | 6 +- ...altimeResponseMessageItem.Serialization.cs | 4 +- .../InternalRealtimeResponseMessageItem.cs | 4 +- ...alRealtimeResponseSession.Serialization.cs | 6 +- .../Models/InternalRealtimeResponseSession.cs | 6 +- ...meResponseTextContentPart.Serialization.cs | 22 +- ...InternalRealtimeResponseTextContentPart.cs | 8 +- ...rEventConversationCreated.Serialization.cs | 61 +-- ...lRealtimeServerEventConversationCreated.cs | 12 +- ...sationCreatedConversation.Serialization.cs | 84 ++-- ...verEventConversationCreatedConversation.cs | 14 +- ...oTranscriptionFailedError.Serialization.cs | 44 +-- ...nItemInputAudioTranscriptionFailedError.cs | 6 +- ...timeServerEventErrorError.Serialization.cs | 44 +-- .../InternalRealtimeServerEventErrorError.cs | 6 +- ...erEventResponseAudioDelta.Serialization.cs | 58 +-- ...alRealtimeServerEventResponseAudioDelta.cs | 8 +- ...ponseAudioTranscriptDelta.Serialization.cs | 58 +-- ...ServerEventResponseAudioTranscriptDelta.cs | 6 +- ...tResponseContentPartAdded.Serialization.cs | 58 +-- ...timeServerEventResponseContentPartAdded.cs | 6 +- ...ntResponseContentPartDone.Serialization.cs | 58 +-- ...ltimeServerEventResponseContentPartDone.cs | 6 +- ...unctionCallArgumentsDelta.Serialization.cs | 58 +-- ...EventResponseFunctionCallArgumentsDelta.cs | 19 +- ...FunctionCallArgumentsDone.Serialization.cs | 69 ++-- ...rEventResponseFunctionCallArgumentsDone.cs | 9 +- ...verEventResponseTextDelta.Serialization.cs | 58 +-- ...nalRealtimeServerEventResponseTextDelta.cs | 10 +- ...ationApplicableInputKinds.Serialization.cs | 2 - ...nknownRealtimeClientEvent.Serialization.cs | 34 +- .../Models/UnknownRealtimeClientEvent.cs | 6 +- ...nknownRealtimeContentPart.Serialization.cs | 6 +- .../Models/UnknownRealtimeContentPart.cs | 2 +- ...nknownRealtimeRequestItem.Serialization.cs | 4 +- .../Models/UnknownRealtimeRequestItem.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 4 +- .../UnknownRealtimeRequestMessageItem.cs | 2 +- ...knownRealtimeResponseItem.Serialization.cs | 4 +- .../Models/UnknownRealtimeResponseItem.cs | 2 +- ...timeResponseStatusDetails.Serialization.cs | 105 ----- .../UnknownRealtimeResponseStatusDetails.cs | 16 - ...nknownRealtimeServerEvent.Serialization.cs | 19 +- .../Models/UnknownRealtimeServerEvent.cs | 6 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 307 ++++++--------- .gitignore | 1 + .plugin/.gitignore | 2 + .plugin/emitter/temp/tsconfig.tsbuildinfo | 1 - .../src/OpenAI.Library.Plugin.csproj | 2 +- 174 files changed, 3034 insertions(+), 3022 deletions(-) delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs delete mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs delete mode 100644 .plugin/emitter/temp/tsconfig.tsbuildinfo diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index ae96361bf..8f1a29eca 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -27,19 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatCompletionOptions)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("messages") != true) - { - writer.WritePropertyName("messages"u8); - SerializeMessagesValue(writer, options); - } - if (SerializedAdditionalRawData?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model.ToString()); - } - if (SerializedAdditionalRawData?.ContainsKey("frequency_penalty") != true && Optional.IsDefined(FrequencyPenalty)) + if (Optional.IsDefined(FrequencyPenalty) && _additionalBinaryDataProperties?.ContainsKey("frequency_penalty") != true) { if (FrequencyPenalty != null) { @@ -262,6 +250,41 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(Metadata) && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("metadata"u8); + } + } + if (Optional.IsDefined(StoredOutputEnabled) && _additionalBinaryDataProperties?.ContainsKey("store") != true) + { + if (StoredOutputEnabled != null) + { + writer.WritePropertyName("store"u8); + writer.WriteBooleanValue(StoredOutputEnabled.Value); + } + else + { + writer.WriteNull("store"u8); + } + } if (Optional.IsDefined(_serviceTier) && _additionalBinaryDataProperties?.ContainsKey("service_tier") != true) { if (_serviceTier != null) @@ -314,8 +337,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme { return null; } - IList messages = default; - InternalCreateChatCompletionRequestModel model = default; float? frequencyPenalty = default; float? presencePenalty = default; ChatResponseFormat responseFormat = default; @@ -339,6 +360,8 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme int? deprecatedMaxTokens = default; int? maxOutputTokenCount = default; IList functions = default; + IDictionary metadata = default; + bool? storedOutputEnabled = default; InternalCreateChatCompletionRequestServiceTier? serviceTier = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -363,7 +386,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme presencePenalty = prop.Value.GetSingle(); continue; } - if (property.NameEquals("frequency_penalty"u8)) + if (prop.NameEquals("response_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { @@ -557,6 +580,37 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme functions = array; continue; } + if (prop.NameEquals("metadata"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + metadata = dictionary; + continue; + } + if (prop.NameEquals("store"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + storedOutputEnabled = null; + continue; + } + storedOutputEnabled = prop.Value.GetBoolean(); + continue; + } if (prop.NameEquals("service_tier"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -573,8 +627,6 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme } } return new ChatCompletionOptions( - messages, - model, frequencyPenalty, presencePenalty, responseFormat, @@ -598,6 +650,8 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme deprecatedMaxTokens, maxOutputTokenCount, functions ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + storedOutputEnabled, serviceTier, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs index 58ec47c4c..431b4bed0 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.cs @@ -11,7 +11,7 @@ public partial class ChatCompletionOptions { private protected IDictionary _additionalBinaryDataProperties; - internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, InternalCreateChatCompletionRequestServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) + internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, ChatResponseFormat responseFormat, float? temperature, float? topP, IList tools, IList messages, InternalCreateChatCompletionRequestModel model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList stopSequences, IDictionary logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, long? seed, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList functions, IDictionary metadata, bool? storedOutputEnabled, InternalCreateChatCompletionRequestServiceTier? serviceTier, IDictionary additionalBinaryDataProperties) { FrequencyPenalty = frequencyPenalty; PresencePenalty = presencePenalty; @@ -36,6 +36,8 @@ internal ChatCompletionOptions(float? frequencyPenalty, float? presencePenalty, _deprecatedMaxTokens = deprecatedMaxTokens; MaxOutputTokenCount = maxOutputTokenCount; Functions = functions; + Metadata = metadata; + StoredOutputEnabled = storedOutputEnabled; _serviceTier = serviceTier; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs index 2fcfd0a2f..0d2c370bf 100644 --- a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Chat { @@ -14,26 +15,31 @@ public partial class ChatInputTokenUsageDetails : IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatInputTokenUsageDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("audio_tokens") != true && Optional.IsDefined(AudioTokenCount)) + if (Optional.IsDefined(AudioTokenCount) && _additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) { writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokenCount.Value); } - if (SerializedAdditionalRawData?.ContainsKey("cached_tokens") != true && Optional.IsDefined(CachedTokenCount)) + if (Optional.IsDefined(CachedTokenCount) && _additionalBinaryDataProperties?.ContainsKey("cached_tokens") != true) { writer.WritePropertyName("cached_tokens"u8); writer.WriteNumberValue(CachedTokenCount.Value); } - if (SerializedAdditionalRawData != null) + if (true && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { @@ -41,7 +47,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,67 +56,63 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } - ChatInputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ChatInputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ChatInputTokenUsageDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeChatInputTokenUsageDetails(document.RootElement, options); } - internal static ChatInputTokenUsageDetails DeserializeChatInputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ChatInputTokenUsageDetails DeserializeChatInputTokenUsageDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - int? audioTokens = default; - int? cachedTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int? audioTokenCount = default; + int? cachedTokenCount = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("audio_tokens"u8)) + if (prop.NameEquals("audio_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - audioTokens = property.Value.GetInt32(); + audioTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("cached_tokens"u8)) + if (prop.NameEquals("cached_tokens"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - cachedTokens = property.Value.GetInt32(); + cachedTokenCount = prop.Value.GetInt32(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ChatInputTokenUsageDetails(audioTokens, cachedTokens, serializedAdditionalRawData); + return new ChatInputTokenUsageDetails(audioTokenCount, cachedTokenCount, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +122,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - ChatInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ChatInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ChatInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeChatInputTokenUsageDetails(document.RootElement, options); } default: @@ -138,15 +141,20 @@ ChatInputTokenUsageDetails IPersistableModel.Create( string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ChatInputTokenUsageDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ChatInputTokenUsageDetails chatInputTokenUsageDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatInputTokenUsageDetails(document.RootElement); + if (chatInputTokenUsageDetails == null) + { + return null; + } + return BinaryContent.Create(chatInputTokenUsageDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ChatInputTokenUsageDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatInputTokenUsageDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.cs index 6164fe03d..8119d2ab3 100644 --- a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.cs @@ -9,16 +9,23 @@ namespace OpenAI.Chat { public partial class ChatInputTokenUsageDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal ChatInputTokenUsageDetails() { } - internal ChatInputTokenUsageDetails(int? audioTokenCount, int? cachedTokenCount, IDictionary serializedAdditionalRawData) + internal ChatInputTokenUsageDetails(int? audioTokenCount, int? cachedTokenCount, IDictionary additionalBinaryDataProperties) { AudioTokenCount = audioTokenCount; CachedTokenCount = cachedTokenCount; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; } } } diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 9b864810a..06c552a79 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -27,13 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatOutputTokenUsageDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("reasoning_tokens") != true) + if (_additionalBinaryDataProperties?.ContainsKey("reasoning_tokens") != true) { writer.WritePropertyName("reasoning_tokens"u8); writer.WriteNumberValue(ReasoningTokenCount); } + if (Optional.IsDefined(AudioTokenCount) && _additionalBinaryDataProperties?.ContainsKey("audio_tokens") != true) + { + writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokenCount.Value); + } if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -75,6 +78,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai return null; } int reasoningTokenCount = default; + int? audioTokenCount = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -87,12 +91,21 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai reasoningTokenCount = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("audio_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + audioTokenCount = prop.Value.GetInt32(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, audioTokenCount, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs index de16aa15f..b5b6488d4 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.cs @@ -15,10 +15,10 @@ internal ChatOutputTokenUsageDetails() { } - internal ChatOutputTokenUsageDetails(int reasoningTokenCount, IDictionary additionalBinaryDataProperties) + internal ChatOutputTokenUsageDetails(int reasoningTokenCount, int? audioTokenCount, IDictionary additionalBinaryDataProperties) { - AudioTokenCount = audioTokenCount; ReasoningTokenCount = reasoningTokenCount; + AudioTokenCount = audioTokenCount; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index baf936f77..d8b52c91e 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("completion_tokens_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); } + if (Optional.IsDefined(InputTokenDetails) && _additionalBinaryDataProperties?.ContainsKey("prompt_tokens_details") != true) + { + writer.WritePropertyName("prompt_tokens_details"u8); + writer.WriteObjectValue(InputTokenDetails, options); + } if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -95,31 +100,41 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo int inputTokenCount = default; int totalTokenCount = default; ChatOutputTokenUsageDetails outputTokenDetails = default; + ChatInputTokenUsageDetails inputTokenDetails = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("completion_tokens"u8)) { - completionTokens = property.Value.GetInt32(); + outputTokenCount = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("prompt_tokens"u8)) + { + inputTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("prompt_tokens"u8)) + if (prop.NameEquals("total_tokens"u8)) { - promptTokens = property.Value.GetInt32(); + totalTokenCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("total_tokens"u8)) + if (prop.NameEquals("completion_tokens_details"u8)) { - totalTokens = property.Value.GetInt32(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputTokenDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(prop.Value, options); continue; } - if (property.NameEquals("completion_tokens_details"u8)) + if (prop.NameEquals("prompt_tokens_details"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - completionTokensDetails = ChatOutputTokenUsageDetails.DeserializeChatOutputTokenUsageDetails(property.Value, options); + inputTokenDetails = ChatInputTokenUsageDetails.DeserializeChatInputTokenUsageDetails(prop.Value, options); continue; } if (true) @@ -127,7 +142,13 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, additionalBinaryDataProperties); + return new ChatTokenUsage( + outputTokenCount, + inputTokenCount, + totalTokenCount, + outputTokenDetails, + inputTokenDetails, + additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.cs index 940c4a82c..8e1376866 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.cs @@ -18,12 +18,13 @@ internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalToke TotalTokenCount = totalTokenCount; } - internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails, IDictionary additionalBinaryDataProperties) + internal ChatTokenUsage(int outputTokenCount, int inputTokenCount, int totalTokenCount, ChatOutputTokenUsageDetails outputTokenDetails, ChatInputTokenUsageDetails inputTokenDetails, IDictionary additionalBinaryDataProperties) { OutputTokenCount = outputTokenCount; InputTokenCount = inputTokenCount; TotalTokenCount = totalTokenCount; OutputTokenDetails = outputTokenDetails; + InputTokenDetails = inputTokenDetails; _additionalBinaryDataProperties = additionalBinaryDataProperties; } diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.cs b/.dotnet/src/Generated/Models/ConversationContentPart.cs index 4f7c524f3..fe35eb936 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.cs @@ -11,23 +11,23 @@ public abstract partial class ConversationContentPart { private protected IDictionary _additionalBinaryDataProperties; - private protected ConversationContentPart(ConversationContentPartKind @type) + private protected ConversationContentPart(ConversationContentPartKind kind) { - Type = @type; + Kind = kind; } - internal ConversationContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) + internal ConversationContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) { - Type = @type; + Kind = kind; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + internal ConversationContentPartKind Kind { get; set; } + internal IDictionary SerializedAdditionalRawData { get => _additionalBinaryDataProperties; set => _additionalBinaryDataProperties = value; } - - internal ConversationContentPartKind Kind { get; set; } } } diff --git a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs index a2b29e42c..d60fff663 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs @@ -11,12 +11,6 @@ namespace OpenAI.RealtimeConversation public readonly partial struct ConversationContentPartKind : IEquatable { private readonly string _value; - - public ConversationContentPartKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string InputTextValue = "input_text"; private const string InputAudioValue = "input_audio"; private const string TextValue = "text"; @@ -33,10 +27,6 @@ public ConversationContentPartKind(string value) public static ConversationContentPartKind InputAudio { get; } = new ConversationContentPartKind(InputAudioValue); - public static ConversationContentPartKind Text { get; } = new ConversationContentPartKind(TextValue); - - public static ConversationContentPartKind Audio { get; } = new ConversationContentPartKind(AudioValue); - public static bool operator ==(ConversationContentPartKind left, ConversationContentPartKind right) => left.Equals(right); public static bool operator !=(ConversationContentPartKind left, ConversationContentPartKind right) => !left.Equals(right); diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 37a2aa765..47907be5c 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); @@ -58,25 +63,20 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE { return null; } - InternalRealtimeResponseError error = default; string eventId = default; + InternalRealtimeServerEventErrorError error = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("error"u8)) + if (prop.NameEquals("event_id"u8)) { - error = InternalRealtimeResponseError.DeserializeInternalRealtimeResponseError(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("error"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + error = InternalRealtimeServerEventErrorError.DeserializeInternalRealtimeServerEventErrorError(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationErrorUpdate(error, eventId, kind, additionalBinaryDataProperties); + return new ConversationErrorUpdate(eventId, error, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs index 226b21c77..571e909d8 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -9,14 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationErrorUpdate : ConversationUpdate { - internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) + internal ConversationErrorUpdate(string eventId, InternalRealtimeServerEventErrorError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) { _error = error; } - internal ConversationErrorUpdate(InternalRealtimeResponseError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationErrorUpdate(string eventId, InternalRealtimeServerEventErrorError error, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _error = error; } + + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs index 4bc9d5382..bb8ffc40d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs @@ -7,145 +7,127 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - internal partial class RealtimeResponseFailedStatusDetails : IJsonModel + public partial class ConversationInputAudioClearedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationInputAudioClearedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{format}' format."); - } + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("error") != true) + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") { - writer.WritePropertyName("error"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Error); -#else - using (JsonDocument document = JsonDocument.Parse(Error)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + throw new FormatException($"The model {nameof(ConversationInputAudioClearedUpdate)} does not support writing '{format}' format."); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - RealtimeResponseFailedStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationInputAudioClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioClearedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioClearedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); + return DeserializeConversationInputAudioClearedUpdate(document.RootElement, options); } - internal static RealtimeResponseFailedStatusDetails DeserializeRealtimeResponseFailedStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationInputAudioClearedUpdate DeserializeConversationInputAudioClearedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData error = default; - ConversationStatus type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("error"u8)) + if (prop.NameEquals("event_id"u8)) { - error = BinaryData.FromString(property.Value.GetRawText()); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new ConversationStatus(property.Value.GetString()); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new RealtimeResponseFailedStatusDetails(type, serializedAdditionalRawData, error); + return new ConversationInputAudioClearedUpdate(eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioClearedUpdate)} does not support writing '{options.Format}' format."); } } - RealtimeResponseFailedStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationInputAudioClearedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputAudioClearedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement, options); + return DeserializeConversationInputAudioClearedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(RealtimeResponseFailedStatusDetails)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioClearedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new RealtimeResponseFailedStatusDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationInputAudioClearedUpdate conversationInputAudioClearedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeRealtimeResponseFailedStatusDetails(document.RootElement); + if (conversationInputAudioClearedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationInputAudioClearedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationInputAudioClearedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputAudioClearedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs index 69c9b597c..9239d656e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs @@ -9,19 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioClearedUpdate : ConversationUpdate { - internal ConversationInputAudioClearedUpdate(string eventId) : base(eventId) + internal ConversationInputAudioClearedUpdate(string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCleared) { - Argument.AssertNotNull(eventId, nameof(eventId)); - - Kind = ConversationUpdateKind.InputAudioCleared; } - internal ConversationInputAudioClearedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationInputAudioClearedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { } - internal ConversationInputAudioClearedUpdate() - { - } + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs index 591b40f5c..61c5447c9 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs @@ -7,172 +7,149 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationInputAudioBufferCommittedUpdate : IJsonModel + public partial class ConversationInputAudioCommittedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationInputAudioCommittedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioCommittedUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("item_id"u8); - writer.WriteStringValue(ItemId); + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } - if (SerializedAdditionalRawData?.ContainsKey("previous_item_id") != true && Optional.IsDefined(PreviousItemId)) + if (_additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); writer.WriteStringValue(PreviousItemId); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName("item_id"u8); + writer.WriteStringValue(ItemId); } - writer.WriteEndObject(); } - ConversationInputAudioBufferCommittedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationInputAudioCommittedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioCommittedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioCommittedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); + return DeserializeConversationInputAudioCommittedUpdate(document.RootElement, options); } - internal static ConversationInputAudioBufferCommittedUpdate DeserializeConversationInputAudioBufferCommittedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationInputAudioCommittedUpdate DeserializeConversationInputAudioCommittedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - string itemId = default; - string previousItemId = default; - ConversationUpdateKind type = default; string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string previousItemId = default; + string itemId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = property.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("previous_item_id"u8)) + if (prop.NameEquals("previous_item_id"u8)) { - previousItemId = property.Value.GetString(); + previousItemId = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("item_id"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + itemId = prop.Value.GetString(); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationInputAudioBufferCommittedUpdate(type, eventId, serializedAdditionalRawData, itemId, previousItemId); + return new ConversationInputAudioCommittedUpdate(eventId, previousItemId, itemId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioCommittedUpdate)} does not support writing '{options.Format}' format."); } } - ConversationInputAudioBufferCommittedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationInputAudioCommittedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputAudioCommittedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement, options); + return DeserializeConversationInputAudioCommittedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationInputAudioBufferCommittedUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationInputAudioCommittedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationInputAudioBufferCommittedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationInputAudioCommittedUpdate conversationInputAudioCommittedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputAudioBufferCommittedUpdate(document.RootElement); + if (conversationInputAudioCommittedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationInputAudioCommittedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationInputAudioCommittedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationInputAudioCommittedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs index a7ba4389e..363908e8b 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs @@ -9,28 +9,22 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioCommittedUpdate : ConversationUpdate { - internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId) : base(eventId) + internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(previousItemId, nameof(previousItemId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioCommitted; PreviousItemId = previousItemId; ItemId = itemId; } - internal ConversationInputAudioCommittedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string previousItemId, string itemId) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; ItemId = itemId; } - internal ConversationInputAudioCommittedUpdate() - { - } + public new string EventId => _eventId ?? default; public string PreviousItemId { get; } + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 1ca2df3ac..e5eed1517 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -32,16 +32,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("audio_end_ms"u8); - writer.WriteNumberValue(_audioEndMs); + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } + if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) + { + writer.WritePropertyName("audio_end_ms"u8); + writer.WriteNumberValue(_audioEndMs); + } } ConversationInputSpeechFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechFinishedUpdate)JsonModelCreateCore(ref reader, options); @@ -63,16 +68,16 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp { return null; } - int audioEndMs = default; - string itemId = default; string eventId = default; + string itemId = default; + int audioEndMs = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("audio_end_ms"u8)) + if (prop.NameEquals("event_id"u8)) { - audioEndMs = prop.Value.GetInt32(); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("item_id"u8)) @@ -80,14 +85,9 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("audio_end_ms"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + audioEndMs = prop.Value.GetInt32(); continue; } if (prop.NameEquals("type"u8)) @@ -100,7 +100,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechFinishedUpdate(eventId, itemId, audioEndMs, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index 663f2bb3e..daf85c5d7 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -9,27 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate { - internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped) + internal ConversationInputSpeechFinishedUpdate(string eventId, string itemId, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped) { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioBufferSpeechStopped; - AudioEndMs = audioEndMs; ItemId = itemId; + _audioEndMs = audioEndMs; } - internal ConversationInputSpeechFinishedUpdate(int audioEndMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechFinishedUpdate(string eventId, string itemId, int audioEndMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - AudioEndMs = audioEndMs; ItemId = itemId; + _audioEndMs = audioEndMs; } - public int AudioEndMs { get; } - + public new string EventId => _eventId ?? default; - internal ConversationInputSpeechFinishedUpdate() - { - } public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 94c369a31..5e25cb18c 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -32,16 +32,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("audio_start_ms") != true) + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("audio_start_ms"u8); - writer.WriteNumberValue(_audioStartMs); + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } + if (_additionalBinaryDataProperties?.ContainsKey("audio_start_ms") != true) + { + writer.WritePropertyName("audio_start_ms"u8); + writer.WriteNumberValue(_audioStartMs); + } } ConversationInputSpeechStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputSpeechStartedUpdate)JsonModelCreateCore(ref reader, options); @@ -63,16 +68,16 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu { return null; } - int audioStartMs = default; - string itemId = default; string eventId = default; + string itemId = default; + int audioStartMs = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("audio_start_ms"u8)) + if (prop.NameEquals("event_id"u8)) { - audioStartMs = prop.Value.GetInt32(); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("item_id"u8)) @@ -80,14 +85,9 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("audio_start_ms"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + audioStartMs = prop.Value.GetInt32(); continue; } if (prop.NameEquals("type"u8)) @@ -100,7 +100,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechStartedUpdate(eventId, itemId, audioStartMs, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index bb5b4dadf..09489f585 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -9,22 +9,19 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate { - internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted) + internal ConversationInputSpeechStartedUpdate(string eventId, string itemId, int audioStartMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted) { - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.InputAudioBufferSpeechStarted; - AudioStartMs = audioStartMs; ItemId = itemId; + _audioStartMs = audioStartMs; } - internal ConversationInputSpeechStartedUpdate(int audioStartMs, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechStartedUpdate(string eventId, string itemId, int audioStartMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - AudioStartMs = audioStartMs; ItemId = itemId; + _audioStartMs = audioStartMs; } - public int AudioStartMs { get; } + public new string EventId => _eventId ?? default; public string ItemId { get; } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index a9809b413..3f7b726e2 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -45,7 +50,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); - writer.WriteObjectValue(_error, options); + writer.WriteObjectValue(_error, options); } } @@ -68,14 +73,19 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati { return null; } + string eventId = default; string itemId = default; int contentIndex = default; - InternalRealtimeResponseApiError error = default; - string eventId = default; + InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -88,17 +98,7 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati } if (prop.NameEquals("error"u8)) { - error = InternalRealtimeResponseApiError.DeserializeInternalRealtimeResponseApiError(prop.Value, options); - continue; - } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + error = InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -112,10 +112,10 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati } } return new ConversationInputTranscriptionFailedUpdate( + eventId, itemId, contentIndex, error, - eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index 3d130a89d..2118a7b70 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -9,20 +9,22 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed) + internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed) { ItemId = itemId; ContentIndex = contentIndex; _error = error; } - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeResponseApiError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; _error = error; } + public new string EventId => _eventId ?? default; + public string ItemId { get; } public int ContentIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index e8ce56cca..0511fd330 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -68,14 +73,19 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa { return null; } + string eventId = default; string itemId = default; int contentIndex = default; string transcript = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -91,16 +101,6 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa transcript = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +112,10 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa } } return new ConversationInputTranscriptionFinishedUpdate( + eventId, itemId, contentIndex, transcript, - eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index 299cf326b..6085a5af9 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -9,20 +9,22 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted) + internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished) { ItemId = itemId; ContentIndex = contentIndex; Transcript = transcript; } - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; Transcript = transcript; } + public new string EventId => _eventId ?? default; + public string ItemId { get; } public int ContentIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItem.cs b/.dotnet/src/Generated/Models/ConversationItem.cs index a9b56dea1..90e10fc28 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.cs @@ -11,19 +11,19 @@ public abstract partial class ConversationItem { private protected IDictionary _additionalBinaryDataProperties; - private protected ConversationItem(InternalRealtimeRequestItemType @type) + private protected ConversationItem(InternalRealtimeItemType @type) { Type = @type; } - internal ConversationItem(InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) + internal ConversationItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) { Type = @type; Id = id; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRealtimeRequestItemType Type { get; set; } + internal InternalRealtimeItemType Type { get; set; } public string Id { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs index 4cbe4f2d4..77fa65027 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs @@ -7,161 +7,149 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationItemAcknowledgedUpdate : IJsonModel + public partial class ConversationItemCreatedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationItemCreatedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{format}' format."); - } + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("item") != true) + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") { - writer.WritePropertyName("item"u8); - writer.WriteObjectValue(Item, options); + throw new FormatException($"The model {nameof(ConversationItemCreatedUpdate)} does not support writing '{format}' format."); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) + if (_additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } + writer.WritePropertyName("previous_item_id"u8); + writer.WriteStringValue(PreviousItemId); } - if (SerializedAdditionalRawData != null) + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(_internalItem, options); } - writer.WriteEndObject(); } - ConversationItemAcknowledgedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationItemCreatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemCreatedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemCreatedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); + return DeserializeConversationItemCreatedUpdate(document.RootElement, options); } - internal static ConversationItemAcknowledgedUpdate DeserializeConversationItemAcknowledgedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationItemCreatedUpdate DeserializeConversationItemCreatedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ConversationItem item = default; - ConversationUpdateKind type = default; string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string previousItemId = default; + InternalRealtimeResponseItem internalItem = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("item"u8)) + if (prop.NameEquals("event_id"u8)) { - item = ConversationItem.DeserializeConversationItem(property.Value, options); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("previous_item_id"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + previousItemId = prop.Value.GetString(); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("item"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemAcknowledgedUpdate(type, eventId, serializedAdditionalRawData, item); + return new ConversationItemCreatedUpdate(eventId, previousItemId, internalItem, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemCreatedUpdate)} does not support writing '{options.Format}' format."); } } - ConversationItemAcknowledgedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationItemCreatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemCreatedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement, options); + return DeserializeConversationItemCreatedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationItemAcknowledgedUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemCreatedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationItemAcknowledgedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationItemCreatedUpdate conversationItemCreatedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemAcknowledgedUpdate(document.RootElement); + if (conversationItemCreatedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemCreatedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationItemCreatedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemCreatedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs index 2d23c315c..2302072aa 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs @@ -9,26 +9,19 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemCreatedUpdate : ConversationUpdate { - internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem) : base(eventId) + internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(previousItemId, nameof(previousItemId)); - Argument.AssertNotNull(internalItem, nameof(internalItem)); - - Kind = ConversationUpdateKind.ItemCreated; PreviousItemId = previousItemId; _internalItem = internalItem; } - internal ConversationItemCreatedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string previousItemId, InternalRealtimeResponseItem internalItem) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; _internalItem = internalItem; } - internal ConversationItemCreatedUpdate() - { - } + public new string EventId => _eventId ?? default; public string PreviousItemId { get; } } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 2f6964527..9fe31d103 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -58,25 +63,20 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted { return null; } - string itemId = default; string eventId = default; + string itemId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("item_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + itemId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationItemDeletedUpdate(itemId, eventId, kind, additionalBinaryDataProperties); + return new ConversationItemDeletedUpdate(eventId, itemId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index 5d40089a7..520cf0796 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -9,16 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemDeletedUpdate : ConversationUpdate { - internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) + internal ConversationItemDeletedUpdate(string eventId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) { ItemId = itemId; } - internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemDeletedUpdate(string eventId, string itemId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; } + public new string EventId => _eventId ?? default; + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs index b94744341..09899e509 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs @@ -7,201 +7,178 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationOutputTranscriptionFinishedUpdate : IJsonModel + public partial class ConversationItemStreamingAudioFinishedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationItemStreamingAudioFinishedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingAudioFinishedUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); writer.WriteStringValue(ResponseId); } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - ConversationOutputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationItemStreamingAudioFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStreamingAudioFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingAudioFinishedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingAudioFinishedUpdate(document.RootElement, options); } - internal static ConversationOutputTranscriptionFinishedUpdate DeserializeConversationOutputTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversationItemStreamingAudioFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = property.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("item_id"u8)) + if (prop.NameEquals("response_id"u8)) { - itemId = property.Value.GetString(); + responseId = prop.Value.GetString(); continue; } - if (property.NameEquals("output_index"u8)) + if (prop.NameEquals("item_id"u8)) { - outputIndex = property.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (property.NameEquals("content_index"u8)) + if (prop.NameEquals("output_index"u8)) { - contentIndex = property.Value.GetInt32(); + outputIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("content_index"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + contentIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationOutputTranscriptionFinishedUpdate( - type, + return new ConversationItemStreamingAudioFinishedUpdate( eventId, - serializedAdditionalRawData, responseId, itemId, outputIndex, - contentIndex); + contentIndex, + kind, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingAudioFinishedUpdate)} does not support writing '{options.Format}' format."); } } - ConversationOutputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationItemStreamingAudioFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStreamingAudioFinishedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingAudioFinishedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationOutputTranscriptionFinishedUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingAudioFinishedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationOutputTranscriptionFinishedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationItemStreamingAudioFinishedUpdate conversationItemStreamingAudioFinishedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationOutputTranscriptionFinishedUpdate(document.RootElement); + if (conversationItemStreamingAudioFinishedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemStreamingAudioFinishedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationItemStreamingAudioFinishedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStreamingAudioFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs index b05b2d28f..c98f7a36e 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs @@ -7,38 +7,32 @@ namespace OpenAI.RealtimeConversation { - public partial class ConversationAudioDoneUpdate : ConversationUpdate + public partial class ConversationItemStreamingAudioFinishedUpdate : ConversationUpdate { - internal ConversationAudioDoneUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId) + internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished) { - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - - Kind = ConversationUpdateKind.ResponseAudioDone; ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; } - internal ConversationAudioDoneUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string type, string responseId, string itemId, int outputIndex, int contentIndex) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { - Type = type; ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; } - internal ConversationAudioDoneUpdate() - { - } - - internal string Type { get; set; } = "response.audio.done"; + public new string EventId => _eventId ?? default; public string ResponseId { get; } + public string ItemId { get; } + public int OutputIndex { get; } + public int ContentIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs index 15a4b862d..5b56625f4 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs @@ -7,165 +7,148 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioTranscriptionFinishedUpdate : IJsonModel { + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ConversationItemStreamingAudioTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); writer.WriteStringValue(ResponseId); } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); } - if (SerializedAdditionalRawData?.ContainsKey("transcript") != true) + if (_additionalBinaryDataProperties?.ContainsKey("transcript") != true) { writer.WritePropertyName("transcript"u8); writer.WriteStringValue(Transcript); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - ConversationItemStreamingAudioTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationItemStreamingAudioTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStreamingAudioTranscriptionFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ConversationItemStreamingAudioTranscriptionFinishedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(document.RootElement, options); } - internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string transcript = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = property.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("item_id"u8)) + if (prop.NameEquals("response_id"u8)) { - itemId = property.Value.GetString(); + responseId = prop.Value.GetString(); continue; } - if (property.NameEquals("output_index"u8)) + if (prop.NameEquals("item_id"u8)) { - outputIndex = property.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (property.NameEquals("content_index"u8)) + if (prop.NameEquals("output_index"u8)) { - contentIndex = property.Value.GetInt32(); + outputIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("transcript"u8)) + if (prop.NameEquals("content_index"u8)) { - transcript = property.Value.GetString(); + contentIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("transcript"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + transcript = prop.Value.GetString(); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( - type, eventId, - serializedAdditionalRawData, responseId, itemId, outputIndex, contentIndex, - transcript); + transcript, + kind, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -175,15 +158,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationItemStreamingAudioTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStreamingAudioTranscriptionFinishedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(document.RootElement, options); } default: @@ -193,15 +177,20 @@ ConversationItemStreamingAudioTranscriptionFinishedUpdate IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationItemStreamingAudioTranscriptionFinishedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationItemStreamingAudioTranscriptionFinishedUpdate conversationItemStreamingAudioTranscriptionFinishedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(document.RootElement); + if (conversationItemStreamingAudioTranscriptionFinishedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemStreamingAudioTranscriptionFinishedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationItemStreamingAudioTranscriptionFinishedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStreamingAudioTranscriptionFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs index af1a3426a..85be46187 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs @@ -9,14 +9,8 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(eventId) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(transcript, nameof(transcript)); - - Kind = ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished; ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; @@ -24,7 +18,7 @@ internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventI Transcript = transcript; } - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -33,14 +27,16 @@ internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(ConversationU Transcript = transcript; } - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate() - { - } + public new string EventId => _eventId ?? default; public string ResponseId { get; } + public string ItemId { get; } + public int OutputIndex { get; } + public int ContentIndex { get; } + public string Transcript { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs index c4495f964..8b48546c1 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs @@ -7,189 +7,166 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationItemStartedUpdate : IJsonModel + public partial class ConversationItemStreamingFinishedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationItemStreamingFinishedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingFinishedUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); writer.WriteStringValue(ResponseId); } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); } - if (SerializedAdditionalRawData?.ContainsKey("item") != true) + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) { writer.WritePropertyName("item"u8); writer.WriteObjectValue(_internalItem, options); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - ConversationItemStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationItemStreamingFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStreamingFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingFinishedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationItemStartedUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingFinishedUpdate(document.RootElement, options); } - internal static ConversationItemStartedUpdate DeserializeConversationItemStartedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationItemStreamingFinishedUpdate DeserializeConversationItemStreamingFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; int outputIndex = default; - InternalRealtimeResponseItem item = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + InternalRealtimeResponseItem internalItem = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = property.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("output_index"u8)) + if (prop.NameEquals("response_id"u8)) { - outputIndex = property.Value.GetInt32(); + responseId = prop.Value.GetString(); continue; } - if (property.NameEquals("item"u8)) + if (prop.NameEquals("output_index"u8)) { - item = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(property.Value, options); + outputIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("item"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationItemStartedUpdate( - type, + return new ConversationItemStreamingFinishedUpdate( eventId, - serializedAdditionalRawData, responseId, outputIndex, - item); + internalItem, + kind, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingFinishedUpdate)} does not support writing '{options.Format}' format."); } } - ConversationItemStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationItemStreamingFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStreamingFinishedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationItemStartedUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingFinishedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationItemStartedUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingFinishedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationItemStartedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationItemStreamingFinishedUpdate conversationItemStreamingFinishedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationItemStartedUpdate(document.RootElement); + if (conversationItemStreamingFinishedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemStreamingFinishedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationItemStreamingFinishedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStreamingFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs index 8fca906d4..84cc61c1b 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs @@ -9,30 +9,24 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId) + internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(internalItem, nameof(internalItem)); - - Kind = ConversationUpdateKind.ItemStreamingFinished; ResponseId = responseId; OutputIndex = outputIndex; _internalItem = internalItem; } - internal ConversationItemStreamingFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; _internalItem = internalItem; } - internal ConversationItemStreamingFinishedUpdate() - { - } + public new string EventId => _eventId ?? default; public string ResponseId { get; } + public int OutputIndex { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index e69de29bb..b7bb89d83 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -0,0 +1,172 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + public partial class ConversationItemStreamingStartedUpdate : IJsonModel + { + internal ConversationItemStreamingStartedUpdate() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemStreamingStartedUpdate)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) + { + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + } + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) + { + writer.WritePropertyName("output_index"u8); + writer.WriteNumberValue(ItemIndex); + } + if (_additionalBinaryDataProperties?.ContainsKey("item") != true) + { + writer.WritePropertyName("item"u8); + writer.WriteObjectValue(_internalItem, options); + } + } + + ConversationItemStreamingStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStreamingStartedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationItemStreamingStartedUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationItemStreamingStartedUpdate(document.RootElement, options); + } + + internal static ConversationItemStreamingStartedUpdate DeserializeConversationItemStreamingStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventId = default; + string responseId = default; + int itemIndex = default; + InternalRealtimeResponseItem internalItem = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output_index"u8)) + { + itemIndex = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("item"u8)) + { + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } + if (true) + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ConversationItemStreamingStartedUpdate( + eventId, + responseId, + itemIndex, + internalItem, + kind, + additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationItemStreamingStartedUpdate)} does not support writing '{options.Format}' format."); + } + } + + ConversationItemStreamingStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStreamingStartedUpdate)PersistableModelCreateCore(data, options); + + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationItemStreamingStartedUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationItemStreamingStartedUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ConversationItemStreamingStartedUpdate conversationItemStreamingStartedUpdate) + { + if (conversationItemStreamingStartedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemStreamingStartedUpdate, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ConversationItemStreamingStartedUpdate(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStreamingStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs index 10d04b0f3..f4fd449dc 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs @@ -9,28 +9,21 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingStartedUpdate : ConversationUpdate { - internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(eventId) + internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(internalItem, nameof(internalItem)); - - Kind = ConversationUpdateKind.ItemStreamingStarted; ResponseId = responseId; ItemIndex = itemIndex; _internalItem = internalItem; } - internal ConversationItemStreamingStartedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemIndex = itemIndex; _internalItem = internalItem; } - internal ConversationItemStreamingStartedUpdate() - { - } + public new string EventId => _eventId ?? default; public string ResponseId { get; } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs index 0c3fc276b..c3f6eb8fa 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs @@ -7,213 +7,190 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationTextDoneUpdate : IJsonModel + public partial class ConversationItemStreamingTextFinishedUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationItemStreamingTextFinishedUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingTextFinishedUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("response_id") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); writer.WriteStringValue(ResponseId); } - if (SerializedAdditionalRawData?.ContainsKey("item_id") != true) + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } - if (SerializedAdditionalRawData?.ContainsKey("output_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("output_index") != true) { writer.WritePropertyName("output_index"u8); writer.WriteNumberValue(OutputIndex); } - if (SerializedAdditionalRawData?.ContainsKey("content_index") != true) + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) { writer.WritePropertyName("content_index"u8); writer.WriteNumberValue(ContentIndex); } - if (SerializedAdditionalRawData?.ContainsKey("value") != true) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - ConversationTextDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationItemStreamingTextFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemStreamingTextFinishedUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingTextFinishedUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationTextDoneUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingTextFinishedUpdate(document.RootElement, options); } - internal static ConversationTextDoneUpdate DeserializeConversationTextDoneUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversationItemStreamingTextFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; - string value = default; - ConversationUpdateKind type = default; - string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + string text = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = property.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (property.NameEquals("item_id"u8)) + if (prop.NameEquals("response_id"u8)) { - itemId = property.Value.GetString(); + responseId = prop.Value.GetString(); continue; } - if (property.NameEquals("output_index"u8)) + if (prop.NameEquals("item_id"u8)) { - outputIndex = property.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (property.NameEquals("content_index"u8)) + if (prop.NameEquals("output_index"u8)) { - contentIndex = property.Value.GetInt32(); + outputIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("value"u8)) + if (prop.NameEquals("content_index"u8)) { - value = property.Value.GetString(); + contentIndex = prop.Value.GetInt32(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("text"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); + text = prop.Value.GetString(); continue; } - if (property.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationTextDoneUpdate( - type, + return new ConversationItemStreamingTextFinishedUpdate( eventId, - serializedAdditionalRawData, responseId, itemId, outputIndex, contentIndex, - value); + text, + kind, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingTextFinishedUpdate)} does not support writing '{options.Format}' format."); } } - ConversationTextDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationItemStreamingTextFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationItemStreamingTextFinishedUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationTextDoneUpdate(document.RootElement, options); + return DeserializeConversationItemStreamingTextFinishedUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationTextDoneUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationItemStreamingTextFinishedUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationTextDoneUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationItemStreamingTextFinishedUpdate conversationItemStreamingTextFinishedUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationTextDoneUpdate(document.RootElement); + if (conversationItemStreamingTextFinishedUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationItemStreamingTextFinishedUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationItemStreamingTextFinishedUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationItemStreamingTextFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs index 470d45211..ba2db1697 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs @@ -9,14 +9,8 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingTextFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(eventId) + internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(text, nameof(text)); - - Kind = ConversationUpdateKind.ItemStreamingPartTextFinished; ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; @@ -24,7 +18,7 @@ internal ConversationItemStreamingTextFinishedUpdate(string eventId, string resp Text = text; } - internal ConversationItemStreamingTextFinishedUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -33,14 +27,16 @@ internal ConversationItemStreamingTextFinishedUpdate(ConversationUpdateKind kind Text = text; } - internal ConversationItemStreamingTextFinishedUpdate() - { - } + public new string EventId => _eventId ?? default; public string ResponseId { get; } + public string ItemId { get; } + public int OutputIndex { get; } + public int ContentIndex { get; } + public string Text { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 35d33823e..7a27df72c 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -32,21 +32,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } + if (_additionalBinaryDataProperties?.ContainsKey("content_index") != true) + { + writer.WritePropertyName("content_index"u8); + writer.WriteNumberValue(ContentIndex); + } if (_additionalBinaryDataProperties?.ContainsKey("audio_end_ms") != true) { writer.WritePropertyName("audio_end_ms"u8); writer.WriteNumberValue(AudioEndMs); } - if (_additionalBinaryDataProperties?.ContainsKey("index") != true) - { - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - } } ConversationItemTruncatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationItemTruncatedUpdate)JsonModelCreateCore(ref reader, options); @@ -68,38 +73,32 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc { return null; } + string eventId = default; string itemId = default; int contentIndex = default; int audioEndMs = default; - int index = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("audio_end_ms"u8)) + if (prop.NameEquals("item_id"u8)) { - audioEndMs = prop.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("index"u8)) + if (prop.NameEquals("content_index"u8)) { - index = prop.Value.GetInt32(); + contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("audio_end_ms"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + audioEndMs = prop.Value.GetInt32(); continue; } if (prop.NameEquals("type"u8)) @@ -113,10 +112,10 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc } } return new ConversationItemTruncatedUpdate( + eventId, itemId, + contentIndex, audioEndMs, - index, - eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index 968b2599a..7bd5a9601 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -9,25 +9,26 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemTruncatedUpdate : ConversationUpdate { - internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) + internal ConversationItemTruncatedUpdate(string eventId, string itemId, int contentIndex, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - internal ConversationItemTruncatedUpdate(string itemId, int audioEndMs, int index, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemTruncatedUpdate(string eventId, string itemId, int contentIndex, int audioEndMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; - Index = index; } + public new string EventId => _eventId ?? default; + public string ItemId { get; } - public int AudioEndMs { get; } + public int ContentIndex { get; } - public int Index { get; } + public int AudioEndMs { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index 37935ca28..1579cc3cf 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -92,9 +92,9 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi return null; } string name = default; - int limit = default; - int remaining = default; - float resetSeconds = default; + int maximumCount = default; + int remainingCount = default; + TimeSpan timeUntilReset = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -105,17 +105,17 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi } if (prop.NameEquals("limit"u8)) { - limit = prop.Value.GetInt32(); + maximumCount = prop.Value.GetInt32(); continue; } if (prop.NameEquals("remaining"u8)) { - remaining = prop.Value.GetInt32(); + remainingCount = prop.Value.GetInt32(); continue; } if (prop.NameEquals("reset_seconds"u8)) { - resetSeconds = prop.Value.GetSingle(); + timeUntilReset = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } if (true) @@ -123,7 +123,7 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, additionalBinaryDataProperties); + return new ConversationRateLimitDetailsItem(name, maximumCount, remainingCount, timeUntilReset, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs index fb612ea44..e0986111a 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.cs @@ -11,7 +11,7 @@ public partial class ConversationRateLimitDetailsItem { private protected IDictionary _additionalBinaryDataProperties; - internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds) + internal ConversationRateLimitDetailsItem(string name, int maximumCount, int remainingCount, TimeSpan timeUntilReset) { Name = name; MaximumCount = maximumCount; @@ -19,23 +19,17 @@ internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, TimeUntilReset = timeUntilReset; } - internal ConversationRateLimitDetailsItem(string name, int limit, int remaining, float resetSeconds, IDictionary additionalBinaryDataProperties) + internal ConversationRateLimitDetailsItem(string name, int maximumCount, int remainingCount, TimeSpan timeUntilReset, IDictionary additionalBinaryDataProperties) { Name = name; - Limit = limit; - Remaining = remaining; - ResetSeconds = resetSeconds; + MaximumCount = maximumCount; + RemainingCount = remainingCount; + TimeUntilReset = timeUntilReset; _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Name { get; } - public int Limit { get; } - - public int Remaining { get; } - - public float ResetSeconds { get; } - internal IDictionary SerializedAdditionalRawData { get => _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs index c8fae2d6b..4d3889c42 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs @@ -7,171 +7,148 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - public partial class ConversationRateLimitsUpdatedUpdate : IJsonModel + public partial class ConversationRateLimitsUpdate : IJsonModel { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal ConversationRateLimitsUpdate() { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdate)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("rate_limits") != true) + base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("rate_limits") != true) { writer.WritePropertyName("rate_limits"u8); writer.WriteStartArray(); - foreach (var item in RateLimits) + foreach (ConversationRateLimitDetailsItem item in AllDetails) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("type") != true) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Kind.ToSerialString()); - } - if (SerializedAdditionalRawData?.ContainsKey("event_id") != true) - { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("event_id"); - } - } - if (SerializedAdditionalRawData != null) - { - foreach (var item in SerializedAdditionalRawData) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } - ConversationRateLimitsUpdatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationRateLimitsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationRateLimitsUpdate)JsonModelCreateCore(ref reader, options); + + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdate)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); + return DeserializeConversationRateLimitsUpdate(document.RootElement, options); } - internal static ConversationRateLimitsUpdatedUpdate DeserializeConversationRateLimitsUpdatedUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUpdate(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList rateLimits = default; - ConversationUpdateKind type = default; string eventId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IReadOnlyList allDetails = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("rate_limits"u8)) + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("rate_limits"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(ConversationRateLimitDetailsItem.DeserializeConversationRateLimitDetailsItem(item, options)); } - rateLimits = array; + allDetails = array; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = property.Value.GetString().ToConversationUpdateKind(); - continue; - } - if (property.NameEquals("event_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = property.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationRateLimitsUpdatedUpdate(type, eventId, serializedAdditionalRawData, rateLimits); + return new ConversationRateLimitsUpdate(eventId, allDetails, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdate)} does not support writing '{options.Format}' format."); } } - ConversationRateLimitsUpdatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationRateLimitsUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationRateLimitsUpdate)PersistableModelCreateCore(data, options); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement, options); + return DeserializeConversationRateLimitsUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationRateLimitsUpdatedUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationRateLimitsUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static new ConversationRateLimitsUpdatedUpdate FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationRateLimitsUpdate conversationRateLimitsUpdate) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationRateLimitsUpdatedUpdate(document.RootElement); + if (conversationRateLimitsUpdate == null) + { + return null; + } + return BinaryContent.Create(conversationRateLimitsUpdate, ModelSerializationExtensions.WireOptions); } - internal override BinaryContent ToBinaryContent() + public static explicit operator ConversationRateLimitsUpdate(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationRateLimitsUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs index c83155a91..b49f69fbb 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs @@ -10,22 +10,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitsUpdate : ConversationUpdate { - internal ConversationRateLimitsUpdate(string eventId, IEnumerable allDetails) : base(eventId) + internal ConversationRateLimitsUpdate(string eventId, IEnumerable allDetails) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(allDetails, nameof(allDetails)); - - Kind = ConversationUpdateKind.RateLimitsUpdated; AllDetails = allDetails.ToList(); } - internal ConversationRateLimitsUpdate(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, IReadOnlyList allDetails) : base(kind, eventId, serializedAdditionalRawData) + internal ConversationRateLimitsUpdate(string eventId, IReadOnlyList allDetails, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { AllDetails = allDetails; } - internal ConversationRateLimitsUpdate() - { - } + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 48ea87917..399d07915 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); @@ -58,25 +63,20 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon { return null; } - InternalRealtimeResponse internalResponse = default; string eventId = default; + InternalRealtimeResponse internalResponse = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) + if (prop.NameEquals("event_id"u8)) { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("response"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseFinishedUpdate(eventId, internalResponse, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs index 524f32a41..2b861fff6 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -9,14 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseFinishedUpdate : ConversationUpdate { - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) + internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) { _internalResponse = internalResponse; } - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } + + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 810df12a0..44ef1bbad 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); @@ -58,25 +63,20 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons { return null; } - InternalRealtimeResponse internalResponse = default; string eventId = default; + InternalRealtimeResponse internalResponse = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) + if (prop.NameEquals("event_id"u8)) { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("response"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseStartedUpdate(eventId, internalResponse, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs index da6c59ead..40fa619c2 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -9,14 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseStartedUpdate : ConversationUpdate { - internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) + internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) { _internalResponse = internalResponse; } - internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } + + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index 1378c2268..d3bf22808 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); @@ -58,25 +63,20 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi { return null; } - InternalRealtimeResponseSession internalSession = default; string eventId = default; + InternalRealtimeResponseSession internalSession = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) + if (prop.NameEquals("event_id"u8)) { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("session"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionConfiguredUpdate(eventId, internalSession, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs index 074658106..5a8af24a3 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -9,14 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionConfiguredUpdate : ConversationUpdate { - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) + internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) { _internalSession = internalSession; } - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } + + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index 64032d50d..4a25c88a8 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -27,16 +27,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ConversationSessionOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Voice) && _additionalBinaryDataProperties?.ContainsKey("voice") != true) - { - writer.WritePropertyName("voice"u8); - writer.WriteStringValue(Voice.Value.ToString()); - } if (Optional.IsDefined(Instructions) && _additionalBinaryDataProperties?.ContainsKey("instructions") != true) { writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); } + if (Optional.IsDefined(Voice) && _additionalBinaryDataProperties?.ContainsKey("voice") != true) + { + writer.WritePropertyName("voice"u8); + writer.WriteStringValue(Voice.Value.ToString()); + } if (Optional.IsDefined(InputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("input_audio_format") != true) { writer.WritePropertyName("input_audio_format"u8); @@ -62,26 +62,35 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (Optional.IsDefined(Model) && _additionalBinaryDataProperties?.ContainsKey("model") != true) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } if (Optional.IsDefined(TurnDetectionOptions) && _additionalBinaryDataProperties?.ContainsKey("turn_detection") != true) { - writer.WritePropertyName("turn_detection"u8); - writer.WriteObjectValue(TurnDetectionOptions, options); + if (TurnDetectionOptions != null) + { + writer.WritePropertyName("turn_detection"u8); + writer.WriteObjectValue(TurnDetectionOptions, options); + } + else + { + writer.WriteNull("turnDetection"u8); + } } if (Optional.IsDefined(InputTranscriptionOptions) && _additionalBinaryDataProperties?.ContainsKey("input_audio_transcription") != true) { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputTranscriptionOptions, options); + if (InputTranscriptionOptions != null) + { + writer.WritePropertyName("input_audio_transcription"u8); + writer.WriteObjectValue(InputTranscriptionOptions, options); + } + else + { + writer.WriteNull("inputAudioTranscription"u8); + } } if (Optional.IsCollectionDefined(_internalModalities) && _additionalBinaryDataProperties?.ContainsKey("modalities") != true) { writer.WritePropertyName("modalities"u8); writer.WriteStartArray(); - foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in _internalModalities) + foreach (InternalRealtimeRequestSessionModality item in _internalModalities) { writer.WriteStringValue(item.ToString()); } @@ -151,21 +160,25 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { return null; } - ConversationVoice? voice = default; string instructions = default; + ConversationVoice? voice = default; ConversationAudioFormat? inputAudioFormat = default; ConversationAudioFormat? outputAudioFormat = default; IList tools = default; float? temperature = default; - string model = default; ConversationTurnDetectionOptions turnDetectionOptions = default; ConversationInputTranscriptionOptions inputTranscriptionOptions = default; - IList internalModalities = default; + IList internalModalities = default; BinaryData internalToolChoice = default; BinaryData maxResponseOutputTokens = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("instructions"u8)) + { + instructions = prop.Value.GetString(); + continue; + } if (prop.NameEquals("voice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -175,11 +188,6 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions voice = new ConversationVoice(prop.Value.GetString()); continue; } - if (prop.NameEquals("instructions"u8)) - { - instructions = prop.Value.GetString(); - continue; - } if (prop.NameEquals("input_audio_format"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -221,15 +229,11 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions temperature = prop.Value.GetSingle(); continue; } - if (prop.NameEquals("model"u8)) - { - model = prop.Value.GetString(); - continue; - } if (prop.NameEquals("turn_detection"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { + turnDetectionOptions = null; continue; } turnDetectionOptions = ConversationTurnDetectionOptions.DeserializeConversationTurnDetectionOptions(prop.Value, options); @@ -239,6 +243,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { if (prop.Value.ValueKind == JsonValueKind.Null) { + inputTranscriptionOptions = null; continue; } inputTranscriptionOptions = ConversationInputTranscriptionOptions.DeserializeConversationInputTranscriptionOptions(prop.Value, options); @@ -250,10 +255,10 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); + array.Add(new InternalRealtimeRequestSessionModality(item.GetString())); } internalModalities = array; continue; @@ -282,14 +287,12 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions } } return new ConversationSessionOptions( - voice, instructions, voice, inputAudioFormat, outputAudioFormat, tools ?? new ChangeTrackingList(), temperature, - model, turnDetectionOptions, inputTranscriptionOptions, internalModalities, diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs index 4666bb4ae..7cf4e0ef0 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.cs @@ -15,19 +15,17 @@ public partial class ConversationSessionOptions public ConversationSessionOptions() { Tools = new ChangeTrackingList(); - _internalModalities = new ChangeTrackingList(); + _internalModalities = new ChangeTrackingList(); } - internal ConversationSessionOptions(ConversationVoice? voice, string instructions, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, string model, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IList internalModalities, BinaryData internalToolChoice, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) + internal ConversationSessionOptions(string instructions, ConversationVoice? voice, ConversationAudioFormat? inputAudioFormat, ConversationAudioFormat? outputAudioFormat, IList tools, float? temperature, ConversationTurnDetectionOptions turnDetectionOptions, ConversationInputTranscriptionOptions inputTranscriptionOptions, IList internalModalities, BinaryData internalToolChoice, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) { - Voice = voice; Instructions = instructions; Voice = voice; InputAudioFormat = inputAudioFormat; OutputAudioFormat = outputAudioFormat; Tools = tools; Temperature = temperature; - Model = model; TurnDetectionOptions = turnDetectionOptions; InputTranscriptionOptions = inputTranscriptionOptions; _internalModalities = internalModalities; @@ -36,10 +34,10 @@ internal ConversationSessionOptions(ConversationVoice? voice, string instruction _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public ConversationVoice? Voice { get; set; } - public string Instructions { get; set; } + public ConversationVoice? Voice { get; set; } + public ConversationAudioFormat? InputAudioFormat { get; set; } public ConversationAudioFormat? OutputAudioFormat { get; set; } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index fab09fd79..1bce6c107 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); @@ -58,25 +63,20 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS { return null; } - InternalRealtimeResponseSession internalSession = default; string eventId = default; + InternalRealtimeResponseSession internalSession = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) + if (prop.NameEquals("event_id"u8)) { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("session"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionStartedUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionStartedUpdate(eventId, internalSession, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs index 8d28aead8..8336969b3 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -9,14 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionStartedUpdate : ConversationUpdate { - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) + internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) { _internalSession = internalSession; } - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } + + public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs index 02ca1eaa4..5df8a2ea1 100644 --- a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs @@ -5,30 +5,40 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { - [PersistableModelProxy(typeof(UnknownRealtimeResponseStatusDetails))] - public partial class ConversationStatusDetails : IJsonModel + public abstract partial class ConversationStatusDetails : IJsonModel { + internal ConversationStatusDetails() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(StatusKind.ToString()); } - if (SerializedAdditionalRawData != null) + if (true && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { @@ -36,7 +46,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -45,36 +55,49 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } - ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ConversationStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeConversationStatusDetails(document.RootElement, options); } - internal static ConversationStatusDetails DeserializeConversationStatusDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationStatusDetails DeserializeConversationStatusDetails(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - return UnknownRealtimeResponseStatusDetails.DeserializeUnknownRealtimeResponseStatusDetails(element, options); + ConversationStatus statusKind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + statusKind = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (true) + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RealtimeConversation.ConversationStatusDetails(statusKind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -84,15 +107,16 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual ConversationStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeConversationStatusDetails(document.RootElement, options); } default: @@ -102,15 +126,20 @@ ConversationStatusDetails IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static ConversationStatusDetails FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(ConversationStatusDetails conversationStatusDetails) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationStatusDetails(document.RootElement); + if (conversationStatusDetails == null) + { + return null; + } + return BinaryContent.Create(conversationStatusDetails, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator ConversationStatusDetails(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeConversationStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationStatusDetails.cs b/.dotnet/src/Generated/Models/ConversationStatusDetails.cs index 46056c9ce..1b560fe8d 100644 --- a/.dotnet/src/Generated/Models/ConversationStatusDetails.cs +++ b/.dotnet/src/Generated/Models/ConversationStatusDetails.cs @@ -9,15 +9,23 @@ namespace OpenAI.RealtimeConversation { public abstract partial class ConversationStatusDetails { - internal IDictionary SerializedAdditionalRawData { get; set; } - protected ConversationStatusDetails() + private protected IDictionary _additionalBinaryDataProperties; + + private protected ConversationStatusDetails(ConversationStatus statusKind) { + StatusKind = statusKind; } - internal ConversationStatusDetails(ConversationStatus statusKind, IDictionary serializedAdditionalRawData) + internal ConversationStatusDetails(ConversationStatus statusKind, IDictionary additionalBinaryDataProperties) { StatusKind = statusKind; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; } } } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index 3f4d7eab9..e1256ed33 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { - [PersistableModelProxy(typeof(UnknownRealtimeResponseCommand))] + [PersistableModelProxy(typeof(UnknownRealtimeServerEvent))] public abstract partial class ConversationUpdate : IJsonModel { internal ConversationUpdate() @@ -33,15 +33,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) { - if (EventId != null) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - else - { - writer.WriteNull("eventId"u8); - } + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); } if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { @@ -79,76 +72,7 @@ protected virtual ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader read throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationUpdate(document.RootElement, options); - } - - internal static ConversationUpdate DeserializeConversationUpdate(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "session.created": - return ConversationSessionStartedUpdate.DeserializeConversationSessionStartedUpdate(element, options); - case "session.updated": - return ConversationSessionConfiguredUpdate.DeserializeConversationSessionConfiguredUpdate(element, options); - case "conversation.item.created": - return ConversationItemAcknowledgedUpdate.DeserializeConversationItemAcknowledgedUpdate(element, options); - case "conversation.item.deleted": - return ConversationItemDeletedUpdate.DeserializeConversationItemDeletedUpdate(element, options); - case "conversation.item.truncated": - return ConversationItemTruncatedUpdate.DeserializeConversationItemTruncatedUpdate(element, options); - case "response.created": - return ConversationResponseStartedUpdate.DeserializeConversationResponseStartedUpdate(element, options); - case "response.done": - return ConversationResponseFinishedUpdate.DeserializeConversationResponseFinishedUpdate(element, options); - case "rate_limits.updated": - return ConversationRateLimitsUpdatedUpdate.DeserializeConversationRateLimitsUpdatedUpdate(element, options); - case "response.output_item.added": - return ConversationItemStartedUpdate.DeserializeConversationItemStartedUpdate(element, options); - case "response.output_item.done": - return ConversationItemFinishedUpdate.DeserializeConversationItemFinishedUpdate(element, options); - case "response.content_part.added": - return ConversationContentPartStartedUpdate.DeserializeConversationContentPartStartedUpdate(element, options); - case "response.content_part.done": - return ConversationContentPartFinishedUpdate.DeserializeConversationContentPartFinishedUpdate(element, options); - case "response.audio.delta": - return ConversationAudioDeltaUpdate.DeserializeConversationAudioDeltaUpdate(element, options); - case "response.audio.done": - return ConversationAudioDoneUpdate.DeserializeConversationAudioDoneUpdate(element, options); - case "response.audio_transcript.delta": - return ConversationOutputTranscriptionDeltaUpdate.DeserializeConversationOutputTranscriptionDeltaUpdate(element, options); - case "response.audio_transcript.done": - return ConversationOutputTranscriptionFinishedUpdate.DeserializeConversationOutputTranscriptionFinishedUpdate(element, options); - case "response.text.delta": - return ConversationTextDeltaUpdate.DeserializeConversationTextDeltaUpdate(element, options); - case "response.text.done": - return ConversationTextDoneUpdate.DeserializeConversationTextDoneUpdate(element, options); - case "response.function_call_arguments.delta": - return ConversationFunctionCallArgumentsDeltaUpdate.DeserializeConversationFunctionCallArgumentsDeltaUpdate(element, options); - case "response.function_call_arguments.done": - return ConversationFunctionCallArgumentsDoneUpdate.DeserializeConversationFunctionCallArgumentsDoneUpdate(element, options); - case "input_audio_buffer.speech_started": - return ConversationInputSpeechStartedUpdate.DeserializeConversationInputSpeechStartedUpdate(element, options); - case "input_audio_buffer.speech_stopped": - return ConversationInputSpeechFinishedUpdate.DeserializeConversationInputSpeechFinishedUpdate(element, options); - case "conversation.item.input_audio_transcription.completed": - return ConversationInputTranscriptionFinishedUpdate.DeserializeConversationInputTranscriptionFinishedUpdate(element, options); - case "conversation.item.input_audio_transcription.failed": - return ConversationInputTranscriptionFailedUpdate.DeserializeConversationInputTranscriptionFailedUpdate(element, options); - case "input_audio_buffer.committed": - return ConversationInputAudioBufferCommittedUpdate.DeserializeConversationInputAudioBufferCommittedUpdate(element, options); - case "input_audio_buffer.cleared": - return ConversationInputAudioBufferClearedUpdate.DeserializeConversationInputAudioBufferClearedUpdate(element, options); - case "error": - return ConversationErrorUpdate.DeserializeConversationErrorUpdate(element, options); - } - } - return UnknownRealtimeResponseCommand.DeserializeUnknownRealtimeResponseCommand(element, options); + return ConversationUpdate.DeserializeConversationUpdate(document.RootElement, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -175,7 +99,7 @@ protected virtual ConversationUpdate PersistableModelCreateCore(BinaryData data, case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationUpdate(document.RootElement, options); + return ConversationUpdate.DeserializeConversationUpdate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); @@ -197,7 +121,7 @@ public static explicit operator ConversationUpdate(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return ConversationUpdate.DeserializeConversationUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs index ea4c3a360..d4faba64d 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -10,11 +10,10 @@ namespace OpenAI.RealtimeConversation public abstract partial class ConversationUpdate { private protected IDictionary _additionalBinaryDataProperties; + private protected string _eventId; private protected ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) { - Argument.AssertNotNull(eventId, nameof(eventId)); - EventId = eventId; Kind = kind; } diff --git a/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs index 9a8a2639b..f86fbce70 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdateKind.Serialization.cs @@ -2,155 +2,9 @@ #nullable disable -using System; - namespace OpenAI.RealtimeConversation { internal static partial class ConversationUpdateKindExtensions { - public static string ToSerialString(this RealtimeConversation.ConversationUpdateKind value) => value switch - { - RealtimeConversation.ConversationUpdateKind.SessionStarted => "session.created", - RealtimeConversation.ConversationUpdateKind.SessionConfigured => "session.updated", - RealtimeConversation.ConversationUpdateKind.ItemAcknowledged => "conversation.item.created", - RealtimeConversation.ConversationUpdateKind.ItemDeleted => "conversation.item.deleted", - RealtimeConversation.ConversationUpdateKind.ItemTruncated => "conversation.item.truncated", - RealtimeConversation.ConversationUpdateKind.ResponseStarted => "response.created", - RealtimeConversation.ConversationUpdateKind.ResponseFinished => "response.done", - RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated => "rate_limits.updated", - RealtimeConversation.ConversationUpdateKind.ItemStarted => "response.output_item.added", - RealtimeConversation.ConversationUpdateKind.ItemFinished => "response.output_item.done", - RealtimeConversation.ConversationUpdateKind.ContentPartStarted => "response.content_part.added", - RealtimeConversation.ConversationUpdateKind.ContentPartFinished => "response.content_part.done", - RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta => "response.audio.delta", - RealtimeConversation.ConversationUpdateKind.ResponseAudioDone => "response.audio.done", - RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta => "response.audio_transcript.delta", - RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone => "response.audio_transcript.done", - RealtimeConversation.ConversationUpdateKind.ResponseTextDelta => "response.text.delta", - RealtimeConversation.ConversationUpdateKind.ResponseTextDone => "response.text.done", - RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta", - RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done", - RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted => "input_audio_buffer.speech_started", - RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped => "input_audio_buffer.speech_stopped", - RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted => "conversation.item.input_audio_transcription.completed", - RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed => "conversation.item.input_audio_transcription.failed", - RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted => "input_audio_buffer.committed", - RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared => "input_audio_buffer.cleared", - RealtimeConversation.ConversationUpdateKind.Error => "error", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value.") - }; - - public static RealtimeConversation.ConversationUpdateKind ToConversationUpdateKind(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.created")) - { - return RealtimeConversation.ConversationUpdateKind.SessionStarted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "session.updated")) - { - return RealtimeConversation.ConversationUpdateKind.SessionConfigured; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.created")) - { - return RealtimeConversation.ConversationUpdateKind.ItemAcknowledged; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.deleted")) - { - return RealtimeConversation.ConversationUpdateKind.ItemDeleted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.truncated")) - { - return RealtimeConversation.ConversationUpdateKind.ItemTruncated; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.created")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseStarted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.done")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseFinished; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "rate_limits.updated")) - { - return RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.added")) - { - return RealtimeConversation.ConversationUpdateKind.ItemStarted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.output_item.done")) - { - return RealtimeConversation.ConversationUpdateKind.ItemFinished; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.added")) - { - return RealtimeConversation.ConversationUpdateKind.ContentPartStarted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.content_part.done")) - { - return RealtimeConversation.ConversationUpdateKind.ContentPartFinished; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.delta")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio.done")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseAudioDone; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.delta")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.audio_transcript.done")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.delta")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseTextDelta; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.text.done")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseTextDone; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.delta")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "response.function_call_arguments.done")) - { - return RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_started")) - { - return RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.speech_stopped")) - { - return RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.completed")) - { - return RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "conversation.item.input_audio_transcription.failed")) - { - return RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.committed")) - { - return RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "input_audio_buffer.cleared")) - { - return RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) - { - return RealtimeConversation.ConversationUpdateKind.Error; - } - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ConversationUpdateKind value."); - } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs index 066418e2a..f5f1ffe09 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs @@ -63,6 +63,11 @@ public InternalCreateChatCompletionRequestModel(string value) public static InternalCreateChatCompletionRequestModel Gpt4o20240806 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4o20240806Value); public static InternalCreateChatCompletionRequestModel Gpt4o20240513 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4o20240513Value); + + public static InternalCreateChatCompletionRequestModel Gpt4oRealtimePreview { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oRealtimePreviewValue); + + public static InternalCreateChatCompletionRequestModel Gpt4oRealtimePreview20241001 { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oRealtimePreview20241001Value); + public static InternalCreateChatCompletionRequestModel Chatgpt4oLatest { get; } = new InternalCreateChatCompletionRequestModel(Chatgpt4oLatestValue); public static InternalCreateChatCompletionRequestModel Gpt4oMini { get; } = new InternalCreateChatCompletionRequestModel(Gpt4oMiniValue); diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs index d187ead8a..7c71777ad 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs @@ -13,37 +13,60 @@ namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInput2 : IJsonModel { - internal InternalRealtimeResponseIncompleteStatusDetails() + internal InternalCreateModerationRequestInput2() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); writer.WriteEndObject(); } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInput2)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.ToString()); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + } + if (_additionalBinaryDataProperties?.ContainsKey("image_url") != true) + { + writer.WritePropertyName("image_url"u8); + writer.WriteObjectValue(ImageUrl, options); + } + if (true && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } } - InternalRealtimeResponseIncompleteStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseIncompleteStatusDetails)JsonModelCreateCore(ref reader, options); + InternalCreateModerationRequestInput2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalCreateModerationRequestInput2 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInput2)} does not support reading '{format}' format."); @@ -52,25 +75,25 @@ protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref return DeserializeInternalCreateModerationRequestInput2(document.RootElement, options); } - internal static InternalRealtimeResponseIncompleteStatusDetails DeserializeInternalRealtimeResponseIncompleteStatusDetails(JsonElement element, ModelReaderWriterOptions options) + internal static InternalCreateModerationRequestInput2 DeserializeInternalCreateModerationRequestInput2(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeResponseIncompleteStatusDetailsReason reason = default; - ConversationStatus @type = default; + InternalCreateModerationRequestInput2Type @type = default; + InternalCreateModerationRequestInputImageUrl imageUrl = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("reason"u8)) + if (prop.NameEquals("type"u8)) { - reason = new InternalRealtimeResponseIncompleteStatusDetailsReason(prop.Value.GetString()); + @type = new InternalCreateModerationRequestInput2Type(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("image_url"u8)) { - @type = new ConversationStatus(prop.Value.GetString()); + imageUrl = InternalCreateModerationRequestInputImageUrl.DeserializeInternalCreateModerationRequestInputImageUrl(prop.Value, options); continue; } if (true) @@ -78,14 +101,14 @@ internal static InternalRealtimeResponseIncompleteStatusDetails DeserializeInter additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseIncompleteStatusDetails(reason, @type, additionalBinaryDataProperties); + return new InternalCreateModerationRequestInput2(@type, imageUrl, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -95,17 +118,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeResponseIncompleteStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseIncompleteStatusDetails)PersistableModelCreateCore(data, options); + InternalCreateModerationRequestInput2 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalCreateModerationRequestInput2 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, options); + return DeserializeInternalCreateModerationRequestInput2(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalCreateModerationRequestInput2)} does not support reading '{options.Format}' format."); @@ -114,20 +137,20 @@ protected override InternalRealtimeResponseStatusDetails PersistableModelCreateC string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeResponseIncompleteStatusDetails internalRealtimeResponseIncompleteStatusDetails) + public static implicit operator BinaryContent(InternalCreateModerationRequestInput2 internalCreateModerationRequestInput2) { - if (internalRealtimeResponseIncompleteStatusDetails == null) + if (internalCreateModerationRequestInput2 == null) { return null; } - return BinaryContent.Create(internalRealtimeResponseIncompleteStatusDetails, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalCreateModerationRequestInput2, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeResponseIncompleteStatusDetails(ClientResult result) + public static explicit operator InternalCreateModerationRequestInput2(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseIncompleteStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalCreateModerationRequestInput2(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs index 3fe805a1d..23f83ad9f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInput2 { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateModerationRequestInput2(InternalCreateModerationRequestInputImageUrl imageUrl) { Argument.AssertNotNull(imageUrl, nameof(imageUrl)); @@ -17,19 +19,21 @@ public InternalCreateModerationRequestInput2(InternalCreateModerationRequestInpu ImageUrl = imageUrl; } - internal InternalCreateModerationRequestInput2(InternalCreateModerationRequestInput2Type type, InternalCreateModerationRequestInputImageUrl imageUrl, IDictionary serializedAdditionalRawData) + internal InternalCreateModerationRequestInput2(InternalCreateModerationRequestInput2Type @type, InternalCreateModerationRequestInputImageUrl imageUrl, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; ImageUrl = imageUrl; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateModerationRequestInput2() - { - } + public InternalCreateModerationRequestInput2Type Type { get; } = "image_url"; - public InternalCreateModerationRequestInput2Type Type { get; } = InternalCreateModerationRequestInput2Type.ImageUrl; + public InternalCreateModerationRequestInputImageUrl ImageUrl { get; set; } - public InternalCreateModerationRequestInputImageUrl ImageUrl { get; } + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs index eb7ee4bba..25c035407 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Moderations { internal readonly partial struct InternalCreateModerationRequestInput2Type : IEquatable { private readonly string _value; + private const string ImageUrlValue = "image_url"; public InternalCreateModerationRequestInput2Type(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ImageUrlValue = "image_url"; + _value = value; + } public static InternalCreateModerationRequestInput2Type ImageUrl { get; } = new InternalCreateModerationRequestInput2Type(ImageUrlValue); + public static bool operator ==(InternalCreateModerationRequestInput2Type left, InternalCreateModerationRequestInput2Type right) => left.Equals(right); + public static bool operator !=(InternalCreateModerationRequestInput2Type left, InternalCreateModerationRequestInput2Type right) => !left.Equals(right); + public static implicit operator InternalCreateModerationRequestInput2Type(string value) => new InternalCreateModerationRequestInput2Type(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateModerationRequestInput2Type other && Equals(other); + public bool Equals(InternalCreateModerationRequestInput2Type other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs index a17661a1f..878c6f0be 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs @@ -7,33 +7,43 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInput3 : IJsonModel { + internal InternalCreateModerationRequestInput3() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInput3)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("type") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (SerializedAdditionalRawData?.ContainsKey("text") != true) + if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (SerializedAdditionalRawData != null) + if (true && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { @@ -41,7 +51,7 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +60,55 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } - InternalCreateModerationRequestInput3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateModerationRequestInput3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateModerationRequestInput3 JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInput3)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateModerationRequestInput3(document.RootElement, options); } - internal static InternalCreateModerationRequestInput3 DeserializeInternalCreateModerationRequestInput3(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateModerationRequestInput3 DeserializeInternalCreateModerationRequestInput3(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalCreateModerationRequestInput3Type type = default; + InternalCreateModerationRequestInput3Type @type = default; string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new InternalCreateModerationRequestInput3Type(property.Value.GetString()); + @type = new InternalCreateModerationRequestInput3Type(prop.Value.GetString()); continue; } - if (property.NameEquals("text"u8)) + if (prop.NameEquals("text"u8)) { - text = property.Value.GetString(); + text = prop.Value.GetString(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCreateModerationRequestInput3(type, text, serializedAdditionalRawData); + return new InternalCreateModerationRequestInput3(@type, text, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +118,16 @@ BinaryData IPersistableModel.Write(ModelR } } - InternalCreateModerationRequestInput3 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateModerationRequestInput3 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateModerationRequestInput3 PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateModerationRequestInput3(document.RootElement, options); } default: @@ -130,15 +137,20 @@ InternalCreateModerationRequestInput3 IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateModerationRequestInput3 FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateModerationRequestInput3 internalCreateModerationRequestInput3) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateModerationRequestInput3(document.RootElement); + if (internalCreateModerationRequestInput3 == null) + { + return null; + } + return BinaryContent.Create(internalCreateModerationRequestInput3, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateModerationRequestInput3(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateModerationRequestInput3(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs index e5555bc45..8a64e8ab7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInput3 { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateModerationRequestInput3(string text) { Argument.AssertNotNull(text, nameof(text)); @@ -17,19 +19,21 @@ public InternalCreateModerationRequestInput3(string text) Text = text; } - internal InternalCreateModerationRequestInput3(InternalCreateModerationRequestInput3Type type, string text, IDictionary serializedAdditionalRawData) + internal InternalCreateModerationRequestInput3(InternalCreateModerationRequestInput3Type @type, string text, IDictionary additionalBinaryDataProperties) { - Type = type; + Type = @type; Text = text; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateModerationRequestInput3() - { - } + public InternalCreateModerationRequestInput3Type Type { get; } = "text"; - public InternalCreateModerationRequestInput3Type Type { get; } = InternalCreateModerationRequestInput3Type.Text; + public string Text { get; set; } - public string Text { get; } + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs index f0cbeae9d..07634b0ce 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs @@ -4,31 +4,37 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.Moderations { internal readonly partial struct InternalCreateModerationRequestInput3Type : IEquatable { private readonly string _value; + private const string TextValue = "text"; public InternalCreateModerationRequestInput3Type(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; + _value = value; + } public static InternalCreateModerationRequestInput3Type Text { get; } = new InternalCreateModerationRequestInput3Type(TextValue); + public static bool operator ==(InternalCreateModerationRequestInput3Type left, InternalCreateModerationRequestInput3Type right) => left.Equals(right); + public static bool operator !=(InternalCreateModerationRequestInput3Type left, InternalCreateModerationRequestInput3Type right) => !left.Equals(right); + public static implicit operator InternalCreateModerationRequestInput3Type(string value) => new InternalCreateModerationRequestInput3Type(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalCreateModerationRequestInput3Type other && Equals(other); + public bool Equals(InternalCreateModerationRequestInput3Type other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs index d2281474b..b65ae8776 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs @@ -13,6 +13,10 @@ namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInputImageUrl : IJsonModel { + internal InternalCreateModerationRequestInputImageUrl() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -20,26 +24,44 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteEndObject(); } - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInputImageUrl)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Response) && _additionalBinaryDataProperties?.ContainsKey("response") != true) + if (_additionalBinaryDataProperties?.ContainsKey("url") != true) { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response, options); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (true && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } } - InternalRealtimeRequestResponseCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCreateCommand)JsonModelCreateCore(ref reader, options); + InternalCreateModerationRequestInputImageUrl IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalCreateModerationRequestInputImageUrl JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationRequestInputImageUrl)} does not support reading '{format}' format."); @@ -48,35 +70,19 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalCreateModerationRequestInputImageUrl(document.RootElement, options); } - internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternalRealtimeRequestResponseCreateCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalCreateModerationRequestInputImageUrl DeserializeInternalCreateModerationRequestInputImageUrl(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeRequestResponseCreateCommandResponse response = default; - InternalRealtimeRequestCommandType kind = default; - string eventId = default; + string url = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - response = InternalRealtimeRequestResponseCreateCommandResponse.DeserializeInternalRealtimeRequestResponseCreateCommandResponse(prop.Value, options); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("url"u8)) { - eventId = prop.Value.GetString(); + url = prop.Value.GetString(); continue; } if (true) @@ -84,14 +90,14 @@ internal static InternalRealtimeRequestResponseCreateCommand DeserializeInternal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestResponseCreateCommand(response, kind, eventId, additionalBinaryDataProperties); + return new InternalCreateModerationRequestInputImageUrl(url, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,17 +107,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestResponseCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCreateCommand)PersistableModelCreateCore(data, options); + InternalCreateModerationRequestInputImageUrl IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalCreateModerationRequestInputImageUrl PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, options); + return DeserializeInternalCreateModerationRequestInputImageUrl(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalCreateModerationRequestInputImageUrl)} does not support reading '{options.Format}' format."); @@ -120,20 +126,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommand internalRealtimeRequestResponseCreateCommand) + public static implicit operator BinaryContent(InternalCreateModerationRequestInputImageUrl internalCreateModerationRequestInputImageUrl) { - if (internalRealtimeRequestResponseCreateCommand == null) + if (internalCreateModerationRequestInputImageUrl == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestResponseCreateCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalCreateModerationRequestInputImageUrl, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestResponseCreateCommand(ClientResult result) + public static explicit operator InternalCreateModerationRequestInputImageUrl(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCreateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalCreateModerationRequestInputImageUrl(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs index c611eb77c..f293e9b84 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs @@ -4,12 +4,14 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalCreateModerationRequestInputImageUrl { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalCreateModerationRequestInputImageUrl(string url) { Argument.AssertNotNull(url, nameof(url)); @@ -17,16 +19,18 @@ public InternalCreateModerationRequestInputImageUrl(string url) Url = url; } - internal InternalCreateModerationRequestInputImageUrl(string url, IDictionary serializedAdditionalRawData) + internal InternalCreateModerationRequestInputImageUrl(string url, IDictionary additionalBinaryDataProperties) { Url = url; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateModerationRequestInputImageUrl() + public string Url { get; set; } + + internal IDictionary SerializedAdditionalRawData { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; } - - public string Url { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs index 7d8688cf4..75cb5cd51 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs @@ -11,6 +11,8 @@ namespace OpenAI.Moderations internal readonly partial struct InternalCreateModerationRequestModel : IEquatable { private readonly string _value; + private const string OmniModerationLatestValue = "omni-moderation-latest"; + private const string OmniModeration20240926Value = "omni-moderation-2024-09-26"; private const string TextModerationLatestValue = "text-moderation-latest"; private const string TextModerationStableValue = "text-moderation-stable"; @@ -21,6 +23,10 @@ public InternalCreateModerationRequestModel(string value) _value = value; } + public static InternalCreateModerationRequestModel OmniModerationLatest { get; } = new InternalCreateModerationRequestModel(OmniModerationLatestValue); + + public static InternalCreateModerationRequestModel OmniModeration20240926 { get; } = new InternalCreateModerationRequestModel(OmniModeration20240926Value); + public static InternalCreateModerationRequestModel TextModerationLatest { get; } = new InternalCreateModerationRequestModel(TextModerationLatestValue); public static InternalCreateModerationRequestModel TextModerationStable { get; } = new InternalCreateModerationRequestModel(TextModerationStableValue); diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs index 5468c79e5..7e26ddd19 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs @@ -7,153 +7,228 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.Moderations { internal partial class InternalCreateModerationResponseResultCategoryAppliedInputTypes : IJsonModel { + internal InternalCreateModerationResponseResultCategoryAppliedInputTypes() + { + } + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationResponseResultCategoryAppliedInputTypes)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("hate") != true) + if (_additionalBinaryDataProperties?.ContainsKey("hate") != true) { writer.WritePropertyName("hate"u8); writer.WriteStartArray(); - foreach (var item in Hate) + foreach (string item in Hate) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("hate/threatening") != true) + if (_additionalBinaryDataProperties?.ContainsKey("hate/threatening") != true) { writer.WritePropertyName("hate/threatening"u8); writer.WriteStartArray(); - foreach (var item in HateThreatening) + foreach (string item in HateThreatening) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("harassment") != true) + if (_additionalBinaryDataProperties?.ContainsKey("harassment") != true) { writer.WritePropertyName("harassment"u8); writer.WriteStartArray(); - foreach (var item in Harassment) + foreach (string item in Harassment) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("harassment/threatening") != true) + if (_additionalBinaryDataProperties?.ContainsKey("harassment/threatening") != true) { writer.WritePropertyName("harassment/threatening"u8); writer.WriteStartArray(); - foreach (var item in HarassmentThreatening) + foreach (string item in HarassmentThreatening) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("illicit") != true) + if (_additionalBinaryDataProperties?.ContainsKey("illicit") != true) { writer.WritePropertyName("illicit"u8); writer.WriteStartArray(); - foreach (var item in Illicit) + foreach (string item in Illicit) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("illicit/violent") != true) + if (_additionalBinaryDataProperties?.ContainsKey("illicit/violent") != true) { writer.WritePropertyName("illicit/violent"u8); writer.WriteStartArray(); - foreach (var item in IllicitViolent) + foreach (string item in IllicitViolent) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("self-harm") != true) + if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) { writer.WritePropertyName("self-harm"u8); writer.WriteStartArray(); - foreach (var item in SelfHarm) + foreach (string item in SelfHarm) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/intent") != true) + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/intent") != true) { writer.WritePropertyName("self-harm/intent"u8); writer.WriteStartArray(); - foreach (var item in SelfHarmIntent) + foreach (string item in SelfHarmIntent) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("self-harm/instructions") != true) + if (_additionalBinaryDataProperties?.ContainsKey("self-harm/instructions") != true) { writer.WritePropertyName("self-harm/instructions"u8); writer.WriteStartArray(); - foreach (var item in SelfHarmInstructions) + foreach (string item in SelfHarmInstructions) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("sexual") != true) + if (_additionalBinaryDataProperties?.ContainsKey("sexual") != true) { writer.WritePropertyName("sexual"u8); writer.WriteStartArray(); - foreach (var item in Sexual) + foreach (string item in Sexual) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("sexual/minors") != true) + if (_additionalBinaryDataProperties?.ContainsKey("sexual/minors") != true) { writer.WritePropertyName("sexual/minors"u8); writer.WriteStartArray(); - foreach (var item in SexualMinors) + foreach (string item in SexualMinors) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("violence") != true) + if (_additionalBinaryDataProperties?.ContainsKey("violence") != true) { writer.WritePropertyName("violence"u8); writer.WriteStartArray(); - foreach (var item in Violence) + foreach (string item in Violence) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData?.ContainsKey("violence/graphic") != true) + if (_additionalBinaryDataProperties?.ContainsKey("violence/graphic") != true) { writer.WritePropertyName("violence/graphic"u8); writer.WriteStartArray(); - foreach (var item in ViolenceGraphic) + foreach (string item in ViolenceGraphic) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (SerializedAdditionalRawData != null) + if (true && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { @@ -161,7 +236,7 @@ void IJsonModel } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -170,25 +245,23 @@ void IJsonModel #endif } } - writer.WriteEndObject(); } - InternalCreateModerationResponseResultCategoryAppliedInputTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalCreateModerationResponseResultCategoryAppliedInputTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalCreateModerationResponseResultCategoryAppliedInputTypes JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalCreateModerationResponseResultCategoryAppliedInputTypes)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(document.RootElement, options); } - internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -206,147 +279,235 @@ internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes IReadOnlyList sexualMinors = default; IReadOnlyList violence = default; IReadOnlyList violenceGraphic = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("hate"u8)) + if (prop.NameEquals("hate"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } hate = array; continue; } - if (property.NameEquals("hate/threatening"u8)) + if (prop.NameEquals("hate/threatening"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } hateThreatening = array; continue; } - if (property.NameEquals("harassment"u8)) + if (prop.NameEquals("harassment"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } harassment = array; continue; } - if (property.NameEquals("harassment/threatening"u8)) + if (prop.NameEquals("harassment/threatening"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } harassmentThreatening = array; continue; } - if (property.NameEquals("illicit"u8)) + if (prop.NameEquals("illicit"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } illicit = array; continue; } - if (property.NameEquals("illicit/violent"u8)) + if (prop.NameEquals("illicit/violent"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } illicitViolent = array; continue; } - if (property.NameEquals("self-harm"u8)) + if (prop.NameEquals("self-harm"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } selfHarm = array; continue; } - if (property.NameEquals("self-harm/intent"u8)) + if (prop.NameEquals("self-harm/intent"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } selfHarmIntent = array; continue; } - if (property.NameEquals("self-harm/instructions"u8)) + if (prop.NameEquals("self-harm/instructions"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } selfHarmInstructions = array; continue; } - if (property.NameEquals("sexual"u8)) + if (prop.NameEquals("sexual"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } sexual = array; continue; } - if (property.NameEquals("sexual/minors"u8)) + if (prop.NameEquals("sexual/minors"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } sexualMinors = array; continue; } - if (property.NameEquals("violence"u8)) + if (prop.NameEquals("violence"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } violence = array; continue; } - if (property.NameEquals("violence/graphic"u8)) + if (prop.NameEquals("violence/graphic"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } violenceGraphic = array; continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new InternalCreateModerationResponseResultCategoryAppliedInputTypes( hate, hateThreatening, @@ -361,13 +522,14 @@ internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes sexualMinors, violence, violenceGraphic, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -377,15 +539,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalCreateModerationResponseResultCategoryAppliedInputTypes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalCreateModerationResponseResultCategoryAppliedInputTypes PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(document.RootElement, options); } default: @@ -395,15 +558,20 @@ InternalCreateModerationResponseResultCategoryAppliedInputTypes IPersistableMode string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalCreateModerationResponseResultCategoryAppliedInputTypes internalCreateModerationResponseResultCategoryAppliedInputTypes) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(document.RootElement); + if (internalCreateModerationResponseResultCategoryAppliedInputTypes == null) + { + return null; + } + return BinaryContent.Create(internalCreateModerationResponseResultCategoryAppliedInputTypes, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalCreateModerationResponseResultCategoryAppliedInputTypes(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalCreateModerationResponseResultCategoryAppliedInputTypes(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.cs b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.cs index 8669fed80..de743bfbc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.cs @@ -10,23 +10,10 @@ namespace OpenAI.Moderations { internal partial class InternalCreateModerationResponseResultCategoryAppliedInputTypes { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalCreateModerationResponseResultCategoryAppliedInputTypes(IEnumerable hate, IEnumerable hateThreatening, IEnumerable harassment, IEnumerable harassmentThreatening, IEnumerable illicit, IEnumerable illicitViolent, IEnumerable selfHarm, IEnumerable selfHarmIntent, IEnumerable selfHarmInstructions, IEnumerable sexual, IEnumerable sexualMinors, IEnumerable violence, IEnumerable violenceGraphic) { - Argument.AssertNotNull(hate, nameof(hate)); - Argument.AssertNotNull(hateThreatening, nameof(hateThreatening)); - Argument.AssertNotNull(harassment, nameof(harassment)); - Argument.AssertNotNull(harassmentThreatening, nameof(harassmentThreatening)); - Argument.AssertNotNull(illicit, nameof(illicit)); - Argument.AssertNotNull(illicitViolent, nameof(illicitViolent)); - Argument.AssertNotNull(selfHarm, nameof(selfHarm)); - Argument.AssertNotNull(selfHarmIntent, nameof(selfHarmIntent)); - Argument.AssertNotNull(selfHarmInstructions, nameof(selfHarmInstructions)); - Argument.AssertNotNull(sexual, nameof(sexual)); - Argument.AssertNotNull(sexualMinors, nameof(sexualMinors)); - Argument.AssertNotNull(violence, nameof(violence)); - Argument.AssertNotNull(violenceGraphic, nameof(violenceGraphic)); - Hate = hate.ToList(); HateThreatening = hateThreatening.ToList(); Harassment = harassment.ToList(); @@ -42,7 +29,7 @@ internal InternalCreateModerationResponseResultCategoryAppliedInputTypes(IEnumer ViolenceGraphic = violenceGraphic.ToList(); } - internal InternalCreateModerationResponseResultCategoryAppliedInputTypes(IReadOnlyList hate, IReadOnlyList hateThreatening, IReadOnlyList harassment, IReadOnlyList harassmentThreatening, IReadOnlyList illicit, IReadOnlyList illicitViolent, IReadOnlyList selfHarm, IReadOnlyList selfHarmIntent, IReadOnlyList selfHarmInstructions, IReadOnlyList sexual, IReadOnlyList sexualMinors, IReadOnlyList violence, IReadOnlyList violenceGraphic, IDictionary serializedAdditionalRawData) + internal InternalCreateModerationResponseResultCategoryAppliedInputTypes(IReadOnlyList hate, IReadOnlyList hateThreatening, IReadOnlyList harassment, IReadOnlyList harassmentThreatening, IReadOnlyList illicit, IReadOnlyList illicitViolent, IReadOnlyList selfHarm, IReadOnlyList selfHarmIntent, IReadOnlyList selfHarmInstructions, IReadOnlyList sexual, IReadOnlyList sexualMinors, IReadOnlyList violence, IReadOnlyList violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -57,11 +44,13 @@ internal InternalCreateModerationResponseResultCategoryAppliedInputTypes(IReadOn SexualMinors = sexualMinors; Violence = violence; ViolenceGraphic = violenceGraphic; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalCreateModerationResponseResultCategoryAppliedInputTypes() + internal IDictionary SerializedAdditionalRawData { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; } } } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 8585d3d2b..f2979e342 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -51,6 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("harassment/threatening"u8); writer.WriteBooleanValue(HarassmentThreatening); } + if (_additionalBinaryDataProperties?.ContainsKey("illicit") != true) + { + writer.WritePropertyName("illicit"u8); + writer.WriteBooleanValue(Illicit); + } + if (_additionalBinaryDataProperties?.ContainsKey("illicit/violent") != true) + { + writer.WritePropertyName("illicit/violent"u8); + writer.WriteBooleanValue(IllicitViolent); + } if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) { writer.WritePropertyName("self-harm"u8); @@ -162,6 +172,16 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego harassmentThreatening = prop.Value.GetBoolean(); continue; } + if (prop.NameEquals("illicit"u8)) + { + illicit = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("illicit/violent"u8)) + { + illicitViolent = prop.Value.GetBoolean(); + continue; + } if (prop.NameEquals("self-harm"u8)) { selfHarm = prop.Value.GetBoolean(); diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.cs index 1218c79bd..a904d46e9 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.cs @@ -11,7 +11,7 @@ internal partial class InternalModerationCategories { private protected IDictionary _additionalBinaryDataProperties; - internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) + internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool illicit, bool illicitViolent, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { Hate = hate; HateThreatening = hateThreatening; @@ -28,7 +28,7 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara ViolenceGraphic = violenceGraphic; } - internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary additionalBinaryDataProperties) + internal InternalModerationCategories(bool hate, bool hateThreatening, bool harassment, bool harassmentThreatening, bool illicit, bool illicitViolent, bool selfHarm, bool selfHarmIntent, bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -53,6 +53,11 @@ internal InternalModerationCategories(bool hate, bool hateThreatening, bool hara public bool Harassment { get; } public bool HarassmentThreatening { get; } + + public bool Illicit { get; } + + public bool IllicitViolent { get; } + public bool SelfHarm { get; } public bool SelfHarmIntent { get; } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index c43e13cd5..5ce3e2fbd 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -51,6 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("harassment/threatening"u8); writer.WriteNumberValue(HarassmentThreatening); } + if (_additionalBinaryDataProperties?.ContainsKey("illicit") != true) + { + writer.WritePropertyName("illicit"u8); + writer.WriteNumberValue(Illicit); + } + if (_additionalBinaryDataProperties?.ContainsKey("illicit/violent") != true) + { + writer.WritePropertyName("illicit/violent"u8); + writer.WriteNumberValue(IllicitViolent); + } if (_additionalBinaryDataProperties?.ContainsKey("self-harm") != true) { writer.WritePropertyName("self-harm"u8); @@ -162,6 +172,16 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa harassmentThreatening = prop.Value.GetSingle(); continue; } + if (prop.NameEquals("illicit"u8)) + { + illicit = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("illicit/violent"u8)) + { + illicitViolent = prop.Value.GetSingle(); + continue; + } if (prop.NameEquals("self-harm"u8)) { selfHarm = prop.Value.GetSingle(); diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs index bf4411e82..b1b5c1ff7 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.cs @@ -11,7 +11,7 @@ internal partial class InternalModerationCategoryScores { private protected IDictionary _additionalBinaryDataProperties; - internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) + internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float illicit, float illicitViolent, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic) { Hate = hate; HateThreatening = hateThreatening; @@ -28,7 +28,7 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo ViolenceGraphic = violenceGraphic; } - internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary additionalBinaryDataProperties) + internal InternalModerationCategoryScores(float hate, float hateThreatening, float harassment, float harassmentThreatening, float illicit, float illicitViolent, float selfHarm, float selfHarmIntent, float selfHarmInstructions, float sexual, float sexualMinors, float violence, float violenceGraphic, IDictionary additionalBinaryDataProperties) { Hate = hate; HateThreatening = hateThreatening; @@ -53,6 +53,11 @@ internal InternalModerationCategoryScores(float hate, float hateThreatening, flo public float Harassment { get; } public float HarassmentThreatening { get; } + + public float Illicit { get; } + + public float IllicitViolent { get; } + public float SelfHarm { get; } public float SelfHarmIntent { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs index e4174b7e5..c2f44d8f0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs @@ -10,14 +10,14 @@ namespace OpenAI.RealtimeConversation { - [PersistableModelProxy(typeof(UnknownRealtimeRequestCommand))] - internal abstract partial class InternalRealtimeRequestCommand : IJsonModel + [PersistableModelProxy(typeof(UnknownRealtimeClientEvent))] + internal abstract partial class InternalRealtimeClientEvent : IJsonModel { - internal InternalRealtimeRequestCommand() + internal InternalRealtimeClientEvent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support writing '{format}' format."); @@ -62,11 +62,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support reading '{format}' format."); @@ -75,7 +75,7 @@ protected virtual InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Jso return DeserializeInternalRealtimeClientEvent(document.RootElement, options); } - internal static InternalRealtimeRequestCommand DeserializeInternalRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEvent DeserializeInternalRealtimeClientEvent(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -86,33 +86,33 @@ internal static InternalRealtimeRequestCommand DeserializeInternalRealtimeReques switch (discriminator.GetString()) { case "session.update": - return InternalRealtimeRequestSessionUpdateCommand.DeserializeInternalRealtimeRequestSessionUpdateCommand(element, options); + return InternalRealtimeClientEventSessionUpdate.DeserializeInternalRealtimeClientEventSessionUpdate(element, options); case "input_audio_buffer.append": - return InternalRealtimeRequestInputAudioBufferAppendCommand.DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(element, options); + return InternalRealtimeClientEventInputAudioBufferAppend.DeserializeInternalRealtimeClientEventInputAudioBufferAppend(element, options); case "input_audio_buffer.commit": - return InternalRealtimeRequestInputAudioBufferCommitCommand.DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(element, options); + return InternalRealtimeClientEventInputAudioBufferCommit.DeserializeInternalRealtimeClientEventInputAudioBufferCommit(element, options); case "input_audio_buffer.clear": - return InternalRealtimeRequestInputAudioBufferClearCommand.DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(element, options); + return InternalRealtimeClientEventInputAudioBufferClear.DeserializeInternalRealtimeClientEventInputAudioBufferClear(element, options); case "conversation.item.create": - return InternalRealtimeRequestItemCreateCommand.DeserializeInternalRealtimeRequestItemCreateCommand(element, options); - case "conversation.item.delete": - return InternalRealtimeRequestItemDeleteCommand.DeserializeInternalRealtimeRequestItemDeleteCommand(element, options); + return InternalRealtimeClientEventConversationItemCreate.DeserializeInternalRealtimeClientEventConversationItemCreate(element, options); case "conversation.item.truncate": - return InternalRealtimeRequestItemTruncateCommand.DeserializeInternalRealtimeRequestItemTruncateCommand(element, options); + return InternalRealtimeClientEventConversationItemTruncate.DeserializeInternalRealtimeClientEventConversationItemTruncate(element, options); + case "conversation.item.delete": + return InternalRealtimeClientEventConversationItemDelete.DeserializeInternalRealtimeClientEventConversationItemDelete(element, options); case "response.create": - return InternalRealtimeRequestResponseCreateCommand.DeserializeInternalRealtimeRequestResponseCreateCommand(element, options); + return InternalRealtimeClientEventResponseCreate.DeserializeInternalRealtimeClientEventResponseCreate(element, options); case "response.cancel": - return InternalRealtimeRequestResponseCancelCommand.DeserializeInternalRealtimeRequestResponseCancelCommand(element, options); + return InternalRealtimeClientEventResponseCancel.DeserializeInternalRealtimeClientEventResponseCancel(element, options); } } return UnknownRealtimeClientEvent.DeserializeUnknownRealtimeClientEvent(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,17 +122,17 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + InternalRealtimeClientEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEvent(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support reading '{options.Format}' format."); @@ -141,20 +141,20 @@ protected virtual InternalRealtimeRequestCommand PersistableModelCreateCore(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestCommand internalRealtimeRequestCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEvent internalRealtimeClientEvent) { - if (internalRealtimeRequestCommand == null) + if (internalRealtimeClientEvent == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEvent, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEvent(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEvent(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs index 8ecb5518c..c66b7a7a8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs @@ -10,20 +10,21 @@ namespace OpenAI.RealtimeConversation internal abstract partial class InternalRealtimeClientEvent { private protected IDictionary _additionalBinaryDataProperties; + private protected string _eventId; - private protected InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind) + private protected InternalRealtimeClientEvent(InternalRealtimeClientEventType kind) { Kind = kind; } - internal InternalRealtimeRequestCommand(InternalRealtimeRequestCommandType kind, string eventId, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeClientEvent(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) { Kind = kind; EventId = eventId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - internal InternalRealtimeRequestCommandType Kind { get; set; } + internal InternalRealtimeClientEventType Kind { get; set; } public string EventId { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs index 02b3e5862..24f450121 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemCreate : IJsonModel { - internal InternalRealtimeRequestItemCreateCommand() + internal InternalRealtimeClientEventConversationItemCreate() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter w protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemCreate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (Optional.IsDefined(PreviousItemId) && _additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); @@ -44,11 +49,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - InternalRealtimeRequestItemCreateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemCreateCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventConversationItemCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemCreate)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemCreate)} does not support reading '{format}' format."); @@ -57,19 +62,24 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventConversationItemCreate(document.RootElement, options); } - internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalRealtimeRequestItemCreateCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventConversationItemCreate DeserializeInternalRealtimeClientEventConversationItemCreate(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string previousItemId = default; ConversationItem item = default; - InternalRealtimeRequestCommandType kind = default; - string eventId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("previous_item_id"u8)) { previousItemId = prop.Value.GetString(); @@ -82,12 +92,7 @@ internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalReal } if (prop.NameEquals("type"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -95,14 +100,14 @@ internal static InternalRealtimeRequestItemCreateCommand DeserializeInternalReal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestItemCreateCommand(previousItemId, item, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemCreate(eventId, previousItemId, item, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,17 +117,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestItemCreateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemCreateCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventConversationItemCreate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemCreate)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventConversationItemCreate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemCreate)} does not support reading '{options.Format}' format."); @@ -131,20 +136,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestItemCreateCommand internalRealtimeRequestItemCreateCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventConversationItemCreate internalRealtimeClientEventConversationItemCreate) { - if (internalRealtimeRequestItemCreateCommand == null) + if (internalRealtimeClientEventConversationItemCreate == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestItemCreateCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventConversationItemCreate, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestItemCreateCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventConversationItemCreate(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemCreateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventConversationItemCreate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs index 7215a58ba..a6253ffc0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs @@ -4,30 +4,33 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemCreate : InternalRealtimeClientEvent { - public InternalRealtimeClientEventConversationItemCreate(ConversationItem item) + public InternalRealtimeClientEventConversationItemCreate(ConversationItem item) : base(InternalRealtimeClientEventType.ConversationItemCreate) { Argument.AssertNotNull(item, nameof(item)); - Kind = InternalRealtimeClientEventType.ConversationItemCreate; Item = item; } - internal InternalRealtimeClientEventConversationItemCreate(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, string previousItemId, ConversationItem item) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventConversationItemCreate(string eventId, string previousItemId, ConversationItem item, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { PreviousItemId = previousItemId; Item = item; } - internal InternalRealtimeClientEventConversationItemCreate() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } public string PreviousItemId { get; set; } - public ConversationItem Item { get; } + + public ConversationItem Item { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs index feee6a00f..86e3ea587 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemDelete : IJsonModel { - internal InternalRealtimeRequestSessionUpdateCommand() + internal InternalRealtimeClientEventConversationItemDelete() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,24 +26,29 @@ void IJsonModel.Write(Utf8JsonWrite protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemDelete)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("session") != true) + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); writer.WriteStringValue(ItemId); } } - InternalRealtimeRequestSessionUpdateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestSessionUpdateCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventConversationItemDelete IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemDelete)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemDelete)} does not support reading '{format}' format."); @@ -52,31 +57,31 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventConversationItemDelete(document.RootElement, options); } - internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalRealtimeRequestSessionUpdateCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventConversationItemDelete DeserializeInternalRealtimeClientEventConversationItemDelete(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - ConversationSessionOptions session = default; - InternalRealtimeRequestCommandType kind = default; string eventId = default; + string itemId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) + if (prop.NameEquals("event_id"u8)) { - session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("item_id"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -84,14 +89,14 @@ internal static InternalRealtimeRequestSessionUpdateCommand DeserializeInternalR additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestSessionUpdateCommand(session, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemDelete(eventId, itemId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,17 +106,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestSessionUpdateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestSessionUpdateCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventConversationItemDelete IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemDelete)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventConversationItemDelete(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemDelete)} does not support reading '{options.Format}' format."); @@ -120,20 +125,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestSessionUpdateCommand internalRealtimeRequestSessionUpdateCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventConversationItemDelete internalRealtimeClientEventConversationItemDelete) { - if (internalRealtimeRequestSessionUpdateCommand == null) + if (internalRealtimeClientEventConversationItemDelete == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestSessionUpdateCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventConversationItemDelete, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestSessionUpdateCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventConversationItemDelete(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestSessionUpdateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventConversationItemDelete(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs index 4a446bda4..5ab028ebe 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs @@ -4,28 +4,30 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemDelete : InternalRealtimeClientEvent { - public InternalRealtimeClientEventConversationItemDelete(string itemId) + public InternalRealtimeClientEventConversationItemDelete(string itemId) : base(InternalRealtimeClientEventType.ConversationItemDelete) { Argument.AssertNotNull(itemId, nameof(itemId)); - Kind = InternalRealtimeClientEventType.ConversationItemDelete; ItemId = itemId; } - internal InternalRealtimeClientEventConversationItemDelete(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, string itemId) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventConversationItemDelete(string eventId, string itemId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; } - internal InternalRealtimeClientEventConversationItemDelete() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } - public string ItemId { get; } + public string ItemId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs index 88210b1fd..7ab51b936 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemTruncate : IJsonModel { - internal InternalRealtimeRequestItemTruncateCommand() + internal InternalRealtimeClientEventConversationItemTruncate() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemTruncate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -49,11 +54,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - InternalRealtimeRequestItemTruncateCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemTruncateCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventConversationItemTruncate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemTruncate)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemTruncate)} does not support reading '{format}' format."); @@ -62,20 +67,25 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventConversationItemTruncate(document.RootElement, options); } - internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRealtimeRequestItemTruncateCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventConversationItemTruncate DeserializeInternalRealtimeClientEventConversationItemTruncate(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string itemId = default; int contentIndex = default; int audioEndMs = default; - InternalRealtimeRequestCommandType kind = default; - string eventId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -93,12 +103,7 @@ internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRe } if (prop.NameEquals("type"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -106,20 +111,20 @@ internal static InternalRealtimeRequestItemTruncateCommand DeserializeInternalRe additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestItemTruncateCommand( + return new InternalRealtimeClientEventConversationItemTruncate( + eventId, itemId, contentIndex, audioEndMs, kind, - eventId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -129,17 +134,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestItemTruncateCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemTruncateCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventConversationItemTruncate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventConversationItemTruncate)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventConversationItemTruncate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemTruncate)} does not support reading '{options.Format}' format."); @@ -148,20 +153,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestItemTruncateCommand internalRealtimeRequestItemTruncateCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventConversationItemTruncate internalRealtimeClientEventConversationItemTruncate) { - if (internalRealtimeRequestItemTruncateCommand == null) + if (internalRealtimeClientEventConversationItemTruncate == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestItemTruncateCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventConversationItemTruncate, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestItemTruncateCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventConversationItemTruncate(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemTruncateCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventConversationItemTruncate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs index d69ec334b..95aa597cd 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs @@ -4,34 +4,38 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventConversationItemTruncate : InternalRealtimeClientEvent { - public InternalRealtimeClientEventConversationItemTruncate(string itemId, int contentIndex, int audioEndMs) + public InternalRealtimeClientEventConversationItemTruncate(string itemId, int contentIndex, int audioEndMs) : base(InternalRealtimeClientEventType.ConversationItemTruncate) { Argument.AssertNotNull(itemId, nameof(itemId)); - Kind = InternalRealtimeClientEventType.ConversationItemTruncate; ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - internal InternalRealtimeClientEventConversationItemTruncate(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, string itemId, int contentIndex, int audioEndMs) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventConversationItemTruncate(string eventId, string itemId, int contentIndex, int audioEndMs, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - internal InternalRealtimeClientEventConversationItemTruncate() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } - public string ItemId { get; } - public int ContentIndex { get; } - public int AudioEndMs { get; } + public string ItemId { get; set; } + + public int ContentIndex { get; set; } + + public int AudioEndMs { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs index 765b04dc8..d04c79ef3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventInputAudioBufferAppend : IJsonModel { - internal InternalRealtimeRequestInputAudioBufferAppendCommand() + internal InternalRealtimeClientEventInputAudioBufferAppend() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8 protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferAppend)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("audio") != true) { writer.WritePropertyName("audio"u8); @@ -39,11 +44,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - InternalRealtimeRequestInputAudioBufferAppendCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferAppendCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventInputAudioBufferAppend IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferAppend)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferAppend)} does not support reading '{format}' format."); @@ -52,31 +57,31 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventInputAudioBufferAppend(document.RootElement, options); } - internal static InternalRealtimeRequestInputAudioBufferAppendCommand DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInternalRealtimeClientEventInputAudioBufferAppend(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - BinaryData audio = default; - InternalRealtimeRequestCommandType kind = default; string eventId = default; + BinaryData audio = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("audio"u8)) + if (prop.NameEquals("event_id"u8)) { - audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("audio"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -84,14 +89,14 @@ internal static InternalRealtimeRequestInputAudioBufferAppendCommand Deserialize additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestInputAudioBufferAppendCommand(audio, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferAppend(eventId, audio, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,17 +106,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestInputAudioBufferAppendCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferAppendCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventInputAudioBufferAppend IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferAppend)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventInputAudioBufferAppend(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferAppend)} does not support reading '{options.Format}' format."); @@ -120,20 +125,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferAppendCommand internalRealtimeRequestInputAudioBufferAppendCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventInputAudioBufferAppend internalRealtimeClientEventInputAudioBufferAppend) { - if (internalRealtimeRequestInputAudioBufferAppendCommand == null) + if (internalRealtimeClientEventInputAudioBufferAppend == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestInputAudioBufferAppendCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventInputAudioBufferAppend, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestInputAudioBufferAppendCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventInputAudioBufferAppend(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferAppendCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventInputAudioBufferAppend(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs index 908a3010d..8174c5b53 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs @@ -4,28 +4,30 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventInputAudioBufferAppend : InternalRealtimeClientEvent { - public InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio) + public InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio) : base(InternalRealtimeClientEventType.InputAudioBufferAppend) { Argument.AssertNotNull(audio, nameof(audio)); - Kind = InternalRealtimeClientEventType.InputAudioBufferAppend; Audio = audio; } - internal InternalRealtimeClientEventInputAudioBufferAppend(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, BinaryData audio) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventInputAudioBufferAppend(string eventId, BinaryData audio, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Audio = audio; } - internal InternalRealtimeClientEventInputAudioBufferAppend() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } - public BinaryData Audio { get; } + public BinaryData Audio { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs index 7a1013576..ab1a3274d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs @@ -22,19 +22,24 @@ void IJsonModel.Write(Utf8Json protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferClear)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } } - InternalRealtimeRequestInputAudioBufferClearCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferClearCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventInputAudioBufferClear IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferClear)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferClear)} does not support reading '{format}' format."); @@ -43,25 +48,25 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventInputAudioBufferClear(document.RootElement, options); } - internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventInputAudioBufferClear DeserializeInternalRealtimeClientEventInputAudioBufferClear(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeRequestCommandType kind = default; string eventId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -69,14 +74,14 @@ internal static InternalRealtimeRequestInputAudioBufferClearCommand DeserializeI additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestInputAudioBufferClearCommand(kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferClear(eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -86,17 +91,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestInputAudioBufferClearCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferClearCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventInputAudioBufferClear IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferClear)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventInputAudioBufferClear(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferClear)} does not support reading '{options.Format}' format."); @@ -105,20 +110,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferClearCommand internalRealtimeRequestInputAudioBufferClearCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventInputAudioBufferClear internalRealtimeClientEventInputAudioBufferClear) { - if (internalRealtimeRequestInputAudioBufferClearCommand == null) + if (internalRealtimeClientEventInputAudioBufferClear == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestInputAudioBufferClearCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventInputAudioBufferClear, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestInputAudioBufferClearCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventInputAudioBufferClear(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferClearCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventInputAudioBufferClear(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs index f1012e175..41a3ddf08 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs @@ -9,13 +9,18 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventInputAudioBufferClear : InternalRealtimeClientEvent { - public InternalRealtimeClientEventInputAudioBufferClear() + public InternalRealtimeClientEventInputAudioBufferClear() : base(InternalRealtimeClientEventType.InputAudioBufferClear) { - Kind = InternalRealtimeClientEventType.InputAudioBufferClear; } - internal InternalRealtimeClientEventInputAudioBufferClear(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventInputAudioBufferClear(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } + + public new string EventId + { + get => _eventId ?? default; + set => _eventId = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs index 216fbef06..b05da3bd5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs @@ -22,19 +22,24 @@ void IJsonModel.Write(Utf8Jso protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferCommit)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } } - InternalRealtimeRequestInputAudioBufferCommitCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferCommitCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventInputAudioBufferCommit IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferCommit)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferCommit)} does not support reading '{format}' format."); @@ -43,25 +48,25 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventInputAudioBufferCommit(document.RootElement, options); } - internal static InternalRealtimeRequestInputAudioBufferCommitCommand DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventInputAudioBufferCommit DeserializeInternalRealtimeClientEventInputAudioBufferCommit(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeRequestCommandType kind = default; string eventId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -69,14 +74,14 @@ internal static InternalRealtimeRequestInputAudioBufferCommitCommand Deserialize additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestInputAudioBufferCommitCommand(kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferCommit(eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -86,17 +91,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestInputAudioBufferCommitCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestInputAudioBufferCommitCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventInputAudioBufferCommit IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferCommit)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventInputAudioBufferCommit(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferCommit)} does not support reading '{options.Format}' format."); @@ -105,20 +110,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestInputAudioBufferCommitCommand internalRealtimeRequestInputAudioBufferCommitCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventInputAudioBufferCommit internalRealtimeClientEventInputAudioBufferCommit) { - if (internalRealtimeRequestInputAudioBufferCommitCommand == null) + if (internalRealtimeClientEventInputAudioBufferCommit == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestInputAudioBufferCommitCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventInputAudioBufferCommit, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestInputAudioBufferCommitCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventInputAudioBufferCommit(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestInputAudioBufferCommitCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventInputAudioBufferCommit(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs index 5cf2fe381..99dc776f6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs @@ -9,13 +9,18 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventInputAudioBufferCommit : InternalRealtimeClientEvent { - public InternalRealtimeClientEventInputAudioBufferCommit() + public InternalRealtimeClientEventInputAudioBufferCommit() : base(InternalRealtimeClientEventType.InputAudioBufferCommit) { - Kind = InternalRealtimeClientEventType.InputAudioBufferCommit; } - internal InternalRealtimeClientEventInputAudioBufferCommit(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventInputAudioBufferCommit(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } + + public new string EventId + { + get => _eventId ?? default; + set => _eventId = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs index 889b5503a..b31985ada 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs @@ -22,19 +22,24 @@ void IJsonModel.Write(Utf8JsonWriter protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCancel)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } } - InternalRealtimeRequestResponseCancelCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCancelCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventResponseCancel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventResponseCancel)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCancel)} does not support reading '{format}' format."); @@ -43,25 +48,25 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventResponseCancel(document.RootElement, options); } - internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternalRealtimeRequestResponseCancelCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventResponseCancel DeserializeInternalRealtimeClientEventResponseCancel(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeRequestCommandType kind = default; string eventId = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -69,14 +74,14 @@ internal static InternalRealtimeRequestResponseCancelCommand DeserializeInternal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestResponseCancelCommand(kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventResponseCancel(eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -86,17 +91,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestResponseCancelCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestResponseCancelCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventResponseCancel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventResponseCancel)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventResponseCancel(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCancel)} does not support reading '{options.Format}' format."); @@ -105,20 +110,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestResponseCancelCommand internalRealtimeRequestResponseCancelCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventResponseCancel internalRealtimeClientEventResponseCancel) { - if (internalRealtimeRequestResponseCancelCommand == null) + if (internalRealtimeClientEventResponseCancel == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestResponseCancelCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventResponseCancel, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestResponseCancelCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventResponseCancel(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCancelCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventResponseCancel(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs index f657c401f..1632cdeaa 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs @@ -9,13 +9,18 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventResponseCancel : InternalRealtimeClientEvent { - public InternalRealtimeClientEventResponseCancel() + public InternalRealtimeClientEventResponseCancel() : base(InternalRealtimeClientEventType.ResponseCancel) { - Kind = InternalRealtimeClientEventType.ResponseCancel; } - internal InternalRealtimeClientEventResponseCancel(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventResponseCancel(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } + + public new string EventId + { + get => _eventId ?? default; + set => _eventId = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs index 8b68bb1af..a4b7b721c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventResponseCreate : IJsonModel { - internal ConversationInputAudioBufferClearedUpdate() + internal InternalRealtimeClientEventResponseCreate() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,19 +26,29 @@ void IJsonModel.Write(Utf8JsonWriter protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("response") != true) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } } - ConversationInputAudioBufferClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioBufferClearedUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventResponseCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventResponseCreate)JsonModelCreateCore(ref reader, options); - protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreate)} does not support reading '{format}' format."); @@ -47,30 +57,31 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeClientEventResponseCreate(document.RootElement, options); } - internal static ConversationInputAudioBufferClearedUpdate DeserializeConversationInputAudioBufferClearedUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRealtimeClientEventResponseCreate(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; + InternalRealtimeClientEventResponseCreateResponse response = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } + if (prop.NameEquals("response"u8)) + { + response = InternalRealtimeClientEventResponseCreateResponse.DeserializeInternalRealtimeClientEventResponseCreateResponse(prop.Value, options); + continue; + } if (prop.NameEquals("type"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -78,14 +89,14 @@ internal static ConversationInputAudioBufferClearedUpdate DeserializeConversatio additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputAudioBufferClearedUpdate(eventId, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventResponseCreate(eventId, response, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -95,17 +106,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationInputAudioBufferClearedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationInputAudioBufferClearedUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventResponseCreate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventResponseCreate)PersistableModelCreateCore(data, options); - protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, options); + return DeserializeInternalRealtimeClientEventResponseCreate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreate)} does not support reading '{options.Format}' format."); @@ -114,20 +125,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationInputAudioBufferClearedUpdate conversationInputAudioBufferClearedUpdate) + public static implicit operator BinaryContent(InternalRealtimeClientEventResponseCreate internalRealtimeClientEventResponseCreate) { - if (conversationInputAudioBufferClearedUpdate == null) + if (internalRealtimeClientEventResponseCreate == null) { return null; } - return BinaryContent.Create(conversationInputAudioBufferClearedUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventResponseCreate, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationInputAudioBufferClearedUpdate(ClientResult result) + public static explicit operator InternalRealtimeClientEventResponseCreate(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationInputAudioBufferClearedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventResponseCreate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs index 93cdb4261..24a18ca08 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs @@ -4,28 +4,30 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventResponseCreate : InternalRealtimeClientEvent { - public InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResponseCreateResponse response) + public InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResponseCreateResponse response) : base(InternalRealtimeClientEventType.ResponseCreate) { Argument.AssertNotNull(response, nameof(response)); - Kind = InternalRealtimeClientEventType.ResponseCreate; Response = response; } - internal InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeClientEventResponseCreateResponse response) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventResponseCreate(string eventId, InternalRealtimeClientEventResponseCreateResponse response, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Response = response; } - internal InternalRealtimeClientEventResponseCreate() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } - public InternalRealtimeClientEventResponseCreateResponse Response { get; } + public InternalRealtimeClientEventResponseCreateResponse Response { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs index be99bfece..e5feb25ba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs @@ -13,11 +13,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventResponseCreateResponse : IJsonModel { - internal InternalRealtimeRequestResponseCreateCommandResponse() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,38 +22,23 @@ void IJsonModel.Write(Utf8 protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreateResponse)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("commit") != true) - { - writer.WritePropertyName("commit"u8); - writer.WriteBooleanValue(Commit); - } - if (_additionalBinaryDataProperties?.ContainsKey("cancel_previous") != true) - { - writer.WritePropertyName("cancel_previous"u8); - writer.WriteBooleanValue(CancelPrevious); - } - if (Optional.IsCollectionDefined(AppendInputItems) && _additionalBinaryDataProperties?.ContainsKey("append_input_items") != true) - { - writer.WritePropertyName("append_input_items"u8); - writer.WriteStartArray(); - foreach (ConversationItem item in AppendInputItems) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(InputItems) && _additionalBinaryDataProperties?.ContainsKey("input_items") != true) + if (Optional.IsCollectionDefined(Modalities) && _additionalBinaryDataProperties?.ContainsKey("modalities") != true) { - writer.WritePropertyName("input_items"u8); + writer.WritePropertyName("modalities"u8); writer.WriteStartArray(); - foreach (ConversationItem item in InputItems) + foreach (string item in Modalities) { - writer.WriteObjectValue(item, options); + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); } writer.WriteEndArray(); } @@ -66,44 +47,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); } - if (Optional.IsCollectionDefined(Modalities) && _additionalBinaryDataProperties?.ContainsKey("modalities") != true) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Voice) && _additionalBinaryDataProperties?.ContainsKey("voice") != true) { writer.WritePropertyName("voice"u8); writer.WriteStringValue(Voice); } - if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (Optional.IsDefined(MaxOutputTokens) && _additionalBinaryDataProperties?.ContainsKey("max_output_tokens") != true) + if (Optional.IsDefined(OutputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) { - if (MaxOutputTokens != null) - { - writer.WritePropertyName("max_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(MaxOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("maxOutputTokens"u8); - } + writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat); } if (Optional.IsCollectionDefined(Tools) && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { @@ -115,30 +67,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) + if (Optional.IsDefined(Temperature) && _additionalBinaryDataProperties?.ContainsKey("temperature") != true) { - writer.WritePropertyName("tool_choice"u8); + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(MaxOutputTokens) && _additionalBinaryDataProperties?.ContainsKey("max_output_tokens") != true) + { + writer.WritePropertyName("max_output_tokens"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); + writer.WriteRawValue(MaxOutputTokens); #else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) + using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) { JsonSerializer.Serialize(writer, document.RootElement); } #endif } - if (Optional.IsDefined(OutputAudioFormat) && _additionalBinaryDataProperties?.ContainsKey("output_audio_format") != true) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (SerializedAdditionalRawData?.ContainsKey("max_output_tokens") != true && Optional.IsDefined(MaxOutputTokens)) + if (Optional.IsDefined(ToolChoice) && _additionalBinaryDataProperties?.ContainsKey("tool_choice") != true) { - writer.WritePropertyName("max_output_tokens"u8); + writer.WritePropertyName("tool_choice"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(MaxOutputTokens); + writer.WriteRawValue(ToolChoice); #else - using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) + using (JsonDocument document = JsonDocument.Parse(ToolChoice)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -165,11 +117,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalRealtimeRequestResponseCreateCommandResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventResponseCreateResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual InternalRealtimeRequestResponseCreateCommandResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalRealtimeClientEventResponseCreateResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreateResponse)} does not support reading '{format}' format."); @@ -178,7 +130,7 @@ protected virtual InternalRealtimeRequestResponseCreateCommandResponse JsonModel return DeserializeInternalRealtimeClientEventResponseCreateResponse(document.RootElement, options); } - internal static InternalRealtimeRequestResponseCreateCommandResponse DeserializeInternalRealtimeRequestResponseCreateCommandResponse(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventResponseCreateResponse DeserializeInternalRealtimeClientEventResponseCreateResponse(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -189,75 +141,60 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize string voice = default; string outputAudioFormat = default; IList tools = default; + float? temperature = default; + BinaryData maxOutputTokens = default; BinaryData toolChoice = default; - ConversationAudioFormat? outputAudioFormat = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("commit"u8)) - { - commit = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("cancel_previous"u8)) - { - cancelPrevious = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("append_input_items"u8)) + if (prop.NameEquals("modalities"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } - appendInputItems = array; + modalities = array; continue; } - if (prop.NameEquals("input_items"u8)) + if (prop.NameEquals("instructions"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationItem.DeserializeConversationItem(item, options)); - } - inputItems = array; + instructions = prop.Value.GetString(); continue; } - if (prop.NameEquals("instructions"u8)) + if (prop.NameEquals("voice"u8)) { - instructions = prop.Value.GetString(); + voice = prop.Value.GetString(); continue; } - if (prop.NameEquals("modalities"u8)) + if (prop.NameEquals("output_audio_format"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new InternalRealtimeRequestSessionUpdateCommandSessionModality(item.GetString())); - } - modalities = array; + outputAudioFormat = prop.Value.GetString(); continue; } - if (prop.NameEquals("voice"u8)) + if (prop.NameEquals("tools"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - voice = new ConversationVoice(prop.Value.GetString()); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationTool.DeserializeConversationTool(item, options)); + } + tools = array; continue; } if (prop.NameEquals("temperature"u8)) @@ -273,26 +210,11 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize { if (prop.Value.ValueKind == JsonValueKind.Null) { - maxOutputTokens = null; continue; } maxOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (prop.NameEquals("tools"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationTool.DeserializeConversationTool(item, options)); - } - tools = array; - continue; - } if (prop.NameEquals("tool_choice"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -302,39 +224,28 @@ internal static InternalRealtimeRequestResponseCreateCommandResponse Deserialize toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (prop.NameEquals("output_audio_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputAudioFormat = new ConversationAudioFormat(prop.Value.GetString()); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestResponseCreateCommandResponse( - commit, - cancelPrevious, - appendInputItems ?? new ChangeTrackingList(), - inputItems ?? new ChangeTrackingList(), + return new InternalRealtimeClientEventResponseCreateResponse( + modalities ?? new ChangeTrackingList(), instructions, voice, outputAudioFormat, tools ?? new ChangeTrackingList(), + temperature, + maxOutputTokens, toolChoice, - outputAudioFormat, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -344,17 +255,17 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestResponseCreateCommandResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + InternalRealtimeClientEventResponseCreateResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual InternalRealtimeRequestResponseCreateCommandResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalRealtimeClientEventResponseCreateResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, options); + return DeserializeInternalRealtimeClientEventResponseCreateResponse(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreateResponse)} does not support reading '{options.Format}' format."); @@ -363,20 +274,20 @@ protected virtual InternalRealtimeRequestResponseCreateCommandResponse Persistab string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestResponseCreateCommandResponse internalRealtimeRequestResponseCreateCommandResponse) + public static implicit operator BinaryContent(InternalRealtimeClientEventResponseCreateResponse internalRealtimeClientEventResponseCreateResponse) { - if (internalRealtimeRequestResponseCreateCommandResponse == null) + if (internalRealtimeClientEventResponseCreateResponse == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestResponseCreateCommandResponse, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventResponseCreateResponse, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestResponseCreateCommandResponse(ClientResult result) + public static explicit operator InternalRealtimeClientEventResponseCreateResponse(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestResponseCreateCommandResponse(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventResponseCreateResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.cs index 8f493bd76..652404768 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.cs @@ -4,37 +4,51 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventResponseCreateResponse { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + public InternalRealtimeClientEventResponseCreateResponse() { Modalities = new ChangeTrackingList(); Tools = new ChangeTrackingList(); } - internal InternalRealtimeClientEventResponseCreateResponse(IList modalities, string instructions, string voice, string outputAudioFormat, IList tools, BinaryData toolChoice, float? temperature, BinaryData maxOutputTokens, IDictionary serializedAdditionalRawData) + internal InternalRealtimeClientEventResponseCreateResponse(IList modalities, string instructions, string voice, string outputAudioFormat, IList tools, float? temperature, BinaryData maxOutputTokens, BinaryData toolChoice, IDictionary additionalBinaryDataProperties) { Modalities = modalities; Instructions = instructions; Voice = voice; OutputAudioFormat = outputAudioFormat; Tools = tools; - ToolChoice = toolChoice; Temperature = temperature; MaxOutputTokens = maxOutputTokens; - SerializedAdditionalRawData = serializedAdditionalRawData; + ToolChoice = toolChoice; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public IList Modalities { get; } + public string Instructions { get; set; } + public string Voice { get; set; } + public string OutputAudioFormat { get; set; } + public IList Tools { get; } + public float? Temperature { get; set; } + public BinaryData MaxOutputTokens { get; set; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs index c992397c0..25de3606f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventSessionUpdate : IJsonModel { - internal InternalRealtimeRequestItemDeleteCommand() + internal InternalRealtimeClientEventSessionUpdate() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,24 +26,29 @@ void IJsonModel.Write(Utf8JsonWriter w protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventSessionUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) + if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); writer.WriteObjectValue(Session, options); } } - InternalRealtimeRequestItemDeleteCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemDeleteCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEventSessionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventSessionUpdate)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEventSessionUpdate)} does not support reading '{format}' format."); @@ -52,31 +57,31 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEventSessionUpdate(document.RootElement, options); } - internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalRealtimeRequestItemDeleteCommand(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalRealtimeClientEventSessionUpdate(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string itemId = default; - InternalRealtimeRequestCommandType kind = default; string eventId = default; + ConversationSessionOptions session = default; + InternalRealtimeClientEventType kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("session"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (true) @@ -84,14 +89,14 @@ internal static InternalRealtimeRequestItemDeleteCommand DeserializeInternalReal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestItemDeleteCommand(itemId, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventSessionUpdate(eventId, session, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -101,17 +106,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestItemDeleteCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeRequestItemDeleteCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEventSessionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeClientEventSessionUpdate)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEventSessionUpdate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEventSessionUpdate)} does not support reading '{options.Format}' format."); @@ -120,20 +125,20 @@ protected override InternalRealtimeRequestCommand PersistableModelCreateCore(Bin string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeRequestItemDeleteCommand internalRealtimeRequestItemDeleteCommand) + public static implicit operator BinaryContent(InternalRealtimeClientEventSessionUpdate internalRealtimeClientEventSessionUpdate) { - if (internalRealtimeRequestItemDeleteCommand == null) + if (internalRealtimeClientEventSessionUpdate == null) { return null; } - return BinaryContent.Create(internalRealtimeRequestItemDeleteCommand, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeClientEventSessionUpdate, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeRequestItemDeleteCommand(ClientResult result) + public static explicit operator InternalRealtimeClientEventSessionUpdate(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeRequestItemDeleteCommand(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeClientEventSessionUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs index 8951177f4..6b830fce0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs @@ -4,28 +4,30 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeClientEventSessionUpdate : InternalRealtimeClientEvent { - public InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions session) + public InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions session) : base(InternalRealtimeClientEventType.SessionUpdate) { Argument.AssertNotNull(session, nameof(session)); - Kind = InternalRealtimeClientEventType.SessionUpdate; Session = session; } - internal InternalRealtimeClientEventSessionUpdate(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData, ConversationSessionOptions session) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeClientEventSessionUpdate(string eventId, ConversationSessionOptions session, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Session = session; } - internal InternalRealtimeClientEventSessionUpdate() + public new string EventId { + get => _eventId ?? default; + set => _eventId = value; } - public ConversationSessionOptions Session { get; } + public ConversationSessionOptions Session { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs index dc56ef0ee..d9c59a719 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs @@ -4,18 +4,13 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.RealtimeConversation { internal readonly partial struct InternalRealtimeClientEventType : IEquatable { private readonly string _value; - - public InternalRealtimeClientEventType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string SessionUpdateValue = "session.update"; private const string InputAudioBufferAppendValue = "input_audio_buffer.append"; private const string InputAudioBufferCommitValue = "input_audio_buffer.commit"; @@ -26,25 +21,44 @@ public InternalRealtimeClientEventType(string value) private const string ResponseCreateValue = "response.create"; private const string ResponseCancelValue = "response.cancel"; + public InternalRealtimeClientEventType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + public static InternalRealtimeClientEventType SessionUpdate { get; } = new InternalRealtimeClientEventType(SessionUpdateValue); + public static InternalRealtimeClientEventType InputAudioBufferAppend { get; } = new InternalRealtimeClientEventType(InputAudioBufferAppendValue); + public static InternalRealtimeClientEventType InputAudioBufferCommit { get; } = new InternalRealtimeClientEventType(InputAudioBufferCommitValue); + public static InternalRealtimeClientEventType InputAudioBufferClear { get; } = new InternalRealtimeClientEventType(InputAudioBufferClearValue); + public static InternalRealtimeClientEventType ConversationItemCreate { get; } = new InternalRealtimeClientEventType(ConversationItemCreateValue); + public static InternalRealtimeClientEventType ConversationItemDelete { get; } = new InternalRealtimeClientEventType(ConversationItemDeleteValue); + public static InternalRealtimeClientEventType ConversationItemTruncate { get; } = new InternalRealtimeClientEventType(ConversationItemTruncateValue); + public static InternalRealtimeClientEventType ResponseCreate { get; } = new InternalRealtimeClientEventType(ResponseCreateValue); + public static InternalRealtimeClientEventType ResponseCancel { get; } = new InternalRealtimeClientEventType(ResponseCancelValue); + public static bool operator ==(InternalRealtimeClientEventType left, InternalRealtimeClientEventType right) => left.Equals(right); + public static bool operator !=(InternalRealtimeClientEventType left, InternalRealtimeClientEventType right) => !left.Equals(right); + public static implicit operator InternalRealtimeClientEventType(string value) => new InternalRealtimeClientEventType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRealtimeClientEventType other && Equals(other); + public bool Equals(InternalRealtimeClientEventType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs b/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs index a817e210b..d7dfda33b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs @@ -4,35 +4,43 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.RealtimeConversation { internal readonly partial struct InternalRealtimeItemType : IEquatable { private readonly string _value; + private const string MessageValue = "message"; + private const string FunctionCallValue = "function_call"; + private const string FunctionCallOutputValue = "function_call_output"; public InternalRealtimeItemType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string MessageValue = "message"; - private const string FunctionCallValue = "function_call"; - private const string FunctionCallOutputValue = "function_call_output"; + _value = value; + } public static InternalRealtimeItemType Message { get; } = new InternalRealtimeItemType(MessageValue); + public static InternalRealtimeItemType FunctionCall { get; } = new InternalRealtimeItemType(FunctionCallValue); + public static InternalRealtimeItemType FunctionCallOutput { get; } = new InternalRealtimeItemType(FunctionCallOutputValue); + public static bool operator ==(InternalRealtimeItemType left, InternalRealtimeItemType right) => left.Equals(right); + public static bool operator !=(InternalRealtimeItemType left, InternalRealtimeItemType right) => !left.Equals(right); + public static implicit operator InternalRealtimeItemType(string value) => new InternalRealtimeItemType(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRealtimeItemType other && Equals(other); + public bool Equals(InternalRealtimeItemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index 0143c3f8e..f8a1da5a0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -66,7 +66,7 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR IList content = default; ConversationMessageRole role = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -97,7 +97,7 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs index 8c669e152..a9cc2a409 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs @@ -18,7 +18,7 @@ public InternalRealtimeRequestAssistantMessageItem(IEnumerable content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestAssistantMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index e4adc1461..e37501778 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAudioContentPart : IJsonModel { - internal InternalRealtimeRequestAudioContentPart() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -32,7 +28,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestAudioContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Transcript) && _additionalBinaryDataProperties?.ContainsKey("transcript") != true) + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(InternalTranscriptValue) && _additionalBinaryDataProperties?.ContainsKey("transcript") != true) { writer.WritePropertyName("transcript"u8); writer.WriteStringValue(InternalTranscriptValue); @@ -58,20 +59,25 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt { return null; } - string type = default; - string transcript = default; - ConversationContentPartKind @type = default; + string @type = "input_audio"; + string internalTranscriptValue = default; + ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("transcript"u8)) { - transcript = prop.Value.GetString(); + internalTranscriptValue = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) { - @type = new ConversationContentPartKind(prop.Value.GetString()); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } if (true) @@ -79,7 +85,7 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestAudioContentPart(transcript, @type, additionalBinaryDataProperties); + return new InternalRealtimeRequestAudioContentPart(@type, internalTranscriptValue, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs index 1f8df7895..9d82bdfe0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs @@ -4,21 +4,18 @@ using System; using System.Collections.Generic; -using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAudioContentPart : ConversationContentPart { - public InternalRealtimeRequestAudioContentPart(ConversationContentPartKind @type) : base(@type) + public InternalRealtimeRequestAudioContentPart() : base(ConversationContentPartKind.InputAudio) { - Argument.AssertNotNull(@type, nameof(@type)); - } - internal InternalRealtimeRequestAudioContentPart(string transcript, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRealtimeRequestAudioContentPart(string @type, string internalTranscriptValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { - Type = type; + Type = @type; InternalTranscriptValue = internalTranscriptValue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index dbe82338e..36b86554c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -77,7 +77,7 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt string callId = default; string arguments = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -108,7 +108,7 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs index 07995c362..fff0d51d0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestFunctionCallItem : ConversationItem { - public InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments) : base(InternalRealtimeRequestItemType.FunctionCall) + public InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments) : base(InternalRealtimeItemType.FunctionCall) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(callId, nameof(callId)); @@ -21,7 +21,7 @@ public InternalRealtimeRequestFunctionCallItem(string name, string callId, strin Arguments = arguments; } - internal InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) { Name = name; CallId = callId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index 0ee3c0c8b..df217b297 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -65,7 +65,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna } string callId = default; string output = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -82,7 +82,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs index a965b6c72..f5bca23ae 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs @@ -10,7 +10,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestFunctionCallOutputItem : ConversationItem { - public InternalRealtimeRequestFunctionCallOutputItem(string callId, string output) : base(InternalRealtimeRequestItemType.FunctionCallOutput) + public InternalRealtimeRequestFunctionCallOutputItem(string callId, string output) : base(InternalRealtimeItemType.FunctionCallOutput) { Argument.AssertNotNull(callId, nameof(callId)); Argument.AssertNotNull(output, nameof(output)); @@ -19,7 +19,7 @@ public InternalRealtimeRequestFunctionCallOutputItem(string callId, string outpu Output = output; } - internal InternalRealtimeRequestFunctionCallOutputItem(string callId, string output, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestFunctionCallOutputItem(string callId, string output, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) { CallId = callId; Output = output; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index 06a411a74..c831ff72d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -65,7 +65,7 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe } ConversationMessageRole role = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -86,7 +86,7 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs index e1a1620da..1440e2267 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestMessageItem : ConversationItem { - public InternalRealtimeRequestMessageItem(ConversationMessageRole role) : base(InternalRealtimeRequestItemType.Message) + public InternalRealtimeRequestMessageItem(ConversationMessageRole role) : base(InternalRealtimeItemType.Message) { Role = role; } - internal InternalRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) { Role = role; Status = status; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs index c57d27eb2..66f77b66a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs @@ -4,33 +4,40 @@ using System; using System.ComponentModel; +using OpenAI; namespace OpenAI.RealtimeConversation { internal readonly partial struct InternalRealtimeRequestSessionModality : IEquatable { private readonly string _value; + private const string TextValue = "text"; + private const string AudioValue = "audio"; public InternalRealtimeRequestSessionModality(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string TextValue = "text"; - private const string AudioValue = "audio"; + _value = value; + } public static InternalRealtimeRequestSessionModality Text { get; } = new InternalRealtimeRequestSessionModality(TextValue); + public static InternalRealtimeRequestSessionModality Audio { get; } = new InternalRealtimeRequestSessionModality(AudioValue); + public static bool operator ==(InternalRealtimeRequestSessionModality left, InternalRealtimeRequestSessionModality right) => left.Equals(right); + public static bool operator !=(InternalRealtimeRequestSessionModality left, InternalRealtimeRequestSessionModality right) => !left.Equals(right); + public static implicit operator InternalRealtimeRequestSessionModality(string value) => new InternalRealtimeRequestSessionModality(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is InternalRealtimeRequestSessionModality other && Equals(other); + public bool Equals(InternalRealtimeRequestSessionModality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + public override string ToString() => _value; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index d4a9936fd..2c3f892aa 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -66,7 +66,7 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal IList content = default; ConversationMessageRole role = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -97,7 +97,7 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs index 726cf7098..454e06212 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs @@ -18,7 +18,7 @@ public InternalRealtimeRequestSystemMessageItem(IEnumerable content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestSystemMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index 207d3598d..da99cb5e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeRequestTextContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); @@ -58,20 +63,25 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti { return null; } - string type = default; - string text = default; - ConversationContentPartKind @type = default; + string @type = "input_text"; + string internalTextValue = default; + ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("text"u8)) { - text = prop.Value.GetString(); + internalTextValue = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) { - @type = new ConversationContentPartKind(prop.Value.GetString()); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } if (true) @@ -79,7 +89,7 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestTextContentPart(text, @type, additionalBinaryDataProperties); + return new InternalRealtimeRequestTextContentPart(@type, internalTextValue, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs index de0545b22..a44b5d667 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs @@ -10,20 +10,19 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestTextContentPart : ConversationContentPart { - public InternalRealtimeRequestTextContentPart(string text, ConversationContentPartKind @type) : base(@type) + public InternalRealtimeRequestTextContentPart(string internalTextValue) : base(ConversationContentPartKind.InputText) { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(@type, nameof(@type)); + Argument.AssertNotNull(internalTextValue, nameof(internalTextValue)); - Text = text; + InternalTextValue = internalTextValue; } - internal InternalRealtimeRequestTextContentPart(string text, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRealtimeRequestTextContentPart(string @type, string internalTextValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { - Type = type; + Type = @type; InternalTextValue = internalTextValue; } - public string Text { get; set; } + internal string Type { get; set; } = "input_text"; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 356daa984..48aea22d0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -66,7 +66,7 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti IList content = default; ConversationMessageRole role = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -97,7 +97,7 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs index e7c819676..4625a202f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestUserMessageItem : InternalRealtimeRequestMessageItem { - internal InternalRealtimeRequestUserMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestUserMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 5d2bbd439..51ad43ae0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -116,7 +116,7 @@ internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(Jso InternalRealtimeResponseObject @object = default; string id = default; ConversationStatus status = default; - InternalRealtimeResponseStatusDetails statusDetails = default; + ConversationStatusDetails statusDetails = default; ConversationTokenUsage usage = default; IReadOnlyList output = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -144,7 +144,7 @@ internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(Jso statusDetails = null; continue; } - statusDetails = InternalRealtimeResponseStatusDetails.DeserializeInternalRealtimeResponseStatusDetails(prop.Value, options); + statusDetails = ConversationStatusDetails.DeserializeConversationStatusDetails(prop.Value, options); continue; } if (prop.NameEquals("usage"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs index 5d6a56499..50f4a0b40 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.cs @@ -12,7 +12,7 @@ internal partial class InternalRealtimeResponse { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponse(string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IEnumerable output) + internal InternalRealtimeResponse(string id, ConversationStatus status, ConversationStatusDetails statusDetails, ConversationTokenUsage usage, IEnumerable output) { Id = id; Status = status; @@ -21,7 +21,7 @@ internal InternalRealtimeResponse(string id, ConversationStatus status, Internal Output = output.ToList(); } - internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string id, ConversationStatus status, InternalRealtimeResponseStatusDetails statusDetails, ConversationTokenUsage usage, IReadOnlyList output, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string id, ConversationStatus status, ConversationStatusDetails statusDetails, ConversationTokenUsage usage, IReadOnlyList output, IDictionary additionalBinaryDataProperties) { Object = @object; Id = id; @@ -38,7 +38,7 @@ internal InternalRealtimeResponse(InternalRealtimeResponseObject @object, string public ConversationStatus Status { get; } - public InternalRealtimeResponseStatusDetails StatusDetails { get; } + public ConversationStatusDetails StatusDetails { get; } public ConversationTokenUsage Usage { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 11cc3bfc2..6af2083e7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseAudioContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } if (_additionalBinaryDataProperties?.ContainsKey("transcript") != true) { if (InternalTranscriptValue != null) @@ -65,25 +70,30 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal { return null; } - string type = default; - string transcript = default; - ConversationContentPartKind @type = default; + string @type = "audio"; + string internalTranscriptValue = default; + ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("transcript"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { - transcript = null; + internalTranscriptValue = null; continue; } - transcript = prop.Value.GetString(); + internalTranscriptValue = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) { - @type = new ConversationContentPartKind(prop.Value.GetString()); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } if (true) @@ -91,7 +101,7 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseAudioContentPart(transcript, @type, additionalBinaryDataProperties); + return new InternalRealtimeResponseAudioContentPart(@type, internalTranscriptValue, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs index 3a689d3de..e1e459bce 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -9,15 +9,15 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseAudioContentPart : ConversationContentPart { - internal InternalRealtimeResponseAudioContentPart(string transcript, ConversationContentPartKind @type) : base(@type) + internal InternalRealtimeResponseAudioContentPart(string internalTranscriptValue) : base(ConversationContentPartKind.Audio) { - Type = type; InternalTranscriptValue = internalTranscriptValue; } - internal InternalRealtimeResponseAudioContentPart(string transcript, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRealtimeResponseAudioContentPart(string @type, string internalTranscriptValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { - Transcript = transcript; + Type = @type; + InternalTranscriptValue = internalTranscriptValue; } internal string Type { get; set; } = "audio"; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index 5972eb021..e223039de 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -78,7 +78,7 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal string arguments = default; ConversationItemStatus status = default; InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -110,7 +110,7 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs index 9355180f6..800e903b6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseFunctionCallItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, string id) : base(InternalRealtimeRequestItemType.FunctionCall, id) + internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, string id) : base(InternalRealtimeItemType.FunctionCall, id) { Name = name; CallId = callId; @@ -17,7 +17,7 @@ internal InternalRealtimeResponseFunctionCallItem(string name, string callId, st Status = status; } - internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) { Name = name; CallId = callId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index 1cac64d9d..f2d434297 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -66,7 +66,7 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern string callId = default; string output = default; InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -88,7 +88,7 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs index 051538599..d9dad611b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseFunctionCallOutputItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, string id) : base(InternalRealtimeRequestItemType.FunctionCallOutput, id) + internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, string id) : base(InternalRealtimeItemType.FunctionCallOutput, id) { CallId = callId; Output = output; } - internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) { CallId = callId; Output = output; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs index e39ba76c5..a8ed46d55 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.cs @@ -11,13 +11,13 @@ internal abstract partial class InternalRealtimeResponseItem { private protected IDictionary _additionalBinaryDataProperties; - private protected InternalRealtimeResponseItem(InternalRealtimeRequestItemType @type, string id) + private protected InternalRealtimeResponseItem(InternalRealtimeItemType @type, string id) { Type = @type; Id = id; } - internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) { Object = @object; Type = @type; @@ -27,7 +27,7 @@ internal InternalRealtimeResponseItem(InternalRealtimeResponseItemObject @object public InternalRealtimeResponseItemObject Object { get; } = "realtime.item"; - internal InternalRealtimeRequestItemType Type { get; set; } + internal InternalRealtimeItemType Type { get; set; } public string Id { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 291b170a9..43daa4565 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -77,7 +77,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR ConversationItemStatus status = default; ConversationMessageRole role = default; InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -109,7 +109,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs index d261c9306..271e67e5b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs @@ -10,14 +10,14 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseMessageItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseMessageItem(ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeRequestItemType.Message, id) + internal InternalRealtimeResponseMessageItem(ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeItemType.Message, id) { Content = new ChangeTrackingList(); Status = status; Role = role; } - internal InternalRealtimeResponseMessageItem(IReadOnlyList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseMessageItem(IReadOnlyList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) { Content = content; Status = status; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index d619e91e7..8b2c39d1c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("modalities"u8); writer.WriteStartArray(); - foreach (InternalRealtimeRequestSessionUpdateCommandSessionModality item in Modalities) + foreach (InternalRealtimeRequestSessionModality item in Modalities) { writer.WriteStringValue(item.ToString()); } @@ -182,7 +182,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo InternalRealtimeResponseSessionObject @object = default; string id = default; string model = default; - IList modalities = default; + IList modalities = default; string instructions = default; ConversationVoice voice = default; ConversationAudioFormat inputAudioFormat = default; @@ -213,7 +213,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo } if (prop.NameEquals("modalities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { array.Add(new InternalRealtimeRequestSessionModality(item.GetString())); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs index 03e30b33f..f6eb7e92a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.cs @@ -13,7 +13,7 @@ internal partial class InternalRealtimeResponseSession { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) + internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens) { Id = id; Model = model; @@ -30,7 +30,7 @@ internal InternalRealtimeResponseSession(string id, string model, IEnumerable modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IReadOnlyList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IReadOnlyList tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary additionalBinaryDataProperties) { Object = @object; Id = id; @@ -55,7 +55,7 @@ internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @ public string Model { get; } - public IList Modalities { get; } + public IList Modalities { get; } public string Instructions { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 3210996f7..69ffb7677 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -32,6 +32,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseTextContentPart)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } if (_additionalBinaryDataProperties?.ContainsKey("text") != true) { writer.WritePropertyName("text"u8); @@ -58,20 +63,25 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt { return null; } - string type = default; - string text = default; - ConversationContentPartKind @type = default; + string @type = "text"; + string internalTextValue = default; + ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("text"u8)) { - text = prop.Value.GetString(); + internalTextValue = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) { - @type = new ConversationContentPartKind(prop.Value.GetString()); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } if (true) @@ -79,7 +89,7 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseTextContentPart(text, @type, additionalBinaryDataProperties); + return new InternalRealtimeResponseTextContentPart(@type, internalTextValue, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs index 034153469..449c66ff2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -9,15 +9,15 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseTextContentPart : ConversationContentPart { - internal InternalRealtimeResponseTextContentPart(string text, ConversationContentPartKind @type) : base(@type) + internal InternalRealtimeResponseTextContentPart(string internalTextValue) : base(ConversationContentPartKind.Text) { - Type = type; InternalTextValue = internalTextValue; } - internal InternalRealtimeResponseTextContentPart(string text, ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRealtimeResponseTextContentPart(string @type, string internalTextValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) { - Text = text; + Type = @type; + InternalTextValue = internalTextValue; } internal string Type { get; set; } = "text"; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs index 5e460c109..5d4a7e91b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationCreated : IJsonModel { - internal InternalRealtimeResponseCancelledStatusDetails() + internal InternalRealtimeServerEventConversationCreated() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,24 +26,29 @@ void IJsonModel.Write(Utf8JsonWr protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreated)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("reason") != true) + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + if (_additionalBinaryDataProperties?.ContainsKey("conversation") != true) { writer.WritePropertyName("conversation"u8); writer.WriteObjectValue(Conversation, options); } } - InternalRealtimeResponseCancelledStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeResponseCancelledStatusDetails)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventConversationCreated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventConversationCreated)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreated)} does not support reading '{format}' format."); @@ -52,25 +57,31 @@ protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref return DeserializeInternalRealtimeServerEventConversationCreated(document.RootElement, options); } - internal static InternalRealtimeResponseCancelledStatusDetails DeserializeInternalRealtimeResponseCancelledStatusDetails(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventConversationCreated DeserializeInternalRealtimeServerEventConversationCreated(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeResponseCancelledStatusDetailsReason reason = default; - ConversationStatus @type = default; + string eventId = default; + InternalRealtimeServerEventConversationCreatedConversation conversation = default; + RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("reason"u8)) + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("conversation"u8)) { - reason = new InternalRealtimeResponseCancelledStatusDetailsReason(prop.Value.GetString()); + conversation = InternalRealtimeServerEventConversationCreatedConversation.DeserializeInternalRealtimeServerEventConversationCreatedConversation(prop.Value, options); continue; } if (prop.NameEquals("type"u8)) { - @type = new ConversationStatus(prop.Value.GetString()); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } if (true) @@ -78,14 +89,14 @@ internal static InternalRealtimeResponseCancelledStatusDetails DeserializeIntern additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseCancelledStatusDetails(reason, @type, additionalBinaryDataProperties); + return new InternalRealtimeServerEventConversationCreated(eventId, conversation, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -95,17 +106,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeResponseCancelledStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeResponseCancelledStatusDetails)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventConversationCreated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventConversationCreated)PersistableModelCreateCore(data, options); - protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, options); + return DeserializeInternalRealtimeServerEventConversationCreated(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreated)} does not support reading '{options.Format}' format."); @@ -114,20 +125,20 @@ protected override InternalRealtimeResponseStatusDetails PersistableModelCreateC string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeResponseCancelledStatusDetails internalRealtimeResponseCancelledStatusDetails) + public static implicit operator BinaryContent(InternalRealtimeServerEventConversationCreated internalRealtimeServerEventConversationCreated) { - if (internalRealtimeResponseCancelledStatusDetails == null) + if (internalRealtimeServerEventConversationCreated == null) { return null; } - return BinaryContent.Create(internalRealtimeResponseCancelledStatusDetails, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventConversationCreated, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeResponseCancelledStatusDetails(ClientResult result) + public static explicit operator InternalRealtimeServerEventConversationCreated(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseCancelledStatusDetails(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventConversationCreated(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs index f992de4a3..ebd22cc9d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs @@ -9,23 +9,17 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationCreated : ConversationUpdate { - internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(eventId) + internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(eventId, RealtimeConversation.ConversationUpdateKind.ConversationCreated) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(conversation, nameof(conversation)); - - Kind = ConversationUpdateKind.ConversationCreated; Conversation = conversation; } - internal InternalRealtimeServerEventConversationCreated(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { Conversation = conversation; } - internal InternalRealtimeServerEventConversationCreated() - { - } + public new string EventId => _eventId ?? default; public InternalRealtimeServerEventConversationCreatedConversation Conversation { get; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs index b818ebd70..8ece57ae1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using OpenAI; namespace OpenAI.RealtimeConversation { @@ -14,26 +15,31 @@ internal partial class InternalRealtimeServerEventConversationCreatedConversatio { void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreatedConversation)} does not support writing '{format}' format."); } - - writer.WriteStartObject(); - if (SerializedAdditionalRawData?.ContainsKey("id") != true && Optional.IsDefined(Id)) + if (Optional.IsDefined(Id) && _additionalBinaryDataProperties?.ContainsKey("id") != true) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (SerializedAdditionalRawData?.ContainsKey("object") != true && Optional.IsDefined(Object)) + if (Optional.IsDefined(Object) && _additionalBinaryDataProperties?.ContainsKey("object") != true) { writer.WritePropertyName("object"u8); writer.WriteStringValue(Object); } - if (SerializedAdditionalRawData != null) + if (true && _additionalBinaryDataProperties != null) { - foreach (var item in SerializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { if (ModelSerializationExtensions.IsSentinelValue(item.Value)) { @@ -41,7 +47,7 @@ void IJsonModel.Writ } writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else using (JsonDocument document = JsonDocument.Parse(item.Value)) { @@ -50,59 +56,55 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } - InternalRealtimeServerEventConversationCreatedConversation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InternalRealtimeServerEventConversationCreatedConversation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual InternalRealtimeServerEventConversationCreatedConversation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreatedConversation)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeInternalRealtimeServerEventConversationCreatedConversation(document.RootElement, options); } - internal static InternalRealtimeServerEventConversationCreatedConversation DeserializeInternalRealtimeServerEventConversationCreatedConversation(JsonElement element, ModelReaderWriterOptions options = null) + internal static InternalRealtimeServerEventConversationCreatedConversation DeserializeInternalRealtimeServerEventConversationCreatedConversation(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string id = default; string @object = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("object"u8)) + if (prop.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = prop.Value.GetString(); continue; } if (true) { - rawDataDictionary ??= new Dictionary(); - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRealtimeServerEventConversationCreatedConversation(id, @object, serializedAdditionalRawData); + return new InternalRealtimeServerEventConversationCreatedConversation(id, @object, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +114,16 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + InternalRealtimeServerEventConversationCreatedConversation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + protected virtual InternalRealtimeServerEventConversationCreatedConversation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data); return DeserializeInternalRealtimeServerEventConversationCreatedConversation(document.RootElement, options); } default: @@ -130,15 +133,20 @@ InternalRealtimeServerEventConversationCreatedConversation IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - internal static InternalRealtimeServerEventConversationCreatedConversation FromResponse(PipelineResponse response) + public static implicit operator BinaryContent(InternalRealtimeServerEventConversationCreatedConversation internalRealtimeServerEventConversationCreatedConversation) { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeServerEventConversationCreatedConversation(document.RootElement); + if (internalRealtimeServerEventConversationCreatedConversation == null) + { + return null; + } + return BinaryContent.Create(internalRealtimeServerEventConversationCreatedConversation, ModelSerializationExtensions.WireOptions); } - internal virtual BinaryContent ToBinaryContent() + public static explicit operator InternalRealtimeServerEventConversationCreatedConversation(ClientResult result) { - return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeInternalRealtimeServerEventConversationCreatedConversation(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.cs index 519df281e..53ad76b45 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.cs @@ -9,19 +9,27 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationCreatedConversation { - internal IDictionary SerializedAdditionalRawData { get; set; } + private protected IDictionary _additionalBinaryDataProperties; + internal InternalRealtimeServerEventConversationCreatedConversation() { } - internal InternalRealtimeServerEventConversationCreatedConversation(string id, string @object, IDictionary serializedAdditionalRawData) + internal InternalRealtimeServerEventConversationCreatedConversation(string id, string @object, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; - SerializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } public string Id { get; } + public string Object { get; } + + internal IDictionary SerializedAdditionalRawData + { + get => _additionalBinaryDataProperties; + set => _additionalBinaryDataProperties = value; + } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs index 1ea06db10..be0d12086 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs @@ -13,11 +13,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError : IJsonModel { - internal InternalRealtimeResponseApiError() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +22,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + if (Optional.IsDefined(Type) && _additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); @@ -41,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + if (Optional.IsDefined(Message) && _additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); @@ -72,11 +68,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalRealtimeResponseApiError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual InternalRealtimeResponseApiError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError)} does not support reading '{format}' format."); @@ -85,7 +81,7 @@ protected virtual InternalRealtimeResponseApiError JsonModelCreateCore(ref Utf8J return DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(document.RootElement, options); } - internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResponseApiError(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -123,14 +119,14 @@ internal static InternalRealtimeResponseApiError DeserializeInternalRealtimeResp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseApiError(@type, code, message, @param, additionalBinaryDataProperties); + return new InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(@type, code, message, @param, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -140,17 +136,17 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeResponseApiError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual InternalRealtimeResponseApiError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeResponseApiError(document.RootElement, options); + return DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError)} does not support reading '{options.Format}' format."); @@ -159,20 +155,20 @@ protected virtual InternalRealtimeResponseApiError PersistableModelCreateCore(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeResponseApiError internalRealtimeResponseApiError) + public static implicit operator BinaryContent(InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError internalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError) { - if (internalRealtimeResponseApiError == null) + if (internalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError == null) { return null; } - return BinaryContent.Create(internalRealtimeResponseApiError, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeResponseApiError(ClientResult result) + public static explicit operator InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseApiError(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.cs index 82209ef8a..f760303d7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.cs @@ -11,13 +11,11 @@ internal partial class InternalRealtimeServerEventConversationItemInputAudioTran { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponseApiError(string @type, string message) + internal InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError() { - Type = @type; - Message = message; } - internal InternalRealtimeResponseApiError(string @type, string code, string message, string @param, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(string @type, string code, string message, string @param, IDictionary additionalBinaryDataProperties) { Type = @type; Code = code; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs index 7018c9d30..b9180e740 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs @@ -13,11 +13,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventErrorError : IJsonModel { - internal InternalRealtimeResponseError() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +22,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventErrorError)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("type") != true) + if (Optional.IsDefined(Type) && _additionalBinaryDataProperties?.ContainsKey("type") != true) { writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); @@ -41,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } - if (_additionalBinaryDataProperties?.ContainsKey("message") != true) + if (Optional.IsDefined(Message) && _additionalBinaryDataProperties?.ContainsKey("message") != true) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); @@ -77,11 +73,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalRealtimeResponseError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventErrorError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - protected virtual InternalRealtimeResponseError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual InternalRealtimeServerEventErrorError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventErrorError)} does not support reading '{format}' format."); @@ -90,7 +86,7 @@ protected virtual InternalRealtimeResponseError JsonModelCreateCore(ref Utf8Json return DeserializeInternalRealtimeServerEventErrorError(document.RootElement, options); } - internal static InternalRealtimeResponseError DeserializeInternalRealtimeResponseError(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventErrorError DeserializeInternalRealtimeServerEventErrorError(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -134,7 +130,7 @@ internal static InternalRealtimeResponseError DeserializeInternalRealtimeRespons additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseError( + return new InternalRealtimeServerEventErrorError( @type, code, message, @@ -143,11 +139,11 @@ internal static InternalRealtimeResponseError DeserializeInternalRealtimeRespons additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -157,17 +153,17 @@ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeResponseError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + InternalRealtimeServerEventErrorError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - protected virtual InternalRealtimeResponseError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual InternalRealtimeServerEventErrorError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeResponseError(document.RootElement, options); + return DeserializeInternalRealtimeServerEventErrorError(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventErrorError)} does not support reading '{options.Format}' format."); @@ -176,20 +172,20 @@ protected virtual InternalRealtimeResponseError PersistableModelCreateCore(Binar string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(InternalRealtimeResponseError internalRealtimeResponseError) + public static implicit operator BinaryContent(InternalRealtimeServerEventErrorError internalRealtimeServerEventErrorError) { - if (internalRealtimeResponseError == null) + if (internalRealtimeServerEventErrorError == null) { return null; } - return BinaryContent.Create(internalRealtimeResponseError, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventErrorError, ModelSerializationExtensions.WireOptions); } - public static explicit operator InternalRealtimeResponseError(ClientResult result) + public static explicit operator InternalRealtimeServerEventErrorError(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeInternalRealtimeResponseError(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventErrorError(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.cs index 66373a0a3..41498342f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.cs @@ -11,13 +11,11 @@ internal partial class InternalRealtimeServerEventErrorError { private protected IDictionary _additionalBinaryDataProperties; - internal InternalRealtimeResponseError(string @type, string message) + internal InternalRealtimeServerEventErrorError() { - Type = @type; - Message = message; } - internal InternalRealtimeResponseError(string @type, string code, string message, string @param, string eventId, IDictionary additionalBinaryDataProperties) + internal InternalRealtimeServerEventErrorError(string @type, string code, string message, string @param, string eventId, IDictionary additionalBinaryDataProperties) { Type = @type; Code = code; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs index b949dec77..0ba562716 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioDelta : IJsonModel { - internal ConversationAudioDeltaUpdate() + internal InternalRealtimeServerEventResponseAudioDelta() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationAudioDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationAudioDeltaUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseAudioDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseAudioDelta)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioDelta)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseAudioDelta(document.RootElement, options); } - internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInternalRealtimeServerEventResponseAudioDelta(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; BinaryData delta = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUp delta = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationAudioDeltaUpdate DeserializeConversationAudioDeltaUp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationAudioDeltaUpdate( + return new InternalRealtimeServerEventResponseAudioDelta( + eventId, responseId, itemId, outputIndex, contentIndex, delta, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationAudioDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationAudioDeltaUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseAudioDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseAudioDelta)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationAudioDeltaUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseAudioDelta(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioDelta)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationAudioDeltaUpdate conversationAudioDeltaUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseAudioDelta internalRealtimeServerEventResponseAudioDelta) { - if (conversationAudioDeltaUpdate == null) + if (internalRealtimeServerEventResponseAudioDelta == null) { return null; } - return BinaryContent.Create(conversationAudioDeltaUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseAudioDelta, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationAudioDeltaUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseAudioDelta(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationAudioDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseAudioDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs index f67a7f45a..cab145b96 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioDelta : ConversationUpdate { - internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone) + internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,14 +18,17 @@ internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string Delta = delta; } - internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; ContentIndex = contentIndex; + Delta = delta; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } @@ -33,6 +36,7 @@ internal ConversationOutputTranscriptionFinishedUpdate(string responseId, string public int OutputIndex { get; } public int ContentIndex { get; } + public BinaryData Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs index d0f00292a..8b18e5b7e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioTranscriptDelta : IJsonModel { - internal ConversationOutputTranscriptionDeltaUpdate() + internal InternalRealtimeServerEventResponseAudioTranscriptDelta() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioTranscriptDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationOutputTranscriptionDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionDeltaUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseAudioTranscriptDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseAudioTranscriptDelta)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioTranscriptDelta)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseAudioTranscriptDelta(document.RootElement, options); } - internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversationOutputTranscriptionDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseAudioTranscriptDelta DeserializeInternalRealtimeServerEventResponseAudioTranscriptDelta(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversati delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationOutputTranscriptionDeltaUpdate DeserializeConversati additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationOutputTranscriptionDeltaUpdate( + return new InternalRealtimeServerEventResponseAudioTranscriptDelta( + eventId, responseId, itemId, outputIndex, contentIndex, delta, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationOutputTranscriptionDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationOutputTranscriptionDeltaUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseAudioTranscriptDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseAudioTranscriptDelta)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseAudioTranscriptDelta(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioTranscriptDelta)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationOutputTranscriptionDeltaUpdate conversationOutputTranscriptionDeltaUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseAudioTranscriptDelta internalRealtimeServerEventResponseAudioTranscriptDelta) { - if (conversationOutputTranscriptionDeltaUpdate == null) + if (internalRealtimeServerEventResponseAudioTranscriptDelta == null) { return null; } - return BinaryContent.Create(conversationOutputTranscriptionDeltaUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseAudioTranscriptDelta, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationOutputTranscriptionDeltaUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseAudioTranscriptDelta(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationOutputTranscriptionDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseAudioTranscriptDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs index 8affd19de..1ae27239f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioTranscriptDelta : ConversationUpdate { - internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string it Delta = delta; } - internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,6 +27,8 @@ internal ConversationOutputTranscriptionDeltaUpdate(string responseId, string it Delta = delta; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs index 707b9e679..acb572137 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartAdded : IJsonModel { - internal ConversationContentPartStartedUpdate() + internal InternalRealtimeServerEventResponseContentPartAdded() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter write protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartAdded)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationContentPartStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseContentPartAdded IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseContentPartAdded)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartAdded)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseContentPartAdded(document.RootElement, options); } - internal static ConversationContentPartStartedUpdate DeserializeConversationContentPartStartedUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeInternalRealtimeServerEventResponseContentPartAdded(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationContentPartStartedUpdate DeserializeConversationCont additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationContentPartStartedUpdate( + return new InternalRealtimeServerEventResponseContentPartAdded( + eventId, responseId, itemId, outputIndex, contentIndex, internalContentPart, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationContentPartStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationContentPartStartedUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseContentPartAdded IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseContentPartAdded)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationContentPartStartedUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseContentPartAdded(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartAdded)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationContentPartStartedUpdate conversationContentPartStartedUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseContentPartAdded internalRealtimeServerEventResponseContentPartAdded) { - if (conversationContentPartStartedUpdate == null) + if (internalRealtimeServerEventResponseContentPartAdded == null) { return null; } - return BinaryContent.Create(conversationContentPartStartedUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseContentPartAdded, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationContentPartStartedUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseContentPartAdded(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationContentPartStartedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseContentPartAdded(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs index 919e81a7b..6804a05a7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartAdded : ConversationUpdate { - internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ContentPartStarted) + internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartStarted) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationContentPartStartedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } - internal ConversationContentPartStartedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,6 +27,8 @@ internal ConversationContentPartStartedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs index b9c8eb41f..a29241641 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartDone : IJsonModel { - internal ConversationContentPartFinishedUpdate() + internal InternalRealtimeServerEventResponseContentPartDone() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter writ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartDone)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationContentPartFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseContentPartDone IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseContentPartDone)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartDone)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseContentPartDone(document.RootElement, options); } - internal static ConversationContentPartFinishedUpdate DeserializeConversationContentPartFinishedUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseContentPartDone DeserializeInternalRealtimeServerEventResponseContentPartDone(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationContentPartFinishedUpdate DeserializeConversationCon additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationContentPartFinishedUpdate( + return new InternalRealtimeServerEventResponseContentPartDone( + eventId, responseId, itemId, outputIndex, contentIndex, internalContentPart, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationContentPartFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationContentPartFinishedUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseContentPartDone IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseContentPartDone)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationContentPartFinishedUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseContentPartDone(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartDone)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationContentPartFinishedUpdate conversationContentPartFinishedUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseContentPartDone internalRealtimeServerEventResponseContentPartDone) { - if (conversationContentPartFinishedUpdate == null) + if (internalRealtimeServerEventResponseContentPartDone == null) { return null; } - return BinaryContent.Create(conversationContentPartFinishedUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseContentPartDone, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationContentPartFinishedUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseContentPartDone(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationContentPartFinishedUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseContentPartDone(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs index c5d031b36..8b4316734 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartDone : ConversationUpdate { - internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ContentPartFinished) + internal InternalRealtimeServerEventResponseContentPartDone(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationContentPartFinishedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } - internal ConversationContentPartFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartDone(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,6 +27,8 @@ internal ConversationContentPartFinishedUpdate(string responseId, string itemId, _internalContentPart = internalContentPart; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs index 6ac039550..a052eaa99 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDelta : IJsonModel { - internal ConversationFunctionCallArgumentsDeltaUpdate() + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWrit protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationFunctionCallArgumentsDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDeltaUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseFunctionCallArgumentsDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDelta(document.RootElement, options); } - internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversationFunctionCallArgumentsDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDelta(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string delta = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversa delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationFunctionCallArgumentsDeltaUpdate DeserializeConversa additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationFunctionCallArgumentsDeltaUpdate( + return new InternalRealtimeServerEventResponseFunctionCallArgumentsDelta( + eventId, responseId, itemId, outputIndex, callId, delta, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationFunctionCallArgumentsDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDeltaUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseFunctionCallArgumentsDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDelta(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDeltaUpdate conversationFunctionCallArgumentsDeltaUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseFunctionCallArgumentsDelta internalRealtimeServerEventResponseFunctionCallArgumentsDelta) { - if (conversationFunctionCallArgumentsDeltaUpdate == null) + if (internalRealtimeServerEventResponseFunctionCallArgumentsDelta == null) { return null; } - return BinaryContent.Create(conversationFunctionCallArgumentsDeltaUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseFunctionCallArgumentsDelta, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationFunctionCallArgumentsDeltaUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationFunctionCallArgumentsDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs index 1f5315514..5bc1247f3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs @@ -9,15 +9,8 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta) { - Argument.AssertNotNull(eventId, nameof(eventId)); - Argument.AssertNotNull(responseId, nameof(responseId)); - Argument.AssertNotNull(itemId, nameof(itemId)); - Argument.AssertNotNull(callId, nameof(callId)); - Argument.AssertNotNull(delta, nameof(delta)); - - Kind = ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta; ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; @@ -25,7 +18,7 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string ev Delta = delta; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData, string responseId, string itemId, int outputIndex, string callId, string delta) : base(kind, eventId, serializedAdditionalRawData) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -34,14 +27,16 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(Conversat Delta = delta; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta() - { - } + public new string EventId => _eventId ?? default; public string ResponseId { get; } + public string ItemId { get; } + public int OutputIndex { get; } + public string CallId { get; } + public string Delta { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs index c49ee294e..6e3eba5b7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDone : IJsonModel { - internal ConversationFunctionCallArgumentsDoneUpdate() + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWrite protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDone)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -52,11 +57,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("call_id"u8); writer.WriteStringValue(CallId); } - if (_additionalBinaryDataProperties?.ContainsKey("name") != true) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } if (_additionalBinaryDataProperties?.ContainsKey("arguments") != true) { writer.WritePropertyName("arguments"u8); @@ -64,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationFunctionCallArgumentsDoneUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDoneUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseFunctionCallArgumentsDone IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseFunctionCallArgumentsDone)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDone)} does not support reading '{format}' format."); @@ -77,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDone(document.RootElement, options); } - internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversationFunctionCallArgumentsDoneUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDone(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string arguments = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,26 +118,11 @@ internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversat callId = prop.Value.GetString(); continue; } - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } if (prop.NameEquals("arguments"u8)) { arguments = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -143,23 +133,22 @@ internal static ConversationFunctionCallArgumentsDoneUpdate DeserializeConversat additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationFunctionCallArgumentsDoneUpdate( + return new InternalRealtimeServerEventResponseFunctionCallArgumentsDone( + eventId, responseId, itemId, outputIndex, callId, - name, arguments, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -169,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationFunctionCallArgumentsDoneUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationFunctionCallArgumentsDoneUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseFunctionCallArgumentsDone IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseFunctionCallArgumentsDone)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDone(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDone)} does not support reading '{options.Format}' format."); @@ -188,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationFunctionCallArgumentsDoneUpdate conversationFunctionCallArgumentsDoneUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseFunctionCallArgumentsDone internalRealtimeServerEventResponseFunctionCallArgumentsDone) { - if (conversationFunctionCallArgumentsDoneUpdate == null) + if (internalRealtimeServerEventResponseFunctionCallArgumentsDone == null) { return null; } - return BinaryContent.Create(conversationFunctionCallArgumentsDoneUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseFunctionCallArgumentsDone, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationFunctionCallArgumentsDoneUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseFunctionCallArgumentsDone(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationFunctionCallArgumentsDoneUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseFunctionCallArgumentsDone(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs index b3101a595..ddd4102ec 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDone : ConversationUpdate { - internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, string responseId, string itemId, int outputIndex, string callId, string arguments) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,16 +18,17 @@ internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string i Arguments = arguments; } - internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string itemId, int outputIndex, string callId, string name, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, string responseId, string itemId, int outputIndex, string callId, string arguments, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; CallId = callId; - Name = name; Arguments = arguments; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } @@ -36,8 +37,6 @@ internal ConversationFunctionCallArgumentsDoneUpdate(string responseId, string i public string CallId { get; } - public string Name { get; } - public string Arguments { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs index b58891c82..fd2b05800 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs @@ -13,11 +13,11 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseTextDelta : IJsonModel { - internal ConversationTextDeltaUpdate() + internal InternalRealtimeServerEventResponseTextDelta() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,12 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseTextDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -59,11 +64,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationTextDeltaUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationTextDeltaUpdate)JsonModelCreateCore(ref reader, options); + InternalRealtimeServerEventResponseTextDelta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseTextDelta)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseTextDelta)} does not support reading '{format}' format."); @@ -72,22 +77,27 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea return DeserializeInternalRealtimeServerEventResponseTextDelta(document.RootElement, options); } - internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpdate(JsonElement element, ModelReaderWriterOptions options) + internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternalRealtimeServerEventResponseTextDelta(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } + string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; - string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,16 +123,6 @@ internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpda delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -133,22 +133,22 @@ internal static ConversationTextDeltaUpdate DeserializeConversationTextDeltaUpda additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationTextDeltaUpdate( + return new InternalRealtimeServerEventResponseTextDelta( + eventId, responseId, itemId, outputIndex, contentIndex, delta, - eventId, kind, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,17 +158,17 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationTextDeltaUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ConversationTextDeltaUpdate)PersistableModelCreateCore(data, options); + InternalRealtimeServerEventResponseTextDelta IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalRealtimeServerEventResponseTextDelta)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationTextDeltaUpdate(document.RootElement, options); + return DeserializeInternalRealtimeServerEventResponseTextDelta(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseTextDelta)} does not support reading '{options.Format}' format."); @@ -177,20 +177,20 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - public static implicit operator BinaryContent(ConversationTextDeltaUpdate conversationTextDeltaUpdate) + public static implicit operator BinaryContent(InternalRealtimeServerEventResponseTextDelta internalRealtimeServerEventResponseTextDelta) { - if (conversationTextDeltaUpdate == null) + if (internalRealtimeServerEventResponseTextDelta == null) { return null; } - return BinaryContent.Create(conversationTextDeltaUpdate, ModelSerializationExtensions.WireOptions); + return BinaryContent.Create(internalRealtimeServerEventResponseTextDelta, ModelSerializationExtensions.WireOptions); } - public static explicit operator ConversationTextDeltaUpdate(ClientResult result) + public static explicit operator InternalRealtimeServerEventResponseTextDelta(ClientResult result) { using PipelineResponse response = result.GetRawResponse(); using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeConversationTextDeltaUpdate(document.RootElement, ModelSerializationExtensions.WireOptions); + return DeserializeInternalRealtimeServerEventResponseTextDelta(document.RootElement, ModelSerializationExtensions.WireOptions); } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs index 76d8ed23f..f3a773211 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseTextDelta : ConversationUpdate { - internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta) + internal InternalRealtimeServerEventResponseTextDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,22 +18,24 @@ internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string Delta = delta; } - internal ConversationFunctionCallArgumentsDeltaUpdate(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseTextDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; OutputIndex = outputIndex; - CallId = callId; + ContentIndex = contentIndex; Delta = delta; } + public new string EventId => _eventId ?? default; + public string ResponseId { get; } public string ItemId { get; } public int OutputIndex { get; } - public string CallId { get; } + public int ContentIndex { get; } public string Delta { get; } } diff --git a/.dotnet/src/Generated/Models/ModerationApplicableInputKinds.Serialization.cs b/.dotnet/src/Generated/Models/ModerationApplicableInputKinds.Serialization.cs index a098947a7..7c0c4efc2 100644 --- a/.dotnet/src/Generated/Models/ModerationApplicableInputKinds.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationApplicableInputKinds.Serialization.cs @@ -2,8 +2,6 @@ #nullable disable -using System; - namespace OpenAI.Moderations { internal static partial class ModerationApplicableInputKindsExtensions diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs index 007f42902..0094dc685 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs @@ -12,11 +12,11 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeClientEvent : IJsonModel { - internal UnknownRealtimeRequestCommand() + internal UnknownRealtimeClientEvent() { } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -25,7 +25,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support writing '{format}' format."); @@ -33,11 +33,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRealtimeRequestCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeRequestCommand)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeClientEvent)JsonModelCreateCore(ref reader, options); - protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support reading '{format}' format."); @@ -46,20 +46,20 @@ protected override InternalRealtimeRequestCommand JsonModelCreateCore(ref Utf8Js return DeserializeInternalRealtimeClientEvent(document.RootElement, options); } - internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestCommand(JsonElement element, ModelReaderWriterOptions options) + internal static UnknownRealtimeClientEvent DeserializeUnknownRealtimeClientEvent(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - InternalRealtimeRequestCommandType kind = default; + InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - kind = new InternalRealtimeRequestCommandType(prop.Value.GetString()); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } if (prop.NameEquals("event_id"u8)) @@ -72,14 +72,14 @@ internal static UnknownRealtimeRequestCommand DeserializeUnknownRealtimeRequestC additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UnknownRealtimeRequestCommand(kind, eventId, additionalBinaryDataProperties); + return new UnknownRealtimeClientEvent(kind, eventId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -89,23 +89,23 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeRequestCommand IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeRequestCommand)PersistableModelCreateCore(data, options); + InternalRealtimeClientEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeClientEvent)PersistableModelCreateCore(data, options); - protected override InternalRealtimeRequestCommand PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeInternalRealtimeRequestCommand(document.RootElement, options); + return DeserializeInternalRealtimeClientEvent(document.RootElement, options); } default: throw new FormatException($"The model {nameof(InternalRealtimeClientEvent)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.cs b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.cs index 7c89c1f34..9dc2bb8e5 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.cs @@ -9,11 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeClientEvent : InternalRealtimeClientEvent { - internal UnknownRealtimeClientEvent(InternalRealtimeClientEventType kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeClientEvent() + internal UnknownRealtimeClientEvent(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind != default ? kind : "unknown", eventId, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs index 482fea606..b9fea3699 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -52,13 +52,13 @@ internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart { return null; } - ConversationContentPartKind @type = default; + ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = new ConversationContentPartKind(prop.Value.GetString()); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } if (true) @@ -66,7 +66,7 @@ internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UnknownRealtimeContentPart(@type, additionalBinaryDataProperties); + return new UnknownRealtimeContentPart(kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs index d3fb6ec7f..a46fcddcf 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeContentPart : ConversationContentPart { - internal UnknownRealtimeContentPart(ConversationContentPartKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal UnknownRealtimeContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind != default ? kind : "unknown", additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index cd552f19a..9cd54657d 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -52,14 +52,14 @@ internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem { return null; } - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs index ec27f2635..eceb1f9cd 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeRequestItem : ConversationItem { - internal UnknownRealtimeRequestItem(InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", id, additionalBinaryDataProperties) + internal UnknownRealtimeRequestItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", id, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index e9bebf3e2..9fbb40a4e 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -55,7 +55,7 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ } ConversationMessageRole role = default; ConversationItemStatus? status = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -76,7 +76,7 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs index 7e4bdfe02..843ec3e43 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs @@ -10,7 +10,7 @@ namespace OpenAI.Models { internal partial class UnknownRealtimeRequestMessageItem : InternalRealtimeRequestMessageItem { - internal UnknownRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role != default ? role : "unknown", status, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) + internal UnknownRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role != default ? role : "unknown", status, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs index 29325daaa..601e0259c 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -53,7 +53,7 @@ internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseIt return null; } InternalRealtimeResponseItemObject @object = default; - InternalRealtimeRequestItemType @type = default; + InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -65,7 +65,7 @@ internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseIt } if (prop.NameEquals("type"u8)) { - @type = new InternalRealtimeRequestItemType(prop.Value.GetString()); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } if (prop.NameEquals("id"u8)) diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs index 408c767c8..bb08f7ea4 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeResponseItem : InternalRealtimeResponseItem { - internal UnknownRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeRequestItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) + internal UnknownRealtimeResponseItem(InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs deleted file mode 100644 index 67c490284..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using OpenAI; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseStatusDetails : IJsonModel - { - internal UnknownRealtimeResponseStatusDetails() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support writing '{format}' format."); - } - base.JsonModelWriteCore(writer, options); - } - - InternalRealtimeResponseStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)JsonModelCreateCore(ref reader, options); - - protected override InternalRealtimeResponseStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationStatusDetails(document.RootElement, options); - } - - internal static UnknownRealtimeResponseStatusDetails DeserializeUnknownRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConversationStatus @type = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("type"u8)) - { - @type = new ConversationStatus(prop.Value.GetString()); - continue; - } - if (true) - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new UnknownRealtimeResponseStatusDetails(@type, additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRealtimeResponseStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)PersistableModelCreateCore(data, options); - - protected override InternalRealtimeResponseStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeInternalRealtimeResponseStatusDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs deleted file mode 100644 index 50126a3b3..000000000 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs +++ /dev/null @@ -1,16 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace OpenAI.RealtimeConversation -{ - internal partial class UnknownRealtimeResponseStatusDetails : ConversationStatusDetails - { - internal UnknownRealtimeResponseStatusDetails(ConversationStatus @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) - { - } - } -} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs index 5c35579c7..27a46aebb 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs @@ -12,7 +12,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeServerEvent : IJsonModel { - internal UnknownRealtimeResponseCommand() + internal UnknownRealtimeServerEvent() { } @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseCommand)JsonModelCreateCore(ref reader, options); + ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeServerEvent)JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -43,10 +43,10 @@ protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader rea throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationUpdate(document.RootElement, options); + return ConversationUpdate.DeserializeConversationUpdate(document.RootElement, options); } - internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeResponseCommand(JsonElement element, ModelReaderWriterOptions options) + internal static UnknownRealtimeServerEvent DeserializeUnknownRealtimeServerEvent(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -59,11 +59,6 @@ internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeRespons { if (prop.NameEquals("event_id"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } eventId = prop.Value.GetString(); continue; } @@ -77,7 +72,7 @@ internal static UnknownRealtimeResponseCommand DeserializeUnknownRealtimeRespons additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UnknownRealtimeResponseCommand(eventId, kind, additionalBinaryDataProperties); + return new UnknownRealtimeServerEvent(eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); @@ -94,7 +89,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseCommand)PersistableModelCreateCore(data, options); + ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeServerEvent)PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { @@ -104,7 +99,7 @@ protected override ConversationUpdate PersistableModelCreateCore(BinaryData data case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeConversationUpdate(document.RootElement, options); + return ConversationUpdate.DeserializeConversationUpdate(document.RootElement, options); } default: throw new FormatException($"The model {nameof(ConversationUpdate)} does not support reading '{options.Format}' format."); diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.cs b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.cs index 4954c31c3..d2e999978 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.cs @@ -9,11 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class UnknownRealtimeServerEvent : ConversationUpdate { - internal UnknownRealtimeServerEvent(ConversationUpdateKind kind, string eventId, IDictionary serializedAdditionalRawData) : base(kind, eventId, serializedAdditionalRawData) - { - } - - internal UnknownRealtimeServerEvent() + internal UnknownRealtimeServerEvent(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { } } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index a7c82edaf..99f7d79da 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -413,19 +413,18 @@ public static ThreadDeletionResult ThreadDeletionResult(bool deleted = default, return new ThreadDeletionResult(deleted, threadId, @object, additionalBinaryDataProperties: null); } - public static ConversationSessionOptions ConversationSessionOptions(ConversationVoice? voice = default, string instructions = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, string model = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default, IEnumerable internalModalities = default, BinaryData internalToolChoice = default, BinaryData maxResponseOutputTokens = default) + public static ConversationSessionOptions ConversationSessionOptions(string instructions = default, ConversationVoice? voice = default, ConversationAudioFormat? inputAudioFormat = default, ConversationAudioFormat? outputAudioFormat = default, IEnumerable tools = default, float? temperature = default, ConversationTurnDetectionOptions turnDetectionOptions = default, ConversationInputTranscriptionOptions inputTranscriptionOptions = default, IEnumerable internalModalities = default, BinaryData internalToolChoice = default, BinaryData maxResponseOutputTokens = default) { tools ??= new ChangeTrackingList(); - internalModalities ??= new ChangeTrackingList(); + internalModalities ??= new ChangeTrackingList(); return new ConversationSessionOptions( - voice, instructions, + voice, inputAudioFormat, outputAudioFormat, tools?.ToList(), temperature, - model, turnDetectionOptions, inputTranscriptionOptions, internalModalities?.ToList(), @@ -461,322 +460,223 @@ public static ConversationFunctionTool ConversationFunctionTool(string name = de public static ConversationItem ConversationItem(string @type = default, string id = default) { - return new UnknownRealtimeRequestItem(new InternalRealtimeRequestItemType(@type), id, additionalBinaryDataProperties: null); + return new UnknownRealtimeRequestItem(new InternalRealtimeItemType(@type), id, additionalBinaryDataProperties: null); } - public static ConversationContentPart ConversationContentPart(ConversationContentPartKind @type = default) + public static ConversationContentPart ConversationContentPart(string kind = default) { - return new UnknownRealtimeContentPart(@type, additionalBinaryDataProperties: null); + return new UnknownRealtimeContentPart(new ConversationContentPartKind(kind), additionalBinaryDataProperties: null); } public static ConversationUpdate ConversationUpdate(string eventId = default, string kind = default) { - return new UnknownRealtimeResponseCommand(eventId, kind.ToConversationUpdateKind(), additionalBinaryDataProperties: null); - } - - public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) - { - - return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); - } - - public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) - { - - return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); - } - - public static ConversationItemAcknowledgedUpdate ConversationItemAcknowledgedUpdate(ConversationItem item = default, string eventId = default) - { - - return new ConversationItemAcknowledgedUpdate(item, eventId, RealtimeConversation.ConversationUpdateKind.ItemAcknowledged, additionalBinaryDataProperties: null); - } - - public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default) - { - - return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); + return new UnknownRealtimeServerEvent(eventId, kind.ToConversationUpdateKind(), additionalBinaryDataProperties: null); } - public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int audioEndMs = default, int index = default, string eventId = default) + public static ConversationErrorUpdate ConversationErrorUpdate(string eventId = default, InternalRealtimeServerEventErrorError error = default) { - return new ConversationItemTruncatedUpdate( - itemId, - audioEndMs, - index, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemTruncated, - additionalBinaryDataProperties: null); + return new ConversationErrorUpdate(eventId, error, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); } - public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) { - return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); + return new ConversationSessionStartedUpdate(eventId, internalSession, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); } - public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) { - return new ConversationTokenUsage( - totalTokens, - inputTokens, - outputTokens, - inputTokenDetails, - outputTokenDetails, - additionalBinaryDataProperties: null); + return new ConversationSessionConfiguredUpdate(eventId, internalSession, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); } - public static ConversationInputTokenUsageDetails ConversationInputTokenUsageDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) + public static ConversationInputAudioCommittedUpdate ConversationInputAudioCommittedUpdate(string eventId = default, string previousItemId = default, string itemId = default) { - return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties: null); + return new ConversationInputAudioCommittedUpdate(eventId, previousItemId, itemId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted, additionalBinaryDataProperties: null); } - public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDetails(int textTokens = default, int audioTokens = default) + public static ConversationInputAudioClearedUpdate ConversationInputAudioClearedUpdate(string eventId = default) { - return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); + return new ConversationInputAudioClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCleared, additionalBinaryDataProperties: null); } - public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) + public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string eventId = default, string itemId = default, int audioStartMs = default) { - return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); + return new ConversationInputSpeechStartedUpdate(eventId, itemId, audioStartMs, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted, additionalBinaryDataProperties: null); } - public static ConversationRateLimitsUpdatedUpdate ConversationRateLimitsUpdatedUpdate(IEnumerable rateLimits = default, string eventId = default) + public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string eventId = default, string itemId = default, int audioEndMs = default) { - rateLimits ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdatedUpdate(rateLimits?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); + return new ConversationInputSpeechFinishedUpdate(eventId, itemId, audioEndMs, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped, additionalBinaryDataProperties: null); } - public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int limit = default, int remaining = default, float resetSeconds = default) + public static ConversationItemCreatedUpdate ConversationItemCreatedUpdate(string eventId = default, string previousItemId = default, InternalRealtimeResponseItem internalItem = default) { - return new ConversationRateLimitDetailsItem(name, limit, remaining, resetSeconds, additionalBinaryDataProperties: null); + return new ConversationItemCreatedUpdate(eventId, previousItemId, internalItem, RealtimeConversation.ConversationUpdateKind.ItemCreated, additionalBinaryDataProperties: null); } - public static ConversationItemStartedUpdate ConversationItemStartedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) + public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string eventId = default, string itemId = default, int contentIndex = default, string transcript = default) { - return new ConversationItemStartedUpdate( - responseId, - outputIndex, - internalItem, + return new ConversationInputTranscriptionFinishedUpdate( eventId, - RealtimeConversation.ConversationUpdateKind.ItemStarted, + itemId, + contentIndex, + transcript, + RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished, additionalBinaryDataProperties: null); } - public static ConversationItemFinishedUpdate ConversationItemFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) + public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string eventId = default, string itemId = default, int contentIndex = default, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default) { - return new ConversationItemFinishedUpdate( - responseId, - outputIndex, - internalItem, + return new ConversationInputTranscriptionFailedUpdate( eventId, - RealtimeConversation.ConversationUpdateKind.ItemFinished, + itemId, + contentIndex, + error, + RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed, additionalBinaryDataProperties: null); } - public static ConversationContentPartStartedUpdate ConversationContentPartStartedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) + public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string eventId = default, string itemId = default, int contentIndex = default, int audioEndMs = default) { - return new ConversationContentPartStartedUpdate( - responseId, + return new ConversationItemTruncatedUpdate( + eventId, itemId, - outputIndex, contentIndex, - internalContentPart, - eventId, - RealtimeConversation.ConversationUpdateKind.ContentPartStarted, + audioEndMs, + RealtimeConversation.ConversationUpdateKind.ItemTruncated, additionalBinaryDataProperties: null); } - public static ConversationContentPartFinishedUpdate ConversationContentPartFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, ConversationContentPart internalContentPart = default, string eventId = default) + public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string eventId = default, string itemId = default) { - return new ConversationContentPartFinishedUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - internalContentPart, - eventId, - RealtimeConversation.ConversationUpdateKind.ContentPartFinished, - additionalBinaryDataProperties: null); + return new ConversationItemDeletedUpdate(eventId, itemId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); } - public static ConversationAudioDeltaUpdate ConversationAudioDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default) + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) { - return new ConversationAudioDeltaUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - delta, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseAudioDelta, - additionalBinaryDataProperties: null); + return new ConversationResponseStartedUpdate(eventId, internalResponse, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); } - public static ConversationAudioDoneUpdate ConversationAudioDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) + public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) { - return new ConversationAudioDoneUpdate( - "response.audio.done", - responseId, - itemId, - outputIndex, - contentIndex, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseAudioDone, + return new ConversationTokenUsage( + totalTokens, + inputTokens, + outputTokens, + inputTokenDetails, + outputTokenDetails, additionalBinaryDataProperties: null); } - public static ConversationOutputTranscriptionDeltaUpdate ConversationOutputTranscriptionDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) + public static ConversationInputTokenUsageDetails ConversationInputTokenUsageDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) { - return new ConversationOutputTranscriptionDeltaUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - delta, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDelta, - additionalBinaryDataProperties: null); + return new ConversationInputTokenUsageDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties: null); } - public static ConversationOutputTranscriptionFinishedUpdate ConversationOutputTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) + public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDetails(int textTokens = default, int audioTokens = default) { - return new ConversationOutputTranscriptionFinishedUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseAudioTranscriptDone, - additionalBinaryDataProperties: null); + return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); } - public static ConversationTextDeltaUpdate ConversationTextDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string delta = default, string eventId = default) + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) { - return new ConversationTextDeltaUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - delta, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseTextDelta, - additionalBinaryDataProperties: null); + return new ConversationResponseFinishedUpdate(eventId, internalResponse, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); } - public static ConversationTextDoneUpdate ConversationTextDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string value = default, string eventId = default) + public static ConversationItemStreamingStartedUpdate ConversationItemStreamingStartedUpdate(string eventId = default, string responseId = default, int itemIndex = default, InternalRealtimeResponseItem internalItem = default) { - return new ConversationTextDoneUpdate( - responseId, - itemId, - outputIndex, - contentIndex, - value, + return new ConversationItemStreamingStartedUpdate( eventId, - RealtimeConversation.ConversationUpdateKind.ResponseTextDone, + responseId, + itemIndex, + internalItem, + RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted, additionalBinaryDataProperties: null); } - public static ConversationFunctionCallArgumentsDeltaUpdate ConversationFunctionCallArgumentsDeltaUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string delta = default, string eventId = default) + public static ConversationItemStreamingFinishedUpdate ConversationItemStreamingFinishedUpdate(string eventId = default, string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default) { - return new ConversationFunctionCallArgumentsDeltaUpdate( + return new ConversationItemStreamingFinishedUpdate( + eventId, responseId, - itemId, outputIndex, - callId, - delta, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDelta, + internalItem, + RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished, additionalBinaryDataProperties: null); } - public static ConversationFunctionCallArgumentsDoneUpdate ConversationFunctionCallArgumentsDoneUpdate(string responseId = default, string itemId = default, int outputIndex = default, string callId = default, string name = default, string arguments = default, string eventId = default) + public static ConversationItemStreamingTextFinishedUpdate ConversationItemStreamingTextFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string text = default) { - return new ConversationFunctionCallArgumentsDoneUpdate( + return new ConversationItemStreamingTextFinishedUpdate( + eventId, responseId, itemId, outputIndex, - callId, - name, - arguments, - eventId, - RealtimeConversation.ConversationUpdateKind.ResponseFunctionCallArgumentsDone, + contentIndex, + text, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished, additionalBinaryDataProperties: null); } - public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(int audioStartMs = default, string itemId = default, string eventId = default) + public static ConversationItemStreamingAudioTranscriptionFinishedUpdate ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string transcript = default) { - return new ConversationInputSpeechStartedUpdate(audioStartMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStarted, additionalBinaryDataProperties: null); - } - - public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(int audioEndMs = default, string itemId = default, string eventId = default) - { - - return new ConversationInputSpeechFinishedUpdate(audioEndMs, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferSpeechStopped, additionalBinaryDataProperties: null); - } - - public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default) - { - - return new ConversationInputTranscriptionFinishedUpdate( + return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( + eventId, + responseId, itemId, + outputIndex, contentIndex, transcript, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionCompleted, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished, additionalBinaryDataProperties: null); } - public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeResponseApiError error = default, string eventId = default) + public static ConversationItemStreamingAudioFinishedUpdate ConversationItemStreamingAudioFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default) { - return new ConversationInputTranscriptionFailedUpdate( + return new ConversationItemStreamingAudioFinishedUpdate( + eventId, + responseId, itemId, + outputIndex, contentIndex, - error, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemInputAudioTranscriptionFailed, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished, additionalBinaryDataProperties: null); } - public static ConversationInputAudioBufferCommittedUpdate ConversationInputAudioBufferCommittedUpdate(string itemId = default, string previousItemId = default, string eventId = default) - { - - return new ConversationInputAudioBufferCommittedUpdate(itemId, previousItemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCommitted, additionalBinaryDataProperties: null); - } - - public static ConversationInputAudioBufferClearedUpdate ConversationInputAudioBufferClearedUpdate(string eventId = default) + public static ConversationRateLimitsUpdate ConversationRateLimitsUpdate(string eventId = default, IEnumerable allDetails = default) { + allDetails ??= new ChangeTrackingList(); - return new ConversationInputAudioBufferClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioBufferCleared, additionalBinaryDataProperties: null); + return new ConversationRateLimitsUpdate(eventId, allDetails?.ToList(), RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); } - public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeResponseError error = default, string eventId = default) + public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int maximumCount = default, int remainingCount = default, TimeSpan timeUntilReset = default) { - return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); + return new ConversationRateLimitDetailsItem(name, maximumCount, remainingCount, timeUntilReset, additionalBinaryDataProperties: null); } public static ModerationResultCollection ModerationResultCollection(string id = default, string model = default, IEnumerable results = default) @@ -954,25 +854,38 @@ public static EmbeddingTokenUsage EmbeddingTokenUsage(int inputTokenCount = defa return new EmbeddingTokenUsage(inputTokenCount, totalTokenCount, additionalBinaryDataProperties: null); } - public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = default) + public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount = default, int totalTokenCount = default, ChatOutputTokenUsageDetails outputTokenDetails = default, ChatInputTokenUsageDetails inputTokenDetails = default) { - return new ChatTokenUsage(outputTokenCount, inputTokenCount, totalTokenCount, outputTokenDetails, additionalBinaryDataProperties: null); + return new ChatTokenUsage( + outputTokenCount, + inputTokenCount, + totalTokenCount, + outputTokenDetails, + inputTokenDetails, + additionalBinaryDataProperties: null); } - public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int? audioTokenCount = null, int reasoningTokenCount = default) + public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default, int? audioTokenCount = default) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties: null); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, audioTokenCount, additionalBinaryDataProperties: null); } - public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default) + public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int? audioTokenCount = default, int? cachedTokenCount = default) + { + + return new ChatInputTokenUsageDetails(audioTokenCount, cachedTokenCount, additionalBinaryDataProperties: null); + } + + public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalty = default, float? presencePenalty = default, ChatResponseFormat responseFormat = default, float? temperature = default, float? topP = default, IEnumerable tools = default, IEnumerable messages = default, InternalCreateChatCompletionRequestModel model = default, int? n = default, bool? stream = default, InternalChatCompletionStreamOptions streamOptions = default, bool? includeLogProbabilities = default, int? topLogProbabilityCount = default, IEnumerable stopSequences = default, IDictionary logitBiases = default, ChatToolChoice toolChoice = default, ChatFunctionChoice functionChoice = default, bool? allowParallelToolCalls = default, string endUserId = default, long? seed = default, int? deprecatedMaxTokens = default, int? maxOutputTokenCount = default, IEnumerable functions = default, IDictionary metadata = default, bool? storedOutputEnabled = default, InternalCreateChatCompletionRequestServiceTier? serviceTier = default) { tools ??= new ChangeTrackingList(); messages ??= new ChangeTrackingList(); stopSequences ??= new ChangeTrackingList(); logitBiases ??= new ChangeTrackingDictionary(); functions ??= new ChangeTrackingList(); + metadata ??= new ChangeTrackingDictionary(); return new ChatCompletionOptions( frequencyPenalty, @@ -998,6 +911,8 @@ public static ChatCompletionOptions ChatCompletionOptions(float? frequencyPenalt deprecatedMaxTokens, maxOutputTokenCount, functions?.ToList(), + metadata, + storedOutputEnabled, serviceTier, additionalBinaryDataProperties: null); } diff --git a/.gitignore b/.gitignore index f71e3dc8e..b7300b4c3 100644 --- a/.gitignore +++ b/.gitignore @@ -177,3 +177,4 @@ artifacts # Temporary typespec folders for typespec generation TempTypeSpecFiles/ +.plugin/emitter/temp/tsconfig.tsbuildinfo diff --git a/.plugin/.gitignore b/.plugin/.gitignore index a2ea83c50..fe620c83f 100644 --- a/.plugin/.gitignore +++ b/.plugin/.gitignore @@ -17,6 +17,8 @@ launchSettings.json # Default TypeSpec output tsp-output/ +temp/ + # Build results /artifacts binaries/ diff --git a/.plugin/emitter/temp/tsconfig.tsbuildinfo b/.plugin/emitter/temp/tsconfig.tsbuildinfo deleted file mode 100644 index 0b86cfc08..000000000 --- a/.plugin/emitter/temp/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/fast-uri/types/index.d.ts","../../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../../node_modules/ajv/dist/compile/rules.d.ts","../../../node_modules/ajv/dist/compile/util.d.ts","../../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../../node_modules/ajv/dist/compile/errors.d.ts","../../../node_modules/ajv/dist/compile/validate/index.d.ts","../../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../../node_modules/ajv/dist/types/json-schema.d.ts","../../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../../node_modules/ajv/dist/compile/ref_error.d.ts","../../../node_modules/ajv/dist/core.d.ts","../../../node_modules/ajv/dist/compile/resolve.d.ts","../../../node_modules/ajv/dist/compile/index.d.ts","../../../node_modules/ajv/dist/types/index.d.ts","../../../node_modules/ajv/dist/ajv.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/type-name-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/checker.d.ts","../../../node_modules/@typespec/compiler/dist/src/manifest.d.ts","../../../node_modules/@typespec/compiler/dist/src/types/package-json.d.ts","../../../node_modules/@typespec/compiler/dist/src/module-resolver/module-resolver.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/decorator-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/deprecation.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/diagnostics.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/emitter-utils.d.ts","../../../node_modules/prettier/doc.d.ts","../../../node_modules/prettier/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/formatter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/numeric.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/intrinsic-type-state.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/discriminator-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/location-context.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/operation-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/path-interpolation.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/projected-names-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/string-template-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/syntax-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/usage-resolver.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/helpers/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/param-message.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/library.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/linter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/node-host.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/parser-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/parser.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/path-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/projected-program.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/scanner.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/semantic-walker.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/source-file.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/type-utils.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/yaml/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/options.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/state-accessors.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/program.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/placeholder.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/reference-cycle.d.ts","../../../node_modules/@typespec/compiler/dist/src/emitter-framework/type-emitter.d.ts","../../../node_modules/@typespec/compiler/dist/src/core/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/config-loader.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/config-to-options.d.ts","../../../node_modules/@typespec/compiler/dist/src/config/index.d.ts","../../../node_modules/@typespec/compiler/dist/generated-defs/typespec.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/encoded-names.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/examples.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/service.d.ts","../../../node_modules/@typespec/compiler/dist/src/lib/decorators.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/language-config.d.ts","../../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../../node_modules/vscode-jsonrpc/typings/thenable.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messages.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/linkedmap.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/disposable.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/events.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/encoding.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/ral.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagereader.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagewriter.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/connection.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/sharedarraycancellation.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/messagebuffer.d.ts","../../../node_modules/vscode-jsonrpc/lib/common/api.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typedefinition.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.workspacefolder.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.colorprovider.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.callhierarchy.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.semantictokens.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.showdocument.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.linkededitingrange.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.fileoperations.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.typehierarchy.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinevalue.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayhint.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlinecompletion.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts","../../../node_modules/vscode-languageserver-protocol/lib/common/api.d.ts","../../../node_modules/vscode-languageserver/lib/common/progress.d.ts","../../../node_modules/vscode-languageserver/lib/common/configuration.d.ts","../../../node_modules/vscode-languageserver/lib/common/workspacefolder.d.ts","../../../node_modules/vscode-languageserver/lib/common/callhierarchy.d.ts","../../../node_modules/vscode-languageserver/lib/common/semantictokens.d.ts","../../../node_modules/vscode-languageserver/lib/common/showdocument.d.ts","../../../node_modules/vscode-languageserver/lib/common/fileoperations.d.ts","../../../node_modules/vscode-languageserver/lib/common/linkededitingrange.d.ts","../../../node_modules/vscode-languageserver/lib/common/typehierarchy.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlinevalue.d.ts","../../../node_modules/vscode-languageserver/lib/common/foldingrange.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlayhint.d.ts","../../../node_modules/vscode-languageserver/lib/common/diagnostic.d.ts","../../../node_modules/vscode-languageserver/lib/common/textdocuments.d.ts","../../../node_modules/vscode-languageserver/lib/common/notebook.d.ts","../../../node_modules/vscode-languageserver/lib/common/moniker.d.ts","../../../node_modules/vscode-languageserver/lib/common/server.d.ts","../../../node_modules/vscode-languageserver/lib/common/inlinecompletion.proposed.d.ts","../../../node_modules/vscode-languageserver/lib/common/api.d.ts","../../../node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/types.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/serverlib.d.ts","../../../node_modules/@typespec/compiler/dist/src/server/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/formatter/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/duplicate-tracker.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/misc.d.ts","../../../node_modules/@typespec/compiler/dist/src/utils/index.d.ts","../../../node_modules/@typespec/compiler/dist/src/index.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/constants.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/generated-defs/azure.clientgenerator.core.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lib.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/linter.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.foundations.private.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-info.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/lro-helpers.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/decorators.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/helpers/union-enums.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/prevent-rest-library.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/rules/use-standard-operations.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/generated-defs/azure.core.traits.private.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/traits.d.ts","../../../node_modules/@typespec/http/dist/src/lib.d.ts","../../../node_modules/@typespec/http/dist/src/linter.d.ts","../../../node_modules/@typespec/http/dist/generated-defs/typespec.http.private.d.ts","../../../node_modules/@typespec/http/dist/generated-defs/typespec.http.d.ts","../../../node_modules/@typespec/http/dist/src/metadata.d.ts","../../../node_modules/@typespec/http/dist/src/http-property.d.ts","../../../node_modules/@typespec/http/dist/src/types.d.ts","../../../node_modules/@typespec/http/dist/src/auth.d.ts","../../../node_modules/@typespec/http/dist/src/content-types.d.ts","../../../node_modules/@typespec/http/dist/src/decorators.d.ts","../../../node_modules/@typespec/http/dist/src/operations.d.ts","../../../node_modules/@typespec/http/dist/src/parameters.d.ts","../../../node_modules/@typespec/http/dist/src/private.decorators.d.ts","../../../node_modules/@typespec/http/dist/src/responses.d.ts","../../../node_modules/@typespec/http/dist/src/route.d.ts","../../../node_modules/@typespec/http/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/utils.d.ts","../../../node_modules/@azure-tools/typespec-azure-core/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/internal-utils.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/interfaces.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/decorators.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/lib.d.ts","../../../node_modules/@typespec/versioning/dist/generated-defs/typespec.versioning.d.ts","../../../node_modules/@typespec/versioning/dist/src/types.d.ts","../../../node_modules/@typespec/versioning/dist/src/decorators.d.ts","../../../node_modules/@typespec/versioning/dist/src/projection.d.ts","../../../node_modules/@typespec/versioning/dist/src/validate.d.ts","../../../node_modules/@typespec/versioning/dist/src/versioning-timeline.d.ts","../../../node_modules/@typespec/versioning/dist/src/versioning.d.ts","../../../node_modules/@typespec/versioning/dist/src/index.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/public-utils.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/types.d.ts","../../../node_modules/@azure-tools/typespec-client-generator-core/dist/src/index.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/log-level.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/options.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/emitter.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/lib.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/lib/logger.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/sdk-context-options.d.ts","../../../node_modules/@typespec/http-client-csharp/dist/emitter/index.d.ts","../src/emitter.ts","../src/index.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts5.6/index.d.ts"],"fileIdsList":[[226,282,290,332],[283,290,332],[226,290,332],[226,231,232,233,234,235,290,332],[229,230,235,236,237,238,239,242,259,290,332],[226,234,290,332],[226,235,236,290,332],[226,240,241,290,332],[226,258,290,332],[226,228,261,262,290,332],[262,263,264,273,274,290,332],[226,258,260,261,290,332],[226,258,262,290,332],[226,258,261,262,272,290,332],[226,260,262,290,332],[290,329,332],[290,331,332],[290,332,337,367],[290,332,333,338,344,345,352,364,375],[290,332,333,334,344,352],[290,332],[285,286,287,290,332],[290,332,335,376],[290,332,336,337,345,353],[290,332,337,364,372],[290,332,338,340,344,352],[290,331,332,339],[290,332,340,341],[290,332,344],[290,332,342,344],[290,331,332,344],[290,332,344,345,346,364,375],[290,332,344,345,346,359,364,367],[290,327,332,380],[290,327,332,340,344,347,352,364,375],[290,332,344,345,347,348,352,364,372,375],[290,332,347,349,364,372,375],[290,332,344,350],[290,332,351,375,380],[290,332,340,344,352,364],[290,332,353],[290,332,354],[290,331,332,355],[290,329,330,331,332,333,334,335,336,337,338,339,340,341,342,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,357],[290,332,358],[290,332,344,359,360],[290,332,359,361,376,378],[290,332,344,364,365,366,367],[290,332,364,366],[290,332,364,365],[290,332,367],[290,332,368],[290,329,332,364],[290,332,344,370,371],[290,332,370,371],[290,332,337,352,364,372],[290,332,373],[332],[288,289,290,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381],[290,332,352,374],[290,332,347,358,375],[290,332,337,376],[290,332,364,377],[290,332,351,378],[290,332,379],[290,332,337,344,346,355,364,375,378,380],[290,332,364,381],[141,149,290,332],[141,142,149,290,332],[141,150,151,290,332],[139,140,290,332],[104,144,149,290,332],[144,149,290,332],[144,290,332],[114,290,332],[117,144,149,290,332],[104,118,119,120,121,122,123,124,125,290,332],[149,290,332],[105,106,108,109,110,111,112,115,116,117,126,128,129,130,131,132,133,134,135,136,137,138,142,144,149,290,332],[116,139,144,290,332],[127,149,290,332],[111,144,149,290,332],[105,142,143,149,290,332],[139,290,332],[111,149,290,332],[103,108,116,144,146,148,290,332],[139,146,290,332],[144,145,146,147,149,290,332],[139,145,148,290,332],[114,149,290,332],[107,139,152,157,221,222,225,290,332],[117,144,149,153,154,155,156,290,332],[144,149,157,290,332],[144,149,153,290,332],[107,290,332],[158,219,220,290,332],[219,290,332],[139,217,218,290,332],[223,224,290,332],[106,111,149,290,332],[226,277,290,332],[227,276,277,278,279,280,281,290,332],[226,276,290,332],[226,275,276,290,332],[275,290,332],[226,249,290,332],[226,246,249,290,332],[226,247,249,290,332],[243,244,245,247,248,249,250,251,252,253,254,255,256,257,290,332],[226,245,290,332],[226,246,248,290,332],[226,265,266,290,332],[266,267,268,269,271,290,332],[226,266,290,332],[226,266,267,270,290,332],[62,63,67,94,95,97,98,99,101,102,290,332],[60,61,290,332],[60,290,332],[62,102,290,332],[62,63,99,100,102,290,332],[102,290,332],[59,102,103,290,332],[62,63,101,102,290,332],[62,63,65,66,101,102,290,332],[62,63,64,101,102,290,332],[62,63,67,94,95,96,97,98,101,102,290,332],[59,62,63,67,99,101,290,332],[67,102,290,332],[69,70,71,72,73,74,75,76,77,78,102,290,332],[92,102,290,332],[68,79,87,88,89,90,91,93,290,332],[72,102,290,332],[80,81,82,83,84,85,86,102,290,332],[113,290,332],[290,299,303,332,375],[290,299,332,364,375],[290,294,332],[290,296,299,332,372,375],[290,332,352,372],[290,332,382],[290,294,332,382],[290,296,299,332,352,375],[290,291,292,295,298,332,344,364,375],[290,299,306,332],[290,291,297,332],[290,299,320,321,332],[290,295,299,332,367,375,382],[290,320,332,382],[290,293,294,332,382],[290,299,332],[290,293,294,295,296,297,298,299,300,301,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,321,322,323,324,325,326,332],[290,299,314,332],[290,299,306,307,332],[290,297,299,307,308,332],[290,298,332],[290,291,294,299,332],[290,299,303,307,308,332],[290,303,332],[290,297,299,302,332,375],[290,291,296,299,306,332],[290,332,364],[290,294,299,320,332,380,382],[160,161,162,163,164,165,166,167,168,169,170,171,172,290,332],[163,164,290,332],[161,163,164,165,168,169,290,332],[161,167,290,332],[163,290,332],[167,290,332],[161,164,166,167,173,290,332],[161,164,166,167,290,332],[163,166,290,332],[161,165,170,290,332],[159,173,174,196,197,290,332],[173,174,290,332],[173,290,332],[159,173,174,196,290,332],[159,173,174,290,332],[159,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,290,332],[174,196,290,332],[159,174,196,290,332],[198,199,203,212,213,215,216,290,332],[198,215,290,332],[198,212,215,290,332],[198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,290,332],[198,290,332]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee660a1f2acd3d7fc7b28df06c4e2125229666c4d72e5455ae3841bfd222f684","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"20175b94bd9aa2285b3140d8eff67d15b7e67bda225d9e4eef8d98d1ad9fdff0","impliedFormat":99},{"version":"569423c43cfcc3aec4d4f32f188ba01103f0b0da840e3327bd6f301981b592f4","impliedFormat":99},{"version":"2546eb0653f8b3ff203afb5aab17de16b98501295e328e4b02fbe99d003da10f","impliedFormat":99},{"version":"2e8cf7c24be364148c3c0702b0dfb6d706a9c5e5c7813af58ead241eb784f6ec","impliedFormat":99},{"version":"14ae999652dfd8e8ba8d4bfee86be2e468379a4247e5d58abc27be78fd09745e","impliedFormat":99},{"version":"e29f58e8e09108d4d4bb45d4b57a28d9b195e381b0857e9ca235e51ea0d97f9c","impliedFormat":99},{"version":"393fbf2918871b7bf342caee721d168a8a122bddf9d1c1540561f7a1b57f2e52","impliedFormat":99},{"version":"b76a160a84bc82f95c86b3dc4b7a495d53dcbe704f83a1829f7894b457712fc4","impliedFormat":99},{"version":"132e64ba175c5d069dc3229780a99d244d17fa0ad8c123fd68b449357935c4d4","impliedFormat":99},{"version":"2f848b4e660b568651a6350565afc8ac5b0644853a2a863862807602cf244a05","impliedFormat":1},{"version":"6ac85cb2c23dcb52445b268258a7ea36d620054e7db53874d890bb64981ddc13","impliedFormat":1},{"version":"b8f924913b407f41ffa7c4fd46066fe199323d2203d106e164c63760b88ea6be","impliedFormat":99},{"version":"5a23cb53a5e8de12e99766a33421d4e069f58578f2429313a0499c00f7dfe23c","impliedFormat":99},{"version":"018970bd1cd62cb80ad410f2dab15d15775a6f63a9504b5e8d64cb13d766ea08","impliedFormat":99},{"version":"8cbca7868a6662571aa5a8745eeccbdfa59d1f4b03857f1b3d25802fd4f9a32b","impliedFormat":99},{"version":"3d99644caf064bd8ced7365698bb55c7db1b68d82e48dbde9ffd21e503b5d0b2","impliedFormat":99},{"version":"5077b3ba3766f16b30e325ad7d720330c08ef84fc2f6a449826adb006bc581ed","impliedFormat":99},{"version":"4ac79fd5d2a7f056ba1eda188700198f20d32bcab0db09f311d5d5f5d746c2ca","impliedFormat":99},{"version":"a0a61d07fbaecc0b60b5cbde76e0e87c79ac2e1819fe20612bb8f30a56383dbe","impliedFormat":99},{"version":"569edbdf1a3fc773a8289c37ff0d63c9af483a84e704063a3439255b7f377d4f","impliedFormat":99},{"version":"9fe08a940616c1119c99ab5e79308eba7e88de97dfea87e44b95ba82d738eef4","impliedFormat":99},{"version":"ad10612fdbbc90fd9238b854ee39ad38a118cee8ac8979b1194895167168ceb3","impliedFormat":99},{"version":"03c705d7cc25c32907aac3a2bb178997e529eb56bb1ba063b887d18597a2bdda","impliedFormat":99},{"version":"c4b70b3f64ad8f28ce4a5624849cf1bb4f351f5ab8ee2db5c8edc53e85211584","impliedFormat":99},{"version":"cf46f4676dbe929b5320ba322897852e1b8015a43476ce4629fab69f82c12bd1","impliedFormat":99},{"version":"9dadd99afed4a96cf39d9c6ddc6459639cdbd9baeda97721f7fbd77af7517874","impliedFormat":99},{"version":"2b0959130e13998633418b3c425b50276eff966a2ed211c2ffe1c9d8a679ce44","impliedFormat":99},{"version":"55d56ae75b4d57956cc4ddeeefd30780d364b0aa3992e1d7df3d5f8d5fe9acff","impliedFormat":99},{"version":"20002fec9cc7289f9e69c1a95372c97a40db9eea44cd19b1fd0ccc3a8a122345","impliedFormat":99},{"version":"123d94390345afefbdd612f216d40db16c3710338edcb73b5f4be0a4ad539aa4","impliedFormat":99},{"version":"1264211b19f3c465b98afccd58fabac6e5e146ee6d849fcf63ddb33fd78720f1","impliedFormat":99},{"version":"f8a298d831ed8ca73a8dc9d5780817a7720ba9894042a69356a75c5e5f8c6893","impliedFormat":99},{"version":"2c6d27c8baadb60b734b8db829df8d12f58345402180ff88642ff5c1388cdf13","impliedFormat":99},{"version":"44d4f46fdd99e11b1f9f1e634b8f2881012c3501c04b07227d83502fb09ea548","impliedFormat":99},{"version":"3f4eef14851f0eadca50c74dd917aaf86124463cfc1cf5bc92e9831714c9910b","impliedFormat":99},{"version":"bdea99de0c771ba2b6aa7d0d83ecf7d3fb26b25314d32d63af6909d107df7c00","impliedFormat":99},{"version":"a6b6ed49a87b2a5690f61463b05d364af1bb39cc8472047691b921923e6ac9c9","impliedFormat":99},{"version":"d7f8c331cc75c67d3da42891e8532a9c869f961ed5d8dfbbe7d0ba35056cfcfb","impliedFormat":99},{"version":"8151e6cb5e10df668b741859300b99e32e18abcffaf2be101c4c2a6536f3442b","impliedFormat":99},{"version":"e96945cee95fede7ee90c31b805bc159562de0d88eb609d64b8d58855bf217b1","impliedFormat":99},{"version":"2d758a247ac13ae52ddecc90888a9a5fbd5b2640443078fb29cc8c312870cb74","impliedFormat":99},{"version":"da7ef8056b01283adea3ca6de1dabfd428b439d6050a75602f1e30f48eb6efdf","impliedFormat":99},{"version":"1594151e41321f9180c1451a1650631e06b1db7ffe5639c7edb6275c512b2f51","impliedFormat":99},{"version":"da9c0be46b2da7d84a03db79ae33edcd7388bd35c388b99ec37368aa1729e778","impliedFormat":99},{"version":"fce174b4613b3b31fe82b778e0e2c3a7fa0b41f8ced9b231b1a8c5a05c8b54f9","impliedFormat":99},{"version":"53e19706bab98ca4bfa4b42c783115fa2741c0483cc345e4f7e710d558200a1c","impliedFormat":99},{"version":"2d3045c2fdabdcb0ec2ec439868e2631d68bdea368750fa58170d016c0d06572","impliedFormat":99},{"version":"0ad7175d8390859cc77b9b1560fdd10a18990c189675abca18f65992b8507742","impliedFormat":99},{"version":"ad3d8bb2ac79fbda7222abb647e260914f6e6f2ed988f7db8acc62a44d78f448","impliedFormat":99},{"version":"1f37f596f1f6c032d3786baf43edb6c9aed3935eaf457fdb58d581794a8e7c52","impliedFormat":99},{"version":"41b5774912c8d91f1b3b84ddd2aad499e926477100855180512e9954dc02103d","impliedFormat":99},{"version":"fa58422ab7be615763761b87694a2994522ec1332276ef49df5e0a3287eb2c59","impliedFormat":99},{"version":"91128a15b91060cfde42e9d30dfee6c2f7b6887a4162b0e03ebd2471c7bdaeab","impliedFormat":99},{"version":"eee4060428d6fe35733db1ec1a630901d0cb99dbd27bb17eaf836c2cab52c361","impliedFormat":99},{"version":"dbb312aedcf0ce06467366f096ec6591b4c0f0d956137dd49c35a9b20bb90be7","impliedFormat":99},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6","impliedFormat":1},{"version":"cab0ba78dc961d90d639ccaf3d56c484e584056da39dc0d9bdaf1957be965f72","impliedFormat":1},{"version":"f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1","impliedFormat":1},{"version":"886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1","impliedFormat":1},{"version":"392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2","impliedFormat":1},{"version":"e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4","impliedFormat":1},{"version":"2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a","impliedFormat":1},{"version":"3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43","impliedFormat":1},{"version":"b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5","impliedFormat":1},{"version":"2ff2789ae43f9c056917e7516a02ad07c4cc1cafff3c68ff6b7ff8df623fd259","impliedFormat":1},{"version":"13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469","impliedFormat":1},{"version":"4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177","impliedFormat":1},{"version":"d576ef1b6aa804d0f0e8dfb3f6149b576788b598054aa2e15d5a7f7f52faf371","impliedFormat":1},{"version":"5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e","impliedFormat":1},{"version":"bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999","impliedFormat":1},{"version":"eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc","impliedFormat":1},{"version":"05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d","impliedFormat":1},{"version":"00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa","impliedFormat":1},{"version":"33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a","impliedFormat":1},{"version":"45f441bf74e920f6909ca6874037fdd10f06644c341b99fd7cfd041ea565ce1f","impliedFormat":1},{"version":"f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67","impliedFormat":1},{"version":"b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f","impliedFormat":1},{"version":"96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04","impliedFormat":1},{"version":"29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348","impliedFormat":1},{"version":"9381d5bdf7197cc4f732243e22762d27508daf7fcab0fff7339fe4660c11f382","impliedFormat":1},{"version":"0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6","impliedFormat":1},{"version":"818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f","impliedFormat":1},{"version":"77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079","impliedFormat":1},{"version":"80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917","impliedFormat":1},{"version":"daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe","impliedFormat":1},{"version":"6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4","impliedFormat":1},{"version":"656106ddbe4e00bd32af2c46abb1a8c9abbb8679fbf29adc637c053620286034","impliedFormat":1},{"version":"ddf3f680de453b300dd1c47e136b8ade3857d2c357635efeb0f9977d81d1e96d","impliedFormat":1},{"version":"dfc345d92b6d08863b239b8d025ea513df322af74e221d62f4bdbe217d08f69d","impliedFormat":1},{"version":"7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5","impliedFormat":1},{"version":"2f3aa6fb84e6955886902a6a8818e4bff9c79b97356773bd6ac2ff3993c097a2","impliedFormat":1},{"version":"c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e","impliedFormat":1},{"version":"08724e39439dbc02bdba9768f84736ed132bb02a04fbce0a2cdfc91f42e90505","impliedFormat":1},{"version":"f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3","impliedFormat":1},{"version":"7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc","impliedFormat":1},{"version":"1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e","impliedFormat":1},{"version":"46a9b0122b230cb2fab65999ba92f98a16fd8f1c25efaed47141cbf5056f6928","impliedFormat":1},{"version":"5a9a4741aa510bdee406441f77186c6d2005be78e78c2e0da8201d9991950164","impliedFormat":1},{"version":"351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02","impliedFormat":1},{"version":"3990ae796cc23fb9829eae206eff1eddded9465504467a4433f2509e18ef1aed","impliedFormat":1},{"version":"b557ea3605e52406e35eeea468cb96f25b1ca906f2055f376597f0b02492d94c","impliedFormat":1},{"version":"f384bb303dbc114af6460e7cb30b766cc92eed33fccb331126b08bb63f15a034","impliedFormat":1},{"version":"8a9bd1cf8c1f75435f83595b43737c135e7f73bde39ba4c9339dc6a31e8bb069","impliedFormat":1},{"version":"aa7747ab234b18813944ecdd61683a696025cd4f6970d7749d370080d4f9b349","impliedFormat":1},{"version":"8274bfd5de49f9f072be2f39c34e390101a8b69844e55eda36c7df23ba6d03e2","impliedFormat":1},{"version":"f8b482dddda55dd6677d7895a3fef8cd9d067f8c36c63cc7fe93b82a6dd4f10c","impliedFormat":1},{"version":"71d11ad1f05b0b90e95591fa85c1c8043e590d67972dcaba9b50435a0c04d8fa","impliedFormat":1},{"version":"5c74e3eee30bb7899eebe784e3c05cb29f1bed3efb2a3b4599b66173fda4aa30","impliedFormat":1},{"version":"a980ce9470dc95ac355d7efb729f9cfb0564505eba96da4bbde504299efb833a","impliedFormat":1},{"version":"72a33e518e5b98cd9c9dc8ee294f7507bf2a8938f491b0cf49c8ae582b966b3a","impliedFormat":1},{"version":"173838811f6dcba587706efd87358f804261549bc02c455d31818328c1af97ad","impliedFormat":1},{"version":"483ff04f1796aef40323f47ca3f03bf53492a2878508c8d7be98cdb4fae151f3","impliedFormat":1},{"version":"96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8","impliedFormat":99},{"version":"8b539ac8d500541d0e3187289173cbcfbbc86db438bc85de5ad5c14c66b8b8ab","impliedFormat":99},{"version":"4b7146e52c8d053b59b7e36919277a8555e7336125d3e0694d5c3adfcb8d9677","impliedFormat":99},{"version":"ba8404bc98c12f5f7a7edfa58fefafe96407e9b093175b5a3c75c34222b47e90","impliedFormat":99},{"version":"28179ea30b38d6ff478cfa140b14d57a83dc8a06f757bc23e73a30ed47d0ca0f","impliedFormat":99},{"version":"c8f1ce646847bf83be0d7e1d8cbbbb88c23e981509b4a266abb9d587b0a54d7e","impliedFormat":99},{"version":"21d0b7b23d86f12e8f8d209a82a3cf0f3f62df1d672c96f6efd43762c0e6d2e2","impliedFormat":99},{"version":"810c4e62a3f9a42ae3de9fbe57af2491bb0e0c4bec7e1410038a9e7111e47de3","impliedFormat":99},{"version":"be2eb42d9ddb54d0d682dd87b42dbe3cda0e3c7f146d03f0353b5ad366eead99","impliedFormat":99},{"version":"747d42460a4d2499f375e0dfa8003083b4b07cb5d1dd098a2c3e0f60e40fdc83","impliedFormat":99},{"version":"2392d906004cabc1033218185197a33dcf520f702e3dc89f5191ccc7fda63288","impliedFormat":99},{"version":"727dae6886965cfb6eb6a8446a52d6fa7b9ce7ef3e77f7dc0f1c9dd61d6e9db8","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"f21c1d0fb038d3dc2095c4bf3d28cb7b29d3b8e0cf5035ffa7f14de31603519d","impliedFormat":99},{"version":"ee7df4b493f02e971e1fffcc65389fae19540b302c7910d1c2534d83b8ddd492","impliedFormat":99},{"version":"d0c2705cb94e79403b989ed6d18559066c78028df55d7405ca5d1c1e47f458be","impliedFormat":99},{"version":"5ad19cf7f3b94b481a3d964cfe024bca5fbe1e3483ecb836770f005ce80906f6","impliedFormat":99},{"version":"e7e6c7a2173ee2db09e2e04eaa0f3a259b19d31ed10630a1eb3201a6f3d1d943","impliedFormat":99},{"version":"ebf027d9b2843413e165c6702631de9e3e631110d2fc3f1f2b720f0d89f28e8d","impliedFormat":99},{"version":"1f409d73efb6298d982522631a502dcb544527b9bbf784e64aaeb6731e0c38b4","impliedFormat":99},{"version":"b7d8407bc0e426611e6145c048da4127cb200af601afb5b37ea4d406c36ac7a0","impliedFormat":99},{"version":"6edcd53e85c098dd72671dd68681d136a2abaa7db6fd78dc0f5a7cec23ced1cb","impliedFormat":99},{"version":"20d691e94845972e20af7c36bdf9e0a19cfba0c08559eb061cb5cfc65f54aec0","impliedFormat":99},{"version":"c35f4c0fe4b2bcecd2b9949e6d19807646cca497a81de58835de0d9249706890","impliedFormat":99},{"version":"04e33114a8787b2e31820b623b3b7cbeddfb2932cb9dec929f6caf5748a336fc","impliedFormat":99},{"version":"553fae9b7f99936b03e3af051eafc5e333fed73b13b7eb22886e9ff228298f7d","impliedFormat":99},{"version":"7b29c44fac5481ff3b50a2888ef435cd724321c56fdc9c6dd70d58e38169566f","impliedFormat":99},{"version":"8b483f1d5c3db362aec5c4fd3ad87e7c0a5156cd548ed78943dbf6199d83cc65","impliedFormat":99},{"version":"077ef86987d5799a71885e6ef8006bcfd010c3d218f0570dfb579fc7d5b297bb","impliedFormat":99},{"version":"7f01966517764fa45526548d19e70c497f9fb2c7047e12dfc4a5e72abbaacf61","impliedFormat":99},{"version":"ac3248aed990c8a3a48a52348848a8744e381daa11faccfe458dc934f53c332a","impliedFormat":99},{"version":"ce39c5b11413ac0ad29b5e24dc58ce2ac5f7669824f8cf0c27db4d46c7201f6c","impliedFormat":99},{"version":"ac1f4bd17b76e5a1d9846a9fb44c64055a88b74328cf114cdbe0135ed0698f8a","impliedFormat":99},{"version":"afc0d0b3e8660c6d20eeafd547c6c6dbea8a427b33c78589edf7769982e06d90","impliedFormat":99},{"version":"bd91c4480739f1f9108943e98d1621c0c981dae09317546ae8883ed7238386bc","impliedFormat":99},{"version":"0eb7f661a7ee64ba1555b1bb67cd19e91feb1bb63c3e260287eb9e41e159149b","impliedFormat":99},{"version":"b2ee4cbf69c22cdca64bf5be994b9f13f03c55ac769306c9e54df0762143d871","impliedFormat":99},{"version":"22b8ebcd4b20d180bec4e6330dd3c512d7f1c9e95fd878c2803cffb4dfb30602","impliedFormat":99},{"version":"deb1cdfa833ebc90eaea0b9b5810435a71eb12cfca8c093b9d336d735090d3f3","impliedFormat":99},{"version":"bccc77ada6e255a7fe88a81d5142599162f39c6d0e4eb2db5b69479689d315e9","impliedFormat":99},{"version":"bb763fce8236a9ed6b4fed01e7fccbdb63cddadd31569b96d676312982d072de","impliedFormat":99},{"version":"561fba8ad92671d1659887128fce766222ee9142450bd9b7ca78309bdb1aa2d2","impliedFormat":99},{"version":"1e85ca8e917181d22ce326a848cdbb25084bb3862e28282acef9b526311a60f6","impliedFormat":99},{"version":"6a061c442221bee297cb40c449096a3f3e9658745dd22adb5f6b5b05c4ca2351","impliedFormat":99},{"version":"aba7f8c7184234d25ce120a318aa691ac4285beb9fc8d3469e953282c1470366","impliedFormat":99},{"version":"e8eee85aa72a5c89fa648a4f3b2ede7cbe0891fdac1b8011c64620f58fd6f597","impliedFormat":99},{"version":"2af4a88477b1976d3adbb0e3d8167b8ba65bd44cd74bdb1fa9adb6e242c8f262","impliedFormat":99},{"version":"263ee2cf227e5e413db0ee262148e5b24bb536de189f12ee46de9524dfe6963e","impliedFormat":99},{"version":"b256fe8ccd0e7fe17007ed91436d84bd5ecf64c743f3f4a62b68fa27fc232be7","impliedFormat":99},{"version":"8a5c1e06742772f71deadc308e709b975d68cf2bbc1fe56632c26550f1b85165","impliedFormat":99},{"version":"7d1bc217b21ef4ccabb50d3d1c875d384ba3ab1d0b71c6e517aeace24dc104ae","impliedFormat":99},{"version":"6b6308a789a6a589bb8e5c8e0f94306760308101348bbf46f13dc11a1fe9dd36","impliedFormat":99},{"version":"b8c6a521d556cc88b2a64f73bdbf54997a0d6568d6019e5cf53922f713869da1","impliedFormat":99},{"version":"202b1636ede916b4a0ad281a5939d631cd9b3b43468edbf072a53336eb76680a","impliedFormat":99},{"version":"ffacab3ae62bf33b92464efcd56f06be51106f9d51141102e3b6056612d61d43","impliedFormat":99},{"version":"fe7f8552472c0e0ac4a17f5e8f9e94e019f4df67e6b72fa35f6600fbe4384dcc","impliedFormat":99},{"version":"7e0a07c9f6fa7696bf39ba6c79d4b403ac73498a5eeddc5900f48538d1a2e337","impliedFormat":99},{"version":"560c8f2ff220c1fc92086da7938552728a4ee4c4ee38686fb1d3eaf4b6054104","impliedFormat":99},{"version":"b032ad87d6183fe1d849875122bb38b0450dc4adfaaa839097004b33ff891316","impliedFormat":99},{"version":"f637dd887bd0b1c7ed77968d7d60669b7fa01332e28043a43f1e92aaaa5c8cfe","impliedFormat":99},{"version":"2f08e1bb5d79277daab5cf12140d867888c22644b222085b3d50c87bf0e2f3e3","impliedFormat":99},{"version":"e18f718f896c53544a78bc798f48716c407ac2ee0b57885e20deaecaad6961d0","impliedFormat":99},{"version":"ac5fcea94fb43d7ea712642e3e35969c6d2d58b2855adc092807ffc82690f630","impliedFormat":99},{"version":"743f6fb5f1a440cd135f37d86c592feb9a168dd3cd4390853f2c1e8b8a374ded","impliedFormat":99},{"version":"2d5c87a908b98ee3eb04eaf41b4da69e5e8b9b9be0e721d7211b76821e97c20b","impliedFormat":99},{"version":"824111d95e81928bc58d70f48ab079f89974d9fb21a830eed24666b76fdb00cb","signature":"c90c5b60fb6323470867433f363c7d8cdcddfdb2090503c414ac0db456618eae","impliedFormat":99},{"version":"508db3320ff3d35adca421703ce8be7709ae2c54d44d6b631cc34a58c8de1b58","signature":"cb04f3ecd5e93359b3dc6715efbda93b05c3d23d02a457d092fce36a7dd696da","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"20b97c3368b1a63d2156deea35d03b125bb07908906eb35e0438042a3bbb3e71","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"8257c55ff6bff6169142a35fce6811b511d857b4ae4f522cdb6ce20fd2116b2c","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"5990bd8b9bc91f6e90269685ff5a154eeda52c18238f89f0101fb4d08cd80476","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"4de73e132bf47437c56b1e8416c60d9d517c8ba3822e7c623b54d4300834dd37","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"cdb781940d24f57752615cc37d2b975b45906f386e2e5344700156fd2fb74efc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"f59493f68eade5200559e5016b5855f7d12e6381eb6cab9ad8a379af367b3b2d","impliedFormat":1},{"version":"125e3472965f529de239d2bc85b54579fed8e0b060d1d04de6576fb910a6ec7f","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6306bf4c2b609f4c5b8bd7d26a85d40ccac8fb4276a84597fa8240f83c82f2b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","impliedFormat":1}],"root":[283,284],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"module":100,"newLine":1,"noEmitHelpers":false,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"../../dist/emitter","rootDir":"../src","sourceMap":true,"strict":true,"stripInternal":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[283,1],[284,2],[233,3],[231,3],[232,3],[240,3],[241,3],[236,4],[237,3],[260,5],[229,3],[230,3],[235,6],[234,7],[238,3],[239,3],[242,8],[259,9],[228,3],[263,10],[275,11],[262,12],[261,13],[264,3],[273,14],[274,15],[329,16],[330,16],[331,17],[332,18],[333,19],[334,20],[285,21],[288,22],[286,21],[287,21],[335,23],[336,24],[337,25],[338,26],[339,27],[340,28],[341,28],[343,29],[342,30],[344,31],[345,32],[346,33],[328,34],[347,35],[348,36],[349,37],[350,38],[351,39],[352,40],[353,41],[354,42],[355,43],[356,44],[357,45],[358,46],[359,47],[360,47],[361,48],[362,21],[363,21],[364,49],[366,50],[365,51],[367,52],[368,53],[369,54],[370,55],[371,56],[372,57],[373,58],[290,59],[289,21],[382,60],[374,61],[375,62],[376,63],[377,64],[378,65],[379,66],[380,67],[381,68],[153,3],[150,69],[151,70],[152,71],[141,72],[105,73],[109,74],[110,74],[111,74],[112,75],[115,76],[118,77],[126,78],[119,74],[120,79],[121,21],[122,74],[123,79],[124,21],[104,79],[125,79],[139,80],[117,81],[128,82],[129,83],[130,79],[116,21],[142,69],[127,79],[131,79],[132,79],[133,21],[144,84],[134,85],[135,86],[136,74],[137,79],[143,79],[138,74],[149,87],[145,21],[147,88],[148,89],[146,90],[222,91],[226,92],[157,93],[154,74],[155,94],[156,95],[106,21],[108,96],[221,97],[158,21],[220,98],[219,99],[107,21],[223,21],[225,100],[224,101],[140,79],[227,21],[278,102],[282,103],[279,3],[276,21],[280,104],[277,105],[281,106],[246,3],[245,3],[250,107],[251,3],[252,108],[248,109],[258,110],[243,3],[244,3],[247,107],[253,107],[254,107],[255,111],[256,107],[257,107],[249,112],[265,3],[267,113],[272,114],[268,3],[266,3],[269,3],[270,115],[271,116],[103,117],[60,21],[62,118],[61,119],[66,120],[101,121],[98,122],[100,123],[63,122],[64,124],[68,124],[67,125],[65,126],[99,127],[97,122],[102,128],[95,21],[96,21],[69,129],[74,122],[76,122],[71,122],[72,129],[78,122],[79,130],[70,122],[75,122],[77,122],[73,122],[93,131],[92,122],[94,132],[88,122],[90,122],[89,122],[85,122],[91,133],[86,122],[87,134],[80,122],[81,122],[82,122],[83,122],[84,122],[59,21],[113,21],[114,135],[57,21],[58,21],[10,21],[12,21],[11,21],[2,21],[13,21],[14,21],[15,21],[16,21],[17,21],[18,21],[19,21],[20,21],[3,21],[21,21],[4,21],[22,21],[26,21],[23,21],[24,21],[25,21],[27,21],[28,21],[29,21],[5,21],[30,21],[31,21],[32,21],[33,21],[6,21],[37,21],[34,21],[35,21],[36,21],[38,21],[7,21],[39,21],[44,21],[45,21],[40,21],[41,21],[42,21],[43,21],[8,21],[49,21],[46,21],[47,21],[48,21],[50,21],[9,21],[51,21],[52,21],[53,21],[56,21],[54,21],[55,21],[1,21],[306,136],[316,137],[305,136],[326,138],[297,139],[296,140],[325,141],[319,142],[324,143],[299,144],[313,145],[298,146],[322,147],[294,148],[293,141],[323,149],[295,150],[300,151],[301,21],[304,151],[291,21],[327,152],[317,153],[308,154],[309,155],[311,156],[307,157],[310,158],[320,141],[302,159],[303,160],[312,161],[292,162],[315,153],[314,151],[318,21],[321,163],[173,164],[165,165],[170,166],[163,21],[166,167],[164,168],[162,21],[172,169],[168,170],[161,21],[169,171],[167,172],[171,173],[160,21],[198,174],[197,175],[174,176],[184,177],[179,177],[178,178],[196,179],[181,177],[193,177],[188,178],[180,177],[175,177],[192,177],[195,177],[191,177],[187,177],[189,180],[194,181],[183,178],[182,177],[185,177],[186,178],[176,177],[190,177],[177,178],[218,21],[159,21],[217,182],[202,183],[200,183],[211,183],[205,183],[209,183],[210,183],[216,183],[208,183],[206,183],[214,183],[213,184],[199,183],[203,183],[215,185],[204,183],[212,186],[207,183],[201,183]],"latestChangedDtsFile":"../../dist/emitter/index.d.ts","version":"5.6.3"} \ No newline at end of file diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 602083eaf..6633d3217 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 665ae29951b87bfd16459cac9a776633737f4b92 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 31 Oct 2024 11:11:32 -0700 Subject: [PATCH 28/54] version --- .plugin/generator/src/OpenAI.Library.Plugin.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 6633d3217..56d0f8685 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From a6568ea69b4d34fdbb2c4cbca9ab876b9612090a Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 31 Oct 2024 11:44:52 -0700 Subject: [PATCH 29/54] Remove extra custom client constructors --- .../src/Custom/Assistants/AssistantClient.cs | 13 ++-------- .dotnet/src/Custom/Audio/AudioClient.cs | 11 -------- .dotnet/src/Custom/Batch/BatchClient.cs | 9 ------- .dotnet/src/Custom/Chat/ChatClient.cs | 11 -------- .../src/Custom/Embeddings/EmbeddingClient.cs | 11 -------- .dotnet/src/Custom/Images/ImageClient.cs | 11 -------- .../Internal/LegacyCompletionClient.cs | 13 +--------- .../Custom/Moderations/ModerationClient.cs | 11 -------- .dotnet/src/Custom/OpenAIClient.cs | 9 ------- .../Custom/VectorStores/VectorStoreClient.cs | 25 ++++++------------- 10 files changed, 11 insertions(+), 113 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 206bdd086..752397181 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -38,15 +38,6 @@ public partial class AssistantClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// is null. - public AssistantClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. @@ -276,7 +267,7 @@ public virtual ClientResult ModifyAssistant(string assistantId, Assis } /// - /// Deletes an existing . + /// Deletes an existing . /// /// The ID of the assistant to delete. /// A token that can be used to cancel this method call. @@ -291,7 +282,7 @@ public virtual async Task> DeleteAssistant } /// - /// Deletes an existing . + /// Deletes an existing . /// /// The ID of the assistant to delete. /// A token that can be used to cancel this method call. diff --git a/.dotnet/src/Custom/Audio/AudioClient.cs b/.dotnet/src/Custom/Audio/AudioClient.cs index be7fbaffb..7e0196352 100644 --- a/.dotnet/src/Custom/Audio/AudioClient.cs +++ b/.dotnet/src/Custom/Audio/AudioClient.cs @@ -34,17 +34,6 @@ public partial class AudioClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public AudioClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Added `model` parameter. // - Used a custom pipeline. diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index 5c018c51f..610e5e87c 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -36,15 +36,6 @@ public partial class BatchClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// is null. - public BatchClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. diff --git a/.dotnet/src/Custom/Chat/ChatClient.cs b/.dotnet/src/Custom/Chat/ChatClient.cs index baa636731..440144443 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.cs @@ -33,17 +33,6 @@ public partial class ChatClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ChatClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Added `model` parameter. // - Used a custom pipeline. diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs index 927d4ef4c..a1a6840b9 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs @@ -31,17 +31,6 @@ public partial class EmbeddingClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public EmbeddingClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Added `model` parameter. // - Used a custom pipeline. diff --git a/.dotnet/src/Custom/Images/ImageClient.cs b/.dotnet/src/Custom/Images/ImageClient.cs index a6d438dba..0b22075e2 100644 --- a/.dotnet/src/Custom/Images/ImageClient.cs +++ b/.dotnet/src/Custom/Images/ImageClient.cs @@ -35,17 +35,6 @@ public partial class ImageClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ImageClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Added `model` parameter. // - Used a custom pipeline. diff --git a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs index 168dc2f5c..11491662e 100644 --- a/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs +++ b/.dotnet/src/Custom/LegacyCompletions/Internal/LegacyCompletionClient.cs @@ -14,25 +14,14 @@ namespace OpenAI.LegacyCompletions; internal partial class LegacyCompletionClient { private readonly string _model; - - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public LegacyCompletionClient(string model, string apiKey) : this(model, new ApiKeyCredential(apiKey), new OpenAIClientOptions()) - { - } // CUSTOM: Added as a convenience. /// Initializes a new instance of . /// The name of the model to use in requests sent to the service. To learn more about the available models, see . /// The API key to authenticate with the service. - /// The options to configure the client. /// or is null. /// is an empty string, and was expected to be non-empty. - public LegacyCompletionClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) + public LegacyCompletionClient(string model, string apiKey) : this(model, new ApiKeyCredential(apiKey), new OpenAIClientOptions()) { } diff --git a/.dotnet/src/Custom/Moderations/ModerationClient.cs b/.dotnet/src/Custom/Moderations/ModerationClient.cs index f26f3bb3e..db42e4653 100644 --- a/.dotnet/src/Custom/Moderations/ModerationClient.cs +++ b/.dotnet/src/Custom/Moderations/ModerationClient.cs @@ -31,17 +31,6 @@ public partial class ModerationClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The name of the model to use in requests sent to the service. To learn more about the available models, see . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ModerationClient(string model, string apiKey, OpenAIClientOptions options) : this(model, new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Added `model` parameter. // - Used a custom pipeline. diff --git a/.dotnet/src/Custom/OpenAIClient.cs b/.dotnet/src/Custom/OpenAIClient.cs index b261c542b..b3a54e950 100644 --- a/.dotnet/src/Custom/OpenAIClient.cs +++ b/.dotnet/src/Custom/OpenAIClient.cs @@ -85,15 +85,6 @@ private static class KnownHeaderNames { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// is null. - public OpenAIClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index 4eac3beb8..d05728c4b 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -51,15 +51,6 @@ public partial class VectorStoreClient { } - // CUSTOM: Added as a convenience. - /// Initializes a new instance of . - /// The API key to authenticate with the service. - /// The options to configure the client. - /// is null. - public VectorStoreClient(string apiKey, OpenAIClientOptions options) : this(new ApiKeyCredential(apiKey), options) - { - } - // CUSTOM: // - Used a custom pipeline. // - Demoted the endpoint parameter to be a property in the options class. @@ -125,7 +116,7 @@ internal virtual CreateBatchFileJobOperation CreateBatchFileJobOperation(ClientR /// The to use. /// A token that can be used to cancel this method call. /// is null. - /// A that can be used to wait for + /// A that can be used to wait for /// the vector store creation to complete. public virtual async Task CreateVectorStoreAsync(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default) { @@ -141,7 +132,7 @@ public virtual async Task CreateVectorStoreAsync(boo /// The to use. /// A token that can be used to cancel this method call. /// is null. - /// A that can be used to wait for + /// A that can be used to wait for /// the vector store creation to complete. public virtual CreateVectorStoreOperation CreateVectorStore(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default) { @@ -317,7 +308,7 @@ public virtual CollectionResult GetVectorStores( /// The ID of the vector store to associate the file with. /// The ID of the file to associate with the vector store. /// A token that can be used to cancel this method call. - /// A that can be used to wait for + /// A that can be used to wait for /// the vector store file addition to complete. /// or is null. public virtual async Task AddFileToVectorStoreAsync(string vectorStoreId, string fileId, bool waitUntilCompleted, CancellationToken cancellationToken = default) @@ -339,7 +330,7 @@ public virtual async Task AddFileToVectorStoreAsy /// The ID of the vector store to associate the file with. /// The ID of the file to associate with the vector store. /// A token that can be used to cancel this method call. - /// A that can be used to wait for + /// A that can be used to wait for /// the vector store file addition to complete. /// or is null. public virtual AddFileToVectorStoreOperation AddFileToVectorStore(string vectorStoreId, string fileId, bool waitUntilCompleted, CancellationToken cancellationToken = default) @@ -519,7 +510,7 @@ public virtual ClientResult RemoveFileFromStore(stri /// The ID of the vector store to associate files with. /// The IDs of the files to associate with the vector store. /// A token that can be used to cancel this method call. - /// A that can be used to wait for + /// A that can be used to wait for /// the operation to complete, get information about the batch file job, or cancel the operation. public virtual async Task CreateBatchFileJobAsync( string vectorStoreId, @@ -546,7 +537,7 @@ public virtual async Task CreateBatchFileJobAsync( /// The ID of the vector store to associate files with. /// The IDs of the files to associate with the vector store. /// A token that can be used to cancel this method call. - /// A that can be used to wait for + /// A that can be used to wait for /// the operation to complete, get information about the batch file job, or cancel the operation. public virtual CreateBatchFileJobOperation CreateBatchFileJob( string vectorStoreId, @@ -739,7 +730,7 @@ public virtual ClientResult GetBatchFileJob(string vect /// The ID of the that is the ingestion target of the batch job being cancelled. /// /// - /// The ID of the that should be canceled. + /// The ID of the that should be canceled. /// /// A token that can be used to cancel this method call. /// An updated instance. @@ -761,7 +752,7 @@ public virtual async Task> CancelBatchFile /// The ID of the that is the ingestion target of the batch job being cancelled. /// /// - /// The ID of the that should be canceled. + /// The ID of the that should be canceled. /// /// A token that can be used to cancel this method call. /// An updated instance. From 4e46d4b34da20ee82e872df06f5c39e0476b5b49 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 31 Oct 2024 12:02:57 -0700 Subject: [PATCH 30/54] customization fixes --- .../src/Custom/Audio/GeneratedSpeechVoice.cs | 2 +- .../src/Custom/Chat/OpenAIChatModelFactory.cs | 3 +- .../StreamingChatCompletionUpdate.cs | 14 +- .../ModerationResult.Serialization.cs | 6 +- .../Custom/Moderations/ModerationResult.cs | 2 +- .../ConversationContentPart.cs | 8 +- .../ConversationContentPartKind.cs | 4 +- ...altimeClientEventResponseCreateResponse.cs | 2 +- ...onversationItemStreamingPartDeltaUpdate.cs | 2 +- ...ersationItemStreamingPartFinishedUpdate.cs | 2 +- .../MultiPartFormDataBinaryContent.cs | 195 ++++++++++++++++++ .../Models/Assistant.Serialization.cs | 4 +- .../AssistantChatMessage.Serialization.cs | 2 +- .../AssistantCreationOptions.Serialization.cs | 4 +- .../AssistantDeletionResult.Serialization.cs | 4 +- ...istantModificationOptions.Serialization.cs | 4 +- .../AssistantResponseFormat.Serialization.cs | 2 +- .../Models/AssistantThread.Serialization.cs | 6 +- .../AudioTranscription.Serialization.cs | 8 +- ...AudioTranscriptionOptions.Serialization.cs | 4 +- .../Models/AudioTranslation.Serialization.cs | 4 +- .../AudioTranslationOptions.Serialization.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 4 +- .../ChatCompletionOptions.Serialization.cs | 4 +- .../Models/ChatFunction.Serialization.cs | 4 +- .../Models/ChatFunctionCall.Serialization.cs | 4 +- .../ChatFunctionChoice.Serialization.cs | 2 +- ...hatInputTokenUsageDetails.Serialization.cs | 4 +- .../Models/ChatMessage.Serialization.cs | 6 +- .dotnet/src/Generated/Models/ChatMessage.cs | 2 +- .../ChatMessageContent.Serialization.cs | 130 ++++++++++++ .../ChatMessageContentPart.Serialization.cs | 2 +- ...atOutputTokenUsageDetails.Serialization.cs | 4 +- .../ChatResponseFormat.Serialization.cs | 4 +- .../Generated/Models/ChatResponseFormat.cs | 2 +- ...okenLogProbabilityDetails.Serialization.cs | 4 +- ...nTopLogProbabilityDetails.Serialization.cs | 4 +- .../Models/ChatTokenUsage.Serialization.cs | 4 +- .../Models/ChatTool.Serialization.cs | 4 +- .../Models/ChatToolCall.Serialization.cs | 4 +- .../Models/ChatToolChoice.Serialization.cs | 2 +- ...InterpreterToolDefinition.Serialization.cs | 2 +- ...eInterpreterToolResources.Serialization.cs | 4 +- .../ConversationContentPart.Serialization.cs | 2 +- .../ConversationErrorUpdate.Serialization.cs | 2 +- .../ConversationFunctionTool.Serialization.cs | 2 +- ...onInputAudioClearedUpdate.Serialization.cs | 2 +- ...InputAudioCommittedUpdate.Serialization.cs | 2 +- ...InputSpeechFinishedUpdate.Serialization.cs | 2 +- ...nInputSpeechStartedUpdate.Serialization.cs | 2 +- ...ionInputTokenUsageDetails.Serialization.cs | 4 +- ...TranscriptionFailedUpdate.Serialization.cs | 2 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...InputTranscriptionOptions.Serialization.cs | 4 +- .../Models/ConversationItem.Serialization.cs | 2 +- ...ersationItemCreatedUpdate.Serialization.cs | 2 +- ...ersationItemDeletedUpdate.Serialization.cs | 2 +- ...eamingAudioFinishedUpdate.Serialization.cs | 2 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...emStreamingFinishedUpdate.Serialization.cs | 2 +- ...temStreamingStartedUpdate.Serialization.cs | 2 +- ...reamingTextFinishedUpdate.Serialization.cs | 2 +- ...sationItemTruncatedUpdate.Serialization.cs | 2 +- ...onOutputTokenUsageDetails.Serialization.cs | 4 +- ...ationRateLimitDetailsItem.Serialization.cs | 4 +- ...versationRateLimitsUpdate.Serialization.cs | 2 +- ...ionResponseFinishedUpdate.Serialization.cs | 2 +- ...tionResponseStartedUpdate.Serialization.cs | 2 +- ...onSessionConfiguredUpdate.Serialization.cs | 2 +- ...onversationSessionOptions.Serialization.cs | 4 +- ...ationSessionStartedUpdate.Serialization.cs | 2 +- ...ConversationStatusDetails.Serialization.cs | 4 +- .../ConversationTokenUsage.Serialization.cs | 4 +- .../Models/ConversationTool.Serialization.cs | 2 +- ...ationTurnDetectionOptions.Serialization.cs | 2 +- .../ConversationUpdate.Serialization.cs | 2 +- ...mbeddingGenerationOptions.Serialization.cs | 4 +- .../EmbeddingTokenUsage.Serialization.cs | 4 +- .../FileChunkingStrategy.Serialization.cs | 2 +- .../FileDeletionResult.Serialization.cs | 4 +- ...ileFromStoreRemovalResult.Serialization.cs | 4 +- .../FileSearchRankingOptions.Serialization.cs | 4 +- .../FileSearchToolDefinition.Serialization.cs | 2 +- .../FileSearchToolResources.Serialization.cs | 4 +- .../FineTuningIntegration.Serialization.cs | 2 +- ...ningIntegrationWandbWandb.Serialization.cs | 4 +- .../Models/FineTuningJob.Serialization.cs | 4 +- .../FineTuningJobError.Serialization.cs | 4 +- .../FineTuningJobEvent.Serialization.cs | 4 +- ...eTuningJobHyperparameters.Serialization.cs | 4 +- .../Models/FineTuningOptions.Serialization.cs | 4 +- .../FunctionChatMessage.Serialization.cs | 2 +- .../FunctionToolDefinition.Serialization.cs | 2 +- .../Models/GeneratedImage.Serialization.cs | 4 +- .../GeneratedImageCollection.Serialization.cs | 2 +- .../HyperparameterOptions.Serialization.cs | 4 +- .../Models/ImageEditOptions.Serialization.cs | 4 +- .../ImageGenerationOptions.Serialization.cs | 4 +- .../ImageVariationOptions.Serialization.cs | 4 +- ...ernalAddUploadPartRequest.Serialization.cs | 4 +- ...tResponseFormatJsonObject.Serialization.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...sistantResponseFormatText.Serialization.cs | 2 +- ...ToolsFileSearchFileSearch.Serialization.cs | 4 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 4 +- ...tsNamedToolChoiceFunction.Serialization.cs | 4 +- ...ernalAutoChunkingStrategy.Serialization.cs | 2 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- .../InternalBatchError.Serialization.cs | 4 +- .../InternalBatchErrors.Serialization.cs | 4 +- .../Models/InternalBatchJob.Serialization.cs | 4 +- ...nternalBatchRequestCounts.Serialization.cs | 4 +- ...InternalBatchRequestInput.Serialization.cs | 4 +- ...nternalBatchRequestOutput.Serialization.cs | 4 +- ...alBatchRequestOutputError.Serialization.cs | 4 +- ...atchRequestOutputResponse.Serialization.cs | 4 +- ...pletionFunctionCallOption.Serialization.cs | 4 +- ...sageToolCallChunkFunction.Serialization.cs | 4 +- ...onMessageToolCallFunction.Serialization.cs | 4 +- ...CompletionNamedToolChoice.Serialization.cs | 4 +- ...onNamedToolChoiceFunction.Serialization.cs | 4 +- ...stMessageContentPartImage.Serialization.cs | 4 +- ...eContentPartImageImageUrl.Serialization.cs | 4 +- ...MessageContentPartRefusal.Serialization.cs | 4 +- ...estMessageContentPartText.Serialization.cs | 4 +- ...CompletionResponseMessage.Serialization.cs | 6 +- ...sponseMessageFunctionCall.Serialization.cs | 4 +- ...atCompletionStreamOptions.Serialization.cs | 4 +- ...letionStreamResponseDelta.Serialization.cs | 8 +- ...ternalChatCompletionStreamResponseDelta.cs | 4 +- ...tResponseFormatJsonObject.Serialization.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...nalChatResponseFormatText.Serialization.cs | 2 +- ...rnalCompleteUploadRequest.Serialization.cs | 4 +- ...stantRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...nternalCreateBatchRequest.Serialization.cs | 4 +- ...ompletionFunctionResponse.Serialization.cs | 4 +- ...ionFunctionResponseChoice.Serialization.cs | 4 +- ...tCompletionResponseChoice.Serialization.cs | 4 +- ...ionResponseChoiceLogprobs.Serialization.cs | 8 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- ...eamResponseChoiceLogprobs.Serialization.cs | 16 +- ...tCompletionStreamResponseChoiceLogprobs.cs | 14 +- ...letionStreamResponseUsage.Serialization.cs | 4 +- ...alCreateCompletionRequest.Serialization.cs | 4 +- ...lCreateCompletionResponse.Serialization.cs | 4 +- ...eCompletionResponseChoice.Serialization.cs | 4 +- ...ionResponseChoiceLogprobs.Serialization.cs | 4 +- ...uestWandbIntegrationWandb.Serialization.cs | 4 +- ...teModerationRequestInput2.Serialization.cs | 4 +- ...teModerationRequestInput3.Serialization.cs | 4 +- ...ationRequestInputImageUrl.Serialization.cs | 4 +- ...CategoryAppliedInputTypes.Serialization.cs | 4 +- ...CreateThreadAndRunRequest.Serialization.cs | 4 +- ...ndRunRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...hreadRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...olResourcesFileSearchBase.Serialization.cs | 4 +- ...TranscriptionResponseJson.Serialization.cs | 4 +- ...teTranslationResponseJson.Serialization.cs | 4 +- ...ternalCreateUploadRequest.Serialization.cs | 4 +- ...ctorStoreFileBatchRequest.Serialization.cs | 4 +- ...ateVectorStoreFileRequest.Serialization.cs | 4 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...InternalFileUploadOptions.Serialization.cs | 4 +- ...onRequestAssistantMessage.Serialization.cs | 2 +- ...rnalFineTuningIntegration.Serialization.cs | 2 +- ...ineTuningIntegrationWandb.Serialization.cs | 2 +- ...alFineTuningJobCheckpoint.Serialization.cs | 4 +- ...uningJobCheckpointMetrics.Serialization.cs | 4 +- ...lFinetuneChatRequestInput.Serialization.cs | 4 +- ...uneCompletionRequestInput.Serialization.cs | 4 +- ...nternalFunctionDefinition.Serialization.cs | 4 +- ...nalListAssistantsResponse.Serialization.cs | 6 +- ...ternalListBatchesResponse.Serialization.cs | 4 +- ...ingJobCheckpointsResponse.Serialization.cs | 4 +- ...neTuningJobEventsResponse.Serialization.cs | 4 +- ...ernalListMessagesResponse.Serialization.cs | 6 +- ...tedFineTuningJobsResponse.Serialization.cs | 4 +- ...ernalListRunStepsResponse.Serialization.cs | 6 +- .../InternalListRunsResponse.Serialization.cs | 6 +- ...ternalListThreadsResponse.Serialization.cs | 6 +- ...tVectorStoreFilesResponse.Serialization.cs | 6 +- ...lListVectorStoresResponse.Serialization.cs | 6 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...ntItemFileObjectImageFile.Serialization.cs | 4 +- ...tationsFileCitationObject.Serialization.cs | 2 +- ...itationObjectFileCitation.Serialization.cs | 4 +- ...AnnotationsFilePathObject.Serialization.cs | 2 +- ...onsFilePathObjectFilePath.Serialization.cs | 4 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...sageContentTextObjectText.Serialization.cs | 4 +- ...ternalMessageDeltaContent.Serialization.cs | 2 +- ...ltaContentImageFileObject.Serialization.cs | 2 +- ...tImageFileObjectImageFile.Serialization.cs | 4 +- ...eltaContentImageUrlObject.Serialization.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...DeltaContentRefusalObject.Serialization.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 2 +- ...itationObjectFileCitation.Serialization.cs | 4 +- ...AnnotationsFilePathObject.Serialization.cs | 2 +- ...onsFilePathObjectFilePath.Serialization.cs | 4 +- ...ageDeltaContentTextObject.Serialization.cs | 2 +- ...eltaContentTextObjectText.Serialization.cs | 4 +- ...nternalMessageDeltaObject.Serialization.cs | 4 +- ...alMessageDeltaObjectDelta.Serialization.cs | 4 +- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 2 +- ...nalMessageImageUrlContent.Serialization.cs | 2 +- ...alMessageObjectAttachment.Serialization.cs | 4 +- ...rnalMessageRefusalContent.Serialization.cs | 2 +- ...ernalModerationCategories.Serialization.cs | 4 +- ...lModerationCategoryScores.Serialization.cs | 4 +- ...stantRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...hreadRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...alOmniTypedResponseFormat.Serialization.cs | 2 +- ...ternalRealtimeClientEvent.Serialization.cs | 2 +- ...entConversationItemCreate.Serialization.cs | 2 +- ...entConversationItemDelete.Serialization.cs | 2 +- ...tConversationItemTruncate.Serialization.cs | 2 +- ...entInputAudioBufferAppend.Serialization.cs | 2 +- ...ventInputAudioBufferClear.Serialization.cs | 2 +- ...entInputAudioBufferCommit.Serialization.cs | 2 +- ...ClientEventResponseCancel.Serialization.cs | 2 +- ...ClientEventResponseCreate.Serialization.cs | 2 +- ...entResponseCreateResponse.Serialization.cs | 4 +- ...eClientEventSessionUpdate.Serialization.cs | 2 +- ...questAssistantMessageItem.Serialization.cs | 2 +- ...meRequestAudioContentPart.Serialization.cs | 2 +- ...meRequestFunctionCallItem.Serialization.cs | 2 +- ...estFunctionCallOutputItem.Serialization.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...eRequestSystemMessageItem.Serialization.cs | 2 +- ...imeRequestTextContentPart.Serialization.cs | 2 +- ...imeRequestUserMessageItem.Serialization.cs | 2 +- .../InternalRealtimeResponse.Serialization.cs | 4 +- ...eResponseAudioContentPart.Serialization.cs | 2 +- ...eResponseFunctionCallItem.Serialization.cs | 2 +- ...nseFunctionCallOutputItem.Serialization.cs | 2 +- ...ernalRealtimeResponseItem.Serialization.cs | 2 +- ...altimeResponseMessageItem.Serialization.cs | 4 +- ...alRealtimeResponseSession.Serialization.cs | 6 +- ...meResponseTextContentPart.Serialization.cs | 2 +- ...rEventConversationCreated.Serialization.cs | 2 +- ...sationCreatedConversation.Serialization.cs | 4 +- ...oTranscriptionFailedError.Serialization.cs | 4 +- ...timeServerEventErrorError.Serialization.cs | 4 +- ...erEventResponseAudioDelta.Serialization.cs | 2 +- ...ponseAudioTranscriptDelta.Serialization.cs | 2 +- ...tResponseContentPartAdded.Serialization.cs | 2 +- ...ntResponseContentPartDone.Serialization.cs | 2 +- ...unctionCallArgumentsDelta.Serialization.cs | 2 +- ...FunctionCallArgumentsDone.Serialization.cs | 2 +- ...verEventResponseTextDelta.Serialization.cs | 2 +- ...imeServerVadTurnDetection.Serialization.cs | 2 +- ...eToolChoiceFunctionObject.Serialization.cs | 2 +- ...iceFunctionObjectFunction.Serialization.cs | 4 +- ...lRealtimeToolChoiceObject.Serialization.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 2 +- ...lRequiredFunctionToolCall.Serialization.cs | 4 +- ...lResponseFormatJsonObject.Serialization.cs | 2 +- ...lResponseFormatJsonSchema.Serialization.cs | 2 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 4 +- ...nternalResponseFormatText.Serialization.cs | 2 +- ...esponseMessageTextContent.Serialization.cs | 2 +- ...edActionSubmitToolOutputs.Serialization.cs | 6 +- ...InternalRunRequiredAction.Serialization.cs | 4 +- ...pCodeInterpreterLogOutput.Serialization.cs | 2 +- ...nterpreterToolCallDetails.Serialization.cs | 2 +- .../InternalRunStepDelta.Serialization.cs | 4 +- ...alRunStepDeltaObjectDelta.Serialization.cs | 4 +- ...alRunStepDeltaStepDetails.Serialization.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...tionObjectMessageCreation.Serialization.cs | 4 +- ...etailsToolCallsCodeObject.Serialization.cs | 2 +- ...CodeObjectCodeInterpreter.Serialization.cs | 6 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...odeOutputImageObjectImage.Serialization.cs | 4 +- ...CallsCodeOutputLogsObject.Serialization.cs | 2 +- ...ToolCallsFileSearchObject.Serialization.cs | 2 +- ...lsToolCallsFunctionObject.Serialization.cs | 2 +- ...llsFunctionObjectFunction.Serialization.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...tionObjectMessageCreation.Serialization.cs | 4 +- ...CodeObjectCodeInterpreter.Serialization.cs | 6 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...odeOutputImageObjectImage.Serialization.cs | 4 +- ...ileSearchObjectFileSearch.Serialization.cs | 6 +- ...earchRankingOptionsObject.Serialization.cs | 4 +- ...SearchResultObjectContent.Serialization.cs | 4 +- ...llsFunctionObjectFunction.Serialization.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...FileSearchToolCallDetails.Serialization.cs | 2 +- ...epFunctionToolCallDetails.Serialization.cs | 2 +- ...RunToolCallObjectFunction.Serialization.cs | 4 +- ...icChunkingStrategyDetails.Serialization.cs | 4 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...bmitToolOutputsRunRequest.Serialization.cs | 4 +- ...ThreadObjectToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...ctToolResourcesFileSearch.Serialization.cs | 4 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 4 +- ...wnAssistantResponseFormat.Serialization.cs | 2 +- ...nternalUnknownChatMessage.Serialization.cs | 2 +- ...UnknownChatResponseFormat.Serialization.cs | 2 +- ...alUnknownChunkingStrategy.Serialization.cs | 2 +- ...StrategyRequestParamProxy.Serialization.cs | 2 +- ...trategyResponseParamProxy.Serialization.cs | 2 +- ...wnOmniTypedResponseFormat.Serialization.cs | 2 +- .../Models/InternalUpload.Serialization.cs | 4 +- .../InternalUploadPart.Serialization.cs | 4 +- ...FileBatchObjectFileCounts.Serialization.cs | 4 +- .../Models/MessageContent.Serialization.cs | 2 +- ...MessageCreationAttachment.Serialization.cs | 4 +- .../MessageCreationOptions.Serialization.cs | 4 +- .../MessageDeletionResult.Serialization.cs | 4 +- .../MessageFailureDetails.Serialization.cs | 4 +- ...essageModificationOptions.Serialization.cs | 4 +- .../ModelDeletionResult.Serialization.cs | 4 +- .../Models/ModerationOptions.Serialization.cs | 4 +- .../Models/ModerationResult.Serialization.cs | 2 +- ...oderationResultCollection.Serialization.cs | 2 +- .../Models/OpenAIEmbedding.Serialization.cs | 4 +- ...OpenAIEmbeddingCollection.Serialization.cs | 2 +- .../Models/OpenAIError.Serialization.cs | 4 +- .../OpenAIErrorResponse.Serialization.cs | 4 +- .../Models/OpenAIFile.Serialization.cs | 4 +- .../OpenAIFileCollection.Serialization.cs | 2 +- .../Models/OpenAIModel.Serialization.cs | 4 +- .../OpenAIModelCollection.Serialization.cs | 2 +- .../RunCreationOptions.Serialization.cs | 4 +- .../Models/RunError.Serialization.cs | 4 +- .../RunIncompleteDetails.Serialization.cs | 4 +- .../RunModificationOptions.Serialization.cs | 4 +- .../Generated/Models/RunStep.Serialization.cs | 4 +- ...StepCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunStepDetails.Serialization.cs | 2 +- .../Models/RunStepError.Serialization.cs | 4 +- .../RunStepFileSearchResult.Serialization.cs | 4 +- .../Models/RunStepTokenUsage.Serialization.cs | 4 +- .../Models/RunStepToolCall.Serialization.cs | 2 +- ...dateCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunTokenUsage.Serialization.cs | 4 +- .../RunTruncationStrategy.Serialization.cs | 4 +- .../SpeechGenerationOptions.Serialization.cs | 4 +- ...taticFileChunkingStrategy.Serialization.cs | 2 +- ...amingChatCompletionUpdate.Serialization.cs | 4 +- ...ingChatFunctionCallUpdate.Serialization.cs | 4 +- ...reamingChatToolCallUpdate.Serialization.cs | 4 +- .../Models/SystemChatMessage.Serialization.cs | 2 +- .../ThreadCreationOptions.Serialization.cs | 4 +- .../ThreadDeletionResult.Serialization.cs | 4 +- .../Models/ThreadMessage.Serialization.cs | 4 +- ...ThreadModificationOptions.Serialization.cs | 4 +- .../Models/ThreadRun.Serialization.cs | 4 +- .../Models/ToolChatMessage.Serialization.cs | 2 +- .../Models/ToolConstraint.Serialization.cs | 2 +- .../Models/ToolDefinition.Serialization.cs | 2 +- .../Models/ToolOutput.Serialization.cs | 4 +- .../Models/ToolResources.Serialization.cs | 4 +- .../TranscribedSegment.Serialization.cs | 4 +- .../Models/TranscribedWord.Serialization.cs | 4 +- ...wnAssistantToolDefinition.Serialization.cs | 2 +- ...ningJobRequestIntegration.Serialization.cs | 2 +- ...nownFineTuningIntegration.Serialization.cs | 2 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...nknownMessageDeltaContent.Serialization.cs | 2 +- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...nknownRealtimeClientEvent.Serialization.cs | 2 +- ...nknownRealtimeContentPart.Serialization.cs | 2 +- ...nknownRealtimeRequestItem.Serialization.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...knownRealtimeResponseItem.Serialization.cs | 2 +- ...nknownRealtimeServerEvent.Serialization.cs | 2 +- .../UnknownRealtimeTool.Serialization.cs | 2 +- ...nRealtimeToolChoiceObject.Serialization.cs | 2 +- ...nownRealtimeTurnDetection.Serialization.cs | 2 +- ...wnRunStepDeltaStepDetails.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...nRunStepObjectStepDetails.Serialization.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 2 +- .../Models/VectorStore.Serialization.cs | 4 +- .../VectorStoreBatchFileJob.Serialization.cs | 4 +- ...VectorStoreCreationHelper.Serialization.cs | 4 +- ...ectorStoreCreationOptions.Serialization.cs | 4 +- ...VectorStoreDeletionResult.Serialization.cs | 4 +- ...ctorStoreExpirationPolicy.Serialization.cs | 4 +- ...ectorStoreFileAssociation.Serialization.cs | 4 +- ...StoreFileAssociationError.Serialization.cs | 4 +- .../VectorStoreFileCounts.Serialization.cs | 4 +- ...rStoreModificationOptions.Serialization.cs | 4 +- ...ightsAndBiasesIntegration.Serialization.cs | 2 +- .typespec/chat/client.tsp | 3 +- .typespec/chat/models.tsp | 2 + 403 files changed, 991 insertions(+), 666 deletions(-) create mode 100644 .dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs create mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs diff --git a/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs b/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs index eaa900361..cecbea1bb 100644 --- a/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs +++ b/.dotnet/src/Custom/Audio/GeneratedSpeechVoice.cs @@ -6,6 +6,6 @@ namespace OpenAI.Audio; /// text-to-speech guide. /// [CodeGenModel("CreateSpeechRequestVoice")] -public partial struct GeneratedSpeechVoice +public readonly partial struct GeneratedSpeechVoice { } \ No newline at end of file diff --git a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs index a96c90019..0a0086a61 100644 --- a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs +++ b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs @@ -97,6 +97,7 @@ public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int inputTokenCount, totalTokenCount, outputTokenDetails, + inputTokenDetails, additionalBinaryDataProperties: null); } @@ -104,7 +105,7 @@ public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int /// A new instance for mocking. public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default, int? audioTokenCount = null) { - return new ChatOutputTokenUsageDetails(reasoningTokenCount, additionalBinaryDataProperties: null); + return new ChatOutputTokenUsageDetails(reasoningTokenCount, audioTokenCount, additionalBinaryDataProperties: null); } /// Initializes a new instance of . diff --git a/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs b/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs index 6e5cb765c..54441795b 100644 --- a/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs +++ b/.dotnet/src/Custom/Chat/Streaming/StreamingChatCompletionUpdate.cs @@ -8,9 +8,9 @@ namespace OpenAI.Chat; public partial class StreamingChatCompletionUpdate { private ChatMessageContent _contentUpdate; - private IList _toolCallUpdates; - private IList _contentTokenLogProbabilities; - private IList _refusalTokenLogProbabilities; + private IReadOnlyList _toolCallUpdates; + private IReadOnlyList _contentTokenLogProbabilities; + private IReadOnlyList _refusalTokenLogProbabilities; internal InternalCreateChatCompletionStreamResponseChoice InternalChoice => (Choices.Count > 0) ? Choices[0] : null; internal InternalChatCompletionStreamResponseDelta InternalChoiceDelta => InternalChoice?.Delta; @@ -70,14 +70,14 @@ public partial class StreamingChatCompletionUpdate // CUSTOM: Flattened choice logprobs property. /// The message content tokens with log probability information. - public IList ContentTokenLogProbabilities => + public IReadOnlyList ContentTokenLogProbabilities => _contentTokenLogProbabilities ??= InternalChoice?.Logprobs?.Content ?? new ChangeTrackingList(); // CUSTOM: Flattened choice logprobs property. /// The message refusal tokens with log probability information. - public IList RefusalTokenLogProbabilities => + public IReadOnlyList RefusalTokenLogProbabilities => _refusalTokenLogProbabilities ??= InternalChoice?.Logprobs?.Refusal ?? new ChangeTrackingList(); @@ -89,7 +89,7 @@ public partial class StreamingChatCompletionUpdate // CUSTOM: Flattened choice delta property. /// The contents of the message update. - /// + /// /// Each streaming update contains only a small portion of tokens. To reconstitute the entire chat completion, /// all values across streaming updates must be combined. /// @@ -100,7 +100,7 @@ public partial class StreamingChatCompletionUpdate // CUSTOM: Flattened choice delta property. /// The tool calls generated by the model, such as function calls. - public IList ToolCallUpdates + public IReadOnlyList ToolCallUpdates => _toolCallUpdates ??= InternalChoiceDelta?.ToolCalls ?? new ChangeTrackingList(); diff --git a/.dotnet/src/Custom/Moderations/ModerationResult.Serialization.cs b/.dotnet/src/Custom/Moderations/ModerationResult.Serialization.cs index 2088857a5..b82fc4eb5 100644 --- a/.dotnet/src/Custom/Moderations/ModerationResult.Serialization.cs +++ b/.dotnet/src/Custom/Moderations/ModerationResult.Serialization.cs @@ -42,7 +42,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter sexualMinors: SexualMinors.Flagged, violence: Violence.Flagged, violenceGraphic: ViolenceGraphic.Flagged, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); writer.WriteObjectValue(internalCategories, options); } if (SerializedAdditionalRawData?.ContainsKey("category_scores") != true) @@ -62,7 +62,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter sexualMinors: SexualMinors.Score, violence: Violence.Score, violenceGraphic: ViolenceGraphic.Score, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); writer.WriteObjectValue(internalCategoryScores, options); } if (SerializedAdditionalRawData?.ContainsKey("category_applied_input_types") != true) @@ -82,7 +82,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter sexualMinors: SexualMinors.ApplicableInputKinds.ToInternalApplicableInputKinds(), violence: Violence.ApplicableInputKinds.ToInternalApplicableInputKinds(), violenceGraphic: ViolenceGraphic.ApplicableInputKinds.ToInternalApplicableInputKinds(), - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); writer.WriteObjectValue(internalAppliedInputTypes, options); } if (SerializedAdditionalRawData != null) diff --git a/.dotnet/src/Custom/Moderations/ModerationResult.cs b/.dotnet/src/Custom/Moderations/ModerationResult.cs index 432f0b36b..3a4694cb5 100644 --- a/.dotnet/src/Custom/Moderations/ModerationResult.cs +++ b/.dotnet/src/Custom/Moderations/ModerationResult.cs @@ -13,7 +13,7 @@ namespace OpenAI.Moderations; [CodeGenSuppress(nameof(ModerationResult), typeof(bool), typeof(InternalModerationCategories), typeof(InternalModerationCategoryScores), typeof(InternalCreateModerationResponseResultCategoryAppliedInputTypes), typeof(IDictionary))] public partial class ModerationResult { - internal ModerationResult(bool flagged, ModerationCategory hate, ModerationCategory hateThreatening, ModerationCategory harassment, ModerationCategory harassmentThreatening, ModerationCategory selfHarm, ModerationCategory selfHarmIntent, ModerationCategory selfHarmInstructions, ModerationCategory sexual, ModerationCategory sexualMinors, ModerationCategory violence, ModerationCategory violenceGraphic) + internal ModerationResult(bool flagged, ModerationCategory hate, ModerationCategory hateThreatening, ModerationCategory harassment, ModerationCategory harassmentThreatening, ModerationCategory illicit, ModerationCategory illicitViolent, ModerationCategory selfHarm, ModerationCategory selfHarmIntent, ModerationCategory selfHarmInstructions, ModerationCategory sexual, ModerationCategory sexualMinors, ModerationCategory violence, ModerationCategory violenceGraphic) { Flagged = flagged; Hate = hate; diff --git a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs index 6c0b7ae78..4be6356fb 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPart.cs @@ -17,15 +17,15 @@ public partial class ConversationContentPart ?? (this as InternalRealtimeResponseAudioContentPart)?.InternalTranscriptValue; public static ConversationContentPart FromInputText(string text) - => new InternalRealtimeRequestTextContentPart(text, ConversationContentPartKind.Text); + => new InternalRealtimeRequestTextContentPart(text); public static ConversationContentPart FromInputAudioTranscript(string transcript = null) => new InternalRealtimeRequestAudioContentPart() { - Transcript = transcript, + InternalTranscriptValue = transcript, }; public static ConversationContentPart FromOutputText(string text) - => new InternalRealtimeResponseTextContentPart(text, ConversationContentPartKind.Text); + => new InternalRealtimeResponseTextContentPart(text); public static ConversationContentPart FromOutputAudioTranscript(string transcript = null) - => new InternalRealtimeResponseAudioContentPart(transcript, ConversationContentPartKind.Audio); + => new InternalRealtimeResponseAudioContentPart(transcript); public static implicit operator ConversationContentPart(string text) => FromInputText(text); } \ No newline at end of file diff --git a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPartKind.cs b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPartKind.cs index fab135e12..75adf721b 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ConversationContentPartKind.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ConversationContentPartKind.cs @@ -9,8 +9,8 @@ namespace OpenAI.RealtimeConversation; public readonly partial struct ConversationContentPartKind { [CodeGenMember("Audio")] - public static ConversationContentPartKind OutputAudio { get; } = new(OutputAudioValue); + public static ConversationContentPartKind OutputAudio { get; } = new(AudioValue); [CodeGenMember("Text")] - public static ConversationContentPartKind OutputText { get; } = new(OutputTextValue); + public static ConversationContentPartKind OutputText { get; } = new(TextValue); } \ No newline at end of file diff --git a/.dotnet/src/Custom/RealtimeConversation/Internal/InternalRealtimeClientEventResponseCreateResponse.cs b/.dotnet/src/Custom/RealtimeConversation/Internal/InternalRealtimeClientEventResponseCreateResponse.cs index 46a1d56ed..b4338272c 100644 --- a/.dotnet/src/Custom/RealtimeConversation/Internal/InternalRealtimeClientEventResponseCreateResponse.cs +++ b/.dotnet/src/Custom/RealtimeConversation/Internal/InternalRealtimeClientEventResponseCreateResponse.cs @@ -43,7 +43,7 @@ IList internalModalities toolChoice: toolChoice, temperature: sessionOptions.Temperature, maxOutputTokens: maxTokensChoice, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); return internalOptions; } } diff --git a/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartDeltaUpdate.cs b/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartDeltaUpdate.cs index fa0a9c0db..2d26b128f 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartDeltaUpdate.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartDeltaUpdate.cs @@ -72,7 +72,7 @@ public string FunctionArguments => _functionArgumentsDelta?.Delta; internal ConversationItemStreamingPartDeltaUpdate(ConversationUpdate baseUpdate) - : base(baseUpdate.Kind, baseUpdate.EventId, serializedAdditionalRawData: null) + : base(baseUpdate.EventId, baseUpdate.Kind, additionalBinaryDataProperties: null) { _contentPartAdded = baseUpdate as InternalRealtimeServerEventResponseContentPartAdded; _audioDelta = baseUpdate as InternalRealtimeServerEventResponseAudioDelta; diff --git a/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartFinishedUpdate.cs b/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartFinishedUpdate.cs index 085da7027..11636b082 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartFinishedUpdate.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ResponseUpdates/ConversationItemStreamingPartFinishedUpdate.cs @@ -42,7 +42,7 @@ public int ContentPartIndex internal ConversationItemStreamingPartFinishedUpdate(ConversationUpdate baseUpdate) - : base(baseUpdate.Kind, baseUpdate.EventId, serializedAdditionalRawData: null) + : base(baseUpdate.EventId, baseUpdate.Kind, additionalBinaryDataProperties: null) { _contentPartDone = baseUpdate as InternalRealtimeServerEventResponseContentPartDone; _functionCallArgumentsDone = baseUpdate as InternalRealtimeServerEventResponseFunctionCallArgumentsDone; diff --git a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs new file mode 100644 index 000000000..945fc05aa --- /dev/null +++ b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs @@ -0,0 +1,195 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.Globalization; +using System.IO; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenAI +{ + internal partial class MultiPartFormDataBinaryContent : BinaryContent + { + private readonly MultipartFormDataContent _multipartContent; + private static readonly Random _random = new Random(); + private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); + + public MultiPartFormDataBinaryContent() + { + _multipartContent = new MultipartFormDataContent(CreateBoundary()); + } + + public string ContentType + { + get + { + return _multipartContent.Headers.ContentType.ToString(); + } + } + + internal HttpContent HttpContent => _multipartContent; + + private static string CreateBoundary() + { + Span chars = new char[70]; + byte[] random = new byte[70]; + _random.NextBytes(random); + int mask = 255 >> 2; + int i = 0; + for (; i < 70; i++) + { + chars[i] = _boundaryValues[random[i] & mask]; + } + return chars.ToString(); + } + + public void Add(string content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StringContent(content), name, filename, contentType); + } + + public void Add(int content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(long content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(float content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(double content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(decimal content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(bool content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content ? "true" : "false"; + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(Stream content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StreamContent(content), name, filename, contentType); + } + + public void Add(byte[] content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content), name, filename, contentType); + } + + public void Add(BinaryData content, string name, string filename = default, string contentType = default) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); + } + + private void Add(HttpContent content, string name, string filename, string contentType) + { + if (contentType != null) + { + Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); + AddContentTypeHeader(content, contentType); + } + if (filename != null) + { + Argument.AssertNotNullOrEmpty(filename, nameof(filename)); + _multipartContent.Add(content, name, filename); + } + else + { + _multipartContent.Add(content, name); + } + } + + public static void AddContentTypeHeader(HttpContent content, string contentType) + { + MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); + content.Headers.ContentType = header; + } + + public override bool TryComputeLength(out long length) + { + if (_multipartContent.Headers.ContentLength is long contentLength) + { + length = contentLength; + return true; + } + length = 0; + return false; + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + _multipartContent.CopyTo(stream, default, cancellationToken); +#else + _multipartContent.CopyToAsync(stream).GetAwaiter().GetResult(); +#endif + } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); +#else + await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); +#endif + } + + public override void Dispose() + { + _multipartContent.Dispose(); + } + } +} diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index cf709ad43..84848d76f 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -168,7 +168,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -346,7 +346,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index cb20a20e8..0c6188dd0 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -139,7 +139,7 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index b74e1cf0e..f64e29236 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index d6203fb79..3eb956140 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index d60696f6a..3f71b35d2 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index 8b20f6949..2fff8f967 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index d2c44e115..d612c6142 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -81,7 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -176,7 +176,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index 8ed9f26bb..9a26e56a9 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index e1b79d7df..6b94dbd96 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -79,7 +79,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J internalTimestampGranularities = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index cc0d8e20a..836140b5c 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -143,7 +143,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index d127fe2aa..adca488bc 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 4d1bde5ac..48b2f1033 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 8f1a29eca..2391f201a 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -297,7 +297,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("serviceTier"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -621,7 +621,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index e3b1e78f5..c04472397 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR functionParameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index e5f6142b7..220a7e9a0 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsValue(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element DeserializeFunctionArgumentsValue(prop, ref functionArguments); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index 4ec64d73c..3ecb3dc4c 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs index 0d2c370bf..f86a06046 100644 --- a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("cached_tokens"u8); writer.WriteNumberValue(CachedTokenCount.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ChatInputTokenUsageDetails DeserializeChatInputTokenUsageDetails cachedTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 85592d6ce..09b972a5d 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatMessage))] - public partial class ChatMessage : IJsonModel + public abstract partial class ChatMessage : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,12 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.ToSerialString()); } - if (true && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (options.Format != "W" && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); this.SerializeContentValue(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index 368ee1c8d..f332e4ff5 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public partial class ChatMessage + public abstract partial class ChatMessage { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs new file mode 100644 index 000000000..c0df95239 --- /dev/null +++ b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs @@ -0,0 +1,130 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.Chat +{ + public partial class ChatMessageContent : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + if (ModelSerializationExtensions.IsSentinelValue(item.Value)) + { + continue; + } + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ChatMessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + protected virtual ChatMessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeChatMessageContent(document.RootElement, options); + } + + internal static ChatMessageContent DeserializeChatMessageContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ChatMessageContent(additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{options.Format}' format."); + } + } + + ChatMessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + protected virtual ChatMessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeChatMessageContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + public static implicit operator BinaryContent(ChatMessageContent chatMessageContent) + { + if (chatMessageContent == null) + { + return null; + } + return BinaryContent.Create(chatMessageContent, ModelSerializationExtensions.WireOptions); + } + + public static explicit operator ChatMessageContent(ClientResult result) + { + using PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeChatMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index 2cfaddfd1..18ef8d150 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 06c552a79..0684dd2c1 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokenCount.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai audioTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index e2f4a00c5..516c68d06 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatResponseFormat))] - public partial class ChatResponseFormat : IJsonModel + public abstract partial class ChatResponseFormat : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,7 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index a904c8862..e808477d9 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public partial class ChatResponseFormat + public abstract partial class ChatResponseFormat { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index be762ab42..90d022545 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit topLogProbabilities = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index 3e4872d39..e3e9cd6d2 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("bytes"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb utf8Bytes = new ReadOnlyMemory(array); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index d8b52c91e..80bd18fc0 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("prompt_tokens_details"u8); writer.WriteObjectValue(InputTokenDetails, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -137,7 +137,7 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo inputTokenDetails = ChatInputTokenUsageDetails.DeserializeChatInputTokenUsageDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 42c658144..78ea361f6 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri kind = prop.Value.GetString().ToChatToolKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index c7cc7b0e2..a53e1a7cc 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR kind = prop.Value.GetString().ToChatToolCallKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index f775a36af..9d5db01ba 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatToolChoice)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs index 92cb9c4ec..16e6254ee 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs @@ -51,7 +51,7 @@ internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefi @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 6798b11b8..34c802cfc 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResou fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index 76090d28a..0cf28775d 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 47907be5c..9984dcc5e 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index aeb95f8c1..f01e5c40b 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -102,7 +102,7 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs index bb8ffc40d..bcd5681d0 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs @@ -73,7 +73,7 @@ internal static ConversationInputAudioClearedUpdate DeserializeConversationInput kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs index 61c5447c9..8028cac70 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index e5eed1517..b723d85b5 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 5e25cb18c..bb9238a8f 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs index ca18ed51e..72a69ae12 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ConversationInputTokenUsageDetails DeserializeConversationInputT audioTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 3f7b726e2..8033fdfd3 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index 0511fd330..bc792d0be 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs index a6183f7b6..eafaed0a4 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static ConversationInputTranscriptionOptions DeserializeConversationInp model = new ConversationTranscriptionModel(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index ffb2e528e..ce06f965e 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs index 77fa65027..343ca9d68 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 9fe31d103..0d51d9527 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs index 09899e509..092555efa 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs @@ -117,7 +117,7 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs index 5b56625f4..2e752013d 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs index 8b48546c1..d9b36abb4 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index b7bb89d83..136a423a5 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs index c3f6eb8fa..9cb4dca6f 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 7a27df72c..82a6c7954 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs index 35403bdb8..d4903be12 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ConversationOutputTokenUsageDetails DeserializeConversationOutpu audioTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index 1579cc3cf..f8e9674af 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reset_seconds"u8); writer.WriteNumberValue(Convert.ToDouble(TimeUntilReset.ToString("s\\.FFF"))); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi timeUntilReset = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs index 4d3889c42..bd96f0c1e 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 399d07915..8cc2d22e0 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 44ef1bbad..8a7b9088a 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index d3bf22808..5e59b4494 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index 4a25c88a8..e640551ad 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -120,7 +120,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -281,7 +281,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index 1bce6c107..45664ac17 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs index 5df8a2ea1..2e1701c6e 100644 --- a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(StatusKind.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static ConversationStatusDetails DeserializeConversationStatusDetails(J statusKind = new ConversationStatus(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs index 04a8e335f..992255c6f 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output_token_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static ConversationTokenUsage DeserializeConversationTokenUsage(JsonEle outputTokenDetails = ConversationOutputTokenUsageDetails.DeserializeConversationOutputTokenUsageDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index dc5a71643..a179742d3 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index d308a20ee..745a4f610 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index e1256ed33..c2aa6af94 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index c71be3f7c..8b17dadbc 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -59,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index 49f4c9685..f84394dec 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement e totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index 43dcabbbf..1e0d81a7b 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index 455776386..020d1121e 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index fb331ff03..6f97b0cf2 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 04fe002e3..8ed4f8e82 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(_scoreThreshold); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso scoreThreshold = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 393477d65..25afeb39a 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -66,7 +66,7 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index df2ec91f8..94a15cc47 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("vector_stores"u8); this.SerializeNewVectorStores(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -127,7 +127,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE newVectorStores = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index eb495d8a2..1250f197d 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index 1001f4ab3..836f058fe 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegration tags = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index 68aff9421..152c67a79 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -192,7 +192,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("estimatedFinish"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -399,7 +399,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode estimatedFinish = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index 20bbc87e6..b6ff331f5 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("param"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static FineTuningJobError DeserializeFineTuningJobError(JsonElement ele @param = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index 2c3beecb5..f5cb1dd52 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement ele @object = new InternalFineTuningJobEventObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index abe7ba36f..19a1ce083 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -67,7 +67,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -128,7 +128,7 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index eeaf45f5e..61b405580 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("seed"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -212,7 +212,7 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme seed = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 8e59d1d05..0a9625adf 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -72,7 +72,7 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index ecd5a7ffd..c40352659 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -62,7 +62,7 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index a89305aef..2af49f407 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(ImageUri.AbsoluteUri); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo imageUri = new Uri(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index b58c56430..65fb428c8 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs index 1e3d8a420..c947a593f 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs @@ -63,7 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index 4b56a9f0a..f6a7654dd 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -95,7 +95,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -210,7 +210,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index cb8f165d3..7f6548300 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -102,7 +102,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -222,7 +222,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 860fa87f2..093c2eba2 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -85,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -184,7 +184,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme endUserId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index a8cfb5281..9b8141cb2 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("data"u8); writer.WriteBase64StringValue(Data.ToArray(), "D"); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAddUploadPartRequest DeserializeInternalAddUploadPartReq data = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs index cc5ef9d4a..cac5661c5 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatJsonObject DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index a7a402637..766933223 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -74,7 +74,7 @@ internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs index a7e939ffa..a09b2a151 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatText DeserializeInternalAssistant @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index efe91100e..3a2b661f5 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("max_num_results"u8); writer.WriteNumberValue(InternalMaxNumResults.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs internalMaxNumResults = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index c73097323..9b3d12d02 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalAssistantToolsFileSearchTypeOnly DeserializeInternalAssi @type = new InternalAssistantToolsFileSearchTypeOnlyType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index bd02f8444..e6f39cdf1 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAssistantsNamedToolChoiceFunction DeserializeInternalAss name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs index 2c92732ee..108c0839e 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategy DeserializeInternalAutoChunkingStra @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs index c258abd77..5147cee9d 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategyRequestParam DeserializeInternalAuto @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs index c3d3f4c0d..69d90d1bf 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("line"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchError DeserializeInternalBatchError(JsonElement ele line = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index 7d09b6dca..f2e947928 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement e data = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index ee8c9a1b2..f678fa8ec 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -368,7 +368,7 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index e1af9a276..3b6e44af8 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("failed"u8); writer.WriteNumberValue(Failed); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts failed = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs index 103045cb5..21c759a62 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J url = new Uri(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index e2f37f4af..83214f156 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("error"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput error = InternalBatchRequestOutputError.DeserializeInternalBatchRequestOutputError(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs index a8c726285..0f345b4f3 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestO message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs index 435633b71..d3798d3a7 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs @@ -60,7 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalBatchRequestOutputResponse DeserializeInternalBatchReque body = dictionary; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index c43769045..0dcdd1325 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionFunctionCallOption DeserializeInternalChat name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index 1f5d4d3ad..b0ca4e0bc 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn DeserializeArgumentsValue(prop, ref arguments); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index 48fde14d1..79c175a85 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionMessageToolCallFunction DeserializeInterna DeserializeArgumentsValue(prop, ref arguments); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index c2d62dcba..5d587d989 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionNamedToolChoice DeserializeInternalChatCom function = InternalChatCompletionNamedToolChoiceFunction.DeserializeInternalChatCompletionNamedToolChoiceFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index 4c3b8a036..c1faea37f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionNamedToolChoiceFunction DeserializeInterna name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index 5c1248e27..0360a6b6f 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartImage Deserialize imageUrl = InternalChatCompletionRequestMessageContentPartImageImageUrl.DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index 514e40e67..4af725052 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des url = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 0bd526080..299bf5947 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("refusal"u8); writer.WriteStringValue(Refusal); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartRefusal Deseriali refusal = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index d318473d8..ed873c838 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartText DeserializeI text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 5e35443ff..9f9755907 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (true && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index 4bea570ba..ae4acda12 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInt arguments = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs index cf88a53b3..38c15a85e 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("include_usage"u8); writer.WriteBooleanValue(IncludeUsage.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompl includeUsage = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index 15f0f3e84..ccd542926 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -112,7 +112,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha return null; } StreamingChatFunctionCallUpdate functionCall = default; - IList toolCalls = default; + IReadOnlyList toolCalls = default; string refusal = default; Chat.ChatMessageRole? role = default; ChatMessageContent content = default; @@ -166,7 +166,7 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs index 53d7ac953..dba391eaf 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.cs @@ -11,7 +11,7 @@ internal partial class InternalChatCompletionStreamResponseDelta { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IList toolCalls, string refusal, Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) + internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpdate functionCall, IReadOnlyList toolCalls, string refusal, Chat.ChatMessageRole? role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) { FunctionCall = functionCall; ToolCalls = toolCalls; @@ -23,7 +23,7 @@ internal InternalChatCompletionStreamResponseDelta(StreamingChatFunctionCallUpda public StreamingChatFunctionCallUpdate FunctionCall { get; } - public IList ToolCalls { get; } + public IReadOnlyList ToolCalls { get; } public string Refusal { get; } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs index 22c9f1605..7296b33fe 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatJsonObject DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index 2a25b0327..f6efd50f0 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -67,7 +67,7 @@ internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs index 2100a5dfd..424c74152 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatText DeserializeInternalChatResponseFo @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index 20bd2f55e..a73dbc50a 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("md5"u8); writer.WriteStringValue(Md5); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadR md5 = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs index 685addea4..c959b397f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateAssistantRequestToolResources DeserializeInternalC fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 36c62aac1..4261b32aa 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index a9487ca5d..06b793bc3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -69,7 +69,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -152,7 +152,7 @@ internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index 327b4890c..7c7e1125a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -165,7 +165,7 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index b4f1f585e..64cb242aa 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteObjectValue(Message, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeIn message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index 69403c77f..84ab1def1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateChatCompletionResponseChoice DeserializeInternalCr logprobs = InternalCreateChatCompletionResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index f7bb85157..4a9f4f0c7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (true && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeIn refusal = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 62624c359..0ce2253bb 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -57,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("finishReason"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index a9c6d1509..0347534db 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Chat { internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs : IJsonModel { - internal InternalCreateChatCompletionStreamResponseChoiceLogprobs() - { - } - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -48,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("refusal") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -65,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -105,8 +101,8 @@ internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs Deseria { return null; } - IList content = default; - IList refusal = default; + IReadOnlyList content = default; + IReadOnlyList refusal = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -140,7 +136,7 @@ internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs Deseria refusal = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs index 9decae9ba..58c6b0aee 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Chat { @@ -12,22 +12,22 @@ internal partial class InternalCreateChatCompletionStreamResponseChoiceLogprobs { private protected IDictionary _additionalBinaryDataProperties; - internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IEnumerable content, IEnumerable refusal) + internal InternalCreateChatCompletionStreamResponseChoiceLogprobs() { - Content = content?.ToList(); - Refusal = refusal?.ToList(); + Content = new ChangeTrackingList(); + Refusal = new ChangeTrackingList(); } - internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IList content, IList refusal, IDictionary additionalBinaryDataProperties) + internal InternalCreateChatCompletionStreamResponseChoiceLogprobs(IReadOnlyList content, IReadOnlyList refusal, IDictionary additionalBinaryDataProperties) { Content = content; Refusal = refusal; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public IList Content { get; } + public IReadOnlyList Content { get; } - public IList Refusal { get; } + public IReadOnlyList Refusal { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index 2729b9e7c..ef21dbfab 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokens); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInter totalTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index ea5ce997e..a017b0f33 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -254,7 +254,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(User); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -489,7 +489,7 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet user = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index 8ff5921f9..70a0a38d5 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index 1979a5fe2..b2c2fac33 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateCompletionResponseChoice DeserializeInternalCreate text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index c47f11632..8c1ab4ca3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -205,7 +205,7 @@ internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeIntern topLogprobs = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index ebea86565..194ab4816 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("project"u8); writer.WriteStringValue(Project); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial project = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs index 7c71777ad..5a32beca1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalCreateModerationRequestInput2 DeserializeInternalCreateM imageUrl = InternalCreateModerationRequestInputImageUrl.DeserializeInternalCreateModerationRequestInputImageUrl(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs index 878c6f0be..8be999296 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalCreateModerationRequestInput3 DeserializeInternalCreateM text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs index b65ae8776..6b3b9af9c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateModerationRequestInputImageUrl DeserializeInternal url = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs index 7e26ddd19..b4a0de100 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs @@ -226,7 +226,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -503,7 +503,7 @@ internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes violenceGraphic = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 471899a6b..01905e802 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -218,7 +218,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -445,7 +445,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea toolChoice = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs index ded12e75f..83b433afa 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadAndRunRequestToolResources DeserializeIntern fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index 141e218cd..7a6dce23a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter De fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs index b9e1a4ee7..be7fd398e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadRequestToolResources DeserializeInternalCrea fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 1e6146b9e..5f4ffe3c8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs index e432b91e0..9fb5f9bd7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesFileSearchBase)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -70,7 +70,7 @@ internal static InternalCreateThreadRequestToolResourcesFileSearchBase Deseriali IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index 14ed7a98e..e0437d254 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranscriptionResponseJson DeserializeInternalCreat text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index ddaff2f1a..27f0a2079 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranslationResponseJson DeserializeInternalCreateT text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index 121cd3ce8..02947af26 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("mime_type"u8); writer.WriteStringValue(MimeType); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCreateUploadRequest DeserializeInternalCreateUploadReque mimeType = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index 792fe9f39..2220a6dbd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCre chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index ea7862847..5d54a2b94 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 60f4ec948..1de8bbca4 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index b990c6541..5b6cba9cf 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -45,7 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J purpose = new FileUploadPurpose(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index e54d56517..5b6cc721f 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -108,7 +108,7 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index 4c6448cec..7de59dd5c 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index 5658f3ef8..d43e08059 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index ef1ab9143..0de8eab9c 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJob @object = new InternalFineTuningJobCheckpointObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs index 52ee0448d..4f0c85906 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("full_valid_mean_token_accuracy"u8); writer.WriteNumberValue(FullValidMeanTokenAccuracy.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -175,7 +175,7 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu fullValidMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index 2f5a99d7b..838e6b4d5 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -180,7 +180,7 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat functions = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs index 30c684544..3cab64d61 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("completion"u8); writer.WriteStringValue(Completion); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetu completion = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index 1a1fb60f9..d31ca9b43 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition parameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 4de8caa0c..3a000a87c 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListAssistantsResponse DeserializeInternalListAssistants hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index b2a0325c6..8d9ee1700 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListBatchesResponse DeserializeInternalListBatchesRespon @object = new InternalListBatchesResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index ecc8440c6..2ac8bc91f 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static InternalListFineTuningJobCheckpointsResponse DeserializeInternal hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index e700b47fd..516a4d2ed 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListFineTuningJobEventsResponse DeserializeInternalListF @object = new InternalListFineTuningJobEventsResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index 691a66723..bbc78c5a8 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListMessagesResponse DeserializeInternalListMessagesResp hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index cfa70a193..a1e2e6614 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListPaginatedFineTuningJobsResponse DeserializeInternalL @object = new InternalListPaginatedFineTuningJobsResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 568099227..90254865d 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResp hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index a18bb7c40..2ea9d675d 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunsResponse DeserializeInternalListRunsResponse(Jso hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index deba50bb2..d318b8591 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListThreadsResponse DeserializeInternalListThreadsRespon hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index 8d2b5fdf2..ce501adb6 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoreFilesResponse DeserializeInternalListVect hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 15a375b63..66410109c 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoresResponse DeserializeInternalListVectorSt hasMore = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index f163923b5..8772c71db 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal detail = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index e1675137f..7c745c3da 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna detail = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index ab29b1156..7dfc26d84 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 4e5168aad..58d3807ff 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitat fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index 582b2a166..4b841af4a 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 9c2063bd9..0ecb213f7 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath Dese fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index a798a10c4..3086866c5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index e023a7c53..af05382b9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageContentTextObjectText DeserializeInternalMessageC annotations = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index 12ffb7f87..91a999e2c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index 0e5ec5226..3a88bf110 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index 38f2a8da1..ca340bd93 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI detail = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index c5ceddcd9..8e6c19097 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 84fe846be..418ad6161 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt detail = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index a2252f2fa..6140f2f68 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index bed2a33a6..33c64d6f1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 51525935e..51e88fddd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("quote"u8); writer.WriteStringValue(Quote); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFile quote = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 93edc71d5..3765a643e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 64af2f141..2836f1855 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 3dbc5f8bc..7fdde5f46 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index 3a75de3db..3c07e344f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMes annotations = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index af9621cc5..42d8a366d 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("delta"u8); writer.WriteObjectValue(Delta, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject delta = InternalMessageDeltaObjectDelta.DeserializeInternalMessageDeltaObjectDelta(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index 6d2f67e65..bf5058089 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO role = prop.Value.GetString().ToMessageRole(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 73118f8d8..74c45e17c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 725875fd5..08787d796 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF imageFile = InternalMessageContentItemFileObjectImageFile.DeserializeInternalMessageContentItemFileObjectImageFile(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 64a82a871..785544dae 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr imageUrl = InternalMessageContentImageUrlObjectImageUrl.DeserializeInternalMessageContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index cb5cc7e63..6b17bbd77 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -54,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -125,7 +125,7 @@ internal static InternalMessageObjectAttachment DeserializeInternalMessageObject tools = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index 3d0658b46..56dfdad54 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index f2979e342..0bd7e4bf3 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteBooleanValue(ViolenceGraphic); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -217,7 +217,7 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego violenceGraphic = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index 5ce3e2fbd..b0221bf50 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteNumberValue(ViolenceGraphic); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -217,7 +217,7 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa violenceGraphic = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs index b720134bc..6dd1c7fb7 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyAssistantRequestToolResources DeserializeInternalM fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 88bfe2b56..8f4ff2434 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs index 736a11320..df7468129 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyThreadRequestToolResources DeserializeInternalModi fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 43462682f..bf663fec7 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index ce3d3c9e9..2ab27b49c 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs index c2f44d8f0..621f845ee 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs index 24f450121..a4557d237 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs @@ -95,7 +95,7 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs index 86e3ea587..dcec802a1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs index 7ab51b936..4888175b7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs index d04c79ef3..112b33e0f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs index ab1a3274d..1f99b75fb 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferClear DeserializeInte kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs index b05da3bd5..c74e966ab 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferCommit DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs index b31985ada..e2ca8fa69 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventResponseCancel DeserializeInternalRea kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs index a4b7b721c..a316ecfba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs index e5feb25ba..37b909328 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -224,7 +224,7 @@ internal static InternalRealtimeClientEventResponseCreateResponse DeserializeInt toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs index 25de3606f..49e68b5e4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index f8a1da5a0..d6afee1cb 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index e37501778..4369d4ea9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -80,7 +80,7 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index 36b86554c..b4b54872a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -116,7 +116,7 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index df217b297..2faae9d87 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -90,7 +90,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index c831ff72d..d92ed2b69 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -94,7 +94,7 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index 2c3f892aa..e75ddc026 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index da99cb5e3..d91999c1b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 48aea22d0..a2d0402cf 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 51ad43ae0..92bf2feb4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -162,7 +162,7 @@ internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(Jso output = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 6af2083e7..0e534ce96 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -96,7 +96,7 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index e223039de..8a0f226bf 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -123,7 +123,7 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index f2d434297..013b44519 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -101,7 +101,7 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index d7a2f8a40..f18cd3e5e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("id"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 43daa4565..9d0023039 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -122,7 +122,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 8b2c39d1c..943411ebf 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -93,7 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetection, options); } - if (true && _additionalBinaryDataProperties?.ContainsKey("tools") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -139,7 +139,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxResponseOutputTokens"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -286,7 +286,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 69ffb7677..91a7f9fa4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs index 5d4a7e91b..97e43fc50 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs index 8ece57ae1..add1d45e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalRealtimeServerEventConversationCreatedConversation Deser @object = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs index be0d12086..53a0f1e52 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("param"u8); writer.WriteStringValue(Param); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -114,7 +114,7 @@ internal static InternalRealtimeServerEventConversationItemInputAudioTranscripti @param = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs index b9180e740..a3657c7bf 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -125,7 +125,7 @@ internal static InternalRealtimeServerEventErrorError DeserializeInternalRealtim eventId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs index 0ba562716..f3cee6381 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs index 8b18e5b7e..cdca1a04b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs index acb572137..542d7c541 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs index a29241641..bf25a4f2d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs index a052eaa99..383b91ac3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs index 6e3eba5b7..8b8a26328 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs index fd2b05800..c79531178 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index f77a98620..d0bc54bc8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -95,7 +95,7 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index e9f929916..a493d5239 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalReal @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs index 14cea7729..a073eefb8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRealtimeToolChoiceFunctionObjectFunction DeserializeInte name = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index cff2c8c23..7e2ba785d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index 6a3c70562..0cd923781 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess internalText = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index b0d1cbb0b..933980b13 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(_internalFunction, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc internalFunction = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs index 42443b789..15bb492ed 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatJsonObject DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index 6335b9056..7acbe000d 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalResponseFormatJsonSchema DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index 39166704f..a8c07cf46 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe schema = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs index 054bff834..7589ef288 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatText DeserializeInternalResponseFormatText @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 922e43ca3..fc8fe2977 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe text = InternalMessageContentTextObjectText.DeserializeInternalMessageContentTextObjectText(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 27de37212..99453e0be 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -91,7 +91,7 @@ internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInte toolCalls = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index 34c1dad54..cf52d05b0 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteObjectValue(Type, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J @type = prop.Value.GetObject(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index b4fc4f1d4..902fe6117 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index c830a490c..755fbc23c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInterna @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index 62f763820..bf8e8c6b8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement @object = prop.Value.GetObject(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs index a0765a8d4..02abff246 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(StepDetails, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaO stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index f1cb89b74..8a84cac3f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 1c6de59b8..934429963 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 5655786b7..7eeb00463 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreat messageId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 75ab9c584..dc5898688 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 241f9bf57..075d65e84 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (true && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterprete outputs = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 01c3af1f1..4be6d74f8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 55c28ee7b..c08db0f90 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectIma fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index eba3a9c40..993ba803a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index d1106096b..7388da7a2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -125,7 +125,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 8153e4aed..030b6662b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 082734f3b..0cd596ec6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction D output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index b900a33b2..f2f849ecc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeIntern @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index beca986a7..d8245031a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 7bbf59a47..935b601bb 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalR @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 863ffedb1..e3a8025c9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsMessageCreationObjectMessageCreation Deser messageId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index cb8f8026b..231758c8d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (true && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter Deseria outputs = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 667be4b5c..6000a735d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObject Deserialize @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index 1f2497850..d21cadf5a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Deseri fileId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index a19bd3e96..e2de12e53 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (true && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) + if (options.Format != "W" && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index abb3aecef..3598be3c6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(ScoreThreshold); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject De scoreThreshold = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs index 813be8267..a95f051a3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent Des text = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index ae3bbe299..0f2bb9005 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static InternalRunStepDetailsToolCallsFunctionObjectFunction Deserializ output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index 81debe326..02c220df4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index fb316402f..d5c3b5aff 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunS @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 5f8f50fa6..8d7b6c86b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index 1b944e191..dc45cc88f 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunToolCallObjectFunction DeserializeInternalRunToolCall arguments = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index 7042f12d0..d2a201aef 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunk_overlap_tokens"u8); writer.WriteNumberValue(ChunkOverlapTokens); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalStaticChunkingStrategyDetails DeserializeInternalStaticC chunkOverlapTokens = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 74cfb54f2..3d054360b 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalSt @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index d2ffcbe89..d4b5066e4 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalSubmitToolOutputsRunRequest DeserializeInternalSubmitToo stream = prop.Value.GetBoolean(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs index 131a2dc59..98e321063 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalThreadObjectToolResources DeserializeInternalThreadObjec fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index 0b41a7f14..7e0fbbcdb 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesCodeInterpreter DeserializeInte fileIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index 582798a12..cf27f0702 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesFileSearch DeserializeInternalT vectorStoreIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index a01186ecb..a46689715 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalToolResourcesFileSearchIdsOnly DeserializeInternalToolRe vectorStoreIds = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index 96b734dbe..934a19410 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 562a39a64..460fafe17 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -60,7 +60,7 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index 301c8fd1d..f1fc0e16e 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -54,7 +54,7 @@ internal static InternalUnknownChatResponseFormat DeserializeInternalUnknownChat @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs index f1c5ccde0..7b9cdce7c 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalUnknownChunkingStrategy DeserializeInternalUnknownChunki @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs index c68efa74d..40aadd8c3 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyRequestParamProxy Deserialize @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs index c4e7d5fa6..ff02ebd47 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyResponseParamProxy Deserializ @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs index 4e9e008d1..211ebe410 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownOmniTypedResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 6ed8b43a3..79e38366a 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("file"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -189,7 +189,7 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo @file = OpenAIFile.DeserializeOpenAIFile(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index d50ead99d..7994b76dd 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement ele @object = new InternalUploadPartObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index 36183986f..7b312e41e 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternal total = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index f92ee5e27..97df2a98e 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{format}' format."); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index cce95c834..6b271cca2 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("tools"u8); this.SerializeTools(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J DeserializeTools(prop, ref tools); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index 171c2df2a..c1b48cc74 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("content"u8); this.SerializeContent(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle content = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index 89878ba0a..202a0cbee 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index c76295571..35c2d463c 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static MessageFailureDetails DeserializeMessageFailureDetails(JsonEleme reason = new MessageFailureReason(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs index a80017c74..a3d581924 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static MessageModificationOptions DeserializeMessageModificationOptions metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index 71fe7aeca..a62c01fdc 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 5c837bec3..991d9758d 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -103,7 +103,7 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme model = new InternalCreateModerationRequestModel(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index f889b6dd1..683301b97 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("flagged"u8); writer.WriteBooleanValue(Flagged); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index 979673c2b..1bd0f2455 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index a826e0c51..9d966e798 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -114,7 +114,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, @object = new InternalEmbeddingObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index 990343e1b..371436956 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index 5cafbaa12..7f5fa9ec0 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -142,7 +142,7 @@ internal static OpenAIError DeserializeOpenAIError(JsonElement element, ModelRea @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index a433d4027..4e0a985b8 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("error"u8); writer.WriteObjectValue(Error, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static OpenAIErrorResponse DeserializeOpenAIErrorResponse(JsonElement e error = OpenAIError.DeserializeOpenAIError(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 38a759cfb..3d92f879d 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("status_details"u8); writer.WriteStringValue(StatusDetails); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade statusDetails = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index 4c04572bb..d7dcd10d4 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index 01de3b396..cd80af89f 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index d072b37c6..9340b035a 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index ee5dc6c45..c186ab661 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -226,7 +226,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -458,7 +458,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index 2075c5e8d..60cf200ab 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunError DeserializeRunError(JsonElement element, ModelReaderWri message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs index a051dfbe6..95063b029 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.Value.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement reason = new RunIncompleteReason(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs index a5fbcc544..c6be7a127 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static RunModificationOptions DeserializeRunModificationOptions(JsonEle metadata = dictionary; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index ac75c11f6..467577ade 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(Details, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -357,7 +357,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite details = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 9b164c1c3..02996fd00 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index 71ff7dd0d..88a3cf8b7 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index dedc4b148..9e8ed9874 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunStepError DeserializeRunStepError(JsonElement element, ModelR message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index 26d8a4cd5..e7a4ca8e7 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -132,7 +132,7 @@ internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonE content = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index d6932bd3f..9c78c5c6e 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement eleme totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index 053c8a1b0..dfd63054e 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 6c33dff24..9d3463a15 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index c0d0347cd..7569d9a4f 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, Mode totalTokenCount = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 7a07b063d..8f269ec27 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_type.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -108,7 +108,7 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme @type = new InternalTruncationObjectType(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index bf52744ba..b893d84e2 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("speed"u8); writer.WriteNumberValue(SpeedRatio.Value); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE speedRatio = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index decd57136..95af13ac2 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -73,7 +73,7 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index ccb709a79..884a5a996 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 465dc3953..6882ded11 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsUpdateValue(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction DeserializeFunctionArgumentsUpdateValue(prop, ref functionArgumentsUpdate); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 57c15eb9f..1c563f394 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(ToolCallId); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,7 +126,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda toolCallId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index f6f7fcf67..aad837d42 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -68,7 +68,7 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index 8fd981fe1..0276da63c 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme internalMessages = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index 273d1f6e6..e302825de 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index 43c4c9931..3694e0e24 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("attachments"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -355,7 +355,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode attachments = array; continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index b1bad14a1..7f8689100 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 262aa17e6..b52bde026 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -301,7 +301,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("requiredAction"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -608,7 +608,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW internalRequiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index cb9a9aca7..10bf1926f 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -72,7 +72,7 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index c816ad7cc..dea298cba 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_objectType); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index eb0c7a503..83ec44563 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs index 552ade35f..58af53856 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output"u8); writer.WriteStringValue(Output); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReade output = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 1bf9b3d4e..5c7f74779 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); this.SerializeFileSearch(writer, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index 383ba7fd9..c644c41ea 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -86,7 +86,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("no_speech_prob"u8); writer.WriteNumberValue(NoSpeechProbability); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -200,7 +200,7 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele noSpeechProbability = prop.Value.GetSingle(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index 28a1bc287..5b5399ae1 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -46,7 +46,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("end"u8); writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index d0219219f..2ef5f7920 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -54,7 +54,7 @@ internal static UnknownAssistantToolDefinition DeserializeUnknownAssistantToolDe @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index 8e5f1e8e3..ee1d5074d 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownC @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index 263182a78..c6e94fa49 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegra @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs index 6a994f475..3e687a893 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageContentTextObjectAnnotation DeserializeUnknownMess @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs index 5b6814e3c..0492c3fe3 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs index 0d3229fd8..2c25dd275 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaTextContentAnnotation DeserializeUnknownMessa @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs index 0094dc685..57a24ef03 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeClientEvent DeserializeUnknownRealtimeClientEvent eventId = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs index b9fea3699..8db69554b 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index 9cd54657d..9576e76bc 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index 9fbb40a4e..d4337995c 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -84,7 +84,7 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs index 601e0259c..12d8262fd 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -78,7 +78,7 @@ internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseIt id = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs index 27a46aebb..783484977 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeServerEvent DeserializeUnknownRealtimeServerEvent kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs index 135527aa9..237a5e218 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement e kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs index 1c78da3b6..04c6f8b5f 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeToolChoiceObject DeserializeUnknownRealtimeToolCh @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs index ab00b3c93..364693674 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetec kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs index 1adf0306c..8776ce9f5 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetails DeserializeUnknownRunStepDeltaSte @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 5848b03e6..3c71ac3e3 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index e0919c8be..a67ce37c0 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject Des @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index ba61e3324..688add701 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsOb @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index c7ca094c6..9dbbc39ee 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsObjectToolCallsObject DeserializeU @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs index 5a631ddba..f3086084f 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepObjectStepDetails DeserializeUnknownRunStepObjectS @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index e0fbdec0a..2b5d9b1fc 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -68,7 +68,7 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 24995fbe7..18684d00d 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -118,7 +118,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("expires_after"u8); writer.WriteObjectValue(ExpirationPolicy, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -258,7 +258,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 643b8ac93..4a22f89b2 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE @object = prop.Value.GetObject(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index 68824cf3c..6bcc2b009 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 91403959b..59a557558 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -80,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -193,7 +193,7 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index ffbcc14f0..c904c802e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index a6e7d9c89..1295e9075 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("days"u8); writer.WriteNumberValue(_days); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli days = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index 38cb0416e..89cdd7a1b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -178,7 +178,7 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index d6e4ca8d5..32372d6e1 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static VectorStoreFileAssociationError DeserializeVectorStoreFileAssoci message = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index 05a8d299b..14c002aab 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonEleme total = prop.Value.GetInt32(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index ad9c7f889..48c2fd176 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -74,7 +74,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("expiresAfter"u8); } } - if (true && _additionalBinaryDataProperties != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 2ca3d5c89..70f2a7b50 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -73,7 +73,7 @@ internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegrati @type = prop.Value.GetString(); continue; } - if (true) + if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.typespec/chat/client.tsp b/.typespec/chat/client.tsp index 294acbc1e..fefd8e4e1 100644 --- a/.typespec/chat/client.tsp +++ b/.typespec/chat/client.tsp @@ -29,4 +29,5 @@ using OpenAI; @@access(ChatResponseFormatJsonSchema, Access.public); @@usage(ChatResponseFormatJsonSchema, Usage.input); -@@visibility(ChatCompletionResponseMessage.tool_calls, "read"); \ No newline at end of file +@@visibility(ChatCompletionResponseMessage.tool_calls, "read"); +@@visibility(ChatCompletionStreamResponseDelta.tool_calls, "read"); \ No newline at end of file diff --git a/.typespec/chat/models.tsp b/.typespec/chat/models.tsp index dea746a40..e26a041d8 100644 --- a/.typespec/chat/models.tsp +++ b/.typespec/chat/models.tsp @@ -683,9 +683,11 @@ model CreateChatCompletionStreamResponse { /** Log probability information for the choice. */ logprobs?: { /** A list of message content tokens with log probability information. */ + @visibility("read") content: ChatCompletionTokenLogprob[] | null; /** A list of message refusal tokens with log probability information. */ + @visibility("read") refusal: ChatCompletionTokenLogprob[] | null; } | null; From 36ad6db688d6d9023092dbbf7f7a5de6dddd7d71 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Thu, 31 Oct 2024 14:50:15 -0500 Subject: [PATCH 31/54] fix Edit-Serialization.ps1 --- .scripts/Edit-Serialization.ps1 | 112 ++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 50 deletions(-) diff --git a/.scripts/Edit-Serialization.ps1 b/.scripts/Edit-Serialization.ps1 index 384a1d966..837a05648 100644 --- a/.scripts/Edit-Serialization.ps1 +++ b/.scripts/Edit-Serialization.ps1 @@ -38,22 +38,22 @@ function Edit-InternalChatCompletionResponseMessageSerialization { # content deserialization $inputRegex = @( "return new InternalChatCompletionResponseMessage\(" - " content," " refusal," " toolCalls \?\? new ChangeTrackingList\(\)," " role," + " content," " functionCall," - " serializedAdditionalRawData\);" + " additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new InternalChatCompletionResponseMessage(" - " content ?? new ChatMessageContent()," " refusal," " toolCalls ?? new ChangeTrackingList()," " role," + " content ?? new ChatMessageContent()," " functionCall," - " serializedAdditionalRawData);" + " additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -63,37 +63,55 @@ function Edit-InternalChatCompletionStreamResponseDeltaSerialization { # content serialization $inputRegex = @( - "if \(SerializedAdditionalRawData\?\.ContainsKey\(`"content`"\) != true && Optional\.IsDefined\(Content\)\)" + "if \(Optional\.IsDefined\(Content\) && _additionalBinaryDataProperties\?\.ContainsKey\(`"content`"\) != true\)" ) $outputString = @( "// CUSTOM: Check inner collection is defined." - "if (SerializedAdditionalRawData?.ContainsKey(`"content`") != true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined())" + "if (Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey(`"content`") != true && Content.IsInnerCollectionDefined())" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 # content deserialization $inputRegex = @( "return new InternalChatCompletionStreamResponseDelta\(" - " content," " functionCall," " toolCalls \?\? new ChangeTrackingList\(\)," - " role," " refusal," - " serializedAdditionalRawData\);" + " role," + " content," + " additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new InternalChatCompletionStreamResponseDelta(" - " content ?? new ChatMessageContent()," " functionCall," " toolCalls ?? new ChangeTrackingList()," - " role," " refusal," - " serializedAdditionalRawData);" + " role," + " content ?? new ChatMessageContent()," + " additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } +function Edit-ChatMessageSerialization { + $filename = "ChatMessage.Serialization.cs" + + # content serialization + $inputRegex = @( + "if \(true && Optional\.IsDefined\(Content\) && _additionalBinaryDataProperties\?\.ContainsKey\(`"content`"\) != true\)" + ) + $outputString = @( + "// CUSTOM: Check inner collection is defined." + "if (true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined() && _additionalBinaryDataProperties?.ContainsKey(`"content`") != true)" + ) + Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 + + # content deserialization + # no-op +} + + function Edit-AssistantChatMessageSerialization { $filename = "AssistantChatMessage.Serialization.cs" @@ -103,24 +121,24 @@ function Edit-AssistantChatMessageSerialization { # content deserialization $inputRegex = @( "return new AssistantChatMessage\(" - " role," - " content," - " serializedAdditionalRawData," " refusal," - " name," + " participantName," " toolCalls \?\? new ChangeTrackingList\(\)," - " functionCall\);" + " functionCall," + " role," + " content," + " additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new AssistantChatMessage(" - " role," - " content ?? new ChatMessageContent()," - " serializedAdditionalRawData," " refusal," - " name," + " participantName," " toolCalls ?? new ChangeTrackingList()," - " functionCall);" + " functionCall," + " role," + " content ?? new ChatMessageContent()," + " additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -133,11 +151,11 @@ function Edit-FunctionChatMessageSerialization { # content deserialization $inputRegex = @( - "return new FunctionChatMessage\(role, content, serializedAdditionalRawData, name\);" + "return new FunctionChatMessage\(functionName, role, content, additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new FunctionChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name);" + "return new FunctionChatMessage(functionName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -150,11 +168,11 @@ function Edit-SystemChatMessageSerialization { # content deserialization $inputRegex = @( - "return new SystemChatMessage\(role, content, serializedAdditionalRawData, name\);" + "return new SystemChatMessage\(participantName, role, content, additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new SystemChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name);" + "return new SystemChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -167,11 +185,11 @@ function Edit-ToolChatMessageSerialization { # content deserialization $inputRegex = @( - "return new ToolChatMessage\(role, content, serializedAdditionalRawData, toolCallId\);" + "return new ToolChatMessage\(toolCallId, role, content, additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new ToolChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, toolCallId);" + "return new ToolChatMessage(toolCallId, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -184,11 +202,11 @@ function Edit-UserChatMessageSerialization { # content deserialization $inputRegex = @( - "return new UserChatMessage\(role, content, serializedAdditionalRawData, name\);" + "return new UserChatMessage\(participantName, role, content, additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new UserChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData, name);" + "return new UserChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -201,11 +219,11 @@ function Edit-InternalUnknownChatMessageSerialization { # content deserialization $inputRegex = @( - "return new InternalUnknownChatMessage\(role, content, serializedAdditionalRawData\);" + "return new InternalUnknownChatMessage\(role, content, additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new InternalUnknownChatMessage(role, content ?? new ChatMessageContent(), serializedAdditionalRawData);" + "return new InternalUnknownChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -214,42 +232,36 @@ function Edit-InternalFineTuneChatCompletionRequestAssistantMessageSerialization $filename = "InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs" # content serialization - $inputRegex = @( - "if \(SerializedAdditionalRawData\?\.ContainsKey\(`"content`"\) != true && true && Optional\.IsDefined\(Content\)\)" - ) - $outputString = @( - "// CUSTOM: Check inner collection is defined." - "if (SerializedAdditionalRawData?.ContainsKey(`"content`") != true && true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined())" - ) - Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 + # no-op # content deserialization $inputRegex = @( "return new InternalFineTuneChatCompletionRequestAssistantMessage\(" - " role," - " content," - " serializedAdditionalRawData," " refusal," - " name," + " participantName," " toolCalls \?\? new ChangeTrackingList\(\)," - " functionCall\);" + " functionCall," + " role," + " content," + " additionalBinaryDataProperties\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new InternalFineTuneChatCompletionRequestAssistantMessage(" - " role," - " content ?? new ChatMessageContent()," - " serializedAdditionalRawData," " refusal," - " name," + " participantName," " toolCalls ?? new ChangeTrackingList()," - " functionCall);" + " functionCall," + " role," + " content ?? new ChatMessageContent()," + " additionalBinaryDataProperties);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } Edit-InternalChatCompletionResponseMessageSerialization Edit-InternalChatCompletionStreamResponseDeltaSerialization +Edit-ChatMessageSerialization Edit-AssistantChatMessageSerialization Edit-FunctionChatMessageSerialization Edit-SystemChatMessageSerialization From aebf17cddfefffb0a12a471d7d2e20ca00a17e28 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 1 Nov 2024 14:08:48 -0700 Subject: [PATCH 32/54] Bump MGC.CM version and regen --- .../MultiPartFormDataBinaryContent.cs | 195 --- .../Models/Assistant.Serialization.cs | 4 +- .../AssistantChatMessage.Serialization.cs | 5 +- .../AssistantCreationOptions.Serialization.cs | 4 +- .../AssistantDeletionResult.Serialization.cs | 4 +- ...istantModificationOptions.Serialization.cs | 4 +- .../AssistantResponseFormat.Serialization.cs | 2 +- .../Models/AssistantThread.Serialization.cs | 6 +- .../AudioTranscription.Serialization.cs | 8 +- ...AudioTranscriptionOptions.Serialization.cs | 4 +- .../Models/AudioTranslation.Serialization.cs | 4 +- .../AudioTranslationOptions.Serialization.cs | 4 +- .../Models/ChatCompletion.Serialization.cs | 4 +- .../ChatCompletionOptions.Serialization.cs | 4 +- .../Models/ChatFunction.Serialization.cs | 4 +- .../Models/ChatFunctionCall.Serialization.cs | 4 +- .../ChatFunctionChoice.Serialization.cs | 2 +- ...hatInputTokenUsageDetails.Serialization.cs | 4 +- .../Models/ChatMessage.Serialization.cs | 7 +- .dotnet/src/Generated/Models/ChatMessage.cs | 2 +- .../ChatMessageContent.Serialization.cs | 130 -- .../ChatMessageContentPart.Serialization.cs | 2 +- ...atOutputTokenUsageDetails.Serialization.cs | 4 +- .../ChatResponseFormat.Serialization.cs | 4 +- .../Generated/Models/ChatResponseFormat.cs | 2 +- ...okenLogProbabilityDetails.Serialization.cs | 4 +- ...nTopLogProbabilityDetails.Serialization.cs | 4 +- .../Models/ChatTokenUsage.Serialization.cs | 4 +- .../Models/ChatTool.Serialization.cs | 4 +- .../Models/ChatToolCall.Serialization.cs | 4 +- .../Models/ChatToolChoice.Serialization.cs | 2 +- ...InterpreterToolDefinition.Serialization.cs | 2 +- ...eInterpreterToolResources.Serialization.cs | 4 +- .../ConversationContentPart.Serialization.cs | 2 +- .../ConversationErrorUpdate.Serialization.cs | 2 +- .../ConversationFunctionTool.Serialization.cs | 2 +- ...onInputAudioClearedUpdate.Serialization.cs | 2 +- ...InputAudioCommittedUpdate.Serialization.cs | 2 +- ...InputSpeechFinishedUpdate.Serialization.cs | 2 +- ...nInputSpeechStartedUpdate.Serialization.cs | 2 +- ...ionInputTokenUsageDetails.Serialization.cs | 4 +- ...TranscriptionFailedUpdate.Serialization.cs | 2 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...InputTranscriptionOptions.Serialization.cs | 4 +- .../Models/ConversationItem.Serialization.cs | 2 +- ...ersationItemCreatedUpdate.Serialization.cs | 2 +- ...ersationItemDeletedUpdate.Serialization.cs | 2 +- ...eamingAudioFinishedUpdate.Serialization.cs | 2 +- ...anscriptionFinishedUpdate.Serialization.cs | 2 +- ...emStreamingFinishedUpdate.Serialization.cs | 2 +- ...temStreamingStartedUpdate.Serialization.cs | 2 +- ...reamingTextFinishedUpdate.Serialization.cs | 2 +- ...sationItemTruncatedUpdate.Serialization.cs | 2 +- ...onOutputTokenUsageDetails.Serialization.cs | 4 +- ...ationRateLimitDetailsItem.Serialization.cs | 4 +- ...versationRateLimitsUpdate.Serialization.cs | 2 +- ...ionResponseFinishedUpdate.Serialization.cs | 2 +- ...tionResponseStartedUpdate.Serialization.cs | 2 +- ...onSessionConfiguredUpdate.Serialization.cs | 2 +- ...onversationSessionOptions.Serialization.cs | 4 +- ...ationSessionStartedUpdate.Serialization.cs | 2 +- ...ConversationStatusDetails.Serialization.cs | 20 +- .../ConversationTokenUsage.Serialization.cs | 4 +- .../Models/ConversationTool.Serialization.cs | 2 +- ...ationTurnDetectionOptions.Serialization.cs | 2 +- .../ConversationUpdate.Serialization.cs | 2 +- ...mbeddingGenerationOptions.Serialization.cs | 4 +- .../EmbeddingTokenUsage.Serialization.cs | 4 +- .../FileChunkingStrategy.Serialization.cs | 2 +- .../FileDeletionResult.Serialization.cs | 4 +- ...ileFromStoreRemovalResult.Serialization.cs | 4 +- .../FileSearchRankingOptions.Serialization.cs | 4 +- .../FileSearchToolDefinition.Serialization.cs | 2 +- .../FileSearchToolResources.Serialization.cs | 4 +- .../FineTuningIntegration.Serialization.cs | 2 +- ...ningIntegrationWandbWandb.Serialization.cs | 4 +- .../Models/FineTuningJob.Serialization.cs | 4 +- .../FineTuningJobError.Serialization.cs | 4 +- .../FineTuningJobEvent.Serialization.cs | 4 +- ...eTuningJobHyperparameters.Serialization.cs | 4 +- .../Models/FineTuningOptions.Serialization.cs | 4 +- .../FunctionChatMessage.Serialization.cs | 5 +- .../FunctionToolDefinition.Serialization.cs | 2 +- .../Models/GeneratedImage.Serialization.cs | 4 +- .../GeneratedImageCollection.Serialization.cs | 2 +- .../HyperparameterOptions.Serialization.cs | 4 +- .../Models/ImageEditOptions.Serialization.cs | 4 +- .../ImageGenerationOptions.Serialization.cs | 4 +- .../ImageVariationOptions.Serialization.cs | 4 +- ...ernalAddUploadPartRequest.Serialization.cs | 4 +- ...tResponseFormatJsonObject.Serialization.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...sistantResponseFormatText.Serialization.cs | 2 +- ...ToolsFileSearchFileSearch.Serialization.cs | 4 +- ...ntToolsFileSearchTypeOnly.Serialization.cs | 4 +- ...tsNamedToolChoiceFunction.Serialization.cs | 4 +- ...ernalAutoChunkingStrategy.Serialization.cs | 2 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- .../InternalBatchError.Serialization.cs | 4 +- .../InternalBatchErrors.Serialization.cs | 4 +- .../Models/InternalBatchJob.Serialization.cs | 4 +- ...nternalBatchRequestCounts.Serialization.cs | 4 +- ...InternalBatchRequestInput.Serialization.cs | 4 +- ...nternalBatchRequestOutput.Serialization.cs | 4 +- ...alBatchRequestOutputError.Serialization.cs | 4 +- ...atchRequestOutputResponse.Serialization.cs | 4 +- ...pletionFunctionCallOption.Serialization.cs | 4 +- ...sageToolCallChunkFunction.Serialization.cs | 4 +- ...onMessageToolCallFunction.Serialization.cs | 4 +- ...CompletionNamedToolChoice.Serialization.cs | 4 +- ...onNamedToolChoiceFunction.Serialization.cs | 4 +- ...stMessageContentPartImage.Serialization.cs | 4 +- ...eContentPartImageImageUrl.Serialization.cs | 4 +- ...MessageContentPartRefusal.Serialization.cs | 4 +- ...estMessageContentPartText.Serialization.cs | 4 +- ...CompletionResponseMessage.Serialization.cs | 9 +- ...sponseMessageFunctionCall.Serialization.cs | 4 +- ...atCompletionStreamOptions.Serialization.cs | 4 +- ...letionStreamResponseDelta.Serialization.cs | 12 +- ...tResponseFormatJsonObject.Serialization.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 2 +- ...nalChatResponseFormatText.Serialization.cs | 2 +- ...rnalCompleteUploadRequest.Serialization.cs | 4 +- ...stantRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...nternalCreateBatchRequest.Serialization.cs | 4 +- ...ompletionFunctionResponse.Serialization.cs | 4 +- ...ionFunctionResponseChoice.Serialization.cs | 4 +- ...tCompletionResponseChoice.Serialization.cs | 4 +- ...ionResponseChoiceLogprobs.Serialization.cs | 8 +- ...etionStreamResponseChoice.Serialization.cs | 2 +- ...eamResponseChoiceLogprobs.Serialization.cs | 8 +- ...letionStreamResponseUsage.Serialization.cs | 4 +- ...alCreateCompletionRequest.Serialization.cs | 4 +- ...lCreateCompletionResponse.Serialization.cs | 4 +- ...eCompletionResponseChoice.Serialization.cs | 4 +- ...ionResponseChoiceLogprobs.Serialization.cs | 4 +- ...uestWandbIntegrationWandb.Serialization.cs | 4 +- ...teModerationRequestInput2.Serialization.cs | 4 +- ...teModerationRequestInput3.Serialization.cs | 4 +- ...ationRequestInputImageUrl.Serialization.cs | 4 +- ...CategoryAppliedInputTypes.Serialization.cs | 4 +- ...CreateThreadAndRunRequest.Serialization.cs | 4 +- ...ndRunRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...hreadRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...olResourcesFileSearchBase.Serialization.cs | 4 +- ...TranscriptionResponseJson.Serialization.cs | 4 +- ...teTranslationResponseJson.Serialization.cs | 4 +- ...ternalCreateUploadRequest.Serialization.cs | 4 +- ...ctorStoreFileBatchRequest.Serialization.cs | 4 +- ...ateVectorStoreFileRequest.Serialization.cs | 4 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...InternalFileUploadOptions.Serialization.cs | 4 +- ...onRequestAssistantMessage.Serialization.cs | 5 +- ...rnalFineTuningIntegration.Serialization.cs | 2 +- ...ineTuningIntegrationWandb.Serialization.cs | 2 +- ...alFineTuningJobCheckpoint.Serialization.cs | 4 +- ...uningJobCheckpointMetrics.Serialization.cs | 4 +- ...lFinetuneChatRequestInput.Serialization.cs | 4 +- ...uneCompletionRequestInput.Serialization.cs | 4 +- ...nternalFunctionDefinition.Serialization.cs | 4 +- ...nalListAssistantsResponse.Serialization.cs | 6 +- ...ternalListBatchesResponse.Serialization.cs | 4 +- ...ingJobCheckpointsResponse.Serialization.cs | 4 +- ...neTuningJobEventsResponse.Serialization.cs | 4 +- ...ernalListMessagesResponse.Serialization.cs | 6 +- ...tedFineTuningJobsResponse.Serialization.cs | 4 +- ...ernalListRunStepsResponse.Serialization.cs | 6 +- .../InternalListRunsResponse.Serialization.cs | 6 +- ...ternalListThreadsResponse.Serialization.cs | 6 +- ...tVectorStoreFilesResponse.Serialization.cs | 6 +- ...lListVectorStoresResponse.Serialization.cs | 6 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...ntItemFileObjectImageFile.Serialization.cs | 4 +- ...tationsFileCitationObject.Serialization.cs | 2 +- ...itationObjectFileCitation.Serialization.cs | 4 +- ...AnnotationsFilePathObject.Serialization.cs | 2 +- ...onsFilePathObjectFilePath.Serialization.cs | 4 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...sageContentTextObjectText.Serialization.cs | 4 +- ...ternalMessageDeltaContent.Serialization.cs | 2 +- ...ltaContentImageFileObject.Serialization.cs | 2 +- ...tImageFileObjectImageFile.Serialization.cs | 4 +- ...eltaContentImageUrlObject.Serialization.cs | 2 +- ...entImageUrlObjectImageUrl.Serialization.cs | 4 +- ...DeltaContentRefusalObject.Serialization.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 2 +- ...itationObjectFileCitation.Serialization.cs | 4 +- ...AnnotationsFilePathObject.Serialization.cs | 2 +- ...onsFilePathObjectFilePath.Serialization.cs | 4 +- ...ageDeltaContentTextObject.Serialization.cs | 2 +- ...eltaContentTextObjectText.Serialization.cs | 4 +- ...nternalMessageDeltaObject.Serialization.cs | 4 +- ...alMessageDeltaObjectDelta.Serialization.cs | 4 +- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 2 +- ...nalMessageImageUrlContent.Serialization.cs | 2 +- ...alMessageObjectAttachment.Serialization.cs | 4 +- ...rnalMessageRefusalContent.Serialization.cs | 2 +- ...ernalModerationCategories.Serialization.cs | 4 +- ...lModerationCategoryScores.Serialization.cs | 4 +- ...stantRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...hreadRequestToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...alOmniTypedResponseFormat.Serialization.cs | 2 +- ...ternalRealtimeClientEvent.Serialization.cs | 2 +- ...entConversationItemCreate.Serialization.cs | 2 +- ...entConversationItemDelete.Serialization.cs | 2 +- ...tConversationItemTruncate.Serialization.cs | 2 +- ...entInputAudioBufferAppend.Serialization.cs | 2 +- ...ventInputAudioBufferClear.Serialization.cs | 2 +- ...entInputAudioBufferCommit.Serialization.cs | 2 +- ...ClientEventResponseCancel.Serialization.cs | 2 +- ...ClientEventResponseCreate.Serialization.cs | 2 +- ...entResponseCreateResponse.Serialization.cs | 4 +- ...eClientEventSessionUpdate.Serialization.cs | 2 +- ...questAssistantMessageItem.Serialization.cs | 2 +- ...meRequestAudioContentPart.Serialization.cs | 2 +- ...meRequestFunctionCallItem.Serialization.cs | 2 +- ...estFunctionCallOutputItem.Serialization.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...eRequestSystemMessageItem.Serialization.cs | 2 +- ...imeRequestTextContentPart.Serialization.cs | 2 +- ...imeRequestUserMessageItem.Serialization.cs | 2 +- .../InternalRealtimeResponse.Serialization.cs | 4 +- ...eResponseAudioContentPart.Serialization.cs | 2 +- ...nternalRealtimeResponseAudioContentPart.cs | 2 +- ...eResponseFunctionCallItem.Serialization.cs | 2 +- ...nseFunctionCallOutputItem.Serialization.cs | 2 +- ...ernalRealtimeResponseItem.Serialization.cs | 2 +- ...altimeResponseMessageItem.Serialization.cs | 4 +- ...alRealtimeResponseSession.Serialization.cs | 6 +- ...meResponseTextContentPart.Serialization.cs | 2 +- ...InternalRealtimeResponseTextContentPart.cs | 2 +- ...rEventConversationCreated.Serialization.cs | 2 +- ...sationCreatedConversation.Serialization.cs | 4 +- ...oTranscriptionFailedError.Serialization.cs | 4 +- ...timeServerEventErrorError.Serialization.cs | 4 +- ...erEventResponseAudioDelta.Serialization.cs | 2 +- ...ponseAudioTranscriptDelta.Serialization.cs | 2 +- ...tResponseContentPartAdded.Serialization.cs | 2 +- ...ntResponseContentPartDone.Serialization.cs | 2 +- ...unctionCallArgumentsDelta.Serialization.cs | 2 +- ...FunctionCallArgumentsDone.Serialization.cs | 2 +- ...verEventResponseTextDelta.Serialization.cs | 2 +- ...imeServerVadTurnDetection.Serialization.cs | 2 +- ...eToolChoiceFunctionObject.Serialization.cs | 2 +- ...iceFunctionObjectFunction.Serialization.cs | 4 +- ...lRealtimeToolChoiceObject.Serialization.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 2 +- ...lRequiredFunctionToolCall.Serialization.cs | 4 +- ...lResponseFormatJsonObject.Serialization.cs | 2 +- ...lResponseFormatJsonSchema.Serialization.cs | 2 +- ...ormatJsonSchemaJsonSchema.Serialization.cs | 4 +- ...nternalResponseFormatText.Serialization.cs | 2 +- ...esponseMessageTextContent.Serialization.cs | 2 +- ...edActionSubmitToolOutputs.Serialization.cs | 6 +- ...InternalRunRequiredAction.Serialization.cs | 4 +- ...pCodeInterpreterLogOutput.Serialization.cs | 2 +- ...nterpreterToolCallDetails.Serialization.cs | 2 +- .../InternalRunStepDelta.Serialization.cs | 4 +- ...alRunStepDeltaObjectDelta.Serialization.cs | 4 +- ...alRunStepDeltaStepDetails.Serialization.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...tionObjectMessageCreation.Serialization.cs | 4 +- ...etailsToolCallsCodeObject.Serialization.cs | 2 +- ...CodeObjectCodeInterpreter.Serialization.cs | 6 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...odeOutputImageObjectImage.Serialization.cs | 4 +- ...CallsCodeOutputLogsObject.Serialization.cs | 2 +- ...ToolCallsFileSearchObject.Serialization.cs | 2 +- ...lsToolCallsFunctionObject.Serialization.cs | 2 +- ...llsFunctionObjectFunction.Serialization.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 2 +- ...tionObjectMessageCreation.Serialization.cs | 4 +- ...CodeObjectCodeInterpreter.Serialization.cs | 6 +- ...allsCodeOutputImageObject.Serialization.cs | 2 +- ...odeOutputImageObjectImage.Serialization.cs | 4 +- ...ileSearchObjectFileSearch.Serialization.cs | 6 +- ...earchRankingOptionsObject.Serialization.cs | 4 +- ...SearchResultObjectContent.Serialization.cs | 4 +- ...llsFunctionObjectFunction.Serialization.cs | 4 +- ...tepDetailsToolCallsObject.Serialization.cs | 2 +- ...FileSearchToolCallDetails.Serialization.cs | 2 +- ...epFunctionToolCallDetails.Serialization.cs | 2 +- ...RunToolCallObjectFunction.Serialization.cs | 4 +- ...icChunkingStrategyDetails.Serialization.cs | 4 +- ...nkingStrategyRequestParam.Serialization.cs | 2 +- ...bmitToolOutputsRunRequest.Serialization.cs | 4 +- ...ThreadObjectToolResources.Serialization.cs | 4 +- ...lResourcesCodeInterpreter.Serialization.cs | 4 +- ...ctToolResourcesFileSearch.Serialization.cs | 4 +- ...esourcesFileSearchIdsOnly.Serialization.cs | 4 +- ...wnAssistantResponseFormat.Serialization.cs | 2 +- ...nternalUnknownChatMessage.Serialization.cs | 5 +- ...UnknownChatResponseFormat.Serialization.cs | 2 +- ...alUnknownChunkingStrategy.Serialization.cs | 2 +- ...StrategyRequestParamProxy.Serialization.cs | 2 +- ...trategyResponseParamProxy.Serialization.cs | 2 +- ...wnOmniTypedResponseFormat.Serialization.cs | 2 +- .../Models/InternalUpload.Serialization.cs | 4 +- .../InternalUploadPart.Serialization.cs | 4 +- ...FileBatchObjectFileCounts.Serialization.cs | 4 +- .../Models/MessageContent.Serialization.cs | 2 +- ...MessageCreationAttachment.Serialization.cs | 4 +- .../MessageCreationOptions.Serialization.cs | 4 +- .../MessageDeletionResult.Serialization.cs | 4 +- .../MessageFailureDetails.Serialization.cs | 4 +- ...essageModificationOptions.Serialization.cs | 4 +- .../ModelDeletionResult.Serialization.cs | 4 +- .../Models/ModerationOptions.Serialization.cs | 4 +- .../Models/ModerationResult.Serialization.cs | 2 +- ...oderationResultCollection.Serialization.cs | 2 +- .../Models/OpenAIEmbedding.Serialization.cs | 4 +- ...OpenAIEmbeddingCollection.Serialization.cs | 2 +- .../Models/OpenAIError.Serialization.cs | 4 +- .../OpenAIErrorResponse.Serialization.cs | 4 +- .../Models/OpenAIFile.Serialization.cs | 4 +- .../OpenAIFileCollection.Serialization.cs | 2 +- .../Models/OpenAIModel.Serialization.cs | 4 +- .../OpenAIModelCollection.Serialization.cs | 2 +- .../RunCreationOptions.Serialization.cs | 4 +- .../Models/RunError.Serialization.cs | 4 +- .../RunIncompleteDetails.Serialization.cs | 4 +- .../RunModificationOptions.Serialization.cs | 4 +- .../Generated/Models/RunStep.Serialization.cs | 4 +- ...StepCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunStepDetails.Serialization.cs | 2 +- .../Models/RunStepError.Serialization.cs | 4 +- .../RunStepFileSearchResult.Serialization.cs | 4 +- .../Models/RunStepTokenUsage.Serialization.cs | 4 +- .../Models/RunStepToolCall.Serialization.cs | 2 +- ...dateCodeInterpreterOutput.Serialization.cs | 2 +- .../Models/RunTokenUsage.Serialization.cs | 4 +- .../RunTruncationStrategy.Serialization.cs | 4 +- .../SpeechGenerationOptions.Serialization.cs | 4 +- ...taticFileChunkingStrategy.Serialization.cs | 2 +- ...amingChatCompletionUpdate.Serialization.cs | 4 +- ...ingChatFunctionCallUpdate.Serialization.cs | 4 +- ...reamingChatToolCallUpdate.Serialization.cs | 4 +- .../Models/SystemChatMessage.Serialization.cs | 5 +- .../ThreadCreationOptions.Serialization.cs | 4 +- .../ThreadDeletionResult.Serialization.cs | 4 +- .../Models/ThreadMessage.Serialization.cs | 4 +- ...ThreadModificationOptions.Serialization.cs | 4 +- .../Models/ThreadRun.Serialization.cs | 4 +- .../Models/ToolChatMessage.Serialization.cs | 5 +- .../Models/ToolConstraint.Serialization.cs | 2 +- .../Models/ToolDefinition.Serialization.cs | 2 +- .../Models/ToolOutput.Serialization.cs | 4 +- .../Models/ToolResources.Serialization.cs | 4 +- .../TranscribedSegment.Serialization.cs | 4 +- .../Models/TranscribedWord.Serialization.cs | 4 +- ...wnAssistantToolDefinition.Serialization.cs | 2 +- ...ningJobRequestIntegration.Serialization.cs | 2 +- ...nownFineTuningIntegration.Serialization.cs | 2 +- ...ntentTextObjectAnnotation.Serialization.cs | 2 +- ...nknownMessageDeltaContent.Serialization.cs | 2 +- ...eltaTextContentAnnotation.Serialization.cs | 2 +- ...nknownRealtimeClientEvent.Serialization.cs | 2 +- ...nknownRealtimeContentPart.Serialization.cs | 2 +- ...nknownRealtimeRequestItem.Serialization.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 2 +- ...knownRealtimeResponseItem.Serialization.cs | 2 +- ...timeResponseStatusDetails.Serialization.cs | 105 ++ .../UnknownRealtimeResponseStatusDetails.cs | 16 + ...nknownRealtimeServerEvent.Serialization.cs | 2 +- .../UnknownRealtimeTool.Serialization.cs | 2 +- ...nRealtimeToolChoiceObject.Serialization.cs | 2 +- ...nownRealtimeTurnDetection.Serialization.cs | 2 +- ...wnRunStepDeltaStepDetails.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...eInterpreterOutputsObject.Serialization.cs | 2 +- ...allsObjectToolCallsObject.Serialization.cs | 2 +- ...nRunStepObjectStepDetails.Serialization.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 5 +- .../Models/VectorStore.Serialization.cs | 4 +- .../VectorStoreBatchFileJob.Serialization.cs | 4 +- ...VectorStoreCreationHelper.Serialization.cs | 4 +- ...ectorStoreCreationOptions.Serialization.cs | 4 +- ...VectorStoreDeletionResult.Serialization.cs | 4 +- ...ctorStoreExpirationPolicy.Serialization.cs | 4 +- ...ectorStoreFileAssociation.Serialization.cs | 4 +- ...StoreFileAssociationError.Serialization.cs | 4 +- .../VectorStoreFileCounts.Serialization.cs | 4 +- ...rStoreModificationOptions.Serialization.cs | 4 +- ...ightsAndBiasesIntegration.Serialization.cs | 2 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 6 + .openapi3/openapi3-openai.yaml | 5 + .../src/OpenAI.Library.Plugin.csproj | 2 +- .plugin/package-lock.json | 1337 ++++------------- .typespec/assistants/client.tsp | 1 - .typespec/audio/operations.tsp | 15 +- .typespec/chat/client.tsp | 2 +- .typespec/messages/client.tsp | 2 +- .typespec/tspconfig.yaml | 2 +- package-lock.json | 18 +- 403 files changed, 1078 insertions(+), 2063 deletions(-) delete mode 100644 .dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs delete mode 100644 .dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs create mode 100644 .dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs diff --git a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs b/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs deleted file mode 100644 index 945fc05aa..000000000 --- a/.dotnet/src/Generated/Internal/MultiPartFormDataBinaryContent.cs +++ /dev/null @@ -1,195 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.Globalization; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; - -namespace OpenAI -{ - internal partial class MultiPartFormDataBinaryContent : BinaryContent - { - private readonly MultipartFormDataContent _multipartContent; - private static readonly Random _random = new Random(); - private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); - - public MultiPartFormDataBinaryContent() - { - _multipartContent = new MultipartFormDataContent(CreateBoundary()); - } - - public string ContentType - { - get - { - return _multipartContent.Headers.ContentType.ToString(); - } - } - - internal HttpContent HttpContent => _multipartContent; - - private static string CreateBoundary() - { - Span chars = new char[70]; - byte[] random = new byte[70]; - _random.NextBytes(random); - int mask = 255 >> 2; - int i = 0; - for (; i < 70; i++) - { - chars[i] = _boundaryValues[random[i] & mask]; - } - return chars.ToString(); - } - - public void Add(string content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StringContent(content), name, filename, contentType); - } - - public void Add(int content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(long content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(float content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(double content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(decimal content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(bool content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content ? "true" : "false"; - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(Stream content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StreamContent(content), name, filename, contentType); - } - - public void Add(byte[] content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content), name, filename, contentType); - } - - public void Add(BinaryData content, string name, string filename = default, string contentType = default) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); - } - - private void Add(HttpContent content, string name, string filename, string contentType) - { - if (contentType != null) - { - Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); - AddContentTypeHeader(content, contentType); - } - if (filename != null) - { - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - _multipartContent.Add(content, name, filename); - } - else - { - _multipartContent.Add(content, name); - } - } - - public static void AddContentTypeHeader(HttpContent content, string contentType) - { - MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); - content.Headers.ContentType = header; - } - - public override bool TryComputeLength(out long length) - { - if (_multipartContent.Headers.ContentLength is long contentLength) - { - length = contentLength; - return true; - } - length = 0; - return false; - } - - public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - _multipartContent.CopyTo(stream, default, cancellationToken); -#else - _multipartContent.CopyToAsync(stream).GetAwaiter().GetResult(); -#endif - } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#else - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#endif - } - - public override void Dispose() - { - _multipartContent.Dispose(); - } - } -} diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index 84848d76f..cf709ad43 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -168,7 +168,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -346,7 +346,7 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index 0c6188dd0..a84901fd9 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -139,18 +139,19 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } + // CUSTOM: Initialize Content collection property. return new AssistantChatMessage( refusal, participantName, toolCalls ?? new ChangeTrackingList(), functionCall, role, - content, + content ?? new ChatMessageContent(), additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs index f64e29236..b74e1cf0e 100644 --- a/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantCreationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantCreationOptions DeserializeAssistantCreationOptions(Jso nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs index 3eb956140..d6203fb79 100644 --- a/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static AssistantDeletionResult DeserializeAssistantDeletionResult(JsonE @object = new InternalDeleteAssistantResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs index 3f71b35d2..d60696f6a 100644 --- a/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantModificationOptions.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("topP"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -312,7 +312,7 @@ internal static AssistantModificationOptions DeserializeAssistantModificationOpt nucleusSamplingFactor = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs index 2fff8f967..8b20f6949 100644 --- a/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantResponseFormat.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs index d612c6142..d2c44e115 100644 --- a/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantThread.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -81,7 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -176,7 +176,7 @@ internal static AssistantThread DeserializeAssistantThread(JsonElement element, toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs index 9a26e56a9..8ed9f26bb 100644 --- a/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscription.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) + if (true && Optional.IsCollectionDefined(Words) && _additionalBinaryDataProperties?.ContainsKey("words") != true) { writer.WritePropertyName("words"u8); writer.WriteStartArray(); @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) + if (true && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static AudioTranscription DeserializeAudioTranscription(JsonElement ele duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 6b94dbd96..e1b79d7df 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -79,7 +79,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J internalTimestampGranularities = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index 836140b5c..cc0d8e20a 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("duration"u8); writer.WriteNumberValue(Convert.ToDouble(Duration.Value.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -143,7 +143,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element duration = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs index adca488bc..d127fe2aa 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static AudioTranslationOptions DeserializeAudioTranslationOptions(JsonE model = new InternalCreateTranslationRequestModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs index 48b2f1033..4d1bde5ac 100644 --- a/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletion.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static ChatCompletion DeserializeChatCompletion(JsonElement element, Mo createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs index 2391f201a..8f1a29eca 100644 --- a/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatCompletionOptions.Serialization.cs @@ -297,7 +297,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("serviceTier"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -621,7 +621,7 @@ internal static ChatCompletionOptions DeserializeChatCompletionOptions(JsonEleme serviceTier = new InternalCreateChatCompletionRequestServiceTier(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs index c04472397..e3b1e78f5 100644 --- a/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ChatFunction DeserializeChatFunction(JsonElement element, ModelR functionParameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs index 220a7e9a0..e5f6142b7 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatFunctionCall DeserializeChatFunctionCall(JsonElement element DeserializeFunctionArgumentsValue(prop, ref functionArguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs index 3ecb3dc4c..4ec64d73c 100644 --- a/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatFunctionChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatFunctionChoice)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs index f86a06046..0d2c370bf 100644 --- a/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatInputTokenUsageDetails.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("cached_tokens"u8); writer.WriteNumberValue(CachedTokenCount.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ChatInputTokenUsageDetails DeserializeChatInputTokenUsageDetails cachedTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 09b972a5d..53e376e04 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatMessage))] - public abstract partial class ChatMessage : IJsonModel + public partial class ChatMessage : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,12 +25,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.ToSerialString()); } - if (options.Format != "W" && Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) + // CUSTOM: Check inner collection is defined. + if (true && Optional.IsDefined(Content) && Content.IsInnerCollectionDefined() && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); this.SerializeContentValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatMessage.cs b/.dotnet/src/Generated/Models/ChatMessage.cs index f332e4ff5..368ee1c8d 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public abstract partial class ChatMessage + public partial class ChatMessage { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs deleted file mode 100644 index c0df95239..000000000 --- a/.dotnet/src/Generated/Models/ChatMessageContent.Serialization.cs +++ /dev/null @@ -1,130 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using OpenAI; - -namespace OpenAI.Chat -{ - public partial class ChatMessageContent : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{format}' format."); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - if (ModelSerializationExtensions.IsSentinelValue(item.Value)) - { - continue; - } - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ChatMessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - protected virtual ChatMessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatMessageContent(document.RootElement, options); - } - - internal static ChatMessageContent DeserializeChatMessageContent(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ChatMessageContent(additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support writing '{options.Format}' format."); - } - } - - ChatMessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - protected virtual ChatMessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeChatMessageContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ChatMessageContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - public static implicit operator BinaryContent(ChatMessageContent chatMessageContent) - { - if (chatMessageContent == null) - { - return null; - } - return BinaryContent.Create(chatMessageContent, ModelSerializationExtensions.WireOptions); - } - - public static explicit operator ChatMessageContent(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeChatMessageContent(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs index 18ef8d150..2cfaddfd1 100644 --- a/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessageContentPart.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatMessageContentPart)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs index 0684dd2c1..06c552a79 100644 --- a/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatOutputTokenUsageDetails.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokenCount.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ChatOutputTokenUsageDetails DeserializeChatOutputTokenUsageDetai audioTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index 516c68d06..e2f4a00c5 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -11,7 +11,7 @@ namespace OpenAI.Chat { [PersistableModelProxy(typeof(InternalUnknownChatResponseFormat))] - public abstract partial class ChatResponseFormat : IJsonModel + public partial class ChatResponseFormat : IJsonModel { protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { @@ -25,7 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.cs index e808477d9..a904c8862 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.cs @@ -7,7 +7,7 @@ namespace OpenAI.Chat { - public abstract partial class ChatResponseFormat + public partial class ChatResponseFormat { private protected IDictionary _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs index 90d022545..be762ab42 100644 --- a/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenLogProbabilityDetails.Serialization.cs @@ -68,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static ChatTokenLogProbabilityDetails DeserializeChatTokenLogProbabilit topLogProbabilities = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs index e3e9cd6d2..3e4872d39 100644 --- a/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenTopLogProbabilityDetails.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("bytes"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static ChatTokenTopLogProbabilityDetails DeserializeChatTokenTopLogProb utf8Bytes = new ReadOnlyMemory(array); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs index 80bd18fc0..d8b52c91e 100644 --- a/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTokenUsage.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("prompt_tokens_details"u8); writer.WriteObjectValue(InputTokenDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -137,7 +137,7 @@ internal static ChatTokenUsage DeserializeChatTokenUsage(JsonElement element, Mo inputTokenDetails = ChatInputTokenUsageDetails.DeserializeChatInputTokenUsageDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs index 78ea361f6..42c658144 100644 --- a/.dotnet/src/Generated/Models/ChatTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatTool.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ChatTool DeserializeChatTool(JsonElement element, ModelReaderWri kind = prop.Value.GetString().ToChatToolKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs index a53e1a7cc..c7cc7b0e2 100644 --- a/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ChatToolCall DeserializeChatToolCall(JsonElement element, ModelR kind = prop.Value.GetString().ToChatToolCallKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs index 9d5db01ba..f775a36af 100644 --- a/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatToolChoice.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(ChatToolChoice)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs index 16e6254ee..92cb9c4ec 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolDefinition.Serialization.cs @@ -51,7 +51,7 @@ internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefi @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs index 34c802cfc..6798b11b8 100644 --- a/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/CodeInterpreterToolResources.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static CodeInterpreterToolResources DeserializeCodeInterpreterToolResou fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index 0cf28775d..76090d28a 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 9984dcc5e..47907be5c 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index f01e5c40b..aeb95f8c1 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -102,7 +102,7 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs index bcd5681d0..bb8ffc40d 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs @@ -73,7 +73,7 @@ internal static ConversationInputAudioClearedUpdate DeserializeConversationInput kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs index 8028cac70..61c5447c9 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index b723d85b5..e5eed1517 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index bb9238a8f..5e25cb18c 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs index 72a69ae12..ca18ed51e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTokenUsageDetails.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ConversationInputTokenUsageDetails DeserializeConversationInputT audioTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 8033fdfd3..3f7b726e2 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index bc792d0be..0511fd330 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs index eafaed0a4..a6183f7b6 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static ConversationInputTranscriptionOptions DeserializeConversationInp model = new ConversationTranscriptionModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index ce06f965e..ffb2e528e 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs index 343ca9d68..77fa65027 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs @@ -95,7 +95,7 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 0d51d9527..9fe31d103 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs index 092555efa..09899e509 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs @@ -117,7 +117,7 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs index 2e752013d..5b56625f4 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs index d9b36abb4..8b48546c1 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index 136a423a5..b7bb89d83 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs index 9cb4dca6f..c3f6eb8fa 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs @@ -128,7 +128,7 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 82a6c7954..7a27df72c 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -106,7 +106,7 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs index d4903be12..35403bdb8 100644 --- a/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationOutputTokenUsageDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static ConversationOutputTokenUsageDetails DeserializeConversationOutpu audioTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs index f8e9674af..1579cc3cf 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitDetailsItem.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reset_seconds"u8); writer.WriteNumberValue(Convert.ToDouble(TimeUntilReset.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static ConversationRateLimitDetailsItem DeserializeConversationRateLimi timeUntilReset = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs index bd96f0c1e..4d3889c42 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs @@ -94,7 +94,7 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 8cc2d22e0..399d07915 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 8a7b9088a..44ef1bbad 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index 5e59b4494..d3bf22808 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs index e640551ad..4a25c88a8 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionOptions.Serialization.cs @@ -120,7 +120,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -281,7 +281,7 @@ internal static ConversationSessionOptions DeserializeConversationSessionOptions maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index 45664ac17..1bce6c107 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs index 2e1701c6e..7aabd5019 100644 --- a/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationStatusDetails.Serialization.cs @@ -5,12 +5,12 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; namespace OpenAI.RealtimeConversation { + [PersistableModelProxy(typeof(UnknownRealtimeResponseStatusDetails))] public abstract partial class ConversationStatusDetails : IJsonModel { internal ConversationStatusDetails() @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(StatusKind.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -76,21 +76,7 @@ internal static ConversationStatusDetails DeserializeConversationStatusDetails(J { return null; } - ConversationStatus statusKind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("type"u8)) - { - statusKind = new ConversationStatus(prop.Value.GetString()); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new RealtimeConversation.ConversationStatusDetails(statusKind, additionalBinaryDataProperties); + return UnknownRealtimeResponseStatusDetails.DeserializeUnknownRealtimeResponseStatusDetails(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs index 992255c6f..04a8e335f 100644 --- a/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTokenUsage.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output_token_details"u8); writer.WriteObjectValue(OutputTokenDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static ConversationTokenUsage DeserializeConversationTokenUsage(JsonEle outputTokenDetails = ConversationOutputTokenUsageDetails.DeserializeConversationOutputTokenUsageDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index a179742d3..dc5a71643 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs index 745a4f610..d308a20ee 100644 --- a/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTurnDetectionOptions.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs index c2aa6af94..e1256ed33 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Kind.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs index 8b17dadbc..c71be3f7c 100644 --- a/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingGenerationOptions.Serialization.cs @@ -59,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static EmbeddingGenerationOptions DeserializeEmbeddingGenerationOptions endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs index f84394dec..49f4c9685 100644 --- a/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/EmbeddingTokenUsage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static EmbeddingTokenUsage DeserializeEmbeddingTokenUsage(JsonElement e totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index 1e0d81a7b..43dcabbbf 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs index 020d1121e..455776386 100644 --- a/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileDeletionResult DeserializeFileDeletionResult(JsonElement ele @object = new InternalDeleteFileResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs index 6f97b0cf2..fb331ff03 100644 --- a/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileFromStoreRemovalResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static FileFromStoreRemovalResult DeserializeFileFromStoreRemovalResult @object = new InternalDeleteVectorStoreFileResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs index 8ed4f8e82..04fe002e3 100644 --- a/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchRankingOptions.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(_scoreThreshold); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(Jso scoreThreshold = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 25afeb39a..393477d65 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -66,7 +66,7 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs index 94a15cc47..df2ec91f8 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolResources.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("vector_stores"u8); this.SerializeNewVectorStores(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -127,7 +127,7 @@ internal static FileSearchToolResources DeserializeFileSearchToolResources(JsonE newVectorStores = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index 1250f197d..eb495d8a2 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs index 836f058fe..1001f4ab3 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegrationWandbWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static FineTuningIntegrationWandbWandb DeserializeFineTuningIntegration tags = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs index 152c67a79..68aff9421 100644 --- a/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJob.Serialization.cs @@ -192,7 +192,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("estimatedFinish"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -399,7 +399,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode estimatedFinish = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs index b6ff331f5..20bbc87e6 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobError.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("param"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static FineTuningJobError DeserializeFineTuningJobError(JsonElement ele @param = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs index f5cb1dd52..2c3beecb5 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement ele @object = new InternalFineTuningJobEventObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs index 19a1ce083..abe7ba36f 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparameters.Serialization.cs @@ -67,7 +67,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -128,7 +128,7 @@ internal static FineTuningJobHyperparameters DeserializeFineTuningJobHyperparame learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs index 61b405580..eeaf45f5e 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.Serialization.cs @@ -99,7 +99,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("seed"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -212,7 +212,7 @@ internal static FineTuningOptions DeserializeFineTuningOptions(JsonElement eleme seed = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 0a9625adf..0f4df11c1 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -72,12 +72,13 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionChatMessage(functionName, role, content, additionalBinaryDataProperties); + // CUSTOM: Initialize Content collection property. + return new FunctionChatMessage(functionName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index c40352659..ecd5a7ffd 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -62,7 +62,7 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs index 2af49f407..a89305aef 100644 --- a/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImage.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(ImageUri.AbsoluteUri); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static GeneratedImage DeserializeGeneratedImage(JsonElement element, Mo imageUri = new Uri(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs index 65fb428c8..b58c56430 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs index c947a593f..1e3d8a420 100644 --- a/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/HyperparameterOptions.Serialization.cs @@ -63,7 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static HyperparameterOptions DeserializeHyperparameterOptions(JsonEleme learningRateMultiplier = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs index f6a7654dd..4b56a9f0a 100644 --- a/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageEditOptions.Serialization.cs @@ -95,7 +95,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -210,7 +210,7 @@ internal static ImageEditOptions DeserializeImageEditOptions(JsonElement element endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs index 7f6548300..cb8f165d3 100644 --- a/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageGenerationOptions.Serialization.cs @@ -102,7 +102,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -222,7 +222,7 @@ internal static ImageGenerationOptions DeserializeImageGenerationOptions(JsonEle endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs index 093c2eba2..860fa87f2 100644 --- a/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ImageVariationOptions.Serialization.cs @@ -85,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(EndUserId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -184,7 +184,7 @@ internal static ImageVariationOptions DeserializeImageVariationOptions(JsonEleme endUserId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs index 9b8141cb2..a8cfb5281 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("data"u8); writer.WriteBase64StringValue(Data.ToArray(), "D"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAddUploadPartRequest DeserializeInternalAddUploadPartReq data = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs index cac5661c5..cc5ef9d4a 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatJsonObject DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index 766933223..a7a402637 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -74,7 +74,7 @@ internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAss @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs index a09b2a151..a7e939ffa 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAssistantResponseFormatText DeserializeInternalAssistant @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs index 3a2b661f5..efe91100e 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchFileSearch.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("max_num_results"u8); writer.WriteNumberValue(InternalMaxNumResults.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalAssistantToolsFileSearchFileSearch DeserializeInternalAs internalMaxNumResults = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs index 9b3d12d02..c73097323 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnly.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalAssistantToolsFileSearchTypeOnly DeserializeInternalAssi @type = new InternalAssistantToolsFileSearchTypeOnlyType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs index e6f39cdf1..bd02f8444 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalAssistantsNamedToolChoiceFunction DeserializeInternalAss name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs index 108c0839e..2c92732ee 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategy DeserializeInternalAutoChunkingStra @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs index 5147cee9d..c258abd77 100644 --- a/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAutoChunkingStrategyRequestParam.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalAutoChunkingStrategyRequestParam DeserializeInternalAuto @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs index 69d90d1bf..c3d3f4c0d 100644 --- a/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchError.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("line"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchError DeserializeInternalBatchError(JsonElement ele line = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs index f2e947928..7d09b6dca 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrors.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalBatchErrors DeserializeInternalBatchErrors(JsonElement e data = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs index f678fa8ec..ee8c9a1b2 100644 --- a/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchJob.Serialization.cs @@ -149,7 +149,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -368,7 +368,7 @@ internal static InternalBatchJob DeserializeInternalBatchJob(JsonElement element metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs index 3b6e44af8..e1af9a276 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestCounts.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("failed"u8); writer.WriteNumberValue(Failed); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalBatchRequestCounts DeserializeInternalBatchRequestCounts failed = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs index 21c759a62..103045cb5 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInput.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url.AbsoluteUri); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -111,7 +111,7 @@ internal static InternalBatchRequestInput DeserializeInternalBatchRequestInput(J url = new Uri(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs index 83214f156..e2f37f4af 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutput.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("error"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static InternalBatchRequestOutput DeserializeInternalBatchRequestOutput error = InternalBatchRequestOutputError.DeserializeInternalBatchRequestOutputError(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs index 0f345b4f3..a8c726285 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputError.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalBatchRequestOutputError DeserializeInternalBatchRequestO message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs index d3798d3a7..435633b71 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestOutputResponse.Serialization.cs @@ -60,7 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalBatchRequestOutputResponse DeserializeInternalBatchReque body = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs index 0dcdd1325..c43769045 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionFunctionCallOption DeserializeInternalChat name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs index b0ca4e0bc..1f5d4d3ad 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkFunction.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalChatCompletionMessageToolCallChunkFunction DeserializeIn DeserializeArgumentsValue(prop, ref arguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs index 79c175a85..48fde14d1 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeArgumentsValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionMessageToolCallFunction DeserializeInterna DeserializeArgumentsValue(prop, ref arguments); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs index 5d587d989..c2d62dcba 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(Function, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionNamedToolChoice DeserializeInternalChatCom function = InternalChatCompletionNamedToolChoiceFunction.DeserializeInternalChatCompletionNamedToolChoiceFunction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs index c1faea37f..4c3b8a036 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionNamedToolChoiceFunction DeserializeInterna name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs index 0360a6b6f..5c1248e27 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartImage Deserialize imageUrl = InternalChatCompletionRequestMessageContentPartImageImageUrl.DeserializeInternalChatCompletionRequestMessageContentPartImageImageUrl(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs index 4af725052..514e40e67 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalChatCompletionRequestMessageContentPartImageImageUrl Des url = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs index 299bf5947..0bd526080 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("refusal"u8); writer.WriteStringValue(Refusal); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartRefusal Deseriali refusal = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs index ed873c838..d318473d8 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionRequestMessageContentPartText DeserializeI text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs index 9f9755907..9f3af8c10 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessage.Serialization.cs @@ -43,7 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (true && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,16 +166,17 @@ internal static InternalChatCompletionResponseMessage DeserializeInternalChatCom functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } + // CUSTOM: Initialize Content collection property. return new InternalChatCompletionResponseMessage( refusal, toolCalls ?? new ChangeTrackingList(), role, - content, + content ?? new ChatMessageContent(), functionCall, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs index ae4acda12..4bea570ba 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageFunctionCall.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalChatCompletionResponseMessageFunctionCall DeserializeInt arguments = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs index 38c15a85e..cf88a53b3 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamOptions.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("include_usage"u8); writer.WriteBooleanValue(IncludeUsage.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalChatCompletionStreamOptions DeserializeInternalChatCompl includeUsage = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs index ccd542926..e67571f75 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDelta.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function_call"u8); writer.WriteObjectValue(FunctionCall, options); } - if (options.Format != "W" && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (true && Optional.IsCollectionDefined(ToolCalls) && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -59,7 +59,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); } - if (Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true) + // CUSTOM: Check inner collection is defined. + if (Optional.IsDefined(Content) && _additionalBinaryDataProperties?.ContainsKey("content") != true && Content.IsInnerCollectionDefined()) { if (Content != null) { @@ -71,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,17 +167,18 @@ internal static InternalChatCompletionStreamResponseDelta DeserializeInternalCha DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } + // CUSTOM: Initialize Content collection property. return new InternalChatCompletionStreamResponseDelta( functionCall, toolCalls ?? new ChangeTrackingList(), refusal, role, - content, + content ?? new ChatMessageContent(), additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs index 7296b33fe..22c9f1605 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonObject.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatJsonObject DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index f6efd50f0..2a25b0327 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -67,7 +67,7 @@ internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResp @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs index 424c74152..2100a5dfd 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatText.Serialization.cs @@ -51,7 +51,7 @@ internal static InternalChatResponseFormatText DeserializeInternalChatResponseFo @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs index a73dbc50a..20bd2f55e 100644 --- a/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCompleteUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("md5"u8); writer.WriteStringValue(Md5); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCompleteUploadRequest DeserializeInternalCompleteUploadR md5 = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs index c959b397f..685addea4 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateAssistantRequestToolResources DeserializeInternalC fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 4261b32aa..36c62aac1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs index 06b793bc3..a9487ca5d 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequest.Serialization.cs @@ -69,7 +69,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -152,7 +152,7 @@ internal static InternalCreateBatchRequest DeserializeInternalCreateBatchRequest metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs index 7c7e1125a..327b4890c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponse.Serialization.cs @@ -71,7 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -165,7 +165,7 @@ internal static InternalCreateChatCompletionFunctionResponse DeserializeInternal usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs index 64cb242aa..b4f1f585e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoice.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteObjectValue(Message, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionFunctionResponseChoice DeserializeIn message = InternalChatCompletionResponseMessage.DeserializeInternalChatCompletionResponseMessage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs index 84ab1def1..69403c77f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("logprobs"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateChatCompletionResponseChoice DeserializeInternalCr logprobs = InternalCreateChatCompletionResponseChoiceLogprobs.DeserializeInternalCreateChatCompletionResponseChoiceLogprobs(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs index 4a9f4f0c7..f7bb85157 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static InternalCreateChatCompletionResponseChoiceLogprobs DeserializeIn refusal = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs index 0ce2253bb..62624c359 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoice.Serialization.cs @@ -57,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("finishReason"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs index 0347534db..4c7d91664 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceLogprobs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateChatCompletionStreamResponseChoiceLogprobs)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { if (Content != null && Optional.IsCollectionDefined(Content)) { @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("content"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("refusal") != true) { if (Refusal != null && Optional.IsCollectionDefined(Refusal)) { @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("refusal"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -136,7 +136,7 @@ internal static InternalCreateChatCompletionStreamResponseChoiceLogprobs Deseria refusal = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs index ef21dbfab..2729b9e7c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateChatCompletionStreamResponseUsage DeserializeInter totalTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs index a017b0f33..ea5ce997e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.Serialization.cs @@ -254,7 +254,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("user"u8); writer.WriteStringValue(User); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -489,7 +489,7 @@ internal static InternalCreateCompletionRequest DeserializeInternalCreateComplet user = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs index 70a0a38d5..8ff5921f9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponse.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -166,7 +166,7 @@ internal static InternalCreateCompletionResponse DeserializeInternalCreateComple usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs index b2c2fac33..1979a5fe2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoice.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -130,7 +130,7 @@ internal static InternalCreateCompletionResponseChoice DeserializeInternalCreate text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs index 8c1ab4ca3..c47f11632 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceLogprobs.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -205,7 +205,7 @@ internal static InternalCreateCompletionResponseChoiceLogprobs DeserializeIntern topLogprobs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs index 194ab4816..ebea86565 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestWandbIntegrationWandb.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("project"u8); writer.WriteStringValue(Project); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -168,7 +168,7 @@ internal static InternalCreateFineTuningJobRequestWandbIntegrationWandb Deserial project = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs index 5a32beca1..7c71777ad 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image_url"u8); writer.WriteObjectValue(ImageUrl, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalCreateModerationRequestInput2 DeserializeInternalCreateM imageUrl = InternalCreateModerationRequestInputImageUrl.DeserializeInternalCreateModerationRequestInputImageUrl(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs index 8be999296..878c6f0be 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalCreateModerationRequestInput3 DeserializeInternalCreateM text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs index 6b3b9af9c..b65ae8776 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateModerationRequestInputImageUrl DeserializeInternal url = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs index b4a0de100..7e26ddd19 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationResponseResultCategoryAppliedInputTypes.Serialization.cs @@ -226,7 +226,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -503,7 +503,7 @@ internal static InternalCreateModerationResponseResultCategoryAppliedInputTypes violenceGraphic = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs index 01905e802..471899a6b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.Serialization.cs @@ -218,7 +218,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -445,7 +445,7 @@ internal static InternalCreateThreadAndRunRequest DeserializeInternalCreateThrea toolChoice = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs index 83b433afa..ded12e75f 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadAndRunRequestToolResources DeserializeIntern fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs index 7a6dce23a..141e218cd 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadAndRunRequestToolResourcesCodeInterpreter De fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs index be7fd398e..b9e1a4ee7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateThreadRequestToolResources DeserializeInternalCrea fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs index 5f4ffe3c8..1e6146b9e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalCreateThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs index 9fb5f9bd7..e432b91e0 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadRequestToolResourcesFileSearchBase.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalCreateThreadRequestToolResourcesFileSearchBase)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -70,7 +70,7 @@ internal static InternalCreateThreadRequestToolResourcesFileSearchBase Deseriali IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs index e0437d254..14ed7a98e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranscriptionResponseJson DeserializeInternalCreat text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs index 27f0a2079..ddaff2f1a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseJson.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalCreateTranslationResponseJson DeserializeInternalCreateT text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs index 02947af26..121cd3ce8 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("mime_type"u8); writer.WriteStringValue(MimeType); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalCreateUploadRequest DeserializeInternalCreateUploadReque mimeType = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs index 2220a6dbd..792fe9f39 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileBatchRequest.Serialization.cs @@ -58,7 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalCreateVectorStoreFileBatchRequest DeserializeInternalCre chunkingStrategy = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs index 5d54a2b94..ea7862847 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalCreateVectorStoreFileRequest DeserializeInternalCreateVe chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 1de8bbca4..60f4ec948 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs index 5b6cba9cf..b990c6541 100644 --- a/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileUploadOptions.Serialization.cs @@ -45,7 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalFileUploadOptions DeserializeInternalFileUploadOptions(J purpose = new FileUploadPurpose(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index 5b6cc721f..ce0eec65b 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -108,18 +108,19 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } + // CUSTOM: Initialize Content collection property. return new InternalFineTuneChatCompletionRequestAssistantMessage( refusal, participantName, toolCalls ?? new ChangeTrackingList(), functionCall, role, - content, + content ?? new ChatMessageContent(), additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index 7de59dd5c..4c6448cec 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index d43e08059..5658f3ef8 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs index 0de8eab9c..ef1ab9143 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpoint.Serialization.cs @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -151,7 +151,7 @@ internal static InternalFineTuningJobCheckpoint DeserializeInternalFineTuningJob @object = new InternalFineTuningJobCheckpointObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs index 4f0c85906..52ee0448d 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointMetrics.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("full_valid_mean_token_accuracy"u8); writer.WriteNumberValue(FullValidMeanTokenAccuracy.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -175,7 +175,7 @@ internal static InternalFineTuningJobCheckpointMetrics DeserializeInternalFineTu fullValidMeanTokenAccuracy = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs index 838e6b4d5..2f5a99d7b 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneChatRequestInput.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -180,7 +180,7 @@ internal static InternalFinetuneChatRequestInput DeserializeInternalFinetuneChat functions = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs index 3cab64d61..30c684544 100644 --- a/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFinetuneCompletionRequestInput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("completion"u8); writer.WriteStringValue(Completion); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalFinetuneCompletionRequestInput DeserializeInternalFinetu completion = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs index d31ca9b43..1a1fb60f9 100644 --- a/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFunctionDefinition.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition parameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs index 3a000a87c..4de8caa0c 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListAssistantsResponse DeserializeInternalListAssistants hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs index 8d9ee1700..b2a0325c6 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponse.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListBatchesResponse DeserializeInternalListBatchesRespon @object = new InternalListBatchesResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs index 2ac8bc91f..ecc8440c6 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponse.Serialization.cs @@ -75,7 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static InternalListFineTuningJobCheckpointsResponse DeserializeInternal hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs index 516a4d2ed..e700b47fd 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListFineTuningJobEventsResponse DeserializeInternalListF @object = new InternalListFineTuningJobEventsResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs index bbc78c5a8..691a66723 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListMessagesResponse DeserializeInternalListMessagesResp hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs index a1e2e6614..cfa70a193 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponse.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -117,7 +117,7 @@ internal static InternalListPaginatedFineTuningJobsResponse DeserializeInternalL @object = new InternalListPaginatedFineTuningJobsResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs index 90254865d..568099227 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunStepsResponse DeserializeInternalListRunStepsResp hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs index 2ea9d675d..a18bb7c40 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListRunsResponse DeserializeInternalListRunsResponse(Jso hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs index d318b8591..deba50bb2 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListThreadsResponse DeserializeInternalListThreadsRespon hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs index ce501adb6..8d2b5fdf2 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoreFilesResponse DeserializeInternalListVect hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs index 66410109c..15a375b63 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("data") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("data") != true) { writer.WritePropertyName("data"u8); writer.WriteStartArray(); @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("has_more"u8); writer.WriteBooleanValue(HasMore); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -139,7 +139,7 @@ internal static InternalListVectorStoresResponse DeserializeInternalListVectorSt hasMore = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs index 8772c71db..f163923b5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrl.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentImageUrlObjectImageUrl DeserializeInternal detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs index 7c745c3da..e1675137f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentItemFileObjectImageFile.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageContentItemFileObjectImageFile DeserializeInterna detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index 7dfc26d84..ab29b1156 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 58d3807ff..4e5168aad 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFileCitationObjectFileCitat fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index 4b841af4a..582b2a166 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 0ecb213f7..9c2063bd9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalMessageContentTextAnnotationsFilePathObjectFilePath Dese fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index 3086866c5..a798a10c4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs index af05382b9..e023a7c53 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectText.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageContentTextObjectText DeserializeInternalMessageC annotations = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index 91a999e2c..12ffb7f87 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index 3a88bf110..0e5ec5226 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs index ca340bd93..38f2a8da1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFile.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentImageFileObjectImageFile DeserializeI detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index 8e6c19097..c5ceddcd9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs index 418ad6161..84fe846be 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrl.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("detail"u8); writer.WriteStringValue(Detail); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalMessageDeltaContentImageUrlObjectImageUrl DeserializeInt detail = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index 6140f2f68..a2252f2fa 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index 33c64d6f1..bed2a33a6 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs index 51e88fddd..51525935e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("quote"u8); writer.WriteStringValue(Quote); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObjectFile quote = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 3765a643e..93edc71d5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -129,7 +129,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs index 2836f1855..64af2f141 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 7fdde5f46..3dbc5f8bc 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs index 3c07e344f..3a75de3db 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObjectText.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalMessageDeltaContentTextObjectText DeserializeInternalMes annotations = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs index 42d8a366d..af9621cc5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObject.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("delta"u8); writer.WriteObjectValue(Delta, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalMessageDeltaObject DeserializeInternalMessageDeltaObject delta = InternalMessageDeltaObjectDelta.DeserializeInternalMessageDeltaObjectDelta(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs index bf5058089..6d2f67e65 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDelta.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("role"u8); writer.WriteStringValue(Role.Value.ToSerialString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalMessageDeltaObjectDelta DeserializeInternalMessageDeltaO role = prop.Value.GetString().ToMessageRole(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 74c45e17c..73118f8d8 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 08787d796..725875fd5 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF imageFile = InternalMessageContentItemFileObjectImageFile.DeserializeInternalMessageContentItemFileObjectImageFile(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 785544dae..64a82a871 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr imageUrl = InternalMessageContentImageUrlObjectImageUrl.DeserializeInternalMessageContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs index 6b17bbd77..cb5cc7e63 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectAttachment.Serialization.cs @@ -54,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -125,7 +125,7 @@ internal static InternalMessageObjectAttachment DeserializeInternalMessageObject tools = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index 56dfdad54..3d0658b46 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs index 0bd7e4bf3..f2979e342 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategories.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteBooleanValue(ViolenceGraphic); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -217,7 +217,7 @@ internal static InternalModerationCategories DeserializeInternalModerationCatego violenceGraphic = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs index b0221bf50..5ce3e2fbd 100644 --- a/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModerationCategoryScores.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("violence/graphic"u8); writer.WriteNumberValue(ViolenceGraphic); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -217,7 +217,7 @@ internal static InternalModerationCategoryScores DeserializeInternalModerationCa violenceGraphic = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs index 6dd1c7fb7..b720134bc 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyAssistantRequestToolResources DeserializeInternalM fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs index 8f4ff2434..88bfe2b56 100644 --- a/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyAssistantRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyAssistantRequestToolResourcesCodeInterpreter Deser fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs index df7468129..736a11320 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalModifyThreadRequestToolResources DeserializeInternalModi fileSearch = InternalToolResourcesFileSearchIdsOnly.DeserializeInternalToolResourcesFileSearchIdsOnly(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs index bf663fec7..43462682f 100644 --- a/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalModifyThreadRequestToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalModifyThreadRequestToolResourcesCodeInterpreter Deserial fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index 2ab27b49c..ce3d3c9e9 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs index 621f845ee..c2f44d8f0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs index a4557d237..24f450121 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs @@ -95,7 +95,7 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs index dcec802a1..86e3ea587 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs index 4888175b7..7ab51b936 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs @@ -106,7 +106,7 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs index 112b33e0f..d04c79ef3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs index 1f99b75fb..ab1a3274d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferClear DeserializeInte kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs index c74e966ab..b05da3bd5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferCommit DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs index e2ca8fa69..b31985ada 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs @@ -69,7 +69,7 @@ internal static InternalRealtimeClientEventResponseCancel DeserializeInternalRea kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs index a316ecfba..a4b7b721c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs index 37b909328..e5feb25ba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreateResponse.Serialization.cs @@ -96,7 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -224,7 +224,7 @@ internal static InternalRealtimeClientEventResponseCreateResponse DeserializeInt toolChoice = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs index 49e68b5e4..25de3606f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index d6afee1cb..f8a1da5a0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index 4369d4ea9..e37501778 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -80,7 +80,7 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index b4b54872a..36b86554c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -116,7 +116,7 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index 2faae9d87..df217b297 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -90,7 +90,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index d92ed2b69..c831ff72d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -94,7 +94,7 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index e75ddc026..2c3f892aa 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index d91999c1b..da99cb5e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index a2d0402cf..48aea22d0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -105,7 +105,7 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs index 92bf2feb4..51ad43ae0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponse.Serialization.cs @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -162,7 +162,7 @@ internal static InternalRealtimeResponse DeserializeInternalRealtimeResponse(Jso output = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 0e534ce96..6af2083e7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -96,7 +96,7 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs index e1e459bce..8d66f9140 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseAudioContentPart : ConversationContentPart { - internal InternalRealtimeResponseAudioContentPart(string internalTranscriptValue) : base(ConversationContentPartKind.Audio) + internal InternalRealtimeResponseAudioContentPart(string internalTranscriptValue) : base(ConversationContentPartKind.OutputAudio) { InternalTranscriptValue = internalTranscriptValue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index 8a0f226bf..e223039de 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -123,7 +123,7 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index 013b44519..f2d434297 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -101,7 +101,7 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index f18cd3e5e..d7a2f8a40 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("id"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 9d0023039..43daa4565 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -32,7 +32,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeResponseMessageItem)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -122,7 +122,7 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs index 943411ebf..8b2c39d1c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSession.Serialization.cs @@ -93,7 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("turn_detection"u8); writer.WriteObjectValue(TurnDetection, options); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tools") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -139,7 +139,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("maxResponseOutputTokens"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -286,7 +286,7 @@ internal static InternalRealtimeResponseSession DeserializeInternalRealtimeRespo maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 91a7f9fa4..69ffb7677 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs index 449c66ff2..2cad1c67f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseTextContentPart : ConversationContentPart { - internal InternalRealtimeResponseTextContentPart(string internalTextValue) : base(ConversationContentPartKind.Text) + internal InternalRealtimeResponseTextContentPart(string internalTextValue) : base(ConversationContentPartKind.OutputText) { InternalTextValue = internalTextValue; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs index 97e43fc50..5d4a7e91b 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs index add1d45e3..8ece57ae1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreatedConversation.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static InternalRealtimeServerEventConversationCreatedConversation Deser @object = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs index 53a0f1e52..be0d12086 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("param"u8); writer.WriteStringValue(Param); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -114,7 +114,7 @@ internal static InternalRealtimeServerEventConversationItemInputAudioTranscripti @param = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs index a3657c7bf..b9180e740 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventErrorError.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("event_id"u8); writer.WriteStringValue(EventId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -125,7 +125,7 @@ internal static InternalRealtimeServerEventErrorError DeserializeInternalRealtim eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs index f3cee6381..0ba562716 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs index cdca1a04b..8b18e5b7e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs index 542d7c541..acb572137 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs index bf25a4f2d..a29241641 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs index 383b91ac3..a052eaa99 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs index 8b8a26328..6e3eba5b7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs index c79531178..fd2b05800 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs @@ -128,7 +128,7 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index d0bc54bc8..f77a98620 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -95,7 +95,7 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index a493d5239..e9f929916 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalReal @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs index a073eefb8..14cea7729 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObjectFunction.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRealtimeToolChoiceFunctionObjectFunction DeserializeInte name = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index 7e2ba785d..cff2c8c23 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index 0cd923781..6a3c70562 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess internalText = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs index 933980b13..b0d1cbb0b 100644 --- a/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequiredFunctionToolCall.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("function"u8); writer.WriteObjectValue(_internalFunction, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRequiredFunctionToolCall DeserializeInternalRequiredFunc internalFunction = InternalRunToolCallObjectFunction.DeserializeInternalRunToolCallObjectFunction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs index 15bb492ed..42443b789 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonObject.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatJsonObject DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index 7acbe000d..6335b9056 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalResponseFormatJsonSchema DeserializeInternalResponseForm @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs index a8c07cf46..39166704f 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchemaJsonSchema.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -141,7 +141,7 @@ internal static InternalResponseFormatJsonSchemaJsonSchema DeserializeInternalRe schema = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs index 7589ef288..054bff834 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatText.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalResponseFormatText DeserializeInternalResponseFormatText @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index fc8fe2977..922e43ca3 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -71,7 +71,7 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe text = InternalMessageContentTextObjectText.DeserializeInternalMessageContentTextObjectText(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs index 99453e0be..27de37212 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionSubmitToolOutputs.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunObjectRequiredActionSubmitToolOutputs)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tool_calls") != true) { writer.WritePropertyName("tool_calls"u8); writer.WriteStartArray(); @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -91,7 +91,7 @@ internal static InternalRunObjectRequiredActionSubmitToolOutputs DeserializeInte toolCalls = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs index cf52d05b0..34c1dad54 100644 --- a/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunRequiredAction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteObjectValue(Type, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunRequiredAction DeserializeInternalRunRequiredAction(J @type = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index 902fe6117..b4fc4f1d4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index 755fbc23c..c830a490c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInterna @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs index bf8e8c6b8..62f763820 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDelta.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalRunStepDelta DeserializeInternalRunStepDelta(JsonElement @object = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs index 02abff246..a0765a8d4 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectDelta.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(StepDetails, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDeltaObjectDelta DeserializeInternalRunStepDeltaO stepDetails = InternalRunStepDeltaStepDetails.DeserializeInternalRunStepDeltaStepDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index 8a84cac3f..f1cb89b74 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 934429963..1c6de59b8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index 7eeb00463..5655786b7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreat messageId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index dc5898688..75ab9c584 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 075d65e84..241f9bf57 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (options.Format != "W" && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (true && Optional.IsCollectionDefined(Outputs) && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterprete outputs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 4be6d74f8..01c3af1f1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -88,7 +88,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index c08db0f90..55c28ee7b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -81,7 +81,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectIma fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index 993ba803a..eba3a9c40 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index 7388da7a2..d1106096b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -125,7 +125,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 030b6662b..8153e4aed 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -99,7 +99,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 0cd596ec6..082734f3b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -49,7 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction D output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index f2f849ecc..b900a33b2 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeIntern @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index d8245031a..beca986a7 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 935b601bb..7bbf59a47 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalR @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs index e3a8025c9..863ffedb1 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObjectMessageCreation.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message_id"u8); writer.WriteStringValue(MessageId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsMessageCreationObjectMessageCreation Deser messageId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs index 231758c8d..cb8f8026b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("input"u8); writer.WriteStringValue(Input); } - if (options.Format != "W" && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("outputs") != true) { writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -106,7 +106,7 @@ internal static InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter Deseria outputs = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 6000a735d..667be4b5c 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObject Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs index d21cadf5a..1f2497850 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObjectImage Deseri fileId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs index e2de12e53..a19bd3e96 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.Serialization.cs @@ -27,7 +27,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(InternalRunStepDetailsToolCallsFileSearchObjectFileSearch)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) + if (true && Optional.IsCollectionDefined(Results) && _additionalBinaryDataProperties?.ContainsKey("results") != true) { writer.WritePropertyName("results"u8); writer.WriteStartArray(); @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ranking_options"u8); writer.WriteObjectValue(RankingOptions, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -110,7 +110,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchObjectFileSearch Deseri rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs index 3598be3c6..abb3aecef 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("score_threshold"u8); writer.WriteNumberValue(ScoreThreshold); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchRankingOptionsObject De scoreThreshold = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs index a95f051a3..813be8267 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContent.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunStepDetailsToolCallsFileSearchResultObjectContent Des text = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs index 0f2bb9005..ae3bbe299 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFunctionObjectFunction.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("output"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -119,7 +119,7 @@ internal static InternalRunStepDetailsToolCallsFunctionObjectFunction Deserializ output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index 02c220df4..81debe326 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -83,7 +83,7 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index d5c3b5aff..fb316402f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunS @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 8d7b6c86b..5f8f50fa6 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -84,7 +84,7 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs index dc45cc88f..1b944e191 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectFunction.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); writer.WriteStringValue(Arguments); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalRunToolCallObjectFunction DeserializeInternalRunToolCall arguments = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs index d2a201aef..7042f12d0 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyDetails.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunk_overlap_tokens"u8); writer.WriteNumberValue(ChunkOverlapTokens); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static InternalStaticChunkingStrategyDetails DeserializeInternalStaticC chunkOverlapTokens = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 3d054360b..74cfb54f2 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -73,7 +73,7 @@ internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalSt @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs index d4b5066e4..d2ffcbe89 100644 --- a/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalSubmitToolOutputsRunRequest.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("stream"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalSubmitToolOutputsRunRequest DeserializeInternalSubmitToo stream = prop.Value.GetBoolean(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs index 98e321063..131a2dc59 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); writer.WriteObjectValue(FileSearch, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static InternalThreadObjectToolResources DeserializeInternalThreadObjec fileSearch = InternalThreadObjectToolResourcesFileSearch.DeserializeInternalThreadObjectToolResourcesFileSearch(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs index 7e0fbbcdb..0b41a7f14 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesCodeInterpreter.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesCodeInterpreter DeserializeInte fileIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs index cf27f0702..582798a12 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectToolResourcesFileSearch.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalThreadObjectToolResourcesFileSearch DeserializeInternalT vectorStoreIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs index a46689715..a01186ecb 100644 --- a/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalToolResourcesFileSearchIdsOnly.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static InternalToolResourcesFileSearchIdsOnly DeserializeInternalToolRe vectorStoreIds = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index 934a19410..96b734dbe 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownAssistantResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index 460fafe17..d02d0f5f4 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -60,12 +60,13 @@ internal static InternalUnknownChatMessage DeserializeInternalUnknownChatMessage DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalUnknownChatMessage(role, content, additionalBinaryDataProperties); + // CUSTOM: Initialize Content collection property. + return new InternalUnknownChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index f1fc0e16e..301c8fd1d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -54,7 +54,7 @@ internal static InternalUnknownChatResponseFormat DeserializeInternalUnknownChat @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs index 7b9cdce7c..f1c5ccde0 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChunkingStrategy.Serialization.cs @@ -58,7 +58,7 @@ internal static InternalUnknownChunkingStrategy DeserializeInternalUnknownChunki @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs index 40aadd8c3..c68efa74d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyRequestParamProxy Deserialize @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs index ff02ebd47..c4e7d5fa6 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownFileChunkingStrategyResponseParamProxy Deserializ @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs index 211ebe410..4e9e008d1 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs @@ -61,7 +61,7 @@ internal static InternalUnknownOmniTypedResponseFormat DeserializeInternalUnknow @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs index 79e38366a..6ed8b43a3 100644 --- a/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUpload.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("file"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -189,7 +189,7 @@ internal static InternalUpload DeserializeInternalUpload(JsonElement element, Mo @file = OpenAIFile.DeserializeOpenAIFile(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs index 7994b76dd..d50ead99d 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPart.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static InternalUploadPart DeserializeInternalUploadPart(JsonElement ele @object = new InternalUploadPartObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs index 7b312e41e..36183986f 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static InternalVectorStoreFileBatchObjectFileCounts DeserializeInternal total = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs index 97df2a98e..f92ee5e27 100644 --- a/.dotnet/src/Generated/Models/MessageContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageContent.Serialization.cs @@ -19,7 +19,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{format}' format."); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index 6b271cca2..cce95c834 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("tools"u8); this.SerializeTools(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J DeserializeTools(prop, ref tools); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs index c1b48cc74..171c2df2a 100644 --- a/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationOptions.Serialization.cs @@ -77,7 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("content"u8); this.SerializeContent(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static MessageCreationOptions DeserializeMessageCreationOptions(JsonEle content = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs index 202a0cbee..89878ba0a 100644 --- a/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static MessageDeletionResult DeserializeMessageDeletionResult(JsonEleme @object = new InternalDeleteMessageResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs index 35c2d463c..c76295571 100644 --- a/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageFailureDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static MessageFailureDetails DeserializeMessageFailureDetails(JsonEleme reason = new MessageFailureReason(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs index a3d581924..a80017c74 100644 --- a/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static MessageModificationOptions DeserializeMessageModificationOptions metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs index a62c01fdc..71fe7aeca 100644 --- a/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModelDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ModelDeletionResult DeserializeModelDeletionResult(JsonElement e @object = new InternalDeleteModelResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs index 991d9758d..5c837bec3 100644 --- a/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationOptions.Serialization.cs @@ -44,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -103,7 +103,7 @@ internal static ModerationOptions DeserializeModerationOptions(JsonElement eleme model = new InternalCreateModerationRequestModel(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs index 683301b97..f889b6dd1 100644 --- a/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResult.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("flagged"u8); writer.WriteBooleanValue(Flagged); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs index 1bd0f2455..979673c2b 100644 --- a/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/ModerationResultCollection.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs index 9d966e798..a826e0c51 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbedding.Serialization.cs @@ -53,7 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -114,7 +114,7 @@ internal static OpenAIEmbedding DeserializeOpenAIEmbedding(JsonElement element, @object = new InternalEmbeddingObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs index 371436956..990343e1b 100644 --- a/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIEmbeddingCollection.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs index 7f5fa9ec0..5cafbaa12 100644 --- a/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIError.Serialization.cs @@ -65,7 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -142,7 +142,7 @@ internal static OpenAIError DeserializeOpenAIError(JsonElement element, ModelRea @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs index 4e0a985b8..a433d4027 100644 --- a/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIErrorResponse.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("error"u8); writer.WriteObjectValue(Error, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static OpenAIErrorResponse DeserializeOpenAIErrorResponse(JsonElement e error = OpenAIError.DeserializeOpenAIError(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs index 3d92f879d..38a759cfb 100644 --- a/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFile.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("status_details"u8); writer.WriteStringValue(StatusDetails); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -174,7 +174,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade statusDetails = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs index d7dcd10d4..4c04572bb 100644 --- a/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIFileCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs index cd80af89f..01de3b396 100644 --- a/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModel.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created"u8); writer.WriteNumberValue(CreatedAt, "U"); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -118,7 +118,7 @@ internal static OpenAIModel DeserializeOpenAIModel(JsonElement element, ModelRea createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs index 9340b035a..d072b37c6 100644 --- a/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs +++ b/.dotnet/src/Generated/Models/OpenAIModelCollection.Serialization.cs @@ -24,7 +24,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs index c186ab661..ee5dc6c45 100644 --- a/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunCreationOptions.Serialization.cs @@ -226,7 +226,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolChoice"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -458,7 +458,7 @@ internal static RunCreationOptions DeserializeRunCreationOptions(JsonElement ele toolConstraint = ToolConstraint.DeserializeToolConstraint(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunError.Serialization.cs b/.dotnet/src/Generated/Models/RunError.Serialization.cs index 60cf200ab..2075c5e8d 100644 --- a/.dotnet/src/Generated/Models/RunError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunError DeserializeRunError(JsonElement element, ModelReaderWri message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs index 95063b029..a051dfbe6 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteDetails.Serialization.cs @@ -32,7 +32,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason.Value.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -85,7 +85,7 @@ internal static RunIncompleteDetails DeserializeRunIncompleteDetails(JsonElement reason = new RunIncompleteReason(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs index c6be7a127..a5fbcc544 100644 --- a/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunModificationOptions.Serialization.cs @@ -50,7 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("metadata"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -115,7 +115,7 @@ internal static RunModificationOptions DeserializeRunModificationOptions(JsonEle metadata = dictionary; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index 467577ade..ac75c11f6 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("step_details"u8); writer.WriteObjectValue(Details, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -357,7 +357,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite details = RunStepDetails.DeserializeRunStepDetails(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 02996fd00..9b164c1c3 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index 88a3cf8b7..71ff7dd0d 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs index 9e8ed9874..dedc4b148 100644 --- a/.dotnet/src/Generated/Models/RunStepError.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static RunStepError DeserializeRunStepError(JsonElement element, ModelR message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs index e7a4ca8e7..26d8a4cd5 100644 --- a/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepFileSearchResult.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -132,7 +132,7 @@ internal static RunStepFileSearchResult DeserializeRunStepFileSearchResult(JsonE content = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs index 9c78c5c6e..d6932bd3f 100644 --- a/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunStepTokenUsage DeserializeRunStepTokenUsage(JsonElement eleme totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index dfd63054e..053c8a1b0 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 9d3463a15..6c33dff24 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs index 7569d9a4f..c0d0347cd 100644 --- a/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTokenUsage.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total_tokens"u8); writer.WriteNumberValue(TotalTokenCount); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static RunTokenUsage DeserializeRunTokenUsage(JsonElement element, Mode totalTokenCount = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs index 8f269ec27..7a07b063d 100644 --- a/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunTruncationStrategy.Serialization.cs @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_type.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -108,7 +108,7 @@ internal static RunTruncationStrategy DeserializeRunTruncationStrategy(JsonEleme @type = new InternalTruncationObjectType(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs index b893d84e2..bf52744ba 100644 --- a/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/SpeechGenerationOptions.Serialization.cs @@ -52,7 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("speed"u8); writer.WriteNumberValue(SpeedRatio.Value); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -133,7 +133,7 @@ internal static SpeechGenerationOptions DeserializeSpeechGenerationOptions(JsonE speedRatio = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index 95af13ac2..decd57136 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -73,7 +73,7 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs index 884a5a996..ccb709a79 100644 --- a/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatCompletionUpdate.Serialization.cs @@ -83,7 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("usage"u8); writer.WriteObjectValue(Usage, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -188,7 +188,7 @@ internal static StreamingChatCompletionUpdate DeserializeStreamingChatCompletion usage = ChatTokenUsage.DeserializeChatTokenUsage(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs index 6882ded11..465dc3953 100644 --- a/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatFunctionCallUpdate.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("arguments"u8); this.SerializeFunctionArgumentsUpdateValue(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static StreamingChatFunctionCallUpdate DeserializeStreamingChatFunction DeserializeFunctionArgumentsUpdateValue(prop, ref functionArgumentsUpdate); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs index 1c563f394..57c15eb9f 100644 --- a/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/StreamingChatToolCallUpdate.Serialization.cs @@ -51,7 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(ToolCallId); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -126,7 +126,7 @@ internal static StreamingChatToolCallUpdate DeserializeStreamingChatToolCallUpda toolCallId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index aad837d42..8d3fbae64 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -68,12 +68,13 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new SystemChatMessage(participantName, role, content, additionalBinaryDataProperties); + // CUSTOM: Initialize Content collection property. + return new SystemChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs index 0276da63c..8fd981fe1 100644 --- a/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadCreationOptions.Serialization.cs @@ -72,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -163,7 +163,7 @@ internal static ThreadCreationOptions DeserializeThreadCreationOptions(JsonEleme internalMessages = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs index e302825de..273d1f6e6 100644 --- a/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static ThreadDeletionResult DeserializeThreadDeletionResult(JsonElement @object = new InternalDeleteThreadResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index 3694e0e24..43c4c9931 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -171,7 +171,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("attachments"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -355,7 +355,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode attachments = array; continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs index 7f8689100..b1bad14a1 100644 --- a/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadModificationOptions.Serialization.cs @@ -62,7 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -138,7 +138,7 @@ internal static ThreadModificationOptions DeserializeThreadModificationOptions(J toolResources = ToolResources.DeserializeToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index b52bde026..262aa17e6 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -301,7 +301,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("requiredAction"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -608,7 +608,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW internalRequiredAction = InternalRunRequiredAction.DeserializeInternalRunRequiredAction(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index 10bf1926f..d84ffe018 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -72,12 +72,13 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolChatMessage(toolCallId, role, content, additionalBinaryDataProperties); + // CUSTOM: Initialize Content collection property. + return new ToolChatMessage(toolCallId, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs index dea298cba..c816ad7cc 100644 --- a/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolConstraint.Serialization.cs @@ -33,7 +33,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(_objectType); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 83ec44563..eb0c7a503 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -29,7 +29,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { diff --git a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs index 58af53856..552ade35f 100644 --- a/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolOutput.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("output"u8); writer.WriteStringValue(Output); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReade output = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs index 5c7f74779..1bf9b3d4e 100644 --- a/.dotnet/src/Generated/Models/ToolResources.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolResources.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("file_search"u8); this.SerializeFileSearch(writer, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -100,7 +100,7 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode fileSearch = FileSearchToolResources.DeserializeFileSearchToolResources(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs index c644c41ea..383ba7fd9 100644 --- a/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedSegment.Serialization.cs @@ -86,7 +86,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("no_speech_prob"u8); writer.WriteNumberValue(NoSpeechProbability); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -200,7 +200,7 @@ internal static TranscribedSegment DeserializeTranscribedSegment(JsonElement ele noSpeechProbability = prop.Value.GetSingle(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs index 5b5399ae1..28a1bc287 100644 --- a/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs +++ b/.dotnet/src/Generated/Models/TranscribedWord.Serialization.cs @@ -46,7 +46,7 @@ private void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("end"u8); writer.WriteNumberValue(Convert.ToDouble(EndTime.ToString("s\\.FFF"))); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static TranscribedWord DeserializeTranscribedWord(JsonElement element, endTime = TimeSpan.FromSeconds(prop.Value.GetDouble()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index 2ef5f7920..d0219219f 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -54,7 +54,7 @@ internal static UnknownAssistantToolDefinition DeserializeUnknownAssistantToolDe @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index ee1d5074d..8e5f1e8e3 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownCreateFineTuningJobRequestIntegration DeserializeUnknownC @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index c6e94fa49..263182a78 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownFineTuningIntegration DeserializeUnknownFineTuningIntegra @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs index 3e687a893..6a994f475 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageContentTextObjectAnnotation DeserializeUnknownMess @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs index 0492c3fe3..5b6814e3c 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs index 2c25dd275..0d3229fd8 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownMessageDeltaTextContentAnnotation DeserializeUnknownMessa @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs index 57a24ef03..0094dc685 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeClientEvent DeserializeUnknownRealtimeClientEvent eventId = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs index 8db69554b..b9fea3699 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeContentPart DeserializeUnknownRealtimeContentPart kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index 9576e76bc..9cd54657d 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeRequestItem DeserializeUnknownRealtimeRequestItem id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index d4337995c..9fbb40a4e 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -84,7 +84,7 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs index 12d8262fd..601e0259c 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -78,7 +78,7 @@ internal static UnknownRealtimeResponseItem DeserializeUnknownRealtimeResponseIt id = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs new file mode 100644 index 000000000..1e9abed87 --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using OpenAI; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseStatusDetails : IJsonModel + { + internal UnknownRealtimeResponseStatusDetails() + { + } + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)JsonModelCreateCore(ref reader, options); + + protected override ConversationStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationStatusDetails(document.RootElement, options); + } + + internal static UnknownRealtimeResponseStatusDetails DeserializeUnknownRealtimeResponseStatusDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConversationStatus statusKind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + statusKind = new ConversationStatus(prop.Value.GetString()); + continue; + } + if (true) + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRealtimeResponseStatusDetails(statusKind, additionalBinaryDataProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support writing '{options.Format}' format."); + } + } + + ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)PersistableModelCreateCore(data, options); + + protected override ConversationStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeConversationStatusDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationStatusDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs new file mode 100644 index 000000000..0bbcb1f2a --- /dev/null +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace OpenAI.RealtimeConversation +{ + internal partial class UnknownRealtimeResponseStatusDetails : ConversationStatusDetails + { + internal UnknownRealtimeResponseStatusDetails(ConversationStatus statusKind, IDictionary additionalBinaryDataProperties) : base(statusKind != default ? statusKind : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs index 783484977..27a46aebb 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs @@ -67,7 +67,7 @@ internal static UnknownRealtimeServerEvent DeserializeUnknownRealtimeServerEvent kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs index 237a5e218..135527aa9 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTool DeserializeUnknownRealtimeTool(JsonElement e kind = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs index 04c6f8b5f..1c78da3b6 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeToolChoiceObject DeserializeUnknownRealtimeToolCh @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs index 364693674..ab00b3c93 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRealtimeTurnDetection DeserializeUnknownRealtimeTurnDetec kind = prop.Value.GetString().ToConversationTurnDetectionKind(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs index 8776ce9f5..1adf0306c 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetails DeserializeUnknownRunStepDeltaSte @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 3c71ac3e3..5848b03e6 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index a67ce37c0..e0919c8be 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject Des @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 688add701..ba61e3324 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsOb @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index 9dbbc39ee..c7ca094c6 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepDetailsToolCallsObjectToolCallsObject DeserializeU @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs index f3086084f..5a631ddba 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs @@ -61,7 +61,7 @@ internal static UnknownRunStepObjectStepDetails DeserializeUnknownRunStepObjectS @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 2b5d9b1fc..29081a7e6 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -68,12 +68,13 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UserChatMessage(participantName, role, content, additionalBinaryDataProperties); + // CUSTOM: Initialize Content collection property. + return new UserChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 18684d00d..24995fbe7 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -118,7 +118,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("expires_after"u8); writer.WriteObjectValue(ExpirationPolicy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -258,7 +258,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs index 4a22f89b2..643b8ac93 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJob.Serialization.cs @@ -61,7 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteObjectValue(this.Object, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -140,7 +140,7 @@ internal static VectorStoreBatchFileJob DeserializeVectorStoreBatchFileJob(JsonE @object = prop.Value.GetObject(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs index 6bcc2b009..68824cf3c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationHelper.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreCreationHelper DeserializeVectorStoreCreationHelper(J chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs index 59a557558..91403959b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCreationOptions.Serialization.cs @@ -80,7 +80,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -193,7 +193,7 @@ internal static VectorStoreCreationOptions DeserializeVectorStoreCreationOptions chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs index c904c802e..ffbcc14f0 100644 --- a/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreDeletionResult.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("object"u8); writer.WriteStringValue(this.Object.ToString()); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -107,7 +107,7 @@ internal static VectorStoreDeletionResult DeserializeVectorStoreDeletionResult(J @object = new InternalDeleteVectorStoreResponseObject(prop.Value.GetString()); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs index 1295e9075..a6e7d9c89 100644 --- a/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreExpirationPolicy.Serialization.cs @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("days"u8); writer.WriteNumberValue(_days); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -92,7 +92,7 @@ internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPoli days = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs index 89cdd7a1b..38cb0416e 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociation.Serialization.cs @@ -78,7 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("chunking_strategy"u8); writer.WriteObjectValue(ChunkingStrategy, options); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -178,7 +178,7 @@ internal static VectorStoreFileAssociation DeserializeVectorStoreFileAssociation chunkingStrategy = FileChunkingStrategy.DeserializeFileChunkingStrategy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs index 32372d6e1..d6e4ca8d5 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationError.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -96,7 +96,7 @@ internal static VectorStoreFileAssociationError DeserializeVectorStoreFileAssoci message = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs index 14c002aab..05a8d299b 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileCounts.Serialization.cs @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -129,7 +129,7 @@ internal static VectorStoreFileCounts DeserializeVectorStoreFileCounts(JsonEleme total = prop.Value.GetInt32(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs index 48c2fd176..ad9c7f889 100644 --- a/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStoreModificationOptions.Serialization.cs @@ -74,7 +74,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("expiresAfter"u8); } } - if (options.Format != "W" && _additionalBinaryDataProperties != null) + if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) { @@ -161,7 +161,7 @@ internal static VectorStoreModificationOptions DeserializeVectorStoreModificatio expirationPolicy = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(prop.Value, options); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 70f2a7b50..2ca3d5c89 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -73,7 +73,7 @@ internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegrati @type = prop.Value.GetString(); continue; } - if (options.Format != "W") + if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 99f7d79da..7ddd1ed9c 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -571,6 +571,12 @@ public static ConversationResponseStartedUpdate ConversationResponseStartedUpdat return new ConversationResponseStartedUpdate(eventId, internalResponse, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); } + public static ConversationStatusDetails ConversationStatusDetails(string statusKind = default) + { + + return new UnknownRealtimeResponseStatusDetails(new ConversationStatus(statusKind), additionalBinaryDataProperties: null); + } + public static ConversationTokenUsage ConversationTokenUsage(int totalTokens = default, int inputTokens = default, int outputTokens = default, ConversationInputTokenUsageDetails inputTokenDetails = default, ConversationOutputTokenUsageDetails outputTokenDetails = default) { diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index aa8072dc1..023ca375a 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -4149,6 +4149,7 @@ components: type: array items: $ref: '#/components/schemas/ChatCompletionMessageToolCallChunk' + readOnly: true role: type: string enum: @@ -4915,12 +4916,14 @@ components: $ref: '#/components/schemas/ChatCompletionTokenLogprob' nullable: true description: A list of message content tokens with log probability information. + readOnly: true refusal: type: array items: $ref: '#/components/schemas/ChatCompletionTokenLogprob' nullable: true description: A list of message refusal tokens with log probability information. + readOnly: true required: - content - refusal @@ -6573,11 +6576,13 @@ components: items: $ref: '#/components/schemas/TranscriptionWord' description: Extracted words and their corresponding timestamps. + readOnly: true segments: type: array items: $ref: '#/components/schemas/TranscriptionSegment' description: Segments of the transcribed text and their corresponding details. + readOnly: true description: Represents a verbose json transcription response returned by model, based on the provided input. CreateTranslationRequestMultiPart: type: object diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 56d0f8685..8d901c4c3 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + diff --git a/.plugin/package-lock.json b/.plugin/package-lock.json index a2e2304a0..4f604ad6f 100644 --- a/.plugin/package-lock.json +++ b/.plugin/package-lock.json @@ -26,9 +26,8 @@ }, "node_modules/@ampproject/remapping": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -53,8 +52,7 @@ }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.47.0.tgz", - "integrity": "sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==", + "license": "MIT", "peer": true, "engines": { "node": ">=18.0.0" @@ -66,9 +64,8 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.47.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.3.tgz", - "integrity": "sha512-13knZRDFBlVTw61vbhAnvQzttnqPRwHK0+YI/3QbYRN77j/Kv3zXFPeCcromz31exg3Y/Q8qD24mJ1Oikab2mA==", + "version": "0.47.4", + "license": "MIT", "peer": true, "dependencies": { "change-case": "~5.4.4", @@ -101,17 +98,15 @@ }, "node_modules/@babel/helper-string-parser": { "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -131,11 +126,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, "node_modules/@babel/parser": { "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", - "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.26.0" }, @@ -148,9 +148,8 @@ }, "node_modules/@babel/types": { "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" @@ -161,370 +160,16 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } + "license": "MIT" }, "node_modules/@esbuild/win32-x64": { "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -535,9 +180,8 @@ }, "node_modules/@isaacs/cliui": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -552,9 +196,8 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -564,9 +207,8 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -576,15 +218,13 @@ }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -599,9 +239,8 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -614,9 +253,8 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -631,18 +269,16 @@ }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/schemas": { "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -652,9 +288,8 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -666,33 +301,29 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -700,8 +331,7 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -712,16 +342,14 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -736,9 +364,8 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -746,249 +373,13 @@ }, "node_modules/@polka/url": { "version": "1.0.0-next.28", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", - "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", - "dev": true - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.3.tgz", - "integrity": "sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.3.tgz", - "integrity": "sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.3.tgz", - "integrity": "sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.3.tgz", - "integrity": "sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.3.tgz", - "integrity": "sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.3.tgz", - "integrity": "sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz", - "integrity": "sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.3.tgz", - "integrity": "sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.3.tgz", - "integrity": "sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.3.tgz", - "integrity": "sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.3.tgz", - "integrity": "sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.3.tgz", - "integrity": "sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.3.tgz", - "integrity": "sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.3.tgz", - "integrity": "sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==", - "cpu": [ - "x64" - ], "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.3.tgz", - "integrity": "sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.3.tgz", - "integrity": "sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.3.tgz", - "integrity": "sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.3.tgz", - "integrity": "sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] + "license": "MIT" }, "node_modules/@sinclair/typebox": { "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", @@ -1004,21 +395,18 @@ }, "node_modules/@types/estree": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", - "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", + "version": "22.8.6", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~6.19.8" } @@ -1071,9 +459,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241030.3", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241030.3.tgz", - "integrity": "sha512-oQRq76nylz33Q9SSitLT9EnoQki6uNBJ4QAC1djt3Ns+020gXPRsNt9wHlSUsNGa/I1ilkNZsWxuyOSHoPA3vQ==", + "version": "0.1.9-alpha.20241101.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241101.2.tgz", + "integrity": "sha512-8BWmLLDpu9SCXIqm8lRlLHvEm7oXqwlIwd1/DzRqIo3U3BhXMC75nWlxV5P5rfcX0+ake/r57HRhp0ezyKRNvA==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -1102,8 +490,7 @@ }, "node_modules/@typespec/rest": { "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.61.0.tgz", - "integrity": "sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==", + "license": "MIT", "peer": true, "engines": { "node": ">=18.0.0" @@ -1127,9 +514,8 @@ }, "node_modules/@vitest/coverage-v8": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.0.tgz", - "integrity": "sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.1", "@bcoe/v8-coverage": "^0.2.3", @@ -1154,9 +540,8 @@ }, "node_modules/@vitest/expect": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", - "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", "dev": true, + "license": "MIT", "dependencies": { "@vitest/spy": "1.6.0", "@vitest/utils": "1.6.0", @@ -1168,9 +553,8 @@ }, "node_modules/@vitest/runner": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", - "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", "dev": true, + "license": "MIT", "dependencies": { "@vitest/utils": "1.6.0", "p-limit": "^5.0.0", @@ -1182,9 +566,8 @@ }, "node_modules/@vitest/runner/node_modules/p-limit": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", - "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, @@ -1197,9 +580,8 @@ }, "node_modules/@vitest/runner/node_modules/yocto-queue": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.20" }, @@ -1209,9 +591,8 @@ }, "node_modules/@vitest/snapshot": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", - "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", "dev": true, + "license": "MIT", "dependencies": { "magic-string": "^0.30.5", "pathe": "^1.1.1", @@ -1223,9 +604,8 @@ }, "node_modules/@vitest/spy": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", - "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", "dev": true, + "license": "MIT", "dependencies": { "tinyspy": "^2.2.0" }, @@ -1235,9 +615,8 @@ }, "node_modules/@vitest/ui": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-1.6.0.tgz", - "integrity": "sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==", "dev": true, + "license": "MIT", "dependencies": { "@vitest/utils": "1.6.0", "fast-glob": "^3.3.2", @@ -1256,9 +635,8 @@ }, "node_modules/@vitest/utils": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", - "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", "dev": true, + "license": "MIT", "dependencies": { "diff-sequences": "^29.6.3", "estree-walker": "^3.0.3", @@ -1271,9 +649,8 @@ }, "node_modules/acorn": { "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1283,9 +660,8 @@ }, "node_modules/acorn-walk": { "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^8.11.0" }, @@ -1311,22 +687,20 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", "engines": { "node": ">=8" } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "dev": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/assertion-error": { @@ -1340,9 +714,8 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -1356,8 +729,7 @@ }, "node_modules/braces": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -1367,9 +739,8 @@ }, "node_modules/c8": { "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, + "license": "ISC", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", @@ -1392,18 +763,16 @@ }, "node_modules/cac": { "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/chai": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -1431,17 +800,63 @@ "node": ">=4" } }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "peer": true + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/change-case": { "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "license": "MIT", "peer": true }, "node_modules/check-error": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -1451,8 +866,7 @@ }, "node_modules/cliui": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -1463,19 +877,18 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "peer": true, + "version": "2.0.1", + "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "peer": true + "version": "1.1.4", + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", @@ -1485,21 +898,18 @@ }, "node_modules/confbox": { "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/copyfiles": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", "dev": true, + "license": "MIT", "dependencies": { "glob": "^7.0.5", "minimatch": "^3.0.3", @@ -1516,9 +926,8 @@ }, "node_modules/copyfiles/node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1527,9 +936,8 @@ }, "node_modules/copyfiles/node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -1545,9 +953,8 @@ }, "node_modules/copyfiles/node_modules/yargs-parser": { "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -1560,9 +967,8 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1574,9 +980,8 @@ }, "node_modules/debug": { "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -1591,9 +996,8 @@ }, "node_modules/deep-eql": { "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1603,9 +1007,8 @@ }, "node_modules/diff-sequences": { "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -1623,10 +1026,9 @@ }, "node_modules/esbuild": { "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1661,8 +1063,7 @@ }, "node_modules/escalade": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -1678,18 +1079,16 @@ }, "node_modules/estree-walker": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } }, "node_modules/execa": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^8.0.1", @@ -1716,8 +1115,7 @@ }, "node_modules/fast-glob": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1737,22 +1135,19 @@ }, "node_modules/fastq": { "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fflate": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1762,9 +1157,8 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1778,15 +1172,13 @@ }, "node_modules/flatted": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/foreground-child": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -1804,20 +1196,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1828,18 +1206,16 @@ }, "node_modules/get-func-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-stream": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -1849,10 +1225,8 @@ }, "node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1870,8 +1244,7 @@ }, "node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1900,25 +1273,22 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "peer": true, + "version": "4.0.0", + "dev": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/human-signals": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=16.17.0" } @@ -1967,8 +1337,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1986,9 +1355,8 @@ }, "node_modules/is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -2010,18 +1378,16 @@ }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -2031,32 +1397,10 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-source-maps": { "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@jridgewell/trace-mapping": "^0.3.23", "debug": "^4.1.1", @@ -2068,9 +1412,8 @@ }, "node_modules/istanbul-reports": { "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -2081,9 +1424,8 @@ }, "node_modules/jackspeak": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -2095,10 +1437,9 @@ } }, "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "peer": true + "version": "9.0.0", + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "1.0.0", @@ -2108,8 +1449,7 @@ }, "node_modules/json-serialize-refs": { "version": "0.1.0-0", - "resolved": "https://registry.npmjs.org/json-serialize-refs/-/json-serialize-refs-0.1.0-0.tgz", - "integrity": "sha512-SnNMfW2RRPDXIMKa8zdLb59UjMSI1UFZCtIb8ae68GcZ0a6x8b77lIWqqTOdq1azzmkXupD6UWriPLd0JCrFng==" + "license": "MIT" }, "node_modules/kleur": { "version": "3.0.3", @@ -2122,9 +1462,8 @@ }, "node_modules/local-pkg": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", - "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", "dev": true, + "license": "MIT", "dependencies": { "mlly": "^1.4.2", "pkg-types": "^1.0.3" @@ -2138,9 +1477,8 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -2153,33 +1491,29 @@ }, "node_modules/loupe": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } }, "node_modules/lru-cache": { "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/magic-string": { "version": "0.30.12", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", - "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/magicast": { "version": "0.3.5", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", - "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.25.4", "@babel/types": "^7.25.4", @@ -2188,9 +1522,8 @@ }, "node_modules/make-dir": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -2209,16 +1542,14 @@ }, "node_modules/merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -2229,9 +1560,8 @@ }, "node_modules/mimic-fn": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2241,9 +1571,8 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2253,18 +1582,16 @@ }, "node_modules/minipass": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -2274,9 +1601,8 @@ }, "node_modules/mlly": { "version": "1.7.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz", - "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^8.12.1", "pathe": "^1.1.2", @@ -2286,18 +1612,16 @@ }, "node_modules/mrmime": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mustache": { "version": "4.2.0", @@ -2310,8 +1634,6 @@ }, "node_modules/nanoid": { "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -2319,6 +1641,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -2338,9 +1661,8 @@ }, "node_modules/npm-run-path": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -2353,9 +1675,8 @@ }, "node_modules/npm-run-path/node_modules/path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2374,9 +1695,8 @@ }, "node_modules/onetime": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" }, @@ -2389,9 +1709,8 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -2404,9 +1723,8 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -2419,9 +1737,8 @@ }, "node_modules/package-json-from-dist": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true + "dev": true, + "license": "BlueOak-1.0.0" }, "node_modules/path-exists": { "version": "4.0.0", @@ -2443,18 +1760,16 @@ }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-scurry": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -2480,28 +1795,24 @@ }, "node_modules/pathe": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2511,9 +1822,8 @@ }, "node_modules/pkg-types": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", - "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", "dev": true, + "license": "MIT", "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.2", @@ -2531,8 +1841,6 @@ }, "node_modules/postcss": { "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -2548,6 +1856,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.1.0", @@ -2574,9 +1883,8 @@ }, "node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -2586,18 +1894,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -2619,8 +1915,6 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "funding": [ { "type": "github", @@ -2634,13 +1928,13 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/react-is": { "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/readable-stream": { "version": "1.0.34", @@ -2682,9 +1976,8 @@ }, "node_modules/rimraf": { "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^10.3.7" }, @@ -2697,18 +1990,16 @@ }, "node_modules/rimraf/node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/rimraf/node_modules/glob": { "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -2726,9 +2017,8 @@ }, "node_modules/rimraf/node_modules/minimatch": { "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2741,9 +2031,8 @@ }, "node_modules/rollup": { "version": "4.24.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", - "integrity": "sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "1.0.6" }, @@ -2778,8 +2067,6 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "funding": [ { "type": "github", @@ -2794,6 +2081,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -2806,8 +2094,7 @@ }, "node_modules/semver": { "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2817,9 +2104,8 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2838,15 +2124,13 @@ }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -2856,9 +2140,8 @@ }, "node_modules/sirv": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", "dev": true, + "license": "MIT", "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", @@ -2888,9 +2171,8 @@ }, "node_modules/source-map-js": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -2903,9 +2185,8 @@ }, "node_modules/std-env": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/string_decoder": { "version": "0.10.31", @@ -2915,8 +2196,7 @@ }, "node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -2929,9 +2209,8 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -2943,8 +2222,7 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2955,9 +2233,8 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2967,9 +2244,8 @@ }, "node_modules/strip-final-newline": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2979,9 +2255,8 @@ }, "node_modules/strip-literal": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", - "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", "dev": true, + "license": "MIT", "dependencies": { "js-tokens": "^9.0.0" }, @@ -2989,22 +2264,15 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/strip-literal/node_modules/js-tokens": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", - "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", - "dev": true - }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "peer": true, + "version": "7.2.0", + "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/temporal-polyfill": { @@ -3024,9 +2292,8 @@ }, "node_modules/test-exclude": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -3078,24 +2345,21 @@ }, "node_modules/tinybench": { "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tinypool": { "version": "0.8.4", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", - "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } }, "node_modules/tinyspy": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", - "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -3113,27 +2377,24 @@ }, "node_modules/totalist": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/type-detect": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/typescript": { "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3144,15 +2405,13 @@ }, "node_modules/ufo": { "version": "1.5.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", - "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/undici-types": { "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/unicorn-magic": { "version": "0.1.0", @@ -3183,9 +2442,8 @@ }, "node_modules/v8-to-istanbul": { "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -3197,9 +2455,8 @@ }, "node_modules/vite": { "version": "5.4.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", - "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -3256,9 +2513,8 @@ }, "node_modules/vite-node": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", - "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", "dev": true, + "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", @@ -3278,9 +2534,8 @@ }, "node_modules/vitest": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", - "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", "dev": true, + "license": "MIT", "dependencies": { "@vitest/expect": "1.6.0", "@vitest/runner": "1.6.0", @@ -3386,9 +2641,8 @@ }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3401,9 +2655,8 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, + "license": "MIT", "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" @@ -3417,8 +2670,7 @@ }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3434,9 +2686,8 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3451,9 +2702,8 @@ }, "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3464,28 +2714,9 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3496,22 +2727,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3529,8 +2744,7 @@ }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } @@ -3549,8 +2763,7 @@ }, "node_modules/yargs": { "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -3566,17 +2779,15 @@ }, "node_modules/yargs-parser": { "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/.typespec/assistants/client.tsp b/.typespec/assistants/client.tsp index 390fb1146..eed0bd226 100644 --- a/.typespec/assistants/client.tsp +++ b/.typespec/assistants/client.tsp @@ -14,4 +14,3 @@ using OpenAI; @@visibility(ListAssistantsResponse.data, "read"); @@visibility(ListRunStepsResponse.data, "read"); @@visibility(ListRunsResponse.data, "read"); - diff --git a/.typespec/audio/operations.tsp b/.typespec/audio/operations.tsp index b978b5523..12dc9849d 100644 --- a/.typespec/audio/operations.tsp +++ b/.typespec/audio/operations.tsp @@ -18,13 +18,14 @@ interface Audio { @summary("Generates audio from the input text.") createSpeech( @header accept: "application/octet-stream", - - @body requestBody: CreateSpeechRequest): { - /** chunked */ - @header("Transfer-Encoding") transferEncoding?: string; - @header contentType: "application/octet-stream"; - @body responseBody: bytes; - }; + @body requestBody: CreateSpeechRequest, + ): { + /** chunked */ + @header("Transfer-Encoding") transferEncoding?: string; + + @header contentType: "application/octet-stream"; + @body responseBody: bytes; + }; @route("transcriptions") @post diff --git a/.typespec/chat/client.tsp b/.typespec/chat/client.tsp index fefd8e4e1..a2a0fa2d9 100644 --- a/.typespec/chat/client.tsp +++ b/.typespec/chat/client.tsp @@ -30,4 +30,4 @@ using OpenAI; @@usage(ChatResponseFormatJsonSchema, Usage.input); @@visibility(ChatCompletionResponseMessage.tool_calls, "read"); -@@visibility(ChatCompletionStreamResponseDelta.tool_calls, "read"); \ No newline at end of file +@@visibility(ChatCompletionStreamResponseDelta.tool_calls, "read"); diff --git a/.typespec/messages/client.tsp b/.typespec/messages/client.tsp index f475b1753..b46d85d92 100644 --- a/.typespec/messages/client.tsp +++ b/.typespec/messages/client.tsp @@ -64,4 +64,4 @@ using OpenAI; @@access(MessageDeltaContentTextAnnotationsFilePathObject, Access.public); @@usage(MessageDeltaContentTextAnnotationsFilePathObject, Usage.output); -@@visibility(ListMessagesResponse.data, "read"); \ No newline at end of file +@@visibility(ListMessagesResponse.data, "read"); diff --git a/.typespec/tspconfig.yaml b/.typespec/tspconfig.yaml index 1aeed5a3d..71f6af526 100644 --- a/.typespec/tspconfig.yaml +++ b/.typespec/tspconfig.yaml @@ -1,6 +1,6 @@ emit: - "@typespec/openapi3" - - "@typespec/http-client-csharp" + - "@open-ai/plugin" options: "@typespec/openapi3": output-file: "{project-root}/../.openapi3/openapi3-openai.yaml" diff --git a/package-lock.json b/package-lock.json index 676510297..ae0296c3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,9 +79,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.47.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.3.tgz", - "integrity": "sha512-13knZRDFBlVTw61vbhAnvQzttnqPRwHK0+YI/3QbYRN77j/Kv3zXFPeCcromz31exg3Y/Q8qD24mJ1Oikab2mA==", + "version": "0.47.4", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.4.tgz", + "integrity": "sha512-oXA8rHzBsoofzSXvGLGohj6VDYegtgAfGMWo2o4ubew1bS4cvl3CYl9DJ54blqafxtJXnNh4SdjadeHTsCz2mw==", "peer": true, "dependencies": { "change-case": "~5.4.4", @@ -1179,9 +1179,9 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/node": { - "version": "22.8.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", - "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", + "version": "22.8.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", + "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", "dev": true, "dependencies": { "undici-types": "~6.19.8" @@ -1235,9 +1235,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241030.3", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241030.3.tgz", - "integrity": "sha512-oQRq76nylz33Q9SSitLT9EnoQki6uNBJ4QAC1djt3Ns+020gXPRsNt9wHlSUsNGa/I1ilkNZsWxuyOSHoPA3vQ==", + "version": "0.1.9-alpha.20241101.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241101.2.tgz", + "integrity": "sha512-8BWmLLDpu9SCXIqm8lRlLHvEm7oXqwlIwd1/DzRqIo3U3BhXMC75nWlxV5P5rfcX0+ake/r57HRhp0ezyKRNvA==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, From 81c6700c9ca1103aca345742d27f66be56f2c326 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 1 Nov 2024 17:57:49 -0700 Subject: [PATCH 33/54] regen --- .dotnet/src/Generated/Models/ChatMessage.Serialization.cs | 2 +- .../src/Generated/Models/ChatResponseFormat.Serialization.cs | 2 +- .../Generated/Models/ConversationContentPart.Serialization.cs | 2 +- .dotnet/src/Generated/Models/ConversationItem.Serialization.cs | 2 +- .dotnet/src/Generated/Models/ConversationTool.Serialization.cs | 2 +- .../src/Generated/Models/FileChunkingStrategy.Serialization.cs | 2 +- .../src/Generated/Models/FineTuningIntegration.Serialization.cs | 2 +- .../InternalFileChunkingStrategyRequestParam.Serialization.cs | 2 +- .../Models/InternalFineTuningIntegration.Serialization.cs | 2 +- .../InternalMessageContentTextObjectAnnotation.Serialization.cs | 2 +- .../Models/InternalMessageDeltaContent.Serialization.cs | 2 +- .../InternalMessageDeltaTextContentAnnotation.Serialization.cs | 2 +- .../Models/InternalOmniTypedResponseFormat.Serialization.cs | 2 +- .../Models/InternalRealtimeClientEvent.Serialization.cs | 2 +- .../Models/InternalRealtimeResponseItem.Serialization.cs | 2 +- .../Models/InternalRealtimeToolChoiceObject.Serialization.cs | 2 +- .../Models/InternalRunStepDeltaStepDetails.Serialization.cs | 2 +- ...taStepDetailsToolCallsObjectToolCallsObject.Serialization.cs | 2 +- .../Models/RunStepCodeInterpreterOutput.Serialization.cs | 2 +- .dotnet/src/Generated/Models/RunStepDetails.Serialization.cs | 2 +- .dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs | 2 +- .../Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs | 2 +- .dotnet/src/Generated/Models/ToolDefinition.Serialization.cs | 2 +- .plugin/generator/src/OpenAI.Library.Plugin.csproj | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs index 53e376e04..b39d4ef3b 100644 --- a/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatMessage.Serialization.cs @@ -71,7 +71,7 @@ internal static ChatMessage DeserializeChatMessage(JsonElement element, ModelRea { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("role"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs index e2f4a00c5..2cc1ea4bd 100644 --- a/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/ChatResponseFormat.Serialization.cs @@ -65,7 +65,7 @@ internal static ChatResponseFormat DeserializeChatResponseFormat(JsonElement ele { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs index 76090d28a..76066d621 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPart.Serialization.cs @@ -76,7 +76,7 @@ internal static ConversationContentPart DeserializeConversationContentPart(JsonE { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs index ffb2e528e..111d83747 100644 --- a/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItem.Serialization.cs @@ -81,7 +81,7 @@ internal static ConversationItem DeserializeConversationItem(JsonElement element { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs index dc5a71643..b432b57fd 100644 --- a/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationTool.Serialization.cs @@ -76,7 +76,7 @@ internal static ConversationTool DeserializeConversationTool(JsonElement element { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs index 43dcabbbf..42ed82c29 100644 --- a/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileChunkingStrategy.Serialization.cs @@ -76,7 +76,7 @@ internal static FileChunkingStrategy DeserializeFileChunkingStrategy(JsonElement { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs index eb495d8a2..f70dc849d 100644 --- a/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/FineTuningIntegration.Serialization.cs @@ -76,7 +76,7 @@ internal static FineTuningIntegration DeserializeFineTuningIntegration(JsonEleme { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs index 60f4ec948..a79752d35 100644 --- a/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFileChunkingStrategyRequestParam.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalFileChunkingStrategyRequestParam DeserializeInternalFile { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs index 4c6448cec..131661504 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegration.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalFineTuningIntegration DeserializeInternalFineTuningInteg { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs index a798a10c4..d2fab5507 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectAnnotation.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalMessageContentTextObjectAnnotation DeserializeInternalMe { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs index 12ffb7f87..7ac025e15 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContent.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalMessageDeltaContent DeserializeInternalMessageDeltaConte { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs index 73118f8d8..447aa246c 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaTextContentAnnotation.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalMessageDeltaTextContentAnnotation DeserializeInternalMes { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs index ce3d3c9e9..b2cdc55e3 100644 --- a/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalOmniTypedResponseFormat.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalOmniTypedResponseFormat DeserializeInternalOmniTypedResp { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs index c2f44d8f0..46b19f866 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.Serialization.cs @@ -81,7 +81,7 @@ internal static InternalRealtimeClientEvent DeserializeInternalRealtimeClientEve { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs index d7a2f8a40..8511388a3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItem.Serialization.cs @@ -93,7 +93,7 @@ internal static InternalRealtimeResponseItem DeserializeInternalRealtimeResponse { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs index cff2c8c23..a35cb1d2a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceObject.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalRealtimeToolChoiceObject DeserializeInternalRealtimeTool { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs index f1cb89b74..43c72487a 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetails.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalRunStepDeltaStepDetails DeserializeInternalRunStepDeltaS { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index beca986a7..89ea067c0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -76,7 +76,7 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject De { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs index 9b164c1c3..e6c7642f7 100644 --- a/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepCodeInterpreterOutput.Serialization.cs @@ -76,7 +76,7 @@ internal static RunStepCodeInterpreterOutput DeserializeRunStepCodeInterpreterOu { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs index 71ff7dd0d..dc51e99f1 100644 --- a/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepDetails.Serialization.cs @@ -76,7 +76,7 @@ internal static RunStepDetails DeserializeRunStepDetails(JsonElement element, Mo { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs index 053c8a1b0..2854b2244 100644 --- a/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepToolCall.Serialization.cs @@ -76,7 +76,7 @@ internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs index 6c33dff24..0e7fec323 100644 --- a/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStepUpdateCodeInterpreterOutput.Serialization.cs @@ -76,7 +76,7 @@ internal static RunStepUpdateCodeInterpreterOutput DeserializeRunStepUpdateCodeI { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index eb0c7a503..2f13d3c8d 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -69,7 +69,7 @@ internal static ToolDefinition DeserializeToolDefinition(JsonElement element, Mo { return null; } - if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 8d901c4c3..6bf28a0cf 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 60d794ae30cbc02b0e6cbb13878aec605522bfc5 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Mon, 4 Nov 2024 10:36:45 -0600 Subject: [PATCH 34/54] customization fixes for Chat tests --- ...ChatCompletionRequestMessageContentPartImageImageUrl.cs | 4 ++-- ...ChatCompletionRequestMessageContentPartImageImageUrl.cs | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index e671cfe1f..ab2f56ab1 100644 --- a/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Custom/Chat/Internal/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -50,10 +50,10 @@ public InternalChatCompletionRequestMessageContentPartImageImageUrl(BinaryData i } /// Initializes a new instance of . - /// Either a URL of the image or the base64 encoded image data. /// Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding). + /// Either a URL of the image or the base64 encoded image data. /// Keeps track of any properties unknown to the library. - internal InternalChatCompletionRequestMessageContentPartImageImageUrl(string url, ChatImageDetailLevel? detail, IDictionary serializedAdditionalRawData) + internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageDetailLevel? detail, string url, IDictionary serializedAdditionalRawData) { Match parsedDataUri = ParseDataUriRegex().Match(url); diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs index 22f06370a..ceb265278 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageImageUrl.cs @@ -11,13 +11,6 @@ internal partial class InternalChatCompletionRequestMessageContentPartImageImage { private protected IDictionary _additionalBinaryDataProperties; - internal InternalChatCompletionRequestMessageContentPartImageImageUrl(ChatImageDetailLevel? detail, string url, IDictionary additionalBinaryDataProperties) - { - Detail = detail; - Url = url; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - public ChatImageDetailLevel? Detail { get; set; } internal IDictionary SerializedAdditionalRawData From ec9a969fce3b89328d78f72738f4c19c5da7c3fb Mon Sep 17 00:00:00 2001 From: jolov Date: Mon, 4 Nov 2024 13:58:57 -0800 Subject: [PATCH 35/54] Update Invoke-CodeGen to build the plugin --- .scripts/Invoke-CodeGen.ps1 | 5 ++++- package-lock.json | 5 +++++ package.json | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.scripts/Invoke-CodeGen.ps1 b/.scripts/Invoke-CodeGen.ps1 index df751b590..95d99f177 100644 --- a/.scripts/Invoke-CodeGen.ps1 +++ b/.scripts/Invoke-CodeGen.ps1 @@ -9,9 +9,12 @@ function Invoke([scriptblock]$script) { $scriptStartTime = Get-Date -Push-Location $repoRoot/.typespec +Push-Location $repoRoot + try { Invoke { npm ci } + Invoke { npm run build -w .plugin } + Set-Location $repoRoot/.typespec Invoke { npm exec --no -- tsp format **/*tsp } Invoke { npm exec --no -- tsp compile . } Invoke { .$PSScriptRoot\Update-ClientModel.ps1 } diff --git a/package-lock.json b/package-lock.json index ae0296c3d..26ee5bccb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,10 @@ "": { "name": "openai-tsp", "version": "0.1.0", + "workspaces": [ + ".plugin", + ".typespec" + ], "dependencies": { "@open-ai/plugin": "file:.plugin", "@typespec/openapi3": "^0.61.0", @@ -14,6 +18,7 @@ } }, ".plugin": { + "name": "@open-ai/plugin", "version": "1.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 16c716033..94c43503c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { "name": "openai-tsp", + "workspaces": [ + ".plugin" + ], "version": "0.1.0", "type": "module", "dependencies": { From 007bda0014fdeb3a6d073a987b13202e0f1f38e0 Mon Sep 17 00:00:00 2001 From: jolov Date: Mon, 4 Nov 2024 13:59:43 -0800 Subject: [PATCH 36/54] package-lock --- package-lock.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 26ee5bccb..3b341e90f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,7 @@ "name": "openai-tsp", "version": "0.1.0", "workspaces": [ - ".plugin", - ".typespec" + ".plugin" ], "dependencies": { "@open-ai/plugin": "file:.plugin", From cb7327044f0a932e03b84e2db853fec037abf95c Mon Sep 17 00:00:00 2001 From: jolov Date: Tue, 5 Nov 2024 11:08:40 -0800 Subject: [PATCH 37/54] regen --- ...AudioTranscriptionOptions.Serialization.cs | 59 ++------------ .../ConversationErrorUpdate.Serialization.cs | 17 ++--- .../Models/ConversationErrorUpdate.cs | 6 +- ...onInputAudioClearedUpdate.Serialization.cs | 5 -- .../ConversationInputAudioClearedUpdate.cs | 2 - ...InputAudioCommittedUpdate.Serialization.cs | 19 ++--- .../ConversationInputAudioCommittedUpdate.cs | 6 +- ...InputSpeechFinishedUpdate.Serialization.cs | 19 ++--- .../ConversationInputSpeechFinishedUpdate.cs | 6 +- ...nInputSpeechStartedUpdate.Serialization.cs | 19 ++--- .../ConversationInputSpeechStartedUpdate.cs | 6 +- ...TranscriptionFailedUpdate.Serialization.cs | 19 ++--- ...versationInputTranscriptionFailedUpdate.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 19 ++--- ...rsationInputTranscriptionFinishedUpdate.cs | 6 +- ...ersationItemCreatedUpdate.Serialization.cs | 19 ++--- .../Models/ConversationItemCreatedUpdate.cs | 6 +- ...ersationItemDeletedUpdate.Serialization.cs | 17 ++--- .../Models/ConversationItemDeletedUpdate.cs | 6 +- ...eamingAudioFinishedUpdate.Serialization.cs | 19 ++--- ...rsationItemStreamingAudioFinishedUpdate.cs | 6 +- ...anscriptionFinishedUpdate.Serialization.cs | 19 ++--- ...reamingAudioTranscriptionFinishedUpdate.cs | 6 +- ...emStreamingFinishedUpdate.Serialization.cs | 19 ++--- ...ConversationItemStreamingFinishedUpdate.cs | 6 +- ...temStreamingStartedUpdate.Serialization.cs | 19 ++--- .../ConversationItemStreamingStartedUpdate.cs | 6 +- ...reamingTextFinishedUpdate.Serialization.cs | 19 ++--- ...ersationItemStreamingTextFinishedUpdate.cs | 6 +- ...sationItemTruncatedUpdate.Serialization.cs | 19 ++--- .../Models/ConversationItemTruncatedUpdate.cs | 6 +- ...versationRateLimitsUpdate.Serialization.cs | 19 ++--- .../Models/ConversationRateLimitsUpdate.cs | 6 +- ...ionResponseFinishedUpdate.Serialization.cs | 17 ++--- .../ConversationResponseFinishedUpdate.cs | 6 +- ...tionResponseStartedUpdate.Serialization.cs | 17 ++--- .../ConversationResponseStartedUpdate.cs | 6 +- ...onSessionConfiguredUpdate.Serialization.cs | 17 ++--- .../ConversationSessionConfiguredUpdate.cs | 6 +- ...ationSessionStartedUpdate.Serialization.cs | 17 ++--- .../ConversationSessionStartedUpdate.cs | 6 +- .../Generated/Models/ConversationUpdate.cs | 1 - ...nscriptionRequestTimestampGranularities.cs | 16 ++-- .../Models/InternalRealtimeClientEvent.cs | 1 - ...entConversationItemCreate.Serialization.cs | 19 ++--- ...altimeClientEventConversationItemCreate.cs | 8 +- ...entConversationItemDelete.Serialization.cs | 19 ++--- ...altimeClientEventConversationItemDelete.cs | 8 +- ...tConversationItemTruncate.Serialization.cs | 19 ++--- ...timeClientEventConversationItemTruncate.cs | 8 +- ...entInputAudioBufferAppend.Serialization.cs | 19 ++--- ...altimeClientEventInputAudioBufferAppend.cs | 8 +- ...ventInputAudioBufferClear.Serialization.cs | 17 ++--- ...ealtimeClientEventInputAudioBufferClear.cs | 8 +- ...entInputAudioBufferCommit.Serialization.cs | 17 ++--- ...altimeClientEventInputAudioBufferCommit.cs | 8 +- ...ClientEventResponseCancel.Serialization.cs | 17 ++--- ...ternalRealtimeClientEventResponseCancel.cs | 8 +- ...ClientEventResponseCreate.Serialization.cs | 19 ++--- ...ternalRealtimeClientEventResponseCreate.cs | 8 +- ...eClientEventSessionUpdate.Serialization.cs | 19 ++--- ...nternalRealtimeClientEventSessionUpdate.cs | 8 +- ...rEventConversationCreated.Serialization.cs | 17 ++--- ...lRealtimeServerEventConversationCreated.cs | 6 +- ...erEventResponseAudioDelta.Serialization.cs | 19 ++--- ...alRealtimeServerEventResponseAudioDelta.cs | 6 +- ...ponseAudioTranscriptDelta.Serialization.cs | 19 ++--- ...ServerEventResponseAudioTranscriptDelta.cs | 6 +- ...tResponseContentPartAdded.Serialization.cs | 19 ++--- ...timeServerEventResponseContentPartAdded.cs | 6 +- ...ntResponseContentPartDone.Serialization.cs | 19 ++--- ...ltimeServerEventResponseContentPartDone.cs | 6 +- ...unctionCallArgumentsDelta.Serialization.cs | 19 ++--- ...EventResponseFunctionCallArgumentsDelta.cs | 6 +- ...FunctionCallArgumentsDone.Serialization.cs | 19 ++--- ...rEventResponseFunctionCallArgumentsDone.cs | 6 +- ...verEventResponseTextDelta.Serialization.cs | 19 ++--- ...nalRealtimeServerEventResponseTextDelta.cs | 6 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 76 +++++++++---------- 79 files changed, 359 insertions(+), 699 deletions(-) diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs index 070ec1c69..6834f5fda 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionOptions.Serialization.cs @@ -47,7 +47,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (SerializedAdditionalRawData?.ContainsKey("timestamp_granularities[]") != true && Optional.IsCollectionDefined(InternalTimestampGranularities)) if (_additionalBinaryDataProperties?.ContainsKey("file") != true) { writer.WritePropertyName("file"u8); @@ -58,7 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("model"u8); writer.WriteStringValue(Model.ToString()); } - if (Optional.IsCollectionDefined(InternalTimestampGranularities) && _additionalBinaryDataProperties?.ContainsKey("timestamp_granularities") != true) + if (Optional.IsCollectionDefined(InternalTimestampGranularities) && _additionalBinaryDataProperties?.ContainsKey("timestamp_granularities[]") != true) { writer.WritePropertyName("timestamp_granularities[]"u8); writer.WriteStartArray(); @@ -168,7 +167,7 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J model = new InternalCreateTranscriptionRequestModel(prop.Value.GetString()); continue; } - if (prop.NameEquals("timestamp_granularities"u8)) + if (prop.NameEquals("timestamp_granularities[]"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { @@ -199,57 +198,15 @@ internal static AudioTranscriptionOptions DeserializeAudioTranscriptionOptions(J prompt, responseFormat, temperature, - timestampGranularities ?? new ChangeTrackingList(), - serializedAdditionalRawData); + @file, + model, + internalTimestampGranularities ?? new ChangeTrackingList(), + additionalBinaryDataProperties); } - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataBinaryContent content = ToMultipartBinaryBody(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() - { - MultipartFormDataBinaryContent content = new MultipartFormDataBinaryContent(); - content.Add(File, "file", "file"); - content.Add(Model.ToString(), "model"); - if (Optional.IsDefined(Language)) - { - content.Add(Language, "language"); - } - if (Optional.IsDefined(Prompt)) - { - content.Add(Prompt, "prompt"); - } - if (Optional.IsDefined(ResponseFormat)) - { - content.Add(ResponseFormat.Value.ToString(), "response_format"); - } - if (Optional.IsDefined(Temperature)) - { - content.Add(Temperature.Value, "temperature"); - } - if (Optional.IsCollectionDefined(InternalTimestampGranularities)) - { - foreach (BinaryData item in InternalTimestampGranularities) - { - content.Add(item, "timestamp_granularities", "timestamp_granularities"); - } - } - return content; - } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 47907be5c..173ba3992 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationErrorUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("error") != true) { writer.WritePropertyName("error"u8); @@ -63,20 +58,20 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE { return null; } - string eventId = default; InternalRealtimeServerEventErrorError error = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("error"u8)) { - eventId = prop.Value.GetString(); + error = InternalRealtimeServerEventErrorError.DeserializeInternalRealtimeServerEventErrorError(prop.Value, options); continue; } - if (prop.NameEquals("error"u8)) + if (prop.NameEquals("event_id"u8)) { - error = InternalRealtimeServerEventErrorError.DeserializeInternalRealtimeServerEventErrorError(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationErrorUpdate(eventId, error, kind, additionalBinaryDataProperties); + return new ConversationErrorUpdate(error, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs index 571e909d8..d3b65ae64 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -9,16 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationErrorUpdate : ConversationUpdate { - internal ConversationErrorUpdate(string eventId, InternalRealtimeServerEventErrorError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) + internal ConversationErrorUpdate(InternalRealtimeServerEventErrorError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) { _error = error; } - internal ConversationErrorUpdate(string eventId, InternalRealtimeServerEventErrorError error, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationErrorUpdate(InternalRealtimeServerEventErrorError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _error = error; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs index bb8ffc40d..2ea91978a 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputAudioClearedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } } ConversationInputAudioClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ConversationInputAudioClearedUpdate)JsonModelCreateCore(ref reader, options); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs index 9239d656e..ce6fc9d78 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioClearedUpdate.cs @@ -16,7 +16,5 @@ internal ConversationInputAudioClearedUpdate(string eventId) : base(eventId, Rea internal ConversationInputAudioClearedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs index 61c5447c9..7945ca54e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputAudioCommittedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); @@ -68,18 +63,13 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp { return null; } - string eventId = default; string previousItemId = default; string itemId = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("previous_item_id"u8)) { previousItemId = prop.Value.GetString(); @@ -90,6 +80,11 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp itemId = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -100,7 +95,7 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputAudioCommittedUpdate(eventId, previousItemId, itemId, kind, additionalBinaryDataProperties); + return new ConversationInputAudioCommittedUpdate(previousItemId, itemId, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs index 363908e8b..b9b6f36c8 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs @@ -9,20 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioCommittedUpdate : ConversationUpdate { - internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted) + internal ConversationInputAudioCommittedUpdate(string previousItemId, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted) { PreviousItemId = previousItemId; ItemId = itemId; } - internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputAudioCommittedUpdate(string previousItemId, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; ItemId = itemId; } - public new string EventId => _eventId ?? default; - public string PreviousItemId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index e5eed1517..81a115f6f 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -68,18 +63,13 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp { return null; } - string eventId = default; string itemId = default; int audioEndMs = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -90,6 +80,11 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp audioEndMs = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -100,7 +95,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechFinishedUpdate(eventId, itemId, audioEndMs, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechFinishedUpdate(itemId, audioEndMs, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index daf85c5d7..a04e911be 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -9,20 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate { - internal ConversationInputSpeechFinishedUpdate(string eventId, string itemId, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped) + internal ConversationInputSpeechFinishedUpdate(string itemId, int audioEndMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped) { ItemId = itemId; _audioEndMs = audioEndMs; } - internal ConversationInputSpeechFinishedUpdate(string eventId, string itemId, int audioEndMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechFinishedUpdate(string itemId, int audioEndMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; _audioEndMs = audioEndMs; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 5e25cb18c..032794e3b 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputSpeechStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -68,18 +63,13 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu { return null; } - string eventId = default; string itemId = default; int audioStartMs = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -90,6 +80,11 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu audioStartMs = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -100,7 +95,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechStartedUpdate(eventId, itemId, audioStartMs, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechStartedUpdate(itemId, audioStartMs, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index 09489f585..3b79c17b9 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -9,20 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate { - internal ConversationInputSpeechStartedUpdate(string eventId, string itemId, int audioStartMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted) + internal ConversationInputSpeechStartedUpdate(string itemId, int audioStartMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted) { ItemId = itemId; _audioStartMs = audioStartMs; } - internal ConversationInputSpeechStartedUpdate(string eventId, string itemId, int audioStartMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechStartedUpdate(string itemId, int audioStartMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; _audioStartMs = audioStartMs; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index 3f7b726e2..da40f59bf 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFailedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -73,19 +68,14 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati { return null; } - string eventId = default; string itemId = default; int contentIndex = default; InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -101,6 +91,11 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati error = InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +107,10 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati } } return new ConversationInputTranscriptionFailedUpdate( - eventId, itemId, contentIndex, error, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index 2118a7b70..2f3d5db45 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed) + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed) { ItemId = itemId; ContentIndex = contentIndex; _error = error; } - internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; _error = error; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } public int ContentIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index 0511fd330..c5507ce34 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInputTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -73,19 +68,14 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa { return null; } - string eventId = default; string itemId = default; int contentIndex = default; string transcript = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -101,6 +91,11 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa transcript = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +107,10 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa } } return new ConversationInputTranscriptionFinishedUpdate( - eventId, itemId, contentIndex, transcript, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index 6085a5af9..4a5b9f6f8 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished) + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished) { ItemId = itemId; ContentIndex = contentIndex; Transcript = transcript; } - internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; Transcript = transcript; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } public int ContentIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs index 77fa65027..339dbc7ff 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemCreatedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); @@ -68,18 +63,13 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated { return null; } - string eventId = default; string previousItemId = default; InternalRealtimeResponseItem internalItem = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("previous_item_id"u8)) { previousItemId = prop.Value.GetString(); @@ -90,6 +80,11 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -100,7 +95,7 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationItemCreatedUpdate(eventId, previousItemId, internalItem, kind, additionalBinaryDataProperties); + return new ConversationItemCreatedUpdate(previousItemId, internalItem, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs index 2302072aa..dcca1b6b6 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs @@ -9,20 +9,18 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemCreatedUpdate : ConversationUpdate { - internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated) + internal ConversationItemCreatedUpdate(string previousItemId, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated) { PreviousItemId = previousItemId; _internalItem = internalItem; } - internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemCreatedUpdate(string previousItemId, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; _internalItem = internalItem; } - public new string EventId => _eventId ?? default; - public string PreviousItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index 9fe31d103..a89239822 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemDeletedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -63,20 +58,20 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted { return null; } - string eventId = default; string itemId = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("item_id"u8)) { - eventId = prop.Value.GetString(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationItemDeletedUpdate(eventId, itemId, kind, additionalBinaryDataProperties); + return new ConversationItemDeletedUpdate(itemId, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index 520cf0796..5d40089a7 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -9,18 +9,16 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemDeletedUpdate : ConversationUpdate { - internal ConversationItemDeletedUpdate(string eventId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) + internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) { ItemId = itemId; } - internal ConversationItemDeletedUpdate(string eventId, string itemId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs index 09899e509..cc913c0f5 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStreamingAudioFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -78,20 +73,15 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -112,6 +102,11 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa contentIndex = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -123,11 +118,11 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa } } return new ConversationItemStreamingAudioFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs index c98f7a36e..b18bb99f5 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished) + internal ConversationItemStreamingAudioFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished) { ResponseId = responseId; ItemId = itemId; @@ -17,7 +17,7 @@ internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string res ContentIndex = contentIndex; } - internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingAudioFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -25,8 +25,6 @@ internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string res ContentIndex = contentIndex; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs index 5b56625f4..2e283df87 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStreamingAudioTranscriptionFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string transcript = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri transcript = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri } } return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, transcript, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs index 85be46187..4e6fded03 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventI Transcript = transcript; } - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventI Transcript = transcript; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs index 8b48546c1..8513b0e02 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStreamingFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -73,19 +68,14 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI { return null; } - string eventId = default; string responseId = default; int outputIndex = default; InternalRealtimeResponseItem internalItem = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -101,6 +91,11 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +107,10 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI } } return new ConversationItemStreamingFinishedUpdate( - eventId, responseId, outputIndex, internalItem, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs index 84cc61c1b..978ab8171 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished) + internal ConversationItemStreamingFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished) { ResponseId = responseId; OutputIndex = outputIndex; _internalItem = internalItem; } - internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; _internalItem = internalItem; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public int OutputIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index b7bb89d83..2a0e37c81 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStreamingStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -73,19 +68,14 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt { return null; } - string eventId = default; string responseId = default; int itemIndex = default; InternalRealtimeResponseItem internalItem = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -101,6 +91,11 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +107,10 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt } } return new ConversationItemStreamingStartedUpdate( - eventId, responseId, itemIndex, internalItem, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs index f4fd449dc..8d035feda 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingStartedUpdate : ConversationUpdate { - internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted) + internal ConversationItemStreamingStartedUpdate(string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted) { ResponseId = responseId; ItemIndex = itemIndex; _internalItem = internalItem; } - internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingStartedUpdate(string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemIndex = itemIndex; _internalItem = internalItem; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } } } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs index c3f6eb8fa..fc382fc3f 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemStreamingTextFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string text = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat text = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat } } return new ConversationItemStreamingTextFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, text, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs index ba2db1697..53c3bc249 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingTextFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished) + internal ConversationItemStreamingTextFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string text, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationItemStreamingTextFinishedUpdate(string eventId, string resp Text = text; } - internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingTextFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string text, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal ConversationItemStreamingTextFinishedUpdate(string eventId, string resp Text = text; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 7a27df72c..34337c2aa 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationItemTruncatedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -73,19 +68,14 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc { return null; } - string eventId = default; string itemId = default; int contentIndex = default; int audioEndMs = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -101,6 +91,11 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc audioEndMs = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -112,10 +107,10 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc } } return new ConversationItemTruncatedUpdate( - eventId, itemId, contentIndex, audioEndMs, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index 7bd5a9601..a6deb2c27 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -9,22 +9,20 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemTruncatedUpdate : ConversationUpdate { - internal ConversationItemTruncatedUpdate(string eventId, string itemId, int contentIndex, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) + internal ConversationItemTruncatedUpdate(string itemId, int contentIndex, int audioEndMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - internal ConversationItemTruncatedUpdate(string eventId, string itemId, int contentIndex, int audioEndMs, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemTruncatedUpdate(string itemId, int contentIndex, int audioEndMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - public new string EventId => _eventId ?? default; - public string ItemId { get; } public int ContentIndex { get; } diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs index 4d3889c42..972c56881 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationRateLimitsUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("rate_limits") != true) { writer.WritePropertyName("rate_limits"u8); @@ -68,17 +63,12 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp { return null; } - string eventId = default; IReadOnlyList allDetails = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("rate_limits"u8)) { List array = new List(); @@ -89,6 +79,11 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp allDetails = array; continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -99,7 +94,7 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationRateLimitsUpdate(eventId, allDetails, kind, additionalBinaryDataProperties); + return new ConversationRateLimitsUpdate(allDetails, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs index b49f69fbb..58f33f6d3 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs @@ -10,16 +10,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitsUpdate : ConversationUpdate { - internal ConversationRateLimitsUpdate(string eventId, IEnumerable allDetails) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) + internal ConversationRateLimitsUpdate(IEnumerable allDetails, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) { AllDetails = allDetails.ToList(); } - internal ConversationRateLimitsUpdate(string eventId, IReadOnlyList allDetails, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationRateLimitsUpdate(IReadOnlyList allDetails, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { AllDetails = allDetails; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index 399d07915..c49ece6a0 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseFinishedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); @@ -63,20 +58,20 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon { return null; } - string eventId = default; InternalRealtimeResponse internalResponse = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("response"u8)) { - eventId = prop.Value.GetString(); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } - if (prop.NameEquals("response"u8)) + if (prop.NameEquals("event_id"u8)) { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseFinishedUpdate(eventId, internalResponse, kind, additionalBinaryDataProperties); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs index 2b861fff6..524f32a41 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -9,16 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseFinishedUpdate : ConversationUpdate { - internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) { _internalResponse = internalResponse; } - internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 44ef1bbad..2339f8390 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationResponseStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); @@ -63,20 +58,20 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons { return null; } - string eventId = default; InternalRealtimeResponse internalResponse = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("response"u8)) { - eventId = prop.Value.GetString(); + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); continue; } - if (prop.NameEquals("response"u8)) + if (prop.NameEquals("event_id"u8)) { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseStartedUpdate(eventId, internalResponse, kind, additionalBinaryDataProperties); + return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs index 40fa619c2..da6c59ead 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -9,16 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseStartedUpdate : ConversationUpdate { - internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) + internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) { _internalResponse = internalResponse; } - internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index d3bf22808..7dac1345c 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionConfiguredUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); @@ -63,20 +58,20 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi { return null; } - string eventId = default; InternalRealtimeResponseSession internalSession = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("session"u8)) { - eventId = prop.Value.GetString(); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } - if (prop.NameEquals("session"u8)) + if (prop.NameEquals("event_id"u8)) { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionConfiguredUpdate(eventId, internalSession, kind, additionalBinaryDataProperties); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs index 5a8af24a3..074658106 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -9,16 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionConfiguredUpdate : ConversationUpdate { - internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) { _internalSession = internalSession; } - internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index 1bce6c107..bc99afb67 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationSessionStartedUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); @@ -63,20 +58,20 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS { return null; } - string eventId = default; InternalRealtimeResponseSession internalSession = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("session"u8)) { - eventId = prop.Value.GetString(); + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); continue; } - if (prop.NameEquals("session"u8)) + if (prop.NameEquals("event_id"u8)) { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionStartedUpdate(eventId, internalSession, kind, additionalBinaryDataProperties); + return new ConversationSessionStartedUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs index 8336969b3..8d28aead8 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -9,16 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionStartedUpdate : ConversationUpdate { - internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) { _internalSession = internalSession; } - internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } - - public new string EventId => _eventId ?? default; } } diff --git a/.dotnet/src/Generated/Models/ConversationUpdate.cs b/.dotnet/src/Generated/Models/ConversationUpdate.cs index d4faba64d..75eb30dc3 100644 --- a/.dotnet/src/Generated/Models/ConversationUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationUpdate.cs @@ -10,7 +10,6 @@ namespace OpenAI.RealtimeConversation public abstract partial class ConversationUpdate { private protected IDictionary _additionalBinaryDataProperties; - private protected string _eventId; private protected ConversationUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind) { diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs index dd7d52884..5fba0cb69 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs @@ -14,27 +14,27 @@ namespace OpenAI.Audio private const string WordValue = "word"; private const string SegmentValue = "segment"; - public InternalCreateTranscriptionRequestTimestampGranularity(string value) + public InternalCreateTranscriptionRequestTimestampGranularities(string value) { Argument.AssertNotNull(value, nameof(value)); _value = value; } - public static InternalCreateTranscriptionRequestTimestampGranularity Word { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(WordValue); + public static InternalCreateTranscriptionRequestTimestampGranularities Word { get; } = new InternalCreateTranscriptionRequestTimestampGranularities(WordValue); - public static InternalCreateTranscriptionRequestTimestampGranularity Segment { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(SegmentValue); + public static InternalCreateTranscriptionRequestTimestampGranularities Segment { get; } = new InternalCreateTranscriptionRequestTimestampGranularities(SegmentValue); - public static bool operator ==(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => left.Equals(right); + public static bool operator ==(InternalCreateTranscriptionRequestTimestampGranularities left, InternalCreateTranscriptionRequestTimestampGranularities right) => left.Equals(right); - public static bool operator !=(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => !left.Equals(right); + public static bool operator !=(InternalCreateTranscriptionRequestTimestampGranularities left, InternalCreateTranscriptionRequestTimestampGranularities right) => !left.Equals(right); - public static implicit operator InternalCreateTranscriptionRequestTimestampGranularity(string value) => new InternalCreateTranscriptionRequestTimestampGranularity(value); + public static implicit operator InternalCreateTranscriptionRequestTimestampGranularities(string value) => new InternalCreateTranscriptionRequestTimestampGranularities(value); [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalCreateTranscriptionRequestTimestampGranularity other && Equals(other); + public override bool Equals(object obj) => obj is InternalCreateTranscriptionRequestTimestampGranularities other && Equals(other); - public bool Equals(InternalCreateTranscriptionRequestTimestampGranularity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(InternalCreateTranscriptionRequestTimestampGranularities other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs index c66b7a7a8..0b986d83d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEvent.cs @@ -10,7 +10,6 @@ namespace OpenAI.RealtimeConversation internal abstract partial class InternalRealtimeClientEvent { private protected IDictionary _additionalBinaryDataProperties; - private protected string _eventId; private protected InternalRealtimeClientEvent(InternalRealtimeClientEventType kind) { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs index 24f450121..3c20aa031 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemCreate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (Optional.IsDefined(PreviousItemId) && _additionalBinaryDataProperties?.ContainsKey("previous_item_id") != true) { writer.WritePropertyName("previous_item_id"u8); @@ -68,18 +63,13 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt { return null; } - string eventId = default; string previousItemId = default; ConversationItem item = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("previous_item_id"u8)) { previousItemId = prop.Value.GetString(); @@ -95,12 +85,17 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventConversationItemCreate(eventId, previousItemId, item, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemCreate(previousItemId, item, kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs index a6253ffc0..2ed03ec41 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs @@ -17,18 +17,12 @@ public InternalRealtimeClientEventConversationItemCreate(ConversationItem item) Item = item; } - internal InternalRealtimeClientEventConversationItemCreate(string eventId, string previousItemId, ConversationItem item, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemCreate(string previousItemId, ConversationItem item, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { PreviousItemId = previousItemId; Item = item; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public string PreviousItemId { get; set; } public ConversationItem Item { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs index 86e3ea587..f3ec2f16d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemDelete)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -63,17 +58,12 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt { return null; } - string eventId = default; string itemId = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -84,12 +74,17 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventConversationItemDelete(eventId, itemId, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemDelete(itemId, kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs index 5ab028ebe..8da21f72d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs @@ -17,17 +17,11 @@ public InternalRealtimeClientEventConversationItemDelete(string itemId) : base(I ItemId = itemId; } - internal InternalRealtimeClientEventConversationItemDelete(string eventId, string itemId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemDelete(string itemId, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public string ItemId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs index 7ab51b936..e666d582e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventConversationItemTruncate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("item_id") != true) { writer.WritePropertyName("item_id"u8); @@ -73,19 +68,14 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI { return null; } - string eventId = default; string itemId = default; int contentIndex = default; int audioEndMs = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("item_id"u8)) { itemId = prop.Value.GetString(); @@ -106,17 +96,22 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeClientEventConversationItemTruncate( - eventId, itemId, contentIndex, audioEndMs, kind, + eventId, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs index 95aa597cd..8cc440629 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs @@ -19,19 +19,13 @@ public InternalRealtimeClientEventConversationItemTruncate(string itemId, int co AudioEndMs = audioEndMs; } - internal InternalRealtimeClientEventConversationItemTruncate(string eventId, string itemId, int contentIndex, int audioEndMs, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemTruncate(string itemId, int contentIndex, int audioEndMs, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public string ItemId { get; set; } public int ContentIndex { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs index d04c79ef3..441736b45 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferAppend)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("audio") != true) { writer.WritePropertyName("audio"u8); @@ -63,17 +58,12 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt { return null; } - string eventId = default; BinaryData audio = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("audio"u8)) { audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); @@ -84,12 +74,17 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventInputAudioBufferAppend(eventId, audio, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferAppend(audio, kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs index 8174c5b53..8218563b6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs @@ -17,17 +17,11 @@ public InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio) : bas Audio = audio; } - internal InternalRealtimeClientEventInputAudioBufferAppend(string eventId, BinaryData audio, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Audio = audio; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public BinaryData Audio { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs index ab1a3274d..7819cd1c2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.Serialization.cs @@ -28,11 +28,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferClear)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } } InternalRealtimeClientEventInputAudioBufferClear IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferClear)JsonModelCreateCore(ref reader, options); @@ -54,19 +49,19 @@ internal static InternalRealtimeClientEventInputAudioBufferClear DeserializeInte { return null; } - string eventId = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeClientEventType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } if (true) @@ -74,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferClear DeserializeInte additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventInputAudioBufferClear(eventId, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferClear(kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs index 41a3ddf08..0838f1d6f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferClear.cs @@ -13,14 +13,8 @@ public InternalRealtimeClientEventInputAudioBufferClear() : base(InternalRealtim { } - internal InternalRealtimeClientEventInputAudioBufferClear(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventInputAudioBufferClear(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } - - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs index b05da3bd5..7d1f686e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.Serialization.cs @@ -28,11 +28,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventInputAudioBufferCommit)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } } InternalRealtimeClientEventInputAudioBufferCommit IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventInputAudioBufferCommit)JsonModelCreateCore(ref reader, options); @@ -54,19 +49,19 @@ internal static InternalRealtimeClientEventInputAudioBufferCommit DeserializeInt { return null; } - string eventId = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeClientEventType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } if (true) @@ -74,7 +69,7 @@ internal static InternalRealtimeClientEventInputAudioBufferCommit DeserializeInt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventInputAudioBufferCommit(eventId, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferCommit(kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs index 99dc776f6..5e13b96b1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferCommit.cs @@ -13,14 +13,8 @@ public InternalRealtimeClientEventInputAudioBufferCommit() : base(InternalRealti { } - internal InternalRealtimeClientEventInputAudioBufferCommit(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventInputAudioBufferCommit(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } - - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs index b31985ada..6da7ef02c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.Serialization.cs @@ -28,11 +28,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCancel)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } } InternalRealtimeClientEventResponseCancel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalRealtimeClientEventResponseCancel)JsonModelCreateCore(ref reader, options); @@ -54,19 +49,19 @@ internal static InternalRealtimeClientEventResponseCancel DeserializeInternalRea { return null; } - string eventId = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("type"u8)) { - eventId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("event_id"u8)) { - kind = new InternalRealtimeClientEventType(prop.Value.GetString()); + eventId = prop.Value.GetString(); continue; } if (true) @@ -74,7 +69,7 @@ internal static InternalRealtimeClientEventResponseCancel DeserializeInternalRea additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventResponseCancel(eventId, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventResponseCancel(kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs index 1632cdeaa..4e7a1b227 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCancel.cs @@ -13,14 +13,8 @@ public InternalRealtimeClientEventResponseCancel() : base(InternalRealtimeClient { } - internal InternalRealtimeClientEventResponseCancel(string eventId, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventResponseCancel(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { } - - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs index a4b7b721c..c7a9d40e6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventResponseCreate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response") != true) { writer.WritePropertyName("response"u8); @@ -63,17 +58,12 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea { return null; } - string eventId = default; InternalRealtimeClientEventResponseCreateResponse response = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response"u8)) { response = InternalRealtimeClientEventResponseCreateResponse.DeserializeInternalRealtimeClientEventResponseCreateResponse(prop.Value, options); @@ -84,12 +74,17 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventResponseCreate(eventId, response, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventResponseCreate(response, kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs index 24a18ca08..e781c886c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs @@ -17,17 +17,11 @@ public InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResp Response = response; } - internal InternalRealtimeClientEventResponseCreate(string eventId, InternalRealtimeClientEventResponseCreateResponse response, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResponseCreateResponse response, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Response = response; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public InternalRealtimeClientEventResponseCreateResponse Response { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs index 25de3606f..1649a77c0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeClientEventSessionUpdate)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(EventId) && _additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("session") != true) { writer.WritePropertyName("session"u8); @@ -63,17 +58,12 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal { return null; } - string eventId = default; ConversationSessionOptions session = default; InternalRealtimeClientEventType kind = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("session"u8)) { session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); @@ -84,12 +74,17 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventSessionUpdate(eventId, session, kind, additionalBinaryDataProperties); + return new InternalRealtimeClientEventSessionUpdate(session, kind, eventId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs index 6b830fce0..8da7f20f5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs @@ -17,17 +17,11 @@ public InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions sessi Session = session; } - internal InternalRealtimeClientEventSessionUpdate(string eventId, ConversationSessionOptions session, InternalRealtimeClientEventType kind, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions session, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) { Session = session; } - public new string EventId - { - get => _eventId ?? default; - set => _eventId = value; - } - public ConversationSessionOptions Session { get; set; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs index 5d4a7e91b..57c241ad5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventConversationCreated)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("conversation") != true) { writer.WritePropertyName("conversation"u8); @@ -63,20 +58,20 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern { return null; } - string eventId = default; InternalRealtimeServerEventConversationCreatedConversation conversation = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("conversation"u8)) { - eventId = prop.Value.GetString(); + conversation = InternalRealtimeServerEventConversationCreatedConversation.DeserializeInternalRealtimeServerEventConversationCreatedConversation(prop.Value, options); continue; } - if (prop.NameEquals("conversation"u8)) + if (prop.NameEquals("event_id"u8)) { - conversation = InternalRealtimeServerEventConversationCreatedConversation.DeserializeInternalRealtimeServerEventConversationCreatedConversation(prop.Value, options); + eventId = prop.Value.GetString(); continue; } if (prop.NameEquals("type"u8)) @@ -89,7 +84,7 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeServerEventConversationCreated(eventId, conversation, kind, additionalBinaryDataProperties); + return new InternalRealtimeServerEventConversationCreated(conversation, eventId, kind, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs index ebd22cc9d..dbd026bf2 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs @@ -9,18 +9,16 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationCreated : ConversationUpdate { - internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(eventId, RealtimeConversation.ConversationUpdateKind.ConversationCreated) + internal InternalRealtimeServerEventConversationCreated(InternalRealtimeServerEventConversationCreatedConversation conversation, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ConversationCreated) { Conversation = conversation; } - internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventConversationCreated(InternalRealtimeServerEventConversationCreatedConversation conversation, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { Conversation = conversation; } - public new string EventId => _eventId ?? default; - public InternalRealtimeServerEventConversationCreatedConversation Conversation { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs index 0ba562716..9e517862f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; BinaryData delta = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna delta = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna } } return new InternalRealtimeServerEventResponseAudioDelta( - eventId, responseId, itemId, outputIndex, contentIndex, delta, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs index cab145b96..3957b4304 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioDelta) + internal InternalRealtimeServerEventResponseAudioDelta(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string re Delta = delta; } - internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioDelta(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string re Delta = delta; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs index 8b18e5b7e..174d0e863 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseAudioTranscriptDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial delta = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial } } return new InternalRealtimeServerEventResponseAudioTranscriptDelta( - eventId, responseId, itemId, outputIndex, contentIndex, delta, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs index 1ae27239f..14cdeeeff 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioTranscriptDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionDelta) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, Delta = delta; } - internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, Delta = delta; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs index acb572137..9f3008548 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartAdded)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI } } return new InternalRealtimeServerEventResponseContentPartAdded( - eventId, responseId, itemId, outputIndex, contentIndex, internalContentPart, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs index 6804a05a7..133c046b7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartAdded : ConversationUpdate { - internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartStarted) + internal InternalRealtimeServerEventResponseContentPartAdded(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartStarted) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, str _internalContentPart = internalContentPart; } - internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartAdded(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, str _internalContentPart = internalContentPart; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs index a29241641..1c52c3efc 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseContentPartDone)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn } } return new InternalRealtimeServerEventResponseContentPartDone( - eventId, responseId, itemId, outputIndex, contentIndex, internalContentPart, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs index 8b4316734..f8f0d59b1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartDone : ConversationUpdate { - internal InternalRealtimeServerEventResponseContentPartDone(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartFinished) + internal InternalRealtimeServerEventResponseContentPartDone(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseContentPartDone(string eventId, stri _internalContentPart = internalContentPart; } - internal InternalRealtimeServerEventResponseContentPartDone(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartDone(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseContentPartDone(string eventId, stri _internalContentPart = internalContentPart; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs index a052eaa99..a451e8e92 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string delta = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De delta = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De } } return new InternalRealtimeServerEventResponseFunctionCallArgumentsDelta( - eventId, responseId, itemId, outputIndex, callId, delta, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs index 5bc1247f3..078d2f9a4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string ev Delta = delta; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string ev Delta = delta; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs index 6e3eba5b7..4395fdfe6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseFunctionCallArgumentsDone)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string arguments = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des arguments = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des } } return new InternalRealtimeServerEventResponseFunctionCallArgumentsDone( - eventId, responseId, itemId, outputIndex, callId, arguments, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs index ddd4102ec..10b8339f0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDone : ConversationUpdate { - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, string responseId, string itemId, int outputIndex, string callId, string arguments) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsFinished) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string responseId, string itemId, int outputIndex, string callId, string arguments, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eve Arguments = arguments; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, string responseId, string itemId, int outputIndex, string callId, string arguments, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string responseId, string itemId, int outputIndex, string callId, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eve Arguments = arguments; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs index fd2b05800..13e8542d3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs @@ -32,11 +32,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InternalRealtimeServerEventResponseTextDelta)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (_additionalBinaryDataProperties?.ContainsKey("event_id") != true) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } if (_additionalBinaryDataProperties?.ContainsKey("response_id") != true) { writer.WritePropertyName("response_id"u8); @@ -83,21 +78,16 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal { return null; } - string eventId = default; string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; + string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -123,6 +113,11 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal delta = prop.Value.GetString(); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("type"u8)) { kind = prop.Value.GetString().ToConversationUpdateKind(); @@ -134,12 +129,12 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal } } return new InternalRealtimeServerEventResponseTextDelta( - eventId, responseId, itemId, outputIndex, contentIndex, delta, + eventId, kind, additionalBinaryDataProperties); } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs index f3a773211..427fd74d6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseTextDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseTextDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextDelta) + internal InternalRealtimeServerEventResponseTextDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseTextDelta(string eventId, string res Delta = delta; } - internal InternalRealtimeServerEventResponseTextDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseTextDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -27,8 +27,6 @@ internal InternalRealtimeServerEventResponseTextDelta(string eventId, string res Delta = delta; } - public new string EventId => _eventId ?? default; - public string ResponseId { get; } public string ItemId { get; } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 7ddd1ed9c..765840460 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -475,28 +475,28 @@ public static ConversationUpdate ConversationUpdate(string eventId = default, st return new UnknownRealtimeServerEvent(eventId, kind.ToConversationUpdateKind(), additionalBinaryDataProperties: null); } - public static ConversationErrorUpdate ConversationErrorUpdate(string eventId = default, InternalRealtimeServerEventErrorError error = default) + public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeServerEventErrorError error = default, string eventId = default) { - return new ConversationErrorUpdate(eventId, error, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); + return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); } - public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionStartedUpdate(eventId, internalSession, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); + return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); } - public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) { - return new ConversationSessionConfiguredUpdate(eventId, internalSession, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); + return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); } - public static ConversationInputAudioCommittedUpdate ConversationInputAudioCommittedUpdate(string eventId = default, string previousItemId = default, string itemId = default) + public static ConversationInputAudioCommittedUpdate ConversationInputAudioCommittedUpdate(string previousItemId = default, string itemId = default, string eventId = default) { - return new ConversationInputAudioCommittedUpdate(eventId, previousItemId, itemId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted, additionalBinaryDataProperties: null); + return new ConversationInputAudioCommittedUpdate(previousItemId, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted, additionalBinaryDataProperties: null); } public static ConversationInputAudioClearedUpdate ConversationInputAudioClearedUpdate(string eventId = default) @@ -505,70 +505,70 @@ public static ConversationInputAudioClearedUpdate ConversationInputAudioClearedU return new ConversationInputAudioClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCleared, additionalBinaryDataProperties: null); } - public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string eventId = default, string itemId = default, int audioStartMs = default) + public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string itemId = default, int audioStartMs = default, string eventId = default) { - return new ConversationInputSpeechStartedUpdate(eventId, itemId, audioStartMs, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted, additionalBinaryDataProperties: null); + return new ConversationInputSpeechStartedUpdate(itemId, audioStartMs, eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted, additionalBinaryDataProperties: null); } - public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string eventId = default, string itemId = default, int audioEndMs = default) + public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string itemId = default, int audioEndMs = default, string eventId = default) { - return new ConversationInputSpeechFinishedUpdate(eventId, itemId, audioEndMs, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped, additionalBinaryDataProperties: null); + return new ConversationInputSpeechFinishedUpdate(itemId, audioEndMs, eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped, additionalBinaryDataProperties: null); } - public static ConversationItemCreatedUpdate ConversationItemCreatedUpdate(string eventId = default, string previousItemId = default, InternalRealtimeResponseItem internalItem = default) + public static ConversationItemCreatedUpdate ConversationItemCreatedUpdate(string previousItemId = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) { - return new ConversationItemCreatedUpdate(eventId, previousItemId, internalItem, RealtimeConversation.ConversationUpdateKind.ItemCreated, additionalBinaryDataProperties: null); + return new ConversationItemCreatedUpdate(previousItemId, internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated, additionalBinaryDataProperties: null); } - public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string eventId = default, string itemId = default, int contentIndex = default, string transcript = default) + public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default) { return new ConversationInputTranscriptionFinishedUpdate( - eventId, itemId, contentIndex, transcript, + eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished, additionalBinaryDataProperties: null); } - public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string eventId = default, string itemId = default, int contentIndex = default, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default) + public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default, string eventId = default) { return new ConversationInputTranscriptionFailedUpdate( - eventId, itemId, contentIndex, error, + eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed, additionalBinaryDataProperties: null); } - public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string eventId = default, string itemId = default, int contentIndex = default, int audioEndMs = default) + public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int contentIndex = default, int audioEndMs = default, string eventId = default) { return new ConversationItemTruncatedUpdate( - eventId, itemId, contentIndex, audioEndMs, + eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated, additionalBinaryDataProperties: null); } - public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string eventId = default, string itemId = default) + public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default) { - return new ConversationItemDeletedUpdate(eventId, itemId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); + return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); } - public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseStartedUpdate(eventId, internalResponse, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); + return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); } public static ConversationStatusDetails ConversationStatusDetails(string statusKind = default) @@ -601,82 +601,82 @@ public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDe return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); } - public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) { - return new ConversationResponseFinishedUpdate(eventId, internalResponse, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); + return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); } - public static ConversationItemStreamingStartedUpdate ConversationItemStreamingStartedUpdate(string eventId = default, string responseId = default, int itemIndex = default, InternalRealtimeResponseItem internalItem = default) + public static ConversationItemStreamingStartedUpdate ConversationItemStreamingStartedUpdate(string responseId = default, int itemIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) { return new ConversationItemStreamingStartedUpdate( - eventId, responseId, itemIndex, internalItem, + eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted, additionalBinaryDataProperties: null); } - public static ConversationItemStreamingFinishedUpdate ConversationItemStreamingFinishedUpdate(string eventId = default, string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default) + public static ConversationItemStreamingFinishedUpdate ConversationItemStreamingFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) { return new ConversationItemStreamingFinishedUpdate( - eventId, responseId, outputIndex, internalItem, + eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished, additionalBinaryDataProperties: null); } - public static ConversationItemStreamingTextFinishedUpdate ConversationItemStreamingTextFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string text = default) + public static ConversationItemStreamingTextFinishedUpdate ConversationItemStreamingTextFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string text = default, string eventId = default) { return new ConversationItemStreamingTextFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, text, + eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished, additionalBinaryDataProperties: null); } - public static ConversationItemStreamingAudioTranscriptionFinishedUpdate ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string transcript = default) + public static ConversationItemStreamingAudioTranscriptionFinishedUpdate ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string transcript = default, string eventId = default) { return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, transcript, + eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished, additionalBinaryDataProperties: null); } - public static ConversationItemStreamingAudioFinishedUpdate ConversationItemStreamingAudioFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default) + public static ConversationItemStreamingAudioFinishedUpdate ConversationItemStreamingAudioFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) { return new ConversationItemStreamingAudioFinishedUpdate( - eventId, responseId, itemId, outputIndex, contentIndex, + eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished, additionalBinaryDataProperties: null); } - public static ConversationRateLimitsUpdate ConversationRateLimitsUpdate(string eventId = default, IEnumerable allDetails = default) + public static ConversationRateLimitsUpdate ConversationRateLimitsUpdate(IEnumerable allDetails = default, string eventId = default) { allDetails ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdate(eventId, allDetails?.ToList(), RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); + return new ConversationRateLimitsUpdate(allDetails?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); } public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int maximumCount = default, int remainingCount = default, TimeSpan timeUntilReset = default) From 649e6db2dd84779eacad2f2182413a3c60528084 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Wed, 6 Nov 2024 11:29:03 -0600 Subject: [PATCH 38/54] bump scm version, add customization fixes, & regen --- .../Assistants/AssistantClient.Protocol.cs | 2 + .../src/Custom/Assistants/AssistantClient.cs | 4 +- .../src/Custom/Batch/BatchClient.Protocol.cs | 2 + .../Custom/Files/OpenAIFileClient.Protocol.cs | 4 +- .dotnet/src/Custom/Files/OpenAIFileClient.cs | 4 +- .../FineTuning/FineTuningClient.Protocol.cs | 12 +- .../Models/OpenAIModelClient.Protocol.cs | 4 +- .../src/Custom/Models/OpenAIModelClient.cs | 4 +- .../VectorStoreClient.Protocol.cs | 12 +- .../Custom/VectorStores/VectorStoreClient.cs | 12 +- .dotnet/src/Generated/AssistantClient.cs | 30 ----- .dotnet/src/Generated/BatchClient.cs | 13 -- .dotnet/src/Generated/FineTuningClient.cs | 46 ------- ...wnAssistantResponseFormat.Serialization.cs | 4 +- ...nternalUnknownChatMessage.Serialization.cs | 4 +- ...UnknownChatResponseFormat.Serialization.cs | 4 +- ...StrategyRequestParamProxy.Serialization.cs | 4 +- ...trategyResponseParamProxy.Serialization.cs | 4 +- ...wnOmniTypedResponseFormat.Serialization.cs | 4 +- ...wnAssistantToolDefinition.Serialization.cs | 4 +- ...ningJobRequestIntegration.Serialization.cs | 4 +- ...nownFineTuningIntegration.Serialization.cs | 4 +- ...ntentTextObjectAnnotation.Serialization.cs | 4 +- ...nknownMessageDeltaContent.Serialization.cs | 4 +- ...eltaTextContentAnnotation.Serialization.cs | 4 +- ...nknownRealtimeClientEvent.Serialization.cs | 4 +- ...nknownRealtimeContentPart.Serialization.cs | 4 +- ...nknownRealtimeRequestItem.Serialization.cs | 4 +- ...knownRealtimeResponseItem.Serialization.cs | 4 +- ...timeResponseStatusDetails.Serialization.cs | 4 +- ...nknownRealtimeServerEvent.Serialization.cs | 4 +- .../UnknownRealtimeTool.Serialization.cs | 4 +- ...nRealtimeToolChoiceObject.Serialization.cs | 4 +- ...nownRealtimeTurnDetection.Serialization.cs | 4 +- ...wnRunStepDeltaStepDetails.Serialization.cs | 4 +- ...eInterpreterOutputsObject.Serialization.cs | 4 +- ...allsObjectToolCallsObject.Serialization.cs | 4 +- ...eInterpreterOutputsObject.Serialization.cs | 4 +- ...allsObjectToolCallsObject.Serialization.cs | 4 +- ...nRunStepObjectStepDetails.Serialization.cs | 4 +- .dotnet/src/Generated/OpenAIFileClient.cs | 25 ---- .dotnet/src/Generated/OpenAIModelClient.cs | 25 ---- .dotnet/src/Generated/VectorStoreClient.cs | 118 ------------------ .../src/OpenAI.Library.Plugin.csproj | 2 +- 44 files changed, 89 insertions(+), 338 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs b/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs index d16266186..e964ca737 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs @@ -6,6 +6,8 @@ namespace OpenAI.Assistants; +[CodeGenSuppress("ListAssistantsAsync", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListAssistants", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] public partial class AssistantClient { /// diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 752397181..5a975d11e 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -16,8 +16,8 @@ namespace OpenAI.Assistants; [CodeGenSuppress("AssistantClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateAssistantAsync", typeof(AssistantCreationOptions))] [CodeGenSuppress("CreateAssistant", typeof(AssistantCreationOptions))] -[CodeGenSuppress("ListAssistantAsync", typeof(string))] -[CodeGenSuppress("ListAssistant", typeof(string))] +[CodeGenSuppress("GetAssistantAsync", typeof(string))] +[CodeGenSuppress("GetAssistant", typeof(string))] [CodeGenSuppress("ModifyAssistantAsync", typeof(string), typeof(AssistantModificationOptions))] [CodeGenSuppress("ModifyAssistant", typeof(string), typeof(AssistantModificationOptions))] [CodeGenSuppress("DeleteAssistantAsync", typeof(string))] diff --git a/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs b/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs index c6aecb1ec..bdeab40cf 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.Protocol.cs @@ -8,6 +8,8 @@ namespace OpenAI.Batch; [CodeGenSuppress("RetrieveBatch", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("RetrieveBatchAsync", typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListBatches", typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListBatchesAsync", typeof(string), typeof(int?), typeof(RequestOptions))] public partial class BatchClient { /// diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs index 3fea8b77c..a699ba158 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.Protocol.cs @@ -9,8 +9,8 @@ namespace OpenAI.Files; [CodeGenSuppress("CreateFileAsync", typeof(BinaryContent), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CreateFile", typeof(BinaryContent), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetFilesAsync", typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetFiles", typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFilesAsync", typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFiles", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("RetrieveFileAsync", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("RetrieveFile", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteFileAsync", typeof(string), typeof(RequestOptions))] diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.cs index 593219adc..7f610d2e5 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.cs @@ -15,8 +15,8 @@ namespace OpenAI.Files; [CodeGenSuppress("OpenAIFileClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateFileAsync", typeof(InternalFileUploadOptions))] [CodeGenSuppress("CreateFile", typeof(InternalFileUploadOptions))] -[CodeGenSuppress("GetFilesAsync", typeof(string))] -[CodeGenSuppress("GetFiles", typeof(string))] +[CodeGenSuppress("ListFilesAsync", typeof(string))] +[CodeGenSuppress("ListFiles", typeof(string))] [CodeGenSuppress("RetrieveFileAsync", typeof(string))] [CodeGenSuppress("RetrieveFile", typeof(string))] [CodeGenSuppress("DeleteFileAsync", typeof(string))] diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs index 7962b6d5d..1f3c25c5d 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.Protocol.cs @@ -8,16 +8,16 @@ namespace OpenAI.FineTuning; [CodeGenSuppress("CreateFineTuningJobAsync", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateFineTuningJob", typeof(BinaryContent), typeof(RequestOptions))] -[CodeGenSuppress("GetPaginatedFineTuningJobsAsync", typeof(string), typeof(int?), typeof(RequestOptions))] -[CodeGenSuppress("GetPaginatedFineTuningJobs", typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListPaginatedFineTuningJobsAsync", typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListPaginatedFineTuningJobs", typeof(string), typeof(int?), typeof(RequestOptions))] [CodeGenSuppress("RetrieveFineTuningJobAsync", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("RetrieveFineTuningJob", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelFineTuningJobAsync", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelFineTuningJob", typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] -[CodeGenSuppress("GetFineTuningEvents", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] -[CodeGenSuppress("GetFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] -[CodeGenSuppress("GetFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListFineTuningEvents", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] +[CodeGenSuppress("ListFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?), typeof(RequestOptions))] public partial class FineTuningClient { // CUSTOM: diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs index 85020ab01..476db90e3 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.Protocol.cs @@ -6,8 +6,8 @@ namespace OpenAI.Models; -[CodeGenSuppress("GetModelsAsync", typeof(RequestOptions))] -[CodeGenSuppress("GetModels", typeof(RequestOptions))] +[CodeGenSuppress("ListModelsAsync", typeof(RequestOptions))] +[CodeGenSuppress("ListModels", typeof(RequestOptions))] [CodeGenSuppress("RetrieveModelAsync", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("RetrieveModel", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteModelAsync", typeof(string), typeof(RequestOptions))] diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.cs index 657899b37..a6c17701c 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.cs @@ -13,8 +13,8 @@ namespace OpenAI.Models; /// The service client for OpenAI model operations. [CodeGenClient("ModelsOps")] [CodeGenSuppress("OpenAIModelClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("GetModelsAsync")] -[CodeGenSuppress("GetModels")] +[CodeGenSuppress("ListModelsAsync")] +[CodeGenSuppress("ListModels")] [CodeGenSuppress("RetrieveModelAsync", typeof(string))] [CodeGenSuppress("RetrieveModel", typeof(string))] [CodeGenSuppress("DeleteModelAsync", typeof(string))] diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs index a305bb185..810460b8d 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.Protocol.cs @@ -7,20 +7,24 @@ namespace OpenAI.VectorStores; +[CodeGenSuppress("ListVectorStoresAsync", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListVectorStores", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("ListVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("ListVectorStoreFiles", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFile", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] -[CodeGenSuppress("ListVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("ListVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("DeleteVectorStoreFile", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateVectorStoreFileBatch", typeof(string), typeof(BinaryContent), typeof(RequestOptions))] -[CodeGenSuppress("ListVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("ListVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelVectorStoreFileBatch", typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFilesInVectorStoreBatchAsync", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("ListFilesInVectorStoreBatch", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("ListFilesInVectorStoreBatchesAsync", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("ListFilesInVectorStoreBatches", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] public partial class VectorStoreClient diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index d05728c4b..9ea171a96 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -17,8 +17,8 @@ namespace OpenAI.VectorStores; [CodeGenSuppress("VectorStoreClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateVectorStoreAsync", typeof(VectorStoreCreationOptions))] [CodeGenSuppress("CreateVectorStore", typeof(VectorStoreCreationOptions))] -[CodeGenSuppress("ListVectorStoreAsync", typeof(string))] -[CodeGenSuppress("ListVectorStore", typeof(string))] +[CodeGenSuppress("GetVectorStoreAsync", typeof(string))] +[CodeGenSuppress("GetVectorStore", typeof(string))] [CodeGenSuppress("ModifyVectorStoreAsync", typeof(string), typeof(VectorStoreModificationOptions))] [CodeGenSuppress("ModifyVectorStore", typeof(string), typeof(VectorStoreModificationOptions))] [CodeGenSuppress("DeleteVectorStoreAsync", typeof(string))] @@ -29,14 +29,14 @@ namespace OpenAI.VectorStores; [CodeGenSuppress("ListVectorStoreFiles", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] [CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] [CodeGenSuppress("CreateVectorStoreFile", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] -[CodeGenSuppress("ListVectorStoreFileAsync", typeof(string), typeof(string))] -[CodeGenSuppress("ListVectorStoreFile", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string))] [CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string))] [CodeGenSuppress("DeleteVectorStoreFile", typeof(string), typeof(string))] [CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] [CodeGenSuppress("CreateVectorStoreFileBatch", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] -[CodeGenSuppress("ListVectorStoreFileBatchAsync", typeof(string), typeof(string))] -[CodeGenSuppress("ListVectorStoreFileBatch", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string))] [CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string))] [CodeGenSuppress("CancelVectorStoreFileBatch", typeof(string), typeof(string))] [CodeGenSuppress("ListFilesInVectorStoreBatchAsync", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index 049a76f8a..8af7745ec 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -5,8 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; -using OpenAI; namespace OpenAI.Assistants { @@ -22,33 +20,5 @@ protected AssistantClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult ListAssistants(int? limit, string order, string after, string before, RequestOptions options) - { - using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options) - { - using PipelineMessage message = CreateListAssistantsRequest(limit, order, after, before, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult GetAssistant(string assistantId) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - ClientResult result = this.GetAssistant(assistantId, null); - return ClientResult.FromValue((Assistant)result, result.GetRawResponse()); - } - - public virtual async Task> GetAssistantAsync(string assistantId) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - ClientResult result = await this.GetAssistantAsync(assistantId, null).ConfigureAwait(false); - return ClientResult.FromValue((Assistant)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index 30f2d7f88..48df1fec3 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Batch { @@ -21,17 +20,5 @@ protected BatchClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult ListBatches(string after, int? limit, RequestOptions options) - { - using PipelineMessage message = CreateListBatchesRequest(after, limit, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListBatchesAsync(string after, int? limit, RequestOptions options) - { - using PipelineMessage message = CreateListBatchesRequest(after, limit, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index 1babb0d59..d7df5cd35 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -5,8 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; -using OpenAI; namespace OpenAI.FineTuning { @@ -22,49 +20,5 @@ protected FineTuningClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult ListPaginatedFineTuningJobs(string after, int? limit, RequestOptions options) - { - using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListPaginatedFineTuningJobsAsync(string after, int? limit, RequestOptions options) - { - using PipelineMessage message = CreateListPaginatedFineTuningJobsRequest(after, limit, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListFineTuningJobCheckpoints(string fineTuningJobId, string after, int? limit, RequestOptions options) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fineTuningJobId, after, limit, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListFineTuningJobCheckpointsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - using PipelineMessage message = CreateListFineTuningJobCheckpointsRequest(fineTuningJobId, after, limit, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListFineTuningEvents(string fineTuningJobId, string after, int? limit, RequestOptions options) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListFineTuningEventsAsync(string fineTuningJobId, string after, int? limit, RequestOptions options) - { - Argument.AssertNotNull(fineTuningJobId, nameof(fineTuningJobId)); - - using PipelineMessage message = CreateListFineTuningEventsRequest(fineTuningJobId, after, limit, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs index 96b734dbe..e70f6e95d 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownAssistantResponseFormat.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownAssistantResponseFormat)JsonModelCreateCore(ref reader, options); + AssistantResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override AssistantResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownAssistantResponseFormat)PersistableModelCreateCore(data, options); + AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override AssistantResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs index d02d0f5f4..1dbb31bef 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatMessage.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)JsonModelCreateCore(ref reader, options); + ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChatMessage)PersistableModelCreateCore(data, options); + ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs index 301c8fd1d..02fc947f9 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownChatResponseFormat.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownChatResponseFormat)JsonModelCreateCore(ref reader, options); + ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -76,7 +76,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownChatResponseFormat)PersistableModelCreateCore(data, options); + ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs index c68efa74d..2d9e4a04e 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyRequestParamProxy.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyRequestParamProxy)JsonModelCreateCore(ref reader, options); + InternalFileChunkingStrategyRequestParam IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalFileChunkingStrategyRequestParam JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyRequestParamProxy)PersistableModelCreateCore(data, options); + InternalFileChunkingStrategyRequestParam IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalFileChunkingStrategyRequestParam PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs index c4e7d5fa6..f0b262ddf 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownFileChunkingStrategyResponseParamProxy.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyResponseParamProxy)JsonModelCreateCore(ref reader, options); + FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownFileChunkingStrategyResponseParamProxy)PersistableModelCreateCore(data, options); + FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs index 4e9e008d1..f921f0ade 100644 --- a/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalUnknownOmniTypedResponseFormat.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InternalUnknownOmniTypedResponseFormat)JsonModelCreateCore(ref reader, options); + InternalOmniTypedResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalOmniTypedResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InternalUnknownOmniTypedResponseFormat)PersistableModelCreateCore(data, options); + InternalOmniTypedResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalOmniTypedResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs index d0219219f..929e01eb3 100644 --- a/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownAssistantToolDefinition.Serialization.cs @@ -26,7 +26,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownAssistantToolDefinition)JsonModelCreateCore(ref reader, options); + ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -76,7 +76,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownAssistantToolDefinition)PersistableModelCreateCore(data, options); + ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs index 8e5f1e8e3..18646e9bd 100644 --- a/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownCreateFineTuningJobRequestIntegration.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownCreateFineTuningJobRequestIntegration)JsonModelCreateCore(ref reader, options); + FineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override FineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownCreateFineTuningJobRequestIntegration)PersistableModelCreateCore(data, options); + FineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override FineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs index 263182a78..f38d39bce 100644 --- a/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownFineTuningIntegration.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)JsonModelCreateCore(ref reader, options); + InternalFineTuningIntegration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalFineTuningIntegration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownFineTuningIntegration)PersistableModelCreateCore(data, options); + InternalFineTuningIntegration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalFineTuningIntegration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs index 6a994f475..f1faf7745 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageContentTextObjectAnnotation.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageContentTextObjectAnnotation)JsonModelCreateCore(ref reader, options); + InternalMessageContentTextObjectAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalMessageContentTextObjectAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageContentTextObjectAnnotation)PersistableModelCreateCore(data, options); + InternalMessageContentTextObjectAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalMessageContentTextObjectAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs index 5b6814e3c..4b88fb791 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaContent.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageDeltaContent)JsonModelCreateCore(ref reader, options); + InternalMessageDeltaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalMessageDeltaContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageDeltaContent)PersistableModelCreateCore(data, options); + InternalMessageDeltaContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalMessageDeltaContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs index 0d3229fd8..fd95ef989 100644 --- a/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownMessageDeltaTextContentAnnotation.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownMessageDeltaTextContentAnnotation)JsonModelCreateCore(ref reader, options); + InternalMessageDeltaTextContentAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalMessageDeltaTextContentAnnotation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownMessageDeltaTextContentAnnotation)PersistableModelCreateCore(data, options); + InternalMessageDeltaTextContentAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalMessageDeltaTextContentAnnotation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs index 0094dc685..16f2281c8 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeClientEvent.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRealtimeClientEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeClientEvent)JsonModelCreateCore(ref reader, options); + InternalRealtimeClientEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalRealtimeClientEvent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -89,7 +89,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeClientEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeClientEvent)PersistableModelCreateCore(data, options); + InternalRealtimeClientEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalRealtimeClientEvent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs index b9fea3699..28867bbbd 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeContentPart.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeContentPart)JsonModelCreateCore(ref reader, options); + ConversationContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeContentPart)PersistableModelCreateCore(data, options); + ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs index 9cd54657d..c32837795 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestItem.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeRequestItem)JsonModelCreateCore(ref reader, options); + ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -89,7 +89,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeRequestItem)PersistableModelCreateCore(data, options); + ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs index 601e0259c..f618f94fd 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseItem.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseItem)JsonModelCreateCore(ref reader, options); + InternalRealtimeResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalRealtimeResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -100,7 +100,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseItem)PersistableModelCreateCore(data, options); + InternalRealtimeResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalRealtimeResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs index 1e9abed87..21fc7644a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeResponseStatusDetails.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)JsonModelCreateCore(ref reader, options); + ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeResponseStatusDetails)PersistableModelCreateCore(data, options); + ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs index 27a46aebb..aa48c7391 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeServerEvent.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeServerEvent)JsonModelCreateCore(ref reader, options); + ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -89,7 +89,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeServerEvent)PersistableModelCreateCore(data, options); + ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs index 135527aa9..bbf65b2f3 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTool.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeTool)JsonModelCreateCore(ref reader, options); + ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeTool)PersistableModelCreateCore(data, options); + ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs index 1c78da3b6..ced86e48a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeToolChoiceObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeToolChoiceObject)JsonModelCreateCore(ref reader, options); + InternalRealtimeToolChoiceObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalRealtimeToolChoiceObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeToolChoiceObject)PersistableModelCreateCore(data, options); + InternalRealtimeToolChoiceObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalRealtimeToolChoiceObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs index ab00b3c93..893f07b6a 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeTurnDetection.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRealtimeTurnDetection)JsonModelCreateCore(ref reader, options); + ConversationTurnDetectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override ConversationTurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRealtimeTurnDetection)PersistableModelCreateCore(data, options); + ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override ConversationTurnDetectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs index 1adf0306c..1001a346d 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetails.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetails)JsonModelCreateCore(ref reader, options); + InternalRunStepDeltaStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalRunStepDeltaStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetails)PersistableModelCreateCore(data, options); + InternalRunStepDeltaStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalRunStepDeltaStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index 5848b03e6..53787e08c 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)JsonModelCreateCore(ref reader, options); + RunStepUpdateCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override RunStepUpdateCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)PersistableModelCreateCore(data, options); + RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override RunStepUpdateCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index e0919c8be..9ca843d25 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)JsonModelCreateCore(ref reader, options); + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDeltaStepDetailsToolCallsObjectToolCallsObject)PersistableModelCreateCore(data, options); + InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override InternalRunStepDeltaStepDetailsToolCallsObjectToolCallsObject PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs index ba61e3324..ca2a237bd 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)JsonModelCreateCore(ref reader, options); + RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject)PersistableModelCreateCore(data, options); + RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs index c7ca094c6..b0052b75e 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepDetailsToolCallsObjectToolCallsObject.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsObjectToolCallsObject)JsonModelCreateCore(ref reader, options); + RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepDetailsToolCallsObjectToolCallsObject)PersistableModelCreateCore(data, options); + RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs index 5a631ddba..9eed83689 100644 --- a/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRunStepObjectStepDetails.Serialization.cs @@ -33,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); } - RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (UnknownRunStepObjectStepDetails)JsonModelCreateCore(ref reader, options); + RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); protected override RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { @@ -83,7 +83,7 @@ protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions } } - RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (UnknownRunStepObjectStepDetails)PersistableModelCreateCore(data, options); + RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); protected override RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { diff --git a/.dotnet/src/Generated/OpenAIFileClient.cs b/.dotnet/src/Generated/OpenAIFileClient.cs index 042df93e4..bdab19cdd 100644 --- a/.dotnet/src/Generated/OpenAIFileClient.cs +++ b/.dotnet/src/Generated/OpenAIFileClient.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Files { @@ -21,29 +20,5 @@ protected OpenAIFileClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult ListFiles(string purpose, RequestOptions options) - { - using PipelineMessage message = CreateListFilesRequest(purpose, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListFilesAsync(string purpose, RequestOptions options) - { - using PipelineMessage message = CreateListFilesRequest(purpose, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListFiles(string purpose) - { - ClientResult result = ListFiles(purpose, null); - return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); - } - - public virtual async Task> ListFilesAsync(string purpose) - { - ClientResult result = await ListFilesAsync(purpose, null).ConfigureAwait(false); - return ClientResult.FromValue((OpenAIFileCollection)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/OpenAIModelClient.cs b/.dotnet/src/Generated/OpenAIModelClient.cs index e45c59aa3..77aafebbd 100644 --- a/.dotnet/src/Generated/OpenAIModelClient.cs +++ b/.dotnet/src/Generated/OpenAIModelClient.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading.Tasks; namespace OpenAI.Models { @@ -21,29 +20,5 @@ protected OpenAIModelClient() } public ClientPipeline Pipeline { get; } - - public virtual ClientResult ListModels(RequestOptions options) - { - using PipelineMessage message = CreateListModelsRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListModelsAsync(RequestOptions options) - { - using PipelineMessage message = CreateListModelsRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult ListModels() - { - ClientResult result = ListModels(null); - return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); - } - - public virtual async Task> ListModelsAsync() - { - ClientResult result = await ListModelsAsync(null).ConfigureAwait(false); - return ClientResult.FromValue((OpenAIModelCollection)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index caa26e4b5..fd35bbb8a 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -23,18 +23,6 @@ protected VectorStoreClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult ListVectorStores(int? limit, string order, string after, string before, RequestOptions options) - { - using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListVectorStoresAsync(int? limit, string order, string after, string before, RequestOptions options) - { - using PipelineMessage message = CreateListVectorStoresRequest(limit, order, after, before, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) { Argument.AssertNotNull(content, nameof(content)); @@ -50,111 +38,5 @@ public virtual async Task CreateVectorStoreAsync(BinaryContent con using PipelineMessage message = this.CreateCreateVectorStoreRequest(content, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - - public virtual ClientResult GetVectorStore(string vectorStoreId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - - ClientResult result = this.GetVectorStore(vectorStoreId, null); - return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); - } - - public virtual async Task> GetVectorStoreAsync(string vectorStoreId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - - ClientResult result = await this.GetVectorStoreAsync(vectorStoreId, null).ConfigureAwait(false); - return ClientResult.FromValue((VectorStore)result, result.GetRawResponse()); - } - - public virtual ClientResult GetVectorStoreFile(string vectorStoreId, string fileId, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileId, nameof(fileId)); - - using PipelineMessage message = this.CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetVectorStoreFileAsync(string vectorStoreId, string fileId, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileId, nameof(fileId)); - - using PipelineMessage message = this.CreateGetVectorStoreFileRequest(vectorStoreId, fileId, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult GetVectorStoreFile(string vectorStoreId, string fileId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileId, nameof(fileId)); - - ClientResult result = GetVectorStoreFile(vectorStoreId, fileId, null); - return ClientResult.FromValue((VectorStoreFileAssociation)result, result.GetRawResponse()); - } - - public virtual async Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileId, nameof(fileId)); - - ClientResult result = await GetVectorStoreFileAsync(vectorStoreId, fileId, null).ConfigureAwait(false); - return ClientResult.FromValue((VectorStoreFileAssociation)result, result.GetRawResponse()); - } - - public virtual ClientResult GetVectorStoreFileBatch(string vectorStoreId, string batchId, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - using PipelineMessage message = this.CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - using PipelineMessage message = this.CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - public virtual ClientResult GetVectorStoreFileBatch(string vectorStoreId, string batchId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - ClientResult result = GetVectorStoreFileBatch(vectorStoreId, batchId, null); - return ClientResult.FromValue((VectorStoreBatchFileJob)result, result.GetRawResponse()); - } - - public virtual async Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - ClientResult result = await GetVectorStoreFileBatchAsync(vectorStoreId, batchId, null).ConfigureAwait(false); - return ClientResult.FromValue((VectorStoreBatchFileJob)result, result.GetRawResponse()); - } - - public virtual ClientResult ListFilesInVectorStoreBatch(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - public virtual async Task ListFilesInVectorStoreBatchAsync(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) - { - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(batchId, nameof(batchId)); - - using PipelineMessage message = CreateListFilesInVectorStoreBatchRequest(vectorStoreId, batchId, limit, order, after, before, filter, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } } } diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 6bf28a0cf..6ee9e8ba2 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 8a40e6fbf3f1c03339ee8ce11c5070dd2d4ffa80 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 6 Nov 2024 12:17:10 -0800 Subject: [PATCH 39/54] regen --- .../InternalRealtimeRequestAssistantMessageItem.cs | 9 --------- .../Models/InternalRealtimeRequestSystemMessageItem.cs | 9 --------- 2 files changed, 18 deletions(-) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs index a9cc2a409..d55ca6cd8 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs @@ -4,20 +4,11 @@ using System; using System.Collections.Generic; -using System.Linq; -using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAssistantMessageItem : InternalRealtimeRequestMessageItem { - public InternalRealtimeRequestAssistantMessageItem(IEnumerable content) : base(ConversationMessageRole.Assistant) - { - Argument.AssertNotNull(content, nameof(content)); - - Content = content.ToList(); - } - internal InternalRealtimeRequestAssistantMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) { Content = content; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs index 454e06212..2b7796c4d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs @@ -4,20 +4,11 @@ using System; using System.Collections.Generic; -using System.Linq; -using OpenAI; namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestSystemMessageItem : InternalRealtimeRequestMessageItem { - public InternalRealtimeRequestSystemMessageItem(IEnumerable content) : base(ConversationMessageRole.System) - { - Argument.AssertNotNull(content, nameof(content)); - - Content = content.ToList(); - } - internal InternalRealtimeRequestSystemMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) { Content = content; From eadf547de75024ff0af7fc6cbcb5002014504f15 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 6 Nov 2024 12:33:17 -0800 Subject: [PATCH 40/54] Relax test assertion to not rely on JSON ordering --- .dotnet/tests/RealtimeConversation/ConversationSmokeTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.dotnet/tests/RealtimeConversation/ConversationSmokeTests.cs b/.dotnet/tests/RealtimeConversation/ConversationSmokeTests.cs index 72bd32522..b405eb97a 100644 --- a/.dotnet/tests/RealtimeConversation/ConversationSmokeTests.cs +++ b/.dotnet/tests/RealtimeConversation/ConversationSmokeTests.cs @@ -27,7 +27,7 @@ public void ToolChoiceSerializationInSessionOptionsWorks() (ConversationToolChoice.CreateNoneToolChoice(), @"{""tool_choice"":""none""}"), (ConversationToolChoice.CreateAutoToolChoice(), @"{""tool_choice"":""auto""}"), (ConversationToolChoice.CreateRequiredToolChoice(), @"{""tool_choice"":""required""}"), - (ConversationToolChoice.CreateFunctionToolChoice("foo"), @"{""function"":{""name"":""foo""}") + (ConversationToolChoice.CreateFunctionToolChoice("foo"), @"""function"":{""name"":""foo""") }) { ConversationSessionOptions options = new() @@ -46,7 +46,7 @@ public void ToolChoiceSerializationInSessionOptionsWorks() Assert.That(mrwToolChoice.Kind, Is.EqualTo(ConversationToolChoiceKind.Unknown)); Assert.That(ModelReaderWriter.Write(mrwToolChoice).ToString(), Does.Contain(@"""type"":""some_manual_type""")); } - + [Test] public void ItemCreation() { From 4fc9ef4cb58e21fde440f327109af9c04ef0e920 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 6 Nov 2024 12:54:51 -0800 Subject: [PATCH 41/54] gen api and fix Assistant collection properties --- .dotnet/api/OpenAI.netstandard2.0.cs | 877 ++++++++++++++++-- .../Models/Assistant.Serialization.cs | 8 +- .dotnet/src/Generated/Models/Assistant.cs | 14 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 2 +- .openapi3/openapi3-openai.yaml | 2 + .typespec/assistants/client.tsp | 2 + 6 files changed, 840 insertions(+), 65 deletions(-) diff --git a/.dotnet/api/OpenAI.netstandard2.0.cs b/.dotnet/api/OpenAI.netstandard2.0.cs index 409427400..0170cf795 100644 --- a/.dotnet/api/OpenAI.netstandard2.0.cs +++ b/.dotnet/api/OpenAI.netstandard2.0.cs @@ -40,6 +40,12 @@ public class Assistant : IJsonModel, IPersistableModel { public float? Temperature { get; } public ToolResources ToolResources { get; } public IReadOnlyList Tools { get; } + protected virtual Assistant JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator Assistant(ClientResult result); + public static implicit operator BinaryContent(Assistant assistant); + protected virtual Assistant PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); Assistant IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); Assistant IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -219,7 +225,6 @@ public class AssistantCollectionOptions { public readonly bool Equals(AssistantCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right); public static implicit operator AssistantCollectionOrder(string value); @@ -236,6 +241,12 @@ public class AssistantCreationOptions : IJsonModel, IP public float? Temperature { get; set; } public ToolResources ToolResources { get; set; } public IList Tools { get; } + protected virtual AssistantCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AssistantCreationOptions(ClientResult result); + public static implicit operator BinaryContent(AssistantCreationOptions assistantCreationOptions); + protected virtual AssistantCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AssistantCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -245,6 +256,12 @@ public class AssistantCreationOptions : IJsonModel, IP public class AssistantDeletionResult : IJsonModel, IPersistableModel { public string AssistantId { get; } public bool Deleted { get; } + protected virtual AssistantDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AssistantDeletionResult(ClientResult result); + public static implicit operator BinaryContent(AssistantDeletionResult assistantDeletionResult); + protected virtual AssistantDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AssistantDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -262,6 +279,12 @@ public class AssistantModificationOptions : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -280,12 +303,18 @@ public abstract class AssistantResponseFormat : IEquatable.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -302,6 +331,12 @@ public class AssistantThread : IJsonModel, IPersistableModel Metadata { get; } public ToolResources ToolResources { get; } + protected virtual AssistantThread JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AssistantThread(ClientResult result); + public static implicit operator BinaryContent(AssistantThread assistantThread); + protected virtual AssistantThread PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AssistantThread IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantThread IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -309,6 +344,13 @@ public class AssistantThread : IJsonModel, IPersistableModel.Write(ModelReaderWriterOptions options); } public class CodeInterpreterToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { + public CodeInterpreterToolDefinition() : base(default!); + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator CodeInterpreterToolDefinition(ClientResult result); + public static implicit operator BinaryContent(CodeInterpreterToolDefinition codeInterpreterToolDefinition); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); CodeInterpreterToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); CodeInterpreterToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -317,6 +359,12 @@ public class CodeInterpreterToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { public IList FileIds { get; } + protected virtual CodeInterpreterToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator CodeInterpreterToolResources(ClientResult result); + public static implicit operator BinaryContent(CodeInterpreterToolResources codeInterpreterToolResources); + protected virtual CodeInterpreterToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); CodeInterpreterToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); CodeInterpreterToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -332,7 +380,6 @@ public class CodeInterpreterToolResources : IJsonModel, IP public FileSearchRankingOptions(float scoreThreshold); public FileSearchRanker? Ranker { get; set; } public required float ScoreThreshold { get; set; } + protected virtual FileSearchRankingOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator FileSearchRankingOptions(ClientResult result); + public static implicit operator BinaryContent(FileSearchRankingOptions fileSearchRankingOptions); + protected virtual FileSearchRankingOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileSearchRankingOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileSearchRankingOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -351,8 +404,15 @@ public class FileSearchRankingOptions : IJsonModel, IP BinaryData IPersistableModel.Write(ModelReaderWriterOptions options); } public class FileSearchToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { + public FileSearchToolDefinition() : base(default!); public int? MaxResults { get; set; } public FileSearchRankingOptions RankingOptions { get; set; } + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator FileSearchToolDefinition(ClientResult result); + public static implicit operator BinaryContent(FileSearchToolDefinition fileSearchToolDefinition); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileSearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileSearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -362,6 +422,12 @@ public class FileSearchToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { public IList NewVectorStores { get; } public IList VectorStoreIds { get; } + protected virtual FileSearchToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator FileSearchToolResources(ClientResult result); + public static implicit operator BinaryContent(FileSearchToolResources fileSearchToolResources); + protected virtual FileSearchToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileSearchToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileSearchToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -369,12 +435,18 @@ public class FileSearchToolResources : IJsonModel, IPer BinaryData IPersistableModel.Write(ModelReaderWriterOptions options); } public class FunctionToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { - public FunctionToolDefinition(); - public FunctionToolDefinition(string name); + public FunctionToolDefinition() : base(default!); + public FunctionToolDefinition(string name) : base(default!); public string Description { get; set; } public required string FunctionName { get; set; } public BinaryData Parameters { get; set; } public bool? StrictParameterSchemaEnabled { get; set; } + protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator FunctionToolDefinition(ClientResult result); + public static implicit operator BinaryContent(FunctionToolDefinition functionToolDefinition); + protected override ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FunctionToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -396,7 +468,6 @@ public class MessageCollectionOptions { public readonly bool Equals(MessageCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(MessageCollectionOrder left, MessageCollectionOrder right); public static implicit operator MessageCollectionOrder(string value); @@ -413,7 +484,13 @@ public abstract class MessageContent : IJsonModel, IPersistableM public static MessageContent FromImageFileId(string imageFileId, MessageImageDetail? detail = null); public static MessageContent FromImageUri(Uri imageUri, MessageImageDetail? detail = null); public static MessageContent FromText(string text); + protected virtual MessageContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageContent(ClientResult result); + public static implicit operator BinaryContent(MessageContent messageContent); public static implicit operator MessageContent(string value); + protected virtual MessageContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -432,8 +509,14 @@ public class MessageContentUpdate : StreamingUpdate { } public class MessageCreationAttachment : IJsonModel, IPersistableModel { public MessageCreationAttachment(string fileId, IEnumerable tools); - public string FileId { get; } + public string FileId { get; set; } public IReadOnlyList Tools { get; } + protected virtual MessageCreationAttachment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageCreationAttachment(ClientResult result); + public static implicit operator BinaryContent(MessageCreationAttachment messageCreationAttachment); + protected virtual MessageCreationAttachment PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageCreationAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageCreationAttachment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -443,6 +526,12 @@ public class MessageCreationAttachment : IJsonModel, public class MessageCreationOptions : IJsonModel, IPersistableModel { public IList Attachments { get; set; } public IDictionary Metadata { get; set; } + protected virtual MessageCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageCreationOptions(ClientResult result); + public static implicit operator BinaryContent(MessageCreationOptions messageCreationOptions); + protected virtual MessageCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -452,6 +541,12 @@ public class MessageCreationOptions : IJsonModel, IPersi public class MessageDeletionResult : IJsonModel, IPersistableModel { public bool Deleted { get; } public string MessageId { get; } + protected virtual MessageDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageDeletionResult(ClientResult result); + public static implicit operator BinaryContent(MessageDeletionResult messageDeletionResult); + protected virtual MessageDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -460,6 +555,12 @@ public class MessageDeletionResult : IJsonModel, IPersist } public class MessageFailureDetails : IJsonModel, IPersistableModel { public MessageFailureReason Reason { get; } + protected virtual MessageFailureDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageFailureDetails(ClientResult result); + public static implicit operator BinaryContent(MessageFailureDetails messageFailureDetails); + protected virtual MessageFailureDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageFailureDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageFailureDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -478,7 +579,6 @@ public class MessageFailureDetails : IJsonModel, IPersist public readonly bool Equals(MessageFailureReason other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(MessageFailureReason left, MessageFailureReason right); public static implicit operator MessageFailureReason(string value); @@ -492,6 +592,12 @@ public enum MessageImageDetail { } public class MessageModificationOptions : IJsonModel, IPersistableModel { public IDictionary Metadata { get; set; } + protected virtual MessageModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator MessageModificationOptions(ClientResult result); + public static implicit operator BinaryContent(MessageModificationOptions messageModificationOptions); + protected virtual MessageModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); MessageModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); MessageModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -512,7 +618,6 @@ public enum MessageRole { public readonly bool Equals(MessageStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(MessageStatus left, MessageStatus right); public static implicit operator MessageStatus(string value); @@ -547,7 +652,6 @@ public class RunCollectionOptions { public readonly bool Equals(RunCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right); public static implicit operator RunCollectionOrder(string value); @@ -569,6 +673,12 @@ public class RunCreationOptions : IJsonModel, IPersistableMo public ToolConstraint ToolConstraint { get; set; } public IList ToolsOverride { get; } public RunTruncationStrategy TruncationStrategy { get; set; } + protected virtual RunCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunCreationOptions(ClientResult result); + public static implicit operator BinaryContent(RunCreationOptions runCreationOptions); + protected virtual RunCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -578,6 +688,12 @@ public class RunCreationOptions : IJsonModel, IPersistableMo public class RunError : IJsonModel, IPersistableModel { public RunErrorCode Code { get; } public string Message { get; } + protected virtual RunError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunError(ClientResult result); + public static implicit operator BinaryContent(RunError runError); + protected virtual RunError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -594,7 +710,6 @@ public class RunError : IJsonModel, IPersistableModel { public readonly bool Equals(RunErrorCode other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunErrorCode left, RunErrorCode right); public static implicit operator RunErrorCode(string value); @@ -603,6 +718,12 @@ public class RunError : IJsonModel, IPersistableModel { } public class RunIncompleteDetails : IJsonModel, IPersistableModel { public RunIncompleteReason? Reason { get; } + protected virtual RunIncompleteDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunIncompleteDetails(ClientResult result); + public static implicit operator BinaryContent(RunIncompleteDetails runIncompleteDetails); + protected virtual RunIncompleteDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunIncompleteDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunIncompleteDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -618,7 +739,6 @@ public class RunIncompleteDetails : IJsonModel, IPersistab public readonly bool Equals(RunIncompleteReason other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right); public static implicit operator RunIncompleteReason(string value); @@ -627,6 +747,12 @@ public class RunIncompleteDetails : IJsonModel, IPersistab } public class RunModificationOptions : IJsonModel, IPersistableModel { public IDictionary Metadata { get; set; } + protected virtual RunModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunModificationOptions(ClientResult result); + public static implicit operator BinaryContent(RunModificationOptions runModificationOptions); + protected virtual RunModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -650,7 +776,6 @@ public class RunModificationOptions : IJsonModel, IPersi public readonly bool Equals(RunStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStatus left, RunStatus right); public static implicit operator RunStatus(string value); @@ -667,12 +792,18 @@ public class RunStep : IJsonModel, IPersistableModel { public DateTimeOffset? FailedAt { get; } public string Id { get; } public RunStepError LastError { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; } public string RunId { get; } public RunStepStatus Status { get; } public string ThreadId { get; } public RunStepType Type { get; } public RunStepTokenUsage Usage { get; } + protected virtual RunStep JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStep(ClientResult result); + public static implicit operator BinaryContent(RunStep runStep); + protected virtual RunStep PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -682,6 +813,12 @@ public class RunStep : IJsonModel, IPersistableModel { public abstract class RunStepCodeInterpreterOutput : IJsonModel, IPersistableModel { public string ImageFileId { get; } public string Logs { get; } + protected virtual RunStepCodeInterpreterOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepCodeInterpreterOutput(ClientResult result); + public static implicit operator BinaryContent(RunStepCodeInterpreterOutput runStepCodeInterpreterOutput); + protected virtual RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepCodeInterpreterOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -703,7 +840,6 @@ public class RunStepCollectionOptions { public readonly bool Equals(RunStepCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right); public static implicit operator RunStepCollectionOrder(string value); @@ -713,6 +849,12 @@ public class RunStepCollectionOptions { public abstract class RunStepDetails : IJsonModel, IPersistableModel { public string CreatedMessageId { get; } public IReadOnlyList ToolCalls { get; } + protected virtual RunStepDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepDetails(ClientResult result); + public static implicit operator BinaryContent(RunStepDetails runStepDetails); + protected virtual RunStepDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -733,6 +875,12 @@ public class RunStepDetailsUpdate : StreamingUpdate { public class RunStepError : IJsonModel, IPersistableModel { public RunStepErrorCode Code { get; } public string Message { get; } + protected virtual RunStepError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepError(ClientResult result); + public static implicit operator BinaryContent(RunStepError runStepError); + protected virtual RunStepError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -748,7 +896,6 @@ public class RunStepError : IJsonModel, IPersistableModel, IPer public string FileId { get; } public string FileName { get; } public float Score { get; } + protected virtual RunStepFileSearchResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepFileSearchResult(ClientResult result); + public static implicit operator BinaryContent(RunStepFileSearchResult runStepFileSearchResult); + protected virtual RunStepFileSearchResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepFileSearchResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepFileSearchResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -777,7 +930,6 @@ public class RunStepFileSearchResult : IJsonModel, IPer public readonly bool Equals(RunStepStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepStatus left, RunStepStatus right); public static implicit operator RunStepStatus(string value); @@ -788,6 +940,12 @@ public class RunStepTokenUsage : IJsonModel, IPersistableMode public int InputTokenCount { get; } public int OutputTokenCount { get; } public int TotalTokenCount { get; } + protected virtual RunStepTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepTokenUsage(ClientResult result); + public static implicit operator BinaryContent(RunStepTokenUsage runStepTokenUsage); + protected virtual RunStepTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -805,6 +963,12 @@ public abstract class RunStepToolCall : IJsonModel, IPersistabl public string FunctionOutput { get; } public string ToolCallId { get; } public RunStepToolCallKind ToolKind { get; } + protected virtual RunStepToolCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunStepToolCall(ClientResult result); + public static implicit operator BinaryContent(RunStepToolCall runStepToolCall); + protected virtual RunStepToolCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunStepToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -826,7 +990,6 @@ public enum RunStepToolCallKind { public readonly bool Equals(RunStepType other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepType left, RunStepType right); public static implicit operator RunStepType(string value); @@ -839,6 +1002,12 @@ public abstract class RunStepUpdateCodeInterpreterOutput : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunStepUpdateCodeInterpreterOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -849,6 +1018,12 @@ public class RunTokenUsage : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -859,6 +1034,12 @@ public class RunTruncationStrategy : IJsonModel, IPersist public static RunTruncationStrategy Auto { get; } public int? LastMessages { get; } public static RunTruncationStrategy CreateLastMessagesStrategy(int lastMessageCount); + protected virtual RunTruncationStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator RunTruncationStrategy(ClientResult result); + public static implicit operator BinaryContent(RunTruncationStrategy runTruncationStrategy); + protected virtual RunTruncationStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); RunTruncationStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); RunTruncationStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -921,6 +1102,12 @@ public class ThreadCreationOptions : IJsonModel, IPersist public IList InitialMessages { get; } public IDictionary Metadata { get; set; } public ToolResources ToolResources { get; set; } + protected virtual ThreadCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ThreadCreationOptions(ClientResult result); + public static implicit operator BinaryContent(ThreadCreationOptions threadCreationOptions); + protected virtual ThreadCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ThreadCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ThreadCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -930,6 +1117,12 @@ public class ThreadCreationOptions : IJsonModel, IPersist public class ThreadDeletionResult : IJsonModel, IPersistableModel { public bool Deleted { get; } public string ThreadId { get; } + protected virtual ThreadDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ThreadDeletionResult(ClientResult result); + public static implicit operator BinaryContent(ThreadDeletionResult threadDeletionResult); + protected virtual ThreadDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ThreadDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ThreadDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -944,16 +1137,22 @@ public class ThreadMessage : IJsonModel, IPersistableModel Attachments { get; } public DateTimeOffset? CompletedAt { get; } - public IReadOnlyList Content { get; } + public IList Content { get; } public DateTimeOffset CreatedAt { get; } public string Id { get; } public DateTimeOffset? IncompleteAt { get; } public MessageFailureDetails IncompleteDetails { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; } public MessageRole Role { get; } public string RunId { get; } public MessageStatus Status { get; } public string ThreadId { get; } + protected virtual ThreadMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ThreadMessage(ClientResult result); + public static implicit operator BinaryContent(ThreadMessage threadMessage); + protected virtual ThreadMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ThreadMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ThreadMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -963,6 +1162,12 @@ public class ThreadMessage : IJsonModel, IPersistableModel, IPersistableModel { public IDictionary Metadata { get; set; } public ToolResources ToolResources { get; set; } + protected virtual ThreadModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ThreadModificationOptions(ClientResult result); + public static implicit operator BinaryContent(ThreadModificationOptions threadModificationOptions); + protected virtual ThreadModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ThreadModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ThreadModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -983,7 +1188,7 @@ public class ThreadRun : IJsonModel, IPersistableModel { public RunError LastError { get; } public int? MaxInputTokenCount { get; } public int? MaxOutputTokenCount { get; } - public IReadOnlyDictionary Metadata { get; } + public IDictionary Metadata { get; } public string Model { get; } public float? NucleusSamplingFactor { get; } public IReadOnlyList RequiredActions { get; } @@ -993,9 +1198,15 @@ public class ThreadRun : IJsonModel, IPersistableModel { public float? Temperature { get; } public string ThreadId { get; } public ToolConstraint ToolConstraint { get; } - public IReadOnlyList Tools { get; } + public IList Tools { get; } public RunTruncationStrategy TruncationStrategy { get; } public RunTokenUsage Usage { get; } + protected virtual ThreadRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ThreadRun(ClientResult result); + public static implicit operator BinaryContent(ThreadRun threadRun); + protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1013,6 +1224,12 @@ public class ToolConstraint : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ToolConstraint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1020,11 +1237,16 @@ public class ToolConstraint : IJsonModel, IPersistableModel.Write(ModelReaderWriterOptions options); } public abstract class ToolDefinition : IJsonModel, IPersistableModel { - protected ToolDefinition(); protected ToolDefinition(string type); public static CodeInterpreterToolDefinition CreateCodeInterpreter(); public static FileSearchToolDefinition CreateFileSearch(int? maxResults = null); public static FunctionToolDefinition CreateFunction(string name, string description = null, BinaryData parameters = null, bool? strictParameterSchemaEnabled = null); + protected virtual ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ToolDefinition(ClientResult result); + public static implicit operator BinaryContent(ToolDefinition toolDefinition); + protected virtual ToolDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1036,6 +1258,12 @@ public class ToolOutput : IJsonModel, IPersistableModel public ToolOutput(string toolCallId, string output); public string Output { get; set; } public string ToolCallId { get; set; } + protected virtual ToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ToolOutput(ClientResult result); + public static implicit operator BinaryContent(ToolOutput toolOutput); + protected virtual ToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ToolOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ToolOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1045,6 +1273,12 @@ public class ToolOutput : IJsonModel, IPersistableModel public class ToolResources : IJsonModel, IPersistableModel { public CodeInterpreterToolResources CodeInterpreter { get; set; } public FileSearchToolResources FileSearch { get; set; } + protected virtual ToolResources JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ToolResources(ClientResult result); + public static implicit operator BinaryContent(ToolResources toolResources); + protected virtual ToolResources PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ToolResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ToolResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1058,6 +1292,12 @@ public class VectorStoreCreationHelper : IJsonModel, public FileChunkingStrategy ChunkingStrategy { get; set; } public IList FileIds { get; } public IDictionary Metadata { get; } + protected virtual VectorStoreCreationHelper JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreCreationHelper(ClientResult result); + public static implicit operator BinaryContent(VectorStoreCreationHelper vectorStoreCreationHelper); + protected virtual VectorStoreCreationHelper PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreCreationHelper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreCreationHelper IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1106,6 +1346,12 @@ public class AudioTranscription : IJsonModel, IPersistableMo public IReadOnlyList Segments { get; } public string Text { get; } public IReadOnlyList Words { get; } + protected virtual AudioTranscription JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AudioTranscription(ClientResult result); + public static implicit operator BinaryContent(AudioTranscription audioTranscription); + protected virtual AudioTranscription PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AudioTranscription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AudioTranscription IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1125,7 +1371,6 @@ public class AudioTranscription : IJsonModel, IPersistableMo public readonly bool Equals(AudioTranscriptionFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AudioTranscriptionFormat left, AudioTranscriptionFormat right); public static implicit operator AudioTranscriptionFormat(string value); @@ -1138,6 +1383,12 @@ public class AudioTranscriptionOptions : IJsonModel, public AudioTranscriptionFormat? ResponseFormat { get; set; } public float? Temperature { get; set; } public AudioTimestampGranularities TimestampGranularities { get; set; } + protected virtual AudioTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AudioTranscriptionOptions(ClientResult result); + public static implicit operator BinaryContent(AudioTranscriptionOptions audioTranscriptionOptions); + protected virtual AudioTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AudioTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AudioTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1147,8 +1398,14 @@ public class AudioTranscriptionOptions : IJsonModel, public class AudioTranslation : IJsonModel, IPersistableModel { public TimeSpan? Duration { get; } public string Language { get; } - public IReadOnlyList Segments { get; } + public IList Segments { get; } public string Text { get; } + protected virtual AudioTranslation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AudioTranslation(ClientResult result); + public static implicit operator BinaryContent(AudioTranslation audioTranslation); + protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AudioTranslation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AudioTranslation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1168,7 +1425,6 @@ public class AudioTranslation : IJsonModel, IPersistableModel< public readonly bool Equals(AudioTranslationFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right); public static implicit operator AudioTranslationFormat(string value); @@ -1179,6 +1435,12 @@ public class AudioTranslationOptions : IJsonModel, IPer public string Prompt { get; set; } public AudioTranslationFormat? ResponseFormat { get; set; } public float? Temperature { get; set; } + protected virtual AudioTranslationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator AudioTranslationOptions(ClientResult result); + public static implicit operator BinaryContent(AudioTranslationOptions audioTranslationOptions); + protected virtual AudioTranslationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AudioTranslationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AudioTranslationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1198,7 +1460,6 @@ public class AudioTranslationOptions : IJsonModel, IPer public readonly bool Equals(GeneratedSpeechFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right); public static implicit operator GeneratedSpeechFormat(string value); @@ -1218,7 +1479,6 @@ public class AudioTranslationOptions : IJsonModel, IPer public readonly bool Equals(GeneratedSpeechVoice other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(GeneratedSpeechVoice left, GeneratedSpeechVoice right); public static implicit operator GeneratedSpeechVoice(string value); @@ -1234,6 +1494,12 @@ public static class OpenAIAudioModelFactory { public class SpeechGenerationOptions : IJsonModel, IPersistableModel { public GeneratedSpeechFormat? ResponseFormat { get; set; } public float? SpeedRatio { get; set; } + protected virtual SpeechGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator SpeechGenerationOptions(ClientResult result); + public static implicit operator BinaryContent(SpeechGenerationOptions speechGenerationOptions); + protected virtual SpeechGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); SpeechGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); SpeechGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1253,6 +1519,8 @@ public class SpeechGenerationOptions : IJsonModel, IPer public float Temperature { get; } public string Text { get; } public ReadOnlyMemory TokenIds { get; } + public static explicit operator TranscribedSegment(ClientResult result); + public static implicit operator BinaryContent(TranscribedSegment transcribedSegment); readonly TranscribedSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); readonly void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); readonly object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); @@ -1270,6 +1538,8 @@ public class SpeechGenerationOptions : IJsonModel, IPer public TimeSpan EndTime { get; } public TimeSpan StartTime { get; } public string Word { get; } + public static explicit operator TranscribedWord(ClientResult result); + public static implicit operator BinaryContent(TranscribedWord transcribedWord); readonly TranscribedWord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); readonly void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); readonly object IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); @@ -1322,6 +1592,12 @@ public class AssistantChatMessage : ChatMessage, IJsonModel ToolCalls { get; } + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator AssistantChatMessage(ClientResult result); + public static implicit operator BinaryContent(AssistantChatMessage assistantChatMessage); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); AssistantChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); AssistantChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1363,6 +1639,12 @@ public class ChatCompletion : IJsonModel, IPersistableModel ToolCalls { get; } public ChatTokenUsage Usage { get; } + protected virtual ChatCompletion JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatCompletion(ClientResult result); + public static implicit operator BinaryContent(ChatCompletion chatCompletion); + protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatCompletion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatCompletion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1391,6 +1673,12 @@ public class ChatCompletionOptions : IJsonModel, IPersist public IList Tools { get; } public int? TopLogProbabilityCount { get; set; } public float? TopP { get; set; } + protected virtual ChatCompletionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatCompletionOptions(ClientResult result); + public static implicit operator BinaryContent(ChatCompletionOptions chatCompletionOptions); + protected virtual ChatCompletionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatCompletionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatCompletionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1410,6 +1698,12 @@ public class ChatFunction : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatFunction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1421,6 +1715,12 @@ public class ChatFunctionCall : IJsonModel, IPersistableModel< public ChatFunctionCall(string functionName, BinaryData functionArguments); public BinaryData FunctionArguments { get; } public string FunctionName { get; } + protected virtual ChatFunctionCall JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatFunctionCall(ClientResult result); + public static implicit operator BinaryContent(ChatFunctionCall chatFunctionCall); + protected virtual ChatFunctionCall PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatFunctionCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatFunctionCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1432,6 +1732,12 @@ public class ChatFunctionChoice : IJsonModel, IPersistableMo public static ChatFunctionChoice CreateAutoChoice(); public static ChatFunctionChoice CreateNamedChoice(string functionName); public static ChatFunctionChoice CreateNoneChoice(); + protected virtual ChatFunctionChoice JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatFunctionChoice(ClientResult result); + public static implicit operator BinaryContent(ChatFunctionChoice chatFunctionChoice); + protected virtual ChatFunctionChoice PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatFunctionChoice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatFunctionChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1448,7 +1754,6 @@ public class ChatFunctionChoice : IJsonModel, IPersistableMo public readonly bool Equals(ChatImageDetailLevel other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ChatImageDetailLevel left, ChatImageDetailLevel right); public static implicit operator ChatImageDetailLevel(string value); @@ -1458,6 +1763,12 @@ public class ChatFunctionChoice : IJsonModel, IPersistableMo public class ChatInputTokenUsageDetails : IJsonModel, IPersistableModel { public int? AudioTokenCount { get; } public int? CachedTokenCount { get; } + protected virtual ChatInputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatInputTokenUsageDetails(ClientResult result); + public static implicit operator BinaryContent(ChatInputTokenUsageDetails chatInputTokenUsageDetails); + protected virtual ChatInputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatInputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1483,7 +1794,13 @@ public class ChatMessage : IJsonModel, IPersistableModel contentParts); public static UserChatMessage CreateUserMessage(string content); + protected virtual ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatMessage(ClientResult result); + public static implicit operator BinaryContent(ChatMessage chatMessage); public static implicit operator ChatMessage(string content); + protected virtual ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1508,7 +1825,13 @@ public class ChatMessageContentPart : IJsonModel, IPersi public static ChatMessageContentPart CreateImagePart(Uri imageUri, ChatImageDetailLevel? imageDetailLevel = null); public static ChatMessageContentPart CreateRefusalPart(string refusal); public static ChatMessageContentPart CreateTextPart(string text); + protected virtual ChatMessageContentPart JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatMessageContentPart(ClientResult result); + public static implicit operator BinaryContent(ChatMessageContentPart chatMessageContentPart); public static implicit operator ChatMessageContentPart(string text); + protected virtual ChatMessageContentPart PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatMessageContentPart IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatMessageContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1530,6 +1853,12 @@ public enum ChatMessageRole { public class ChatOutputTokenUsageDetails : IJsonModel, IPersistableModel { public int? AudioTokenCount { get; } public int ReasoningTokenCount { get; } + protected virtual ChatOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatOutputTokenUsageDetails(ClientResult result); + public static implicit operator BinaryContent(ChatOutputTokenUsageDetails chatOutputTokenUsageDetails); + protected virtual ChatOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1540,6 +1869,12 @@ public class ChatResponseFormat : IJsonModel, IPersistableMo public static ChatResponseFormat CreateJsonObjectFormat(); public static ChatResponseFormat CreateJsonSchemaFormat(string jsonSchemaFormatName, BinaryData jsonSchema, string jsonSchemaFormatDescription = null, bool? jsonSchemaIsStrict = null); public static ChatResponseFormat CreateTextFormat(); + protected virtual ChatResponseFormat JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatResponseFormat(ClientResult result); + public static implicit operator BinaryContent(ChatResponseFormat chatResponseFormat); + protected virtual ChatResponseFormat PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatResponseFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatResponseFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1551,6 +1886,12 @@ public class ChatTokenLogProbabilityDetails : IJsonModel TopLogProbabilities { get; } public ReadOnlyMemory? Utf8Bytes { get; } + protected virtual ChatTokenLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatTokenLogProbabilityDetails(ClientResult result); + public static implicit operator BinaryContent(ChatTokenLogProbabilityDetails chatTokenLogProbabilityDetails); + protected virtual ChatTokenLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatTokenLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatTokenLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1561,6 +1902,12 @@ public class ChatTokenTopLogProbabilityDetails : IJsonModel? Utf8Bytes { get; } + protected virtual ChatTokenTopLogProbabilityDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatTokenTopLogProbabilityDetails(ClientResult result); + public static implicit operator BinaryContent(ChatTokenTopLogProbabilityDetails chatTokenTopLogProbabilityDetails); + protected virtual ChatTokenTopLogProbabilityDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatTokenTopLogProbabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatTokenTopLogProbabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1573,6 +1920,12 @@ public class ChatTokenUsage : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1586,6 +1939,12 @@ public class ChatTool : IJsonModel, IPersistableModel { public bool? FunctionSchemaIsStrict { get; } public ChatToolKind Kind { get; } public static ChatTool CreateFunctionTool(string functionName, string functionDescription = null, BinaryData functionParameters = null, bool? functionSchemaIsStrict = null); + protected virtual ChatTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ChatTool(ClientResult result); + public static implicit operator BinaryContent(ChatTool chatTool); + protected virtual ChatTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ChatTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1598,6 +1957,12 @@ public class ChatToolCall : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1612,6 +1977,12 @@ public class ChatToolChoice : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ChatToolChoice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1624,7 +1995,14 @@ public enum ChatToolKind { [Obsolete("This class is obsolete. Please use ToolChatMessage instead.")] public class FunctionChatMessage : ChatMessage, IJsonModel, IPersistableModel { public FunctionChatMessage(string functionName, string content); + public FunctionChatMessage(string functionName); public string FunctionName { get; } + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator FunctionChatMessage(ClientResult result); + public static implicit operator BinaryContent(FunctionChatMessage functionChatMessage); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FunctionChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FunctionChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1633,7 +2011,6 @@ public class FunctionChatMessage : ChatMessage, IJsonModel, } public static class OpenAIChatModelFactory { public static ChatCompletion ChatCompletion(string id = null, ChatFinishReason finishReason = ChatFinishReason.Stop, ChatMessageContent content = null, string refusal = null, IEnumerable toolCalls = null, ChatMessageRole role = ChatMessageRole.System, ChatFunctionCall functionCall = null, IEnumerable contentTokenLogProbabilities = null, IEnumerable refusalTokenLogProbabilities = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null); - public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int? audioTokenCount = null, int? cachedTokenCount = null); public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = 0, int? audioTokenCount = null); public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory? utf8Bytes = null, IEnumerable topLogProbabilities = null); public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory? utf8Bytes = null); @@ -1658,6 +2035,12 @@ public class StreamingChatCompletionUpdate : IJsonModel ToolCallUpdates { get; } public ChatTokenUsage Usage { get; } + protected virtual StreamingChatCompletionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator StreamingChatCompletionUpdate(ClientResult result); + public static implicit operator BinaryContent(StreamingChatCompletionUpdate streamingChatCompletionUpdate); + protected virtual StreamingChatCompletionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); StreamingChatCompletionUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); StreamingChatCompletionUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1668,6 +2051,12 @@ public class StreamingChatCompletionUpdate : IJsonModel, IPersistableModel { public BinaryData FunctionArgumentsUpdate { get; } public string FunctionName { get; } + protected virtual StreamingChatFunctionCallUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator StreamingChatFunctionCallUpdate(ClientResult result); + public static implicit operator BinaryContent(StreamingChatFunctionCallUpdate streamingChatFunctionCallUpdate); + protected virtual StreamingChatFunctionCallUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); StreamingChatFunctionCallUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); StreamingChatFunctionCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1680,6 +2069,12 @@ public class StreamingChatToolCallUpdate : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); StreamingChatToolCallUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1687,10 +2082,17 @@ public class StreamingChatToolCallUpdate : IJsonModel.Write(ModelReaderWriterOptions options); } public class SystemChatMessage : ChatMessage, IJsonModel, IPersistableModel { + public SystemChatMessage(); public SystemChatMessage(params ChatMessageContentPart[] contentParts); public SystemChatMessage(IEnumerable contentParts); public SystemChatMessage(string content); public string ParticipantName { get; set; } + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator SystemChatMessage(ClientResult result); + public static implicit operator BinaryContent(SystemChatMessage systemChatMessage); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); SystemChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); SystemChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1701,7 +2103,14 @@ public class ToolChatMessage : ChatMessage, IJsonModel, IPersis public ToolChatMessage(string toolCallId, params ChatMessageContentPart[] contentParts); public ToolChatMessage(string toolCallId, IEnumerable contentParts); public ToolChatMessage(string toolCallId, string content); - public string ToolCallId { get; } + public ToolChatMessage(string toolCallId); + public string ToolCallId { get; set; } + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ToolChatMessage(ClientResult result); + public static implicit operator BinaryContent(ToolChatMessage toolChatMessage); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ToolChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ToolChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1709,10 +2118,17 @@ public class ToolChatMessage : ChatMessage, IJsonModel, IPersis BinaryData IPersistableModel.Write(ModelReaderWriterOptions options); } public class UserChatMessage : ChatMessage, IJsonModel, IPersistableModel { + public UserChatMessage(); public UserChatMessage(params ChatMessageContentPart[] contentParts); public UserChatMessage(IEnumerable contentParts); public UserChatMessage(string content); public string ParticipantName { get; set; } + protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator UserChatMessage(ClientResult result); + public static implicit operator BinaryContent(UserChatMessage userChatMessage); + protected override ChatMessage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); UserChatMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); UserChatMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1742,6 +2158,12 @@ public class EmbeddingClient { public class EmbeddingGenerationOptions : IJsonModel, IPersistableModel { public int? Dimensions { get; set; } public string EndUserId { get; set; } + protected virtual EmbeddingGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator EmbeddingGenerationOptions(ClientResult result); + public static implicit operator BinaryContent(EmbeddingGenerationOptions embeddingGenerationOptions); + protected virtual EmbeddingGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); EmbeddingGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); EmbeddingGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1751,6 +2173,12 @@ public class EmbeddingGenerationOptions : IJsonModel public class EmbeddingTokenUsage : IJsonModel, IPersistableModel { public int InputTokenCount { get; } public int TotalTokenCount { get; } + protected virtual EmbeddingTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator EmbeddingTokenUsage(ClientResult result); + public static implicit operator BinaryContent(EmbeddingTokenUsage embeddingTokenUsage); + protected virtual EmbeddingTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); EmbeddingTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); EmbeddingTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1759,6 +2187,12 @@ public class EmbeddingTokenUsage : IJsonModel, IPersistable } public class OpenAIEmbedding : IJsonModel, IPersistableModel { public int Index { get; } + protected virtual OpenAIEmbedding JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator OpenAIEmbedding(ClientResult result); + public static implicit operator BinaryContent(OpenAIEmbedding openAIEmbedding); + protected virtual OpenAIEmbedding PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); OpenAIEmbedding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIEmbedding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1769,6 +2203,12 @@ public class OpenAIEmbedding : IJsonModel, IPersistableModel, IJsonModel, IPersistableModel { public string Model { get; } public EmbeddingTokenUsage Usage { get; } + protected virtual OpenAIEmbeddingCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator OpenAIEmbeddingCollection(ClientResult result); + public static implicit operator BinaryContent(OpenAIEmbeddingCollection openAIEmbeddingCollection); + protected virtual OpenAIEmbeddingCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); OpenAIEmbeddingCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIEmbeddingCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1785,6 +2225,12 @@ namespace OpenAI.Files { public class FileDeletionResult : IJsonModel, IPersistableModel { public bool Deleted { get; } public string FileId { get; } + protected virtual FileDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator FileDeletionResult(ClientResult result); + public static implicit operator BinaryContent(FileDeletionResult fileDeletionResult); + protected virtual FileDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1817,7 +2263,6 @@ public enum FileStatus { public readonly bool Equals(FileUploadPurpose other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right); public static implicit operator FileUploadPurpose(string value); @@ -1834,6 +2279,12 @@ public class OpenAIFile : IJsonModel, IPersistableModel public FileStatus Status { get; } [Obsolete("This property is obsolete. For details on why a fine-tuning training file failed validation, see the `error` field on the fine-tuning job.")] public string StatusDetails { get; } + protected virtual OpenAIFile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator OpenAIFile(ClientResult result); + public static implicit operator BinaryContent(OpenAIFile openAIFile); + protected virtual OpenAIFile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); OpenAIFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1893,6 +2344,12 @@ public class OpenAIFileClient { public virtual Task> UploadFileAsync(string filePath, FileUploadPurpose purpose); } public class OpenAIFileCollection : ObjectModel.ReadOnlyCollection, IJsonModel, IPersistableModel { + protected virtual OpenAIFileCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator OpenAIFileCollection(ClientResult result); + public static implicit operator BinaryContent(OpenAIFileCollection openAIFileCollection); + protected virtual OpenAIFileCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); OpenAIFileCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIFileCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1911,6 +2368,7 @@ public class FineTuningClient { public FineTuningClient(ApiKeyCredential credential, OpenAIClientOptions options); public FineTuningClient(ApiKeyCredential credential); protected internal FineTuningClient(ClientPipeline pipeline, OpenAIClientOptions options); + public FineTuningClient(string apiKey, OpenAIClientOptions options); public FineTuningClient(string apiKey); public ClientPipeline Pipeline { get; } public virtual FineTuningJobOperation CreateFineTuningJob(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); @@ -1944,6 +2402,12 @@ public class GeneratedImage : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); GeneratedImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1952,6 +2416,12 @@ public class GeneratedImage : IJsonModel, IPersistableModel, IJsonModel, IPersistableModel { public DateTimeOffset CreatedAt { get; } + protected virtual GeneratedImageCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator GeneratedImageCollection(ClientResult result); + public static implicit operator BinaryContent(GeneratedImageCollection generatedImageCollection); + protected virtual GeneratedImageCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); GeneratedImageCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); GeneratedImageCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -1967,7 +2437,6 @@ public class GeneratedImageCollection : ObjectModel.ReadOnlyCollection, IPersistableModel< public string EndUserId { get; set; } public GeneratedImageFormat? ResponseFormat { get; set; } public GeneratedImageSize? Size { get; set; } + protected virtual ImageEditOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ImageEditOptions(ClientResult result); + public static implicit operator BinaryContent(ImageEditOptions imageEditOptions); + protected virtual ImageEditOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ImageEditOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ImageEditOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2088,6 +2561,12 @@ public class ImageGenerationOptions : IJsonModel, IPersi public GeneratedImageFormat? ResponseFormat { get; set; } public GeneratedImageSize? Size { get; set; } public GeneratedImageStyle? Style { get; set; } + protected virtual ImageGenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ImageGenerationOptions(ClientResult result); + public static implicit operator BinaryContent(ImageGenerationOptions imageGenerationOptions); + protected virtual ImageGenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ImageGenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ImageGenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2098,6 +2577,12 @@ public class ImageVariationOptions : IJsonModel, IPersist public string EndUserId { get; set; } public GeneratedImageFormat? ResponseFormat { get; set; } public GeneratedImageSize? Size { get; set; } + protected virtual ImageVariationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ImageVariationOptions(ClientResult result); + public static implicit operator BinaryContent(ImageVariationOptions imageVariationOptions); + protected virtual ImageVariationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ImageVariationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ImageVariationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2113,6 +2598,12 @@ namespace OpenAI.Models { public class ModelDeletionResult : IJsonModel, IPersistableModel { public bool Deleted { get; } public string ModelId { get; } + protected virtual ModelDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ModelDeletionResult(ClientResult result); + public static implicit operator BinaryContent(ModelDeletionResult modelDeletionResult); + protected virtual ModelDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ModelDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ModelDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2123,6 +2614,12 @@ public class OpenAIModel : IJsonModel, IPersistableModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2156,6 +2653,12 @@ public class OpenAIModelClient { public virtual Task> GetModelsAsync(CancellationToken cancellationToken = default); } public class OpenAIModelCollection : ObjectModel.ReadOnlyCollection, IJsonModel, IPersistableModel { + protected virtual OpenAIModelCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator OpenAIModelCollection(ClientResult result); + public static implicit operator BinaryContent(OpenAIModelCollection openAIModelCollection); + protected virtual OpenAIModelCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); OpenAIModelCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); OpenAIModelCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2212,6 +2715,12 @@ public class ModerationResult : IJsonModel, IPersistableModel< public ModerationCategory SexualMinors { get; } public ModerationCategory Violence { get; } public ModerationCategory ViolenceGraphic { get; } + protected virtual ModerationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ModerationResult(ClientResult result); + public static implicit operator BinaryContent(ModerationResult moderationResult); + protected virtual ModerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ModerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ModerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2221,6 +2730,12 @@ public class ModerationResult : IJsonModel, IPersistableModel< public class ModerationResultCollection : ObjectModel.ReadOnlyCollection, IJsonModel, IPersistableModel { public string Id { get; } public string Model { get; } + protected virtual ModerationResultCollection JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ModerationResultCollection(ClientResult result); + public static implicit operator BinaryContent(ModerationResultCollection moderationResultCollection); + protected virtual ModerationResultCollection PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ModerationResultCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ModerationResultCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2244,7 +2759,6 @@ namespace OpenAI.RealtimeConversation { public readonly bool Equals(ConversationAudioFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ConversationAudioFormat left, ConversationAudioFormat right); public static implicit operator ConversationAudioFormat(string value); @@ -2263,7 +2777,13 @@ public abstract class ConversationContentPart : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationContentPart IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2281,7 +2801,6 @@ public abstract class ConversationContentPart : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationErrorUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2305,6 +2830,12 @@ public class ConversationFunctionTool : ConversationTool, IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationFunctionTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2312,6 +2843,12 @@ public class ConversationFunctionTool : ConversationTool, IJsonModel.Write(ModelReaderWriterOptions options); } public class ConversationInputAudioClearedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputAudioClearedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputAudioClearedUpdate conversationInputAudioClearedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputAudioClearedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputAudioClearedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2321,6 +2858,12 @@ public class ConversationInputAudioClearedUpdate : ConversationUpdate, IJsonMode public class ConversationInputAudioCommittedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { public string ItemId { get; } public string PreviousItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputAudioCommittedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputAudioCommittedUpdate conversationInputAudioCommittedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputAudioCommittedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputAudioCommittedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2330,6 +2873,12 @@ public class ConversationInputAudioCommittedUpdate : ConversationUpdate, IJsonMo public class ConversationInputSpeechFinishedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { public TimeSpan AudioEndTime { get; } public string ItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputSpeechFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputSpeechFinishedUpdate conversationInputSpeechFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputSpeechFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputSpeechFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2339,6 +2888,12 @@ public class ConversationInputSpeechFinishedUpdate : ConversationUpdate, IJsonMo public class ConversationInputSpeechStartedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { public TimeSpan AudioStartTime { get; } public string ItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputSpeechStartedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputSpeechStartedUpdate conversationInputSpeechStartedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputSpeechStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputSpeechStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2349,6 +2904,12 @@ public class ConversationInputTokenUsageDetails : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2361,6 +2922,12 @@ public class ConversationInputTranscriptionFailedUpdate : ConversationUpdate, IJ public string ErrorMessage { get; } public string ErrorParameterName { get; } public string ItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputTranscriptionFailedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputTranscriptionFailedUpdate conversationInputTranscriptionFailedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputTranscriptionFailedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputTranscriptionFailedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2371,6 +2938,12 @@ public class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate, public int ContentIndex { get; } public string ItemId { get; } public string Transcript { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationInputTranscriptionFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationInputTranscriptionFinishedUpdate conversationInputTranscriptionFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2379,6 +2952,12 @@ public class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate, } public class ConversationInputTranscriptionOptions : IJsonModel, IPersistableModel { public ConversationTranscriptionModel? Model { get; set; } + protected virtual ConversationInputTranscriptionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationInputTranscriptionOptions(ClientResult result); + public static implicit operator BinaryContent(ConversationInputTranscriptionOptions conversationInputTranscriptionOptions); + protected virtual ConversationInputTranscriptionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationInputTranscriptionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationInputTranscriptionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2397,6 +2976,12 @@ public abstract class ConversationItem : IJsonModel, IPersista public static ConversationItem CreateFunctionCallOutput(string callId, string output); public static ConversationItem CreateSystemMessage(IEnumerable contentItems); public static ConversationItem CreateUserMessage(IEnumerable contentItems); + protected virtual ConversationItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationItem(ClientResult result); + public static implicit operator BinaryContent(ConversationItem conversationItem); + protected virtual ConversationItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2412,6 +2997,12 @@ public class ConversationItemCreatedUpdate : ConversationUpdate, IJsonModel MessageContentParts { get; } public ConversationMessageRole? MessageRole { get; } public string PreviousItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemCreatedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemCreatedUpdate conversationItemCreatedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemCreatedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemCreatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2420,6 +3011,12 @@ public class ConversationItemCreatedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { public string ItemId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemDeletedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemDeletedUpdate conversationItemDeletedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemDeletedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemDeletedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2436,7 +3033,6 @@ public class ConversationItemDeletedUpdate : ConversationUpdate, IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemStreamingAudioFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2460,6 +3062,12 @@ public class ConversationItemStreamingAudioTranscriptionFinishedUpdate : Convers public int OutputIndex { get; } public string ResponseId { get; } public string Transcript { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemStreamingAudioTranscriptionFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemStreamingAudioTranscriptionFinishedUpdate conversationItemStreamingAudioTranscriptionFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemStreamingAudioTranscriptionFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemStreamingAudioTranscriptionFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2476,6 +3084,12 @@ public class ConversationItemStreamingFinishedUpdate : ConversationUpdate, IJson public ConversationMessageRole? MessageRole { get; } public int OutputIndex { get; } public string ResponseId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemStreamingFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemStreamingFinishedUpdate conversationItemStreamingFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemStreamingFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemStreamingFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2523,6 +3137,12 @@ public class ConversationItemStreamingStartedUpdate : ConversationUpdate, IJsonM public IReadOnlyList MessageContentParts { get; } public ConversationMessageRole? MessageRole { get; } public string ResponseId { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemStreamingStartedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemStreamingStartedUpdate conversationItemStreamingStartedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemStreamingStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemStreamingStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2535,6 +3155,12 @@ public class ConversationItemStreamingTextFinishedUpdate : ConversationUpdate, I public int OutputIndex { get; } public string ResponseId { get; } public string Text { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationItemStreamingTextFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationItemStreamingTextFinishedUpdate conversationItemStreamingTextFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationItemStreamingTextFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemStreamingTextFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2545,6 +3171,12 @@ public class ConversationItemTruncatedUpdate : ConversationUpdate, IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationItemTruncatedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2574,7 +3206,6 @@ public class ConversationMaxTokensChoice : IJsonModel, IPersistableModel { public int AudioTokens { get; } public int TextTokens { get; } + protected virtual ConversationOutputTokenUsageDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationOutputTokenUsageDetails(ClientResult result); + public static implicit operator BinaryContent(ConversationOutputTokenUsageDetails conversationOutputTokenUsageDetails); + protected virtual ConversationOutputTokenUsageDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationOutputTokenUsageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationOutputTokenUsageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2595,6 +3232,12 @@ public class ConversationRateLimitDetailsItem : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationRateLimitDetailsItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2605,6 +3248,12 @@ public class ConversationRateLimitsUpdate : ConversationUpdate, IJsonModel AllDetails { get; } public ConversationRateLimitDetailsItem RequestDetails { get; } public ConversationRateLimitDetailsItem TokenDetails { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationRateLimitsUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationRateLimitsUpdate conversationRateLimitsUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationRateLimitsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationRateLimitsUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2617,6 +3266,12 @@ public class ConversationResponseFinishedUpdate : ConversationUpdate, IJsonModel public ConversationStatus? Status { get; } public ConversationStatusDetails StatusDetails { get; } public ConversationTokenUsage Usage { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationResponseFinishedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationResponseFinishedUpdate conversationResponseFinishedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationResponseFinishedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationResponseFinishedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2629,6 +3284,12 @@ public class ConversationResponseStartedUpdate : ConversationUpdate, IJsonModel< public ConversationStatus Status { get; } public ConversationStatusDetails StatusDetails { get; } public ConversationTokenUsage Usage { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationResponseStartedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationResponseStartedUpdate conversationResponseStartedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationResponseStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationResponseStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2649,6 +3310,12 @@ public class ConversationSessionConfiguredUpdate : ConversationUpdate, IJsonMode public IReadOnlyList Tools { get; } public ConversationTurnDetectionOptions TurnDetectionOptions { get; } public ConversationVoice Voice { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationSessionConfiguredUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationSessionConfiguredUpdate conversationSessionConfiguredUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationSessionConfiguredUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationSessionConfiguredUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2667,6 +3334,12 @@ public class ConversationSessionOptions : IJsonModel public IList Tools { get; } public ConversationTurnDetectionOptions TurnDetectionOptions { get; set; } public ConversationVoice? Voice { get; set; } + protected virtual ConversationSessionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationSessionOptions(ClientResult result); + public static implicit operator BinaryContent(ConversationSessionOptions conversationSessionOptions); + protected virtual ConversationSessionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationSessionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationSessionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2687,6 +3360,12 @@ public class ConversationSessionStartedUpdate : ConversationUpdate, IJsonModel Tools { get; } public ConversationTurnDetectionOptions TurnDetectionOptions { get; } public ConversationVoice Voice { get; } + protected override ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public new static explicit operator ConversationSessionStartedUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationSessionStartedUpdate conversationSessionStartedUpdate); + protected override ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationSessionStartedUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationSessionStartedUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2705,7 +3384,6 @@ public class ConversationSessionStartedUpdate : ConversationUpdate, IJsonModel, IPersistableModel { public ConversationStatus StatusKind { get; } + protected virtual ConversationStatusDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationStatusDetails(ClientResult result); + public static implicit operator BinaryContent(ConversationStatusDetails conversationStatusDetails); + protected virtual ConversationStatusDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationStatusDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2726,6 +3410,12 @@ public class ConversationTokenUsage : IJsonModel, IPersi public ConversationOutputTokenUsageDetails OutputTokenDetails { get; } public int OutputTokens { get; } public int TotalTokens { get; } + protected virtual ConversationTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationTokenUsage(ClientResult result); + public static implicit operator BinaryContent(ConversationTokenUsage conversationTokenUsage); + protected virtual ConversationTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2735,6 +3425,12 @@ public class ConversationTokenUsage : IJsonModel, IPersi public abstract class ConversationTool : IJsonModel, IPersistableModel { public ConversationToolKind Kind { get; } public static ConversationTool CreateFunctionTool(string name, string description = null, BinaryData parameters = null); + protected virtual ConversationTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationTool(ClientResult result); + public static implicit operator BinaryContent(ConversationTool conversationTool); + protected virtual ConversationTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationTool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationTool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2769,7 +3465,6 @@ public enum ConversationToolChoiceKind { public readonly bool Equals(ConversationToolKind other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ConversationToolKind left, ConversationToolKind right); public static implicit operator ConversationToolKind(string value); @@ -2784,7 +3479,6 @@ public enum ConversationToolChoiceKind { public readonly bool Equals(ConversationTranscriptionModel other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ConversationTranscriptionModel left, ConversationTranscriptionModel right); public static implicit operator ConversationTranscriptionModel(string value); @@ -2799,6 +3493,12 @@ public abstract class ConversationTurnDetectionOptions : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationTurnDetectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2806,10 +3506,15 @@ public abstract class ConversationTurnDetectionOptions : IJsonModel.Write(ModelReaderWriterOptions options); } public abstract class ConversationUpdate : IJsonModel, IPersistableModel { - protected ConversationUpdate(string eventId); public string EventId { get; } public ConversationUpdateKind Kind { get; protected internal set; } public BinaryData GetRawContent(); + protected virtual ConversationUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator ConversationUpdate(ClientResult result); + public static implicit operator BinaryContent(ConversationUpdate conversationUpdate); + protected virtual ConversationUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); ConversationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); ConversationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2857,7 +3562,6 @@ public enum ConversationUpdateKind { public readonly bool Equals(ConversationVoice other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ConversationVoice left, ConversationVoice right); public static implicit operator ConversationVoice(string value); @@ -2869,7 +3573,7 @@ public class RealtimeConversationClient { protected internal RealtimeConversationClient(ClientPipeline pipeline, OpenAIClientOptions options); public RealtimeConversationClient(string model, ApiKeyCredential credential, OpenAIClientOptions options); public RealtimeConversationClient(string model, ApiKeyCredential credential); - public virtual ClientPipeline Pipeline { get; } + public ClientPipeline Pipeline { get; } public event EventHandler OnReceivingCommand { add; remove; } public event EventHandler OnSendingCommand { add; remove; } public RealtimeConversationSession StartConversationSession(CancellationToken cancellationToken = default); @@ -2983,6 +3687,12 @@ public abstract class FileChunkingStrategy : IJsonModel, I public static FileChunkingStrategy Auto { get; } public static FileChunkingStrategy Unknown { get; } public static FileChunkingStrategy CreateStaticStrategy(int maxTokensPerChunk, int overlappingTokenCount); + protected virtual FileChunkingStrategy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator FileChunkingStrategy(ClientResult result); + public static implicit operator BinaryContent(FileChunkingStrategy fileChunkingStrategy); + protected virtual FileChunkingStrategy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileChunkingStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -2992,6 +3702,12 @@ public abstract class FileChunkingStrategy : IJsonModel, I public class FileFromStoreRemovalResult : IJsonModel, IPersistableModel { public string FileId { get; } public bool Removed { get; } + protected virtual FileFromStoreRemovalResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator FileFromStoreRemovalResult(ClientResult result); + public static implicit operator BinaryContent(FileFromStoreRemovalResult fileFromStoreRemovalResult); + protected virtual FileFromStoreRemovalResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); FileFromStoreRemovalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); FileFromStoreRemovalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3002,6 +3718,12 @@ public class StaticFileChunkingStrategy : FileChunkingStrategy, IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); StaticFileChunkingStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3015,10 +3737,16 @@ public class VectorStore : IJsonModel, IPersistableModel Metadata { get; } + public IDictionary Metadata { get; } public string Name { get; } public VectorStoreStatus Status { get; } public int UsageBytes { get; } + protected virtual VectorStore JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStore(ClientResult result); + public static implicit operator BinaryContent(VectorStore vectorStore); + protected virtual VectorStore PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3031,6 +3759,12 @@ public class VectorStoreBatchFileJob : IJsonModel, IPer public VectorStoreFileCounts FileCounts { get; } public VectorStoreBatchFileJobStatus Status { get; } public string VectorStoreId { get; } + protected virtual VectorStoreBatchFileJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreBatchFileJob(ClientResult result); + public static implicit operator BinaryContent(VectorStoreBatchFileJob vectorStoreBatchFileJob); + protected virtual VectorStoreBatchFileJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreBatchFileJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreBatchFileJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3048,7 +3782,6 @@ public class VectorStoreBatchFileJob : IJsonModel, IPer public readonly bool Equals(VectorStoreBatchFileJobStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right); public static implicit operator VectorStoreBatchFileJobStatus(string value); @@ -3083,11 +3816,11 @@ public class VectorStoreClient { public virtual CreateVectorStoreOperation CreateVectorStore(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); [EditorBrowsable(EditorBrowsableState.Never)] public virtual CreateVectorStoreOperation CreateVectorStore(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options = null); + public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options); public virtual Task CreateVectorStoreAsync(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); [EditorBrowsable(EditorBrowsableState.Never)] public virtual Task CreateVectorStoreAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); - public virtual Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options = null); + public virtual Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options); [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult DeleteVectorStore(string vectorStoreId, RequestOptions options); public virtual ClientResult DeleteVectorStore(string vectorStoreId, CancellationToken cancellationToken = default); @@ -3155,7 +3888,6 @@ public class VectorStoreCollectionOptions { public readonly bool Equals(VectorStoreCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right); public static implicit operator VectorStoreCollectionOrder(string value); @@ -3168,6 +3900,12 @@ public class VectorStoreCreationOptions : IJsonModel public IList FileIds { get; } public IDictionary Metadata { get; set; } public string Name { get; set; } + protected virtual VectorStoreCreationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreCreationOptions(ClientResult result); + public static implicit operator BinaryContent(VectorStoreCreationOptions vectorStoreCreationOptions); + protected virtual VectorStoreCreationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreCreationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreCreationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3177,6 +3915,12 @@ public class VectorStoreCreationOptions : IJsonModel public class VectorStoreDeletionResult : IJsonModel, IPersistableModel { public bool Deleted { get; } public string VectorStoreId { get; } + protected virtual VectorStoreDeletionResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreDeletionResult(ClientResult result); + public static implicit operator BinaryContent(VectorStoreDeletionResult vectorStoreDeletionResult); + protected virtual VectorStoreDeletionResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreDeletionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreDeletionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3192,6 +3936,12 @@ public class VectorStoreExpirationPolicy : IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreExpirationPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3206,6 +3956,12 @@ public class VectorStoreFileAssociation : IJsonModel public int Size { get; } public VectorStoreFileAssociationStatus Status { get; } public string VectorStoreId { get; } + protected virtual VectorStoreFileAssociation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreFileAssociation(ClientResult result); + public static implicit operator BinaryContent(VectorStoreFileAssociation vectorStoreFileAssociation); + protected virtual VectorStoreFileAssociation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreFileAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreFileAssociation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3228,7 +3984,6 @@ public class VectorStoreFileAssociationCollectionOptions { public readonly bool Equals(VectorStoreFileAssociationCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right); public static implicit operator VectorStoreFileAssociationCollectionOrder(string value); @@ -3238,6 +3993,12 @@ public class VectorStoreFileAssociationCollectionOptions { public class VectorStoreFileAssociationError : IJsonModel, IPersistableModel { public VectorStoreFileAssociationErrorCode Code { get; } public string Message { get; } + protected virtual VectorStoreFileAssociationError JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreFileAssociationError(ClientResult result); + public static implicit operator BinaryContent(VectorStoreFileAssociationError vectorStoreFileAssociationError); + protected virtual VectorStoreFileAssociationError PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreFileAssociationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreFileAssociationError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3254,7 +4015,6 @@ public class VectorStoreFileAssociationError : IJsonModel, IPersist public int Failed { get; } public int InProgress { get; } public int Total { get; } + protected virtual VectorStoreFileCounts JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreFileCounts(ClientResult result); + public static implicit operator BinaryContent(VectorStoreFileCounts vectorStoreFileCounts); + protected virtual VectorStoreFileCounts PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreFileCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreFileCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); @@ -3291,7 +4057,6 @@ public class VectorStoreFileCounts : IJsonModel, IPersist public readonly bool Equals(VectorStoreFileStatusFilter other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); - [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right); public static implicit operator VectorStoreFileStatusFilter(string value); @@ -3302,6 +4067,12 @@ public class VectorStoreModificationOptions : IJsonModel Metadata { get; set; } public string Name { get; set; } + protected virtual VectorStoreModificationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); + public static explicit operator VectorStoreModificationOptions(ClientResult result); + public static implicit operator BinaryContent(VectorStoreModificationOptions vectorStoreModificationOptions); + protected virtual VectorStoreModificationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options); + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options); VectorStoreModificationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); VectorStoreModificationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options); diff --git a/.dotnet/src/Generated/Models/Assistant.Serialization.cs b/.dotnet/src/Generated/Models/Assistant.Serialization.cs index cf709ad43..00bb5cd22 100644 --- a/.dotnet/src/Generated/Models/Assistant.Serialization.cs +++ b/.dotnet/src/Generated/Models/Assistant.Serialization.cs @@ -82,7 +82,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("instructions"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -104,7 +104,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("toolResources"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -214,9 +214,9 @@ internal static Assistant DeserializeAssistant(JsonElement element, ModelReaderW string description = default; string model = default; string instructions = default; - IList tools = default; + IReadOnlyList tools = default; ToolResources toolResources = default; - IDictionary metadata = default; + IReadOnlyDictionary metadata = default; float? temperature = default; InternalAssistantObjectObject @object = default; AssistantResponseFormat responseFormat = default; diff --git a/.dotnet/src/Generated/Models/Assistant.cs b/.dotnet/src/Generated/Models/Assistant.cs index 5e05db577..91f89ae97 100644 --- a/.dotnet/src/Generated/Models/Assistant.cs +++ b/.dotnet/src/Generated/Models/Assistant.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,7 +12,7 @@ public partial class Assistant { private protected IDictionary _additionalBinaryDataProperties; - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, IDictionary metadata) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions) { Id = id; CreatedAt = createdAt; @@ -20,11 +20,11 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc Description = description; Model = model; Instructions = instructions; - Tools = tools.ToList(); - Metadata = metadata; + Tools = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); } - internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IList tools, ToolResources toolResources, IDictionary metadata, float? temperature, InternalAssistantObjectObject @object, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) + internal Assistant(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, IReadOnlyDictionary metadata, float? temperature, InternalAssistantObjectObject @object, AssistantResponseFormat responseFormat, float? nucleusSamplingFactor, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -54,11 +54,11 @@ internal Assistant(string id, DateTimeOffset createdAt, string name, string desc public string Instructions { get; } - public IList Tools { get; } + public IReadOnlyList Tools { get; } public ToolResources ToolResources { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public float? Temperature { get; } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 765840460..3479ee000 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -1045,7 +1045,7 @@ public static AssistantCreationOptions AssistantCreationOptions(string name = de additionalBinaryDataProperties: null); } - public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) + public static Assistant Assistant(string id = default, DateTimeOffset createdAt = default, string name = default, string description = default, string model = default, string instructions = default, IEnumerable tools = default, ToolResources toolResources = default, IReadOnlyDictionary metadata = default, float? temperature = default, InternalAssistantObjectObject @object = default, AssistantResponseFormat responseFormat = default, float? nucleusSamplingFactor = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index bf851e43c..126b1e86b 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -2939,6 +2939,7 @@ components: description: A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. x-oaiExpandable: true default: [] + readOnly: true tool_resources: type: object properties: @@ -2963,6 +2964,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. x-oaiTypeLabel: map + readOnly: true temperature: type: number format: float diff --git a/.typespec/assistants/client.tsp b/.typespec/assistants/client.tsp index eed0bd226..75135a2aa 100644 --- a/.typespec/assistants/client.tsp +++ b/.typespec/assistants/client.tsp @@ -14,3 +14,5 @@ using OpenAI; @@visibility(ListAssistantsResponse.data, "read"); @@visibility(ListRunStepsResponse.data, "read"); @@visibility(ListRunsResponse.data, "read"); +@@visibility(AssistantObject.tools, "read"); +@@visibility(AssistantObject.metadata, "read"); From 77674add8380caf23fc9b6f7d2d2229dc49800db Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 6 Nov 2024 14:10:14 -0800 Subject: [PATCH 42/54] regen --- ...ealtimeRequestMessageItem.Serialization.cs | 44 +++++-------------- .../src/OpenAI.Library.Plugin.csproj | 2 +- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs index c831ff72d..96ba365cf 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.Serialization.cs @@ -5,9 +5,9 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using OpenAI; +using OpenAI.Models; namespace OpenAI.RealtimeConversation { @@ -63,43 +63,19 @@ internal static InternalRealtimeRequestMessageItem DeserializeInternalRealtimeRe { return null; } - ConversationMessageRole role = default; - ConversationItemStatus? status = default; - InternalRealtimeItemType @type = default; - string id = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) + if (element.TryGetProperty("role"u8, out JsonElement discriminator)) { - if (prop.NameEquals("role"u8)) + switch (discriminator.GetString()) { - role = new ConversationMessageRole(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("status"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConversationItemStatus(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } - if (true) - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + case "system": + return InternalRealtimeRequestSystemMessageItem.DeserializeInternalRealtimeRequestSystemMessageItem(element, options); + case "user": + return InternalRealtimeRequestUserMessageItem.DeserializeInternalRealtimeRequestUserMessageItem(element, options); + case "assistant": + return InternalRealtimeRequestAssistantMessageItem.DeserializeInternalRealtimeRequestAssistantMessageItem(element, options); } } - return new InternalRealtimeRequestMessageItem(role, status, @type, id, additionalBinaryDataProperties); + return UnknownRealtimeRequestMessageItem.DeserializeUnknownRealtimeRequestMessageItem(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 6ee9e8ba2..b801c1ea2 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 70ba7682182f6b9bb6c02e5096b65acf1d441d70 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 6 Nov 2024 21:42:17 -0800 Subject: [PATCH 43/54] regen --- .../Assistants/MessageCreationAttachment.cs | 14 ++++++++++++ .dotnet/src/Custom/Chat/ToolChatMessage.cs | 3 +++ .../src/Generated/Models/FineTuningOptions.cs | 4 ++-- .../Models/InternalAddUploadPartRequest.cs | 2 +- ...ternalAssistantResponseFormatJsonSchema.cs | 2 +- ...nternalChatCompletionFunctionCallOption.cs | 2 +- .../InternalChatCompletionNamedToolChoice.cs | 2 +- ...alChatCompletionNamedToolChoiceFunction.cs | 2 +- ...ompletionRequestMessageContentPartImage.cs | 2 +- ...pletionRequestMessageContentPartRefusal.cs | 2 +- ...CompletionRequestMessageContentPartText.cs | 2 +- .../InternalChatResponseFormatJsonSchema.cs | 2 +- .../Models/InternalCreateCompletionRequest.cs | 4 ++-- .../InternalCreateModerationRequestInput2.cs | 2 +- .../InternalCreateModerationRequestInput3.cs | 2 +- ...nalCreateModerationRequestInputImageUrl.cs | 2 +- .../InternalCreateThreadAndRunRequest.cs | 2 +- .../Models/InternalCreateUploadRequest.cs | 8 +++---- .../InternalCreateVectorStoreFileRequest.cs | 2 +- ...altimeClientEventConversationItemCreate.cs | 2 +- ...altimeClientEventConversationItemDelete.cs | 2 +- ...timeClientEventConversationItemTruncate.cs | 6 ++--- ...altimeClientEventInputAudioBufferAppend.cs | 2 +- ...ternalRealtimeClientEventResponseCreate.cs | 2 +- ...nternalRealtimeClientEventSessionUpdate.cs | 2 +- ...InternalRealtimeRequestFunctionCallItem.cs | 6 ++--- ...alRealtimeRequestFunctionCallOutputItem.cs | 4 ++-- ...ernalStaticChunkingStrategyRequestParam.cs | 2 +- ...MessageCreationAttachment.Serialization.cs | 22 +++++++++---------- .../Models/MessageCreationAttachment.cs | 17 ++------------ .../src/Generated/Models/ToolChatMessage.cs | 2 -- .../Models/WeightsAndBiasesIntegration.cs | 2 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 4 ++-- .../src/OpenAI.Library.Plugin.csproj | 2 +- 34 files changed, 70 insertions(+), 68 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs index 602a51675..736436f12 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs @@ -1,15 +1,26 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json; namespace OpenAI.Assistants; [Experimental("OPENAI001")] [CodeGenModel("CreateMessageRequestAttachment")] +[CodeGenSuppress(nameof(MessageCreationAttachment), typeof(IEnumerable), typeof(string))] [CodeGenSerialization(nameof(Tools), "tools", SerializationValueHook = nameof(SerializeTools), DeserializationValueHook = nameof(DeserializeTools))] public partial class MessageCreationAttachment { + public MessageCreationAttachment(string fileId, IEnumerable tools) + { + Argument.AssertNotNull(fileId, nameof(fileId)); + Argument.AssertNotNull(tools, nameof(tools)); + + FileId = fileId; + Tools = tools.ToList(); + } + /// /// The tools to which the attachment applies to. /// @@ -25,6 +36,9 @@ public partial class MessageCreationAttachment [CodeGenMember("Tools")] public IReadOnlyList Tools { get; } = new ChangeTrackingList(); + // Custom: Backcompat for new generator - Add setter. + public string FileId { get; set; } + private void SerializeTools(Utf8JsonWriter writer, ModelReaderWriterOptions options) => writer.WriteObjectValue(Tools, options); diff --git a/.dotnet/src/Custom/Chat/ToolChatMessage.cs b/.dotnet/src/Custom/Chat/ToolChatMessage.cs index 879f88617..526a97830 100644 --- a/.dotnet/src/Custom/Chat/ToolChatMessage.cs +++ b/.dotnet/src/Custom/Chat/ToolChatMessage.cs @@ -76,4 +76,7 @@ public ToolChatMessage(string toolCallId, string content) ToolCallId = toolCallId; } + + // Custom: Backcompat for new generator - Add setter. + public string ToolCallId { get; set; } } diff --git a/.dotnet/src/Generated/Models/FineTuningOptions.cs b/.dotnet/src/Generated/Models/FineTuningOptions.cs index bcc984ad3..1fece15c9 100644 --- a/.dotnet/src/Generated/Models/FineTuningOptions.cs +++ b/.dotnet/src/Generated/Models/FineTuningOptions.cs @@ -33,9 +33,9 @@ internal FineTuningOptions(InternalCreateFineTuningJobRequestModel model, string _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalCreateFineTuningJobRequestModel Model { get; set; } + public InternalCreateFineTuningJobRequestModel Model { get; } - public string TrainingFile { get; set; } + public string TrainingFile { get; } public HyperparameterOptions Hyperparameters { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs index f01d39499..15e1c9f4b 100644 --- a/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs +++ b/.dotnet/src/Generated/Models/InternalAddUploadPartRequest.cs @@ -25,7 +25,7 @@ internal InternalAddUploadPartRequest(BinaryData data, IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs index b67f33215..e9cdd7f50 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs @@ -23,6 +23,6 @@ internal InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSch JsonSchema = jsonSchema; } - public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } + public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs index 6194529f7..bcc0e449d 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionFunctionCallOption.cs @@ -25,7 +25,7 @@ internal InternalChatCompletionFunctionCallOption(string name, IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs index f6ec2f2ef..31efb2d80 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoice.cs @@ -28,7 +28,7 @@ internal InternalChatCompletionNamedToolChoice(InternalChatCompletionNamedToolCh public InternalChatCompletionNamedToolChoiceType Type { get; } = "function"; - public InternalChatCompletionNamedToolChoiceFunction Function { get; set; } + public InternalChatCompletionNamedToolChoiceFunction Function { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs index 0ab03ba5c..c810baf52 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceFunction.cs @@ -25,7 +25,7 @@ internal InternalChatCompletionNamedToolChoiceFunction(string name, IDictionary< _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Name { get; set; } + public string Name { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs index 77344cb3b..2b8d104c8 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImage.cs @@ -28,7 +28,7 @@ internal InternalChatCompletionRequestMessageContentPartImage(InternalChatComple public InternalChatCompletionRequestMessageContentPartImageType Type { get; } = "image_url"; - public InternalChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; set; } + public InternalChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs index cb5ee11a5..458939ce0 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusal.cs @@ -28,7 +28,7 @@ internal InternalChatCompletionRequestMessageContentPartRefusal(InternalChatComp public InternalChatCompletionRequestMessageContentPartRefusalType Type { get; } = "refusal"; - public string Refusal { get; set; } + public string Refusal { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs index ff6a36bc4..e97d6a9c4 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartText.cs @@ -28,7 +28,7 @@ internal InternalChatCompletionRequestMessageContentPartText(InternalChatComplet public InternalChatCompletionRequestMessageContentPartTextType Type { get; } = "text"; - public string Text { get; set; } + public string Text { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs index 8f2ec2c21..6db52e1ff 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs @@ -23,6 +23,6 @@ internal InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJs JsonSchema = jsonSchema; } - public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } + public InternalResponseFormatJsonSchemaJsonSchema JsonSchema { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs index fc629f75b..ed74588e9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequest.cs @@ -43,9 +43,9 @@ internal InternalCreateCompletionRequest(InternalCreateCompletionRequestModel mo _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public InternalCreateCompletionRequestModel Model { get; set; } + public InternalCreateCompletionRequestModel Model { get; } - public BinaryData Prompt { get; set; } + public BinaryData Prompt { get; } public int? BestOf { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs index 23f83ad9f..8048b07c6 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2.cs @@ -28,7 +28,7 @@ internal InternalCreateModerationRequestInput2(InternalCreateModerationRequestIn public InternalCreateModerationRequestInput2Type Type { get; } = "image_url"; - public InternalCreateModerationRequestInputImageUrl ImageUrl { get; set; } + public InternalCreateModerationRequestInputImageUrl ImageUrl { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs index 8a64e8ab7..7c3522c33 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3.cs @@ -28,7 +28,7 @@ internal InternalCreateModerationRequestInput3(InternalCreateModerationRequestIn public InternalCreateModerationRequestInput3Type Type { get; } = "text"; - public string Text { get; set; } + public string Text { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs index f293e9b84..a8abe85aa 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInputImageUrl.cs @@ -25,7 +25,7 @@ internal InternalCreateModerationRequestInputImageUrl(string url, IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs index 29dd02047..77bb26a64 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequest.cs @@ -42,7 +42,7 @@ internal InternalCreateThreadAndRunRequest(string assistantId, ThreadCreationOpt _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string AssistantId { get; set; } + public string AssistantId { get; } public ThreadCreationOptions Thread { get; set; } diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs index 4990d380a..0fc06c1e2 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequest.cs @@ -32,13 +32,13 @@ internal InternalCreateUploadRequest(string filename, InternalCreateUploadReques _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string Filename { get; set; } + public string Filename { get; } - public InternalCreateUploadRequestPurpose Purpose { get; set; } + public InternalCreateUploadRequestPurpose Purpose { get; } - public int Bytes { get; set; } + public int Bytes { get; } - public string MimeType { get; set; } + public string MimeType { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs index f8140bb89..22b73113b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs +++ b/.dotnet/src/Generated/Models/InternalCreateVectorStoreFileRequest.cs @@ -26,7 +26,7 @@ internal InternalCreateVectorStoreFileRequest(string fileId, FileChunkingStrateg _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } + public string FileId { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs index 2ed03ec41..f12ed00b1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs @@ -25,6 +25,6 @@ internal InternalRealtimeClientEventConversationItemCreate(string previousItemId public string PreviousItemId { get; set; } - public ConversationItem Item { get; set; } + public ConversationItem Item { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs index 8da21f72d..595699f04 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs @@ -22,6 +22,6 @@ internal InternalRealtimeClientEventConversationItemDelete(string itemId, Intern ItemId = itemId; } - public string ItemId { get; set; } + public string ItemId { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs index 8cc440629..6b6e4f4b9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs @@ -26,10 +26,10 @@ internal InternalRealtimeClientEventConversationItemTruncate(string itemId, int AudioEndMs = audioEndMs; } - public string ItemId { get; set; } + public string ItemId { get; } - public int ContentIndex { get; set; } + public int ContentIndex { get; } - public int AudioEndMs { get; set; } + public int AudioEndMs { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs index 8218563b6..db65ca564 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs @@ -22,6 +22,6 @@ internal InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio, Int Audio = audio; } - public BinaryData Audio { get; set; } + public BinaryData Audio { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs index e781c886c..c5ab75641 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs @@ -22,6 +22,6 @@ internal InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventRe Response = response; } - public InternalRealtimeClientEventResponseCreateResponse Response { get; set; } + public InternalRealtimeClientEventResponseCreateResponse Response { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs index 8da7f20f5..fc2748420 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs @@ -22,6 +22,6 @@ internal InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions ses Session = session; } - public ConversationSessionOptions Session { get; set; } + public ConversationSessionOptions Session { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs index fff0d51d0..184fd03f5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs @@ -29,11 +29,11 @@ internal InternalRealtimeRequestFunctionCallItem(string name, string callId, str Status = status; } - public string Name { get; set; } + public string Name { get; } - public string CallId { get; set; } + public string CallId { get; } - public string Arguments { get; set; } + public string Arguments { get; } public ConversationItemStatus? Status { get; set; } } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs index f5bca23ae..b365640ef 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs @@ -25,8 +25,8 @@ internal InternalRealtimeRequestFunctionCallOutputItem(string callId, string out Output = output; } - public string CallId { get; set; } + public string CallId { get; } - public string Output { get; set; } + public string Output { get; } } } diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs index c6cf51ad6..218d77081 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs @@ -22,6 +22,6 @@ internal InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrate Static = @static; } - public InternalStaticChunkingStrategyDetails Static { get; set; } + public InternalStaticChunkingStrategyDetails Static { get; } } } diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index cce95c834..c195809fc 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -31,16 +31,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageCreationAttachment)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); this.SerializeTools(writer, options); } + if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) + { + writer.WritePropertyName("file_id"u8); + writer.WriteStringValue(FileId); + } if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -81,19 +81,19 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J { return null; } - string fileId = default; IReadOnlyList tools = default; + string fileId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("file_id"u8)) + if (prop.NameEquals("tools"u8)) { - fileId = prop.Value.GetString(); + DeserializeTools(prop, ref tools); continue; } - if (prop.NameEquals("tools"u8)) + if (prop.NameEquals("file_id"u8)) { - DeserializeTools(prop, ref tools); + fileId = prop.Value.GetString(); continue; } if (true) @@ -101,7 +101,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MessageCreationAttachment(fileId, tools, additionalBinaryDataProperties); + return new MessageCreationAttachment(tools, fileId, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 863d04199..9f878fef5 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -4,8 +4,6 @@ using System; using System.Collections.Generic; -using System.Linq; -using OpenAI; namespace OpenAI.Assistants { @@ -13,24 +11,13 @@ public partial class MessageCreationAttachment { private protected IDictionary _additionalBinaryDataProperties; - public MessageCreationAttachment(string fileId, IEnumerable tools) + internal MessageCreationAttachment(IReadOnlyList tools, string fileId, IDictionary additionalBinaryDataProperties) { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(tools, nameof(tools)); - - FileId = fileId; - Tools = tools.ToList(); - } - - internal MessageCreationAttachment(string fileId, IReadOnlyList tools, IDictionary additionalBinaryDataProperties) - { - FileId = fileId; Tools = tools; + FileId = fileId; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - public string FileId { get; set; } - internal IDictionary SerializedAdditionalRawData { get => _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index 770c820f9..d4ae8191d 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -21,7 +21,5 @@ internal ToolChatMessage(string toolCallId, Chat.ChatMessageRole role, ChatMessa { ToolCallId = toolCallId; } - - public string ToolCallId { get; set; } } } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs index ecbf736d6..f320cdbca 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs @@ -22,6 +22,6 @@ internal WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbInte Wandb = wandb; } - public InternalCreateFineTuningJobRequestWandbIntegrationWandb Wandb { get; set; } + public InternalCreateFineTuningJobRequestWandbIntegrationWandb Wandb { get; } } } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 3479ee000..dfd76dafe 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -168,11 +168,11 @@ public static MessageCreationOptions MessageCreationOptions(IEnumerable tools = default) + public static MessageCreationAttachment MessageCreationAttachment(IEnumerable tools = default, string fileId = default) { tools ??= new ChangeTrackingList(); - return new MessageCreationAttachment(fileId, tools?.ToList(), additionalBinaryDataProperties: null); + return new MessageCreationAttachment(tools?.ToList(), fileId, additionalBinaryDataProperties: null); } public static CodeInterpreterToolDefinition CodeInterpreterToolDefinition() diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index b801c1ea2..55958c5ad 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From c4881032390c7cc2ffec60b3f2a9e4d6e80b27fb Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 09:48:22 -0800 Subject: [PATCH 44/54] more readonly updates --- .dotnet/api/OpenAI.netstandard2.0.cs | 25 +++++++++---------- .../Assistants/MessageCreationAttachment.cs | 3 --- .dotnet/src/Custom/Assistants/ThreadRun.cs | 6 ++--- .../src/Custom/Assistants/ToolDefinition.cs | 5 ++++ .dotnet/src/Custom/Chat/ToolChatMessage.cs | 3 --- .../Models/AudioTranslation.Serialization.cs | 4 +-- .../src/Generated/Models/AudioTranslation.cs | 4 +-- ...MessageCreationAttachment.Serialization.cs | 22 ++++++++-------- .../Models/MessageCreationAttachment.cs | 6 +++-- .../Generated/Models/RunStep.Serialization.cs | 4 +-- .dotnet/src/Generated/Models/RunStep.cs | 9 ++++--- .../Models/ThreadMessage.Serialization.cs | 8 +++--- .dotnet/src/Generated/Models/ThreadMessage.cs | 13 +++++----- .../Models/ThreadRun.Serialization.cs | 8 +++--- .dotnet/src/Generated/Models/ThreadRun.cs | 14 +++++------ .../src/Generated/Models/ToolChatMessage.cs | 2 ++ .../Models/ToolDefinition.Serialization.cs | 4 --- .../Models/VectorStore.Serialization.cs | 4 +-- .dotnet/src/Generated/Models/VectorStore.cs | 9 ++++--- .dotnet/src/Generated/OpenAIModelFactory.cs | 12 ++++----- .openapi3/openapi3-openai.yaml | 7 ++++++ .typespec/audio/client.tsp | 2 ++ .typespec/messages/client.tsp | 3 +++ .typespec/runs/client.tsp | 5 ++++ .typespec/vector-stores/client.tsp | 2 ++ 25 files changed, 102 insertions(+), 82 deletions(-) diff --git a/.dotnet/api/OpenAI.netstandard2.0.cs b/.dotnet/api/OpenAI.netstandard2.0.cs index 0170cf795..1fde0c5a9 100644 --- a/.dotnet/api/OpenAI.netstandard2.0.cs +++ b/.dotnet/api/OpenAI.netstandard2.0.cs @@ -344,7 +344,6 @@ public class AssistantThread : IJsonModel, IPersistableModel.Write(ModelReaderWriterOptions options); } public class CodeInterpreterToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { - public CodeInterpreterToolDefinition() : base(default!); protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); public new static explicit operator CodeInterpreterToolDefinition(ClientResult result); @@ -404,7 +403,6 @@ public class FileSearchRankingOptions : IJsonModel, IP BinaryData IPersistableModel.Write(ModelReaderWriterOptions options); } public class FileSearchToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { - public FileSearchToolDefinition() : base(default!); public int? MaxResults { get; set; } public FileSearchRankingOptions RankingOptions { get; set; } protected override ToolDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); @@ -435,8 +433,8 @@ public class FileSearchToolResources : IJsonModel, IPer BinaryData IPersistableModel.Write(ModelReaderWriterOptions options); } public class FunctionToolDefinition : ToolDefinition, IJsonModel, IPersistableModel { - public FunctionToolDefinition() : base(default!); - public FunctionToolDefinition(string name) : base(default!); + public FunctionToolDefinition(); + public FunctionToolDefinition(string name); public string Description { get; set; } public required string FunctionName { get; set; } public BinaryData Parameters { get; set; } @@ -509,7 +507,7 @@ public class MessageContentUpdate : StreamingUpdate { } public class MessageCreationAttachment : IJsonModel, IPersistableModel { public MessageCreationAttachment(string fileId, IEnumerable tools); - public string FileId { get; set; } + public string FileId { get; } public IReadOnlyList Tools { get; } protected virtual MessageCreationAttachment JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); @@ -792,7 +790,7 @@ public class RunStep : IJsonModel, IPersistableModel { public DateTimeOffset? FailedAt { get; } public string Id { get; } public RunStepError LastError { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public string RunId { get; } public RunStepStatus Status { get; } public string ThreadId { get; } @@ -1137,12 +1135,12 @@ public class ThreadMessage : IJsonModel, IPersistableModel Attachments { get; } public DateTimeOffset? CompletedAt { get; } - public IList Content { get; } + public IReadOnlyList Content { get; } public DateTimeOffset CreatedAt { get; } public string Id { get; } public DateTimeOffset? IncompleteAt { get; } public MessageFailureDetails IncompleteDetails { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public MessageRole Role { get; } public string RunId { get; } public MessageStatus Status { get; } @@ -1188,7 +1186,7 @@ public class ThreadRun : IJsonModel, IPersistableModel { public RunError LastError { get; } public int? MaxInputTokenCount { get; } public int? MaxOutputTokenCount { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public string Model { get; } public float? NucleusSamplingFactor { get; } public IReadOnlyList RequiredActions { get; } @@ -1198,7 +1196,7 @@ public class ThreadRun : IJsonModel, IPersistableModel { public float? Temperature { get; } public string ThreadId { get; } public ToolConstraint ToolConstraint { get; } - public IList Tools { get; } + public IReadOnlyList Tools { get; } public RunTruncationStrategy TruncationStrategy { get; } public RunTokenUsage Usage { get; } protected virtual ThreadRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); @@ -1237,6 +1235,7 @@ public class ToolConstraint : IJsonModel, IPersistableModel.Write(ModelReaderWriterOptions options); } public abstract class ToolDefinition : IJsonModel, IPersistableModel { + protected ToolDefinition(); protected ToolDefinition(string type); public static CodeInterpreterToolDefinition CreateCodeInterpreter(); public static FileSearchToolDefinition CreateFileSearch(int? maxResults = null); @@ -1398,7 +1397,7 @@ public class AudioTranscriptionOptions : IJsonModel, public class AudioTranslation : IJsonModel, IPersistableModel { public TimeSpan? Duration { get; } public string Language { get; } - public IList Segments { get; } + public IReadOnlyList Segments { get; } public string Text { get; } protected virtual AudioTranslation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); @@ -2104,7 +2103,7 @@ public class ToolChatMessage : ChatMessage, IJsonModel, IPersis public ToolChatMessage(string toolCallId, IEnumerable contentParts); public ToolChatMessage(string toolCallId, string content); public ToolChatMessage(string toolCallId); - public string ToolCallId { get; set; } + public string ToolCallId { get; } protected override ChatMessage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options); protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); public new static explicit operator ToolChatMessage(ClientResult result); @@ -3737,7 +3736,7 @@ public class VectorStore : IJsonModel, IPersistableModel Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public string Name { get; } public VectorStoreStatus Status { get; } public int UsageBytes { get; } diff --git a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs index 736436f12..bbc1b1a0d 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs @@ -36,9 +36,6 @@ public MessageCreationAttachment(string fileId, IEnumerable tool [CodeGenMember("Tools")] public IReadOnlyList Tools { get; } = new ChangeTrackingList(); - // Custom: Backcompat for new generator - Add setter. - public string FileId { get; set; } - private void SerializeTools(Utf8JsonWriter writer, ModelReaderWriterOptions options) => writer.WriteObjectValue(Tools, options); diff --git a/.dotnet/src/Custom/Assistants/ThreadRun.cs b/.dotnet/src/Custom/Assistants/ThreadRun.cs index bdd8bc195..6b7c41d51 100644 --- a/.dotnet/src/Custom/Assistants/ThreadRun.cs +++ b/.dotnet/src/Custom/Assistants/ThreadRun.cs @@ -23,7 +23,7 @@ public partial class ThreadRun internal readonly InternalRunRequiredAction _internalRequiredAction; // CUSTOM: Removed null check for `toolConstraint` and `responseFormat`. - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IReadOnlyDictionary metadata, RunTokenUsage usage, int? maxInputTokenCount, int? maxOutputTokenCount, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, bool? allowParallelToolCalls, AssistantResponseFormat responseFormat) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(threadId, nameof(threadId)); @@ -66,7 +66,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string /// is the abstract base type for all required actions. Its /// concrete type can be one of: /// - /// + /// /// /// public IReadOnlyList RequiredActions => _internalRequiredAction?.SubmitToolOutputs?.ToolCalls ?? []; @@ -87,7 +87,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string public float? NucleusSamplingFactor { get; } /// - /// Whether parallel function calling is enabled during tool use for the thread. + /// Whether parallel function calling is enabled during tool use for the thread. /// /// /// Assumed true if not otherwise specified. diff --git a/.dotnet/src/Custom/Assistants/ToolDefinition.cs b/.dotnet/src/Custom/Assistants/ToolDefinition.cs index cca50418d..020c861bd 100644 --- a/.dotnet/src/Custom/Assistants/ToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/ToolDefinition.cs @@ -28,4 +28,9 @@ protected ToolDefinition(string type) { Type = type; } + + // Backcompat with the old codegen. + protected ToolDefinition() + { + } } diff --git a/.dotnet/src/Custom/Chat/ToolChatMessage.cs b/.dotnet/src/Custom/Chat/ToolChatMessage.cs index 526a97830..879f88617 100644 --- a/.dotnet/src/Custom/Chat/ToolChatMessage.cs +++ b/.dotnet/src/Custom/Chat/ToolChatMessage.cs @@ -76,7 +76,4 @@ public ToolChatMessage(string toolCallId, string content) ToolCallId = toolCallId; } - - // Custom: Backcompat for new generator - Add setter. - public string ToolCallId { get; set; } } diff --git a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs index cc0d8e20a..425466132 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } - if (Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) + if (true && Optional.IsCollectionDefined(Segments) && _additionalBinaryDataProperties?.ContainsKey("segments") != true) { writer.WritePropertyName("segments"u8); writer.WriteStartArray(); @@ -103,7 +103,7 @@ internal static AudioTranslation DeserializeAudioTranslation(JsonElement element } string language = default; string text = default; - IList segments = default; + IReadOnlyList segments = default; InternalCreateTranslationResponseVerboseJsonTask task = default; TimeSpan? duration = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); diff --git a/.dotnet/src/Generated/Models/AudioTranslation.cs b/.dotnet/src/Generated/Models/AudioTranslation.cs index e98298f05..77f6d43eb 100644 --- a/.dotnet/src/Generated/Models/AudioTranslation.cs +++ b/.dotnet/src/Generated/Models/AudioTranslation.cs @@ -20,7 +20,7 @@ internal AudioTranslation(string language, string text, TimeSpan? duration) Duration = duration; } - internal AudioTranslation(string language, string text, IList segments, InternalCreateTranslationResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) + internal AudioTranslation(string language, string text, IReadOnlyList segments, InternalCreateTranslationResponseVerboseJsonTask task, TimeSpan? duration, IDictionary additionalBinaryDataProperties) { Language = language; Text = text; @@ -34,7 +34,7 @@ internal AudioTranslation(string language, string text, IList Segments { get; } + public IReadOnlyList Segments { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs index c195809fc..cce95c834 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.Serialization.cs @@ -31,16 +31,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { throw new FormatException($"The model {nameof(MessageCreationAttachment)} does not support writing '{format}' format."); } - if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) - { - writer.WritePropertyName("tools"u8); - this.SerializeTools(writer, options); - } if (_additionalBinaryDataProperties?.ContainsKey("file_id") != true) { writer.WritePropertyName("file_id"u8); writer.WriteStringValue(FileId); } + if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) + { + writer.WritePropertyName("tools"u8); + this.SerializeTools(writer, options); + } if (true && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -81,19 +81,19 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J { return null; } - IReadOnlyList tools = default; string fileId = default; + IReadOnlyList tools = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("tools"u8)) + if (prop.NameEquals("file_id"u8)) { - DeserializeTools(prop, ref tools); + fileId = prop.Value.GetString(); continue; } - if (prop.NameEquals("file_id"u8)) + if (prop.NameEquals("tools"u8)) { - fileId = prop.Value.GetString(); + DeserializeTools(prop, ref tools); continue; } if (true) @@ -101,7 +101,7 @@ internal static MessageCreationAttachment DeserializeMessageCreationAttachment(J additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MessageCreationAttachment(tools, fileId, additionalBinaryDataProperties); + return new MessageCreationAttachment(fileId, tools, additionalBinaryDataProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 9f878fef5..57497ee3a 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -11,13 +11,15 @@ public partial class MessageCreationAttachment { private protected IDictionary _additionalBinaryDataProperties; - internal MessageCreationAttachment(IReadOnlyList tools, string fileId, IDictionary additionalBinaryDataProperties) + internal MessageCreationAttachment(string fileId, IReadOnlyList tools, IDictionary additionalBinaryDataProperties) { - Tools = tools; FileId = fileId; + Tools = tools; _additionalBinaryDataProperties = additionalBinaryDataProperties; } + public string FileId { get; } + internal IDictionary SerializedAdditionalRawData { get => _additionalBinaryDataProperties; diff --git a/.dotnet/src/Generated/Models/RunStep.Serialization.cs b/.dotnet/src/Generated/Models/RunStep.Serialization.cs index ac75c11f6..ac685a0fe 100644 --- a/.dotnet/src/Generated/Models/RunStep.Serialization.cs +++ b/.dotnet/src/Generated/Models/RunStep.Serialization.cs @@ -126,7 +126,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("completedAt"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -223,7 +223,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite DateTimeOffset? cancelledAt = default; DateTimeOffset? failedAt = default; DateTimeOffset? completedAt = default; - IDictionary metadata = default; + IReadOnlyDictionary metadata = default; RunStepTokenUsage usage = default; InternalRunStepObjectObject @object = default; RunStepDetails details = default; diff --git a/.dotnet/src/Generated/Models/RunStep.cs b/.dotnet/src/Generated/Models/RunStep.cs index de5d3dd58..fdd06b027 100644 --- a/.dotnet/src/Generated/Models/RunStep.cs +++ b/.dotnet/src/Generated/Models/RunStep.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.Assistants { @@ -11,7 +12,7 @@ public partial class RunStep { private protected IDictionary _additionalBinaryDataProperties; - internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, RunStepDetails details) + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunStepTokenUsage usage, RunStepDetails details) { Id = id; CreatedAt = createdAt; @@ -25,12 +26,12 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string CancelledAt = cancelledAt; FailedAt = failedAt; CompletedAt = completedAt; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Usage = usage; Details = details; } - internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IDictionary metadata, RunStepTokenUsage usage, InternalRunStepObjectObject @object, RunStepDetails details, IDictionary additionalBinaryDataProperties) + internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string threadId, string runId, RunStepType @type, RunStepStatus status, RunStepError lastError, DateTimeOffset? expiredAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, IReadOnlyDictionary metadata, RunStepTokenUsage usage, InternalRunStepObjectObject @object, RunStepDetails details, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -75,7 +76,7 @@ internal RunStep(string id, DateTimeOffset createdAt, string assistantId, string public DateTimeOffset? CompletedAt { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public RunStepTokenUsage Usage { get; } diff --git a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs index 43c4c9931..6e31ee878 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.Serialization.cs @@ -87,7 +87,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("incompleteAt"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("content") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("content") != true) { writer.WritePropertyName("content"u8); writer.WriteStartArray(); @@ -121,7 +121,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("runId"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -218,10 +218,10 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode MessageFailureDetails incompleteDetails = default; DateTimeOffset? completedAt = default; DateTimeOffset? incompleteAt = default; - IList content = default; + IReadOnlyList content = default; string assistantId = default; string runId = default; - IDictionary metadata = default; + IReadOnlyDictionary metadata = default; InternalMessageObjectObject @object = default; Assistants.MessageRole role = default; IReadOnlyList attachments = default; diff --git a/.dotnet/src/Generated/Models/ThreadMessage.cs b/.dotnet/src/Generated/Models/ThreadMessage.cs index 68028a435..b18cc0085 100644 --- a/.dotnet/src/Generated/Models/ThreadMessage.cs +++ b/.dotnet/src/Generated/Models/ThreadMessage.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,7 +13,7 @@ public partial class ThreadMessage { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IEnumerable content, string assistantId, string runId, IDictionary metadata, Assistants.MessageRole role, IEnumerable attachments) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, string assistantId, string runId, Assistants.MessageRole role, IEnumerable attachments) { Id = id; CreatedAt = createdAt; @@ -21,15 +22,15 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes IncompleteDetails = incompleteDetails; CompletedAt = completedAt; IncompleteAt = incompleteAt; - Content = content.ToList(); + Content = new ChangeTrackingList(); AssistantId = assistantId; RunId = runId; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Role = role; Attachments = attachments.ToList(); } - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IList content, string assistantId, string runId, IDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IReadOnlyList attachments, IDictionary additionalBinaryDataProperties) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageFailureDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, IReadOnlyList content, string assistantId, string runId, IReadOnlyDictionary metadata, InternalMessageObjectObject @object, Assistants.MessageRole role, IReadOnlyList attachments, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -62,13 +63,13 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes public DateTimeOffset? IncompleteAt { get; } - public IList Content { get; } + public IReadOnlyList Content { get; } public string AssistantId { get; } public string RunId { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs index 262aa17e6..cce0cb264 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.Serialization.cs @@ -150,7 +150,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("instructions"u8); writer.WriteStringValue(Instructions); } - if (_additionalBinaryDataProperties?.ContainsKey("tools") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("tools") != true) { writer.WritePropertyName("tools"u8); writer.WriteStartArray(); @@ -160,7 +160,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -355,8 +355,8 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW RunIncompleteDetails incompleteDetails = default; string model = default; string instructions = default; - IList tools = default; - IDictionary metadata = default; + IReadOnlyList tools = default; + IReadOnlyDictionary metadata = default; RunTokenUsage usage = default; float? temperature = default; RunTruncationStrategy truncationStrategy = default; diff --git a/.dotnet/src/Generated/Models/ThreadRun.cs b/.dotnet/src/Generated/Models/ThreadRun.cs index 8424a72ed..46d28f1e9 100644 --- a/.dotnet/src/Generated/Models/ThreadRun.cs +++ b/.dotnet/src/Generated/Models/ThreadRun.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -12,7 +12,7 @@ public partial class ThreadRun { private protected IDictionary _additionalBinaryDataProperties; - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable tools, IDictionary metadata, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, RunTokenUsage usage, RunTruncationStrategy truncationStrategy, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction) { Id = id; CreatedAt = createdAt; @@ -28,8 +28,8 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string IncompleteDetails = incompleteDetails; Model = model; Instructions = instructions; - Tools = tools.ToList(); - Metadata = metadata; + Tools = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); Usage = usage; TruncationStrategy = truncationStrategy; ResponseFormat = responseFormat; @@ -40,7 +40,7 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string _internalRequiredAction = internalRequiredAction; } - internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IList tools, IDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction, IDictionary additionalBinaryDataProperties) + internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IReadOnlyList tools, IReadOnlyDictionary metadata, RunTokenUsage usage, float? temperature, RunTruncationStrategy truncationStrategy, InternalRunObjectObject @object, AssistantResponseFormat responseFormat, ToolConstraint toolConstraint, float? nucleusSamplingFactor, bool? allowParallelToolCalls, int? maxInputTokenCount, int? maxOutputTokenCount, InternalRunRequiredAction internalRequiredAction, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -100,9 +100,9 @@ internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string public string Instructions { get; } - public IList Tools { get; } + public IReadOnlyList Tools { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } public RunTokenUsage Usage { get; } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index d4ae8191d..9dca87e65 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -21,5 +21,7 @@ internal ToolChatMessage(string toolCallId, Chat.ChatMessageRole role, ChatMessa { ToolCallId = toolCallId; } + + public string ToolCallId { get; } } } diff --git a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs index 2f13d3c8d..123272c7e 100644 --- a/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolDefinition.Serialization.cs @@ -13,10 +13,6 @@ namespace OpenAI.Assistants [PersistableModelProxy(typeof(UnknownAssistantToolDefinition))] public abstract partial class ToolDefinition : IJsonModel { - internal ToolDefinition() - { - } - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs index 24995fbe7..8779c4de8 100644 --- a/.dotnet/src/Generated/Models/VectorStore.Serialization.cs +++ b/.dotnet/src/Generated/Models/VectorStore.Serialization.cs @@ -85,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("lastActiveAt"u8); } } - if (_additionalBinaryDataProperties?.ContainsKey("metadata") != true) + if (true && _additionalBinaryDataProperties?.ContainsKey("metadata") != true) { if (Metadata != null && Optional.IsCollectionDefined(Metadata)) { @@ -166,7 +166,7 @@ internal static VectorStore DeserializeVectorStore(JsonElement element, ModelRea VectorStores.VectorStoreStatus status = default; DateTimeOffset? expiresAt = default; DateTimeOffset? lastActiveAt = default; - IDictionary metadata = default; + IReadOnlyDictionary metadata = default; InternalVectorStoreObjectObject @object = default; VectorStoreExpirationPolicy expirationPolicy = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); diff --git a/.dotnet/src/Generated/Models/VectorStore.cs b/.dotnet/src/Generated/Models/VectorStore.cs index 046a4e136..b86c907e8 100644 --- a/.dotnet/src/Generated/Models/VectorStore.cs +++ b/.dotnet/src/Generated/Models/VectorStore.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using OpenAI; namespace OpenAI.VectorStores { @@ -11,7 +12,7 @@ public partial class VectorStore { private protected IDictionary _additionalBinaryDataProperties; - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt, IDictionary metadata) + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? lastActiveAt) { Id = id; CreatedAt = createdAt; @@ -20,10 +21,10 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage FileCounts = fileCounts; Status = status; LastActiveAt = lastActiveAt; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); } - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IDictionary metadata, InternalVectorStoreObjectObject @object, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) + internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCounts fileCounts, VectorStores.VectorStoreStatus status, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IReadOnlyDictionary metadata, InternalVectorStoreObjectObject @object, VectorStoreExpirationPolicy expirationPolicy, IDictionary additionalBinaryDataProperties) { Id = id; CreatedAt = createdAt; @@ -55,7 +56,7 @@ internal VectorStore(string id, DateTimeOffset createdAt, string name, int usage public DateTimeOffset? LastActiveAt { get; } - public IDictionary Metadata { get; } + public IReadOnlyDictionary Metadata { get; } internal IDictionary SerializedAdditionalRawData { diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index dfd76dafe..595cfec2a 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -35,7 +35,7 @@ public static OpenAIFile OpenAIFile(string id = default, DateTimeOffset createdA additionalBinaryDataProperties: null); } - public static VectorStore VectorStore(string id = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IDictionary metadata = default, InternalVectorStoreObjectObject @object = default, VectorStoreExpirationPolicy expirationPolicy = default) + public static VectorStore VectorStore(string id = default, DateTimeOffset createdAt = default, string name = default, int usageBytes = default, VectorStoreFileCounts fileCounts = default, VectorStores.VectorStoreStatus status = default, DateTimeOffset? expiresAt = default, DateTimeOffset? lastActiveAt = default, IReadOnlyDictionary metadata = default, InternalVectorStoreObjectObject @object = default, VectorStoreExpirationPolicy expirationPolicy = default) { metadata ??= new ChangeTrackingDictionary(); @@ -168,11 +168,11 @@ public static MessageCreationOptions MessageCreationOptions(IEnumerable tools = default, string fileId = default) + public static MessageCreationAttachment MessageCreationAttachment(string fileId = default, IEnumerable tools = default) { tools ??= new ChangeTrackingList(); - return new MessageCreationAttachment(tools?.ToList(), fileId, additionalBinaryDataProperties: null); + return new MessageCreationAttachment(fileId, tools?.ToList(), additionalBinaryDataProperties: null); } public static CodeInterpreterToolDefinition CodeInterpreterToolDefinition() @@ -233,7 +233,7 @@ public static ToolConstraint ToolConstraint(InternalAssistantsNamedToolChoiceFun return new ToolConstraint(function, objectType, additionalBinaryDataProperties: null); } - public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, InternalRunRequiredAction internalRequiredAction = default) + public static ThreadRun ThreadRun(string id = default, DateTimeOffset createdAt = default, string threadId = default, string assistantId = default, RunStatus status = default, RunError lastError = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, RunIncompleteDetails incompleteDetails = default, string model = default, string instructions = default, IEnumerable tools = default, IReadOnlyDictionary metadata = default, RunTokenUsage usage = default, float? temperature = default, RunTruncationStrategy truncationStrategy = default, InternalRunObjectObject @object = default, AssistantResponseFormat responseFormat = default, ToolConstraint toolConstraint = default, float? nucleusSamplingFactor = default, bool? allowParallelToolCalls = default, int? maxInputTokenCount = default, int? maxOutputTokenCount = default, InternalRunRequiredAction internalRequiredAction = default) { tools ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); @@ -326,7 +326,7 @@ public static ToolOutput ToolOutput(string toolCallId = default, string output = return new ToolOutput(toolCallId, output, additionalBinaryDataProperties: null); } - public static RunStep RunStep(string id = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IDictionary metadata = default, RunStepTokenUsage usage = default, InternalRunStepObjectObject @object = default, RunStepDetails details = default) + public static RunStep RunStep(string id = default, DateTimeOffset createdAt = default, string assistantId = default, string threadId = default, string runId = default, RunStepType @type = default, RunStepStatus status = default, RunStepError lastError = default, DateTimeOffset? expiredAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, DateTimeOffset? completedAt = default, IReadOnlyDictionary metadata = default, RunStepTokenUsage usage = default, InternalRunStepObjectObject @object = default, RunStepDetails details = default) { metadata ??= new ChangeTrackingDictionary(); @@ -717,7 +717,7 @@ public static ModelDeletionResult ModelDeletionResult(bool deleted = default, st return new ModelDeletionResult(deleted, modelId, @object, additionalBinaryDataProperties: null); } - public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default, IEnumerable attachments = default) + public static ThreadMessage ThreadMessage(string id = default, DateTimeOffset createdAt = default, string threadId = default, MessageStatus status = default, MessageFailureDetails incompleteDetails = default, DateTimeOffset? completedAt = default, DateTimeOffset? incompleteAt = default, IEnumerable content = default, string assistantId = default, string runId = default, IReadOnlyDictionary metadata = default, InternalMessageObjectObject @object = default, Assistants.MessageRole role = default, IEnumerable attachments = default) { content ??= new ChangeTrackingList(); metadata ??= new ChangeTrackingDictionary(); diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index 126b1e86b..e61b798f5 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -6652,6 +6652,7 @@ components: items: $ref: '#/components/schemas/TranscriptionSegment' description: Segments of the translated text and their corresponding details. + readOnly: true CreateUploadRequest: type: object required: @@ -8277,6 +8278,7 @@ components: $ref: '#/components/schemas/MessageContent' description: The content of the message in array of text and/or images. x-oaiExpandable: true + readOnly: true assistant_id: type: string nullable: true @@ -8298,6 +8300,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. x-oaiTypeLabel: map + readOnly: true description: Represents a message within a [thread](/docs/api-reference/threads). MessageObjectAttachmentsItem: type: array @@ -10944,6 +10947,7 @@ components: description: The list of tools that the [assistant](/docs/api-reference/assistants) used for this run. x-oaiExpandable: true default: [] + readOnly: true metadata: type: object additionalProperties: @@ -10951,6 +10955,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. x-oaiTypeLabel: map + readOnly: true usage: type: object allOf: @@ -11626,6 +11631,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. x-oaiTypeLabel: map + readOnly: true usage: type: object allOf: @@ -12395,6 +12401,7 @@ components: nullable: true description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. x-oaiTypeLabel: map + readOnly: true description: A vector store is a collection of processed files can be used by the `file_search` tool. securitySchemes: BearerAuth: diff --git a/.typespec/audio/client.tsp b/.typespec/audio/client.tsp index fad4afdc7..47b17848e 100644 --- a/.typespec/audio/client.tsp +++ b/.typespec/audio/client.tsp @@ -6,3 +6,5 @@ using OpenAI; @@visibility(CreateTranscriptionResponseVerboseJson.words, "read"); @@visibility(CreateTranscriptionResponseVerboseJson.segments, "read"); + +@@visibility(CreateTranslationResponseVerboseJson.segments, "read"); diff --git a/.typespec/messages/client.tsp b/.typespec/messages/client.tsp index b46d85d92..5390c0d0b 100644 --- a/.typespec/messages/client.tsp +++ b/.typespec/messages/client.tsp @@ -65,3 +65,6 @@ using OpenAI; @@usage(MessageDeltaContentTextAnnotationsFilePathObject, Usage.output); @@visibility(ListMessagesResponse.data, "read"); + +@@visibility(MessageObject.content, "read"); +@@visibility(MessageObject.metadata, "read"); diff --git a/.typespec/runs/client.tsp b/.typespec/runs/client.tsp index bbc9b40c6..733cac294 100644 --- a/.typespec/runs/client.tsp +++ b/.typespec/runs/client.tsp @@ -36,3 +36,8 @@ using OpenAI; @@access(RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, Access.public); @@usage(RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, Usage.output); + +@@visibility(RunStepObject.metadata, "read"); + +@@visibility(RunObject.metadata, "read"); +@@visibility(RunObject.tools, "read"); diff --git a/.typespec/vector-stores/client.tsp b/.typespec/vector-stores/client.tsp index 956e4c80c..36cd642c6 100644 --- a/.typespec/vector-stores/client.tsp +++ b/.typespec/vector-stores/client.tsp @@ -14,3 +14,5 @@ using OpenAI; @@visibility(ListVectorStoresResponse.data, "read"); @@visibility(ListVectorStoreFilesResponse.data, "read"); + +@@visibility(VectorStoreObject.metadata, "read"); From 421b028f4fd7574f4818999e785b07ae96e2297b Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 11:37:12 -0800 Subject: [PATCH 45/54] Update version and regen --- .dotnet/api/OpenAI.netstandard2.0.cs | 36 +++++++++++++++++++ .../Models/AssistantCollectionOrder.cs | 1 + .../Models/AudioTranscriptionFormat.cs | 1 + .../Models/AudioTranslationFormat.cs | 1 + .../Generated/Models/ChatImageDetailLevel.cs | 1 + .../Models/ConversationAudioFormat.cs | 1 + .../Models/ConversationContentPartKind.cs | 1 + .../Models/ConversationItemStatus.cs | 1 + .../Models/ConversationMessageRole.cs | 1 + .../Generated/Models/ConversationStatus.cs | 1 + .../Generated/Models/ConversationToolKind.cs | 1 + .../Models/ConversationTranscriptionModel.cs | 1 + .../src/Generated/Models/ConversationVoice.cs | 1 + .../src/Generated/Models/FileSearchRanker.cs | 1 + .../src/Generated/Models/FileUploadPurpose.cs | 1 + ...ngJobHyperparametersBatchSizeChoiceEnum.cs | 1 + ...ametersLearningRateMultiplierChoiceEnum.cs | 1 + ...ningJobHyperparametersNEpochsChoiceEnum.cs | 1 + .../Generated/Models/FineTuningJobStatus.cs | 1 + .../Generated/Models/GeneratedImageFormat.cs | 1 + .../Generated/Models/GeneratedImageQuality.cs | 1 + .../Generated/Models/GeneratedImageSize.cs | 1 + .../Generated/Models/GeneratedImageStyle.cs | 1 + .../Generated/Models/GeneratedSpeechFormat.cs | 1 + .../Generated/Models/GeneratedSpeechVoice.cs | 1 + .../Models/HyperparameterBatchSize.cs | 1 + .../Models/HyperparameterCycleCount.cs | 1 + .../Models/HyperparameterLearningRate.cs | 1 + .../Models/InternalAssistantObjectObject.cs | 1 + ...nalAssistantToolsFileSearchTypeOnlyType.cs | 1 + .../InternalAssistantsNamedToolChoiceType.cs | 1 + .../InternalBatchCompletionTimeframe.cs | 1 + .../Models/InternalBatchErrorsObject.cs | 1 + .../Generated/Models/InternalBatchObject.cs | 1 + .../Models/InternalBatchRequestInputMethod.cs | 1 + .../Generated/Models/InternalBatchStatus.cs | 1 + ...lChatCompletionMessageToolCallChunkType.cs | 1 + ...ternalChatCompletionNamedToolChoiceType.cs | 1 + ...etionRequestMessageContentPartImageType.cs | 1 + ...ionRequestMessageContentPartRefusalType.cs | 1 + ...letionRequestMessageContentPartTextType.cs | 1 + ...ternalChatCompletionResponseMessageRole.cs | 1 + ...alChatCompletionStreamResponseDeltaRole.cs | 1 + .../InternalCreateAssistantRequestModel.cs | 1 + .../InternalCreateBatchRequestEndpoint.cs | 1 + ...etionFunctionResponseChoiceFinishReason.cs | 1 + ...ateChatCompletionFunctionResponseObject.cs | 1 + ...nternalCreateChatCompletionRequestModel.cs | 1 + ...lCreateChatCompletionRequestServiceTier.cs | 1 + ...alCreateChatCompletionRequestToolChoice.cs | 1 + ...ernalCreateChatCompletionResponseObject.cs | 1 + ...CreateChatCompletionResponseServiceTier.cs | 1 + ...pletionStreamResponseChoiceFinishReason.cs | 1 + ...reateChatCompletionStreamResponseObject.cs | 1 + ...ChatCompletionStreamResponseServiceTier.cs | 1 + .../InternalCreateCompletionRequestModel.cs | 1 + ...ateCompletionResponseChoiceFinishReason.cs | 1 + .../InternalCreateCompletionResponseObject.cs | 1 + ...nalCreateEmbeddingRequestEncodingFormat.cs | 1 + .../InternalCreateEmbeddingRequestModel.cs | 1 + .../InternalCreateEmbeddingResponseObject.cs | 1 + ...InternalCreateFineTuningJobRequestModel.cs | 1 + .../InternalCreateImageEditRequestModel.cs | 1 + ...nalCreateImageEditRequestResponseFormat.cs | 1 + .../InternalCreateImageEditRequestSize.cs | 1 + .../Models/InternalCreateImageRequestModel.cs | 1 + ...nternalCreateImageVariationRequestModel.cs | 1 + ...eateImageVariationRequestResponseFormat.cs | 1 + ...InternalCreateImageVariationRequestSize.cs | 1 + ...ternalCreateModerationRequestInput2Type.cs | 1 + ...ternalCreateModerationRequestInput3Type.cs | 1 + .../InternalCreateModerationRequestModel.cs | 1 + .../Models/InternalCreateRunRequestModel.cs | 1 + .../InternalCreateSpeechRequestModel.cs | 1 + .../InternalCreateThreadAndRunRequestModel.cs | 1 + ...rnalCreateThreadAndRunRequestToolChoice.cs | 1 + ...InternalCreateTranscriptionRequestModel.cs | 1 + ...nscriptionRequestTimestampGranularities.cs | 1 + ...ateTranscriptionResponseVerboseJsonTask.cs | 1 + .../InternalCreateTranslationRequestModel.cs | 1 + ...reateTranslationResponseVerboseJsonTask.cs | 1 + .../InternalCreateUploadRequestPurpose.cs | 1 + .../InternalDeleteAssistantResponseObject.cs | 1 + .../InternalDeleteFileResponseObject.cs | 1 + .../InternalDeleteMessageResponseObject.cs | 1 + .../InternalDeleteModelResponseObject.cs | 1 + .../InternalDeleteThreadResponseObject.cs | 1 + ...rnalDeleteVectorStoreFileResponseObject.cs | 1 + ...InternalDeleteVectorStoreResponseObject.cs | 1 + .../Models/InternalEmbeddingObject.cs | 1 + .../InternalFineTuningJobCheckpointObject.cs | 1 + .../InternalFineTuningJobEventObject.cs | 1 + .../Models/InternalFineTuningJobObject.cs | 1 + .../InternalListAssistantsResponseObject.cs | 1 + .../InternalListBatchesResponseObject.cs | 1 + ...ListFilesInVectorStoreBatchRequestOrder.cs | 1 + .../Models/InternalListFilesResponseObject.cs | 1 + ...tFineTuningJobCheckpointsResponseObject.cs | 1 + ...alListFineTuningJobEventsResponseObject.cs | 1 + .../InternalListMessagesResponseObject.cs | 1 + .../InternalListModelsResponseObject.cs | 1 + ...stPaginatedFineTuningJobsResponseObject.cs | 1 + .../InternalListRunStepsResponseObject.cs | 1 + .../Models/InternalListRunsResponseObject.cs | 1 + .../InternalListThreadsResponseObject.cs | 1 + ...ernalListVectorStoreFilesResponseObject.cs | 1 + .../InternalListVectorStoresResponseObject.cs | 1 + ...geContentImageFileObjectImageFileDetail.cs | 1 + ...ternalMessageContentImageFileObjectType.cs | 1 + ...sageContentImageUrlObjectImageUrlDetail.cs | 1 + ...nternalMessageContentImageUrlObjectType.cs | 1 + ...InternalMessageContentRefusalObjectType.cs | 1 + .../InternalMessageContentTextObjectType.cs | 1 + ...taContentImageFileObjectImageFileDetail.cs | 1 + ...eltaContentImageUrlObjectImageUrlDetail.cs | 1 + .../InternalMessageDeltaObjectDeltaRole.cs | 1 + .../InternalMessageDeltaObjectObject.cs | 1 + .../Models/InternalMessageObjectObject.cs | 1 + .../Models/InternalMessageObjectRole.cs | 1 + ...rnalMessageRequestContentTextObjectType.cs | 1 + .../Generated/Models/InternalModelObject.cs | 1 + .../Models/InternalOpenAIFileObject.cs | 1 + .../Models/InternalRealtimeClientEventType.cs | 1 + .../Models/InternalRealtimeItemType.cs | 1 + .../InternalRealtimeRequestSessionModality.cs | 1 + .../InternalRealtimeResponseItemObject.cs | 1 + .../Models/InternalRealtimeResponseObject.cs | 1 + .../InternalRealtimeResponseSessionObject.cs | 1 + .../Models/InternalRunObjectObject.cs | 1 + .../InternalRunObjectRequiredActionType.cs | 1 + .../InternalRunStepDeltaObjectObject.cs | 1 + ...llsFileSearchRankingOptionsObjectRanker.cs | 1 + ...lCallsFileSearchResultObjectContentType.cs | 1 + .../Models/InternalRunStepObjectObject.cs | 1 + .../Models/InternalRunToolCallObjectType.cs | 1 + .../Models/InternalThreadObjectObject.cs | 1 + .../Models/InternalTruncationObjectType.cs | 1 + .../Generated/Models/InternalUploadObject.cs | 1 + .../Models/InternalUploadPartObject.cs | 1 + .../Generated/Models/InternalUploadStatus.cs | 1 + ...nternalVectorStoreFileBatchObjectObject.cs | 1 + .../InternalVectorStoreFileObjectObject.cs | 1 + .../Models/InternalVectorStoreObjectObject.cs | 1 + .../Models/MessageCollectionOrder.cs | 1 + .../Generated/Models/MessageFailureReason.cs | 1 + .dotnet/src/Generated/Models/MessageStatus.cs | 1 + .../Generated/Models/RunCollectionOrder.cs | 1 + .dotnet/src/Generated/Models/RunErrorCode.cs | 1 + .../Generated/Models/RunIncompleteReason.cs | 1 + .dotnet/src/Generated/Models/RunStatus.cs | 1 + .../Models/RunStepCollectionOrder.cs | 1 + .../src/Generated/Models/RunStepErrorCode.cs | 1 + .dotnet/src/Generated/Models/RunStepStatus.cs | 1 + .dotnet/src/Generated/Models/RunStepType.cs | 1 + .../Models/VectorStoreBatchFileJobStatus.cs | 1 + .../Models/VectorStoreCollectionOrder.cs | 1 + ...ctorStoreFileAssociationCollectionOrder.cs | 1 + .../VectorStoreFileAssociationErrorCode.cs | 1 + .../Models/VectorStoreFileStatusFilter.cs | 1 + .../src/OpenAI.Library.Plugin.csproj | 2 +- 160 files changed, 195 insertions(+), 1 deletion(-) diff --git a/.dotnet/api/OpenAI.netstandard2.0.cs b/.dotnet/api/OpenAI.netstandard2.0.cs index 1fde0c5a9..c29dee6ec 100644 --- a/.dotnet/api/OpenAI.netstandard2.0.cs +++ b/.dotnet/api/OpenAI.netstandard2.0.cs @@ -225,6 +225,7 @@ public class AssistantCollectionOptions { public readonly bool Equals(AssistantCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right); public static implicit operator AssistantCollectionOrder(string value); @@ -379,6 +380,7 @@ public class CodeInterpreterToolResources : IJsonModel, IPersist public readonly bool Equals(MessageFailureReason other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(MessageFailureReason left, MessageFailureReason right); public static implicit operator MessageFailureReason(string value); @@ -616,6 +620,7 @@ public enum MessageRole { public readonly bool Equals(MessageStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(MessageStatus left, MessageStatus right); public static implicit operator MessageStatus(string value); @@ -650,6 +655,7 @@ public class RunCollectionOptions { public readonly bool Equals(RunCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right); public static implicit operator RunCollectionOrder(string value); @@ -708,6 +714,7 @@ public class RunError : IJsonModel, IPersistableModel { public readonly bool Equals(RunErrorCode other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunErrorCode left, RunErrorCode right); public static implicit operator RunErrorCode(string value); @@ -737,6 +744,7 @@ public class RunIncompleteDetails : IJsonModel, IPersistab public readonly bool Equals(RunIncompleteReason other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunIncompleteReason left, RunIncompleteReason right); public static implicit operator RunIncompleteReason(string value); @@ -774,6 +782,7 @@ public class RunModificationOptions : IJsonModel, IPersi public readonly bool Equals(RunStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStatus left, RunStatus right); public static implicit operator RunStatus(string value); @@ -838,6 +847,7 @@ public class RunStepCollectionOptions { public readonly bool Equals(RunStepCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right); public static implicit operator RunStepCollectionOrder(string value); @@ -894,6 +904,7 @@ public class RunStepError : IJsonModel, IPersistableModel, IPer public readonly bool Equals(RunStepStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepStatus left, RunStepStatus right); public static implicit operator RunStepStatus(string value); @@ -988,6 +1000,7 @@ public enum RunStepToolCallKind { public readonly bool Equals(RunStepType other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(RunStepType left, RunStepType right); public static implicit operator RunStepType(string value); @@ -1370,6 +1383,7 @@ public class AudioTranscription : IJsonModel, IPersistableMo public readonly bool Equals(AudioTranscriptionFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AudioTranscriptionFormat left, AudioTranscriptionFormat right); public static implicit operator AudioTranscriptionFormat(string value); @@ -1424,6 +1438,7 @@ public class AudioTranslation : IJsonModel, IPersistableModel< public readonly bool Equals(AudioTranslationFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right); public static implicit operator AudioTranslationFormat(string value); @@ -1459,6 +1474,7 @@ public class AudioTranslationOptions : IJsonModel, IPer public readonly bool Equals(GeneratedSpeechFormat other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right); public static implicit operator GeneratedSpeechFormat(string value); @@ -1478,6 +1494,7 @@ public class AudioTranslationOptions : IJsonModel, IPer public readonly bool Equals(GeneratedSpeechVoice other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(GeneratedSpeechVoice left, GeneratedSpeechVoice right); public static implicit operator GeneratedSpeechVoice(string value); @@ -1753,6 +1770,7 @@ public class ChatFunctionChoice : IJsonModel, IPersistableMo public readonly bool Equals(ChatImageDetailLevel other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(ChatImageDetailLevel left, ChatImageDetailLevel right); public static implicit operator ChatImageDetailLevel(string value); @@ -2262,6 +2280,7 @@ public enum FileStatus { public readonly bool Equals(FileUploadPurpose other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right); public static implicit operator FileUploadPurpose(string value); @@ -2436,6 +2455,7 @@ public class GeneratedImageCollection : ObjectModel.ReadOnlyCollection, IPer public readonly bool Equals(VectorStoreBatchFileJobStatus other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreBatchFileJobStatus left, VectorStoreBatchFileJobStatus right); public static implicit operator VectorStoreBatchFileJobStatus(string value); @@ -3887,6 +3919,7 @@ public class VectorStoreCollectionOptions { public readonly bool Equals(VectorStoreCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreCollectionOrder left, VectorStoreCollectionOrder right); public static implicit operator VectorStoreCollectionOrder(string value); @@ -3983,6 +4016,7 @@ public class VectorStoreFileAssociationCollectionOptions { public readonly bool Equals(VectorStoreFileAssociationCollectionOrder other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right); public static implicit operator VectorStoreFileAssociationCollectionOrder(string value); @@ -4014,6 +4048,7 @@ public class VectorStoreFileAssociationError : IJsonModel, IPersist public readonly bool Equals(VectorStoreFileStatusFilter other); [EditorBrowsable(EditorBrowsableState.Never)] public override readonly bool Equals(object obj); + [EditorBrowsable(EditorBrowsableState.Never)] public override readonly int GetHashCode(); public static bool operator ==(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right); public static implicit operator VectorStoreFileStatusFilter(string value); diff --git a/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs b/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs index 68d29ef01..41d2f8d50 100644 --- a/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/AssistantCollectionOrder.cs @@ -32,6 +32,7 @@ public AssistantCollectionOrder(string value) public bool Equals(AssistantCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs index 67de01fbb..0c2834261 100644 --- a/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs +++ b/.dotnet/src/Generated/Models/AudioTranscriptionFormat.cs @@ -35,6 +35,7 @@ public AudioTranscriptionFormat(string value) public bool Equals(AudioTranscriptionFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/AudioTranslationFormat.cs b/.dotnet/src/Generated/Models/AudioTranslationFormat.cs index 8cc47153c..8d0be5459 100644 --- a/.dotnet/src/Generated/Models/AudioTranslationFormat.cs +++ b/.dotnet/src/Generated/Models/AudioTranslationFormat.cs @@ -35,6 +35,7 @@ public AudioTranslationFormat(string value) public bool Equals(AudioTranslationFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs b/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs index c363a5495..485f3a13d 100644 --- a/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs +++ b/.dotnet/src/Generated/Models/ChatImageDetailLevel.cs @@ -39,6 +39,7 @@ public ChatImageDetailLevel(string value) public bool Equals(ChatImageDetailLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationAudioFormat.cs b/.dotnet/src/Generated/Models/ConversationAudioFormat.cs index 93aaac894..110006816 100644 --- a/.dotnet/src/Generated/Models/ConversationAudioFormat.cs +++ b/.dotnet/src/Generated/Models/ConversationAudioFormat.cs @@ -39,6 +39,7 @@ public ConversationAudioFormat(string value) public bool Equals(ConversationAudioFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs index d60fff663..a754da730 100644 --- a/.dotnet/src/Generated/Models/ConversationContentPartKind.cs +++ b/.dotnet/src/Generated/Models/ConversationContentPartKind.cs @@ -38,6 +38,7 @@ public ConversationContentPartKind(string value) public bool Equals(ConversationContentPartKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationItemStatus.cs b/.dotnet/src/Generated/Models/ConversationItemStatus.cs index 98bad53cc..ea8827bd8 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStatus.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStatus.cs @@ -39,6 +39,7 @@ public ConversationItemStatus(string value) public bool Equals(ConversationItemStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationMessageRole.cs b/.dotnet/src/Generated/Models/ConversationMessageRole.cs index 83c3f811f..cf5d494e2 100644 --- a/.dotnet/src/Generated/Models/ConversationMessageRole.cs +++ b/.dotnet/src/Generated/Models/ConversationMessageRole.cs @@ -39,6 +39,7 @@ public ConversationMessageRole(string value) public bool Equals(ConversationMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationStatus.cs b/.dotnet/src/Generated/Models/ConversationStatus.cs index 8df01d529..d08d9ebbc 100644 --- a/.dotnet/src/Generated/Models/ConversationStatus.cs +++ b/.dotnet/src/Generated/Models/ConversationStatus.cs @@ -45,6 +45,7 @@ public ConversationStatus(string value) public bool Equals(ConversationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationToolKind.cs b/.dotnet/src/Generated/Models/ConversationToolKind.cs index e066cb56c..64f0a0eea 100644 --- a/.dotnet/src/Generated/Models/ConversationToolKind.cs +++ b/.dotnet/src/Generated/Models/ConversationToolKind.cs @@ -33,6 +33,7 @@ public ConversationToolKind(string value) public bool Equals(ConversationToolKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs b/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs index 7150e400b..1b81388c4 100644 --- a/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs +++ b/.dotnet/src/Generated/Models/ConversationTranscriptionModel.cs @@ -33,6 +33,7 @@ public ConversationTranscriptionModel(string value) public bool Equals(ConversationTranscriptionModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/ConversationVoice.cs b/.dotnet/src/Generated/Models/ConversationVoice.cs index 541f187e3..20419d714 100644 --- a/.dotnet/src/Generated/Models/ConversationVoice.cs +++ b/.dotnet/src/Generated/Models/ConversationVoice.cs @@ -39,6 +39,7 @@ public ConversationVoice(string value) public bool Equals(ConversationVoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FileSearchRanker.cs b/.dotnet/src/Generated/Models/FileSearchRanker.cs index 9f4a93788..36ee78fa5 100644 --- a/.dotnet/src/Generated/Models/FileSearchRanker.cs +++ b/.dotnet/src/Generated/Models/FileSearchRanker.cs @@ -36,6 +36,7 @@ public FileSearchRanker(string value) public bool Equals(FileSearchRanker other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FileUploadPurpose.cs b/.dotnet/src/Generated/Models/FileUploadPurpose.cs index 55dc0f55e..af423aa35 100644 --- a/.dotnet/src/Generated/Models/FileUploadPurpose.cs +++ b/.dotnet/src/Generated/Models/FileUploadPurpose.cs @@ -42,6 +42,7 @@ public FileUploadPurpose(string value) public bool Equals(FileUploadPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs index 28b43a83b..e5ad18b8d 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersBatchSizeChoiceEnum.cs @@ -33,6 +33,7 @@ public FineTuningJobHyperparametersBatchSizeChoiceEnum(string value) public bool Equals(FineTuningJobHyperparametersBatchSizeChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs index 725ea9349..87c2d5e3c 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum.cs @@ -33,6 +33,7 @@ public FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum(string value public bool Equals(FineTuningJobHyperparametersLearningRateMultiplierChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs index 8832b6f7b..f4b40d5f3 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobHyperparametersNEpochsChoiceEnum.cs @@ -33,6 +33,7 @@ public FineTuningJobHyperparametersNEpochsChoiceEnum(string value) public bool Equals(FineTuningJobHyperparametersNEpochsChoiceEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/FineTuningJobStatus.cs b/.dotnet/src/Generated/Models/FineTuningJobStatus.cs index 905b1c7ee..babe3cece 100644 --- a/.dotnet/src/Generated/Models/FineTuningJobStatus.cs +++ b/.dotnet/src/Generated/Models/FineTuningJobStatus.cs @@ -48,6 +48,7 @@ public FineTuningJobStatus(string value) public bool Equals(FineTuningJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedImageFormat.cs b/.dotnet/src/Generated/Models/GeneratedImageFormat.cs index 8394364de..51076da91 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageFormat.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageFormat.cs @@ -32,6 +32,7 @@ public GeneratedImageFormat(string value) public bool Equals(GeneratedImageFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedImageQuality.cs b/.dotnet/src/Generated/Models/GeneratedImageQuality.cs index 38cc000d2..030295c0b 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageQuality.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageQuality.cs @@ -34,6 +34,7 @@ public GeneratedImageQuality(string value) public bool Equals(GeneratedImageQuality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedImageSize.cs b/.dotnet/src/Generated/Models/GeneratedImageSize.cs index 07525d5fe..6744ee89f 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageSize.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageSize.cs @@ -27,6 +27,7 @@ namespace OpenAI.Images public bool Equals(GeneratedImageSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedImageStyle.cs b/.dotnet/src/Generated/Models/GeneratedImageStyle.cs index e29353355..1b16f5bc3 100644 --- a/.dotnet/src/Generated/Models/GeneratedImageStyle.cs +++ b/.dotnet/src/Generated/Models/GeneratedImageStyle.cs @@ -36,6 +36,7 @@ public GeneratedImageStyle(string value) public bool Equals(GeneratedImageStyle other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs b/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs index 7303500c8..d1eebe036 100644 --- a/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs +++ b/.dotnet/src/Generated/Models/GeneratedSpeechFormat.cs @@ -48,6 +48,7 @@ public GeneratedSpeechFormat(string value) public bool Equals(GeneratedSpeechFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs b/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs index 7f70dee59..7f18f9eed 100644 --- a/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs +++ b/.dotnet/src/Generated/Models/GeneratedSpeechVoice.cs @@ -48,6 +48,7 @@ public GeneratedSpeechVoice(string value) public bool Equals(GeneratedSpeechVoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs b/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs index 20bfeb5b4..b223df728 100644 --- a/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs +++ b/.dotnet/src/Generated/Models/HyperparameterBatchSize.cs @@ -33,6 +33,7 @@ public HyperparameterBatchSize(string value) public bool Equals(HyperparameterBatchSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs b/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs index c1ad7707b..12306c291 100644 --- a/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs +++ b/.dotnet/src/Generated/Models/HyperparameterCycleCount.cs @@ -33,6 +33,7 @@ public HyperparameterCycleCount(string value) public bool Equals(HyperparameterCycleCount other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs b/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs index bdb78bb6e..58643912a 100644 --- a/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs +++ b/.dotnet/src/Generated/Models/HyperparameterLearningRate.cs @@ -33,6 +33,7 @@ public HyperparameterLearningRate(string value) public bool Equals(HyperparameterLearningRate other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs b/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs index e6fb3f5d3..51276ac20 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantObjectObject.cs @@ -33,6 +33,7 @@ public InternalAssistantObjectObject(string value) public bool Equals(InternalAssistantObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs index c7b227d48..3c6f5cfc2 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantToolsFileSearchTypeOnlyType.cs @@ -33,6 +33,7 @@ public InternalAssistantToolsFileSearchTypeOnlyType(string value) public bool Equals(InternalAssistantToolsFileSearchTypeOnlyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs index c8a214bea..c8eec5f29 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantsNamedToolChoiceType.cs @@ -39,6 +39,7 @@ public InternalAssistantsNamedToolChoiceType(string value) public bool Equals(InternalAssistantsNamedToolChoiceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs b/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs index b488ec4cd..b3a3eb0cd 100644 --- a/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs +++ b/.dotnet/src/Generated/Models/InternalBatchCompletionTimeframe.cs @@ -33,6 +33,7 @@ public InternalBatchCompletionTimeframe(string value) public bool Equals(InternalBatchCompletionTimeframe other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs b/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs index d9f87a254..ee716ad76 100644 --- a/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs +++ b/.dotnet/src/Generated/Models/InternalBatchErrorsObject.cs @@ -33,6 +33,7 @@ public InternalBatchErrorsObject(string value) public bool Equals(InternalBatchErrorsObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalBatchObject.cs b/.dotnet/src/Generated/Models/InternalBatchObject.cs index 5b364711a..c1d37dbda 100644 --- a/.dotnet/src/Generated/Models/InternalBatchObject.cs +++ b/.dotnet/src/Generated/Models/InternalBatchObject.cs @@ -33,6 +33,7 @@ public InternalBatchObject(string value) public bool Equals(InternalBatchObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs b/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs index 9dbba62c6..8e1e03a89 100644 --- a/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs +++ b/.dotnet/src/Generated/Models/InternalBatchRequestInputMethod.cs @@ -33,6 +33,7 @@ public InternalBatchRequestInputMethod(string value) public bool Equals(InternalBatchRequestInputMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalBatchStatus.cs b/.dotnet/src/Generated/Models/InternalBatchStatus.cs index 57fd8864d..33c7f6439 100644 --- a/.dotnet/src/Generated/Models/InternalBatchStatus.cs +++ b/.dotnet/src/Generated/Models/InternalBatchStatus.cs @@ -54,6 +54,7 @@ public InternalBatchStatus(string value) public bool Equals(InternalBatchStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs index 83f8651ef..105152fba 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionMessageToolCallChunkType.cs @@ -33,6 +33,7 @@ public InternalChatCompletionMessageToolCallChunkType(string value) public bool Equals(InternalChatCompletionMessageToolCallChunkType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs index c6f7a71c2..0fe3d7180 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionNamedToolChoiceType.cs @@ -33,6 +33,7 @@ public InternalChatCompletionNamedToolChoiceType(string value) public bool Equals(InternalChatCompletionNamedToolChoiceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs index e65338844..90bc6204d 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartImageType.cs @@ -33,6 +33,7 @@ public InternalChatCompletionRequestMessageContentPartImageType(string value) public bool Equals(InternalChatCompletionRequestMessageContentPartImageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs index 1d2dd4636..1096b7c85 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartRefusalType.cs @@ -33,6 +33,7 @@ public InternalChatCompletionRequestMessageContentPartRefusalType(string value) public bool Equals(InternalChatCompletionRequestMessageContentPartRefusalType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs index 41e2afae1..5f8e3c80d 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionRequestMessageContentPartTextType.cs @@ -33,6 +33,7 @@ public InternalChatCompletionRequestMessageContentPartTextType(string value) public bool Equals(InternalChatCompletionRequestMessageContentPartTextType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs index 08971fdec..69b375aaf 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionResponseMessageRole.cs @@ -33,6 +33,7 @@ public InternalChatCompletionResponseMessageRole(string value) public bool Equals(InternalChatCompletionResponseMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs index 1604824a8..c39d97b59 100644 --- a/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs +++ b/.dotnet/src/Generated/Models/InternalChatCompletionStreamResponseDeltaRole.cs @@ -42,6 +42,7 @@ public InternalChatCompletionStreamResponseDeltaRole(string value) public bool Equals(InternalChatCompletionStreamResponseDeltaRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs index 570d0e36e..b92d51fc7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateAssistantRequestModel.cs @@ -99,6 +99,7 @@ public InternalCreateAssistantRequestModel(string value) public bool Equals(InternalCreateAssistantRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs b/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs index 7a73a6904..3ab4ffb5e 100644 --- a/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs +++ b/.dotnet/src/Generated/Models/InternalCreateBatchRequestEndpoint.cs @@ -36,6 +36,7 @@ public InternalCreateBatchRequestEndpoint(string value) public bool Equals(InternalCreateBatchRequestEndpoint other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs index bbf4f031d..eee67eec1 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseChoiceFinishReason.cs @@ -42,6 +42,7 @@ public InternalCreateChatCompletionFunctionResponseChoiceFinishReason(string val public bool Equals(InternalCreateChatCompletionFunctionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs index 526f84ea8..67e58e465 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionFunctionResponseObject.cs @@ -33,6 +33,7 @@ public InternalCreateChatCompletionFunctionResponseObject(string value) public bool Equals(InternalCreateChatCompletionFunctionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs index f5f1ffe09..f8e62d274 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestModel.cs @@ -123,6 +123,7 @@ public InternalCreateChatCompletionRequestModel(string value) public bool Equals(InternalCreateChatCompletionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs index 90bc6dc6b..17221cfbe 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestServiceTier.cs @@ -36,6 +36,7 @@ public InternalCreateChatCompletionRequestServiceTier(string value) public bool Equals(InternalCreateChatCompletionRequestServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs index 65aea4cc0..dbbe528ee 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionRequestToolChoice.cs @@ -39,6 +39,7 @@ public InternalCreateChatCompletionRequestToolChoice(string value) public bool Equals(InternalCreateChatCompletionRequestToolChoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs index e34ce0e71..2ec8db01b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseObject.cs @@ -33,6 +33,7 @@ public InternalCreateChatCompletionResponseObject(string value) public bool Equals(InternalCreateChatCompletionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs index 821360822..e554b9485 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionResponseServiceTier.cs @@ -36,6 +36,7 @@ public InternalCreateChatCompletionResponseServiceTier(string value) public bool Equals(InternalCreateChatCompletionResponseServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs index 1e3c2bb23..deec1998c 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseChoiceFinishReason.cs @@ -45,6 +45,7 @@ public InternalCreateChatCompletionStreamResponseChoiceFinishReason(string value public bool Equals(InternalCreateChatCompletionStreamResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs index 0f2a369e8..dd74ac7ff 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseObject.cs @@ -33,6 +33,7 @@ public InternalCreateChatCompletionStreamResponseObject(string value) public bool Equals(InternalCreateChatCompletionStreamResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs index 39740f316..b7c915064 100644 --- a/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs +++ b/.dotnet/src/Generated/Models/InternalCreateChatCompletionStreamResponseServiceTier.cs @@ -36,6 +36,7 @@ public InternalCreateChatCompletionStreamResponseServiceTier(string value) public bool Equals(InternalCreateChatCompletionStreamResponseServiceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs index b2f907007..3e195b568 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionRequestModel.cs @@ -39,6 +39,7 @@ public InternalCreateCompletionRequestModel(string value) public bool Equals(InternalCreateCompletionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs index 631ea53b3..9754837fc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseChoiceFinishReason.cs @@ -39,6 +39,7 @@ public InternalCreateCompletionResponseChoiceFinishReason(string value) public bool Equals(InternalCreateCompletionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs index 4a11f0080..1ef3b7e97 100644 --- a/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateCompletionResponseObject.cs @@ -33,6 +33,7 @@ public InternalCreateCompletionResponseObject(string value) public bool Equals(InternalCreateCompletionResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs index 3f66210c6..d868925d3 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestEncodingFormat.cs @@ -36,6 +36,7 @@ public InternalCreateEmbeddingRequestEncodingFormat(string value) public bool Equals(InternalCreateEmbeddingRequestEncodingFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs index 45ca31a3a..c2467f535 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingRequestModel.cs @@ -39,6 +39,7 @@ public InternalCreateEmbeddingRequestModel(string value) public bool Equals(InternalCreateEmbeddingRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs b/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs index d491df820..1f831782a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalCreateEmbeddingResponseObject.cs @@ -33,6 +33,7 @@ public InternalCreateEmbeddingResponseObject(string value) public bool Equals(InternalCreateEmbeddingResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs index ec23f2729..308784743 100644 --- a/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateFineTuningJobRequestModel.cs @@ -42,6 +42,7 @@ public InternalCreateFineTuningJobRequestModel(string value) public bool Equals(InternalCreateFineTuningJobRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs index d525a4774..1ba31ad3a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestModel.cs @@ -33,6 +33,7 @@ public InternalCreateImageEditRequestModel(string value) public bool Equals(InternalCreateImageEditRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs index db5b5e155..597c1e8a9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestResponseFormat.cs @@ -36,6 +36,7 @@ public InternalCreateImageEditRequestResponseFormat(string value) public bool Equals(InternalCreateImageEditRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs index af074d4dd..abedecc3a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageEditRequestSize.cs @@ -39,6 +39,7 @@ public InternalCreateImageEditRequestSize(string value) public bool Equals(InternalCreateImageEditRequestSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs index 884549d94..d5d2c8e89 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageRequestModel.cs @@ -36,6 +36,7 @@ public InternalCreateImageRequestModel(string value) public bool Equals(InternalCreateImageRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs index a98754d90..10a223fed 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestModel.cs @@ -33,6 +33,7 @@ public InternalCreateImageVariationRequestModel(string value) public bool Equals(InternalCreateImageVariationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs index ca4d4db97..3d5c9d150 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestResponseFormat.cs @@ -36,6 +36,7 @@ public InternalCreateImageVariationRequestResponseFormat(string value) public bool Equals(InternalCreateImageVariationRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs index d42f50031..a418e0dfa 100644 --- a/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs +++ b/.dotnet/src/Generated/Models/InternalCreateImageVariationRequestSize.cs @@ -39,6 +39,7 @@ public InternalCreateImageVariationRequestSize(string value) public bool Equals(InternalCreateImageVariationRequestSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs index 25c035407..72ad5cd40 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput2Type.cs @@ -33,6 +33,7 @@ public InternalCreateModerationRequestInput2Type(string value) public bool Equals(InternalCreateModerationRequestInput2Type other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs index 07634b0ce..0e0e22bd9 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestInput3Type.cs @@ -33,6 +33,7 @@ public InternalCreateModerationRequestInput3Type(string value) public bool Equals(InternalCreateModerationRequestInput3Type other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs index 75cb5cd51..9427eba80 100644 --- a/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateModerationRequestModel.cs @@ -42,6 +42,7 @@ public InternalCreateModerationRequestModel(string value) public bool Equals(InternalCreateModerationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs index 032128f6a..71afae71b 100644 --- a/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateRunRequestModel.cs @@ -99,6 +99,7 @@ public InternalCreateRunRequestModel(string value) public bool Equals(InternalCreateRunRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs index ef13537c2..8c9149261 100644 --- a/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateSpeechRequestModel.cs @@ -36,6 +36,7 @@ public InternalCreateSpeechRequestModel(string value) public bool Equals(InternalCreateSpeechRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs index 842f6fa7f..35e576c4a 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestModel.cs @@ -99,6 +99,7 @@ public InternalCreateThreadAndRunRequestModel(string value) public bool Equals(InternalCreateThreadAndRunRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs index 3d87e1ecc..439d3b7fc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs +++ b/.dotnet/src/Generated/Models/InternalCreateThreadAndRunRequestToolChoice.cs @@ -39,6 +39,7 @@ public InternalCreateThreadAndRunRequestToolChoice(string value) public bool Equals(InternalCreateThreadAndRunRequestToolChoice other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs index 1ce927e3b..783ab0bcf 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestModel.cs @@ -33,6 +33,7 @@ public InternalCreateTranscriptionRequestModel(string value) public bool Equals(InternalCreateTranscriptionRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs index 5fba0cb69..f5153c185 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionRequestTimestampGranularities.cs @@ -36,6 +36,7 @@ public InternalCreateTranscriptionRequestTimestampGranularities(string value) public bool Equals(InternalCreateTranscriptionRequestTimestampGranularities other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs index 96af492ac..5d3c06858 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranscriptionResponseVerboseJsonTask.cs @@ -33,6 +33,7 @@ public InternalCreateTranscriptionResponseVerboseJsonTask(string value) public bool Equals(InternalCreateTranscriptionResponseVerboseJsonTask other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs index 3b14b02d0..f83ea19bc 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationRequestModel.cs @@ -33,6 +33,7 @@ public InternalCreateTranslationRequestModel(string value) public bool Equals(InternalCreateTranslationRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs index 196639de8..22af3b6a7 100644 --- a/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs +++ b/.dotnet/src/Generated/Models/InternalCreateTranslationResponseVerboseJsonTask.cs @@ -33,6 +33,7 @@ public InternalCreateTranslationResponseVerboseJsonTask(string value) public bool Equals(InternalCreateTranslationResponseVerboseJsonTask other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs b/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs index 7c416878e..f50d74b22 100644 --- a/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs +++ b/.dotnet/src/Generated/Models/InternalCreateUploadRequestPurpose.cs @@ -42,6 +42,7 @@ public InternalCreateUploadRequestPurpose(string value) public bool Equals(InternalCreateUploadRequestPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs index fa5f04dff..6225c734b 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteAssistantResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteAssistantResponseObject(string value) public bool Equals(InternalDeleteAssistantResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs index 7f6f454bf..488c1146e 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteFileResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteFileResponseObject(string value) public bool Equals(InternalDeleteFileResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs index 98065f2d6..5bac8c4fa 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteMessageResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteMessageResponseObject(string value) public bool Equals(InternalDeleteMessageResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs index 665be1cce..b2bf4456c 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteModelResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteModelResponseObject(string value) public bool Equals(InternalDeleteModelResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs index 8a8ee5818..37b6f7144 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteThreadResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteThreadResponseObject(string value) public bool Equals(InternalDeleteThreadResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs index 81262cbba..ec1f0afed 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreFileResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteVectorStoreFileResponseObject(string value) public bool Equals(InternalDeleteVectorStoreFileResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs index 6a72e9ce4..933ba71f7 100644 --- a/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalDeleteVectorStoreResponseObject.cs @@ -33,6 +33,7 @@ public InternalDeleteVectorStoreResponseObject(string value) public bool Equals(InternalDeleteVectorStoreResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs b/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs index c9ce5abd8..493e5ca4e 100644 --- a/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs +++ b/.dotnet/src/Generated/Models/InternalEmbeddingObject.cs @@ -33,6 +33,7 @@ public InternalEmbeddingObject(string value) public bool Equals(InternalEmbeddingObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs index 8ef8bdf93..8a9e3bf8c 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobCheckpointObject.cs @@ -33,6 +33,7 @@ public InternalFineTuningJobCheckpointObject(string value) public bool Equals(InternalFineTuningJobCheckpointObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs index 73d371f6a..1dec101d9 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobEventObject.cs @@ -33,6 +33,7 @@ public InternalFineTuningJobEventObject(string value) public bool Equals(InternalFineTuningJobEventObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs b/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs index 3790583ef..1b11ef517 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningJobObject.cs @@ -33,6 +33,7 @@ public InternalFineTuningJobObject(string value) public bool Equals(InternalFineTuningJobObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs index d428b9654..3ee6613cc 100644 --- a/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListAssistantsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListAssistantsResponseObject(string value) public bool Equals(InternalListAssistantsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs index 05c00ddb0..e63aa1089 100644 --- a/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListBatchesResponseObject.cs @@ -33,6 +33,7 @@ public InternalListBatchesResponseObject(string value) public bool Equals(InternalListBatchesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs b/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs index 799f45741..621f99ed5 100644 --- a/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs +++ b/.dotnet/src/Generated/Models/InternalListFilesInVectorStoreBatchRequestOrder.cs @@ -36,6 +36,7 @@ public InternalListFilesInVectorStoreBatchRequestOrder(string value) public bool Equals(InternalListFilesInVectorStoreBatchRequestOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs index ea6bd2fa4..2fa2419c8 100644 --- a/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFilesResponseObject.cs @@ -33,6 +33,7 @@ public InternalListFilesResponseObject(string value) public bool Equals(InternalListFilesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs index 73a435d76..4238f5ef6 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobCheckpointsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListFineTuningJobCheckpointsResponseObject(string value) public bool Equals(InternalListFineTuningJobCheckpointsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs index 7c6fe2d0b..2f75c90d9 100644 --- a/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListFineTuningJobEventsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListFineTuningJobEventsResponseObject(string value) public bool Equals(InternalListFineTuningJobEventsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs index 80a401aba..dc6c8b82d 100644 --- a/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListMessagesResponseObject.cs @@ -33,6 +33,7 @@ public InternalListMessagesResponseObject(string value) public bool Equals(InternalListMessagesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs index aece92494..dae3553c0 100644 --- a/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListModelsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListModelsResponseObject(string value) public bool Equals(InternalListModelsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs index 4606b7c1b..4bc6eed4d 100644 --- a/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListPaginatedFineTuningJobsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListPaginatedFineTuningJobsResponseObject(string value) public bool Equals(InternalListPaginatedFineTuningJobsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs index 99039f3f9..a146511d3 100644 --- a/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListRunStepsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListRunStepsResponseObject(string value) public bool Equals(InternalListRunStepsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs index 4d1fa4fc2..353b74b7b 100644 --- a/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListRunsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListRunsResponseObject(string value) public bool Equals(InternalListRunsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs b/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs index d2cf19ac9..7bb19f64a 100644 --- a/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListThreadsResponseObject.cs @@ -33,6 +33,7 @@ public InternalListThreadsResponseObject(string value) public bool Equals(InternalListThreadsResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs index 61323e295..936f76205 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoreFilesResponseObject.cs @@ -33,6 +33,7 @@ public InternalListVectorStoreFilesResponseObject(string value) public bool Equals(InternalListVectorStoreFilesResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs b/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs index d46a9aa4e..cf2c64190 100644 --- a/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalListVectorStoresResponseObject.cs @@ -33,6 +33,7 @@ public InternalListVectorStoresResponseObject(string value) public bool Equals(InternalListVectorStoresResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs index dfb83dfd1..178be85d1 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectImageFileDetail.cs @@ -39,6 +39,7 @@ public InternalMessageContentImageFileObjectImageFileDetail(string value) public bool Equals(InternalMessageContentImageFileObjectImageFileDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs index 9c7870d76..7a34d366e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageFileObjectType.cs @@ -33,6 +33,7 @@ public InternalMessageContentImageFileObjectType(string value) public bool Equals(InternalMessageContentImageFileObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs index f3a9f7a9f..b33325652 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectImageUrlDetail.cs @@ -39,6 +39,7 @@ public InternalMessageContentImageUrlObjectImageUrlDetail(string value) public bool Equals(InternalMessageContentImageUrlObjectImageUrlDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs index b45ee019a..50e542907 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentImageUrlObjectType.cs @@ -33,6 +33,7 @@ public InternalMessageContentImageUrlObjectType(string value) public bool Equals(InternalMessageContentImageUrlObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs index 325e45e68..bf9339d90 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentRefusalObjectType.cs @@ -33,6 +33,7 @@ public InternalMessageContentRefusalObjectType(string value) public bool Equals(InternalMessageContentRefusalObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs index d4dc38cff..965bf25b9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextObjectType.cs @@ -33,6 +33,7 @@ public InternalMessageContentTextObjectType(string value) public bool Equals(InternalMessageContentTextObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs index 3645c770d..08f9beab9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObjectImageFileDetail.cs @@ -39,6 +39,7 @@ public InternalMessageDeltaContentImageFileObjectImageFileDetail(string value) public bool Equals(InternalMessageDeltaContentImageFileObjectImageFileDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs index d4e85ecc3..c206463fe 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObjectImageUrlDetail.cs @@ -39,6 +39,7 @@ public InternalMessageDeltaContentImageUrlObjectImageUrlDetail(string value) public bool Equals(InternalMessageDeltaContentImageUrlObjectImageUrlDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs index d7a814730..d71bd5357 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectDeltaRole.cs @@ -36,6 +36,7 @@ public InternalMessageDeltaObjectDeltaRole(string value) public bool Equals(InternalMessageDeltaObjectDeltaRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs index 5e9ce070b..2efee4df9 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaObjectObject.cs @@ -33,6 +33,7 @@ public InternalMessageDeltaObjectObject(string value) public bool Equals(InternalMessageDeltaObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs b/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs index fd6cf18d3..76edcd658 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectObject.cs @@ -33,6 +33,7 @@ public InternalMessageObjectObject(string value) public bool Equals(InternalMessageObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs b/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs index ede892f8b..972b10975 100644 --- a/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs +++ b/.dotnet/src/Generated/Models/InternalMessageObjectRole.cs @@ -36,6 +36,7 @@ public InternalMessageObjectRole(string value) public bool Equals(InternalMessageObjectRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs b/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs index 0059a44f1..b7caeebc4 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRequestContentTextObjectType.cs @@ -33,6 +33,7 @@ public InternalMessageRequestContentTextObjectType(string value) public bool Equals(InternalMessageRequestContentTextObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalModelObject.cs b/.dotnet/src/Generated/Models/InternalModelObject.cs index f3f3bfe10..eac208570 100644 --- a/.dotnet/src/Generated/Models/InternalModelObject.cs +++ b/.dotnet/src/Generated/Models/InternalModelObject.cs @@ -33,6 +33,7 @@ public InternalModelObject(string value) public bool Equals(InternalModelObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs b/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs index 666d4132a..4d201bd7b 100644 --- a/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs +++ b/.dotnet/src/Generated/Models/InternalOpenAIFileObject.cs @@ -33,6 +33,7 @@ public InternalOpenAIFileObject(string value) public bool Equals(InternalOpenAIFileObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs index d9c59a719..c59b899e9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventType.cs @@ -57,6 +57,7 @@ public InternalRealtimeClientEventType(string value) public bool Equals(InternalRealtimeClientEventType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs b/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs index d7dfda33b..23bc8f6eb 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeItemType.cs @@ -39,6 +39,7 @@ public InternalRealtimeItemType(string value) public bool Equals(InternalRealtimeItemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs index 66f77b66a..2fd764039 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSessionModality.cs @@ -36,6 +36,7 @@ public InternalRealtimeRequestSessionModality(string value) public bool Equals(InternalRealtimeRequestSessionModality other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs index 81279bbbf..d5c5d6c55 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseItemObject.cs @@ -33,6 +33,7 @@ public InternalRealtimeResponseItemObject(string value) public bool Equals(InternalRealtimeResponseItemObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs index 300fecb98..113343549 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseObject.cs @@ -33,6 +33,7 @@ public InternalRealtimeResponseObject(string value) public bool Equals(InternalRealtimeResponseObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs index 25c95ee15..e73181f01 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseSessionObject.cs @@ -33,6 +33,7 @@ public InternalRealtimeResponseSessionObject(string value) public bool Equals(InternalRealtimeResponseSessionObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunObjectObject.cs index 3e5daf6e8..f4488c922 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectObject.cs @@ -33,6 +33,7 @@ public InternalRunObjectObject(string value) public bool Equals(InternalRunObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs index 943d81c6b..d5c50136a 100644 --- a/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs +++ b/.dotnet/src/Generated/Models/InternalRunObjectRequiredActionType.cs @@ -33,6 +33,7 @@ public InternalRunObjectRequiredActionType(string value) public bool Equals(InternalRunObjectRequiredActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs index 8214252da..9e63f1475 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaObjectObject.cs @@ -33,6 +33,7 @@ public InternalRunStepDeltaObjectObject(string value) public bool Equals(InternalRunStepDeltaObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs index b991fd43d..03d987094 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker.cs @@ -33,6 +33,7 @@ public InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker(strin public bool Equals(InternalRunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs index 611bf39b4..8762f7a01 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsFileSearchResultObjectContentType.cs @@ -33,6 +33,7 @@ public InternalRunStepDetailsToolCallsFileSearchResultObjectContentType(string v public bool Equals(InternalRunStepDetailsToolCallsFileSearchResultObjectContentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs b/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs index 053f4db89..e4b8fc0cc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepObjectObject.cs @@ -33,6 +33,7 @@ public InternalRunStepObjectObject(string value) public bool Equals(InternalRunStepObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs b/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs index 37de57345..f788b6996 100644 --- a/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalRunToolCallObjectType.cs @@ -33,6 +33,7 @@ public InternalRunToolCallObjectType(string value) public bool Equals(InternalRunToolCallObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs b/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs index 997b9b71f..edef44eec 100644 --- a/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalThreadObjectObject.cs @@ -33,6 +33,7 @@ public InternalThreadObjectObject(string value) public bool Equals(InternalThreadObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs b/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs index 75fe3eddc..284073991 100644 --- a/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs +++ b/.dotnet/src/Generated/Models/InternalTruncationObjectType.cs @@ -36,6 +36,7 @@ public InternalTruncationObjectType(string value) public bool Equals(InternalTruncationObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalUploadObject.cs b/.dotnet/src/Generated/Models/InternalUploadObject.cs index 8801efbff..db22cc690 100644 --- a/.dotnet/src/Generated/Models/InternalUploadObject.cs +++ b/.dotnet/src/Generated/Models/InternalUploadObject.cs @@ -33,6 +33,7 @@ public InternalUploadObject(string value) public bool Equals(InternalUploadObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalUploadPartObject.cs b/.dotnet/src/Generated/Models/InternalUploadPartObject.cs index ecf163eb7..e452ba598 100644 --- a/.dotnet/src/Generated/Models/InternalUploadPartObject.cs +++ b/.dotnet/src/Generated/Models/InternalUploadPartObject.cs @@ -33,6 +33,7 @@ public InternalUploadPartObject(string value) public bool Equals(InternalUploadPartObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalUploadStatus.cs b/.dotnet/src/Generated/Models/InternalUploadStatus.cs index f2bad245d..41cf69b1a 100644 --- a/.dotnet/src/Generated/Models/InternalUploadStatus.cs +++ b/.dotnet/src/Generated/Models/InternalUploadStatus.cs @@ -42,6 +42,7 @@ public InternalUploadStatus(string value) public bool Equals(InternalUploadStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs index df5739621..9e5e701c6 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileBatchObjectObject.cs @@ -33,6 +33,7 @@ public InternalVectorStoreFileBatchObjectObject(string value) public bool Equals(InternalVectorStoreFileBatchObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs index ebad832d3..306b13005 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreFileObjectObject.cs @@ -33,6 +33,7 @@ public InternalVectorStoreFileObjectObject(string value) public bool Equals(InternalVectorStoreFileObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs b/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs index 1f098e0f4..6ba2fcd08 100644 --- a/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs +++ b/.dotnet/src/Generated/Models/InternalVectorStoreObjectObject.cs @@ -33,6 +33,7 @@ public InternalVectorStoreObjectObject(string value) public bool Equals(InternalVectorStoreObjectObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/MessageCollectionOrder.cs b/.dotnet/src/Generated/Models/MessageCollectionOrder.cs index cfc06b9f3..6c8a4153c 100644 --- a/.dotnet/src/Generated/Models/MessageCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/MessageCollectionOrder.cs @@ -32,6 +32,7 @@ public MessageCollectionOrder(string value) public bool Equals(MessageCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/MessageFailureReason.cs b/.dotnet/src/Generated/Models/MessageFailureReason.cs index 5027bb403..887e1efd7 100644 --- a/.dotnet/src/Generated/Models/MessageFailureReason.cs +++ b/.dotnet/src/Generated/Models/MessageFailureReason.cs @@ -45,6 +45,7 @@ public MessageFailureReason(string value) public bool Equals(MessageFailureReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/MessageStatus.cs b/.dotnet/src/Generated/Models/MessageStatus.cs index 14de118bb..350d35e2e 100644 --- a/.dotnet/src/Generated/Models/MessageStatus.cs +++ b/.dotnet/src/Generated/Models/MessageStatus.cs @@ -39,6 +39,7 @@ public MessageStatus(string value) public bool Equals(MessageStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunCollectionOrder.cs b/.dotnet/src/Generated/Models/RunCollectionOrder.cs index 530d05e99..d16dcacf3 100644 --- a/.dotnet/src/Generated/Models/RunCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/RunCollectionOrder.cs @@ -32,6 +32,7 @@ public RunCollectionOrder(string value) public bool Equals(RunCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunErrorCode.cs b/.dotnet/src/Generated/Models/RunErrorCode.cs index 64c452f85..faa82cd51 100644 --- a/.dotnet/src/Generated/Models/RunErrorCode.cs +++ b/.dotnet/src/Generated/Models/RunErrorCode.cs @@ -39,6 +39,7 @@ public RunErrorCode(string value) public bool Equals(RunErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunIncompleteReason.cs b/.dotnet/src/Generated/Models/RunIncompleteReason.cs index d69a9eb78..514d5b257 100644 --- a/.dotnet/src/Generated/Models/RunIncompleteReason.cs +++ b/.dotnet/src/Generated/Models/RunIncompleteReason.cs @@ -32,6 +32,7 @@ public RunIncompleteReason(string value) public bool Equals(RunIncompleteReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunStatus.cs b/.dotnet/src/Generated/Models/RunStatus.cs index 319178da1..714824f53 100644 --- a/.dotnet/src/Generated/Models/RunStatus.cs +++ b/.dotnet/src/Generated/Models/RunStatus.cs @@ -57,6 +57,7 @@ public RunStatus(string value) public bool Equals(RunStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs b/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs index 7b173e278..ec2f727c4 100644 --- a/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/RunStepCollectionOrder.cs @@ -32,6 +32,7 @@ public RunStepCollectionOrder(string value) public bool Equals(RunStepCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunStepErrorCode.cs b/.dotnet/src/Generated/Models/RunStepErrorCode.cs index 3d42926c7..853f910e5 100644 --- a/.dotnet/src/Generated/Models/RunStepErrorCode.cs +++ b/.dotnet/src/Generated/Models/RunStepErrorCode.cs @@ -36,6 +36,7 @@ public RunStepErrorCode(string value) public bool Equals(RunStepErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunStepStatus.cs b/.dotnet/src/Generated/Models/RunStepStatus.cs index 31ce7d2bc..fa5259ea2 100644 --- a/.dotnet/src/Generated/Models/RunStepStatus.cs +++ b/.dotnet/src/Generated/Models/RunStepStatus.cs @@ -45,6 +45,7 @@ public RunStepStatus(string value) public bool Equals(RunStepStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/RunStepType.cs b/.dotnet/src/Generated/Models/RunStepType.cs index ae775cb19..f672fbdf9 100644 --- a/.dotnet/src/Generated/Models/RunStepType.cs +++ b/.dotnet/src/Generated/Models/RunStepType.cs @@ -36,6 +36,7 @@ public RunStepType(string value) public bool Equals(RunStepType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs b/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs index 57427d209..6a9907c96 100644 --- a/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs +++ b/.dotnet/src/Generated/Models/VectorStoreBatchFileJobStatus.cs @@ -42,6 +42,7 @@ public VectorStoreBatchFileJobStatus(string value) public bool Equals(VectorStoreBatchFileJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs b/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs index 1276dde8c..02d58180c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/VectorStoreCollectionOrder.cs @@ -32,6 +32,7 @@ public VectorStoreCollectionOrder(string value) public bool Equals(VectorStoreCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs index 1bc70287b..0f1f67686 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationCollectionOrder.cs @@ -32,6 +32,7 @@ public VectorStoreFileAssociationCollectionOrder(string value) public bool Equals(VectorStoreFileAssociationCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs b/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs index 16bebef5e..3046b192d 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileAssociationErrorCode.cs @@ -39,6 +39,7 @@ public VectorStoreFileAssociationErrorCode(string value) public bool Equals(VectorStoreFileAssociationErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs b/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs index 1d3eadcfc..d7824a14c 100644 --- a/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs +++ b/.dotnet/src/Generated/Models/VectorStoreFileStatusFilter.cs @@ -42,6 +42,7 @@ public VectorStoreFileStatusFilter(string value) public bool Equals(VectorStoreFileStatusFilter other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; public override string ToString() => _value; diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 55958c5ad..ccc71d135 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 0b2710bde4f381e38db711b273bb9a4666166223 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 11:58:31 -0800 Subject: [PATCH 46/54] Add back missing factory method --- .dotnet/api/OpenAI.netstandard2.0.cs | 1 + .dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.dotnet/api/OpenAI.netstandard2.0.cs b/.dotnet/api/OpenAI.netstandard2.0.cs index c29dee6ec..3e89cd75d 100644 --- a/.dotnet/api/OpenAI.netstandard2.0.cs +++ b/.dotnet/api/OpenAI.netstandard2.0.cs @@ -2028,6 +2028,7 @@ public class FunctionChatMessage : ChatMessage, IJsonModel, } public static class OpenAIChatModelFactory { public static ChatCompletion ChatCompletion(string id = null, ChatFinishReason finishReason = ChatFinishReason.Stop, ChatMessageContent content = null, string refusal = null, IEnumerable toolCalls = null, ChatMessageRole role = ChatMessageRole.System, ChatFunctionCall functionCall = null, IEnumerable contentTokenLogProbabilities = null, IEnumerable refusalTokenLogProbabilities = null, DateTimeOffset createdAt = default, string model = null, string systemFingerprint = null, ChatTokenUsage usage = null); + public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int? audioTokenCount = null, int? cachedTokenCount = null); public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = 0, int? audioTokenCount = null); public static ChatTokenLogProbabilityDetails ChatTokenLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory? utf8Bytes = null, IEnumerable topLogProbabilities = null); public static ChatTokenTopLogProbabilityDetails ChatTokenTopLogProbabilityDetails(string token = null, float logProbability = 0, ReadOnlyMemory? utf8Bytes = null); diff --git a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs index 0a0086a61..c7936ae3b 100644 --- a/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs +++ b/.dotnet/src/Custom/Chat/OpenAIChatModelFactory.cs @@ -101,6 +101,16 @@ public static ChatTokenUsage ChatTokenUsage(int outputTokenCount = default, int additionalBinaryDataProperties: null); } + /// Initializes a new instance of . + /// A new instance for mocking. + public static ChatInputTokenUsageDetails ChatInputTokenUsageDetails(int? audioTokenCount = null, int? cachedTokenCount = null) + { + return new ChatInputTokenUsageDetails( + audioTokenCount: audioTokenCount, + cachedTokenCount: cachedTokenCount, + additionalBinaryDataProperties: null); + } + /// Initializes a new instance of . /// A new instance for mocking. public static ChatOutputTokenUsageDetails ChatOutputTokenUsageDetails(int reasoningTokenCount = default, int? audioTokenCount = null) From d067922173e7619cdcda68804a6b78e64b88697b Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 12:58:18 -0800 Subject: [PATCH 47/54] more get->list suppressions --- .../InternalAssistantMessageClient.cs | 4 +-- .../Internal/InternalAssistantRunClient.cs | 8 ++--- .../InternalAssistantMessageClient.cs | 16 --------- .../Generated/InternalAssistantRunClient.cs | 34 ------------------- 4 files changed, 6 insertions(+), 56 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 5d66124cf..9598db346 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -8,8 +8,8 @@ namespace OpenAI.Assistants; [CodeGenSuppress("InternalAssistantMessageClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateMessageAsync", typeof(string), typeof(MessageCreationOptions))] [CodeGenSuppress("CreateMessage", typeof(string), typeof(MessageCreationOptions))] -[CodeGenSuppress("GetMessagesAsync", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetMessages", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListMessagesAsync", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListMessages", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] [CodeGenSuppress("GetMessageAsync", typeof(string), typeof(string))] [CodeGenSuppress("GetMessage", typeof(string), typeof(string))] [CodeGenSuppress("ModifyMessageAsync", typeof(string), typeof(string), typeof(MessageModificationOptions))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index 5d0e96b14..0f699f16e 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -10,8 +10,8 @@ namespace OpenAI.Assistants; [CodeGenSuppress("CreateThreadAndRun", typeof(InternalCreateThreadAndRunRequest))] [CodeGenSuppress("CreateRunAsync", typeof(string), typeof(RunCreationOptions))] [CodeGenSuppress("CreateRun", typeof(string), typeof(RunCreationOptions))] -[CodeGenSuppress("GetRunsAsync", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetRuns", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListRunsAsync", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListRuns", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] [CodeGenSuppress("GetRunAsync", typeof(string), typeof(string))] [CodeGenSuppress("GetRun", typeof(string), typeof(string))] [CodeGenSuppress("ModifyRunAsync", typeof(string), typeof(string), typeof(RunModificationOptions))] @@ -20,8 +20,8 @@ namespace OpenAI.Assistants; [CodeGenSuppress("CancelRun", typeof(string), typeof(string))] [CodeGenSuppress("SubmitToolOutputsToRunAsync", typeof(string), typeof(string), typeof(InternalSubmitToolOutputsRunRequest))] [CodeGenSuppress("SubmitToolOutputsToRun", typeof(string), typeof(string), typeof(InternalSubmitToolOutputsRunRequest))] -[CodeGenSuppress("GetRunStepsAsync", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetRunSteps", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListRunStepsAsync", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListRunSteps", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string))] [CodeGenSuppress("GetRunStepAsync", typeof(string), typeof(string), typeof(string))] [CodeGenSuppress("GetRunStep", typeof(string), typeof(string), typeof(string))] internal partial class InternalAssistantRunClient diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index 81c98c877..98aeac824 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -38,21 +38,5 @@ public virtual async Task ListMessagesAsync(string threadId, int? using PipelineMessage message = CreateListMessagesRequest(threadId, limit, order, after, before, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - - public virtual ClientResult ListMessages(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - - ClientResult result = ListMessages(threadId, limit, order.ToString(), after, before, null); - return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListMessagesAsync(string threadId, int? limit, MessageCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - - ClientResult result = await ListMessagesAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListMessagesResponse)result, result.GetRawResponse()); - } } } diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index d47948c88..a42a2b76d 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -39,22 +39,6 @@ public virtual async Task ListRunsAsync(string threadId, int? limi return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListRuns(string threadId, int? limit, RunCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - - ClientResult result = ListRuns(threadId, limit, order.ToString(), after, before, null); - return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListRunsAsync(string threadId, int? limit, RunCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - - ClientResult result = await ListRunsAsync(threadId, limit, order.ToString(), after, before, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListRunsResponse)result, result.GetRawResponse()); - } - public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -72,23 +56,5 @@ public virtual async Task ListRunStepsAsync(string threadId, strin using PipelineMessage message = CreateListRunStepsRequest(threadId, runId, limit, order, after, before, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - - public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(runId, nameof(runId)); - - ClientResult result = ListRunSteps(threadId, runId, limit, order.ToString(), after, before, null); - return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); - } - - public virtual async Task> ListRunStepsAsync(string threadId, string runId, int? limit, RunStepCollectionOrder? order, string after, string before) - { - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(runId, nameof(runId)); - - ClientResult result = await ListRunStepsAsync(threadId, runId, limit, order.ToString(), after, before, null).ConfigureAwait(false); - return ClientResult.FromValue((InternalListRunStepsResponse)result, result.GetRawResponse()); - } } } From 5375b4aef8d21317c5ea41b81ac665c2048dd0bd Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 16:16:47 -0800 Subject: [PATCH 48/54] regen --- .../src/Generated/InternalAssistantMessageClient.cs | 4 ++-- .dotnet/src/Generated/InternalAssistantRunClient.cs | 8 ++++---- .dotnet/src/Generated/InternalUploadsClient.cs | 12 ++++++------ .dotnet/src/Generated/LegacyCompletionClient.cs | 4 ++-- .dotnet/src/Generated/VectorStoreClient.cs | 4 ++-- .plugin/generator/src/OpenAI.Library.Plugin.csproj | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index 98aeac824..cb257f9be 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -23,7 +23,7 @@ protected InternalAssistantMessageClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -31,7 +31,7 @@ public virtual ClientResult ListMessages(string threadId, int? limit, string ord return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ListMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index a42a2b76d..6ce1cd865 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -23,7 +23,7 @@ protected InternalAssistantRunClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -31,7 +31,7 @@ public virtual ClientResult ListRuns(string threadId, int? limit, string order, return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ListRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -39,7 +39,7 @@ public virtual async Task ListRunsAsync(string threadId, int? limi return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(runId, nameof(runId)); @@ -48,7 +48,7 @@ public virtual ClientResult ListRunSteps(string threadId, string runId, int? lim return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options) + public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(runId, nameof(runId)); diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index 0c90b7dd3..1829e63f0 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -23,7 +23,7 @@ protected InternalUploadsClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options) + public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); @@ -31,7 +31,7 @@ public virtual ClientResult CreateUpload(BinaryContent content, RequestOptions o return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options) + public virtual async Task CreateUploadAsync(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); @@ -55,7 +55,7 @@ public virtual async Task> CreateUploadAsync(Intern return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options) + public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) { Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); @@ -64,7 +64,7 @@ public virtual ClientResult AddUploadPart(string uploadId, BinaryContent content return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options) + public virtual async Task AddUploadPartAsync(string uploadId, BinaryContent content, string contentType, RequestOptions options = null) { Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); @@ -73,7 +73,7 @@ public virtual async Task AddUploadPartAsync(string uploadId, Bina return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options) + public virtual ClientResult CompleteUpload(string uploadId, BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); @@ -82,7 +82,7 @@ public virtual ClientResult CompleteUpload(string uploadId, BinaryContent conten return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options) + public virtual async Task CompleteUploadAsync(string uploadId, BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(content, nameof(content)); diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index 63c351a28..2ff0cf4c7 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -23,7 +23,7 @@ protected LegacyCompletionClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options) + public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); @@ -31,7 +31,7 @@ public virtual ClientResult CreateCompletion(BinaryContent content, RequestOptio return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options) + public virtual async Task CreateCompletionAsync(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index fd35bbb8a..975fb140c 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -23,7 +23,7 @@ protected VectorStoreClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options) + public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); @@ -31,7 +31,7 @@ public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOpti return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options) + public virtual async Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options = null) { Argument.AssertNotNull(content, nameof(content)); diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index ccc71d135..055e8a6fa 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From bdcb24279b41e8f1e0ac36f23c486ac7efee8290 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 16:20:05 -0800 Subject: [PATCH 49/54] export api --- .dotnet/api/OpenAI.netstandard2.0.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.dotnet/api/OpenAI.netstandard2.0.cs b/.dotnet/api/OpenAI.netstandard2.0.cs index 3e89cd75d..fcdeb6540 100644 --- a/.dotnet/api/OpenAI.netstandard2.0.cs +++ b/.dotnet/api/OpenAI.netstandard2.0.cs @@ -3848,11 +3848,11 @@ public class VectorStoreClient { public virtual CreateVectorStoreOperation CreateVectorStore(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); [EditorBrowsable(EditorBrowsableState.Never)] public virtual CreateVectorStoreOperation CreateVectorStore(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); - public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options); + public virtual ClientResult CreateVectorStore(BinaryContent content, RequestOptions options = null); public virtual Task CreateVectorStoreAsync(bool waitUntilCompleted, VectorStoreCreationOptions vectorStore = null, CancellationToken cancellationToken = default); [EditorBrowsable(EditorBrowsableState.Never)] public virtual Task CreateVectorStoreAsync(BinaryContent content, bool waitUntilCompleted, RequestOptions options = null); - public virtual Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options); + public virtual Task CreateVectorStoreAsync(BinaryContent content, RequestOptions options = null); [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult DeleteVectorStore(string vectorStoreId, RequestOptions options); public virtual ClientResult DeleteVectorStore(string vectorStoreId, CancellationToken cancellationToken = default); From e98fee8899b493548a5be1c46feeccee2680a2bd Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 17:24:52 -0800 Subject: [PATCH 50/54] Remove unnecessary suppression and pass wire options --- .../Custom/Assistants/MessageCreationAttachment.cs | 12 +----------- .../Assistants/Streaming/RequiredActionUpdate.cs | 2 +- .../Generated/Models/MessageCreationAttachment.cs | 11 +++++++++++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs index bbc1b1a0d..c75d00c7b 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs @@ -8,19 +8,9 @@ namespace OpenAI.Assistants; [Experimental("OPENAI001")] [CodeGenModel("CreateMessageRequestAttachment")] -[CodeGenSuppress(nameof(MessageCreationAttachment), typeof(IEnumerable), typeof(string))] [CodeGenSerialization(nameof(Tools), "tools", SerializationValueHook = nameof(SerializeTools), DeserializationValueHook = nameof(DeserializeTools))] public partial class MessageCreationAttachment { - public MessageCreationAttachment(string fileId, IEnumerable tools) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(tools, nameof(tools)); - - FileId = fileId; - Tools = tools.ToList(); - } - /// /// The tools to which the attachment applies to. /// @@ -50,7 +40,7 @@ private static void DeserializeTools(JsonProperty property, ref IReadOnlyList deserializedTools = []; foreach (JsonElement toolElement in property.Value.EnumerateArray()) { - deserializedTools.Add(ToolDefinition.DeserializeToolDefinition(toolElement, null)); + deserializedTools.Add(ToolDefinition.DeserializeToolDefinition(toolElement, ModelSerializationExtensions.WireOptions)); } tools = deserializedTools; } diff --git a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs index 8043b3d35..8a6a9d805 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs @@ -43,7 +43,7 @@ internal RequiredActionUpdate(ThreadRun run, RequiredAction action) internal static IEnumerable DeserializeRequiredActionUpdates(JsonElement element) { - ThreadRun run = ThreadRun.DeserializeThreadRun(element, null); + ThreadRun run = ThreadRun.DeserializeThreadRun(element, ModelSerializationExtensions.WireOptions); List updates = []; foreach (RequiredAction action in run.RequiredActions ?? []) { diff --git a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs index 57497ee3a..7c9a2606c 100644 --- a/.dotnet/src/Generated/Models/MessageCreationAttachment.cs +++ b/.dotnet/src/Generated/Models/MessageCreationAttachment.cs @@ -4,6 +4,8 @@ using System; using System.Collections.Generic; +using System.Linq; +using OpenAI; namespace OpenAI.Assistants { @@ -11,6 +13,15 @@ public partial class MessageCreationAttachment { private protected IDictionary _additionalBinaryDataProperties; + public MessageCreationAttachment(string fileId, IEnumerable tools) + { + Argument.AssertNotNull(fileId, nameof(fileId)); + Argument.AssertNotNull(tools, nameof(tools)); + + FileId = fileId; + Tools = tools.ToList(); + } + internal MessageCreationAttachment(string fileId, IReadOnlyList tools, IDictionary additionalBinaryDataProperties) { FileId = fileId; From 1faf8fdcebfbc2dfba9405711099734ba8190305 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 7 Nov 2024 17:42:55 -0800 Subject: [PATCH 51/54] another wireoptions --- .../InternalAsyncStreamingChatCompletionUpdateCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs b/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs index f7dcf8c1d..847d8c89d 100644 --- a/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs +++ b/.dotnet/src/Custom/Chat/Streaming/InternalAsyncStreamingChatCompletionUpdateCollection.cs @@ -107,7 +107,7 @@ async ValueTask IAsyncEnumerator.MoveNextAs } using JsonDocument doc = JsonDocument.Parse(_events.Current.Data); - List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, null)]; + List updates = [StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(doc.RootElement, ModelSerializationExtensions.WireOptions)]; _updates = updates.GetEnumerator(); if (_updates.MoveNext()) From b1c86053df58fba5b3948500add2b51a37817b7d Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 13 Nov 2024 15:07:15 -0800 Subject: [PATCH 52/54] regen with latest generator --- .../src/Generated/Internal/ClientPipelineExtensions.cs | 5 ----- .dotnet/src/Generated/InternalAssistantMessageClient.cs | 4 ++-- .dotnet/src/Generated/InternalAssistantRunClient.cs | 8 ++++---- .plugin/generator/src/OpenAI.Library.Plugin.csproj | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs index ae7f6f693..c51dd675b 100644 --- a/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs +++ b/.dotnet/src/Generated/Internal/ClientPipelineExtensions.cs @@ -37,10 +37,5 @@ public static ClientResult ProcessHeadAsBoolMessage(this ClientPipeline pi return new ErrorResult(response, new ClientResultException(response)); } } - - private static PipelineResponse ExtractResponseContent(PipelineMessage message) - { - return message.ExtractResponse(); - } } } diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index cb257f9be..803c34566 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -23,7 +23,7 @@ protected InternalAssistantMessageClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult ListMessages(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual ClientResult ListMessages(string threadId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -31,7 +31,7 @@ public virtual ClientResult ListMessages(string threadId, int? limit, string ord return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListMessagesAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual async Task ListMessagesAsync(string threadId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index 6ce1cd865..471afe876 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -23,7 +23,7 @@ protected InternalAssistantRunClient() public ClientPipeline Pipeline { get; } - public virtual ClientResult ListRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual ClientResult ListRuns(string threadId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -31,7 +31,7 @@ public virtual ClientResult ListRuns(string threadId, int? limit, string order, return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual async Task ListRunsAsync(string threadId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); @@ -39,7 +39,7 @@ public virtual async Task ListRunsAsync(string threadId, int? limi return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual ClientResult ListRunSteps(string threadId, string runId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(runId, nameof(runId)); @@ -48,7 +48,7 @@ public virtual ClientResult ListRunSteps(string threadId, string runId, int? lim return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } - public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options = null) + public virtual async Task ListRunStepsAsync(string threadId, string runId, int? limit = null, string order = null, string after = null, string before = null, RequestOptions options = null) { Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(runId, nameof(runId)); diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 055e8a6fa..b74524eb7 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + From 1b3ff72d235e23e09c3395bee4c801272b077250 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 14 Nov 2024 09:58:44 -0800 Subject: [PATCH 53/54] regen against latest --- .../Assistants/FunctionToolDefinition.cs | 6 +- .../ConversationFunctionTool.cs | 4 +- .../AssistantChatMessage.Serialization.cs | 34 ++-- .../Generated/Models/AssistantChatMessage.cs | 2 +- .../ConversationErrorUpdate.Serialization.cs | 14 +- .../Models/ConversationErrorUpdate.cs | 4 +- .../ConversationFunctionTool.Serialization.cs | 16 +- ...InputAudioCommittedUpdate.Serialization.cs | 22 +-- .../ConversationInputAudioCommittedUpdate.cs | 4 +- ...InputSpeechFinishedUpdate.Serialization.cs | 22 +-- .../ConversationInputSpeechFinishedUpdate.cs | 4 +- ...nInputSpeechStartedUpdate.Serialization.cs | 22 +-- .../ConversationInputSpeechStartedUpdate.cs | 4 +- ...TranscriptionFailedUpdate.Serialization.cs | 34 ++-- ...versationInputTranscriptionFailedUpdate.cs | 4 +- ...anscriptionFinishedUpdate.Serialization.cs | 34 ++-- ...rsationInputTranscriptionFinishedUpdate.cs | 4 +- ...ersationItemCreatedUpdate.Serialization.cs | 22 +-- .../Models/ConversationItemCreatedUpdate.cs | 4 +- ...ersationItemDeletedUpdate.Serialization.cs | 14 +- .../Models/ConversationItemDeletedUpdate.cs | 4 +- ...eamingAudioFinishedUpdate.Serialization.cs | 34 ++-- ...rsationItemStreamingAudioFinishedUpdate.cs | 4 +- ...anscriptionFinishedUpdate.Serialization.cs | 34 ++-- ...reamingAudioTranscriptionFinishedUpdate.cs | 4 +- ...emStreamingFinishedUpdate.Serialization.cs | 34 ++-- ...ConversationItemStreamingFinishedUpdate.cs | 4 +- ...temStreamingStartedUpdate.Serialization.cs | 34 ++-- .../ConversationItemStreamingStartedUpdate.cs | 4 +- ...reamingTextFinishedUpdate.Serialization.cs | 34 ++-- ...ersationItemStreamingTextFinishedUpdate.cs | 4 +- ...sationItemTruncatedUpdate.Serialization.cs | 34 ++-- .../Models/ConversationItemTruncatedUpdate.cs | 4 +- ...versationRateLimitsUpdate.Serialization.cs | 24 +-- .../Models/ConversationRateLimitsUpdate.cs | 4 +- ...ionResponseFinishedUpdate.Serialization.cs | 14 +- .../ConversationResponseFinishedUpdate.cs | 4 +- ...tionResponseStartedUpdate.Serialization.cs | 14 +- .../ConversationResponseStartedUpdate.cs | 4 +- ...onSessionConfiguredUpdate.Serialization.cs | 14 +- .../ConversationSessionConfiguredUpdate.cs | 4 +- ...ationSessionStartedUpdate.Serialization.cs | 14 +- .../ConversationSessionStartedUpdate.cs | 4 +- .../FileSearchToolDefinition.Serialization.cs | 14 +- .../Models/FileSearchToolDefinition.cs | 2 +- .../FunctionChatMessage.Serialization.cs | 14 +- .../Generated/Models/FunctionChatMessage.cs | 2 +- .../FunctionToolDefinition.Serialization.cs | 12 +- ...tResponseFormatJsonSchema.Serialization.cs | 12 +- ...ternalAssistantResponseFormatJsonSchema.cs | 2 +- ...tResponseFormatJsonSchema.Serialization.cs | 12 +- .../InternalChatResponseFormatJsonSchema.cs | 2 +- ...onRequestAssistantMessage.Serialization.cs | 34 ++-- ...neChatCompletionRequestAssistantMessage.cs | 2 +- ...ineTuningIntegrationWandb.Serialization.cs | 12 +- .../InternalFineTuningIntegrationWandb.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 20 +-- ...ontentTextAnnotationsFileCitationObject.cs | 2 +- ...AnnotationsFilePathObject.Serialization.cs | 20 +-- ...ageContentTextAnnotationsFilePathObject.cs | 2 +- ...ltaContentImageFileObject.Serialization.cs | 16 +- ...ernalMessageDeltaContentImageFileObject.cs | 2 +- ...eltaContentImageUrlObject.Serialization.cs | 16 +- ...ternalMessageDeltaContentImageUrlObject.cs | 2 +- ...DeltaContentRefusalObject.Serialization.cs | 16 +- ...nternalMessageDeltaContentRefusalObject.cs | 2 +- ...tationsFileCitationObject.Serialization.cs | 20 +-- ...ontentTextAnnotationsFileCitationObject.cs | 2 +- ...AnnotationsFilePathObject.Serialization.cs | 20 +-- ...ltaContentTextAnnotationsFilePathObject.cs | 2 +- ...ageDeltaContentTextObject.Serialization.cs | 16 +- .../InternalMessageDeltaContentTextObject.cs | 2 +- ...alMessageImageFileContent.Serialization.cs | 4 +- .../Models/InternalMessageImageFileContent.cs | 2 +- ...nalMessageImageUrlContent.Serialization.cs | 4 +- .../Models/InternalMessageImageUrlContent.cs | 2 +- ...rnalMessageRefusalContent.Serialization.cs | 4 +- .../Models/InternalMessageRefusalContent.cs | 2 +- ...entConversationItemCreate.Serialization.cs | 22 +-- ...altimeClientEventConversationItemCreate.cs | 2 +- ...entConversationItemDelete.Serialization.cs | 14 +- ...altimeClientEventConversationItemDelete.cs | 2 +- ...tConversationItemTruncate.Serialization.cs | 34 ++-- ...timeClientEventConversationItemTruncate.cs | 2 +- ...entInputAudioBufferAppend.Serialization.cs | 14 +- ...altimeClientEventInputAudioBufferAppend.cs | 2 +- ...ClientEventResponseCreate.Serialization.cs | 14 +- ...ternalRealtimeClientEventResponseCreate.cs | 2 +- ...eClientEventSessionUpdate.Serialization.cs | 14 +- ...nternalRealtimeClientEventSessionUpdate.cs | 2 +- ...questAssistantMessageItem.Serialization.cs | 42 ++--- ...rnalRealtimeRequestAssistantMessageItem.cs | 2 +- ...meRequestAudioContentPart.Serialization.cs | 16 +- ...InternalRealtimeRequestAudioContentPart.cs | 2 +- ...meRequestFunctionCallItem.Serialization.cs | 34 ++-- ...InternalRealtimeRequestFunctionCallItem.cs | 2 +- ...estFunctionCallOutputItem.Serialization.cs | 22 +-- ...alRealtimeRequestFunctionCallOutputItem.cs | 2 +- .../InternalRealtimeRequestMessageItem.cs | 2 +- ...eRequestSystemMessageItem.Serialization.cs | 42 ++--- ...nternalRealtimeRequestSystemMessageItem.cs | 2 +- ...imeRequestTextContentPart.Serialization.cs | 16 +- .../InternalRealtimeRequestTextContentPart.cs | 2 +- ...imeRequestUserMessageItem.Serialization.cs | 42 ++--- .../InternalRealtimeRequestUserMessageItem.cs | 2 +- ...eResponseAudioContentPart.Serialization.cs | 16 +- ...nternalRealtimeResponseAudioContentPart.cs | 2 +- ...eResponseFunctionCallItem.Serialization.cs | 56 +++--- ...nternalRealtimeResponseFunctionCallItem.cs | 4 +- ...nseFunctionCallOutputItem.Serialization.cs | 30 ++-- ...lRealtimeResponseFunctionCallOutputItem.cs | 4 +- ...altimeResponseMessageItem.Serialization.cs | 54 +++--- .../InternalRealtimeResponseMessageItem.cs | 4 +- ...meResponseTextContentPart.Serialization.cs | 16 +- ...InternalRealtimeResponseTextContentPart.cs | 2 +- ...rEventConversationCreated.Serialization.cs | 14 +- ...lRealtimeServerEventConversationCreated.cs | 4 +- ...erEventResponseAudioDelta.Serialization.cs | 34 ++-- ...alRealtimeServerEventResponseAudioDelta.cs | 4 +- ...ponseAudioTranscriptDelta.Serialization.cs | 34 ++-- ...ServerEventResponseAudioTranscriptDelta.cs | 4 +- ...tResponseContentPartAdded.Serialization.cs | 34 ++-- ...timeServerEventResponseContentPartAdded.cs | 4 +- ...ntResponseContentPartDone.Serialization.cs | 34 ++-- ...ltimeServerEventResponseContentPartDone.cs | 4 +- ...unctionCallArgumentsDelta.Serialization.cs | 34 ++-- ...EventResponseFunctionCallArgumentsDelta.cs | 4 +- ...FunctionCallArgumentsDone.Serialization.cs | 34 ++-- ...rEventResponseFunctionCallArgumentsDone.cs | 4 +- ...verEventResponseTextDelta.Serialization.cs | 34 ++-- ...nalRealtimeServerEventResponseTextDelta.cs | 4 +- ...imeServerVadTurnDetection.Serialization.cs | 16 +- .../InternalRealtimeServerVadTurnDetection.cs | 2 +- ...eToolChoiceFunctionObject.Serialization.cs | 12 +- ...nternalRealtimeToolChoiceFunctionObject.cs | 2 +- ...RequestMessageTextContent.Serialization.cs | 4 +- .../InternalRequestMessageTextContent.cs | 2 +- ...lResponseFormatJsonSchema.Serialization.cs | 12 +- .../InternalResponseFormatJsonSchema.cs | 2 +- ...esponseMessageTextContent.Serialization.cs | 4 +- .../InternalResponseMessageTextContent.cs | 2 +- ...pCodeInterpreterLogOutput.Serialization.cs | 12 +- ...InternalRunStepCodeInterpreterLogOutput.cs | 2 +- ...nterpreterToolCallDetails.Serialization.cs | 16 +- ...alRunStepCodeInterpreterToolCallDetails.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 14 +- ...epDeltaStepDetailsMessageCreationObject.cs | 2 +- ...etailsToolCallsCodeObject.Serialization.cs | 16 +- ...StepDeltaStepDetailsToolCallsCodeObject.cs | 2 +- ...allsCodeOutputImageObject.Serialization.cs | 16 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 2 +- ...CallsCodeOutputLogsObject.Serialization.cs | 16 +- ...tepDetailsToolCallsCodeOutputLogsObject.cs | 2 +- ...ToolCallsFileSearchObject.Serialization.cs | 16 +- ...ltaStepDetailsToolCallsFileSearchObject.cs | 2 +- ...lsToolCallsFunctionObject.Serialization.cs | 16 +- ...DeltaStepDetailsToolCallsFunctionObject.cs | 2 +- ...tepDetailsToolCallsObject.Serialization.cs | 14 +- ...lRunStepDeltaStepDetailsToolCallsObject.cs | 2 +- ...ailsMessageCreationObject.Serialization.cs | 12 +- ...rnalRunStepDetailsMessageCreationObject.cs | 2 +- ...allsCodeOutputImageObject.Serialization.cs | 12 +- ...epDetailsToolCallsCodeOutputImageObject.cs | 2 +- ...tepDetailsToolCallsObject.Serialization.cs | 14 +- .../InternalRunStepDetailsToolCallsObject.cs | 2 +- ...FileSearchToolCallDetails.Serialization.cs | 16 +- ...nternalRunStepFileSearchToolCallDetails.cs | 2 +- ...epFunctionToolCallDetails.Serialization.cs | 16 +- .../InternalRunStepFunctionToolCallDetails.cs | 2 +- ...nkingStrategyRequestParam.Serialization.cs | 12 +- ...ernalStaticChunkingStrategyRequestParam.cs | 2 +- ...taticFileChunkingStrategy.Serialization.cs | 12 +- .../Models/StaticFileChunkingStrategy.cs | 2 +- .../Models/SystemChatMessage.Serialization.cs | 14 +- .../src/Generated/Models/SystemChatMessage.cs | 2 +- .../Models/ToolChatMessage.Serialization.cs | 14 +- .../src/Generated/Models/ToolChatMessage.cs | 2 +- ...ealtimeRequestMessageItem.Serialization.cs | 26 +-- .../UnknownRealtimeRequestMessageItem.cs | 2 +- .../Models/UserChatMessage.Serialization.cs | 14 +- .../src/Generated/Models/UserChatMessage.cs | 2 +- ...ightsAndBiasesIntegration.Serialization.cs | 12 +- .../Models/WeightsAndBiasesIntegration.cs | 2 +- .dotnet/src/Generated/OpenAIModelFactory.cs | 170 +++++++++--------- .../src/OpenAI.Library.Plugin.csproj | 2 +- .scripts/Edit-Serialization.ps1 | 48 ++--- 186 files changed, 1181 insertions(+), 1181 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs index b5c46acaf..448cca2c4 100644 --- a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs @@ -42,7 +42,7 @@ public bool? StrictParameterSchemaEnabled } /// - /// Creates a new instance of . + /// Creates a new instance of . /// [SetsRequiredMembers] public FunctionToolDefinition(string name) @@ -53,7 +53,7 @@ public FunctionToolDefinition(string name) } /// - /// Creates a new instance of . + /// Creates a new instance of . /// public FunctionToolDefinition() : base("function") @@ -62,7 +62,7 @@ public FunctionToolDefinition() } [SetsRequiredMembers] - internal FunctionToolDefinition(InternalFunctionDefinition function, string type, IDictionary serializedAdditionalRawData) + internal FunctionToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalFunctionDefinition function) : base(type, serializedAdditionalRawData) { _internalFunction = function; diff --git a/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs b/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs index 0f4a1305f..dcb2621ee 100644 --- a/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs +++ b/.dotnet/src/Custom/RealtimeConversation/ConversationFunctionTool.cs @@ -40,13 +40,13 @@ public ConversationFunctionTool() : base(ConversationToolKind.Function, null) [SetsRequiredMembers] public ConversationFunctionTool(string name) - : this(name, null, null, ConversationToolKind.Function, null) + : this(ConversationToolKind.Function, null, name, null, null) { Argument.AssertNotNull(name, nameof(name)); } [SetsRequiredMembers] - internal ConversationFunctionTool(string name, string description, BinaryData parameters, ConversationToolKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) + internal ConversationFunctionTool(ConversationToolKind kind, IDictionary serializedAdditionalRawData, string name, string description, BinaryData parameters) : base(kind, serializedAdditionalRawData) { _name = name; _description = description; diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs index a84901fd9..dd6564373 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.Serialization.cs @@ -81,15 +81,25 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement { return null; } + Chat.ChatMessageRole role = default; + ChatMessageContent content = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string refusal = default; string participantName = default; IList toolCalls = default; ChatFunctionCall functionCall = default; - Chat.ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("role"u8)) + { + role = prop.Value.GetString().ToChatMessageRole(); + continue; + } + if (prop.NameEquals("content"u8)) + { + DeserializeContentValue(prop, ref content); + continue; + } if (prop.NameEquals("refusal"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -129,16 +139,6 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (prop.NameEquals("role"u8)) - { - role = prop.Value.GetString().ToChatMessageRole(); - continue; - } - if (prop.NameEquals("content"u8)) - { - DeserializeContentValue(prop, ref content); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -146,13 +146,13 @@ internal static AssistantChatMessage DeserializeAssistantChatMessage(JsonElement } // CUSTOM: Initialize Content collection property. return new AssistantChatMessage( + role, + content ?? new ChatMessageContent(), + additionalBinaryDataProperties, refusal, participantName, toolCalls ?? new ChangeTrackingList(), - functionCall, - role, - content ?? new ChatMessageContent(), - additionalBinaryDataProperties); + functionCall); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/AssistantChatMessage.cs b/.dotnet/src/Generated/Models/AssistantChatMessage.cs index a4f904e3a..e93ddae80 100644 --- a/.dotnet/src/Generated/Models/AssistantChatMessage.cs +++ b/.dotnet/src/Generated/Models/AssistantChatMessage.cs @@ -9,7 +9,7 @@ namespace OpenAI.Chat { public partial class AssistantChatMessage : ChatMessage { - internal AssistantChatMessage(string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + internal AssistantChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, additionalBinaryDataProperties) { Refusal = refusal; ParticipantName = participantName; diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs index 173ba3992..2dc634db0 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE { return null; } - InternalRealtimeServerEventErrorError error = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeServerEventErrorError error = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("error"u8)) - { - error = InternalRealtimeServerEventErrorError.DeserializeInternalRealtimeServerEventErrorError(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationErrorUpdate DeserializeConversationErrorUpdate(JsonE kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("error"u8)) + { + error = InternalRealtimeServerEventErrorError.DeserializeInternalRealtimeServerEventErrorError(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationErrorUpdate(error, eventId, kind, additionalBinaryDataProperties); + return new ConversationErrorUpdate(eventId, kind, additionalBinaryDataProperties, error); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs index d3b65ae64..706445488 100644 --- a/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationErrorUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationErrorUpdate : ConversationUpdate { - internal ConversationErrorUpdate(InternalRealtimeServerEventErrorError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) + internal ConversationErrorUpdate(string eventId, InternalRealtimeServerEventErrorError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.Error) { _error = error; } - internal ConversationErrorUpdate(InternalRealtimeServerEventErrorError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationErrorUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeServerEventErrorError error) : base(eventId, kind, additionalBinaryDataProperties) { _error = error; } diff --git a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs index aeb95f8c1..430145248 100644 --- a/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationFunctionTool.Serialization.cs @@ -71,13 +71,18 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso { return null; } + ConversationToolKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; BinaryData parameters = default; - ConversationToolKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + kind = new ConversationToolKind(prop.Value.GetString()); + continue; + } if (prop.NameEquals("name"u8)) { name = prop.Value.GetString(); @@ -97,17 +102,12 @@ internal static ConversationFunctionTool DeserializeConversationFunctionTool(Jso parameters = BinaryData.FromString(prop.Value.GetRawText()); continue; } - if (prop.NameEquals("type"u8)) - { - kind = new ConversationToolKind(prop.Value.GetString()); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationFunctionTool(name, description, parameters, kind, additionalBinaryDataProperties); + return new ConversationFunctionTool(kind, additionalBinaryDataProperties, name, description, parameters); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs index 7945ca54e..f111f6e0c 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.Serialization.cs @@ -63,31 +63,31 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp { return null; } - string previousItemId = default; - string itemId = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string previousItemId = default; + string itemId = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("previous_item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - previousItemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("type"u8)) { - itemId = prop.Value.GetString(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("previous_item_id"u8)) { - eventId = prop.Value.GetString(); + previousItemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("item_id"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + itemId = prop.Value.GetString(); continue; } if (true) @@ -95,7 +95,7 @@ internal static ConversationInputAudioCommittedUpdate DeserializeConversationInp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputAudioCommittedUpdate(previousItemId, itemId, eventId, kind, additionalBinaryDataProperties); + return new ConversationInputAudioCommittedUpdate(eventId, kind, additionalBinaryDataProperties, previousItemId, itemId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs index b9b6f36c8..7368ff34e 100644 --- a/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputAudioCommittedUpdate.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputAudioCommittedUpdate : ConversationUpdate { - internal ConversationInputAudioCommittedUpdate(string previousItemId, string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted) + internal ConversationInputAudioCommittedUpdate(string eventId, string previousItemId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted) { PreviousItemId = previousItemId; ItemId = itemId; } - internal ConversationInputAudioCommittedUpdate(string previousItemId, string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputAudioCommittedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string previousItemId, string itemId) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs index 81a115f6f..3a8e0872c 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.Serialization.cs @@ -63,31 +63,31 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp { return null; } - string itemId = default; - int audioEndMs = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int audioEndMs = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("audio_end_ms"u8)) + if (prop.NameEquals("type"u8)) { - audioEndMs = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("item_id"u8)) { - eventId = prop.Value.GetString(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("audio_end_ms"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + audioEndMs = prop.Value.GetInt32(); continue; } if (true) @@ -95,7 +95,7 @@ internal static ConversationInputSpeechFinishedUpdate DeserializeConversationInp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechFinishedUpdate(itemId, audioEndMs, eventId, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechFinishedUpdate(eventId, kind, additionalBinaryDataProperties, itemId, audioEndMs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs index a04e911be..34f97eeca 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechFinishedUpdate.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechFinishedUpdate : ConversationUpdate { - internal ConversationInputSpeechFinishedUpdate(string itemId, int audioEndMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped) + internal ConversationInputSpeechFinishedUpdate(string eventId, string itemId, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped) { ItemId = itemId; _audioEndMs = audioEndMs; } - internal ConversationInputSpeechFinishedUpdate(string itemId, int audioEndMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId, int audioEndMs) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; _audioEndMs = audioEndMs; diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs index 032794e3b..69ec19c46 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.Serialization.cs @@ -63,31 +63,31 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu { return null; } - string itemId = default; - int audioStartMs = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int audioStartMs = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("audio_start_ms"u8)) + if (prop.NameEquals("type"u8)) { - audioStartMs = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("item_id"u8)) { - eventId = prop.Value.GetString(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("audio_start_ms"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + audioStartMs = prop.Value.GetInt32(); continue; } if (true) @@ -95,7 +95,7 @@ internal static ConversationInputSpeechStartedUpdate DeserializeConversationInpu additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationInputSpeechStartedUpdate(itemId, audioStartMs, eventId, kind, additionalBinaryDataProperties); + return new ConversationInputSpeechStartedUpdate(eventId, kind, additionalBinaryDataProperties, itemId, audioStartMs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs index 3b79c17b9..3c66eb859 100644 --- a/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputSpeechStartedUpdate.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputSpeechStartedUpdate : ConversationUpdate { - internal ConversationInputSpeechStartedUpdate(string itemId, int audioStartMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted) + internal ConversationInputSpeechStartedUpdate(string eventId, string itemId, int audioStartMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted) { ItemId = itemId; _audioStartMs = audioStartMs; } - internal ConversationInputSpeechStartedUpdate(string itemId, int audioStartMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputSpeechStartedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId, int audioStartMs) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; _audioStartMs = audioStartMs; diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs index da40f59bf..885a53b40 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.Serialization.cs @@ -68,37 +68,37 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati { return null; } - string itemId = default; - int contentIndex = default; - InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int contentIndex = default; + InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("content_index"u8)) + if (prop.NameEquals("type"u8)) { - contentIndex = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("error"u8)) + if (prop.NameEquals("item_id"u8)) { - error = InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(prop.Value, options); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("content_index"u8)) { - eventId = prop.Value.GetString(); + contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("error"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + error = InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError.DeserializeInternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError(prop.Value, options); continue; } if (true) @@ -107,12 +107,12 @@ internal static ConversationInputTranscriptionFailedUpdate DeserializeConversati } } return new ConversationInputTranscriptionFailedUpdate( - itemId, - contentIndex, - error, eventId, kind, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + itemId, + contentIndex, + error); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs index 2f3d5db45..e9d2017ac 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFailedUpdate.cs @@ -9,14 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFailedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed) + internal ConversationInputTranscriptionFailedUpdate(string eventId, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed) { ItemId = itemId; ContentIndex = contentIndex; _error = error; } - internal ConversationInputTranscriptionFailedUpdate(string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFailedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId, int contentIndex, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs index c5507ce34..03a517a46 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.Serialization.cs @@ -68,37 +68,37 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa { return null; } - string itemId = default; - int contentIndex = default; - string transcript = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int contentIndex = default; + string transcript = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("content_index"u8)) + if (prop.NameEquals("type"u8)) { - contentIndex = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("transcript"u8)) + if (prop.NameEquals("item_id"u8)) { - transcript = prop.Value.GetString(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("content_index"u8)) { - eventId = prop.Value.GetString(); + contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("transcript"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + transcript = prop.Value.GetString(); continue; } if (true) @@ -107,12 +107,12 @@ internal static ConversationInputTranscriptionFinishedUpdate DeserializeConversa } } return new ConversationInputTranscriptionFinishedUpdate( - itemId, - contentIndex, - transcript, eventId, kind, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + itemId, + contentIndex, + transcript); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs index 4a5b9f6f8..d96e14344 100644 --- a/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationInputTranscriptionFinishedUpdate.cs @@ -9,14 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationInputTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished) + internal ConversationInputTranscriptionFinishedUpdate(string eventId, string itemId, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished) { ItemId = itemId; ContentIndex = contentIndex; Transcript = transcript; } - internal ConversationInputTranscriptionFinishedUpdate(string itemId, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationInputTranscriptionFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId, int contentIndex, string transcript) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs index 339dbc7ff..57384093e 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.Serialization.cs @@ -63,31 +63,31 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated { return null; } - string previousItemId = default; - InternalRealtimeResponseItem internalItem = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string previousItemId = default; + InternalRealtimeResponseItem internalItem = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("previous_item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - previousItemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("item"u8)) + if (prop.NameEquals("type"u8)) { - internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("previous_item_id"u8)) { - eventId = prop.Value.GetString(); + previousItemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("item"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } if (true) @@ -95,7 +95,7 @@ internal static ConversationItemCreatedUpdate DeserializeConversationItemCreated additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationItemCreatedUpdate(previousItemId, internalItem, eventId, kind, additionalBinaryDataProperties); + return new ConversationItemCreatedUpdate(eventId, kind, additionalBinaryDataProperties, previousItemId, internalItem); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs index dcca1b6b6..ea9d33b3d 100644 --- a/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemCreatedUpdate.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemCreatedUpdate : ConversationUpdate { - internal ConversationItemCreatedUpdate(string previousItemId, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated) + internal ConversationItemCreatedUpdate(string eventId, string previousItemId, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated) { PreviousItemId = previousItemId; _internalItem = internalItem; } - internal ConversationItemCreatedUpdate(string previousItemId, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemCreatedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string previousItemId, InternalRealtimeResponseItem internalItem) : base(eventId, kind, additionalBinaryDataProperties) { PreviousItemId = previousItemId; _internalItem = internalItem; diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs index a89239822..73928f1ee 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted { return null; } - string itemId = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) - { - itemId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationItemDeletedUpdate DeserializeConversationItemDeleted kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationItemDeletedUpdate(itemId, eventId, kind, additionalBinaryDataProperties); + return new ConversationItemDeletedUpdate(eventId, kind, additionalBinaryDataProperties, itemId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs index 5d40089a7..cf51f880f 100644 --- a/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemDeletedUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemDeletedUpdate : ConversationUpdate { - internal ConversationItemDeletedUpdate(string itemId, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) + internal ConversationItemDeletedUpdate(string eventId, string itemId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted) { ItemId = itemId; } - internal ConversationItemDeletedUpdate(string itemId, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemDeletedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs index cc913c0f5..ac6ea7c7c 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.Serialization.cs @@ -73,15 +73,25 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -102,29 +112,19 @@ internal static ConversationItemStreamingAudioFinishedUpdate DeserializeConversa contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new ConversationItemStreamingAudioFinishedUpdate( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, - contentIndex, - eventId, - kind, - additionalBinaryDataProperties); + contentIndex); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs index b18bb99f5..95ff09046 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingAudioFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished) + internal ConversationItemStreamingAudioFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished) { ResponseId = responseId; ItemId = itemId; @@ -17,7 +17,7 @@ internal ConversationItemStreamingAudioFinishedUpdate(string responseId, string ContentIndex = contentIndex; } - internal ConversationItemStreamingAudioFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingAudioFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs index 2e283df87..328a2fd15 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.Serialization.cs @@ -78,16 +78,26 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string transcript = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static ConversationItemStreamingAudioTranscriptionFinishedUpdate Deseri transcript = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - transcript, - eventId, - kind, - additionalBinaryDataProperties); + transcript); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs index 4e6fded03..32c919a71 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingAudioTranscriptionFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingAudioTranscriptionFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string transcript, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string respon Transcript = transcript; } - internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string transcript, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, string transcript) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs index 8513b0e02..2fc545199 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.Serialization.cs @@ -68,37 +68,37 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI { return null; } - string responseId = default; - int outputIndex = default; - InternalRealtimeResponseItem internalItem = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string responseId = default; + int outputIndex = default; + InternalRealtimeResponseItem internalItem = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("output_index"u8)) + if (prop.NameEquals("type"u8)) { - outputIndex = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("item"u8)) + if (prop.NameEquals("response_id"u8)) { - internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + responseId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("output_index"u8)) { - eventId = prop.Value.GetString(); + outputIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("item"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } if (true) @@ -107,12 +107,12 @@ internal static ConversationItemStreamingFinishedUpdate DeserializeConversationI } } return new ConversationItemStreamingFinishedUpdate( - responseId, - outputIndex, - internalItem, eventId, kind, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + responseId, + outputIndex, + internalItem); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs index 978ab8171..a178fe402 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingFinishedUpdate.cs @@ -9,14 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished) + internal ConversationItemStreamingFinishedUpdate(string eventId, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished) { ResponseId = responseId; OutputIndex = outputIndex; _internalItem = internalItem; } - internal ConversationItemStreamingFinishedUpdate(string responseId, int outputIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, int outputIndex, InternalRealtimeResponseItem internalItem) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; OutputIndex = outputIndex; diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs index 2a0e37c81..e0e227030 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.Serialization.cs @@ -68,37 +68,37 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt { return null; } - string responseId = default; - int itemIndex = default; - InternalRealtimeResponseItem internalItem = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string responseId = default; + int itemIndex = default; + InternalRealtimeResponseItem internalItem = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response_id"u8)) + if (prop.NameEquals("event_id"u8)) { - responseId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("output_index"u8)) + if (prop.NameEquals("type"u8)) { - itemIndex = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("item"u8)) + if (prop.NameEquals("response_id"u8)) { - internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); + responseId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("output_index"u8)) { - eventId = prop.Value.GetString(); + itemIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("item"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + internalItem = InternalRealtimeResponseItem.DeserializeInternalRealtimeResponseItem(prop.Value, options); continue; } if (true) @@ -107,12 +107,12 @@ internal static ConversationItemStreamingStartedUpdate DeserializeConversationIt } } return new ConversationItemStreamingStartedUpdate( - responseId, - itemIndex, - internalItem, eventId, kind, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + responseId, + itemIndex, + internalItem); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs index 8d035feda..227fad3fd 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingStartedUpdate.cs @@ -9,14 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingStartedUpdate : ConversationUpdate { - internal ConversationItemStreamingStartedUpdate(string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted) + internal ConversationItemStreamingStartedUpdate(string eventId, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted) { ResponseId = responseId; ItemIndex = itemIndex; _internalItem = internalItem; } - internal ConversationItemStreamingStartedUpdate(string responseId, int itemIndex, InternalRealtimeResponseItem internalItem, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingStartedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, int itemIndex, InternalRealtimeResponseItem internalItem) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemIndex = itemIndex; diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs index fc382fc3f..7fcbc0dbc 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.Serialization.cs @@ -78,16 +78,26 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string text = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static ConversationItemStreamingTextFinishedUpdate DeserializeConversat text = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new ConversationItemStreamingTextFinishedUpdate( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - text, - eventId, - kind, - additionalBinaryDataProperties); + text); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs index 53c3bc249..4fa53a154 100644 --- a/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemStreamingTextFinishedUpdate.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemStreamingTextFinishedUpdate : ConversationUpdate { - internal ConversationItemStreamingTextFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string text, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished) + internal ConversationItemStreamingTextFinishedUpdate(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal ConversationItemStreamingTextFinishedUpdate(string responseId, string i Text = text; } - internal ConversationItemStreamingTextFinishedUpdate(string responseId, string itemId, int outputIndex, int contentIndex, string text, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemStreamingTextFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, string text) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs index 34337c2aa..8560e0f66 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.Serialization.cs @@ -68,37 +68,37 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc { return null; } - string itemId = default; - int contentIndex = default; - int audioEndMs = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int contentIndex = default; + int audioEndMs = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("event_id"u8)) { - itemId = prop.Value.GetString(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("content_index"u8)) + if (prop.NameEquals("type"u8)) { - contentIndex = prop.Value.GetInt32(); + kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } - if (prop.NameEquals("audio_end_ms"u8)) + if (prop.NameEquals("item_id"u8)) { - audioEndMs = prop.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("content_index"u8)) { - eventId = prop.Value.GetString(); + contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("audio_end_ms"u8)) { - kind = prop.Value.GetString().ToConversationUpdateKind(); + audioEndMs = prop.Value.GetInt32(); continue; } if (true) @@ -107,12 +107,12 @@ internal static ConversationItemTruncatedUpdate DeserializeConversationItemTrunc } } return new ConversationItemTruncatedUpdate( - itemId, - contentIndex, - audioEndMs, eventId, kind, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + itemId, + contentIndex, + audioEndMs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs index a6deb2c27..af0f9a51a 100644 --- a/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationItemTruncatedUpdate.cs @@ -9,14 +9,14 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationItemTruncatedUpdate : ConversationUpdate { - internal ConversationItemTruncatedUpdate(string itemId, int contentIndex, int audioEndMs, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) + internal ConversationItemTruncatedUpdate(string eventId, string itemId, int contentIndex, int audioEndMs) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated) { ItemId = itemId; ContentIndex = contentIndex; AudioEndMs = audioEndMs; } - internal ConversationItemTruncatedUpdate(string itemId, int contentIndex, int audioEndMs, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationItemTruncatedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string itemId, int contentIndex, int audioEndMs) : base(eventId, kind, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs index 972c56881..b5f2a7e07 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.Serialization.cs @@ -63,22 +63,12 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp { return null; } - IReadOnlyList allDetails = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IReadOnlyList allDetails = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("rate_limits"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationRateLimitDetailsItem.DeserializeConversationRateLimitDetailsItem(item, options)); - } - allDetails = array; - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -89,12 +79,22 @@ internal static ConversationRateLimitsUpdate DeserializeConversationRateLimitsUp kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("rate_limits"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationRateLimitDetailsItem.DeserializeConversationRateLimitDetailsItem(item, options)); + } + allDetails = array; + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationRateLimitsUpdate(allDetails, eventId, kind, additionalBinaryDataProperties); + return new ConversationRateLimitsUpdate(eventId, kind, additionalBinaryDataProperties, allDetails); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs index 58f33f6d3..446f87f45 100644 --- a/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationRateLimitsUpdate.cs @@ -10,12 +10,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationRateLimitsUpdate : ConversationUpdate { - internal ConversationRateLimitsUpdate(IEnumerable allDetails, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) + internal ConversationRateLimitsUpdate(string eventId, IEnumerable allDetails) : base(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated) { AllDetails = allDetails.ToList(); } - internal ConversationRateLimitsUpdate(IReadOnlyList allDetails, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationRateLimitsUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, IReadOnlyList allDetails) : base(eventId, kind, additionalBinaryDataProperties) { AllDetails = allDetails; } diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs index c49ece6a0..4f77c879b 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon { return null; } - InternalRealtimeResponse internalResponse = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeResponse internalResponse = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) - { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationResponseFinishedUpdate DeserializeConversationRespon kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("response"u8)) + { + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseFinishedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseFinishedUpdate(eventId, kind, additionalBinaryDataProperties, internalResponse); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs index 524f32a41..9f8a13be7 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseFinishedUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseFinishedUpdate : ConversationUpdate { - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) + internal ConversationResponseFinishedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished) { _internalResponse = internalResponse; } - internal ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseFinishedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeResponse internalResponse) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs index 2339f8390..c449ef621 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons { return null; } - InternalRealtimeResponse internalResponse = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeResponse internalResponse = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) - { - internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationResponseStartedUpdate DeserializeConversationRespons kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("response"u8)) + { + internalResponse = InternalRealtimeResponse.DeserializeInternalRealtimeResponse(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationResponseStartedUpdate(internalResponse, eventId, kind, additionalBinaryDataProperties); + return new ConversationResponseStartedUpdate(eventId, kind, additionalBinaryDataProperties, internalResponse); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs index da6c59ead..38759ffc4 100644 --- a/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationResponseStartedUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationResponseStartedUpdate : ConversationUpdate { - internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) + internal ConversationResponseStartedUpdate(string eventId, InternalRealtimeResponse internalResponse) : base(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted) { _internalResponse = internalResponse; } - internal ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationResponseStartedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeResponse internalResponse) : base(eventId, kind, additionalBinaryDataProperties) { _internalResponse = internalResponse; } diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs index 7dac1345c..ee62e9ca5 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi { return null; } - InternalRealtimeResponseSession internalSession = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeResponseSession internalSession = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) - { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationSessionConfiguredUpdate DeserializeConversationSessi kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("session"u8)) + { + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionConfiguredUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionConfiguredUpdate(eventId, kind, additionalBinaryDataProperties, internalSession); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs index 074658106..65a084a4b 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionConfiguredUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionConfiguredUpdate : ConversationUpdate { - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) + internal ConversationSessionConfiguredUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured) { _internalSession = internalSession; } - internal ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionConfiguredUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeResponseSession internalSession) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs index bc99afb67..af0750875 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS { return null; } - InternalRealtimeResponseSession internalSession = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeResponseSession internalSession = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) - { - internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static ConversationSessionStartedUpdate DeserializeConversationSessionS kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("session"u8)) + { + internalSession = InternalRealtimeResponseSession.DeserializeInternalRealtimeResponseSession(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ConversationSessionStartedUpdate(internalSession, eventId, kind, additionalBinaryDataProperties); + return new ConversationSessionStartedUpdate(eventId, kind, additionalBinaryDataProperties, internalSession); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs index 8d28aead8..e3dda4abc 100644 --- a/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs +++ b/.dotnet/src/Generated/Models/ConversationSessionStartedUpdate.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { public partial class ConversationSessionStartedUpdate : ConversationUpdate { - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) + internal ConversationSessionStartedUpdate(string eventId, InternalRealtimeResponseSession internalSession) : base(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted) { _internalSession = internalSession; } - internal ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal ConversationSessionStartedUpdate(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeResponseSession internalSession) : base(eventId, kind, additionalBinaryDataProperties) { _internalSession = internalSession; } diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs index 393477d65..7fc0595e1 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.Serialization.cs @@ -47,11 +47,16 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso { return null; } - InternalAssistantToolsFileSearchFileSearch fileSearch = default; string @type = "file_search"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalAssistantToolsFileSearchFileSearch fileSearch = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("file_search"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -61,17 +66,12 @@ internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(Jso fileSearch = InternalAssistantToolsFileSearchFileSearch.DeserializeInternalAssistantToolsFileSearchFileSearch(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FileSearchToolDefinition(fileSearch, @type, additionalBinaryDataProperties); + return new FileSearchToolDefinition(@type, additionalBinaryDataProperties, fileSearch); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs index f94ad38ba..1eacf9ff7 100644 --- a/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs +++ b/.dotnet/src/Generated/Models/FileSearchToolDefinition.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { public partial class FileSearchToolDefinition : ToolDefinition { - internal FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal FileSearchToolDefinition(string @type, IDictionary additionalBinaryDataProperties, InternalAssistantToolsFileSearchFileSearch fileSearch) : base(@type, additionalBinaryDataProperties) { _fileSearch = fileSearch; } diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs index 0f4df11c1..0c452e997 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.Serialization.cs @@ -51,17 +51,12 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e { return null; } - string functionName = default; Chat.ChatMessageRole role = default; ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string functionName = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("name"u8)) - { - functionName = prop.Value.GetString(); - continue; - } if (prop.NameEquals("role"u8)) { role = prop.Value.GetString().ToChatMessageRole(); @@ -72,13 +67,18 @@ internal static FunctionChatMessage DeserializeFunctionChatMessage(JsonElement e DeserializeContentValue(prop, ref content); continue; } + if (prop.NameEquals("name"u8)) + { + functionName = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } // CUSTOM: Initialize Content collection property. - return new FunctionChatMessage(functionName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); + return new FunctionChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, functionName); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/FunctionChatMessage.cs b/.dotnet/src/Generated/Models/FunctionChatMessage.cs index 351809176..510189e9e 100644 --- a/.dotnet/src/Generated/Models/FunctionChatMessage.cs +++ b/.dotnet/src/Generated/Models/FunctionChatMessage.cs @@ -17,7 +17,7 @@ public FunctionChatMessage(string functionName) : base(Chat.ChatMessageRole.Func FunctionName = functionName; } - internal FunctionChatMessage(string functionName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + internal FunctionChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string functionName) : base(role, content, additionalBinaryDataProperties) { FunctionName = functionName; } diff --git a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs index ecd5a7ffd..fc2d3992f 100644 --- a/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Generated/Models/FunctionToolDefinition.Serialization.cs @@ -47,19 +47,19 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle { return null; } - InternalFunctionDefinition internalFunction = default; string @type = "function"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalFunctionDefinition internalFunction = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - internalFunction = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - @type = prop.Value.GetString(); + internalFunction = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(prop.Value, options); continue; } if (true) @@ -67,7 +67,7 @@ internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonEle additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionToolDefinition(internalFunction, @type, additionalBinaryDataProperties); + return new FunctionToolDefinition(@type, additionalBinaryDataProperties, internalFunction); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs index a7a402637..b62b36879 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.Serialization.cs @@ -59,19 +59,19 @@ internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAss { return null; } - InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; string @type = "json_schema"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("json_schema"u8)) + if (prop.NameEquals("type"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("json_schema"u8)) { - @type = prop.Value.GetString(); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } if (true) @@ -79,7 +79,7 @@ internal static InternalAssistantResponseFormatJsonSchema DeserializeInternalAss additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalAssistantResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); + return new InternalAssistantResponseFormatJsonSchema(@type, additionalBinaryDataProperties, jsonSchema); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs index e9cdd7f50..abe5b17c3 100644 --- a/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalAssistantResponseFormatJsonSchema.cs @@ -18,7 +18,7 @@ public InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSchem JsonSchema = jsonSchema; } - internal InternalAssistantResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalAssistantResponseFormatJsonSchema(string @type, IDictionary additionalBinaryDataProperties, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs index 2a25b0327..a22d9777b 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.Serialization.cs @@ -52,19 +52,19 @@ internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResp { return null; } - InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; string @type = "json_schema"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("json_schema"u8)) + if (prop.NameEquals("type"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("json_schema"u8)) { - @type = prop.Value.GetString(); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } if (true) @@ -72,7 +72,7 @@ internal static InternalChatResponseFormatJsonSchema DeserializeInternalChatResp additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalChatResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); + return new InternalChatResponseFormatJsonSchema(@type, additionalBinaryDataProperties, jsonSchema); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs index 6db52e1ff..42c9a120f 100644 --- a/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalChatResponseFormatJsonSchema.cs @@ -18,7 +18,7 @@ public InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJson JsonSchema = jsonSchema; } - internal InternalChatResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalChatResponseFormatJsonSchema(string @type, IDictionary additionalBinaryDataProperties, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs index ce0eec65b..98cf117e0 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.Serialization.cs @@ -50,15 +50,25 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ { return null; } + Chat.ChatMessageRole role = default; + ChatMessageContent content = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string refusal = default; string participantName = default; IList toolCalls = default; ChatFunctionCall functionCall = default; - Chat.ChatMessageRole role = default; - ChatMessageContent content = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("role"u8)) + { + role = prop.Value.GetString().ToChatMessageRole(); + continue; + } + if (prop.NameEquals("content"u8)) + { + DeserializeContentValue(prop, ref content); + continue; + } if (prop.NameEquals("refusal"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -98,16 +108,6 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ functionCall = ChatFunctionCall.DeserializeChatFunctionCall(prop.Value, options); continue; } - if (prop.NameEquals("role"u8)) - { - role = prop.Value.GetString().ToChatMessageRole(); - continue; - } - if (prop.NameEquals("content"u8)) - { - DeserializeContentValue(prop, ref content); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -115,13 +115,13 @@ internal static InternalFineTuneChatCompletionRequestAssistantMessage Deserializ } // CUSTOM: Initialize Content collection property. return new InternalFineTuneChatCompletionRequestAssistantMessage( + role, + content ?? new ChatMessageContent(), + additionalBinaryDataProperties, refusal, participantName, toolCalls ?? new ChangeTrackingList(), - functionCall, - role, - content ?? new ChatMessageContent(), - additionalBinaryDataProperties); + functionCall); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs index 942a9090b..868aa7ef7 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuneChatCompletionRequestAssistantMessage.cs @@ -14,7 +14,7 @@ public InternalFineTuneChatCompletionRequestAssistantMessage() { } - internal InternalFineTuneChatCompletionRequestAssistantMessage(string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(refusal, participantName, toolCalls, functionCall, role, content, additionalBinaryDataProperties) + internal InternalFineTuneChatCompletionRequestAssistantMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string refusal, string participantName, IList toolCalls, ChatFunctionCall functionCall) : base(role, content, additionalBinaryDataProperties, refusal, participantName, toolCalls, functionCall) { } } diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs index 5658f3ef8..68744bf46 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning { return null; } - FineTuningIntegrationWandbWandb wandb = default; string @type = "wandb"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + FineTuningIntegrationWandbWandb wandb = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("wandb"u8)) + if (prop.NameEquals("type"u8)) { - wandb = FineTuningIntegrationWandbWandb.DeserializeFineTuningIntegrationWandbWandb(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("wandb"u8)) { - @type = prop.Value.GetString(); + wandb = FineTuningIntegrationWandbWandb.DeserializeFineTuningIntegrationWandbWandb(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalFineTuningIntegrationWandb DeserializeInternalFineTuning additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalFineTuningIntegrationWandb(wandb, @type, additionalBinaryDataProperties); + return new InternalFineTuningIntegrationWandb(@type, additionalBinaryDataProperties, wandb); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs index 019550318..1b1102d94 100644 --- a/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs +++ b/.dotnet/src/Generated/Models/InternalFineTuningIntegrationWandb.cs @@ -14,7 +14,7 @@ internal InternalFineTuningIntegrationWandb(FineTuningIntegrationWandbWandb wand Wandb = wandb; } - internal InternalFineTuningIntegrationWandb(FineTuningIntegrationWandbWandb wandb, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalFineTuningIntegrationWandb(string @type, IDictionary additionalBinaryDataProperties, FineTuningIntegrationWandbWandb wandb) : base(@type, additionalBinaryDataProperties) { Wandb = wandb; } diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs index ab29b1156..9566b3a42 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.Serialization.cs @@ -73,14 +73,19 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial { return null; } + string @type = "file_citation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string text = default; InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation = default; int startIndex = default; int endIndex = default; - string @type = "file_citation"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("text"u8)) { text = prop.Value.GetString(); @@ -101,23 +106,18 @@ internal static InternalMessageContentTextAnnotationsFileCitationObject Deserial endIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalMessageContentTextAnnotationsFileCitationObject( + @type, + additionalBinaryDataProperties, text, fileCitation, startIndex, - endIndex, - @type, - additionalBinaryDataProperties); + endIndex); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs index db793d89f..e5a797c9e 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFileCitationObject.cs @@ -21,7 +21,7 @@ public InternalMessageContentTextAnnotationsFileCitationObject(string text, Inte EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFileCitationObject(string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageContentTextAnnotationsFileCitationObject(string @type, IDictionary additionalBinaryDataProperties, string text, InternalMessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, int endIndex) : base(@type, additionalBinaryDataProperties) { Text = text; FileCitation = fileCitation; diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs index 582b2a166..ad60be6dd 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.Serialization.cs @@ -73,14 +73,19 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI { return null; } + string @type = "file_path"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string text = default; InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath = default; int startIndex = default; int endIndex = default; - string @type = "file_path"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("text"u8)) { text = prop.Value.GetString(); @@ -101,23 +106,18 @@ internal static InternalMessageContentTextAnnotationsFilePathObject DeserializeI endIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalMessageContentTextAnnotationsFilePathObject( + @type, + additionalBinaryDataProperties, text, filePath, startIndex, - endIndex, - @type, - additionalBinaryDataProperties); + endIndex); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs index 37641dc68..c6f617972 100644 --- a/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageContentTextAnnotationsFilePathObject.cs @@ -21,7 +21,7 @@ public InternalMessageContentTextAnnotationsFilePathObject(string text, Internal EndIndex = endIndex; } - internal InternalMessageContentTextAnnotationsFilePathObject(string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageContentTextAnnotationsFilePathObject(string @type, IDictionary additionalBinaryDataProperties, string text, InternalMessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, int endIndex) : base(@type, additionalBinaryDataProperties) { Text = text; FilePath = filePath; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs index 0e5ec5226..b42753383 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe { return null; } - int index = default; - InternalMessageDeltaContentImageFileObjectImageFile imageFile = default; string @type = "image_file"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + InternalMessageDeltaContentImageFileObjectImageFile imageFile = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -83,17 +88,12 @@ internal static InternalMessageDeltaContentImageFileObject DeserializeInternalMe imageFile = InternalMessageDeltaContentImageFileObjectImageFile.DeserializeInternalMessageDeltaContentImageFileObjectImageFile(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageDeltaContentImageFileObject(index, imageFile, @type, additionalBinaryDataProperties); + return new InternalMessageDeltaContentImageFileObject(@type, additionalBinaryDataProperties, index, imageFile); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs index ad5291996..8573af8ac 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageFileObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentImageFileObject(int index) : base("image_fil Index = index; } - internal InternalMessageDeltaContentImageFileObject(int index, InternalMessageDeltaContentImageFileObjectImageFile imageFile, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentImageFileObject(string @type, IDictionary additionalBinaryDataProperties, int index, InternalMessageDeltaContentImageFileObjectImageFile imageFile) : base(@type, additionalBinaryDataProperties) { Index = index; ImageFile = imageFile; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs index c5ceddcd9..696a1fe05 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes { return null; } - int index = default; - InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl = default; string @type = "image_url"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -83,17 +88,12 @@ internal static InternalMessageDeltaContentImageUrlObject DeserializeInternalMes imageUrl = InternalMessageDeltaContentImageUrlObjectImageUrl.DeserializeInternalMessageDeltaContentImageUrlObjectImageUrl(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageDeltaContentImageUrlObject(index, imageUrl, @type, additionalBinaryDataProperties); + return new InternalMessageDeltaContentImageUrlObject(@type, additionalBinaryDataProperties, index, imageUrl); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs index 0b82e3397..8ea63feef 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentImageUrlObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentImageUrlObject(int index) : base("image_url" Index = index; } - internal InternalMessageDeltaContentImageUrlObject(int index, InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentImageUrlObject(string @type, IDictionary additionalBinaryDataProperties, int index, InternalMessageDeltaContentImageUrlObjectImageUrl imageUrl) : base(@type, additionalBinaryDataProperties) { Index = index; ImageUrl = imageUrl; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs index a2252f2fa..4e1a14815 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess { return null; } - int index = default; - string refusal = default; string @type = "refusal"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + string refusal = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -79,17 +84,12 @@ internal static InternalMessageDeltaContentRefusalObject DeserializeInternalMess refusal = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageDeltaContentRefusalObject(index, refusal, @type, additionalBinaryDataProperties); + return new InternalMessageDeltaContentRefusalObject(@type, additionalBinaryDataProperties, index, refusal); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs index 54a1af558..5c7fce448 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentRefusalObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentRefusalObject(int index) : base("refusal") Index = index; } - internal InternalMessageDeltaContentRefusalObject(int index, string refusal, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentRefusalObject(string @type, IDictionary additionalBinaryDataProperties, int index, string refusal) : base(@type, additionalBinaryDataProperties) { Index = index; Refusal = refusal; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs index bed2a33a6..fc6c22d7f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.Serialization.cs @@ -78,15 +78,20 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des { return null; } + string @type = "file_citation"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); int index = default; string text = default; InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation = default; int? startIndex = default; int? endIndex = default; - string @type = "file_citation"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -124,24 +129,19 @@ internal static InternalMessageDeltaContentTextAnnotationsFileCitationObject Des endIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalMessageDeltaContentTextAnnotationsFileCitationObject( + @type, + additionalBinaryDataProperties, index, text, fileCitation, startIndex, - endIndex, - @type, - additionalBinaryDataProperties); + endIndex); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs index 807ee8b3a..1db97ff06 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFileCitationObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index) Index = index; } - internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(int index, string text, InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int? startIndex, int? endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentTextAnnotationsFileCitationObject(string @type, IDictionary additionalBinaryDataProperties, int index, string text, InternalMessageDeltaContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int? startIndex, int? endIndex) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs index 93edc71d5..2ab01dd19 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.Serialization.cs @@ -78,15 +78,20 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria { return null; } + string @type = "file_path"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); int index = default; string text = default; InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath = default; int? startIndex = default; int? endIndex = default; - string @type = "file_path"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -124,24 +129,19 @@ internal static InternalMessageDeltaContentTextAnnotationsFilePathObject Deseria endIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalMessageDeltaContentTextAnnotationsFilePathObject( + @type, + additionalBinaryDataProperties, index, text, filePath, startIndex, - endIndex, - @type, - additionalBinaryDataProperties); + endIndex); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs index c73b0cb4d..c729725fc 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextAnnotationsFilePathObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index) : b Index = index; } - internal InternalMessageDeltaContentTextAnnotationsFilePathObject(int index, string text, InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath, int? startIndex, int? endIndex, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentTextAnnotationsFilePathObject(string @type, IDictionary additionalBinaryDataProperties, int index, string text, InternalMessageDeltaContentTextAnnotationsFilePathObjectFilePath filePath, int? startIndex, int? endIndex) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs index 3dbc5f8bc..7eebdd746 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage { return null; } - int index = default; - InternalMessageDeltaContentTextObjectText text = default; string @type = "text"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + InternalMessageDeltaContentTextObjectText text = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -83,17 +88,12 @@ internal static InternalMessageDeltaContentTextObject DeserializeInternalMessage text = InternalMessageDeltaContentTextObjectText.DeserializeInternalMessageDeltaContentTextObjectText(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageDeltaContentTextObject(index, text, @type, additionalBinaryDataProperties); + return new InternalMessageDeltaContentTextObject(@type, additionalBinaryDataProperties, index, text); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs index f63f196eb..f8546832f 100644 --- a/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs +++ b/.dotnet/src/Generated/Models/InternalMessageDeltaContentTextObject.cs @@ -14,7 +14,7 @@ internal InternalMessageDeltaContentTextObject(int index) : base("text") Index = index; } - internal InternalMessageDeltaContentTextObject(int index, InternalMessageDeltaContentTextObjectText text, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalMessageDeltaContentTextObject(string @type, IDictionary additionalBinaryDataProperties, int index, InternalMessageDeltaContentTextObjectText text) : base(@type, additionalBinaryDataProperties) { Index = index; Text = text; diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs index 725875fd5..c831eb317 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.Serialization.cs @@ -56,9 +56,9 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF { return null; } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string @type = default; InternalMessageContentItemFileObjectImageFile imageFile = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -76,7 +76,7 @@ internal static InternalMessageImageFileContent DeserializeInternalMessageImageF additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageImageFileContent(@type, imageFile, additionalBinaryDataProperties); + return new InternalMessageImageFileContent(additionalBinaryDataProperties, @type, imageFile); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs index 1b071181e..41ae17f04 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageFileContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageImageFileContent : MessageContent { - internal InternalMessageImageFileContent(string @type, InternalMessageContentItemFileObjectImageFile imageFile, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalMessageImageFileContent(IDictionary additionalBinaryDataProperties, string @type, InternalMessageContentItemFileObjectImageFile imageFile) : base(additionalBinaryDataProperties) { _type = @type; _imageFile = imageFile; diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs index 64a82a871..decb82a1b 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.Serialization.cs @@ -56,9 +56,9 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr { return null; } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string @type = default; InternalMessageContentImageUrlObjectImageUrl imageUrl = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -76,7 +76,7 @@ internal static InternalMessageImageUrlContent DeserializeInternalMessageImageUr additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageImageUrlContent(@type, imageUrl, additionalBinaryDataProperties); + return new InternalMessageImageUrlContent(additionalBinaryDataProperties, @type, imageUrl); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs index d7bd2e7ab..dd2db88a2 100644 --- a/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageImageUrlContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalMessageImageUrlContent : MessageContent { - internal InternalMessageImageUrlContent(string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalMessageImageUrlContent(IDictionary additionalBinaryDataProperties, string @type, InternalMessageContentImageUrlObjectImageUrl imageUrl) : base(additionalBinaryDataProperties) { _type = @type; _imageUrl = imageUrl; diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs index 3d0658b46..a59102fb3 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.Serialization.cs @@ -56,9 +56,9 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC { return null; } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string internalRefusal = default; string @type = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("refusal"u8)) @@ -76,7 +76,7 @@ internal static InternalMessageRefusalContent DeserializeInternalMessageRefusalC additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalMessageRefusalContent(internalRefusal, @type, additionalBinaryDataProperties); + return new InternalMessageRefusalContent(additionalBinaryDataProperties, internalRefusal, @type); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs index 173f50431..cf5028d08 100644 --- a/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs +++ b/.dotnet/src/Generated/Models/InternalMessageRefusalContent.cs @@ -17,7 +17,7 @@ public InternalMessageRefusalContent(string internalRefusal) InternalRefusal = internalRefusal; } - internal InternalMessageRefusalContent(string internalRefusal, string @type, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalMessageRefusalContent(IDictionary additionalBinaryDataProperties, string internalRefusal, string @type) : base(additionalBinaryDataProperties) { InternalRefusal = internalRefusal; _type = @type; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs index 3c20aa031..e3572ee2e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.Serialization.cs @@ -63,31 +63,31 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt { return null; } - string previousItemId = default; - ConversationItem item = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string previousItemId = default; + ConversationItem item = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("previous_item_id"u8)) + if (prop.NameEquals("type"u8)) { - previousItemId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (prop.NameEquals("item"u8)) + if (prop.NameEquals("event_id"u8)) { - item = ConversationItem.DeserializeConversationItem(prop.Value, options); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("previous_item_id"u8)) { - kind = new InternalRealtimeClientEventType(prop.Value.GetString()); + previousItemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("item"u8)) { - eventId = prop.Value.GetString(); + item = ConversationItem.DeserializeConversationItem(prop.Value, options); continue; } if (true) @@ -95,7 +95,7 @@ internal static InternalRealtimeClientEventConversationItemCreate DeserializeInt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventConversationItemCreate(previousItemId, item, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemCreate(kind, eventId, additionalBinaryDataProperties, previousItemId, item); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs index f12ed00b1..22c21466f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemCreate.cs @@ -17,7 +17,7 @@ public InternalRealtimeClientEventConversationItemCreate(ConversationItem item) Item = item; } - internal InternalRealtimeClientEventConversationItemCreate(string previousItemId, ConversationItem item, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemCreate(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, string previousItemId, ConversationItem item) : base(kind, eventId, additionalBinaryDataProperties) { PreviousItemId = previousItemId; Item = item; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs index f3ec2f16d..ebe414f6f 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.Serialization.cs @@ -58,17 +58,12 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt { return null; } - string itemId = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) - { - itemId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("type"u8)) { kind = new InternalRealtimeClientEventType(prop.Value.GetString()); @@ -79,12 +74,17 @@ internal static InternalRealtimeClientEventConversationItemDelete DeserializeInt eventId = prop.Value.GetString(); continue; } + if (prop.NameEquals("item_id"u8)) + { + itemId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventConversationItemDelete(itemId, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventConversationItemDelete(kind, eventId, additionalBinaryDataProperties, itemId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs index 595699f04..a0db8bcba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemDelete.cs @@ -17,7 +17,7 @@ public InternalRealtimeClientEventConversationItemDelete(string itemId) : base(I ItemId = itemId; } - internal InternalRealtimeClientEventConversationItemDelete(string itemId, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemDelete(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, string itemId) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs index e666d582e..da934231d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.Serialization.cs @@ -68,37 +68,37 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI { return null; } - string itemId = default; - int contentIndex = default; - int audioEndMs = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string itemId = default; + int contentIndex = default; + int audioEndMs = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("item_id"u8)) + if (prop.NameEquals("type"u8)) { - itemId = prop.Value.GetString(); + kind = new InternalRealtimeClientEventType(prop.Value.GetString()); continue; } - if (prop.NameEquals("content_index"u8)) + if (prop.NameEquals("event_id"u8)) { - contentIndex = prop.Value.GetInt32(); + eventId = prop.Value.GetString(); continue; } - if (prop.NameEquals("audio_end_ms"u8)) + if (prop.NameEquals("item_id"u8)) { - audioEndMs = prop.Value.GetInt32(); + itemId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("content_index"u8)) { - kind = new InternalRealtimeClientEventType(prop.Value.GetString()); + contentIndex = prop.Value.GetInt32(); continue; } - if (prop.NameEquals("event_id"u8)) + if (prop.NameEquals("audio_end_ms"u8)) { - eventId = prop.Value.GetString(); + audioEndMs = prop.Value.GetInt32(); continue; } if (true) @@ -107,12 +107,12 @@ internal static InternalRealtimeClientEventConversationItemTruncate DeserializeI } } return new InternalRealtimeClientEventConversationItemTruncate( - itemId, - contentIndex, - audioEndMs, kind, eventId, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + itemId, + contentIndex, + audioEndMs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs index 6b6e4f4b9..89f7e749a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventConversationItemTruncate.cs @@ -19,7 +19,7 @@ public InternalRealtimeClientEventConversationItemTruncate(string itemId, int co AudioEndMs = audioEndMs; } - internal InternalRealtimeClientEventConversationItemTruncate(string itemId, int contentIndex, int audioEndMs, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventConversationItemTruncate(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, string itemId, int contentIndex, int audioEndMs) : base(kind, eventId, additionalBinaryDataProperties) { ItemId = itemId; ContentIndex = contentIndex; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs index 441736b45..de235c643 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.Serialization.cs @@ -58,17 +58,12 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt { return null; } - BinaryData audio = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + BinaryData audio = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("audio"u8)) - { - audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); - continue; - } if (prop.NameEquals("type"u8)) { kind = new InternalRealtimeClientEventType(prop.Value.GetString()); @@ -79,12 +74,17 @@ internal static InternalRealtimeClientEventInputAudioBufferAppend DeserializeInt eventId = prop.Value.GetString(); continue; } + if (prop.NameEquals("audio"u8)) + { + audio = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventInputAudioBufferAppend(audio, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventInputAudioBufferAppend(kind, eventId, additionalBinaryDataProperties, audio); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs index db65ca564..0dab151c5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventInputAudioBufferAppend.cs @@ -17,7 +17,7 @@ public InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio) : bas Audio = audio; } - internal InternalRealtimeClientEventInputAudioBufferAppend(BinaryData audio, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventInputAudioBufferAppend(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, BinaryData audio) : base(kind, eventId, additionalBinaryDataProperties) { Audio = audio; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs index c7a9d40e6..f1c98f3c9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.Serialization.cs @@ -58,17 +58,12 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea { return null; } - InternalRealtimeClientEventResponseCreateResponse response = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeClientEventResponseCreateResponse response = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("response"u8)) - { - response = InternalRealtimeClientEventResponseCreateResponse.DeserializeInternalRealtimeClientEventResponseCreateResponse(prop.Value, options); - continue; - } if (prop.NameEquals("type"u8)) { kind = new InternalRealtimeClientEventType(prop.Value.GetString()); @@ -79,12 +74,17 @@ internal static InternalRealtimeClientEventResponseCreate DeserializeInternalRea eventId = prop.Value.GetString(); continue; } + if (prop.NameEquals("response"u8)) + { + response = InternalRealtimeClientEventResponseCreateResponse.DeserializeInternalRealtimeClientEventResponseCreateResponse(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventResponseCreate(response, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventResponseCreate(kind, eventId, additionalBinaryDataProperties, response); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs index c5ab75641..349d8e180 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventResponseCreate.cs @@ -17,7 +17,7 @@ public InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResp Response = response; } - internal InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventResponseCreateResponse response, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventResponseCreate(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, InternalRealtimeClientEventResponseCreateResponse response) : base(kind, eventId, additionalBinaryDataProperties) { Response = response; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs index 1649a77c0..18a9d1611 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.Serialization.cs @@ -58,17 +58,12 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal { return null; } - ConversationSessionOptions session = default; InternalRealtimeClientEventType kind = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + ConversationSessionOptions session = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("session"u8)) - { - session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); - continue; - } if (prop.NameEquals("type"u8)) { kind = new InternalRealtimeClientEventType(prop.Value.GetString()); @@ -79,12 +74,17 @@ internal static InternalRealtimeClientEventSessionUpdate DeserializeInternalReal eventId = prop.Value.GetString(); continue; } + if (prop.NameEquals("session"u8)) + { + session = ConversationSessionOptions.DeserializeConversationSessionOptions(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeClientEventSessionUpdate(session, kind, eventId, additionalBinaryDataProperties); + return new InternalRealtimeClientEventSessionUpdate(kind, eventId, additionalBinaryDataProperties, session); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs index fc2748420..8787b40d4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeClientEventSessionUpdate.cs @@ -17,7 +17,7 @@ public InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions sessi Session = session; } - internal InternalRealtimeClientEventSessionUpdate(ConversationSessionOptions session, InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties) : base(kind, eventId, additionalBinaryDataProperties) + internal InternalRealtimeClientEventSessionUpdate(InternalRealtimeClientEventType kind, string eventId, IDictionary additionalBinaryDataProperties, ConversationSessionOptions session) : base(kind, eventId, additionalBinaryDataProperties) { Session = session; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs index f8a1da5a0..2b01e29e1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.Serialization.cs @@ -63,22 +63,22 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR { return null; } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + IList content = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) + if (prop.NameEquals("type"u8)) { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; + @type = new InternalRealtimeItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) @@ -95,14 +95,14 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR status = new ConversationItemStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("content"u8)) { - id = prop.Value.GetString(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; continue; } if (true) @@ -111,12 +111,12 @@ internal static InternalRealtimeRequestAssistantMessageItem DeserializeInternalR } } return new InternalRealtimeRequestAssistantMessageItem( - content, - role, - status, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + role, + status, + content); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs index d55ca6cd8..a3fa292b3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAssistantMessageItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestAssistantMessageItem : InternalRealtimeRequestMessageItem { - internal InternalRealtimeRequestAssistantMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestAssistantMessageItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(@type, id, additionalBinaryDataProperties, role, status) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs index e37501778..1ca220773 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.Serialization.cs @@ -59,25 +59,25 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt { return null; } - string @type = "input_audio"; - string internalTranscriptValue = default; ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string @type = "input_audio"; + string internalTranscriptValue = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString(); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (prop.NameEquals("transcript"u8)) + if (prop.NameEquals("type"u8)) { - internalTranscriptValue = prop.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("transcript"u8)) { - kind = new ConversationContentPartKind(prop.Value.GetString()); + internalTranscriptValue = prop.Value.GetString(); continue; } if (true) @@ -85,7 +85,7 @@ internal static InternalRealtimeRequestAudioContentPart DeserializeInternalRealt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestAudioContentPart(@type, internalTranscriptValue, kind, additionalBinaryDataProperties); + return new InternalRealtimeRequestAudioContentPart(kind, additionalBinaryDataProperties, @type, internalTranscriptValue); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs index 9d82bdfe0..b2d6153b0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestAudioContentPart.cs @@ -13,7 +13,7 @@ public InternalRealtimeRequestAudioContentPart() : base(ConversationContentPartK { } - internal InternalRealtimeRequestAudioContentPart(string @type, string internalTranscriptValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal InternalRealtimeRequestAudioContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties, string @type, string internalTranscriptValue) : base(kind, additionalBinaryDataProperties) { Type = @type; InternalTranscriptValue = internalTranscriptValue; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs index 36b86554c..37fec87f7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.Serialization.cs @@ -73,15 +73,25 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt { return null; } + InternalRealtimeItemType @type = default; + string id = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string callId = default; string arguments = default; ConversationItemStatus? status = default; - InternalRealtimeItemType @type = default; - string id = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } if (prop.NameEquals("name"u8)) { name = prop.Value.GetString(); @@ -106,29 +116,19 @@ internal static InternalRealtimeRequestFunctionCallItem DeserializeInternalRealt status = new ConversationItemStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeRequestFunctionCallItem( + @type, + id, + additionalBinaryDataProperties, name, callId, arguments, - status, - @type, - id, - additionalBinaryDataProperties); + status); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs index 184fd03f5..da0da8dbe 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallItem.cs @@ -21,7 +21,7 @@ public InternalRealtimeRequestFunctionCallItem(string name, string callId, strin Arguments = arguments; } - internal InternalRealtimeRequestFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestFunctionCallItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, string name, string callId, string arguments, ConversationItemStatus? status) : base(@type, id, additionalBinaryDataProperties) { Name = name; CallId = callId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs index df217b297..f27e4810a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.Serialization.cs @@ -63,31 +63,31 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna { return null; } - string callId = default; - string output = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string callId = default; + string output = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("call_id"u8)) + if (prop.NameEquals("type"u8)) { - callId = prop.Value.GetString(); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } - if (prop.NameEquals("output"u8)) + if (prop.NameEquals("id"u8)) { - output = prop.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("call_id"u8)) { - @type = new InternalRealtimeItemType(prop.Value.GetString()); + callId = prop.Value.GetString(); continue; } - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("output"u8)) { - id = prop.Value.GetString(); + output = prop.Value.GetString(); continue; } if (true) @@ -95,7 +95,7 @@ internal static InternalRealtimeRequestFunctionCallOutputItem DeserializeInterna additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestFunctionCallOutputItem(callId, output, @type, id, additionalBinaryDataProperties); + return new InternalRealtimeRequestFunctionCallOutputItem(@type, id, additionalBinaryDataProperties, callId, output); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs index b365640ef..1a65bed0c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestFunctionCallOutputItem.cs @@ -19,7 +19,7 @@ public InternalRealtimeRequestFunctionCallOutputItem(string callId, string outpu Output = output; } - internal InternalRealtimeRequestFunctionCallOutputItem(string callId, string output, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestFunctionCallOutputItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, string callId, string output) : base(@type, id, additionalBinaryDataProperties) { CallId = callId; Output = output; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs index 1440e2267..c1b1befef 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestMessageItem.cs @@ -14,7 +14,7 @@ public InternalRealtimeRequestMessageItem(ConversationMessageRole role) : base(I Role = role; } - internal InternalRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestMessageItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, ConversationMessageRole role, ConversationItemStatus? status) : base(@type, id, additionalBinaryDataProperties) { Role = role; Status = status; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs index 2c3f892aa..e6863613e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.Serialization.cs @@ -63,22 +63,22 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal { return null; } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + IList content = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) + if (prop.NameEquals("type"u8)) { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; + @type = new InternalRealtimeItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) @@ -95,14 +95,14 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal status = new ConversationItemStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("content"u8)) { - id = prop.Value.GetString(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; continue; } if (true) @@ -111,12 +111,12 @@ internal static InternalRealtimeRequestSystemMessageItem DeserializeInternalReal } } return new InternalRealtimeRequestSystemMessageItem( - content, - role, - status, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + role, + status, + content); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs index 2b7796c4d..ac11a9ce9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestSystemMessageItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestSystemMessageItem : InternalRealtimeRequestMessageItem { - internal InternalRealtimeRequestSystemMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestSystemMessageItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(@type, id, additionalBinaryDataProperties, role, status) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs index da99cb5e3..2a1e7d277 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.Serialization.cs @@ -63,25 +63,25 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti { return null; } - string @type = "input_text"; - string internalTextValue = default; ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string @type = "input_text"; + string internalTextValue = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString(); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (prop.NameEquals("text"u8)) + if (prop.NameEquals("type"u8)) { - internalTextValue = prop.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("text"u8)) { - kind = new ConversationContentPartKind(prop.Value.GetString()); + internalTextValue = prop.Value.GetString(); continue; } if (true) @@ -89,7 +89,7 @@ internal static InternalRealtimeRequestTextContentPart DeserializeInternalRealti additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeRequestTextContentPart(@type, internalTextValue, kind, additionalBinaryDataProperties); + return new InternalRealtimeRequestTextContentPart(kind, additionalBinaryDataProperties, @type, internalTextValue); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs index a44b5d667..072b1dc59 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestTextContentPart.cs @@ -17,7 +17,7 @@ public InternalRealtimeRequestTextContentPart(string internalTextValue) : base(C InternalTextValue = internalTextValue; } - internal InternalRealtimeRequestTextContentPart(string @type, string internalTextValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal InternalRealtimeRequestTextContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties, string @type, string internalTextValue) : base(kind, additionalBinaryDataProperties) { Type = @type; InternalTextValue = internalTextValue; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs index 48aea22d0..3728f9a62 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.Serialization.cs @@ -63,22 +63,22 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti { return null; } - IList content = default; - ConversationMessageRole role = default; - ConversationItemStatus? status = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + ConversationMessageRole role = default; + ConversationItemStatus? status = default; + IList content = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) + if (prop.NameEquals("type"u8)) { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; + @type = new InternalRealtimeItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); continue; } if (prop.NameEquals("role"u8)) @@ -95,14 +95,14 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti status = new ConversationItemStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("content"u8)) { - id = prop.Value.GetString(); + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; continue; } if (true) @@ -111,12 +111,12 @@ internal static InternalRealtimeRequestUserMessageItem DeserializeInternalRealti } } return new InternalRealtimeRequestUserMessageItem( - content, - role, - status, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + role, + status, + content); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs index 4625a202f..8ef4a6272 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeRequestUserMessageItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeRequestUserMessageItem : InternalRealtimeRequestMessageItem { - internal InternalRealtimeRequestUserMessageItem(IList content, ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role, status, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeRequestUserMessageItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, ConversationMessageRole role, ConversationItemStatus? status, IList content) : base(@type, id, additionalBinaryDataProperties, role, status) { Content = content; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs index 6af2083e7..5a598301e 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.Serialization.cs @@ -70,12 +70,17 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal { return null; } - string @type = "audio"; - string internalTranscriptValue = default; ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string @type = "audio"; + string internalTranscriptValue = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + kind = new ConversationContentPartKind(prop.Value.GetString()); + continue; + } if (prop.NameEquals("type"u8)) { @type = prop.Value.GetString(); @@ -91,17 +96,12 @@ internal static InternalRealtimeResponseAudioContentPart DeserializeInternalReal internalTranscriptValue = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) - { - kind = new ConversationContentPartKind(prop.Value.GetString()); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseAudioContentPart(@type, internalTranscriptValue, kind, additionalBinaryDataProperties); + return new InternalRealtimeResponseAudioContentPart(kind, additionalBinaryDataProperties, @type, internalTranscriptValue); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs index 8d66f9140..f533cc688 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseAudioContentPart.cs @@ -14,7 +14,7 @@ internal InternalRealtimeResponseAudioContentPart(string internalTranscriptValue InternalTranscriptValue = internalTranscriptValue; } - internal InternalRealtimeResponseAudioContentPart(string @type, string internalTranscriptValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal InternalRealtimeResponseAudioContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties, string @type, string internalTranscriptValue) : base(kind, additionalBinaryDataProperties) { Type = @type; InternalTranscriptValue = internalTranscriptValue; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs index e223039de..14c3d3388 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.Serialization.cs @@ -73,54 +73,54 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal { return null; } - string name = default; - string callId = default; - string arguments = default; - ConversationItemStatus status = default; InternalRealtimeResponseItemObject @object = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string name = default; + string callId = default; + string arguments = default; + ConversationItemStatus status = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("name"u8)) + if (prop.NameEquals("object"u8)) { - name = prop.Value.GetString(); + @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); continue; } - if (prop.NameEquals("call_id"u8)) + if (prop.NameEquals("type"u8)) { - callId = prop.Value.GetString(); + @type = new InternalRealtimeItemType(prop.Value.GetString()); continue; } - if (prop.NameEquals("arguments"u8)) + if (prop.NameEquals("id"u8)) { - arguments = prop.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = prop.Value.GetString(); continue; } - if (prop.NameEquals("status"u8)) + if (prop.NameEquals("name"u8)) { - status = new ConversationItemStatus(prop.Value.GetString()); + name = prop.Value.GetString(); continue; } - if (prop.NameEquals("object"u8)) + if (prop.NameEquals("call_id"u8)) { - @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); + callId = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("arguments"u8)) { - @type = new InternalRealtimeItemType(prop.Value.GetString()); + arguments = prop.Value.GetString(); continue; } - if (prop.NameEquals("id"u8)) + if (prop.NameEquals("status"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = prop.Value.GetString(); + status = new ConversationItemStatus(prop.Value.GetString()); continue; } if (true) @@ -129,14 +129,14 @@ internal static InternalRealtimeResponseFunctionCallItem DeserializeInternalReal } } return new InternalRealtimeResponseFunctionCallItem( - name, - callId, - arguments, - status, @object, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + name, + callId, + arguments, + status); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs index 800e903b6..e1d10fa80 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallItem.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseFunctionCallItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, string id) : base(InternalRealtimeItemType.FunctionCall, id) + internal InternalRealtimeResponseFunctionCallItem(string id, string name, string callId, string arguments, ConversationItemStatus status) : base(InternalRealtimeItemType.FunctionCall, id) { Name = name; CallId = callId; @@ -17,7 +17,7 @@ internal InternalRealtimeResponseFunctionCallItem(string name, string callId, st Status = status; } - internal InternalRealtimeResponseFunctionCallItem(string name, string callId, string arguments, ConversationItemStatus status, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseFunctionCallItem(InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, string name, string callId, string arguments, ConversationItemStatus status) : base(@object, @type, id, additionalBinaryDataProperties) { Name = name; CallId = callId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs index f2d434297..c5b563a3d 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.Serialization.cs @@ -63,24 +63,14 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern { return null; } - string callId = default; - string output = default; InternalRealtimeResponseItemObject @object = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string callId = default; + string output = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("call_id"u8)) - { - callId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("output"u8)) - { - output = prop.Value.GetString(); - continue; - } if (prop.NameEquals("object"u8)) { @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); @@ -101,18 +91,28 @@ internal static InternalRealtimeResponseFunctionCallOutputItem DeserializeIntern id = prop.Value.GetString(); continue; } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("output"u8)) + { + output = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeResponseFunctionCallOutputItem( - callId, - output, @object, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + callId, + output); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs index d9dad611b..7295ba6f7 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseFunctionCallOutputItem.cs @@ -9,13 +9,13 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseFunctionCallOutputItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, string id) : base(InternalRealtimeItemType.FunctionCallOutput, id) + internal InternalRealtimeResponseFunctionCallOutputItem(string id, string callId, string output) : base(InternalRealtimeItemType.FunctionCallOutput, id) { CallId = callId; Output = output; } - internal InternalRealtimeResponseFunctionCallOutputItem(string callId, string output, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseFunctionCallOutputItem(InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, string callId, string output) : base(@object, @type, id, additionalBinaryDataProperties) { CallId = callId; Output = output; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs index 43daa4565..fc7df83e3 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.Serialization.cs @@ -73,35 +73,15 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR { return null; } - IReadOnlyList content = default; - ConversationItemStatus status = default; - ConversationMessageRole role = default; InternalRealtimeResponseItemObject @object = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IReadOnlyList content = default; + ConversationItemStatus status = default; + ConversationMessageRole role = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); - } - content = array; - continue; - } - if (prop.NameEquals("status"u8)) - { - status = new ConversationItemStatus(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("role"u8)) - { - role = new ConversationMessageRole(prop.Value.GetString()); - continue; - } if (prop.NameEquals("object"u8)) { @object = new InternalRealtimeResponseItemObject(prop.Value.GetString()); @@ -122,19 +102,39 @@ internal static InternalRealtimeResponseMessageItem DeserializeInternalRealtimeR id = prop.Value.GetString(); continue; } + if (prop.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ConversationContentPart.DeserializeConversationContentPart(item, options)); + } + content = array; + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new ConversationItemStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("role"u8)) + { + role = new ConversationMessageRole(prop.Value.GetString()); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeResponseMessageItem( - content, - status, - role, @object, @type, id, - additionalBinaryDataProperties); + additionalBinaryDataProperties, + content, + status, + role); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs index 271e67e5b..827580df0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseMessageItem.cs @@ -10,14 +10,14 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeResponseMessageItem : InternalRealtimeResponseItem { - internal InternalRealtimeResponseMessageItem(ConversationItemStatus status, ConversationMessageRole role, string id) : base(InternalRealtimeItemType.Message, id) + internal InternalRealtimeResponseMessageItem(string id, ConversationItemStatus status, ConversationMessageRole role) : base(InternalRealtimeItemType.Message, id) { Content = new ChangeTrackingList(); Status = status; Role = role; } - internal InternalRealtimeResponseMessageItem(IReadOnlyList content, ConversationItemStatus status, ConversationMessageRole role, InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(@object, @type, id, additionalBinaryDataProperties) + internal InternalRealtimeResponseMessageItem(InternalRealtimeResponseItemObject @object, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, IReadOnlyList content, ConversationItemStatus status, ConversationMessageRole role) : base(@object, @type, id, additionalBinaryDataProperties) { Content = content; Status = status; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs index 69ffb7677..bc533f6ba 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.Serialization.cs @@ -63,25 +63,25 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt { return null; } - string @type = "text"; - string internalTextValue = default; ConversationContentPartKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string @type = "text"; + string internalTextValue = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) { - @type = prop.Value.GetString(); + kind = new ConversationContentPartKind(prop.Value.GetString()); continue; } - if (prop.NameEquals("text"u8)) + if (prop.NameEquals("type"u8)) { - internalTextValue = prop.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("text"u8)) { - kind = new ConversationContentPartKind(prop.Value.GetString()); + internalTextValue = prop.Value.GetString(); continue; } if (true) @@ -89,7 +89,7 @@ internal static InternalRealtimeResponseTextContentPart DeserializeInternalRealt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeResponseTextContentPart(@type, internalTextValue, kind, additionalBinaryDataProperties); + return new InternalRealtimeResponseTextContentPart(kind, additionalBinaryDataProperties, @type, internalTextValue); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs index 2cad1c67f..ea8649803 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeResponseTextContentPart.cs @@ -14,7 +14,7 @@ internal InternalRealtimeResponseTextContentPart(string internalTextValue) : bas InternalTextValue = internalTextValue; } - internal InternalRealtimeResponseTextContentPart(string @type, string internalTextValue, ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal InternalRealtimeResponseTextContentPart(ConversationContentPartKind kind, IDictionary additionalBinaryDataProperties, string @type, string internalTextValue) : base(kind, additionalBinaryDataProperties) { Type = @type; InternalTextValue = internalTextValue; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs index 57c241ad5..1703b7bb4 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.Serialization.cs @@ -58,17 +58,12 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern { return null; } - InternalRealtimeServerEventConversationCreatedConversation conversation = default; string eventId = default; RealtimeConversation.ConversationUpdateKind kind = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeServerEventConversationCreatedConversation conversation = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("conversation"u8)) - { - conversation = InternalRealtimeServerEventConversationCreatedConversation.DeserializeInternalRealtimeServerEventConversationCreatedConversation(prop.Value, options); - continue; - } if (prop.NameEquals("event_id"u8)) { eventId = prop.Value.GetString(); @@ -79,12 +74,17 @@ internal static InternalRealtimeServerEventConversationCreated DeserializeIntern kind = prop.Value.GetString().ToConversationUpdateKind(); continue; } + if (prop.NameEquals("conversation"u8)) + { + conversation = InternalRealtimeServerEventConversationCreatedConversation.DeserializeInternalRealtimeServerEventConversationCreatedConversation(prop.Value, options); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeServerEventConversationCreated(conversation, eventId, kind, additionalBinaryDataProperties); + return new InternalRealtimeServerEventConversationCreated(eventId, kind, additionalBinaryDataProperties, conversation); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs index dbd026bf2..7ab1726b1 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventConversationCreated.cs @@ -9,12 +9,12 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventConversationCreated : ConversationUpdate { - internal InternalRealtimeServerEventConversationCreated(InternalRealtimeServerEventConversationCreatedConversation conversation, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ConversationCreated) + internal InternalRealtimeServerEventConversationCreated(string eventId, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(eventId, RealtimeConversation.ConversationUpdateKind.ConversationCreated) { Conversation = conversation; } - internal InternalRealtimeServerEventConversationCreated(InternalRealtimeServerEventConversationCreatedConversation conversation, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventConversationCreated(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, InternalRealtimeServerEventConversationCreatedConversation conversation) : base(eventId, kind, additionalBinaryDataProperties) { Conversation = conversation; } diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs index 9e517862f..1628ee0f0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; BinaryData delta = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseAudioDelta DeserializeInterna delta = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseAudioDelta( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - delta, - eventId, - kind, - additionalBinaryDataProperties); + delta); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs index 3957b4304..0008ec7db 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseAudioDelta(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioDelta) + internal InternalRealtimeServerEventResponseAudioDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseAudioDelta(string responseId, string Delta = delta; } - internal InternalRealtimeServerEventResponseAudioDelta(string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioDelta(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs index 174d0e863..19f21c807 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseAudioTranscriptDelta Deserial delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseAudioTranscriptDelta( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - delta, - eventId, - kind, - additionalBinaryDataProperties); + delta); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs index 14cdeeeff..e85f7e786 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseAudioTranscriptDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseAudioTranscriptDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionDelta) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string response Delta = delta; } - internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseAudioTranscriptDelta(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs index 9f3008548..8c138a43c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseContentPartAdded DeserializeI internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseContentPartAdded( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - internalContentPart, - eventId, - kind, - additionalBinaryDataProperties); + internalContentPart); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs index 133c046b7..724642f3a 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartAdded.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartAdded : ConversationUpdate { - internal InternalRealtimeServerEventResponseContentPartAdded(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartStarted) + internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartStarted) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseContentPartAdded(string responseId, _internalContentPart = internalContentPart; } - internal InternalRealtimeServerEventResponseContentPartAdded(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartAdded(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs index 1c52c3efc..692b849de 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; ConversationContentPart internalContentPart = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseContentPartDone DeserializeIn internalContentPart = ConversationContentPart.DeserializeConversationContentPart(prop.Value, options); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseContentPartDone( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - internalContentPart, - eventId, - kind, - additionalBinaryDataProperties); + internalContentPart); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs index f8f0d59b1..d54ce3321 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseContentPartDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseContentPartDone : ConversationUpdate { - internal InternalRealtimeServerEventResponseContentPartDone(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartFinished) + internal InternalRealtimeServerEventResponseContentPartDone(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemContentPartFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseContentPartDone(string responseId, s _internalContentPart = internalContentPart; } - internal InternalRealtimeServerEventResponseContentPartDone(string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseContentPartDone(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, ConversationContentPart internalContentPart) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs index a451e8e92..987eff1d5 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string delta = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDelta De delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseFunctionCallArgumentsDelta( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, callId, - delta, - eventId, - kind, - additionalBinaryDataProperties); + delta); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs index 078d2f9a4..8e3b5317c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string re Delta = delta; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string responseId, string itemId, int outputIndex, string callId, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDelta(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, string callId, string delta) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs index 4395fdfe6..1e772c69c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; string callId = default; string arguments = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseFunctionCallArgumentsDone Des arguments = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseFunctionCallArgumentsDone( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, callId, - arguments, - eventId, - kind, - additionalBinaryDataProperties); + arguments); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs index 10b8339f0..4570d31ab 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseFunctionCallArgumentsDone.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseFunctionCallArgumentsDone : ConversationUpdate { - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string responseId, string itemId, int outputIndex, string callId, string arguments, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsFinished) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, string responseId, string itemId, int outputIndex, string callId, string arguments) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFunctionCallArgumentsFinished) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string res Arguments = arguments; } - internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string responseId, string itemId, int outputIndex, string callId, string arguments, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseFunctionCallArgumentsDone(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, string callId, string arguments) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs index 13e8542d3..663b7a5e9 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.Serialization.cs @@ -78,16 +78,26 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal { return null; } + string eventId = default; + RealtimeConversation.ConversationUpdateKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; string delta = default; - string eventId = default; - RealtimeConversation.ConversationUpdateKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationUpdateKind(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -113,30 +123,20 @@ internal static InternalRealtimeServerEventResponseTextDelta DeserializeInternal delta = prop.Value.GetString(); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationUpdateKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } return new InternalRealtimeServerEventResponseTextDelta( + eventId, + kind, + additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - delta, - eventId, - kind, - additionalBinaryDataProperties); + delta); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs index 427fd74d6..533d2ac3c 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerEventResponseTextDelta.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation { internal partial class InternalRealtimeServerEventResponseTextDelta : ConversationUpdate { - internal InternalRealtimeServerEventResponseTextDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextDelta) + internal InternalRealtimeServerEventResponseTextDelta(string eventId, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextDelta) { ResponseId = responseId; ItemId = itemId; @@ -18,7 +18,7 @@ internal InternalRealtimeServerEventResponseTextDelta(string responseId, string Delta = delta; } - internal InternalRealtimeServerEventResponseTextDelta(string responseId, string itemId, int outputIndex, int contentIndex, string delta, string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties) : base(eventId, kind, additionalBinaryDataProperties) + internal InternalRealtimeServerEventResponseTextDelta(string eventId, RealtimeConversation.ConversationUpdateKind kind, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, string delta) : base(eventId, kind, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs index f77a98620..6bc541de0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.Serialization.cs @@ -64,13 +64,18 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti { return null; } + RealtimeConversation.ConversationTurnDetectionKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); float? threshold = default; TimeSpan? prefixPaddingMs = default; TimeSpan? silenceDurationMs = default; - RealtimeConversation.ConversationTurnDetectionKind kind = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + kind = prop.Value.GetString().ToConversationTurnDetectionKind(); + continue; + } if (prop.NameEquals("threshold"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -90,17 +95,12 @@ internal static InternalRealtimeServerVadTurnDetection DeserializeInternalRealti DeserializeMillisecondDuration(prop, ref silenceDurationMs); continue; } - if (prop.NameEquals("type"u8)) - { - kind = prop.Value.GetString().ToConversationTurnDetectionKind(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeServerVadTurnDetection(threshold, prefixPaddingMs, silenceDurationMs, kind, additionalBinaryDataProperties); + return new InternalRealtimeServerVadTurnDetection(kind, additionalBinaryDataProperties, threshold, prefixPaddingMs, silenceDurationMs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs index 027692616..2d781bf81 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeServerVadTurnDetection.cs @@ -13,7 +13,7 @@ public InternalRealtimeServerVadTurnDetection() : base(RealtimeConversation.Conv { } - internal InternalRealtimeServerVadTurnDetection(float? threshold, TimeSpan? prefixPaddingMs, TimeSpan? silenceDurationMs, RealtimeConversation.ConversationTurnDetectionKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + internal InternalRealtimeServerVadTurnDetection(RealtimeConversation.ConversationTurnDetectionKind kind, IDictionary additionalBinaryDataProperties, float? threshold, TimeSpan? prefixPaddingMs, TimeSpan? silenceDurationMs) : base(kind, additionalBinaryDataProperties) { Threshold = threshold; PrefixPaddingMs = prefixPaddingMs; diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs index e9f929916..ae7ba45e0 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalReal { return null; } - InternalRealtimeToolChoiceFunctionObjectFunction function = default; ConversationToolKind @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRealtimeToolChoiceFunctionObjectFunction function = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("function"u8)) + if (prop.NameEquals("type"u8)) { - function = InternalRealtimeToolChoiceFunctionObjectFunction.DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(prop.Value, options); + @type = new ConversationToolKind(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("function"u8)) { - @type = new ConversationToolKind(prop.Value.GetString()); + function = InternalRealtimeToolChoiceFunctionObjectFunction.DeserializeInternalRealtimeToolChoiceFunctionObjectFunction(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalRealtimeToolChoiceFunctionObject DeserializeInternalReal additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRealtimeToolChoiceFunctionObject(function, @type, additionalBinaryDataProperties); + return new InternalRealtimeToolChoiceFunctionObject(@type, additionalBinaryDataProperties, function); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs index ec130f54a..e5a4267e6 100644 --- a/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs +++ b/.dotnet/src/Generated/Models/InternalRealtimeToolChoiceFunctionObject.cs @@ -17,7 +17,7 @@ public InternalRealtimeToolChoiceFunctionObject(InternalRealtimeToolChoiceFuncti Function = function; } - internal InternalRealtimeToolChoiceFunctionObject(InternalRealtimeToolChoiceFunctionObjectFunction function, ConversationToolKind @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRealtimeToolChoiceFunctionObject(ConversationToolKind @type, IDictionary additionalBinaryDataProperties, InternalRealtimeToolChoiceFunctionObjectFunction function) : base(@type, additionalBinaryDataProperties) { Function = function; } diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs index 6a3c70562..dbe004b80 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.Serialization.cs @@ -56,9 +56,9 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess { return null; } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); InternalMessageRequestContentTextObjectType @type = default; string internalText = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -76,7 +76,7 @@ internal static InternalRequestMessageTextContent DeserializeInternalRequestMess additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRequestMessageTextContent(@type, internalText, additionalBinaryDataProperties); + return new InternalRequestMessageTextContent(additionalBinaryDataProperties, @type, internalText); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs index 8d2bedfea..fc2971d5b 100644 --- a/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalRequestMessageTextContent.cs @@ -17,7 +17,7 @@ public InternalRequestMessageTextContent(string internalText) InternalText = internalText; } - internal InternalRequestMessageTextContent(InternalMessageRequestContentTextObjectType @type, string internalText, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalRequestMessageTextContent(IDictionary additionalBinaryDataProperties, InternalMessageRequestContentTextObjectType @type, string internalText) : base(additionalBinaryDataProperties) { Type = @type; InternalText = internalText; diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs index 6335b9056..67876ee47 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalResponseFormatJsonSchema DeserializeInternalResponseForm { return null; } - InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; string @type = "json_schema"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalResponseFormatJsonSchemaJsonSchema jsonSchema = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("json_schema"u8)) + if (prop.NameEquals("type"u8)) { - jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("json_schema"u8)) { - @type = prop.Value.GetString(); + jsonSchema = InternalResponseFormatJsonSchemaJsonSchema.DeserializeInternalResponseFormatJsonSchemaJsonSchema(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalResponseFormatJsonSchema DeserializeInternalResponseForm additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalResponseFormatJsonSchema(jsonSchema, @type, additionalBinaryDataProperties); + return new InternalResponseFormatJsonSchema(@type, additionalBinaryDataProperties, jsonSchema); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs index e512ae87c..91aa9e238 100644 --- a/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs +++ b/.dotnet/src/Generated/Models/InternalResponseFormatJsonSchema.cs @@ -17,7 +17,7 @@ public InternalResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSche JsonSchema = jsonSchema; } - internal InternalResponseFormatJsonSchema(InternalResponseFormatJsonSchemaJsonSchema jsonSchema, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalResponseFormatJsonSchema(string @type, IDictionary additionalBinaryDataProperties, InternalResponseFormatJsonSchemaJsonSchema jsonSchema) : base(@type, additionalBinaryDataProperties) { JsonSchema = jsonSchema; } diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs index 922e43ca3..8272d8d6b 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.Serialization.cs @@ -56,9 +56,9 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe { return null; } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string @type = default; InternalMessageContentTextObjectText text = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -76,7 +76,7 @@ internal static InternalResponseMessageTextContent DeserializeInternalResponseMe additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalResponseMessageTextContent(@type, text, additionalBinaryDataProperties); + return new InternalResponseMessageTextContent(additionalBinaryDataProperties, @type, text); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs index 820f23ec2..98a3edb86 100644 --- a/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Generated/Models/InternalResponseMessageTextContent.cs @@ -9,7 +9,7 @@ namespace OpenAI.Assistants { internal partial class InternalResponseMessageTextContent : MessageContent { - internal InternalResponseMessageTextContent(string @type, InternalMessageContentTextObjectText text, IDictionary additionalBinaryDataProperties) : base(additionalBinaryDataProperties) + internal InternalResponseMessageTextContent(IDictionary additionalBinaryDataProperties, string @type, InternalMessageContentTextObjectText text) : base(additionalBinaryDataProperties) { _type = @type; _text = text; diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs index b4fc4f1d4..747bb9d1b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt { return null; } - string internalLogs = default; string @type = "logs"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string internalLogs = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("logs"u8)) + if (prop.NameEquals("type"u8)) { - internalLogs = prop.Value.GetString(); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("logs"u8)) { - @type = prop.Value.GetString(); + internalLogs = prop.Value.GetString(); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalRunStepCodeInterpreterLogOutput DeserializeInternalRunSt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepCodeInterpreterLogOutput(internalLogs, @type, additionalBinaryDataProperties); + return new InternalRunStepCodeInterpreterLogOutput(@type, additionalBinaryDataProperties, internalLogs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs index 90cb5af09..20134cd52 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterLogOutput.cs @@ -14,7 +14,7 @@ internal InternalRunStepCodeInterpreterLogOutput(string internalLogs) : base("lo InternalLogs = internalLogs; } - internal InternalRunStepCodeInterpreterLogOutput(string internalLogs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepCodeInterpreterLogOutput(string @type, IDictionary additionalBinaryDataProperties, string internalLogs) : base(@type, additionalBinaryDataProperties) { InternalLogs = internalLogs; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs index c830a490c..1180e2048 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInterna { return null; } - string id = default; - InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter = default; string @type = "code_interpreter"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("id"u8)) { id = prop.Value.GetString(); @@ -79,17 +84,12 @@ internal static InternalRunStepCodeInterpreterToolCallDetails DeserializeInterna codeInterpreter = InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDetailsToolCallsCodeObjectCodeInterpreter(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepCodeInterpreterToolCallDetails(id, codeInterpreter, @type, additionalBinaryDataProperties); + return new InternalRunStepCodeInterpreterToolCallDetails(@type, additionalBinaryDataProperties, id, codeInterpreter); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs index 6c0032581..1f8b3debf 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -15,7 +15,7 @@ internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunSte _codeInterpreter = codeInterpreter; } - internal InternalRunStepCodeInterpreterToolCallDetails(string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepCodeInterpreterToolCallDetails(string @type, IDictionary additionalBinaryDataProperties, string id, InternalRunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base(@type, additionalBinaryDataProperties) { Id = id; _codeInterpreter = codeInterpreter; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs index 1c6de59b8..5ff003063 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.Serialization.cs @@ -54,11 +54,16 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize { return null; } - InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation = default; string @type = "message_creation"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("message_creation"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -68,17 +73,12 @@ internal static InternalRunStepDeltaStepDetailsMessageCreationObject Deserialize messageCreation = InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsMessageCreationObject(messageCreation, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsMessageCreationObject(@type, additionalBinaryDataProperties, messageCreation); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs index 47d323824..9faa536c5 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsMessageCreationObject.cs @@ -13,7 +13,7 @@ internal InternalRunStepDeltaStepDetailsMessageCreationObject() : base("message_ { } - internal InternalRunStepDeltaStepDetailsMessageCreationObject(InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsMessageCreationObject(string @type, IDictionary additionalBinaryDataProperties, InternalRunStepDeltaStepDetailsMessageCreationObjectMessageCreation messageCreation) : base(@type, additionalBinaryDataProperties) { MessageCreation = messageCreation; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs index 75ab9c584..ce626cea9 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.Serialization.cs @@ -68,13 +68,18 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn { return null; } + string @type = "code_interpreter"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); int index = default; string id = default; InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter = default; - string @type = "code_interpreter"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -94,17 +99,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeObject DeserializeIn codeInterpreter = InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsCodeObject(index, id, codeInterpreter, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsCodeObject(@type, additionalBinaryDataProperties, index, id, codeInterpreter); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs index b8248bc64..232eaacc8 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index) : base("c Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(int index, string id, InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsCodeObject(string @type, IDictionary additionalBinaryDataProperties, int index, string id, InternalRunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 01c3af1f1..019556250 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De { return null; } - int index = default; - InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image = default; string @type = "image"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -83,17 +88,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject De image = InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(index, image, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(@type, additionalBinaryDataProperties, index, image); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs index d3aaecf4e..76500ee8d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(int index, InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(string @type, IDictionary additionalBinaryDataProperties, int index, InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage image) : base(@type, additionalBinaryDataProperties) { Index = index; Image = image; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs index eba3a9c40..829a1d703 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des { return null; } - int index = default; - string internalLogs = default; string @type = "logs"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + int index = default; + string internalLogs = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -79,17 +84,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Des internalLogs = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(index, internalLogs, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(@type, additionalBinaryDataProperties, index, internalLogs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs index 35e376051..37998b442 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index) Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(int index, string internalLogs, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(string @type, IDictionary additionalBinaryDataProperties, int index, string internalLogs) : base(@type, additionalBinaryDataProperties) { Index = index; InternalLogs = internalLogs; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs index d1106096b..959ac054f 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.Serialization.cs @@ -86,13 +86,18 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria { return null; } + string @type = "file_search"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); int index = default; string id = default; IDictionary fileSearch = default; - string @type = "file_search"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -120,17 +125,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFileSearchObject Deseria fileSearch = dictionary; continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(index, id, fileSearch, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(@type, additionalBinaryDataProperties, index, id, fileSearch); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs index d46308f6a..5a375dafc 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFileSearchObject.cs @@ -15,7 +15,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, IDi FileSearch = fileSearch; } - internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(int index, string id, IDictionary fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsFileSearchObject(string @type, IDictionary additionalBinaryDataProperties, int index, string id, IDictionary fileSearch) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs index 8153e4aed..a15bf2fe0 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.Serialization.cs @@ -68,13 +68,18 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali { return null; } + string @type = "function"; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); int index = default; string id = default; InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function = default; - string @type = "function"; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("index"u8)) { index = prop.Value.GetInt32(); @@ -94,17 +99,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsFunctionObject Deseriali function = InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsFunctionObject(index, id, function, @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsFunctionObject(@type, additionalBinaryDataProperties, index, id, function); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs index 445dcf9cc..403afcb1b 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsFunctionObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index) : bas Index = index; } - internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(int index, string id, InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsFunctionObject(string @type, IDictionary additionalBinaryDataProperties, int index, string id, InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction function) : base(@type, additionalBinaryDataProperties) { Index = index; Id = id; diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs index b900a33b2..4c7d10c26 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.Serialization.cs @@ -59,11 +59,16 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeIntern { return null; } - IList toolCalls = default; string @type = "tool_calls"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IList toolCalls = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("tool_calls"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -78,17 +83,12 @@ internal static InternalRunStepDeltaStepDetailsToolCallsObject DeserializeIntern toolCalls = array; continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDeltaStepDetailsToolCallsObject(toolCalls ?? new ChangeTrackingList(), @type, additionalBinaryDataProperties); + return new InternalRunStepDeltaStepDetailsToolCallsObject(@type, additionalBinaryDataProperties, toolCalls ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs index 291deb3c2..20bc75d39 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDeltaStepDetailsToolCallsObject.cs @@ -15,7 +15,7 @@ internal InternalRunStepDeltaStepDetailsToolCallsObject() : base("tool_calls") ToolCalls = new ChangeTrackingList(); } - internal InternalRunStepDeltaStepDetailsToolCallsObject(IList toolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDeltaStepDetailsToolCallsObject(string @type, IDictionary additionalBinaryDataProperties, IList toolCalls) : base(@type, additionalBinaryDataProperties) { ToolCalls = toolCalls; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs index 7bbf59a47..70ac2892d 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalR { return null; } - InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation = default; string @type = "message_creation"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("message_creation"u8)) + if (prop.NameEquals("type"u8)) { - messageCreation = InternalRunStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("message_creation"u8)) { - @type = prop.Value.GetString(); + messageCreation = InternalRunStepDetailsMessageCreationObjectMessageCreation.DeserializeInternalRunStepDetailsMessageCreationObjectMessageCreation(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalRunStepDetailsMessageCreationObject DeserializeInternalR additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDetailsMessageCreationObject(messageCreation, @type, additionalBinaryDataProperties); + return new InternalRunStepDetailsMessageCreationObject(@type, additionalBinaryDataProperties, messageCreation); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs index f65fa7177..0297b8f72 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsMessageCreationObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessa _messageCreation = messageCreation; } - internal InternalRunStepDetailsMessageCreationObject(InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDetailsMessageCreationObject(string @type, IDictionary additionalBinaryDataProperties, InternalRunStepDetailsMessageCreationObjectMessageCreation messageCreation) : base(@type, additionalBinaryDataProperties) { _messageCreation = messageCreation; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs index 667be4b5c..7b3184aff 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObject Deserialize { return null; } - InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image = default; string @type = "image"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("image"u8)) + if (prop.NameEquals("type"u8)) { - image = InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("image"u8)) { - @type = prop.Value.GetString(); + image = InternalRunStepDetailsToolCallsCodeOutputImageObjectImage.DeserializeInternalRunStepDetailsToolCallsCodeOutputImageObjectImage(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalRunStepDetailsToolCallsCodeOutputImageObject Deserialize additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDetailsToolCallsCodeOutputImageObject(image, @type, additionalBinaryDataProperties); + return new InternalRunStepDetailsToolCallsCodeOutputImageObject(@type, additionalBinaryDataProperties, image); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs index 428d5cb91..4f00f2f41 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsCodeOutputImageObject.cs @@ -14,7 +14,7 @@ internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDet _image = image; } - internal InternalRunStepDetailsToolCallsCodeOutputImageObject(InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsCodeOutputImageObject(string @type, IDictionary additionalBinaryDataProperties, InternalRunStepDetailsToolCallsCodeOutputImageObjectImage image) : base(@type, additionalBinaryDataProperties) { _image = image; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs index 81debe326..06127716e 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.Serialization.cs @@ -63,11 +63,16 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep { return null; } - IReadOnlyList internalToolCalls = default; string @type = "tool_calls"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IReadOnlyList internalToolCalls = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("tool_calls"u8)) { List array = new List(); @@ -78,17 +83,12 @@ internal static InternalRunStepDetailsToolCallsObject DeserializeInternalRunStep internalToolCalls = array; continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepDetailsToolCallsObject(internalToolCalls, @type, additionalBinaryDataProperties); + return new InternalRunStepDetailsToolCallsObject(@type, additionalBinaryDataProperties, internalToolCalls); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs index f6777cc4a..c54f7ea86 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepDetailsToolCallsObject.cs @@ -15,7 +15,7 @@ internal InternalRunStepDetailsToolCallsObject(IEnumerable inte InternalToolCalls = internalToolCalls.ToList(); } - internal InternalRunStepDetailsToolCallsObject(IReadOnlyList internalToolCalls, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepDetailsToolCallsObject(string @type, IDictionary additionalBinaryDataProperties, IReadOnlyList internalToolCalls) : base(@type, additionalBinaryDataProperties) { InternalToolCalls = internalToolCalls; } diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs index fb316402f..e31dff5d3 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunS { return null; } - string id = default; - InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch = default; string @type = "file_search"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("id"u8)) { id = prop.Value.GetString(); @@ -79,17 +84,12 @@ internal static InternalRunStepFileSearchToolCallDetails DeserializeInternalRunS fileSearch = InternalRunStepDetailsToolCallsFileSearchObjectFileSearch.DeserializeInternalRunStepDetailsToolCallsFileSearchObjectFileSearch(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepFileSearchToolCallDetails(id, fileSearch, @type, additionalBinaryDataProperties); + return new InternalRunStepFileSearchToolCallDetails(@type, additionalBinaryDataProperties, id, fileSearch); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs index 37c58129b..390d346ac 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFileSearchToolCallDetails.cs @@ -15,7 +15,7 @@ internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDeta FileSearch = fileSearch; } - internal InternalRunStepFileSearchToolCallDetails(string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepFileSearchToolCallDetails(string @type, IDictionary additionalBinaryDataProperties, string id, InternalRunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch) : base(@type, additionalBinaryDataProperties) { Id = id; FileSearch = fileSearch; diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs index 5f8f50fa6..5c536e986 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -63,12 +63,17 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte { return null; } - string id = default; - InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction = default; string @type = "function"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } if (prop.NameEquals("id"u8)) { id = prop.Value.GetString(); @@ -79,17 +84,12 @@ internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunSte internalFunction = InternalRunStepDetailsToolCallsFunctionObjectFunction.DeserializeInternalRunStepDetailsToolCallsFunctionObjectFunction(prop.Value, options); continue; } - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalRunStepFunctionToolCallDetails(id, internalFunction, @type, additionalBinaryDataProperties); + return new InternalRunStepFunctionToolCallDetails(@type, additionalBinaryDataProperties, id, internalFunction); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs index 20d6c82eb..5de4cdc59 100644 --- a/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs +++ b/.dotnet/src/Generated/Models/InternalRunStepFunctionToolCallDetails.cs @@ -15,7 +15,7 @@ internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetail _internalFunction = internalFunction; } - internal InternalRunStepFunctionToolCallDetails(string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalRunStepFunctionToolCallDetails(string @type, IDictionary additionalBinaryDataProperties, string id, InternalRunStepDetailsToolCallsFunctionObjectFunction internalFunction) : base(@type, additionalBinaryDataProperties) { Id = id; _internalFunction = internalFunction; diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs index 74cfb54f2..3058302f7 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.Serialization.cs @@ -58,19 +58,19 @@ internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalSt { return null; } - InternalStaticChunkingStrategyDetails @static = default; string @type = "static"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalStaticChunkingStrategyDetails @static = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("static"u8)) + if (prop.NameEquals("type"u8)) { - @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("static"u8)) { - @type = prop.Value.GetString(); + @static = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static InternalStaticChunkingStrategyRequestParam DeserializeInternalSt additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalStaticChunkingStrategyRequestParam(@static, @type, additionalBinaryDataProperties); + return new InternalStaticChunkingStrategyRequestParam(@type, additionalBinaryDataProperties, @static); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs index 218d77081..dae22259c 100644 --- a/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs +++ b/.dotnet/src/Generated/Models/InternalStaticChunkingStrategyRequestParam.cs @@ -17,7 +17,7 @@ public InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrategy Static = @static; } - internal InternalStaticChunkingStrategyRequestParam(InternalStaticChunkingStrategyDetails @static, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal InternalStaticChunkingStrategyRequestParam(string @type, IDictionary additionalBinaryDataProperties, InternalStaticChunkingStrategyDetails @static) : base(@type, additionalBinaryDataProperties) { Static = @static; } diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs index decd57136..d480e4317 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.Serialization.cs @@ -58,19 +58,19 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy { return null; } - InternalStaticChunkingStrategyDetails internalDetails = default; string @type = "static"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalStaticChunkingStrategyDetails internalDetails = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("static"u8)) + if (prop.NameEquals("type"u8)) { - internalDetails = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("static"u8)) { - @type = prop.Value.GetString(); + internalDetails = InternalStaticChunkingStrategyDetails.DeserializeInternalStaticChunkingStrategyDetails(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static StaticFileChunkingStrategy DeserializeStaticFileChunkingStrategy additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new StaticFileChunkingStrategy(internalDetails, @type, additionalBinaryDataProperties); + return new StaticFileChunkingStrategy(@type, additionalBinaryDataProperties, internalDetails); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs index a77781aab..f59a5ede5 100644 --- a/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs +++ b/.dotnet/src/Generated/Models/StaticFileChunkingStrategy.cs @@ -9,7 +9,7 @@ namespace OpenAI.VectorStores { public partial class StaticFileChunkingStrategy : FileChunkingStrategy { - internal StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal StaticFileChunkingStrategy(string @type, IDictionary additionalBinaryDataProperties, InternalStaticChunkingStrategyDetails internalDetails) : base(@type, additionalBinaryDataProperties) { _internalDetails = internalDetails; } diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs index 8d3fbae64..620f4d85d 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.Serialization.cs @@ -47,17 +47,12 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme { return null; } - string participantName = default; Chat.ChatMessageRole role = default; ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string participantName = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("name"u8)) - { - participantName = prop.Value.GetString(); - continue; - } if (prop.NameEquals("role"u8)) { role = prop.Value.GetString().ToChatMessageRole(); @@ -68,13 +63,18 @@ internal static SystemChatMessage DeserializeSystemChatMessage(JsonElement eleme DeserializeContentValue(prop, ref content); continue; } + if (prop.NameEquals("name"u8)) + { + participantName = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } // CUSTOM: Initialize Content collection property. - return new SystemChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); + return new SystemChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, participantName); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/SystemChatMessage.cs b/.dotnet/src/Generated/Models/SystemChatMessage.cs index ae86a6216..bfd80b1ab 100644 --- a/.dotnet/src/Generated/Models/SystemChatMessage.cs +++ b/.dotnet/src/Generated/Models/SystemChatMessage.cs @@ -13,7 +13,7 @@ public SystemChatMessage() : base(Chat.ChatMessageRole.System) { } - internal SystemChatMessage(string participantName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + internal SystemChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string participantName) : base(role, content, additionalBinaryDataProperties) { ParticipantName = participantName; } diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs index d84ffe018..c3072ce6b 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.Serialization.cs @@ -51,17 +51,12 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, { return null; } - string toolCallId = default; Chat.ChatMessageRole role = default; ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string toolCallId = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("tool_call_id"u8)) - { - toolCallId = prop.Value.GetString(); - continue; - } if (prop.NameEquals("role"u8)) { role = prop.Value.GetString().ToChatMessageRole(); @@ -72,13 +67,18 @@ internal static ToolChatMessage DeserializeToolChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } + if (prop.NameEquals("tool_call_id"u8)) + { + toolCallId = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } // CUSTOM: Initialize Content collection property. - return new ToolChatMessage(toolCallId, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); + return new ToolChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, toolCallId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/ToolChatMessage.cs b/.dotnet/src/Generated/Models/ToolChatMessage.cs index 9dca87e65..e6ee43d0f 100644 --- a/.dotnet/src/Generated/Models/ToolChatMessage.cs +++ b/.dotnet/src/Generated/Models/ToolChatMessage.cs @@ -17,7 +17,7 @@ public ToolChatMessage(string toolCallId) : base(Chat.ChatMessageRole.Tool) ToolCallId = toolCallId; } - internal ToolChatMessage(string toolCallId, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + internal ToolChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string toolCallId) : base(role, content, additionalBinaryDataProperties) { ToolCallId = toolCallId; } diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs index 9fbb40a4e..ca9a6fa94 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.Serialization.cs @@ -53,13 +53,23 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ { return null; } - ConversationMessageRole role = default; - ConversationItemStatus? status = default; InternalRealtimeItemType @type = default; string id = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + ConversationMessageRole role = default; + ConversationItemStatus? status = default; foreach (var prop in element.EnumerateObject()) { + if (prop.NameEquals("type"u8)) + { + @type = new InternalRealtimeItemType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } if (prop.NameEquals("role"u8)) { role = new ConversationMessageRole(prop.Value.GetString()); @@ -74,22 +84,12 @@ internal static UnknownRealtimeRequestMessageItem DeserializeUnknownRealtimeRequ status = new ConversationItemStatus(prop.Value.GetString()); continue; } - if (prop.NameEquals("type"u8)) - { - @type = new InternalRealtimeItemType(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new UnknownRealtimeRequestMessageItem(role, status, @type, id, additionalBinaryDataProperties); + return new UnknownRealtimeRequestMessageItem(@type, id, additionalBinaryDataProperties, role, status); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs index 843ec3e43..c27c0caf0 100644 --- a/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs +++ b/.dotnet/src/Generated/Models/UnknownRealtimeRequestMessageItem.cs @@ -10,7 +10,7 @@ namespace OpenAI.Models { internal partial class UnknownRealtimeRequestMessageItem : InternalRealtimeRequestMessageItem { - internal UnknownRealtimeRequestMessageItem(ConversationMessageRole role, ConversationItemStatus? status, InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties) : base(role != default ? role : "unknown", status, @type != default ? @type : "unknown", id, additionalBinaryDataProperties) + internal UnknownRealtimeRequestMessageItem(InternalRealtimeItemType @type, string id, IDictionary additionalBinaryDataProperties, ConversationMessageRole role, ConversationItemStatus? status) : base(@type != default ? @type : "unknown", id, additionalBinaryDataProperties, role != default ? role : "unknown", status) { } } diff --git a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs index 29081a7e6..300edf218 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.Serialization.cs @@ -47,17 +47,12 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, { return null; } - string participantName = default; Chat.ChatMessageRole role = default; ChatMessageContent content = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string participantName = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("name"u8)) - { - participantName = prop.Value.GetString(); - continue; - } if (prop.NameEquals("role"u8)) { role = prop.Value.GetString().ToChatMessageRole(); @@ -68,13 +63,18 @@ internal static UserChatMessage DeserializeUserChatMessage(JsonElement element, DeserializeContentValue(prop, ref content); continue; } + if (prop.NameEquals("name"u8)) + { + participantName = prop.Value.GetString(); + continue; + } if (true) { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } // CUSTOM: Initialize Content collection property. - return new UserChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties); + return new UserChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, participantName); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/UserChatMessage.cs b/.dotnet/src/Generated/Models/UserChatMessage.cs index cd7988425..4e3ea9adf 100644 --- a/.dotnet/src/Generated/Models/UserChatMessage.cs +++ b/.dotnet/src/Generated/Models/UserChatMessage.cs @@ -13,7 +13,7 @@ public UserChatMessage() : base(Chat.ChatMessageRole.User) { } - internal UserChatMessage(string participantName, Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties) : base(role, content, additionalBinaryDataProperties) + internal UserChatMessage(Chat.ChatMessageRole role, ChatMessageContent content, IDictionary additionalBinaryDataProperties, string participantName) : base(role, content, additionalBinaryDataProperties) { ParticipantName = participantName; } diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs index 2ca3d5c89..893030090 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.Serialization.cs @@ -58,19 +58,19 @@ internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegrati { return null; } - InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb = default; string @type = "wandb"; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb = default; foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("wandb"u8)) + if (prop.NameEquals("type"u8)) { - wandb = InternalCreateFineTuningJobRequestWandbIntegrationWandb.DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(prop.Value, options); + @type = prop.Value.GetString(); continue; } - if (prop.NameEquals("type"u8)) + if (prop.NameEquals("wandb"u8)) { - @type = prop.Value.GetString(); + wandb = InternalCreateFineTuningJobRequestWandbIntegrationWandb.DeserializeInternalCreateFineTuningJobRequestWandbIntegrationWandb(prop.Value, options); continue; } if (true) @@ -78,7 +78,7 @@ internal static WeightsAndBiasesIntegration DeserializeWeightsAndBiasesIntegrati additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new WeightsAndBiasesIntegration(wandb, @type, additionalBinaryDataProperties); + return new WeightsAndBiasesIntegration(@type, additionalBinaryDataProperties, wandb); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); diff --git a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs index f320cdbca..7a9991f10 100644 --- a/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs +++ b/.dotnet/src/Generated/Models/WeightsAndBiasesIntegration.cs @@ -17,7 +17,7 @@ public WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbIntegr Wandb = wandb; } - internal WeightsAndBiasesIntegration(InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb, string @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + internal WeightsAndBiasesIntegration(string @type, IDictionary additionalBinaryDataProperties, InternalCreateFineTuningJobRequestWandbIntegrationWandb wandb) : base(@type, additionalBinaryDataProperties) { Wandb = wandb; } diff --git a/.dotnet/src/Generated/OpenAIModelFactory.cs b/.dotnet/src/Generated/OpenAIModelFactory.cs index 595cfec2a..312a4cb45 100644 --- a/.dotnet/src/Generated/OpenAIModelFactory.cs +++ b/.dotnet/src/Generated/OpenAIModelFactory.cs @@ -123,7 +123,7 @@ public static VectorStoreFileAssociationError VectorStoreFileAssociationError(Ve public static StaticFileChunkingStrategy StaticFileChunkingStrategy(InternalStaticChunkingStrategyDetails internalDetails = default) { - return new StaticFileChunkingStrategy(internalDetails, "static", additionalBinaryDataProperties: null); + return new StaticFileChunkingStrategy("static", additionalBinaryDataProperties: null, internalDetails); } public static FileChunkingStrategy FileChunkingStrategy(string @type = default) @@ -190,7 +190,7 @@ public static ToolDefinition ToolDefinition(string @type = default) public static FileSearchToolDefinition FileSearchToolDefinition(InternalAssistantToolsFileSearchFileSearch fileSearch = default) { - return new FileSearchToolDefinition(fileSearch, "file_search", additionalBinaryDataProperties: null); + return new FileSearchToolDefinition("file_search", additionalBinaryDataProperties: null, fileSearch); } public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker? ranker = default, float scoreThreshold = default) @@ -199,10 +199,10 @@ public static FileSearchRankingOptions FileSearchRankingOptions(FileSearchRanker return new FileSearchRankingOptions(ranker, scoreThreshold, serializedAdditionalRawData: null); } - public static FunctionToolDefinition FunctionToolDefinition(InternalFunctionDefinition internalFunction = default) + public static FunctionToolDefinition FunctionToolDefinition(string @type = default, InternalFunctionDefinition function = default) { - return new FunctionToolDefinition(internalFunction, "function", serializedAdditionalRawData: null); + return new FunctionToolDefinition(@type, serializedAdditionalRawData: null, function); } public static FileSearchToolResources FileSearchToolResources(IEnumerable vectorStoreIds = default, IEnumerable newVectorStores = default) @@ -451,10 +451,10 @@ public static ConversationTool ConversationTool(string kind = default) return new UnknownRealtimeTool(new ConversationToolKind(kind), additionalBinaryDataProperties: null); } - public static ConversationFunctionTool ConversationFunctionTool(string name = default, string description = default, BinaryData parameters = default) + public static ConversationFunctionTool ConversationFunctionTool(ConversationToolKind kind = default, string name = default, string description = default, BinaryData parameters = default) { - return new ConversationFunctionTool(name, description, parameters, ConversationToolKind.Function, serializedAdditionalRawData: null); + return new ConversationFunctionTool(kind, serializedAdditionalRawData: null, name, description, parameters); } public static ConversationItem ConversationItem(string @type = default, string id = default) @@ -475,28 +475,28 @@ public static ConversationUpdate ConversationUpdate(string eventId = default, st return new UnknownRealtimeServerEvent(eventId, kind.ToConversationUpdateKind(), additionalBinaryDataProperties: null); } - public static ConversationErrorUpdate ConversationErrorUpdate(InternalRealtimeServerEventErrorError error = default, string eventId = default) + public static ConversationErrorUpdate ConversationErrorUpdate(string eventId = default, InternalRealtimeServerEventErrorError error = default) { - return new ConversationErrorUpdate(error, eventId, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null); + return new ConversationErrorUpdate(eventId, RealtimeConversation.ConversationUpdateKind.Error, additionalBinaryDataProperties: null, error); } - public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) + public static ConversationSessionStartedUpdate ConversationSessionStartedUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) { - return new ConversationSessionStartedUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null); + return new ConversationSessionStartedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.SessionStarted, additionalBinaryDataProperties: null, internalSession); } - public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(InternalRealtimeResponseSession internalSession = default, string eventId = default) + public static ConversationSessionConfiguredUpdate ConversationSessionConfiguredUpdate(string eventId = default, InternalRealtimeResponseSession internalSession = default) { - return new ConversationSessionConfiguredUpdate(internalSession, eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null); + return new ConversationSessionConfiguredUpdate(eventId, RealtimeConversation.ConversationUpdateKind.SessionConfigured, additionalBinaryDataProperties: null, internalSession); } - public static ConversationInputAudioCommittedUpdate ConversationInputAudioCommittedUpdate(string previousItemId = default, string itemId = default, string eventId = default) + public static ConversationInputAudioCommittedUpdate ConversationInputAudioCommittedUpdate(string eventId = default, string previousItemId = default, string itemId = default) { - return new ConversationInputAudioCommittedUpdate(previousItemId, itemId, eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted, additionalBinaryDataProperties: null); + return new ConversationInputAudioCommittedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCommitted, additionalBinaryDataProperties: null, previousItemId, itemId); } public static ConversationInputAudioClearedUpdate ConversationInputAudioClearedUpdate(string eventId = default) @@ -505,70 +505,70 @@ public static ConversationInputAudioClearedUpdate ConversationInputAudioClearedU return new ConversationInputAudioClearedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputAudioCleared, additionalBinaryDataProperties: null); } - public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string itemId = default, int audioStartMs = default, string eventId = default) + public static ConversationInputSpeechStartedUpdate ConversationInputSpeechStartedUpdate(string eventId = default, string itemId = default, int audioStartMs = default) { - return new ConversationInputSpeechStartedUpdate(itemId, audioStartMs, eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted, additionalBinaryDataProperties: null); + return new ConversationInputSpeechStartedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStarted, additionalBinaryDataProperties: null, itemId, audioStartMs); } - public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string itemId = default, int audioEndMs = default, string eventId = default) + public static ConversationInputSpeechFinishedUpdate ConversationInputSpeechFinishedUpdate(string eventId = default, string itemId = default, int audioEndMs = default) { - return new ConversationInputSpeechFinishedUpdate(itemId, audioEndMs, eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped, additionalBinaryDataProperties: null); + return new ConversationInputSpeechFinishedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.InputSpeechStopped, additionalBinaryDataProperties: null, itemId, audioEndMs); } - public static ConversationItemCreatedUpdate ConversationItemCreatedUpdate(string previousItemId = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) + public static ConversationItemCreatedUpdate ConversationItemCreatedUpdate(string eventId = default, string previousItemId = default, InternalRealtimeResponseItem internalItem = default) { - return new ConversationItemCreatedUpdate(previousItemId, internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated, additionalBinaryDataProperties: null); + return new ConversationItemCreatedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.ItemCreated, additionalBinaryDataProperties: null, previousItemId, internalItem); } - public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string itemId = default, int contentIndex = default, string transcript = default, string eventId = default) + public static ConversationInputTranscriptionFinishedUpdate ConversationInputTranscriptionFinishedUpdate(string eventId = default, string itemId = default, int contentIndex = default, string transcript = default) { return new ConversationInputTranscriptionFinishedUpdate( - itemId, - contentIndex, - transcript, eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFinished, - additionalBinaryDataProperties: null); + additionalBinaryDataProperties: null, + itemId, + contentIndex, + transcript); } - public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string itemId = default, int contentIndex = default, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default, string eventId = default) + public static ConversationInputTranscriptionFailedUpdate ConversationInputTranscriptionFailedUpdate(string eventId = default, string itemId = default, int contentIndex = default, InternalRealtimeServerEventConversationItemInputAudioTranscriptionFailedError error = default) { return new ConversationInputTranscriptionFailedUpdate( - itemId, - contentIndex, - error, eventId, RealtimeConversation.ConversationUpdateKind.InputTranscriptionFailed, - additionalBinaryDataProperties: null); + additionalBinaryDataProperties: null, + itemId, + contentIndex, + error); } - public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string itemId = default, int contentIndex = default, int audioEndMs = default, string eventId = default) + public static ConversationItemTruncatedUpdate ConversationItemTruncatedUpdate(string eventId = default, string itemId = default, int contentIndex = default, int audioEndMs = default) { return new ConversationItemTruncatedUpdate( - itemId, - contentIndex, - audioEndMs, eventId, RealtimeConversation.ConversationUpdateKind.ItemTruncated, - additionalBinaryDataProperties: null); + additionalBinaryDataProperties: null, + itemId, + contentIndex, + audioEndMs); } - public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string itemId = default, string eventId = default) + public static ConversationItemDeletedUpdate ConversationItemDeletedUpdate(string eventId = default, string itemId = default) { - return new ConversationItemDeletedUpdate(itemId, eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null); + return new ConversationItemDeletedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.ItemDeleted, additionalBinaryDataProperties: null, itemId); } - public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) + public static ConversationResponseStartedUpdate ConversationResponseStartedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) { - return new ConversationResponseStartedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null); + return new ConversationResponseStartedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.ResponseStarted, additionalBinaryDataProperties: null, internalResponse); } public static ConversationStatusDetails ConversationStatusDetails(string statusKind = default) @@ -601,82 +601,82 @@ public static ConversationOutputTokenUsageDetails ConversationOutputTokenUsageDe return new ConversationOutputTokenUsageDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); } - public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(InternalRealtimeResponse internalResponse = default, string eventId = default) + public static ConversationResponseFinishedUpdate ConversationResponseFinishedUpdate(string eventId = default, InternalRealtimeResponse internalResponse = default) { - return new ConversationResponseFinishedUpdate(internalResponse, eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null); + return new ConversationResponseFinishedUpdate(eventId, RealtimeConversation.ConversationUpdateKind.ResponseFinished, additionalBinaryDataProperties: null, internalResponse); } - public static ConversationItemStreamingStartedUpdate ConversationItemStreamingStartedUpdate(string responseId = default, int itemIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) + public static ConversationItemStreamingStartedUpdate ConversationItemStreamingStartedUpdate(string eventId = default, string responseId = default, int itemIndex = default, InternalRealtimeResponseItem internalItem = default) { return new ConversationItemStreamingStartedUpdate( - responseId, - itemIndex, - internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingStarted, - additionalBinaryDataProperties: null); + additionalBinaryDataProperties: null, + responseId, + itemIndex, + internalItem); } - public static ConversationItemStreamingFinishedUpdate ConversationItemStreamingFinishedUpdate(string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default, string eventId = default) + public static ConversationItemStreamingFinishedUpdate ConversationItemStreamingFinishedUpdate(string eventId = default, string responseId = default, int outputIndex = default, InternalRealtimeResponseItem internalItem = default) { return new ConversationItemStreamingFinishedUpdate( - responseId, - outputIndex, - internalItem, eventId, RealtimeConversation.ConversationUpdateKind.ItemStreamingFinished, - additionalBinaryDataProperties: null); + additionalBinaryDataProperties: null, + responseId, + outputIndex, + internalItem); } - public static ConversationItemStreamingTextFinishedUpdate ConversationItemStreamingTextFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string text = default, string eventId = default) + public static ConversationItemStreamingTextFinishedUpdate ConversationItemStreamingTextFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string text = default) { return new ConversationItemStreamingTextFinishedUpdate( + eventId, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished, + additionalBinaryDataProperties: null, responseId, itemId, outputIndex, contentIndex, - text, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemStreamingPartTextFinished, - additionalBinaryDataProperties: null); + text); } - public static ConversationItemStreamingAudioTranscriptionFinishedUpdate ConversationItemStreamingAudioTranscriptionFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string transcript = default, string eventId = default) + public static ConversationItemStreamingAudioTranscriptionFinishedUpdate ConversationItemStreamingAudioTranscriptionFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string transcript = default) { return new ConversationItemStreamingAudioTranscriptionFinishedUpdate( + eventId, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished, + additionalBinaryDataProperties: null, responseId, itemId, outputIndex, contentIndex, - transcript, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioTranscriptionFinished, - additionalBinaryDataProperties: null); + transcript); } - public static ConversationItemStreamingAudioFinishedUpdate ConversationItemStreamingAudioFinishedUpdate(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, string eventId = default) + public static ConversationItemStreamingAudioFinishedUpdate ConversationItemStreamingAudioFinishedUpdate(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default) { return new ConversationItemStreamingAudioFinishedUpdate( + eventId, + RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished, + additionalBinaryDataProperties: null, responseId, itemId, outputIndex, - contentIndex, - eventId, - RealtimeConversation.ConversationUpdateKind.ItemStreamingPartAudioFinished, - additionalBinaryDataProperties: null); + contentIndex); } - public static ConversationRateLimitsUpdate ConversationRateLimitsUpdate(IEnumerable allDetails = default, string eventId = default) + public static ConversationRateLimitsUpdate ConversationRateLimitsUpdate(string eventId = default, IEnumerable allDetails = default) { allDetails ??= new ChangeTrackingList(); - return new ConversationRateLimitsUpdate(allDetails?.ToList(), eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null); + return new ConversationRateLimitsUpdate(eventId, RealtimeConversation.ConversationUpdateKind.RateLimitsUpdated, additionalBinaryDataProperties: null, allDetails?.ToList()); } public static ConversationRateLimitDetailsItem ConversationRateLimitDetailsItem(string name = default, int maximumCount = default, int remainingCount = default, TimeSpan timeUntilReset = default) @@ -689,7 +689,7 @@ public static ModerationResultCollection ModerationResultCollection(string id = { results ??= new ChangeTrackingList(); - return new ModerationResultCollection(id, model, results?.ToList(), serializedAdditionalRawData: null); + return new ModerationResultCollection(id, model, results?.ToList()); } public static ModerationResult ModerationResult(bool flagged = default) @@ -779,7 +779,7 @@ public static GeneratedImageCollection GeneratedImageCollection(DateTimeOffset c { data ??= new ChangeTrackingList(); - return new GeneratedImageCollection(created, data?.ToList(), serializedAdditionalRawData: null); + return new GeneratedImageCollection(created, data?.ToList()); } public static GeneratedImage GeneratedImage(string revisedPrompt = default, BinaryData imageBytes = default, Uri imageUri = default) @@ -929,30 +929,30 @@ public static ChatMessage ChatMessage(string role = default, ChatMessageContent return new InternalUnknownChatMessage(role.ToChatMessageRole(), content, additionalBinaryDataProperties: null); } - public static SystemChatMessage SystemChatMessage(string participantName = default, ChatMessageContent content = default) + public static SystemChatMessage SystemChatMessage(ChatMessageContent content = default, string participantName = default) { - return new SystemChatMessage(participantName, Chat.ChatMessageRole.System, content, additionalBinaryDataProperties: null); + return new SystemChatMessage(Chat.ChatMessageRole.System, content, additionalBinaryDataProperties: null, participantName); } - public static UserChatMessage UserChatMessage(string participantName = default, ChatMessageContent content = default) + public static UserChatMessage UserChatMessage(ChatMessageContent content = default, string participantName = default) { - return new UserChatMessage(participantName, Chat.ChatMessageRole.User, content, additionalBinaryDataProperties: null); + return new UserChatMessage(Chat.ChatMessageRole.User, content, additionalBinaryDataProperties: null, participantName); } - public static AssistantChatMessage AssistantChatMessage(string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default, ChatMessageContent content = default) + public static AssistantChatMessage AssistantChatMessage(ChatMessageContent content = default, string refusal = default, string participantName = default, IEnumerable toolCalls = default, ChatFunctionCall functionCall = default) { toolCalls ??= new ChangeTrackingList(); return new AssistantChatMessage( + Chat.ChatMessageRole.Assistant, + content, + additionalBinaryDataProperties: null, refusal, participantName, toolCalls?.ToList(), - functionCall, - Chat.ChatMessageRole.Assistant, - content, - additionalBinaryDataProperties: null); + functionCall); } public static ChatToolCall ChatToolCall(string id = default, InternalChatCompletionMessageToolCallFunction function = default, Chat.ChatToolCallKind kind = default) @@ -967,16 +967,16 @@ public static ChatFunctionCall ChatFunctionCall(string functionName = default, B return new ChatFunctionCall(functionName, functionArguments, additionalBinaryDataProperties: null); } - public static ToolChatMessage ToolChatMessage(string toolCallId = default, ChatMessageContent content = default) + public static ToolChatMessage ToolChatMessage(ChatMessageContent content = default, string toolCallId = default) { - return new ToolChatMessage(toolCallId, Chat.ChatMessageRole.Tool, content, additionalBinaryDataProperties: null); + return new ToolChatMessage(Chat.ChatMessageRole.Tool, content, additionalBinaryDataProperties: null, toolCallId); } - public static FunctionChatMessage FunctionChatMessage(string functionName = default, ChatMessageContent content = default) + public static FunctionChatMessage FunctionChatMessage(ChatMessageContent content = default, string functionName = default) { - return new FunctionChatMessage(functionName, Chat.ChatMessageRole.Function, content, additionalBinaryDataProperties: null); + return new FunctionChatMessage(Chat.ChatMessageRole.Function, content, additionalBinaryDataProperties: null, functionName); } public static ChatResponseFormat ChatResponseFormat(string @type = default) @@ -1201,10 +1201,10 @@ public static AssistantResponseFormat AssistantResponseFormat(string @type = def return new InternalUnknownAssistantResponseFormat(@type, additionalBinaryDataProperties: null); } - public static ChatFunctionChoice ChatFunctionChoice(string functionName = default) + public static ChatFunctionChoice ChatFunctionChoice(string predefinedFunctionChoice = default) { - return new ChatFunctionChoice(functionName, serializedAdditionalRawData: null); + return new ChatFunctionChoice(predefinedFunctionChoice); } public static ChatToolChoice ChatToolChoice() diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index b74524eb7..33504ef08 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + diff --git a/.scripts/Edit-Serialization.ps1 b/.scripts/Edit-Serialization.ps1 index 837a05648..4d7d79948 100644 --- a/.scripts/Edit-Serialization.ps1 +++ b/.scripts/Edit-Serialization.ps1 @@ -121,24 +121,24 @@ function Edit-AssistantChatMessageSerialization { # content deserialization $inputRegex = @( "return new AssistantChatMessage\(" + " role," + " content," + " additionalBinaryDataProperties," " refusal," " participantName," " toolCalls \?\? new ChangeTrackingList\(\)," - " functionCall," - " role," - " content," - " additionalBinaryDataProperties\);" + " functionCall\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new AssistantChatMessage(" + " role," + " content ?? new ChatMessageContent()," + " additionalBinaryDataProperties," " refusal," " participantName," " toolCalls ?? new ChangeTrackingList()," - " functionCall," - " role," - " content ?? new ChatMessageContent()," - " additionalBinaryDataProperties);" + " functionCall);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -151,11 +151,11 @@ function Edit-FunctionChatMessageSerialization { # content deserialization $inputRegex = @( - "return new FunctionChatMessage\(functionName, role, content, additionalBinaryDataProperties\);" + "return new FunctionChatMessage\(role, content, additionalBinaryDataProperties, functionName\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new FunctionChatMessage(functionName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" + "return new FunctionChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, functionName);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -168,11 +168,11 @@ function Edit-SystemChatMessageSerialization { # content deserialization $inputRegex = @( - "return new SystemChatMessage\(participantName, role, content, additionalBinaryDataProperties\);" + "return new SystemChatMessage\(role, content, additionalBinaryDataProperties, participantName\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new SystemChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" + "return new SystemChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, participantName);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -185,11 +185,11 @@ function Edit-ToolChatMessageSerialization { # content deserialization $inputRegex = @( - "return new ToolChatMessage\(toolCallId, role, content, additionalBinaryDataProperties\);" + "return new ToolChatMessage\(role, content, additionalBinaryDataProperties, toolCallId\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new ToolChatMessage(toolCallId, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" + "return new ToolChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, toolCallId);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -202,11 +202,11 @@ function Edit-UserChatMessageSerialization { # content deserialization $inputRegex = @( - "return new UserChatMessage\(participantName, role, content, additionalBinaryDataProperties\);" + "return new UserChatMessage\(role, content, additionalBinaryDataProperties, participantName\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." - "return new UserChatMessage(participantName, role, content ?? new ChatMessageContent(), additionalBinaryDataProperties);" + "return new UserChatMessage(role, content ?? new ChatMessageContent(), additionalBinaryDataProperties, participantName);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } @@ -237,24 +237,24 @@ function Edit-InternalFineTuneChatCompletionRequestAssistantMessageSerialization # content deserialization $inputRegex = @( "return new InternalFineTuneChatCompletionRequestAssistantMessage\(" + " role," + " content," + " additionalBinaryDataProperties," " refusal," " participantName," " toolCalls \?\? new ChangeTrackingList\(\)," - " functionCall," - " role," - " content," - " additionalBinaryDataProperties\);" + " functionCall\);" ) $outputString = @( "// CUSTOM: Initialize Content collection property." "return new InternalFineTuneChatCompletionRequestAssistantMessage(" + " role," + " content ?? new ChatMessageContent()," + " additionalBinaryDataProperties," " refusal," " participantName," " toolCalls ?? new ChangeTrackingList()," - " functionCall," - " role," - " content ?? new ChatMessageContent()," - " additionalBinaryDataProperties);" + " functionCall);" ) Edit-Serialization -Filename $filename -InputRegex $inputRegex -OutputString $outputString -OutputIndentation 12 } From 305eb3374435b64f20772408bc8f36cd7acf20f8 Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Thu, 21 Nov 2024 14:47:18 -0600 Subject: [PATCH 54/54] update scm to 1.0.0-alpha.20241120.1 & regen --- .../src/Custom/Assistants/AssistantClient.cs | 4 +-- .../InternalAssistantMessageClient.cs | 11 ++++---- .../Internal/InternalAssistantRunClient.cs | 19 +++++++------ .../Internal/InternalAssistantThreadClient.cs | 9 +++--- .dotnet/src/Custom/Audio/AudioClient.cs | 2 +- .dotnet/src/Custom/Batch/BatchClient.cs | 9 +++--- .dotnet/src/Custom/Chat/ChatClient.cs | 2 +- .../src/Custom/Embeddings/EmbeddingClient.cs | 2 +- .dotnet/src/Custom/Files/OpenAIFileClient.cs | 4 +-- .../src/Custom/FineTuning/FineTuningClient.cs | 13 +++++---- .dotnet/src/Custom/Images/ImageClient.cs | 2 +- .../src/Custom/Models/OpenAIModelClient.cs | 4 +-- .../Custom/Moderations/ModerationClient.cs | 2 +- .../RealtimeConversationClient.cs | 2 +- .../Custom/VectorStores/VectorStoreClient.cs | 20 ++++++------- .../Generated/Internal/ClientUriBuilder.cs | 28 +++++++++---------- .../src/Generated/InternalUploadsClient.cs | 19 +++++++------ .../src/Generated/LegacyCompletionClient.cs | 7 +++-- .../src/OpenAI.Library.Plugin.csproj | 2 +- 19 files changed, 84 insertions(+), 77 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/AssistantClient.cs b/.dotnet/src/Custom/Assistants/AssistantClient.cs index 3b36bf4d9..584af87f1 100644 --- a/.dotnet/src/Custom/Assistants/AssistantClient.cs +++ b/.dotnet/src/Custom/Assistants/AssistantClient.cs @@ -14,7 +14,7 @@ namespace OpenAI.Assistants; [Experimental("OPENAI001")] [CodeGenClient("Assistants")] [CodeGenSuppress("AssistantClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateAssistantAsync", typeof(AssistantCreationOptions))] +[CodeGenSuppress("CreateAssistantAsync", typeof(AssistantCreationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateAssistant", typeof(AssistantCreationOptions))] [CodeGenSuppress("GetAssistantAsync", typeof(string))] [CodeGenSuppress("GetAssistant", typeof(string))] @@ -22,7 +22,7 @@ namespace OpenAI.Assistants; [CodeGenSuppress("ModifyAssistant", typeof(string), typeof(AssistantModificationOptions))] [CodeGenSuppress("DeleteAssistantAsync", typeof(string))] [CodeGenSuppress("DeleteAssistant", typeof(string))] -[CodeGenSuppress("ListAssistantsAsync", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListAssistantsAsync", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("ListAssistants", typeof(int?), typeof(AssistantCollectionOrder?), typeof(string), typeof(string))] public partial class AssistantClient { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 9598db346..0dadf29d2 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -1,20 +1,21 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Threading; namespace OpenAI.Assistants; [CodeGenClient("Messages")] [CodeGenSuppress("InternalAssistantMessageClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateMessageAsync", typeof(string), typeof(MessageCreationOptions))] +[CodeGenSuppress("CreateMessageAsync", typeof(string), typeof(MessageCreationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateMessage", typeof(string), typeof(MessageCreationOptions))] -[CodeGenSuppress("ListMessagesAsync", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListMessagesAsync", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("ListMessages", typeof(string), typeof(int?), typeof(MessageCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetMessageAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetMessageAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetMessage", typeof(string), typeof(string))] -[CodeGenSuppress("ModifyMessageAsync", typeof(string), typeof(string), typeof(MessageModificationOptions))] +[CodeGenSuppress("ModifyMessageAsync", typeof(string), typeof(string), typeof(MessageModificationOptions), typeof(CancellationToken))] [CodeGenSuppress("ModifyMessage", typeof(string), typeof(string), typeof(MessageModificationOptions))] -[CodeGenSuppress("DeleteMessageAsync", typeof(string), typeof(string))] +[CodeGenSuppress("DeleteMessageAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("DeleteMessage", typeof(string), typeof(string))] internal partial class InternalAssistantMessageClient { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index bf2eac4ca..f7a2ad137 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -2,28 +2,29 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Threading; namespace OpenAI.Assistants; [CodeGenClient("Runs")] [CodeGenSuppress("InternalAssistantRunClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateThreadAndRunAsync", typeof(InternalCreateThreadAndRunRequest))] +[CodeGenSuppress("CreateThreadAndRunAsync", typeof(InternalCreateThreadAndRunRequest), typeof(CancellationToken))] [CodeGenSuppress("CreateThreadAndRun", typeof(InternalCreateThreadAndRunRequest))] -[CodeGenSuppress("CreateRunAsync", typeof(string), typeof(RunCreationOptions), typeof(IEnumerable))] +[CodeGenSuppress("CreateRunAsync", typeof(string), typeof(RunCreationOptions), typeof(IEnumerable), typeof(CancellationToken))] [CodeGenSuppress("CreateRun", typeof(string), typeof(RunCreationOptions), typeof(IEnumerable))] -[CodeGenSuppress("ListRunsAsync", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListRunsAsync", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("ListRuns", typeof(string), typeof(int?), typeof(RunCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("GetRunAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetRunAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetRun", typeof(string), typeof(string))] -[CodeGenSuppress("ModifyRunAsync", typeof(string), typeof(string), typeof(RunModificationOptions))] +[CodeGenSuppress("ModifyRunAsync", typeof(string), typeof(string), typeof(RunModificationOptions), typeof(CancellationToken))] [CodeGenSuppress("ModifyRun", typeof(string), typeof(string), typeof(RunModificationOptions))] -[CodeGenSuppress("CancelRunAsync", typeof(string), typeof(string))] +[CodeGenSuppress("CancelRunAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("CancelRun", typeof(string), typeof(string))] -[CodeGenSuppress("SubmitToolOutputsToRunAsync", typeof(string), typeof(string), typeof(InternalSubmitToolOutputsRunRequest))] +[CodeGenSuppress("SubmitToolOutputsToRunAsync", typeof(string), typeof(string), typeof(InternalSubmitToolOutputsRunRequest), typeof(CancellationToken))] [CodeGenSuppress("SubmitToolOutputsToRun", typeof(string), typeof(string), typeof(InternalSubmitToolOutputsRunRequest))] -[CodeGenSuppress("ListRunStepsAsync", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string), typeof(IEnumerable))] +[CodeGenSuppress("ListRunStepsAsync", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string), typeof(IEnumerable), typeof(CancellationToken))] [CodeGenSuppress("ListRunSteps", typeof(string), typeof(string), typeof(int?), typeof(RunStepCollectionOrder?), typeof(string), typeof(string), typeof(IEnumerable))] -[CodeGenSuppress("GetRunStepAsync", typeof(string), typeof(string), typeof(string), typeof(IEnumerable))] +[CodeGenSuppress("GetRunStepAsync", typeof(string), typeof(string), typeof(string), typeof(IEnumerable), typeof(CancellationToken))] [CodeGenSuppress("GetRunStep", typeof(string), typeof(string), typeof(string), typeof(IEnumerable))] internal partial class InternalAssistantRunClient { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index bbb7a61c0..89e1d9e9b 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -1,18 +1,19 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Threading; namespace OpenAI.Assistants; [CodeGenClient("Threads")] [CodeGenSuppress("InternalAssistantThreadClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateThreadAsync", typeof(ThreadCreationOptions))] +[CodeGenSuppress("CreateThreadAsync", typeof(ThreadCreationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateThread", typeof(ThreadCreationOptions))] -[CodeGenSuppress("GetThreadAsync", typeof(string))] +[CodeGenSuppress("GetThreadAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetThread", typeof(string))] -[CodeGenSuppress("ModifyThreadAsync", typeof(string), typeof(ThreadModificationOptions))] +[CodeGenSuppress("ModifyThreadAsync", typeof(string), typeof(ThreadModificationOptions), typeof(CancellationToken))] [CodeGenSuppress("ModifyThread", typeof(string), typeof(ThreadModificationOptions))] -[CodeGenSuppress("DeleteThreadAsync", typeof(string))] +[CodeGenSuppress("DeleteThreadAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("DeleteThread", typeof(string))] internal partial class InternalAssistantThreadClient { diff --git a/.dotnet/src/Custom/Audio/AudioClient.cs b/.dotnet/src/Custom/Audio/AudioClient.cs index 7e0196352..cdf9c3055 100644 --- a/.dotnet/src/Custom/Audio/AudioClient.cs +++ b/.dotnet/src/Custom/Audio/AudioClient.cs @@ -14,7 +14,7 @@ namespace OpenAI.Audio; /// The service client for OpenAI audio operations. [CodeGenClient("Audio")] [CodeGenSuppress("AudioClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateSpeechAsync", typeof(SpeechGenerationOptions))] +[CodeGenSuppress("CreateSpeechAsync", typeof(SpeechGenerationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateSpeech", typeof(SpeechGenerationOptions))] [CodeGenSuppress("CreateTranscriptionAsync", typeof(AudioTranscriptionOptions))] [CodeGenSuppress("CreateTranscription", typeof(AudioTranscriptionOptions))] diff --git a/.dotnet/src/Custom/Batch/BatchClient.cs b/.dotnet/src/Custom/Batch/BatchClient.cs index 610e5e87c..ec0c72de9 100644 --- a/.dotnet/src/Custom/Batch/BatchClient.cs +++ b/.dotnet/src/Custom/Batch/BatchClient.cs @@ -3,6 +3,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace OpenAI.Batch; @@ -15,17 +16,17 @@ namespace OpenAI.Batch; [CodeGenClient("Batches")] [CodeGenSuppress("BatchClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] -[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary))] +[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(InternalBatchCompletionTimeframe), typeof(IDictionary), typeof(CancellationToken))] [CodeGenSuppress("CreateBatch", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("CreateBatchAsync", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("RetrieveBatch", typeof(string))] -[CodeGenSuppress("RetrieveBatchAsync", typeof(string))] +[CodeGenSuppress("RetrieveBatchAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("CancelBatch", typeof(string))] -[CodeGenSuppress("CancelBatchAsync", typeof(string))] +[CodeGenSuppress("CancelBatchAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("CancelBatch", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("CancelBatchAsync", typeof(string), typeof(RequestOptions))] [CodeGenSuppress("ListBatches", typeof(string), typeof(int?))] -[CodeGenSuppress("ListBatchesAsync", typeof(string), typeof(int?))] +[CodeGenSuppress("ListBatchesAsync", typeof(string), typeof(int?), typeof(CancellationToken))] public partial class BatchClient { // CUSTOM: Added as a convenience. diff --git a/.dotnet/src/Custom/Chat/ChatClient.cs b/.dotnet/src/Custom/Chat/ChatClient.cs index 440144443..fcb5c1c45 100644 --- a/.dotnet/src/Custom/Chat/ChatClient.cs +++ b/.dotnet/src/Custom/Chat/ChatClient.cs @@ -16,7 +16,7 @@ namespace OpenAI.Chat; /// The service client for OpenAI chat operations. [CodeGenClient("Chat")] [CodeGenSuppress("ChatClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateChatCompletionAsync", typeof(ChatCompletionOptions))] +[CodeGenSuppress("CreateChatCompletionAsync", typeof(ChatCompletionOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateChatCompletion", typeof(ChatCompletionOptions))] public partial class ChatClient { diff --git a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs index a1a6840b9..a071ac676 100644 --- a/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs +++ b/.dotnet/src/Custom/Embeddings/EmbeddingClient.cs @@ -15,7 +15,7 @@ namespace OpenAI.Embeddings; /// The service client for OpenAI embedding operations. [CodeGenClient("Embeddings")] [CodeGenSuppress("EmbeddingClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateEmbeddingAsync", typeof(EmbeddingGenerationOptions))] +[CodeGenSuppress("CreateEmbeddingAsync", typeof(EmbeddingGenerationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateEmbedding", typeof(EmbeddingGenerationOptions))] public partial class EmbeddingClient { diff --git a/.dotnet/src/Custom/Files/OpenAIFileClient.cs b/.dotnet/src/Custom/Files/OpenAIFileClient.cs index 7f610d2e5..3bf06a8c7 100644 --- a/.dotnet/src/Custom/Files/OpenAIFileClient.cs +++ b/.dotnet/src/Custom/Files/OpenAIFileClient.cs @@ -15,9 +15,9 @@ namespace OpenAI.Files; [CodeGenSuppress("OpenAIFileClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateFileAsync", typeof(InternalFileUploadOptions))] [CodeGenSuppress("CreateFile", typeof(InternalFileUploadOptions))] -[CodeGenSuppress("ListFilesAsync", typeof(string))] +[CodeGenSuppress("ListFilesAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("ListFiles", typeof(string))] -[CodeGenSuppress("RetrieveFileAsync", typeof(string))] +[CodeGenSuppress("RetrieveFileAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("RetrieveFile", typeof(string))] [CodeGenSuppress("DeleteFileAsync", typeof(string))] [CodeGenSuppress("DeleteFile", typeof(string))] diff --git a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs index 94c152152..6a8d90698 100644 --- a/.dotnet/src/Custom/FineTuning/FineTuningClient.cs +++ b/.dotnet/src/Custom/FineTuning/FineTuningClient.cs @@ -2,6 +2,7 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace OpenAI.FineTuning; @@ -13,17 +14,17 @@ namespace OpenAI.FineTuning; [Experimental("OPENAI001")] [CodeGenClient("FineTuning")] [CodeGenSuppress("FineTuningClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateFineTuningJobAsync", typeof(FineTuningOptions))] +[CodeGenSuppress("CreateFineTuningJobAsync", typeof(FineTuningOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateFineTuningJob", typeof(FineTuningOptions))] -[CodeGenSuppress("ListPaginatedFineTuningJobsAsync", typeof(string), typeof(int?))] +[CodeGenSuppress("ListPaginatedFineTuningJobsAsync", typeof(string), typeof(int?), typeof(CancellationToken))] [CodeGenSuppress("ListPaginatedFineTuningJobs", typeof(string), typeof(int?))] -[CodeGenSuppress("RetrieveFineTuningJobAsync", typeof(string))] +[CodeGenSuppress("RetrieveFineTuningJobAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("RetrieveFineTuningJob", typeof(string))] -[CodeGenSuppress("CancelFineTuningJobAsync", typeof(string))] +[CodeGenSuppress("CancelFineTuningJobAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("CancelFineTuningJob", typeof(string))] -[CodeGenSuppress("ListFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningEventsAsync", typeof(string), typeof(string), typeof(int?), typeof(CancellationToken))] [CodeGenSuppress("ListFineTuningEvents", typeof(string), typeof(string), typeof(int?))] -[CodeGenSuppress("ListFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?))] +[CodeGenSuppress("ListFineTuningJobCheckpointsAsync", typeof(string), typeof(string), typeof(int?), typeof(CancellationToken))] [CodeGenSuppress("ListFineTuningJobCheckpoints", typeof(string), typeof(string), typeof(int?))] public partial class FineTuningClient { diff --git a/.dotnet/src/Custom/Images/ImageClient.cs b/.dotnet/src/Custom/Images/ImageClient.cs index 0b22075e2..701cb3cd5 100644 --- a/.dotnet/src/Custom/Images/ImageClient.cs +++ b/.dotnet/src/Custom/Images/ImageClient.cs @@ -15,7 +15,7 @@ namespace OpenAI.Images; /// The service client for OpenAI image operations. [CodeGenClient("Images")] [CodeGenSuppress("ImageClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateImageAsync", typeof(ImageGenerationOptions))] +[CodeGenSuppress("CreateImageAsync", typeof(ImageGenerationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateImage", typeof(ImageGenerationOptions))] [CodeGenSuppress("CreateImageEditAsync", typeof(ImageEditOptions))] [CodeGenSuppress("CreateImageEdit", typeof(ImageEditOptions))] diff --git a/.dotnet/src/Custom/Models/OpenAIModelClient.cs b/.dotnet/src/Custom/Models/OpenAIModelClient.cs index a6c17701c..ddd86f659 100644 --- a/.dotnet/src/Custom/Models/OpenAIModelClient.cs +++ b/.dotnet/src/Custom/Models/OpenAIModelClient.cs @@ -13,9 +13,9 @@ namespace OpenAI.Models; /// The service client for OpenAI model operations. [CodeGenClient("ModelsOps")] [CodeGenSuppress("OpenAIModelClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("ListModelsAsync")] +[CodeGenSuppress("ListModelsAsync", typeof(CancellationToken))] [CodeGenSuppress("ListModels")] -[CodeGenSuppress("RetrieveModelAsync", typeof(string))] +[CodeGenSuppress("RetrieveModelAsync", typeof(string), typeof(CancellationToken))] [CodeGenSuppress("RetrieveModel", typeof(string))] [CodeGenSuppress("DeleteModelAsync", typeof(string))] [CodeGenSuppress("DeleteModel", typeof(string))] diff --git a/.dotnet/src/Custom/Moderations/ModerationClient.cs b/.dotnet/src/Custom/Moderations/ModerationClient.cs index db42e4653..36d96ca9e 100644 --- a/.dotnet/src/Custom/Moderations/ModerationClient.cs +++ b/.dotnet/src/Custom/Moderations/ModerationClient.cs @@ -15,7 +15,7 @@ namespace OpenAI.Moderations; /// The service client for OpenAI moderation operations. [CodeGenClient("Moderations")] [CodeGenSuppress("ModerationClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateModerationAsync", typeof(ModerationOptions))] +[CodeGenSuppress("CreateModerationAsync", typeof(ModerationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateModeration", typeof(ModerationOptions))] public partial class ModerationClient { diff --git a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs index 396290fc4..eb0e22f06 100644 --- a/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs +++ b/.dotnet/src/Custom/RealtimeConversation/RealtimeConversationClient.cs @@ -9,7 +9,7 @@ namespace OpenAI.RealtimeConversation; [CodeGenClient("Realtime")] -[CodeGenSuppress("StartRealtimeSessionAsync", typeof(IEnumerable))] +[CodeGenSuppress("StartRealtimeSessionAsync", typeof(IEnumerable), typeof(CancellationToken))] [CodeGenSuppress("StartRealtimeSessionAsync", typeof(BinaryContent), typeof(RequestOptions))] [CodeGenSuppress("StartRealtimeSession", typeof(IEnumerable))] [CodeGenSuppress("StartRealtimeSession", typeof(BinaryContent), typeof(RequestOptions))] diff --git a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs index 9ea171a96..c3224e9b0 100644 --- a/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs +++ b/.dotnet/src/Custom/VectorStores/VectorStoreClient.cs @@ -15,7 +15,7 @@ namespace OpenAI.VectorStores; [Experimental("OPENAI001")] [CodeGenClient("VectorStores")] [CodeGenSuppress("VectorStoreClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] -[CodeGenSuppress("CreateVectorStoreAsync", typeof(VectorStoreCreationOptions))] +[CodeGenSuppress("CreateVectorStoreAsync", typeof(VectorStoreCreationOptions), typeof(CancellationToken))] [CodeGenSuppress("CreateVectorStore", typeof(VectorStoreCreationOptions))] [CodeGenSuppress("GetVectorStoreAsync", typeof(string))] [CodeGenSuppress("GetVectorStore", typeof(string))] @@ -23,23 +23,23 @@ namespace OpenAI.VectorStores; [CodeGenSuppress("ModifyVectorStore", typeof(string), typeof(VectorStoreModificationOptions))] [CodeGenSuppress("DeleteVectorStoreAsync", typeof(string))] [CodeGenSuppress("DeleteVectorStore", typeof(string))] -[CodeGenSuppress("ListVectorStoresAsync", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] +[CodeGenSuppress("ListVectorStoresAsync", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("ListVectorStores", typeof(int?), typeof(VectorStoreCollectionOrder?), typeof(string), typeof(string))] -[CodeGenSuppress("ListVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListVectorStoreFilesAsync", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?), typeof(CancellationToken))] [CodeGenSuppress("ListVectorStoreFiles", typeof(string), typeof(int?), typeof(VectorStoreFileAssociationCollectionOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] -[CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] +[CodeGenSuppress("CreateVectorStoreFileAsync", typeof(string), typeof(InternalCreateVectorStoreFileRequest), typeof(CancellationToken))] [CodeGenSuppress("CreateVectorStoreFile", typeof(string), typeof(InternalCreateVectorStoreFileRequest))] -[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string))] -[CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string))] +[CodeGenSuppress("DeleteVectorStoreFileAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("DeleteVectorStoreFile", typeof(string), typeof(string))] -[CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] +[CodeGenSuppress("CreateVectorStoreFileBatchAsync", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest), typeof(CancellationToken))] [CodeGenSuppress("CreateVectorStoreFileBatch", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest))] -[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string))] +[CodeGenSuppress("GetVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string))] -[CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string))] +[CodeGenSuppress("CancelVectorStoreFileBatchAsync", typeof(string), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("CancelVectorStoreFileBatch", typeof(string), typeof(string))] -[CodeGenSuppress("ListFilesInVectorStoreBatchAsync", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] +[CodeGenSuppress("ListFilesInVectorStoreBatchAsync", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?), typeof(CancellationToken))] [CodeGenSuppress("ListFilesInVectorStoreBatch", typeof(string), typeof(string), typeof(int?), typeof(InternalListFilesInVectorStoreBatchRequestOrder?), typeof(string), typeof(string), typeof(VectorStoreFileStatusFilter?))] public partial class VectorStoreClient { diff --git a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs index ecfce6715..066512b50 100644 --- a/.dotnet/src/Generated/Internal/ClientUriBuilder.cs +++ b/.dotnet/src/Generated/Internal/ClientUriBuilder.cs @@ -56,8 +56,6 @@ public void AppendPath(string value, bool escape) public void AppendPath(byte[] value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - public void AppendPath(IEnumerable value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - public void AppendPath(DateTimeOffset value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); public void AppendPath(TimeSpan value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); @@ -66,6 +64,13 @@ public void AppendPath(string value, bool escape) public void AppendPath(long value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); + public void AppendPathDelimited(IEnumerable value, string delimiter, string format = null, bool escape = true) + { + delimiter ??= ","; + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + AppendPath(string.Join(delimiter, stringValues), escape); + } + public void AppendQuery(string name, string value, bool escape) { if (QueryBuilder.Length > 0) @@ -103,6 +108,13 @@ public void AppendQuery(string name, string value, bool escape) public void AppendQuery(string name, Guid value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); + public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, string format = null, bool escape = true) + { + delimiter ??= ","; + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + AppendQuery(name, string.Join(delimiter, stringValues), escape); + } + public Uri ToUri() { if (_pathBuilder != null) @@ -115,17 +127,5 @@ public Uri ToUri() } return UriBuilder.Uri; } - - public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, bool escape = true) - { - IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); - AppendQuery(name, string.Join(delimiter, stringValues), escape); - } - - public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, string format, bool escape = true) - { - IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); - AppendQuery(name, string.Join(delimiter, stringValues), escape); - } } } diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index 1829e63f0..fae16ee86 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -5,6 +5,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Threading; using System.Threading.Tasks; using OpenAI; @@ -43,15 +44,15 @@ public virtual ClientResult CreateUpload(InternalCreateUploadReq { Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CreateUpload(requestBody, null); + ClientResult result = CreateUpload(requestBody, options: null); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody) + public virtual async Task> CreateUploadAsync(InternalCreateUploadRequest requestBody, CancellationToken cancellationToken = default) { Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CreateUploadAsync(requestBody, null).ConfigureAwait(false); + ClientResult result = await CreateUploadAsync(requestBody, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } @@ -96,16 +97,16 @@ public virtual ClientResult CompleteUpload(string uploadId, Inte Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CompleteUpload(uploadId, requestBody, null); + ClientResult result = CompleteUpload(uploadId, requestBody, options: null); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody) + public virtual async Task> CompleteUploadAsync(string uploadId, InternalCompleteUploadRequest requestBody, CancellationToken cancellationToken = default) { Argument.AssertNotNull(uploadId, nameof(uploadId)); Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CompleteUploadAsync(uploadId, requestBody, null).ConfigureAwait(false); + ClientResult result = await CompleteUploadAsync(uploadId, requestBody, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } @@ -129,15 +130,15 @@ public virtual ClientResult CancelUpload(string uploadId) { Argument.AssertNotNull(uploadId, nameof(uploadId)); - ClientResult result = CancelUpload(uploadId, null); + ClientResult result = CancelUpload(uploadId, options: null); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } - public virtual async Task> CancelUploadAsync(string uploadId) + public virtual async Task> CancelUploadAsync(string uploadId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(uploadId, nameof(uploadId)); - ClientResult result = await CancelUploadAsync(uploadId, null).ConfigureAwait(false); + ClientResult result = await CancelUploadAsync(uploadId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); return ClientResult.FromValue((InternalUpload)result, result.GetRawResponse()); } } diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index 2ff0cf4c7..b64ea0472 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -5,6 +5,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Threading; using System.Threading.Tasks; using OpenAI; @@ -43,15 +44,15 @@ public virtual ClientResult CreateCompletion(I { Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = CreateCompletion(requestBody, null); + ClientResult result = CreateCompletion(requestBody, options: null); return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); } - public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody) + public virtual async Task> CreateCompletionAsync(InternalCreateCompletionRequest requestBody, CancellationToken cancellationToken = default) { Argument.AssertNotNull(requestBody, nameof(requestBody)); - ClientResult result = await CreateCompletionAsync(requestBody, null).ConfigureAwait(false); + ClientResult result = await CreateCompletionAsync(requestBody, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); return ClientResult.FromValue((InternalCreateCompletionResponse)result, result.GetRawResponse()); } } diff --git a/.plugin/generator/src/OpenAI.Library.Plugin.csproj b/.plugin/generator/src/OpenAI.Library.Plugin.csproj index 33504ef08..8f4de6514 100644 --- a/.plugin/generator/src/OpenAI.Library.Plugin.csproj +++ b/.plugin/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - +